added file/console logging
using log4j-core to implement level logging. Logs can be found in the directory ./logs/
This commit is contained in:
parent
da675b2695
commit
43726ad2a9
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ META-INF/
|
|||||||
target/
|
target/
|
||||||
*/target/
|
*/target/
|
||||||
dist/src/main/resources/jre.zip
|
dist/src/main/resources/jre.zip
|
||||||
|
logs/
|
@ -55,6 +55,11 @@
|
|||||||
<artifactId>forms_rt</artifactId>
|
<artifactId>forms_rt</artifactId>
|
||||||
<version>7.0.3</version>
|
<version>7.0.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-core</artifactId>
|
||||||
|
<version>2.13.1</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -22,6 +22,10 @@ import com.typesafe.config.Config;
|
|||||||
import com.typesafe.config.ConfigFactory;
|
import com.typesafe.config.ConfigFactory;
|
||||||
import de.mc8051.arma3launcher.steam.SteamTimer;
|
import de.mc8051.arma3launcher.steam.SteamTimer;
|
||||||
import de.mc8051.arma3launcher.utils.TaskBarUtils;
|
import de.mc8051.arma3launcher.utils.TaskBarUtils;
|
||||||
|
import org.apache.logging.log4j.Level;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
import org.apache.logging.log4j.core.config.Configurator;
|
||||||
import org.ini4j.Ini;
|
import org.ini4j.Ini;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
@ -29,18 +33,19 @@ import java.awt.*;
|
|||||||
import java.awt.event.WindowAdapter;
|
import java.awt.event.WindowAdapter;
|
||||||
import java.awt.event.WindowEvent;
|
import java.awt.event.WindowEvent;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by gurkengewuerz.de on 23.03.2020.
|
* Created by gurkengewuerz.de on 23.03.2020.
|
||||||
*/
|
*/
|
||||||
public class ArmA3Launcher {
|
public class ArmA3Launcher {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(ArmA3Launcher.class);
|
||||||
|
|
||||||
public static final String[] SUPPORTED_LANGUAGES = {"en_US", "de_DE"};
|
public static final String[] SUPPORTED_LANGUAGES = {"en_US", "de_DE"};
|
||||||
|
|
||||||
public static String VERSION;
|
public static String VERSION;
|
||||||
@ -51,40 +56,70 @@ public class ArmA3Launcher {
|
|||||||
public static Config config;
|
public static Config config;
|
||||||
public static Ini user_config;
|
public static Ini user_config;
|
||||||
|
|
||||||
public static void main(String... args) throws Exception {
|
public static void main(String... args) {
|
||||||
|
Configurator.setAllLevels(LogManager.getRootLogger().getName(), Level.INFO);
|
||||||
|
|
||||||
config = ConfigFactory.load("arma3launcher");
|
config = ConfigFactory.load("arma3launcher");
|
||||||
|
|
||||||
CLIENT_NAME = config.getString("name");
|
CLIENT_NAME = config.getString("name");
|
||||||
|
logger.info("Application with client name {} started", CLIENT_NAME);
|
||||||
|
|
||||||
final Properties properties = new Properties();
|
final Properties properties = new Properties();
|
||||||
properties.load(ArmA3Launcher.class.getClassLoader().getResourceAsStream("project.properties"));
|
try {
|
||||||
|
properties.load(ArmA3Launcher.class.getClassLoader().getResourceAsStream("project.properties"));
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.error(e);
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
VERSION = properties.getProperty("version");
|
VERSION = properties.getProperty("version");
|
||||||
|
logger.info("Application version v{}", VERSION);
|
||||||
|
|
||||||
APPLICATION_PATH = getAppData() + CLIENT_NAME;
|
APPLICATION_PATH = getAppData() + CLIENT_NAME;
|
||||||
|
logger.debug("Application path {}", APPLICATION_PATH);
|
||||||
|
|
||||||
USER_AGENT = config.getString("sync.useragent") + "/" + VERSION;
|
USER_AGENT = config.getString("sync.useragent") + "/" + VERSION;
|
||||||
|
|
||||||
if (new File(APPLICATION_PATH).mkdirs()) {
|
if (new File(APPLICATION_PATH).mkdirs()) {
|
||||||
Logger.getLogger(ArmA3Launcher.class.getName()).log(Level.SEVERE, "Can not create " + APPLICATION_PATH);
|
logger.error("Can not create " + APPLICATION_PATH);
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
File userConfigFile = new File(APPLICATION_PATH + File.separator + "config.ini");
|
File userConfigFile = new File(APPLICATION_PATH + File.separator + "config.ini");
|
||||||
if(!userConfigFile.exists()) {
|
if (!userConfigFile.exists()) {
|
||||||
if(!userConfigFile.createNewFile()) {
|
try {
|
||||||
Logger.getLogger(ArmA3Launcher.class.getName()).log(Level.SEVERE, "Can not create " + userConfigFile.getAbsolutePath());
|
if (!userConfigFile.createNewFile()) {
|
||||||
|
logger.error("Can not create " + userConfigFile.getAbsolutePath());
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.error(e);
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
user_config = new Ini(userConfigFile);
|
try {
|
||||||
|
user_config = new Ini(userConfigFile);
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.error("Couldn't read " + userConfigFile.getAbsolutePath(), e);
|
||||||
|
System.exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
final Parameter debugParameter = Parameters.DEBUG.toParameter();
|
||||||
|
if(debugParameter.getValue() != null && (Boolean) debugParameter.getValue())
|
||||||
|
Configurator.setAllLevels(LogManager.getRootLogger().getName(), Level.ALL);
|
||||||
|
|
||||||
|
logger.debug("Setup steam timer");
|
||||||
Timer steamTimer = new Timer();
|
Timer steamTimer = new Timer();
|
||||||
|
|
||||||
setLanguage();
|
setLanguage();
|
||||||
|
|
||||||
UIManager.setLookAndFeel(new FlatDarkLaf());
|
try {
|
||||||
|
UIManager.setLookAndFeel(new FlatDarkLaf());
|
||||||
|
} catch (UnsupportedLookAndFeelException e) {
|
||||||
|
logger.error("Failed to set LAF", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.debug("Setup frame with client name {}", CLIENT_NAME);
|
||||||
JFrame frame = new JFrame(CLIENT_NAME);
|
JFrame frame = new JFrame(CLIENT_NAME);
|
||||||
TaskBarUtils.getInstance().setWindow(frame);
|
TaskBarUtils.getInstance().setWindow(frame);
|
||||||
|
|
||||||
@ -94,11 +129,13 @@ public class ArmA3Launcher {
|
|||||||
frame.addWindowListener(new WindowAdapter() {
|
frame.addWindowListener(new WindowAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void windowClosing(WindowEvent e) {
|
public void windowClosing(WindowEvent e) {
|
||||||
|
logger.info("Shutting down application correctly");
|
||||||
steamTimer.cancel();
|
steamTimer.cancel();
|
||||||
steamTimer.purge();
|
steamTimer.purge();
|
||||||
TaskBarUtils.getInstance().removeTrayIcon();
|
TaskBarUtils.getInstance().removeTrayIcon();
|
||||||
gui.exit();
|
gui.exit();
|
||||||
frame.dispose();
|
frame.dispose();
|
||||||
|
logger.info("Shut down");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -113,7 +150,9 @@ public class ArmA3Launcher {
|
|||||||
new SteamTimer(),
|
new SteamTimer(),
|
||||||
500, // run first occurrence immediately
|
500, // run first occurrence immediately
|
||||||
10000); // run every thirty seconds
|
10000); // run every thirty seconds
|
||||||
|
logger.info("SteamTimer scheduled at fixed rate");
|
||||||
|
|
||||||
|
logger.debug("GUI launched");
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,14 +174,17 @@ public class ArmA3Launcher {
|
|||||||
|
|
||||||
private static void setLanguage() {
|
private static void setLanguage() {
|
||||||
String lang = Locale.getDefault().getLanguage() + "_" + Locale.getDefault().getCountry();
|
String lang = Locale.getDefault().getLanguage() + "_" + Locale.getDefault().getCountry();
|
||||||
|
logger.debug("Default language {}", lang);
|
||||||
|
|
||||||
String clientSetting = ArmA3Launcher.user_config.get("client", "language");
|
String clientSetting = ArmA3Launcher.user_config.get("client", "language");
|
||||||
if(clientSetting != null && !clientSetting.equals("system") && Arrays.asList(SUPPORTED_LANGUAGES).contains(clientSetting)) {
|
if (clientSetting != null && !clientSetting.equals("system") && Arrays.asList(SUPPORTED_LANGUAGES).contains(clientSetting)) {
|
||||||
Locale.setDefault(new Locale(clientSetting.split("_")[0], clientSetting.split("_")[1]));
|
Locale.setDefault(new Locale(clientSetting.split("_")[0], clientSetting.split("_")[1]));
|
||||||
|
logger.info("Using config language {}", lang);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!Arrays.asList(SUPPORTED_LANGUAGES).contains(lang))
|
if (!Arrays.asList(SUPPORTED_LANGUAGES).contains(lang))
|
||||||
Locale.setDefault(new Locale("en", "US"));
|
Locale.setDefault(new Locale("en", "US"));
|
||||||
|
logger.info("Using language {}", lang);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1232,7 +1232,7 @@
|
|||||||
</properties>
|
</properties>
|
||||||
<border type="empty"/>
|
<border type="empty"/>
|
||||||
<children>
|
<children>
|
||||||
<grid id="4b04" layout-manager="GridLayoutManager" row-count="39" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="4b04" layout-manager="GridLayoutManager" row-count="40" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="0" left="0" bottom="0" right="5"/>
|
<margin top="0" left="0" bottom="0" right="5"/>
|
||||||
<constraints/>
|
<constraints/>
|
||||||
<properties>
|
<properties>
|
||||||
@ -1394,7 +1394,7 @@
|
|||||||
<grid id="a0aec" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="a0aec" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="2" left="5" bottom="3" right="0"/>
|
<margin top="2" left="5" bottom="3" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="10" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="11" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<background color="-14736860"/>
|
<background color="-14736860"/>
|
||||||
@ -1416,7 +1416,7 @@
|
|||||||
<grid id="51038" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="51038" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="0" left="0" bottom="25" right="0"/>
|
<margin top="0" left="0" bottom="25" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="9" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="10" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
@ -1424,7 +1424,7 @@
|
|||||||
</grid>
|
</grid>
|
||||||
<component id="ba337" class="javax.swing.JLabel">
|
<component id="ba337" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="11" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="12" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="Profile"/>
|
<text value="Profile"/>
|
||||||
@ -1433,13 +1433,13 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="645c2" class="javax.swing.JComboBox" binding="settingsProfileCombo">
|
<component id="645c2" class="javax.swing.JComboBox" binding="settingsProfileCombo">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="11" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
<grid row="12" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
</component>
|
</component>
|
||||||
<component id="ee343" class="javax.swing.JLabel">
|
<component id="ee343" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="12" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="13" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="Use64BitClient"/>
|
<text value="Use64BitClient"/>
|
||||||
@ -1448,7 +1448,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="3ba17" class="javax.swing.JLabel">
|
<component id="3ba17" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="14" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="15" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="NoSplash"/>
|
<text value="NoSplash"/>
|
||||||
@ -1457,7 +1457,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="37fea" class="javax.swing.JLabel">
|
<component id="37fea" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="15" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="16" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="SkipIntro"/>
|
<text value="SkipIntro"/>
|
||||||
@ -1466,7 +1466,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="435dd" class="javax.swing.JLabel">
|
<component id="435dd" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="16" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="17" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="World"/>
|
<text value="World"/>
|
||||||
@ -1475,7 +1475,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="7fe7" class="javax.swing.JTextField" binding="settingsWorldText">
|
<component id="7fe7" class="javax.swing.JTextField" binding="settingsWorldText">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="16" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
<grid row="17" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||||
<preferred-size width="150" height="-1"/>
|
<preferred-size width="150" height="-1"/>
|
||||||
</grid>
|
</grid>
|
||||||
</constraints>
|
</constraints>
|
||||||
@ -1483,7 +1483,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="60855" class="javax.swing.JLabel">
|
<component id="60855" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="18" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="19" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="MaxMem"/>
|
<text value="MaxMem"/>
|
||||||
@ -1492,7 +1492,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="3bf4b" class="javax.swing.JLabel">
|
<component id="3bf4b" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="19" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="20" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="MaxVRAM"/>
|
<text value="MaxVRAM"/>
|
||||||
@ -1501,7 +1501,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="b9b2e" class="javax.swing.JLabel">
|
<component id="b9b2e" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="20" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="21" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="NoCB"/>
|
<text value="NoCB"/>
|
||||||
@ -1511,7 +1511,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="823ee" class="javax.swing.JLabel">
|
<component id="823ee" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="21" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="22" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="CpuCount"/>
|
<text value="CpuCount"/>
|
||||||
@ -1520,7 +1520,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="b86c3" class="javax.swing.JLabel">
|
<component id="b86c3" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="22" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="23" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="ExThreads"/>
|
<text value="ExThreads"/>
|
||||||
@ -1529,7 +1529,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="dfcec" class="javax.swing.JLabel">
|
<component id="dfcec" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="23" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="24" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="Malloc"/>
|
<text value="Malloc"/>
|
||||||
@ -1538,7 +1538,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="31ea0" class="javax.swing.JLabel">
|
<component id="31ea0" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="24" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="25" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="NoLogs"/>
|
<text value="NoLogs"/>
|
||||||
@ -1547,7 +1547,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="b30fd" class="javax.swing.JLabel">
|
<component id="b30fd" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="25" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="26" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="EnableHT"/>
|
<text value="EnableHT"/>
|
||||||
@ -1556,7 +1556,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="c4f30" class="javax.swing.JLabel">
|
<component id="c4f30" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="26" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="27" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="Hugepages"/>
|
<text value="Hugepages"/>
|
||||||
@ -1566,7 +1566,7 @@
|
|||||||
<grid id="66873" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="66873" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="5" left="0" bottom="5" right="0"/>
|
<margin top="5" left="0" bottom="5" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="17" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="18" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
@ -1597,7 +1597,7 @@
|
|||||||
<grid id="e765b" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="e765b" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="5" left="0" bottom="5" right="0"/>
|
<margin top="5" left="0" bottom="5" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="13" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="14" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
@ -1628,7 +1628,7 @@
|
|||||||
<grid id="c2001" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="c2001" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="5" left="0" bottom="5" right="0"/>
|
<margin top="5" left="0" bottom="5" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="27" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="28" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
@ -1658,7 +1658,7 @@
|
|||||||
</grid>
|
</grid>
|
||||||
<component id="605f" class="javax.swing.JLabel">
|
<component id="605f" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="28" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="29" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="NoPause"/>
|
<text value="NoPause"/>
|
||||||
@ -1667,7 +1667,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="12886" class="javax.swing.JLabel">
|
<component id="12886" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="29" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="30" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="ShowScriptErrors"/>
|
<text value="ShowScriptErrors"/>
|
||||||
@ -1676,7 +1676,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="f2d04" class="javax.swing.JLabel">
|
<component id="f2d04" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="30" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="31" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="FilePatching"/>
|
<text value="FilePatching"/>
|
||||||
@ -1685,7 +1685,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="d2664" class="javax.swing.JLabel">
|
<component id="d2664" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="31" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="32" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="Init"/>
|
<text value="Init"/>
|
||||||
@ -1694,7 +1694,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="9367" class="javax.swing.JLabel">
|
<component id="9367" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="32" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="33" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="Beta"/>
|
<text value="Beta"/>
|
||||||
@ -1703,7 +1703,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="4e786" class="javax.swing.JLabel">
|
<component id="4e786" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="33" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="34" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="CrashDiag"/>
|
<text value="CrashDiag"/>
|
||||||
@ -1712,7 +1712,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="b9ac8" class="javax.swing.JLabel">
|
<component id="b9ac8" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="35" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="36" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="Window"/>
|
<text value="Window"/>
|
||||||
@ -1722,7 +1722,7 @@
|
|||||||
<grid id="cc3b" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="cc3b" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="5" left="0" bottom="5" right="0"/>
|
<margin top="5" left="0" bottom="5" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="34" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="35" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
@ -1752,7 +1752,7 @@
|
|||||||
</grid>
|
</grid>
|
||||||
<component id="4c4c9" class="javax.swing.JLabel">
|
<component id="4c4c9" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="36" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="37" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="PosX"/>
|
<text value="PosX"/>
|
||||||
@ -1761,7 +1761,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="8f956" class="javax.swing.JLabel">
|
<component id="8f956" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="37" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="38" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="PosY"/>
|
<text value="PosY"/>
|
||||||
@ -1770,7 +1770,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="e4cad" class="javax.swing.JCheckBox" binding="settingsNoCBBox">
|
<component id="e4cad" class="javax.swing.JCheckBox" binding="settingsNoCBBox">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="20" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="21" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value=""/>
|
<text value=""/>
|
||||||
@ -1778,7 +1778,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="8fe70" class="javax.swing.JComboBox" binding="settingsMallocCombo">
|
<component id="8fe70" class="javax.swing.JComboBox" binding="settingsMallocCombo">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="23" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
<grid row="24" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<model>
|
<model>
|
||||||
@ -1793,7 +1793,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="95bee" class="javax.swing.JCheckBox" binding="settingsNoLogsBox">
|
<component id="95bee" class="javax.swing.JCheckBox" binding="settingsNoLogsBox">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="24" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="25" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value=""/>
|
<text value=""/>
|
||||||
@ -1801,7 +1801,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="f6552" class="javax.swing.JCheckBox" binding="settingsEnableHTBox">
|
<component id="f6552" class="javax.swing.JCheckBox" binding="settingsEnableHTBox">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="25" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="26" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value=""/>
|
<text value=""/>
|
||||||
@ -1809,7 +1809,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="f639b" class="javax.swing.JCheckBox" binding="settingsHugeoagesBox">
|
<component id="f639b" class="javax.swing.JCheckBox" binding="settingsHugeoagesBox">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="26" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="27" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value=""/>
|
<text value=""/>
|
||||||
@ -1817,7 +1817,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="728e8" class="javax.swing.JCheckBox" binding="settingsNoPauseBox">
|
<component id="728e8" class="javax.swing.JCheckBox" binding="settingsNoPauseBox">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="28" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="29" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value=""/>
|
<text value=""/>
|
||||||
@ -1825,7 +1825,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="b92f" class="javax.swing.JCheckBox" binding="settingsShowScriptErrorsBox">
|
<component id="b92f" class="javax.swing.JCheckBox" binding="settingsShowScriptErrorsBox">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="29" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="30" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value=""/>
|
<text value=""/>
|
||||||
@ -1833,7 +1833,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="83780" class="javax.swing.JCheckBox" binding="settingsFilePatchingBox">
|
<component id="83780" class="javax.swing.JCheckBox" binding="settingsFilePatchingBox">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="30" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="31" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value=""/>
|
<text value=""/>
|
||||||
@ -1841,7 +1841,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="4cf92" class="javax.swing.JCheckBox" binding="settingsCrashDiagBox">
|
<component id="4cf92" class="javax.swing.JCheckBox" binding="settingsCrashDiagBox">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="33" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="34" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value=""/>
|
<text value=""/>
|
||||||
@ -1849,7 +1849,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="d669d" class="javax.swing.JCheckBox" binding="settingsWindowBox">
|
<component id="d669d" class="javax.swing.JCheckBox" binding="settingsWindowBox">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="35" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="36" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value=""/>
|
<text value=""/>
|
||||||
@ -1857,37 +1857,37 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="1fd16" class="javax.swing.JSpinner" binding="settingsMaxMemSpinner">
|
<component id="1fd16" class="javax.swing.JSpinner" binding="settingsMaxMemSpinner">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="18" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
<grid row="19" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
</component>
|
</component>
|
||||||
<component id="67772" class="javax.swing.JSpinner" binding="settingsMaxVRamSpinner">
|
<component id="67772" class="javax.swing.JSpinner" binding="settingsMaxVRamSpinner">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="19" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
<grid row="20" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
</component>
|
</component>
|
||||||
<component id="d8a9" class="javax.swing.JSpinner" binding="settingsCpuCountSpinner">
|
<component id="d8a9" class="javax.swing.JSpinner" binding="settingsCpuCountSpinner">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="21" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
<grid row="22" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
</component>
|
</component>
|
||||||
<component id="fcb58" class="javax.swing.JSpinner" binding="settingsPosXSpinner">
|
<component id="fcb58" class="javax.swing.JSpinner" binding="settingsPosXSpinner">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="36" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
<grid row="37" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
</component>
|
</component>
|
||||||
<component id="7ddc1" class="javax.swing.JSpinner" binding="settingsPosYSpinner">
|
<component id="7ddc1" class="javax.swing.JSpinner" binding="settingsPosYSpinner">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="37" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
<grid row="38" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
</component>
|
</component>
|
||||||
<component id="27334" class="javax.swing.JTextField" binding="settingsInitText">
|
<component id="27334" class="javax.swing.JTextField" binding="settingsInitText">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="31" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
<grid row="32" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||||
<preferred-size width="150" height="-1"/>
|
<preferred-size width="150" height="-1"/>
|
||||||
</grid>
|
</grid>
|
||||||
</constraints>
|
</constraints>
|
||||||
@ -1895,7 +1895,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="94149" class="javax.swing.JComboBox" binding="settingsExThreadsCombo">
|
<component id="94149" class="javax.swing.JComboBox" binding="settingsExThreadsCombo">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="22" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
<grid row="23" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<model>
|
<model>
|
||||||
@ -1907,7 +1907,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="ef3d" class="javax.swing.JCheckBox" binding="settingsSkipIntroBox">
|
<component id="ef3d" class="javax.swing.JCheckBox" binding="settingsSkipIntroBox">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="15" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="16" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value=""/>
|
<text value=""/>
|
||||||
@ -1915,7 +1915,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="2f359" class="javax.swing.JCheckBox" binding="settingsNoSplashBox">
|
<component id="2f359" class="javax.swing.JCheckBox" binding="settingsNoSplashBox">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="14" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="15" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value=""/>
|
<text value=""/>
|
||||||
@ -1923,7 +1923,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="98a41" class="javax.swing.JCheckBox" binding="settingsUseSixtyFourBitBox">
|
<component id="98a41" class="javax.swing.JCheckBox" binding="settingsUseSixtyFourBitBox">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="12" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="13" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value=""/>
|
<text value=""/>
|
||||||
@ -1951,7 +1951,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="40092" class="javax.swing.JTextField" binding="settingsBetaText">
|
<component id="40092" class="javax.swing.JTextField" binding="settingsBetaText">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="32" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
<grid row="33" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||||
<preferred-size width="150" height="-1"/>
|
<preferred-size width="150" height="-1"/>
|
||||||
</grid>
|
</grid>
|
||||||
</constraints>
|
</constraints>
|
||||||
@ -1960,7 +1960,7 @@
|
|||||||
<grid id="fc050" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
<grid id="fc050" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||||
<margin top="25" left="0" bottom="5" right="0"/>
|
<margin top="25" left="0" bottom="5" right="0"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="38" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="39" column="0" row-span="1" col-span="4" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties/>
|
<properties/>
|
||||||
<border type="none"/>
|
<border type="none"/>
|
||||||
@ -1995,7 +1995,7 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="46dd0" class="javax.swing.JLabel">
|
<component id="46dd0" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="18" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="19" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="MB"/>
|
<text value="MB"/>
|
||||||
@ -2003,12 +2003,29 @@
|
|||||||
</component>
|
</component>
|
||||||
<component id="e45c5" class="javax.swing.JLabel">
|
<component id="e45c5" class="javax.swing.JLabel">
|
||||||
<constraints>
|
<constraints>
|
||||||
<grid row="19" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
<grid row="20" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<text value="MB"/>
|
<text value="MB"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
|
<component id="f901c" class="javax.swing.JLabel">
|
||||||
|
<constraints>
|
||||||
|
<grid row="9" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<text resource-bundle="lang" key="use_debug"/>
|
||||||
|
<toolTipText resource-bundle="lang" key="use_debug_tooltip"/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
|
<component id="2a999" class="javax.swing.JCheckBox" binding="settingsDebugBox">
|
||||||
|
<constraints>
|
||||||
|
<grid row="9" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||||
|
</constraints>
|
||||||
|
<properties>
|
||||||
|
<text value=""/>
|
||||||
|
</properties>
|
||||||
|
</component>
|
||||||
</children>
|
</children>
|
||||||
</grid>
|
</grid>
|
||||||
</children>
|
</children>
|
||||||
|
@ -35,6 +35,10 @@ import de.mc8051.arma3launcher.utils.Humanize;
|
|||||||
import de.mc8051.arma3launcher.utils.ImageUtils;
|
import de.mc8051.arma3launcher.utils.ImageUtils;
|
||||||
import de.mc8051.arma3launcher.utils.LangUtils;
|
import de.mc8051.arma3launcher.utils.LangUtils;
|
||||||
import de.mc8051.arma3launcher.utils.TaskBarUtils;
|
import de.mc8051.arma3launcher.utils.TaskBarUtils;
|
||||||
|
import org.apache.logging.log4j.Level;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
import org.apache.logging.log4j.core.config.Configurator;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
@ -71,8 +75,6 @@ import java.util.List;
|
|||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
@ -185,6 +187,9 @@ public class LauncherGUI implements Observer {
|
|||||||
private JPanel presetNotePane;
|
private JPanel presetNotePane;
|
||||||
private JLabel aboutUpdateLabel;
|
private JLabel aboutUpdateLabel;
|
||||||
private JButton updateButton;
|
private JButton updateButton;
|
||||||
|
private JCheckBox settingsDebugBox;
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(LauncherGUI.class);
|
||||||
|
|
||||||
private JCheckBoxTree repoTree;
|
private JCheckBoxTree repoTree;
|
||||||
private FileChecker fileChecker;
|
private FileChecker fileChecker;
|
||||||
@ -193,6 +198,8 @@ public class LauncherGUI implements Observer {
|
|||||||
private Updater updater = new Updater();
|
private Updater updater = new Updater();
|
||||||
|
|
||||||
public LauncherGUI() {
|
public LauncherGUI() {
|
||||||
|
logger.info("Initialize GUI");
|
||||||
|
|
||||||
fileChecker = new FileChecker(syncCheckProgress);
|
fileChecker = new FileChecker(syncCheckProgress);
|
||||||
syncer = new Syncer(this);
|
syncer = new Syncer(this);
|
||||||
|
|
||||||
@ -269,6 +276,9 @@ public class LauncherGUI implements Observer {
|
|||||||
.replace("${name}", ArmA3Launcher.CLIENT_NAME)
|
.replace("${name}", ArmA3Launcher.CLIENT_NAME)
|
||||||
.replace("${version}", ArmA3Launcher.VERSION));
|
.replace("${version}", ArmA3Launcher.VERSION));
|
||||||
|
|
||||||
|
logger.debug("Client title text: {}", title.getText());
|
||||||
|
logger.debug("Client subtitle text: {}", subtitle.getText());
|
||||||
|
|
||||||
initSettings();
|
initSettings();
|
||||||
|
|
||||||
logo.setIcon(new ImageIcon(ImageUtils.getScaledImage(TaskBarUtils.IMAGE_LGO, 128, 128)));
|
logo.setIcon(new ImageIcon(ImageUtils.getScaledImage(TaskBarUtils.IMAGE_LGO, 128, 128)));
|
||||||
@ -385,7 +395,7 @@ public class LauncherGUI implements Observer {
|
|||||||
ArmA3Launcher.user_config.store();
|
ArmA3Launcher.user_config.store();
|
||||||
initSettings();
|
initSettings();
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -618,7 +628,7 @@ public class LauncherGUI implements Observer {
|
|||||||
JFrame frame = (JFrame) SwingUtilities.getWindowAncestor(mainPanel);
|
JFrame frame = (JFrame) SwingUtilities.getWindowAncestor(mainPanel);
|
||||||
frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));
|
frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
SwingUtilities.invokeLater(() -> aboutUpdateLabel.setText("UPDATE FAILED " + ex.getMessage()));
|
SwingUtilities.invokeLater(() -> aboutUpdateLabel.setText("UPDATE FAILED " + ex.getMessage()));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -626,14 +636,17 @@ public class LauncherGUI implements Observer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void infoBox(String infoMessage, String titleBar) {
|
public static void infoBox(String infoMessage, String titleBar) {
|
||||||
|
logger.info("Info message: {} {}", titleBar, infoMessage);
|
||||||
JOptionPane.showMessageDialog(null, infoMessage, "INFO: " + titleBar, JOptionPane.INFORMATION_MESSAGE);
|
JOptionPane.showMessageDialog(null, infoMessage, "INFO: " + titleBar, JOptionPane.INFORMATION_MESSAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void warnBox(String infoMessage, String titleBar) {
|
public static void warnBox(String infoMessage, String titleBar) {
|
||||||
|
logger.info("Warn message: {} {}", titleBar, infoMessage);
|
||||||
JOptionPane.showMessageDialog(null, infoMessage, titleBar, JOptionPane.WARNING_MESSAGE);
|
JOptionPane.showMessageDialog(null, infoMessage, titleBar, JOptionPane.WARNING_MESSAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void errorBox(String errorMessage, String titleBar) {
|
public static void errorBox(String errorMessage, String titleBar) {
|
||||||
|
logger.info("Error message: {} {}", titleBar, errorMessage);
|
||||||
JOptionPane.showMessageDialog(null, errorMessage, "ERROR: " + titleBar, JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(null, errorMessage, "ERROR: " + titleBar, JOptionPane.ERROR_MESSAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -794,6 +807,15 @@ public class LauncherGUI implements Observer {
|
|||||||
settingsShowParameterBox.addItemListener(e -> parameterText.setVisible(e.getStateChange() == ItemEvent.SELECTED));
|
settingsShowParameterBox.addItemListener(e -> parameterText.setVisible(e.getStateChange() == ItemEvent.SELECTED));
|
||||||
initCheckBox(settingsCheckModsBox, Parameters.CHECK_MODSET.toParameter());
|
initCheckBox(settingsCheckModsBox, Parameters.CHECK_MODSET.toParameter());
|
||||||
|
|
||||||
|
initCheckBox(settingsDebugBox, Parameters.DEBUG.toParameter());
|
||||||
|
settingsDebugBox.addItemListener(e -> {
|
||||||
|
if (e.getStateChange() == ItemEvent.SELECTED) {
|
||||||
|
Configurator.setAllLevels(LogManager.getRootLogger().getName(), Level.DEBUG);
|
||||||
|
} else {
|
||||||
|
Configurator.setAllLevels(LogManager.getRootLogger().getName(), Level.INFO);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
initCheckBox(settingsUseWorkshopBox, Parameters.USE_WORKSHOP.toParameter());
|
initCheckBox(settingsUseWorkshopBox, Parameters.USE_WORKSHOP.toParameter());
|
||||||
settingsUseWorkshopBox.addItemListener(e -> {
|
settingsUseWorkshopBox.addItemListener(e -> {
|
||||||
if (e.getStateChange() == ItemEvent.SELECTED) {
|
if (e.getStateChange() == ItemEvent.SELECTED) {
|
||||||
@ -1093,7 +1115,7 @@ public class LauncherGUI implements Observer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(String s) {
|
public void update(String s) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "Observer received: " + s);
|
logger.info("Observer received: {}", s);
|
||||||
if (s.equals(RepositoryManger.Type.METADATA.toString())) {
|
if (s.equals(RepositoryManger.Type.METADATA.toString())) {
|
||||||
switch (RepositoryManger.getInstance().getStatus(RepositoryManger.Type.METADATA)) {
|
switch (RepositoryManger.getInstance().getStatus(RepositoryManger.Type.METADATA)) {
|
||||||
case ERROR:
|
case ERROR:
|
||||||
@ -1126,7 +1148,7 @@ public class LauncherGUI implements Observer {
|
|||||||
if (checkModsetParameter.getValue() != null && (boolean) checkModsetParameter.getValue()) {
|
if (checkModsetParameter.getValue() != null && (boolean) checkModsetParameter.getValue()) {
|
||||||
if (!fileChecker.isChecked()) {
|
if (!fileChecker.isChecked()) {
|
||||||
SwingUtilities.invokeLater(() -> fileCheck(false));
|
SwingUtilities.invokeLater(() -> fileCheck(false));
|
||||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "Started file check on launch");
|
logger.info("Started file check on launch");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1891,7 +1913,7 @@ public class LauncherGUI implements Observer {
|
|||||||
panel34.add(settingScrollPane, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
panel34.add(settingScrollPane, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||||
settingScrollPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null));
|
settingScrollPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null));
|
||||||
final JPanel panel35 = new JPanel();
|
final JPanel panel35 = new JPanel();
|
||||||
panel35.setLayout(new GridLayoutManager(39, 4, new Insets(0, 0, 0, 5), -1, -1));
|
panel35.setLayout(new GridLayoutManager(40, 4, new Insets(0, 0, 0, 5), -1, -1));
|
||||||
panel35.setOpaque(false);
|
panel35.setOpaque(false);
|
||||||
settingScrollPane.setViewportView(panel35);
|
settingScrollPane.setViewportView(panel35);
|
||||||
final JLabel label23 = new JLabel();
|
final JLabel label23 = new JLabel();
|
||||||
@ -1959,7 +1981,7 @@ public class LauncherGUI implements Observer {
|
|||||||
panel37.setLayout(new GridLayoutManager(1, 1, new Insets(2, 5, 3, 0), -1, -1));
|
panel37.setLayout(new GridLayoutManager(1, 1, new Insets(2, 5, 3, 0), -1, -1));
|
||||||
panel37.setBackground(new Color(-14736860));
|
panel37.setBackground(new Color(-14736860));
|
||||||
panel37.setEnabled(false);
|
panel37.setEnabled(false);
|
||||||
panel35.add(panel37, new GridConstraints(10, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
panel35.add(panel37, new GridConstraints(11, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
final JLabel label30 = new JLabel();
|
final JLabel label30 = new JLabel();
|
||||||
Font label30Font = this.$$$getFont$$$(null, Font.BOLD, 16, label30.getFont());
|
Font label30Font = this.$$$getFont$$$(null, Font.BOLD, 16, label30.getFont());
|
||||||
if (label30Font != null) label30.setFont(label30Font);
|
if (label30Font != null) label30.setFont(label30Font);
|
||||||
@ -1967,71 +1989,71 @@ public class LauncherGUI implements Observer {
|
|||||||
panel37.add(label30, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel37.add(label30, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JPanel panel38 = new JPanel();
|
final JPanel panel38 = new JPanel();
|
||||||
panel38.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 25, 0), -1, -1));
|
panel38.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 25, 0), -1, -1));
|
||||||
panel35.add(panel38, new GridConstraints(9, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
panel35.add(panel38, new GridConstraints(10, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
final JLabel label31 = new JLabel();
|
final JLabel label31 = new JLabel();
|
||||||
label31.setText("Profile");
|
label31.setText("Profile");
|
||||||
label31.setToolTipText(ResourceBundle.getBundle("lang").getString("profile_desc"));
|
label31.setToolTipText(ResourceBundle.getBundle("lang").getString("profile_desc"));
|
||||||
panel35.add(label31, new GridConstraints(11, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label31, new GridConstraints(12, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsProfileCombo = new JComboBox();
|
settingsProfileCombo = new JComboBox();
|
||||||
panel35.add(settingsProfileCombo, new GridConstraints(11, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsProfileCombo, new GridConstraints(12, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label32 = new JLabel();
|
final JLabel label32 = new JLabel();
|
||||||
label32.setText("Use64BitClient");
|
label32.setText("Use64BitClient");
|
||||||
label32.setToolTipText(ResourceBundle.getBundle("lang").getString("use64bitclient_desc"));
|
label32.setToolTipText(ResourceBundle.getBundle("lang").getString("use64bitclient_desc"));
|
||||||
panel35.add(label32, new GridConstraints(12, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label32, new GridConstraints(13, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label33 = new JLabel();
|
final JLabel label33 = new JLabel();
|
||||||
label33.setText("NoSplash");
|
label33.setText("NoSplash");
|
||||||
label33.setToolTipText(ResourceBundle.getBundle("lang").getString("nosplash_desc"));
|
label33.setToolTipText(ResourceBundle.getBundle("lang").getString("nosplash_desc"));
|
||||||
panel35.add(label33, new GridConstraints(14, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label33, new GridConstraints(15, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label34 = new JLabel();
|
final JLabel label34 = new JLabel();
|
||||||
label34.setText("SkipIntro");
|
label34.setText("SkipIntro");
|
||||||
label34.setToolTipText(ResourceBundle.getBundle("lang").getString("skipintro_desc"));
|
label34.setToolTipText(ResourceBundle.getBundle("lang").getString("skipintro_desc"));
|
||||||
panel35.add(label34, new GridConstraints(15, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label34, new GridConstraints(16, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label35 = new JLabel();
|
final JLabel label35 = new JLabel();
|
||||||
label35.setText("World");
|
label35.setText("World");
|
||||||
label35.setToolTipText(ResourceBundle.getBundle("lang").getString("world_desc"));
|
label35.setToolTipText(ResourceBundle.getBundle("lang").getString("world_desc"));
|
||||||
panel35.add(label35, new GridConstraints(16, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label35, new GridConstraints(17, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsWorldText = new JTextField();
|
settingsWorldText = new JTextField();
|
||||||
panel35.add(settingsWorldText, new GridConstraints(16, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
panel35.add(settingsWorldText, new GridConstraints(17, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||||
final JLabel label36 = new JLabel();
|
final JLabel label36 = new JLabel();
|
||||||
label36.setText("MaxMem");
|
label36.setText("MaxMem");
|
||||||
label36.setToolTipText(ResourceBundle.getBundle("lang").getString("maxmem_desc"));
|
label36.setToolTipText(ResourceBundle.getBundle("lang").getString("maxmem_desc"));
|
||||||
panel35.add(label36, new GridConstraints(18, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label36, new GridConstraints(19, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label37 = new JLabel();
|
final JLabel label37 = new JLabel();
|
||||||
label37.setText("MaxVRAM");
|
label37.setText("MaxVRAM");
|
||||||
label37.setToolTipText(ResourceBundle.getBundle("lang").getString("maxvram_desc"));
|
label37.setToolTipText(ResourceBundle.getBundle("lang").getString("maxvram_desc"));
|
||||||
panel35.add(label37, new GridConstraints(19, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label37, new GridConstraints(20, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label38 = new JLabel();
|
final JLabel label38 = new JLabel();
|
||||||
label38.setText("NoCB");
|
label38.setText("NoCB");
|
||||||
label38.setToolTipText(ResourceBundle.getBundle("lang").getString("nocb_desc"));
|
label38.setToolTipText(ResourceBundle.getBundle("lang").getString("nocb_desc"));
|
||||||
label38.setVerifyInputWhenFocusTarget(false);
|
label38.setVerifyInputWhenFocusTarget(false);
|
||||||
panel35.add(label38, new GridConstraints(20, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label38, new GridConstraints(21, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label39 = new JLabel();
|
final JLabel label39 = new JLabel();
|
||||||
label39.setText("CpuCount");
|
label39.setText("CpuCount");
|
||||||
label39.setToolTipText(ResourceBundle.getBundle("lang").getString("cpucount_desc"));
|
label39.setToolTipText(ResourceBundle.getBundle("lang").getString("cpucount_desc"));
|
||||||
panel35.add(label39, new GridConstraints(21, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label39, new GridConstraints(22, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label40 = new JLabel();
|
final JLabel label40 = new JLabel();
|
||||||
label40.setText("ExThreads");
|
label40.setText("ExThreads");
|
||||||
label40.setToolTipText(ResourceBundle.getBundle("lang").getString("exthreads_desc"));
|
label40.setToolTipText(ResourceBundle.getBundle("lang").getString("exthreads_desc"));
|
||||||
panel35.add(label40, new GridConstraints(22, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label40, new GridConstraints(23, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label41 = new JLabel();
|
final JLabel label41 = new JLabel();
|
||||||
label41.setText("Malloc");
|
label41.setText("Malloc");
|
||||||
label41.setToolTipText(ResourceBundle.getBundle("lang").getString("malloc_desc"));
|
label41.setToolTipText(ResourceBundle.getBundle("lang").getString("malloc_desc"));
|
||||||
panel35.add(label41, new GridConstraints(23, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label41, new GridConstraints(24, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label42 = new JLabel();
|
final JLabel label42 = new JLabel();
|
||||||
label42.setText("NoLogs");
|
label42.setText("NoLogs");
|
||||||
label42.setToolTipText(ResourceBundle.getBundle("lang").getString("nologs_desc"));
|
label42.setToolTipText(ResourceBundle.getBundle("lang").getString("nologs_desc"));
|
||||||
panel35.add(label42, new GridConstraints(24, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label42, new GridConstraints(25, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label43 = new JLabel();
|
final JLabel label43 = new JLabel();
|
||||||
label43.setText("EnableHT");
|
label43.setText("EnableHT");
|
||||||
label43.setToolTipText(ResourceBundle.getBundle("lang").getString("enableht_desc"));
|
label43.setToolTipText(ResourceBundle.getBundle("lang").getString("enableht_desc"));
|
||||||
panel35.add(label43, new GridConstraints(25, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label43, new GridConstraints(26, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label44 = new JLabel();
|
final JLabel label44 = new JLabel();
|
||||||
label44.setText("Hugepages");
|
label44.setText("Hugepages");
|
||||||
label44.setToolTipText(ResourceBundle.getBundle("lang").getString("hugepages_desc"));
|
label44.setToolTipText(ResourceBundle.getBundle("lang").getString("hugepages_desc"));
|
||||||
panel35.add(label44, new GridConstraints(26, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label44, new GridConstraints(27, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JPanel panel39 = new JPanel();
|
final JPanel panel39 = new JPanel();
|
||||||
panel39.setLayout(new GridLayoutManager(1, 1, new Insets(5, 0, 5, 0), -1, -1));
|
panel39.setLayout(new GridLayoutManager(1, 1, new Insets(5, 0, 5, 0), -1, -1));
|
||||||
panel35.add(panel39, new GridConstraints(17, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
panel35.add(panel39, new GridConstraints(18, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
final JPanel panel40 = new JPanel();
|
final JPanel panel40 = new JPanel();
|
||||||
panel40.setLayout(new GridLayoutManager(1, 1, new Insets(2, 6, 5, 0), -1, -1));
|
panel40.setLayout(new GridLayoutManager(1, 1, new Insets(2, 6, 5, 0), -1, -1));
|
||||||
panel40.setBackground(new Color(-14210516));
|
panel40.setBackground(new Color(-14210516));
|
||||||
@ -2043,7 +2065,7 @@ public class LauncherGUI implements Observer {
|
|||||||
panel40.add(label45, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel40.add(label45, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JPanel panel41 = new JPanel();
|
final JPanel panel41 = new JPanel();
|
||||||
panel41.setLayout(new GridLayoutManager(1, 1, new Insets(5, 0, 5, 0), -1, -1));
|
panel41.setLayout(new GridLayoutManager(1, 1, new Insets(5, 0, 5, 0), -1, -1));
|
||||||
panel35.add(panel41, new GridConstraints(13, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
panel35.add(panel41, new GridConstraints(14, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
final JPanel panel42 = new JPanel();
|
final JPanel panel42 = new JPanel();
|
||||||
panel42.setLayout(new GridLayoutManager(1, 1, new Insets(2, 6, 5, 0), -1, -1));
|
panel42.setLayout(new GridLayoutManager(1, 1, new Insets(2, 6, 5, 0), -1, -1));
|
||||||
panel42.setBackground(new Color(-14210516));
|
panel42.setBackground(new Color(-14210516));
|
||||||
@ -2055,7 +2077,7 @@ public class LauncherGUI implements Observer {
|
|||||||
panel42.add(label46, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel42.add(label46, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JPanel panel43 = new JPanel();
|
final JPanel panel43 = new JPanel();
|
||||||
panel43.setLayout(new GridLayoutManager(1, 1, new Insets(5, 0, 5, 0), -1, -1));
|
panel43.setLayout(new GridLayoutManager(1, 1, new Insets(5, 0, 5, 0), -1, -1));
|
||||||
panel35.add(panel43, new GridConstraints(27, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
panel35.add(panel43, new GridConstraints(28, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
final JPanel panel44 = new JPanel();
|
final JPanel panel44 = new JPanel();
|
||||||
panel44.setLayout(new GridLayoutManager(1, 1, new Insets(2, 6, 5, 0), -1, -1));
|
panel44.setLayout(new GridLayoutManager(1, 1, new Insets(2, 6, 5, 0), -1, -1));
|
||||||
panel44.setBackground(new Color(-14210516));
|
panel44.setBackground(new Color(-14210516));
|
||||||
@ -2068,34 +2090,34 @@ public class LauncherGUI implements Observer {
|
|||||||
final JLabel label48 = new JLabel();
|
final JLabel label48 = new JLabel();
|
||||||
label48.setText("NoPause");
|
label48.setText("NoPause");
|
||||||
label48.setToolTipText(ResourceBundle.getBundle("lang").getString("nopause_desc"));
|
label48.setToolTipText(ResourceBundle.getBundle("lang").getString("nopause_desc"));
|
||||||
panel35.add(label48, new GridConstraints(28, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label48, new GridConstraints(29, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label49 = new JLabel();
|
final JLabel label49 = new JLabel();
|
||||||
label49.setText("ShowScriptErrors");
|
label49.setText("ShowScriptErrors");
|
||||||
label49.setToolTipText(ResourceBundle.getBundle("lang").getString("showscripterrors_desc"));
|
label49.setToolTipText(ResourceBundle.getBundle("lang").getString("showscripterrors_desc"));
|
||||||
panel35.add(label49, new GridConstraints(29, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label49, new GridConstraints(30, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label50 = new JLabel();
|
final JLabel label50 = new JLabel();
|
||||||
label50.setText("FilePatching");
|
label50.setText("FilePatching");
|
||||||
label50.setToolTipText(ResourceBundle.getBundle("lang").getString("filepatching_desc"));
|
label50.setToolTipText(ResourceBundle.getBundle("lang").getString("filepatching_desc"));
|
||||||
panel35.add(label50, new GridConstraints(30, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label50, new GridConstraints(31, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label51 = new JLabel();
|
final JLabel label51 = new JLabel();
|
||||||
label51.setText("Init");
|
label51.setText("Init");
|
||||||
label51.setToolTipText(ResourceBundle.getBundle("lang").getString("init_desc"));
|
label51.setToolTipText(ResourceBundle.getBundle("lang").getString("init_desc"));
|
||||||
panel35.add(label51, new GridConstraints(31, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label51, new GridConstraints(32, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label52 = new JLabel();
|
final JLabel label52 = new JLabel();
|
||||||
label52.setText("Beta");
|
label52.setText("Beta");
|
||||||
label52.setToolTipText(ResourceBundle.getBundle("lang").getString("beta_desc"));
|
label52.setToolTipText(ResourceBundle.getBundle("lang").getString("beta_desc"));
|
||||||
panel35.add(label52, new GridConstraints(32, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label52, new GridConstraints(33, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label53 = new JLabel();
|
final JLabel label53 = new JLabel();
|
||||||
label53.setText("CrashDiag");
|
label53.setText("CrashDiag");
|
||||||
label53.setToolTipText(ResourceBundle.getBundle("lang").getString("crashdiag_desc"));
|
label53.setToolTipText(ResourceBundle.getBundle("lang").getString("crashdiag_desc"));
|
||||||
panel35.add(label53, new GridConstraints(33, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label53, new GridConstraints(34, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label54 = new JLabel();
|
final JLabel label54 = new JLabel();
|
||||||
label54.setText("Window");
|
label54.setText("Window");
|
||||||
label54.setToolTipText(ResourceBundle.getBundle("lang").getString("window_desc"));
|
label54.setToolTipText(ResourceBundle.getBundle("lang").getString("window_desc"));
|
||||||
panel35.add(label54, new GridConstraints(35, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label54, new GridConstraints(36, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JPanel panel45 = new JPanel();
|
final JPanel panel45 = new JPanel();
|
||||||
panel45.setLayout(new GridLayoutManager(1, 1, new Insets(5, 0, 5, 0), -1, -1));
|
panel45.setLayout(new GridLayoutManager(1, 1, new Insets(5, 0, 5, 0), -1, -1));
|
||||||
panel35.add(panel45, new GridConstraints(34, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
panel35.add(panel45, new GridConstraints(35, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
final JPanel panel46 = new JPanel();
|
final JPanel panel46 = new JPanel();
|
||||||
panel46.setLayout(new GridLayoutManager(1, 1, new Insets(2, 6, 5, 0), -1, -1));
|
panel46.setLayout(new GridLayoutManager(1, 1, new Insets(2, 6, 5, 0), -1, -1));
|
||||||
panel46.setBackground(new Color(-14210516));
|
panel46.setBackground(new Color(-14210516));
|
||||||
@ -2108,14 +2130,14 @@ public class LauncherGUI implements Observer {
|
|||||||
final JLabel label56 = new JLabel();
|
final JLabel label56 = new JLabel();
|
||||||
label56.setText("PosX");
|
label56.setText("PosX");
|
||||||
label56.setToolTipText(ResourceBundle.getBundle("lang").getString("posx_desc"));
|
label56.setToolTipText(ResourceBundle.getBundle("lang").getString("posx_desc"));
|
||||||
panel35.add(label56, new GridConstraints(36, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label56, new GridConstraints(37, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label57 = new JLabel();
|
final JLabel label57 = new JLabel();
|
||||||
label57.setText("PosY");
|
label57.setText("PosY");
|
||||||
label57.setToolTipText(ResourceBundle.getBundle("lang").getString("posy_desc"));
|
label57.setToolTipText(ResourceBundle.getBundle("lang").getString("posy_desc"));
|
||||||
panel35.add(label57, new GridConstraints(37, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label57, new GridConstraints(38, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsNoCBBox = new JCheckBox();
|
settingsNoCBBox = new JCheckBox();
|
||||||
settingsNoCBBox.setText("");
|
settingsNoCBBox.setText("");
|
||||||
panel35.add(settingsNoCBBox, new GridConstraints(20, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsNoCBBox, new GridConstraints(21, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsMallocCombo = new JComboBox();
|
settingsMallocCombo = new JComboBox();
|
||||||
final DefaultComboBoxModel defaultComboBoxModel2 = new DefaultComboBoxModel();
|
final DefaultComboBoxModel defaultComboBoxModel2 = new DefaultComboBoxModel();
|
||||||
defaultComboBoxModel2.addElement("");
|
defaultComboBoxModel2.addElement("");
|
||||||
@ -2125,59 +2147,59 @@ public class LauncherGUI implements Observer {
|
|||||||
defaultComboBoxModel2.addElement("jemalloc_bi_x64");
|
defaultComboBoxModel2.addElement("jemalloc_bi_x64");
|
||||||
defaultComboBoxModel2.addElement("system");
|
defaultComboBoxModel2.addElement("system");
|
||||||
settingsMallocCombo.setModel(defaultComboBoxModel2);
|
settingsMallocCombo.setModel(defaultComboBoxModel2);
|
||||||
panel35.add(settingsMallocCombo, new GridConstraints(23, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsMallocCombo, new GridConstraints(24, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsNoLogsBox = new JCheckBox();
|
settingsNoLogsBox = new JCheckBox();
|
||||||
settingsNoLogsBox.setText("");
|
settingsNoLogsBox.setText("");
|
||||||
panel35.add(settingsNoLogsBox, new GridConstraints(24, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsNoLogsBox, new GridConstraints(25, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsEnableHTBox = new JCheckBox();
|
settingsEnableHTBox = new JCheckBox();
|
||||||
settingsEnableHTBox.setText("");
|
settingsEnableHTBox.setText("");
|
||||||
panel35.add(settingsEnableHTBox, new GridConstraints(25, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsEnableHTBox, new GridConstraints(26, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsHugeoagesBox = new JCheckBox();
|
settingsHugeoagesBox = new JCheckBox();
|
||||||
settingsHugeoagesBox.setText("");
|
settingsHugeoagesBox.setText("");
|
||||||
panel35.add(settingsHugeoagesBox, new GridConstraints(26, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsHugeoagesBox, new GridConstraints(27, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsNoPauseBox = new JCheckBox();
|
settingsNoPauseBox = new JCheckBox();
|
||||||
settingsNoPauseBox.setText("");
|
settingsNoPauseBox.setText("");
|
||||||
panel35.add(settingsNoPauseBox, new GridConstraints(28, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsNoPauseBox, new GridConstraints(29, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsShowScriptErrorsBox = new JCheckBox();
|
settingsShowScriptErrorsBox = new JCheckBox();
|
||||||
settingsShowScriptErrorsBox.setText("");
|
settingsShowScriptErrorsBox.setText("");
|
||||||
panel35.add(settingsShowScriptErrorsBox, new GridConstraints(29, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsShowScriptErrorsBox, new GridConstraints(30, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsFilePatchingBox = new JCheckBox();
|
settingsFilePatchingBox = new JCheckBox();
|
||||||
settingsFilePatchingBox.setText("");
|
settingsFilePatchingBox.setText("");
|
||||||
panel35.add(settingsFilePatchingBox, new GridConstraints(30, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsFilePatchingBox, new GridConstraints(31, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsCrashDiagBox = new JCheckBox();
|
settingsCrashDiagBox = new JCheckBox();
|
||||||
settingsCrashDiagBox.setText("");
|
settingsCrashDiagBox.setText("");
|
||||||
panel35.add(settingsCrashDiagBox, new GridConstraints(33, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsCrashDiagBox, new GridConstraints(34, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsWindowBox = new JCheckBox();
|
settingsWindowBox = new JCheckBox();
|
||||||
settingsWindowBox.setText("");
|
settingsWindowBox.setText("");
|
||||||
panel35.add(settingsWindowBox, new GridConstraints(35, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsWindowBox, new GridConstraints(36, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsMaxMemSpinner = new JSpinner();
|
settingsMaxMemSpinner = new JSpinner();
|
||||||
panel35.add(settingsMaxMemSpinner, new GridConstraints(18, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsMaxMemSpinner, new GridConstraints(19, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsMaxVRamSpinner = new JSpinner();
|
settingsMaxVRamSpinner = new JSpinner();
|
||||||
panel35.add(settingsMaxVRamSpinner, new GridConstraints(19, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsMaxVRamSpinner, new GridConstraints(20, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsCpuCountSpinner = new JSpinner();
|
settingsCpuCountSpinner = new JSpinner();
|
||||||
panel35.add(settingsCpuCountSpinner, new GridConstraints(21, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsCpuCountSpinner, new GridConstraints(22, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsPosXSpinner = new JSpinner();
|
settingsPosXSpinner = new JSpinner();
|
||||||
panel35.add(settingsPosXSpinner, new GridConstraints(36, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsPosXSpinner, new GridConstraints(37, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsPosYSpinner = new JSpinner();
|
settingsPosYSpinner = new JSpinner();
|
||||||
panel35.add(settingsPosYSpinner, new GridConstraints(37, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsPosYSpinner, new GridConstraints(38, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsInitText = new JTextField();
|
settingsInitText = new JTextField();
|
||||||
panel35.add(settingsInitText, new GridConstraints(31, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
panel35.add(settingsInitText, new GridConstraints(32, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||||
settingsExThreadsCombo = new JComboBox();
|
settingsExThreadsCombo = new JComboBox();
|
||||||
final DefaultComboBoxModel defaultComboBoxModel3 = new DefaultComboBoxModel();
|
final DefaultComboBoxModel defaultComboBoxModel3 = new DefaultComboBoxModel();
|
||||||
defaultComboBoxModel3.addElement("");
|
defaultComboBoxModel3.addElement("");
|
||||||
defaultComboBoxModel3.addElement("3");
|
defaultComboBoxModel3.addElement("3");
|
||||||
defaultComboBoxModel3.addElement("7");
|
defaultComboBoxModel3.addElement("7");
|
||||||
settingsExThreadsCombo.setModel(defaultComboBoxModel3);
|
settingsExThreadsCombo.setModel(defaultComboBoxModel3);
|
||||||
panel35.add(settingsExThreadsCombo, new GridConstraints(22, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsExThreadsCombo, new GridConstraints(23, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsSkipIntroBox = new JCheckBox();
|
settingsSkipIntroBox = new JCheckBox();
|
||||||
settingsSkipIntroBox.setText("");
|
settingsSkipIntroBox.setText("");
|
||||||
panel35.add(settingsSkipIntroBox, new GridConstraints(15, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsSkipIntroBox, new GridConstraints(16, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsNoSplashBox = new JCheckBox();
|
settingsNoSplashBox = new JCheckBox();
|
||||||
settingsNoSplashBox.setText("");
|
settingsNoSplashBox.setText("");
|
||||||
panel35.add(settingsNoSplashBox, new GridConstraints(14, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsNoSplashBox, new GridConstraints(15, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsUseSixtyFourBitBox = new JCheckBox();
|
settingsUseSixtyFourBitBox = new JCheckBox();
|
||||||
settingsUseSixtyFourBitBox.setText("");
|
settingsUseSixtyFourBitBox.setText("");
|
||||||
panel35.add(settingsUseSixtyFourBitBox, new GridConstraints(12, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsUseSixtyFourBitBox, new GridConstraints(13, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label58 = new JLabel();
|
final JLabel label58 = new JLabel();
|
||||||
this.$$$loadLabelText$$$(label58, ResourceBundle.getBundle("lang").getString("language"));
|
this.$$$loadLabelText$$$(label58, ResourceBundle.getBundle("lang").getString("language"));
|
||||||
panel35.add(label58, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label58, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
@ -2189,10 +2211,10 @@ public class LauncherGUI implements Observer {
|
|||||||
settingsLanguageCombo.setModel(defaultComboBoxModel4);
|
settingsLanguageCombo.setModel(defaultComboBoxModel4);
|
||||||
panel35.add(settingsLanguageCombo, new GridConstraints(7, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsLanguageCombo, new GridConstraints(7, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
settingsBetaText = new JTextField();
|
settingsBetaText = new JTextField();
|
||||||
panel35.add(settingsBetaText, new GridConstraints(32, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
panel35.add(settingsBetaText, new GridConstraints(33, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));
|
||||||
final JPanel panel47 = new JPanel();
|
final JPanel panel47 = new JPanel();
|
||||||
panel47.setLayout(new GridLayoutManager(1, 1, new Insets(25, 0, 5, 0), -1, -1));
|
panel47.setLayout(new GridLayoutManager(1, 1, new Insets(25, 0, 5, 0), -1, -1));
|
||||||
panel35.add(panel47, new GridConstraints(38, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
panel35.add(panel47, new GridConstraints(39, 0, 1, 4, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
settingsResetDefault = new JButton();
|
settingsResetDefault = new JButton();
|
||||||
Font settingsResetDefaultFont = this.$$$getFont$$$(null, Font.BOLD, 14, settingsResetDefault.getFont());
|
Font settingsResetDefaultFont = this.$$$getFont$$$(null, Font.BOLD, 14, settingsResetDefault.getFont());
|
||||||
if (settingsResetDefaultFont != null) settingsResetDefault.setFont(settingsResetDefaultFont);
|
if (settingsResetDefaultFont != null) settingsResetDefault.setFont(settingsResetDefaultFont);
|
||||||
@ -2207,10 +2229,17 @@ public class LauncherGUI implements Observer {
|
|||||||
panel35.add(settingsUseWorkshopBox, new GridConstraints(5, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(settingsUseWorkshopBox, new GridConstraints(5, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label60 = new JLabel();
|
final JLabel label60 = new JLabel();
|
||||||
label60.setText("MB");
|
label60.setText("MB");
|
||||||
panel35.add(label60, new GridConstraints(18, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label60, new GridConstraints(19, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label61 = new JLabel();
|
final JLabel label61 = new JLabel();
|
||||||
label61.setText("MB");
|
label61.setText("MB");
|
||||||
panel35.add(label61, new GridConstraints(19, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel35.add(label61, new GridConstraints(20, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
final JLabel label62 = new JLabel();
|
||||||
|
this.$$$loadLabelText$$$(label62, ResourceBundle.getBundle("lang").getString("use_debug"));
|
||||||
|
label62.setToolTipText(ResourceBundle.getBundle("lang").getString("use_debug_tooltip"));
|
||||||
|
panel35.add(label62, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
settingsDebugBox = new JCheckBox();
|
||||||
|
settingsDebugBox.setText("");
|
||||||
|
panel35.add(settingsDebugBox, new GridConstraints(9, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
aboutTab = new JPanel();
|
aboutTab = new JPanel();
|
||||||
aboutTab.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
aboutTab.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||||
aboutTab.setOpaque(true);
|
aboutTab.setOpaque(true);
|
||||||
@ -2241,16 +2270,16 @@ public class LauncherGUI implements Observer {
|
|||||||
final JPanel panel51 = new JPanel();
|
final JPanel panel51 = new JPanel();
|
||||||
panel51.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
|
panel51.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||||
panel50.add(panel51, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
panel50.add(panel51, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
final JLabel label62 = new JLabel();
|
final JLabel label63 = new JLabel();
|
||||||
this.$$$loadLabelText$$$(label62, ResourceBundle.getBundle("lang").getString("developer_page"));
|
this.$$$loadLabelText$$$(label63, ResourceBundle.getBundle("lang").getString("developer_page"));
|
||||||
panel51.add(label62, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_SOUTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel51.add(label63, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_SOUTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
aboutDeveloperLabel = new JLabel();
|
aboutDeveloperLabel = new JLabel();
|
||||||
aboutDeveloperLabel.setRequestFocusEnabled(true);
|
aboutDeveloperLabel.setRequestFocusEnabled(true);
|
||||||
aboutDeveloperLabel.setText("github.com");
|
aboutDeveloperLabel.setText("github.com");
|
||||||
panel51.add(aboutDeveloperLabel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_SOUTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel51.add(aboutDeveloperLabel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_SOUTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
final JLabel label63 = new JLabel();
|
final JLabel label64 = new JLabel();
|
||||||
this.$$$loadLabelText$$$(label63, ResourceBundle.getBundle("lang").getString("project_page"));
|
this.$$$loadLabelText$$$(label64, ResourceBundle.getBundle("lang").getString("project_page"));
|
||||||
panel51.add(label63, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel51.add(label64, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
aboutProjectLabel = new JLabel();
|
aboutProjectLabel = new JLabel();
|
||||||
aboutProjectLabel.setText("gurkengewuerz.de");
|
aboutProjectLabel.setText("gurkengewuerz.de");
|
||||||
panel51.add(aboutProjectLabel, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
panel51.add(aboutProjectLabel, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
package de.mc8051.arma3launcher;
|
package de.mc8051.arma3launcher;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.ini4j.Ini;
|
import org.ini4j.Ini;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by gurkengewuerz.de on 24.03.2020.
|
* Created by gurkengewuerz.de on 24.03.2020.
|
||||||
*/
|
*/
|
||||||
public class Parameter {
|
public class Parameter {
|
||||||
|
|
||||||
|
private final static Logger logger = LogManager.getLogger(Parameter.class);
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private ParameterType pType;
|
private ParameterType pType;
|
||||||
private Class<?> persistentClass;
|
private Class<?> persistentClass;
|
||||||
@ -66,9 +66,10 @@ public class Parameter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
logger.debug("{}: saved value {}", name, data);
|
||||||
ArmA3Launcher.user_config.store();
|
ArmA3Launcher.user_config.store();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +102,11 @@ public class Parameter {
|
|||||||
|
|
||||||
public Object getValue() {
|
public Object getValue() {
|
||||||
final Object configValue = getConfigValue();
|
final Object configValue = getConfigValue();
|
||||||
if(configValue != null) return configValue;
|
if(configValue != null) {
|
||||||
|
logger.debug("{}: use config value {}", name, configValue);
|
||||||
|
return configValue;
|
||||||
|
}
|
||||||
|
logger.debug("{}: use default value", name);
|
||||||
return getDefault();
|
return getDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ public enum Parameters {
|
|||||||
USE_WORKSHOP("UseWorkshop", Parameter.ParameterType.CLIENT, Boolean.class),
|
USE_WORKSHOP("UseWorkshop", Parameter.ParameterType.CLIENT, Boolean.class),
|
||||||
ARMA_PATH("armaPath", Parameter.ParameterType.CLIENT, String.class),
|
ARMA_PATH("armaPath", Parameter.ParameterType.CLIENT, String.class),
|
||||||
MOD_PATH("modPath", Parameter.ParameterType.CLIENT, String.class),
|
MOD_PATH("modPath", Parameter.ParameterType.CLIENT, String.class),
|
||||||
|
DEBUG("debug", Parameter.ParameterType.CLIENT, Boolean.class),
|
||||||
|
|
||||||
PROFILE("Profile", Parameter.ParameterType.ARMA, String.class, "name"),
|
PROFILE("Profile", Parameter.ParameterType.ARMA, String.class, "name"),
|
||||||
USE_64_BIT_CLIENT("Use64BitClient", Parameter.ParameterType.ARMA, Boolean.class),
|
USE_64_BIT_CLIENT("Use64BitClient", Parameter.ParameterType.ARMA, Boolean.class),
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package de.mc8051.arma3launcher.objects;
|
package de.mc8051.arma3launcher.objects;
|
||||||
|
|
||||||
import de.mc8051.arma3launcher.repo.RepositoryManger;
|
import de.mc8051.arma3launcher.repo.RepositoryManger;
|
||||||
import de.mc8051.arma3launcher.utils.Callback;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by gurkengewuerz.de on 27.03.2020.
|
* Created by gurkengewuerz.de on 27.03.2020.
|
||||||
|
@ -3,24 +3,23 @@ package de.mc8051.arma3launcher.objects;
|
|||||||
import de.mc8051.arma3launcher.ArmA3Launcher;
|
import de.mc8051.arma3launcher.ArmA3Launcher;
|
||||||
import de.mc8051.arma3launcher.utils.FileUtils;
|
import de.mc8051.arma3launcher.utils.FileUtils;
|
||||||
import de.mc8051.arma3launcher.utils.URLUtils;
|
import de.mc8051.arma3launcher.utils.URLUtils;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by gurkengewuerz.de on 25.03.2020.
|
* Created by gurkengewuerz.de on 25.03.2020.
|
||||||
*/
|
*/
|
||||||
public class ModFile implements AbstractMod {
|
public class ModFile implements AbstractMod {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(ModFile.class);
|
||||||
|
|
||||||
private File f;
|
private File f;
|
||||||
private long size;
|
private long size;
|
||||||
private String folder;
|
private String folder;
|
||||||
@ -98,7 +97,7 @@ public class ModFile implements AbstractMod {
|
|||||||
localGeneratedSHA1sum = FileUtils.sha1Hex(f);
|
localGeneratedSHA1sum = FileUtils.sha1Hex(f);
|
||||||
}
|
}
|
||||||
} catch (IOException | NoSuchAlgorithmException e) {
|
} catch (IOException | NoSuchAlgorithmException e) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
return localGeneratedSHA1sum;
|
return localGeneratedSHA1sum;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
package de.mc8051.arma3launcher.objects;
|
package de.mc8051.arma3launcher.objects;
|
||||||
|
|
||||||
import de.mc8051.arma3launcher.ArmA3Launcher;
|
import de.mc8051.arma3launcher.ArmA3Launcher;
|
||||||
import de.mc8051.arma3launcher.Parameter;
|
|
||||||
import de.mc8051.arma3launcher.Parameters;
|
import de.mc8051.arma3launcher.Parameters;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.ini4j.Ini;
|
import org.ini4j.Ini;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
@ -10,11 +11,8 @@ import org.json.JSONObject;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -22,6 +20,8 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
public class Modset implements Comparable {
|
public class Modset implements Comparable {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(Modset.class);
|
||||||
|
|
||||||
public static HashMap<String, Modset> MODSET_LIST = new HashMap<>();
|
public static HashMap<String, Modset> MODSET_LIST = new HashMap<>();
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
@ -74,9 +74,10 @@ public class Modset implements Comparable {
|
|||||||
section.add(name, ja.toString());
|
section.add(name, ja.toString());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
logger.debug("{}: saved modset {}", String.join(";", list));
|
||||||
ArmA3Launcher.user_config.store();
|
ArmA3Launcher.user_config.store();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,9 +92,10 @@ public class Modset implements Comparable {
|
|||||||
section.remove(name);
|
section.remove(name);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
logger.debug("{}: removed modset and saved", name);
|
||||||
ArmA3Launcher.user_config.store();
|
ArmA3Launcher.user_config.store();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,9 @@ import de.mc8051.arma3launcher.interfaces.Observer;
|
|||||||
import de.mc8051.arma3launcher.objects.AbstractMod;
|
import de.mc8051.arma3launcher.objects.AbstractMod;
|
||||||
import de.mc8051.arma3launcher.objects.Mod;
|
import de.mc8051.arma3launcher.objects.Mod;
|
||||||
import de.mc8051.arma3launcher.objects.ModFile;
|
import de.mc8051.arma3launcher.objects.ModFile;
|
||||||
|
import de.mc8051.arma3launcher.utils.FileUtils;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -15,8 +18,6 @@ import java.nio.file.Paths;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -24,6 +25,8 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
public class FileChecker implements Observable {
|
public class FileChecker implements Observable {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(FileChecker.class);
|
||||||
|
|
||||||
private List<Observer> observerList = new ArrayList<>();
|
private List<Observer> observerList = new ArrayList<>();
|
||||||
private JProgressBar pb;
|
private JProgressBar pb;
|
||||||
private boolean stop = false;
|
private boolean stop = false;
|
||||||
@ -48,6 +51,7 @@ public class FileChecker implements Observable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void check(boolean fastscan) {
|
public void check(boolean fastscan) {
|
||||||
|
logger.info("Initiated file check with {} scan", fastscan ? "fast" : "hash");
|
||||||
running = true;
|
running = true;
|
||||||
deleted.clear();
|
deleted.clear();
|
||||||
changed.clear();
|
changed.clear();
|
||||||
@ -67,6 +71,7 @@ public class FileChecker implements Observable {
|
|||||||
stop = false;
|
stop = false;
|
||||||
running = false;
|
running = false;
|
||||||
notifyObservers("fileCheckerStopped");
|
notifyObservers("fileCheckerStopped");
|
||||||
|
logger.info("File checker stopped");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (abstractMod instanceof Mod) {
|
if (abstractMod instanceof Mod) {
|
||||||
@ -85,6 +90,7 @@ public class FileChecker implements Observable {
|
|||||||
stop = false;
|
stop = false;
|
||||||
running = false;
|
running = false;
|
||||||
notifyObservers("fileCheckerStopped");
|
notifyObservers("fileCheckerStopped");
|
||||||
|
logger.info("File checker stopped");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -118,6 +124,8 @@ public class FileChecker implements Observable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void checkFile(String mod, ModFile mf, boolean fastscan) {
|
private void checkFile(String mod, ModFile mf, boolean fastscan) {
|
||||||
|
logger.debug("Check {}", mf.getLocaleFile().getAbsolutePath());
|
||||||
|
|
||||||
ArrayList<ModFile> temp = new ArrayList<>();
|
ArrayList<ModFile> temp = new ArrayList<>();
|
||||||
|
|
||||||
if (!mf.exists()) {
|
if (!mf.exists()) {
|
||||||
@ -126,6 +134,7 @@ public class FileChecker implements Observable {
|
|||||||
added.put(mod, temp);
|
added.put(mod, temp);
|
||||||
addedCount++;
|
addedCount++;
|
||||||
size += mf.getSize();
|
size += mf.getSize();
|
||||||
|
logger.info("File {} not exists", mf.getLocaleFile().getAbsolutePath());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,9 +146,12 @@ public class FileChecker implements Observable {
|
|||||||
changed.put(mod, temp);
|
changed.put(mod, temp);
|
||||||
changedCount++;
|
changedCount++;
|
||||||
size += mf.getSize();
|
size += mf.getSize();
|
||||||
|
logger.debug("File {} changed", mf.getLocaleFile().getAbsolutePath());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.debug("File {} is okay", mf.getLocaleFile().getAbsolutePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkDeleted() {
|
private void checkDeleted() {
|
||||||
@ -180,10 +192,11 @@ public class FileChecker implements Observable {
|
|||||||
|
|
||||||
if (deleteable == null) {
|
if (deleteable == null) {
|
||||||
deleted.add(localPath);
|
deleted.add(localPath);
|
||||||
|
logger.info("Deleted {}", localPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@ import de.mc8051.arma3launcher.objects.ModFile;
|
|||||||
import de.mc8051.arma3launcher.objects.Modset;
|
import de.mc8051.arma3launcher.objects.Modset;
|
||||||
import de.mc8051.arma3launcher.objects.Server;
|
import de.mc8051.arma3launcher.objects.Server;
|
||||||
import de.mc8051.arma3launcher.utils.Callback;
|
import de.mc8051.arma3launcher.utils.Callback;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.ini4j.Ini;
|
import org.ini4j.Ini;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
@ -26,9 +28,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import static java.time.temporal.ChronoUnit.SECONDS;
|
import static java.time.temporal.ChronoUnit.SECONDS;
|
||||||
|
|
||||||
@ -37,6 +36,8 @@ import static java.time.temporal.ChronoUnit.SECONDS;
|
|||||||
*/
|
*/
|
||||||
public class RepositoryManger implements Observable {
|
public class RepositoryManger implements Observable {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(RepositoryManger.class);
|
||||||
|
|
||||||
private static RepositoryManger instance;
|
private static RepositoryManger instance;
|
||||||
|
|
||||||
public static ArrayList<AbstractMod> MOD_LIST = new ArrayList<>();
|
public static ArrayList<AbstractMod> MOD_LIST = new ArrayList<>();
|
||||||
@ -52,6 +53,7 @@ public class RepositoryManger implements Observable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void getAsync(String urlS, Callback.HttpCallback callback) {
|
public void getAsync(String urlS, Callback.HttpCallback callback) {
|
||||||
|
logger.info("async http request {}", urlS);
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
URI url = new URI(urlS);
|
URI url = new URI(urlS);
|
||||||
@ -70,13 +72,13 @@ public class RepositoryManger implements Observable {
|
|||||||
Response r = new Response(response);
|
Response r = new Response(response);
|
||||||
|
|
||||||
if (!r.isSuccessful()) {
|
if (!r.isSuccessful()) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, "Cant open " + r.request().uri() + " code " + r.getStatusCode());
|
logger.error("Cant open {} code {}", r.request().uri(), r.getStatusCode());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
callback.response(r);
|
callback.response(r);
|
||||||
} catch (IOException | URISyntaxException | InterruptedException e) {
|
} catch (IOException | URISyntaxException | InterruptedException e) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
callback.response(null);
|
callback.response(null);
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
@ -132,7 +134,7 @@ public class RepositoryManger implements Observable {
|
|||||||
statusMap.replace(Type.METADATA, DownloadStatus.FINNISHED);
|
statusMap.replace(Type.METADATA, DownloadStatus.FINNISHED);
|
||||||
RepositoryManger.getInstance().notifyObservers(Type.METADATA.toString());
|
RepositoryManger.getInstance().notifyObservers(Type.METADATA.toString());
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -198,7 +200,7 @@ public class RepositoryManger implements Observable {
|
|||||||
statusMap.replace(Type.MODSET, DownloadStatus.FINNISHED);
|
statusMap.replace(Type.MODSET, DownloadStatus.FINNISHED);
|
||||||
RepositoryManger.getInstance().notifyObservers(Type.MODSET.toString());
|
RepositoryManger.getInstance().notifyObservers(Type.MODSET.toString());
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -3,6 +3,8 @@ package de.mc8051.arma3launcher.repo;
|
|||||||
import de.mc8051.arma3launcher.ArmA3Launcher;
|
import de.mc8051.arma3launcher.ArmA3Launcher;
|
||||||
import de.mc8051.arma3launcher.utils.Callback;
|
import de.mc8051.arma3launcher.utils.Callback;
|
||||||
import de.mc8051.arma3launcher.utils.URLUtils;
|
import de.mc8051.arma3launcher.utils.URLUtils;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -14,14 +16,14 @@ import java.net.http.HttpResponse;
|
|||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by gurkengewuerz.de on 29.03.2020.
|
* Created by gurkengewuerz.de on 29.03.2020.
|
||||||
*/
|
*/
|
||||||
public class Updater {
|
public class Updater {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(Updater.class);
|
||||||
|
|
||||||
private File patcherFile = new File(ArmA3Launcher.APPLICATION_PATH + File.separator + "patcher.jar");
|
private File patcherFile = new File(ArmA3Launcher.APPLICATION_PATH + File.separator + "patcher.jar");
|
||||||
private File me;
|
private File me;
|
||||||
private long lastCheck = 0;
|
private long lastCheck = 0;
|
||||||
@ -37,17 +39,17 @@ public class Updater {
|
|||||||
public void update() throws IOException {
|
public void update() throws IOException {
|
||||||
if (!me.exists() || !me.isFile()) throw new IOException("Own jar not exists. Are you running in dev?");
|
if (!me.exists() || !me.isFile()) throw new IOException("Own jar not exists. Are you running in dev?");
|
||||||
if (!patcherFile.exists()) throw new IOException("Patcher does not exists");
|
if (!patcherFile.exists()) throw new IOException("Patcher does not exists");
|
||||||
Runtime.getRuntime().exec(
|
final String command = "\"" + System.getProperty("java.home") + File.separator + "bin" + File.separator + "java\"" +
|
||||||
"\"" + System.getProperty("java.home") + File.separator + "bin" + File.separator + "java\"" +
|
" -jar \"" + patcherFile.getAbsolutePath() + "\"" +
|
||||||
" -jar \"" + patcherFile.getAbsolutePath() + "\"" +
|
" \"" + ArmA3Launcher.config.getString("sync.url") + "/.sync/" + URLUtils.encodeToURL(newFile) + "\"" +
|
||||||
" \"" + ArmA3Launcher.config.getString("sync.url") + "/.sync/" + URLUtils.encodeToURL(newFile) + "\"" +
|
" \"" + me.getAbsolutePath() + "\"";
|
||||||
" \"" + me.getAbsolutePath() + "\""
|
logger.info("Run patcher: {}", command);
|
||||||
);
|
Runtime.getRuntime().exec(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void downloadPatcher() {
|
public void downloadPatcher() {
|
||||||
if(patcherFile.exists()) {
|
if(patcherFile.exists()) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "Patcher already exists. Skip.");
|
logger.info("Patcher already exists. Skip copy.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@ -63,13 +65,13 @@ public class Updater {
|
|||||||
if (r.statusCode() != 200) return;
|
if (r.statusCode() != 200) return;
|
||||||
try {
|
try {
|
||||||
Files.copy(tempFile, patcherFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
Files.copy(tempFile, patcherFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "Patcher copied to " + patcherFile.getAbsolutePath());
|
logger.info("Patcher copied to " + patcherFile.getAbsolutePath());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, "Copy patcher failed", e);
|
logger.error("Copy patcher failed", e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (IOException | URISyntaxException e) {
|
} catch (IOException | URISyntaxException e) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,6 +88,8 @@ public class Updater {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.info("Check for newest version");
|
||||||
|
|
||||||
getNewestVersion(new Callback.HttpCallback() {
|
getNewestVersion(new Callback.HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void response(Response r) {
|
public void response(Response r) {
|
||||||
@ -98,6 +102,8 @@ public class Updater {
|
|||||||
if(needUpdate) downloadPatcher();
|
if(needUpdate) downloadPatcher();
|
||||||
lastCheck = System.currentTimeMillis();
|
lastCheck = System.currentTimeMillis();
|
||||||
|
|
||||||
|
logger.info(needUpdate ? "Need to update to {}" : "already on newest version {}", newestVersion.get());
|
||||||
|
|
||||||
callback.response(needUpdate, newestVersion);
|
callback.response(needUpdate, newestVersion);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -8,7 +8,7 @@ public class Version implements Comparable<Version> {
|
|||||||
return this.version;
|
return this.version;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Version(String version) {
|
public Version(String version) throws IllegalArgumentException {
|
||||||
if (version == null)
|
if (version == null)
|
||||||
throw new IllegalArgumentException("Version can not be null");
|
throw new IllegalArgumentException("Version can not be null");
|
||||||
if (!version.matches("[0-9]+(\\.[0-9]+)*"))
|
if (!version.matches("[0-9]+(\\.[0-9]+)*"))
|
||||||
|
@ -13,6 +13,8 @@ import de.mc8051.arma3launcher.objects.AbstractMod;
|
|||||||
import de.mc8051.arma3launcher.objects.ModFile;
|
import de.mc8051.arma3launcher.objects.ModFile;
|
||||||
import de.mc8051.arma3launcher.utils.Humanize;
|
import de.mc8051.arma3launcher.utils.Humanize;
|
||||||
import de.mc8051.arma3launcher.utils.TaskBarUtils;
|
import de.mc8051.arma3launcher.utils.TaskBarUtils;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -27,15 +29,14 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.NoSuchElementException;
|
import java.util.NoSuchElementException;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by gurkengewuerz.de on 25.03.2020.
|
* Created by gurkengewuerz.de on 25.03.2020.
|
||||||
*/
|
*/
|
||||||
public class Syncer implements Observable, SyncListener {
|
public class Syncer implements Observable, SyncListener {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(Syncer.class);
|
||||||
|
|
||||||
private List<Observer> observerList = new ArrayList<>();
|
private List<Observer> observerList = new ArrayList<>();
|
||||||
|
|
||||||
private boolean stopped = false;
|
private boolean stopped = false;
|
||||||
@ -120,7 +121,7 @@ public class Syncer implements Observable, SyncListener {
|
|||||||
try {
|
try {
|
||||||
Thread.sleep(500);
|
Thread.sleep(500);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
} else if (lastPause) {
|
} else if (lastPause) {
|
||||||
@ -132,7 +133,7 @@ public class Syncer implements Observable, SyncListener {
|
|||||||
try {
|
try {
|
||||||
Thread.sleep(100);
|
Thread.sleep(100);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,6 +145,8 @@ public class Syncer implements Observable, SyncListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mf != null) {
|
if (mf != null) {
|
||||||
|
logger.info("ZSync - Sync file {}", mf.getLocaleFile().getAbsolutePath());
|
||||||
|
|
||||||
final Path mfPath = mf.getLocaleFile().toPath();
|
final Path mfPath = mf.getLocaleFile().toPath();
|
||||||
final String mfModPath = mf.getModPath();
|
final String mfModPath = mf.getModPath();
|
||||||
if(!workshopFiles.isEmpty()) {
|
if(!workshopFiles.isEmpty()) {
|
||||||
@ -152,8 +155,10 @@ public class Syncer implements Observable, SyncListener {
|
|||||||
Map.Entry<Path, Long> workshopFile = workshopFiles.entrySet()
|
Map.Entry<Path, Long> workshopFile = workshopFiles.entrySet()
|
||||||
.stream().filter(e -> e.getKey().toAbsolutePath().toString().toLowerCase().endsWith(modfilePatj)).findFirst().get();
|
.stream().filter(e -> e.getKey().toAbsolutePath().toString().toLowerCase().endsWith(modfilePatj)).findFirst().get();
|
||||||
if(workshopFile.getValue() == mf.getSize()) {
|
if(workshopFile.getValue() == mf.getSize()) {
|
||||||
|
logger.info("ZSync - Found file in {}. Copy.", workshopFile.getKey());
|
||||||
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(mfModPath + ": Found in Steam-Workshop. Copy."));
|
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(mfModPath + ": Found in Steam-Workshop. Copy."));
|
||||||
Files.copy(workshopFile.getKey(), mfPath, StandardCopyOption.REPLACE_EXISTING);
|
Files.copy(workshopFile.getKey(), mfPath, StandardCopyOption.REPLACE_EXISTING);
|
||||||
|
logger.info("ZSync - Copied");
|
||||||
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(mfModPath + ": Copied"));
|
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(mfModPath + ": Copied"));
|
||||||
success++;
|
success++;
|
||||||
finnishCurrent();
|
finnishCurrent();
|
||||||
@ -161,12 +166,6 @@ public class Syncer implements Observable, SyncListener {
|
|||||||
}
|
}
|
||||||
} catch (NoSuchElementException | IOException ignored) {}
|
} catch (NoSuchElementException | IOException ignored) {}
|
||||||
}
|
}
|
||||||
if(workshopFiles.containsKey(mfPath)) {
|
|
||||||
final Long workshopFileSize = workshopFiles.get(mfPath);
|
|
||||||
if(mf.getSize() == workshopFileSize) {
|
|
||||||
Logger.getLogger(getClass().getName()).log(Level.INFO, mfPath + "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Zsync.Options o = new Zsync.Options();
|
Zsync.Options o = new Zsync.Options();
|
||||||
o.setOutputFile(Paths.get(mf.getLocaleFile().getAbsolutePath()));
|
o.setOutputFile(Paths.get(mf.getLocaleFile().getAbsolutePath()));
|
||||||
@ -179,7 +178,7 @@ public class Syncer implements Observable, SyncListener {
|
|||||||
syncObserver = new SyncObserver(this);
|
syncObserver = new SyncObserver(this);
|
||||||
zsync.zsync(URI.create(mf.getRemoteFile() + ".zsync"), o, syncObserver);
|
zsync.zsync(URI.create(mf.getRemoteFile() + ".zsync"), o, syncObserver);
|
||||||
} catch (ZsyncException | IllegalArgumentException e) {
|
} catch (ZsyncException | IllegalArgumentException e) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
modlist.remove(0);
|
modlist.remove(0);
|
||||||
@ -206,7 +205,9 @@ public class Syncer implements Observable, SyncListener {
|
|||||||
.filter((p) -> p.toFile().exists())
|
.filter((p) -> p.toFile().exists())
|
||||||
.filter((p) -> p.toFile().canRead())
|
.filter((p) -> p.toFile().canRead())
|
||||||
.filter((p) -> p.toFile().canWrite())
|
.filter((p) -> p.toFile().canWrite())
|
||||||
.forEach((p) -> p.toFile().delete());
|
.forEach((p) -> {
|
||||||
|
logger.info(p.toFile().delete() ? "ZSync - Deleted file {}" : "ZSync - Error deleting file", p);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cleanUpEmptyFolders() {
|
public void cleanUpEmptyFolders() {
|
||||||
@ -220,22 +221,24 @@ public class Syncer implements Observable, SyncListener {
|
|||||||
.filter((p) -> p.toFile().canRead())
|
.filter((p) -> p.toFile().canRead())
|
||||||
.filter((p) -> p.toFile().canWrite())
|
.filter((p) -> p.toFile().canWrite())
|
||||||
.filter((p) -> p.toFile().list().length == 0)
|
.filter((p) -> p.toFile().list().length == 0)
|
||||||
.forEach((p) -> p.toFile().delete());
|
.forEach((p) -> {
|
||||||
|
logger.info(p.toFile().delete() ? "ZSync - Deleted empty folder {}" : "ZSync - Error deleting empty folder", p);
|
||||||
|
});;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void zsyncStarted(Zsync.Options options) {
|
public void zsyncStarted(Zsync.Options options) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "ZSync started " + options.getOutputFile());
|
logger.info("ZSync - started " + options.getOutputFile());
|
||||||
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(currentDownload.getModPath() + ": Sync started"));
|
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(currentDownload.getModPath() + ": Sync started"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void zsyncFailed(Exception exception) {
|
public void zsyncFailed(Exception exception) {
|
||||||
currentDownload_failed = true;
|
currentDownload_failed = true;
|
||||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "Zsync failed " + exception.getMessage());
|
logger.error("ZSync - failed", exception);
|
||||||
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(currentDownload.getModPath() + ": Sync failed"));
|
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(currentDownload.getModPath() + ": Sync failed"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,14 +248,14 @@ public class Syncer implements Observable, SyncListener {
|
|||||||
speedCalcTime+=System.currentTimeMillis()-downloadStarted;
|
speedCalcTime+=System.currentTimeMillis()-downloadStarted;
|
||||||
|
|
||||||
if (speedCalcSize > 20 * 1024 * 1024) {
|
if (speedCalcSize > 20 * 1024 * 1024) {
|
||||||
|
|
||||||
final double speedByte = ((double)speedCalcSize)/((double)speedCalcTime /1000);
|
final double speedByte = ((double)speedCalcSize)/((double)speedCalcTime /1000);
|
||||||
|
logger.info("ZSync - download speed: {} bytes/s", speedByte);
|
||||||
SwingUtilities.invokeLater(() -> gui.syncDownloadSpeedLabel.setText(Humanize.binaryPrefix(Double.valueOf(speedByte).longValue()) + "/s"));
|
SwingUtilities.invokeLater(() -> gui.syncDownloadSpeedLabel.setText(Humanize.binaryPrefix(Double.valueOf(speedByte).longValue()) + "/s"));
|
||||||
speedCalcSize = 0L;
|
speedCalcSize = 0L;
|
||||||
speedCalcTime = 0L;
|
speedCalcTime = 0L;
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "Zsync complete");
|
logger.info("ZSync - complete");
|
||||||
|
|
||||||
if (currentDownload_failed)
|
if (currentDownload_failed)
|
||||||
failed++;
|
failed++;
|
||||||
@ -284,44 +287,46 @@ public class Syncer implements Observable, SyncListener {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void controlFileDownloadingStarted(Path path, long length) {
|
public void controlFileDownloadingStarted(Path path, long length) {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "controlFileDownloadingStarted " + length);
|
logger.debug("ZSync - control file downloading started: length {} bytes", length);
|
||||||
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(currentDownload.getModPath() + ": Get Header"));
|
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(currentDownload.getModPath() + ": Get Header"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void controlFileReadingComplete() {
|
public void controlFileReadingComplete() {
|
||||||
|
logger.debug("ZSync - control file downloading complete");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void outputFileWritingStarted(long length) {
|
public void outputFileWritingStarted(long length) {
|
||||||
|
logger.debug("ZSync - output file writing started: {} bytes", length);
|
||||||
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(currentDownload.getModPath() + ": Writing File"));
|
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(currentDownload.getModPath() + ": Writing File"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void outputFileWritingCompleted() {
|
public void outputFileWritingCompleted() {
|
||||||
|
logger.debug("ZSync - output file writing completed");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void inputFileReadingStarted(Path inputFile, long length) {
|
public void inputFileReadingStarted(Path inputFile, long length) {
|
||||||
|
logger.info("ZSync - input file reading started: {} bytes", length);
|
||||||
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(currentDownload.getModPath() + ": Reading File"));
|
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(currentDownload.getModPath() + ": Reading File"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void inputFileReadingComplete() {
|
public void inputFileReadingComplete() {
|
||||||
|
logger.debug("ZSync - input file reading complete");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void controlFileDownloadingComplete() {
|
public void controlFileDownloadingComplete() {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "controlFileDownloadingComplete");
|
logger.debug("ZSync - control file downloading complete");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void remoteFileDownloadingInitiated(List<ContentRange> ranges) {
|
public void remoteFileDownloadingInitiated(List<ContentRange> ranges) {
|
||||||
downloadStarted = System.currentTimeMillis();
|
downloadStarted = System.currentTimeMillis();
|
||||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "remoteFileDownloadingInitiated");
|
logger.debug("ZSync - remote file downloading initiated");
|
||||||
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(currentDownload.getModPath() + ": Downloading"));
|
SwingUtilities.invokeLater(() -> gui.syncStatusLabel.setText(currentDownload.getModPath() + ": Downloading"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -330,12 +335,12 @@ public class Syncer implements Observable, SyncListener {
|
|||||||
downloadDownloaded = 0;
|
downloadDownloaded = 0;
|
||||||
downloadSize = length;
|
downloadSize = length;
|
||||||
|
|
||||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "remoteFileDownloadingStarted " + length);
|
logger.info("ZSync - remote file downloading started: {} bytes", length);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void remoteFileDownloadingComplete() {
|
public void remoteFileDownloadingComplete() {
|
||||||
Logger.getLogger(getClass().getName()).log(Level.INFO, "remoteFileDownloadingStarted");
|
logger.info("ZSync - remote file downloading complete");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package de.mc8051.arma3launcher.repo.sync;
|
package de.mc8051.arma3launcher.repo.sync;
|
||||||
|
|
||||||
import de.mc8051.arma3launcher.Parameters;
|
import de.mc8051.arma3launcher.Parameters;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
@ -15,6 +17,8 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
public class WorkshopUtil {
|
public class WorkshopUtil {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(WorkshopUtil.class);
|
||||||
|
|
||||||
public static Map<Path, Long> workshopFiles() {
|
public static Map<Path, Long> workshopFiles() {
|
||||||
Map<Path, Long> fileMap = new HashMap<>();
|
Map<Path, Long> fileMap = new HashMap<>();
|
||||||
|
|
||||||
@ -22,8 +26,12 @@ public class WorkshopUtil {
|
|||||||
if(armaPath == null) return fileMap;
|
if(armaPath == null) return fileMap;
|
||||||
|
|
||||||
final Path workshopPath = Paths.get(armaPath, "!Workshop");
|
final Path workshopPath = Paths.get(armaPath, "!Workshop");
|
||||||
|
logger.debug("Get workshop files in {}", workshopPath);
|
||||||
|
|
||||||
if(!workshopPath.toFile().exists()) return fileMap;
|
if(!workshopPath.toFile().exists()) {
|
||||||
|
logger.debug("Workshop folder does not exists");
|
||||||
|
return fileMap;
|
||||||
|
}
|
||||||
if(!workshopPath.toFile().isDirectory()) return fileMap;
|
if(!workshopPath.toFile().isDirectory()) return fileMap;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -32,6 +40,7 @@ public class WorkshopUtil {
|
|||||||
(filePath, fileAttr) -> fileAttr.isRegularFile())
|
(filePath, fileAttr) -> fileAttr.isRegularFile())
|
||||||
.filter((p) -> p.toFile().getName().endsWith(".pbo"))
|
.filter((p) -> p.toFile().getName().endsWith(".pbo"))
|
||||||
.collect(Collectors.toMap(path -> path, path -> path.toFile().length()));
|
.collect(Collectors.toMap(path -> path, path -> path.toFile().length()));
|
||||||
|
logger.info("Found {} Workshop files", fileMap.size());
|
||||||
return fileMap;
|
return fileMap;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
return fileMap;
|
return fileMap;
|
||||||
|
@ -3,18 +3,20 @@ package de.mc8051.arma3launcher.steam;
|
|||||||
import de.mc8051.arma3launcher.WinRegistry;
|
import de.mc8051.arma3launcher.WinRegistry;
|
||||||
import de.mc8051.arma3launcher.interfaces.Observer;
|
import de.mc8051.arma3launcher.interfaces.Observer;
|
||||||
import de.mc8051.arma3launcher.utils.SteamUtils;
|
import de.mc8051.arma3launcher.utils.SteamUtils;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by gurkengewuerz.de on 23.03.2020.
|
* Created by gurkengewuerz.de on 23.03.2020.
|
||||||
*/
|
*/
|
||||||
public class SteamTimer extends TimerTask {
|
public class SteamTimer extends TimerTask {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(SteamTimer.class);
|
||||||
|
|
||||||
private static ArrayList<Observer> observers = new ArrayList<>();
|
private static ArrayList<Observer> observers = new ArrayList<>();
|
||||||
private static boolean old_steamrunning = false;
|
private static boolean old_steamrunning = false;
|
||||||
public static boolean steam_running = false;
|
public static boolean steam_running = false;
|
||||||
@ -37,27 +39,32 @@ public class SteamTimer extends TimerTask {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.debug("steam.exe found");
|
||||||
|
|
||||||
String activeSteamUser = WinRegistry.getValue("HKEY_CURRENT_USER\\Software\\Valve\\Steam\\ActiveProcess", "ActiveUser");
|
String activeSteamUser = WinRegistry.getValue("HKEY_CURRENT_USER\\Software\\Valve\\Steam\\ActiveProcess", "ActiveUser");
|
||||||
if (activeSteamUser.equals("0x0")) {
|
if (activeSteamUser.equals("0x0")) {
|
||||||
steam_running = false;
|
steam_running = false;
|
||||||
notifyObservers("steamtimer");
|
notifyObservers("steamtimer");
|
||||||
|
logger.debug("Steam ActiveUser 0x0");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
steam_running = true;
|
steam_running = true;
|
||||||
|
logger.debug("Steam ActiveUser {}", activeSteamUser);
|
||||||
|
|
||||||
arma_running = SteamUtils.findProcess("arma3.exe")
|
arma_running = SteamUtils.findProcess("arma3.exe")
|
||||||
|| SteamUtils.findProcess("arma3_x64.exe")
|
|| SteamUtils.findProcess("arma3_x64.exe")
|
||||||
|| SteamUtils.findProcess("arma3battleye.exe")
|
|| SteamUtils.findProcess("arma3battleye.exe")
|
||||||
|| SteamUtils.findProcess("arma3launcher.exe");
|
|| SteamUtils.findProcess("arma3launcher.exe");
|
||||||
|
|
||||||
|
logger.debug(arma_running ? "ArmA process found" : "ArmA process not found");
|
||||||
|
|
||||||
notifyObservers("steamtimer");
|
notifyObservers("steamtimer");
|
||||||
} catch (IOException | InterruptedException e) {
|
} catch (IOException | InterruptedException e) {
|
||||||
steam_running = false;
|
steam_running = false;
|
||||||
arma_running = false;
|
arma_running = false;
|
||||||
notifyObservers("steamtimer");
|
notifyObservers("steamtimer");
|
||||||
Logger.getLogger(getClass().getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,6 +74,8 @@ public class SteamTimer extends TimerTask {
|
|||||||
|
|
||||||
public void notifyObservers(String obj) {
|
public void notifyObservers(String obj) {
|
||||||
if (old_arma_running != arma_running || old_steamrunning != steam_running || !firstRun) {
|
if (old_arma_running != arma_running || old_steamrunning != steam_running || !firstRun) {
|
||||||
|
logger.info("Steam timer values changed - Steam from {} to {} - ArmA from {} to {}",
|
||||||
|
old_steamrunning, steam_running, old_arma_running, arma_running);
|
||||||
for (Observer o : observers) o.update(obj);
|
for (Observer o : observers) o.update(obj);
|
||||||
firstRun = true;
|
firstRun = true;
|
||||||
}
|
}
|
||||||
|
@ -4,17 +4,17 @@ import de.mc8051.arma3launcher.Parameter;
|
|||||||
import de.mc8051.arma3launcher.Parameters;
|
import de.mc8051.arma3launcher.Parameters;
|
||||||
import de.mc8051.arma3launcher.WinRegistry;
|
import de.mc8051.arma3launcher.WinRegistry;
|
||||||
import de.mc8051.arma3launcher.objects.Modset;
|
import de.mc8051.arma3launcher.objects.Modset;
|
||||||
|
import de.mc8051.arma3launcher.steam.SteamTimer;
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -22,41 +22,59 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
public class ArmaUtils {
|
public class ArmaUtils {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(ArmaUtils.class);
|
||||||
|
|
||||||
public static Path getInstallationPath() {
|
public static Path getInstallationPath() {
|
||||||
|
logger.debug("Find ArmA 3 installation path");
|
||||||
String regKey = null;
|
String regKey = null;
|
||||||
try {
|
try {
|
||||||
regKey = WinRegistry.getValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\bohemia interactive\\arma 3", "main");
|
regKey = WinRegistry.getValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\bohemia interactive\\arma 3", "main");
|
||||||
|
logger.debug("Found installation path in 32-bit registry");
|
||||||
} catch (IOException | InterruptedException ignored) {
|
} catch (IOException | InterruptedException ignored) {
|
||||||
try {
|
try {
|
||||||
regKey = WinRegistry.getValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\bohemia interactive\\arma 3", "main");
|
regKey = WinRegistry.getValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\bohemia interactive\\arma 3", "main");
|
||||||
|
logger.debug("Found installation path in 64-bit registry");
|
||||||
} catch (IOException | InterruptedException e) {
|
} catch (IOException | InterruptedException e) {
|
||||||
Logger.getLogger(ArmaUtils.class.getName()).log(Level.INFO, "Arma patch cant be detected automatically");
|
logger.error("Arma patch cant be detected automatically", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (regKey == null) return null;
|
if (regKey == null) return null;
|
||||||
final Path main = Paths.get(regKey);
|
final Path main = Paths.get(regKey);
|
||||||
if (!checkArmaPath(main)) return null;
|
if (!checkArmaPath(main)) return null;
|
||||||
|
logger.info("ArmA 3 installation path found in {}", main);
|
||||||
return main;
|
return main;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean checkArmaPath(Path path) {
|
public static boolean checkArmaPath(Path path) {
|
||||||
|
logger.debug("Checking if valid ArmA path {}", path);
|
||||||
ArrayList<String> search = new ArrayList<>(Arrays.asList("arma3.exe", "steam.dll"));
|
ArrayList<String> search = new ArrayList<>(Arrays.asList("arma3.exe", "steam.dll"));
|
||||||
final File f = path.toFile();
|
final File f = path.toFile();
|
||||||
if (!f.exists() || !f.isDirectory()) return false;
|
if (!f.exists() || !f.isDirectory()) {
|
||||||
if (f.listFiles() == null) return false;
|
logger.debug("ArmA path does not exists or is not a directory");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (f.listFiles() == null) {
|
||||||
|
logger.debug("ArmA path does not contain files");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
File[] listOfFiles = f.listFiles();
|
File[] listOfFiles = f.listFiles();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for (File file : listOfFiles) {
|
for (File file : listOfFiles) {
|
||||||
if (search.isEmpty()) return true;
|
if (search.isEmpty()) {
|
||||||
|
logger.info("Found valid ArmA path {}", path);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (file.isFile()) {
|
if (file.isFile()) {
|
||||||
search.remove(file.getName().toLowerCase());
|
search.remove(file.getName().toLowerCase());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (NullPointerException ex) {
|
} catch (NullPointerException ignored) {
|
||||||
|
logger.debug("ArmA path is invalid");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
logger.debug("ArmA is invalid. Not all files found. missing: {}", search);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,19 +114,21 @@ public class ArmaUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void start(Modset modset, String... additionalParams) {
|
public static void start(Modset modset, String... additionalParams) {
|
||||||
|
logger.info("Start ArmA with modset {}", modset.getName());
|
||||||
final Parameter armaPathParameter = Parameters.ARMA_PATH.toParameter();
|
final Parameter armaPathParameter = Parameters.ARMA_PATH.toParameter();
|
||||||
File arma3battleye = new File((String) armaPathParameter.getValue(), "arma3battleye.exe");
|
File arma3battleye = new File((String) armaPathParameter.getValue(), "arma3battleye.exe");
|
||||||
|
logger.debug("ArmA 3 BattleEye executable {}", arma3battleye.getAbsolutePath());
|
||||||
final Parameter use64Bit = Parameters.USE_64_BIT_CLIENT.toParameter();
|
final Parameter use64Bit = Parameters.USE_64_BIT_CLIENT.toParameter();
|
||||||
|
|
||||||
String gameParameters = getGameParameter(modset);
|
String gameParameters = getGameParameter(modset);
|
||||||
String additionalParameters = String.join(" ", additionalParams);
|
String additionalParameters = String.join(" ", additionalParams);
|
||||||
String battleEye = "\"" + arma3battleye.getAbsolutePath() + "\" 2 1 1 -exe " + ((Boolean) use64Bit.getValue() ? "arma3_x64.exe" : "arma3.exe");
|
String battleEye = "\"" + arma3battleye.getAbsolutePath() + "\" 2 1 1 -exe " + ((Boolean) use64Bit.getValue() ? "arma3_x64.exe" : "arma3.exe");
|
||||||
String command = battleEye + " " + gameParameters + " " + additionalParameters;
|
String command = battleEye + " " + gameParameters + " " + additionalParameters;
|
||||||
Logger.getLogger(ArmaUtils.class.getName()).log(Level.INFO, command);
|
logger.info(command);
|
||||||
try {
|
try {
|
||||||
Runtime.getRuntime().exec(command);
|
Runtime.getRuntime().exec(command);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Logger.getLogger(ArmaUtils.class.getName()).log(Level.INFO, "Starting failed!", e);
|
logger.error("Starting failed!", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,21 @@
|
|||||||
package de.mc8051.arma3launcher.utils;
|
package de.mc8051.arma3launcher.utils;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by gurkengewuerz.de on 27.03.2020.
|
* Created by gurkengewuerz.de on 27.03.2020.
|
||||||
*/
|
*/
|
||||||
public class TaskBarUtils {
|
public class TaskBarUtils {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(TaskBarUtils.class);
|
||||||
|
|
||||||
public static BufferedImage IMAGE_ICON = createIcon();
|
public static BufferedImage IMAGE_ICON = createIcon();
|
||||||
public static BufferedImage IMAGE_LGO = createLogo();
|
public static BufferedImage IMAGE_LGO = createLogo();
|
||||||
|
|
||||||
@ -31,6 +34,8 @@ public class TaskBarUtils {
|
|||||||
taskbar = Taskbar.getTaskbar();
|
taskbar = Taskbar.getTaskbar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.info(isTaskbarSupported ? "Taskbar is supported" : "Taskbar not supported");
|
||||||
|
|
||||||
isSystemtraySupported = SystemTray.isSupported();
|
isSystemtraySupported = SystemTray.isSupported();
|
||||||
if (isSystemtraySupported) {
|
if (isSystemtraySupported) {
|
||||||
tray = SystemTray.getSystemTray();
|
tray = SystemTray.getSystemTray();
|
||||||
@ -54,9 +59,11 @@ public class TaskBarUtils {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
} catch (AWTException e) {
|
} catch (AWTException e) {
|
||||||
Logger.getLogger(TaskBarUtils.class.getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.info(isSystemtraySupported ? "Systemtray is supported" : "Systemtray not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TaskBarUtils getInstance() {
|
public static TaskBarUtils getInstance() {
|
||||||
@ -109,7 +116,7 @@ public class TaskBarUtils {
|
|||||||
public void notification(String caption, String text, TrayIcon.MessageType type) {
|
public void notification(String caption, String text, TrayIcon.MessageType type) {
|
||||||
if (!isSystemtraySupported) return;
|
if (!isSystemtraySupported) return;
|
||||||
if (trayIcon == null) return;
|
if (trayIcon == null) return;
|
||||||
|
logger.debug("Sending notification: {} {}", caption, text);
|
||||||
trayIcon.displayMessage(caption, text, type);
|
trayIcon.displayMessage(caption, text, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,7 +134,7 @@ public class TaskBarUtils {
|
|||||||
try {
|
try {
|
||||||
return ImageIO.read(TaskBarUtils.class.getResourceAsStream("/icons/logo_32.png"));
|
return ImageIO.read(TaskBarUtils.class.getResourceAsStream("/icons/logo_32.png"));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Logger.getLogger(TaskBarUtils.class.getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,7 +143,7 @@ public class TaskBarUtils {
|
|||||||
try {
|
try {
|
||||||
return ImageIO.read(TaskBarUtils.class.getResourceAsStream("/icons/logo_256.png"));
|
return ImageIO.read(TaskBarUtils.class.getResourceAsStream("/icons/logo_256.png"));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Logger.getLogger(TaskBarUtils.class.getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,24 @@
|
|||||||
package de.mc8051.arma3launcher.utils;
|
package de.mc8051.arma3launcher.utils;
|
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by gurkengewuerz.de on 29.03.2020.
|
* Created by gurkengewuerz.de on 29.03.2020.
|
||||||
*/
|
*/
|
||||||
public class URLUtils {
|
public class URLUtils {
|
||||||
|
|
||||||
|
private static final Logger logger = LogManager.getLogger(URLUtils.class);
|
||||||
|
|
||||||
public static String encodeToURL(String s) {
|
public static String encodeToURL(String s) {
|
||||||
try {
|
try {
|
||||||
return URLEncoder.encode(s, StandardCharsets.UTF_8.name()).replace("+", "%20").replace("@", "%40");
|
return URLEncoder.encode(s, StandardCharsets.UTF_8.name()).replace("+", "%20").replace("@", "%40");
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
Logger.getLogger(URLUtils.class.getName()).log(Level.SEVERE, null, e);
|
logger.error(e);
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
"CheckModset": false,
|
"CheckModset": false,
|
||||||
"UseWorkshop": false,
|
"UseWorkshop": false,
|
||||||
"behaviourAfterStart": "nothing",
|
"behaviourAfterStart": "nothing",
|
||||||
"language": "system"
|
"language": "system",
|
||||||
|
"debug": false
|
||||||
},
|
},
|
||||||
"arma": {
|
"arma": {
|
||||||
"Profile": "",
|
"Profile": "",
|
||||||
|
@ -181,5 +181,22 @@ nicht jeder Fehler unsererseits behoben werden kann.
|
|||||||
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,<br/>
|
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,<br/>
|
||||||
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br/>
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<br/>
|
||||||
</tt>
|
</tt>
|
||||||
|
<h2>org.apache.log4j</h2>
|
||||||
|
<tt>
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||||||
|
(the "License"); you may not use this file except in compliance with
|
||||||
|
the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
</tt>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -71,12 +71,7 @@ use64bitclient_desc=Startet Arma3 mit der f
|
|||||||
use_workshop=Versuche Workshop Inhalte zu nutzen
|
use_workshop=Versuche Workshop Inhalte zu nutzen
|
||||||
use_workshop_desc=Bei großen Modspacks versucht der Client bereits heruntergeladene Workshop Inhalte, die gleich sind, zu kopieren um so den Download schneller zu gestalten
|
use_workshop_desc=Bei großen Modspacks versucht der Client bereits heruntergeladene Workshop Inhalte, die gleich sind, zu kopieren um so den Download schneller zu gestalten
|
||||||
warning=Warnung
|
warning=Warnung
|
||||||
warning_workshop=Der Client versucht sein bestes die gleichen Dateien zu finden,\
|
warning_workshop=Der Client versucht sein bestes die gleichen Dateien zu finden, jedoch kann es vorkommen das es nicht die identischen Dateien sind. Im Falle eines Fehlgeschlagenem Syncen mit dieser Option, solltest du sie deaktivieren und ohne diese Option erneut syncen. Ebenfalls könnte es zu kurzen Performance einbußen kommen.Der Client versucht sein bestes die gleichen Dateien zu finden, jedoch kann es vorkommen das es nicht die identischen Dateien sind. Im Falle eines fehlgeschlagenem Syncen mit dieser Option, solltest du sie deaktivieren und ohne diese Option erneut syncen. Ebenfalls könnte es zu kurzen Performance einbußen kommen.
|
||||||
jedoch kann es vorkommen das es nicht die identischen Dateien sind.\
|
|
||||||
Im Falle eines Fehlgeschlagenem Syncen mit dieser Option, solltest\
|
|
||||||
du sie deaktivieren und ohne diese Option erneut syncen.\
|
|
||||||
\
|
|
||||||
Ebenfalls könnte es zu kurzen Performance einbußen kommen.
|
|
||||||
window_desc=Ist diese Option aktiv, wird Arma 3 im Fenstermodus gestartet.
|
window_desc=Ist diese Option aktiv, wird Arma 3 im Fenstermodus gestartet.
|
||||||
world_desc=Hier kann eine Karte eingetragen werden, die geladen und in den Menüs als Hintergrund angezeigt werden soll (z.B. „altis“ oder „stratis“ – ohne Anführungszeichen!). Ist das Feld leer, wird keine Karte während des Startens geladen und der Start von Arma 3 ist entsprechend schneller.
|
world_desc=Hier kann eine Karte eingetragen werden, die geladen und in den Menüs als Hintergrund angezeigt werden soll (z.B. „altis“ oder „stratis“ – ohne Anführungszeichen!). Ist das Feld leer, wird keine Karte während des Startens geladen und der Start von Arma 3 ist entsprechend schneller.
|
||||||
path_not_set=ArmA oder Mod Verzeichnis nicht gesetzt
|
path_not_set=ArmA oder Mod Verzeichnis nicht gesetzt
|
||||||
@ -115,3 +110,5 @@ modset_exists=Preset mit diesen Namen existiert bereits
|
|||||||
update_now=Jetzt updaten!
|
update_now=Jetzt updaten!
|
||||||
arma_path_not_found=ArmA 3 Pfad nicht gefunden
|
arma_path_not_found=ArmA 3 Pfad nicht gefunden
|
||||||
arma_path_not_found_msg=Der Installationsordner von ArmA 3 konnte nicht automatisch erkannt werden. Bitte gehe zuerst in die Einstellungen.
|
arma_path_not_found_msg=Der Installationsordner von ArmA 3 konnte nicht automatisch erkannt werden. Bitte gehe zuerst in die Einstellungen.
|
||||||
|
use_debug=Detaillierter Log
|
||||||
|
use_debug_tooltip=Der Client benutzt einen detaillierten Log. Die Funktion ist nur wichtig, wenn du einen Fehler melden möchtest
|
@ -113,3 +113,5 @@ modset_exists=Preset with these names already exists
|
|||||||
update_now=Update now!
|
update_now=Update now!
|
||||||
arma_path_not_found=ArmA 3 path can't be detected
|
arma_path_not_found=ArmA 3 path can't be detected
|
||||||
arma_path_not_found_msg=The installation folder of ArmA 3 could not be detected automatically. Please go to the settings first.
|
arma_path_not_found_msg=The installation folder of ArmA 3 could not be detected automatically. Please go to the settings first.
|
||||||
|
use_debug=Use debug log
|
||||||
|
use_debug_tooltip=The client uses a detailed log. This function is only important if you want to report an error.
|
41
gui/src/main/resources/log4j2.xml
Normal file
41
gui/src/main/resources/log4j2.xml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="WARN">
|
||||||
|
<Properties>
|
||||||
|
<Property name="logPath">logs/</Property>
|
||||||
|
<Property name="rollingFileName">launcher</Property>
|
||||||
|
</Properties>
|
||||||
|
<Appenders>
|
||||||
|
<Console name="console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout
|
||||||
|
pattern="[%highlight{%-5level}] %d{DEFAULT} %c{1}.%M() - %msg%n%throwable{short.lineNumber}"/>
|
||||||
|
</Console>
|
||||||
|
<RollingFile name="rollingFile" fileName="${logPath}/${rollingFileName}.log"
|
||||||
|
filePattern="${logPath}/${rollingFileName}_%d{yyyy-MM-dd}.log">
|
||||||
|
<PatternLayout
|
||||||
|
pattern="[%highlight{%-5level}] %d{DEFAULT} %c{1}.%M() - %msg%n%throwable{short.lineNumber}"/>
|
||||||
|
<Policies>
|
||||||
|
<!-- Causes a rollover if the log file is older than the current JVM's start time -->
|
||||||
|
<OnStartupTriggeringPolicy/>
|
||||||
|
<!-- Causes a rollover once the date/time pattern no longer applies to the active file -->
|
||||||
|
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
|
||||||
|
</Policies>
|
||||||
|
<DefaultRolloverStrategy>
|
||||||
|
<Delete basePath="${logPath}" maxDepth="2">
|
||||||
|
<IfFileName glob="*/${rollingFileName}*.log">
|
||||||
|
<IfLastModified age="2d">
|
||||||
|
<IfAny>
|
||||||
|
<IfAccumulatedFileCount exceeds="10"/>
|
||||||
|
</IfAny>
|
||||||
|
</IfLastModified>
|
||||||
|
</IfFileName>
|
||||||
|
</Delete>
|
||||||
|
</DefaultRolloverStrategy>
|
||||||
|
</RollingFile>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Root level="DEBUG" additivity="false">
|
||||||
|
<AppenderRef ref="console"/>
|
||||||
|
<AppenderRef ref="rollingFile"/>
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
Loading…
Reference in New Issue
Block a user