Code changes

This commit is contained in:
Jeddunk 2020-10-24 00:45:10 +02:00
parent 992f2fb20c
commit 21a7ec98dd
2 changed files with 6 additions and 2 deletions

View File

@ -110,7 +110,7 @@
<destinationFile>${dist}/steam_api.dll</destinationFile> <destinationFile>${dist}/steam_api.dll</destinationFile>
</fileSet> </fileSet>
<fileSet> <fileSet>
<sourceFile>${project.basedir}/steam_api.dll</sourceFile> <sourceFile>${project.basedir}/steam_api64.dll</sourceFile>
<destinationFile>${dist}/steam_api64.dll</destinationFile> <destinationFile>${dist}/steam_api64.dll</destinationFile>
</fileSet> </fileSet>
<fileSet> <fileSet>

View File

@ -54,7 +54,7 @@ public class CreamApiConfig {
config = CONFIGS.ini(path); config = CONFIGS.ini(path);
config.setCommentLeadingCharsUsedInInput(";"); config.setCommentLeadingCharsUsedInInput(";");
} catch (ConfigurationException e) { } catch (ConfigurationException e) {
logger.warn("No config file found in default location!"); logger.warn("No config file found!");
//e.printStackTrace(); //e.printStackTrace();
} }
@ -109,6 +109,7 @@ public class CreamApiConfig {
} }
public void read() throws NullPointerException, NoSuchElementException { public void read() throws NullPointerException, NoSuchElementException {
logger.info("Reading config file...");
appId = config.getInt("steam.appid"); appId = config.getInt("steam.appid");
language = config.getString("steam.language"); language = config.getString("steam.language");
if (language == null) { if (language == null) {
@ -119,9 +120,11 @@ public class CreamApiConfig {
forceOffline = config.getBoolean("steam.forceoffline"); forceOffline = config.getBoolean("steam.forceoffline");
final SubnodeConfiguration dlc_section = config.getSection("dlc"); final SubnodeConfiguration dlc_section = config.getSection("dlc");
dlc_section.getKeys().forEachRemaining(k -> dlc.put(Integer.parseInt(k), dlc_section.getString(k))); dlc_section.getKeys().forEachRemaining(k -> dlc.put(Integer.parseInt(k), dlc_section.getString(k)));
logger.info("Successfully read config file!");
} }
public void sync() throws ConfigurationException { public void sync() throws ConfigurationException {
logger.info("Saving config file...");
FileBasedConfigurationBuilder<INIConfiguration> builder = CONFIGS.iniBuilder(path); FileBasedConfigurationBuilder<INIConfiguration> builder = CONFIGS.iniBuilder(path);
config = builder.getConfiguration(); config = builder.getConfiguration();
config.setCommentLeadingCharsUsedInInput(";"); config.setCommentLeadingCharsUsedInInput(";");
@ -142,6 +145,7 @@ public class CreamApiConfig {
config.setProperty("steam_misc.disableuserinterface", false); config.setProperty("steam_misc.disableuserinterface", false);
builder.save(); builder.save();
logger.info("Saved successfully!");
} }
// DLC list parsing // DLC list parsing