Creates a self-extracting install script.
This commit is contained in:
@@ -15,6 +15,13 @@ repositories {
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
install {
|
||||
canBeConsumed = true
|
||||
canBeResolved = false
|
||||
}
|
||||
}
|
||||
|
||||
// In this section you declare the dependencies for your production and test code
|
||||
dependencies {
|
||||
// The production code uses the SLF4J logging API at compile time
|
||||
@@ -46,3 +53,7 @@ targetCompatibility = JavaVersion.VERSION_16
|
||||
// Define the main class for the application
|
||||
mainClassName = defaultPackage + '.PlayerEnvironment'
|
||||
//mainClassName = defaultPackage + '.localPlayer.Player'
|
||||
|
||||
artifacts {
|
||||
install(distTar)
|
||||
}
|
||||
@@ -203,7 +203,10 @@ public class PlayerEnvironment
|
||||
*/
|
||||
runArguments(ops, params, System.out);
|
||||
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(connector::stop));
|
||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
|
||||
connector.stop();
|
||||
PlayerManager.getPlayers().shutdownPlayers();
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -619,12 +619,13 @@ public class Interface extends JFrame implements SongDisplayListener, ComponentL
|
||||
@Override
|
||||
public void windowClosing(WindowEvent windowEvent)
|
||||
{
|
||||
PlayerManager.getPlayers().shutdownPlayers();
|
||||
logger.info("Window closing");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void windowClosed(WindowEvent windowEvent)
|
||||
{
|
||||
logger.info("Window closed");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user