Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PlayWallDesktop
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PlayWall
PlayWallDesktop
Commits
f5c6be9d
Commit
f5c6be9d
authored
8 years ago
by
tobias
Browse files
Options
Downloads
Patches
Plain Diff
Use Updates.update to start update process
parent
f6ba683d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
PlayWall/src/de/tobias/playpad/PlayPadMain.java
+18
-8
18 additions, 8 deletions
PlayWall/src/de/tobias/playpad/PlayPadMain.java
PlayWall/src/de/tobias/playpad/viewcontroller/option/UpdateTabViewController.java
+15
-1
15 additions, 1 deletion
...laypad/viewcontroller/option/UpdateTabViewController.java
with
33 additions
and
9 deletions
PlayWall/src/de/tobias/playpad/PlayPadMain.java
+
18
−
8
View file @
f5c6be9d
...
...
@@ -57,6 +57,7 @@ import de.tobias.playpad.trigger.VolumeTriggerItemConnect;
import
de.tobias.playpad.update.PlayPadUpdater
;
import
de.tobias.playpad.update.Updatable
;
import
de.tobias.playpad.update.UpdateRegistery
;
import
de.tobias.playpad.update.Updates
;
import
de.tobias.playpad.view.MapperOverviewViewController
;
import
de.tobias.playpad.viewcontroller.IPadSettingsViewController
;
import
de.tobias.playpad.viewcontroller.ISettingsViewController
;
...
...
@@ -64,7 +65,6 @@ import de.tobias.playpad.viewcontroller.LaunchDialog;
import
de.tobias.playpad.viewcontroller.dialog.ChangelogDialog
;
import
de.tobias.playpad.viewcontroller.main.IMainViewController
;
import
de.tobias.playpad.viewcontroller.main.MainViewController
;
import
de.tobias.playpad.viewcontroller.option.UpdateTabViewController
;
import
de.tobias.utils.application.App
;
import
de.tobias.utils.application.ApplicationUtils
;
import
de.tobias.utils.application.container.PathType
;
...
...
@@ -165,8 +165,10 @@ public class PlayPadMain extends Application implements LocalizationDelegate, Pl
// Console
if
(!
ApplicationUtils
.
getApplication
().
isDebug
())
{
System
.
setOut
(
ConsoleUtils
.
streamToFile
(
ApplicationUtils
.
getApplication
().
getPath
(
PathType
.
LOG
,
"out.log"
)));
System
.
setErr
(
ConsoleUtils
.
streamToFile
(
ApplicationUtils
.
getApplication
().
getPath
(
PathType
.
LOG
,
"err.log"
)));
System
.
setOut
(
ConsoleUtils
.
streamToFile
(
ApplicationUtils
.
getApplication
().
getPath
(
PathType
.
LOG
,
"out.log"
)));
System
.
setErr
(
ConsoleUtils
.
streamToFile
(
ApplicationUtils
.
getApplication
().
getPath
(
PathType
.
LOG
,
"err.log"
)));
}
}
...
...
@@ -176,7 +178,8 @@ public class PlayPadMain extends Application implements LocalizationDelegate, Pl
try
{
Image
stageIcon
=
new
Image
(
iconPath
);
PlayPadMain
.
stageIcon
=
Optional
.
of
(
stageIcon
);
}
catch
(
Exception
e
)
{}
}
catch
(
Exception
e
)
{
}
/*
* Setup
...
...
@@ -205,7 +208,8 @@ public class PlayPadMain extends Application implements LocalizationDelegate, Pl
UUID
uuid
=
UUID
.
fromString
(
getParameters
().
getNamed
().
get
(
"project"
));
launchProject
(
Project
.
load
(
ProjectReference
.
getProject
(
uuid
),
true
,
null
));
return
;
}
catch
(
IllegalArgumentException
|
NullPointerException
e
)
{}
catch
(
Exception
e
)
{
}
catch
(
IllegalArgumentException
|
NullPointerException
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
...
...
@@ -310,7 +314,8 @@ public class PlayPadMain extends Application implements LocalizationDelegate, Pl
pluginManager
=
PluginManagerFactory
.
createPluginManager
();
if
(
ApplicationUtils
.
getApplication
().
isDebug
())
// DEBUG PLUGINS EINBINDEN
pluginManager
.
addPluginsFrom
(
Paths
.
get
(
"/Users/tobias/Documents/Programmieren/Java/eclipse/PlayWallPlugins/bin/"
).
toUri
());
pluginManager
.
addPluginsFrom
(
Paths
.
get
(
"/Users/tobias/Documents/Programmieren/Java/eclipse/PlayWallPlugins/bin/"
).
toUri
());
else
pluginManager
.
addPluginsFrom
(
ApplicationUtils
.
getApplication
().
getPath
(
PathType
.
LIBRARY
).
toUri
());
}
...
...
@@ -345,11 +350,16 @@ public class PlayPadMain extends Application implements LocalizationDelegate, Pl
alert
.
setContentText
(
Localization
.
getString
(
Strings
.
UI_Dialog_AutoUpdate_Content
));
alert
.
showAndWait
().
filter
(
item
->
item
==
ButtonType
.
OK
).
ifPresent
(
result
->
{
UpdateTabViewController
.
update
(
null
);
try
{
Updates
.
update
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
});
});
}
}
catch
(
IOException
|
URISyntaxException
e
)
{}
}
catch
(
IOException
|
URISyntaxException
e
)
{
}
});
}
}
...
...
This diff is collapsed.
Click to expand it.
PlayWall/src/de/tobias/playpad/viewcontroller/option/UpdateTabViewController.java
+
15
−
1
View file @
f5c6be9d
...
...
@@ -21,6 +21,7 @@ import de.tobias.playpad.settings.ProfileSettings;
import
de.tobias.playpad.update.Updatable
;
import
de.tobias.playpad.update.UpdateChannel
;
import
de.tobias.playpad.update.UpdateRegistery
;
import
de.tobias.playpad.update.Updates
;
import
de.tobias.playpad.viewcontroller.SettingsTabViewController
;
import
de.tobias.playpad.viewcontroller.cell.EnumCell
;
import
de.tobias.playpad.viewcontroller.cell.UpdateCell
;
...
...
@@ -144,7 +145,17 @@ public class UpdateTabViewController extends SettingsTabViewController {
@FXML
private
void
updateHandler
(
ActionEvent
event
)
{
update
(
getStage
());
UpdaterDialog
dialog
=
new
UpdaterDialog
(
getStage
());
dialog
.
show
();
Worker
.
runLater
(()
->
{
try
{
Updates
.
update
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
});
}
/**
...
...
@@ -154,6 +165,7 @@ public class UpdateTabViewController extends SettingsTabViewController {
* @param dialogOwner
* Window owner für Dialoge
*/
@Deprecated
public
static
void
update
(
Window
dialogOwner
)
{
// Parameter für Updater und Pfad für Downloads
App
app
=
ApplicationUtils
.
getApplication
();
...
...
@@ -175,6 +187,7 @@ public class UpdateTabViewController extends SettingsTabViewController {
* Owner window
* @param parameter
*/
@Deprecated
private
static
void
macUpdate
(
Window
dialogOwner
,
String
parameter
)
{
try
{
Path
fileJar
=
Paths
.
get
(
UPDATER_JAR
);
...
...
@@ -211,6 +224,7 @@ public class UpdateTabViewController extends SettingsTabViewController {
}
}
@Deprecated
private
static
void
windowsUpdate
(
Window
dialogOwner
,
String
parameter
,
boolean
admin
)
{
try
{
Path
fileExe
=
Paths
.
get
(
UPDATER_EXE
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment