Skip to content

Commit

Permalink
Fix linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
Mgamerz committed Apr 15, 2021
1 parent 40befd4 commit 2b187ff
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using ALOTInstallerCore.ModManager.Objects;
using ALOTInstallerCore.ModManager.Services;
using ALOTInstallerCore.Objects;
using ME3ExplorerCore.Gammtek.Extensions;
using ME3ExplorerCore.Packages;
using Terminal.Gui;

Expand Down
1 change: 1 addition & 0 deletions ALOTInstallerConsole/BuilderUI/SettingsUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using ALOTInstallerCore.ModManager.Objects;
using ALOTInstallerCore.Objects;
using ALOTInstallerCore;
using ME3ExplorerCore.Gammtek.Extensions;
using ME3ExplorerCore.Packages;
using Terminal.Gui;

Expand Down
31 changes: 8 additions & 23 deletions ALOTInstallerCore/Helpers/AppSettings/SettingsLinux.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,24 @@ public partial class Settings
private static DuplicatingIni settingsIni;
public static readonly string SettingsPath = Path.Combine(Locations.AppDataFolder(), "settings.ini");

public static void Load()
public static void Load(bool loadSettingsFolders)
{
settingsIni = new DuplicatingIni();
if (File.Exists(SettingsPath))
{
settingsIni = DuplicatingIni.LoadIni(SettingsPath);
}
TextureLibraryLocation = LoadDirectorySetting(SettingsKeys.SettingKeys.TextureLibraryDirectory, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "ALOTInstaller", "Downloaded_Mods"), true, v => TextureLibrarySettingsLocation = v, v => TextureLibraryLocationExistedOnLoad = v);
StagingLocation = LoadDirectorySetting(SettingsKeys.SettingKeys.BuildLocation, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "ALOTInstaller", "Staging"), true, v => StagingSettingsLocation = v, v => StagingLocationExistedOnLoad = v);

if (loadSettingsFolders)
{
TextureLibraryLocation = LoadDirectorySetting(SettingsKeys.SettingKeys.TextureLibraryDirectory, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "ALOTInstaller", "Downloaded_Mods"), true, v => TextureLibrarySettingsLocation = v, v => TextureLibraryLocationExistedOnLoad = v);
StagingLocation = LoadDirectorySetting(SettingsKeys.SettingKeys.BuildLocation, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "ALOTInstaller", "Staging"), true, v => StagingSettingsLocation = v, v => StagingLocationExistedOnLoad = v);
}

MoveFilesWhenImporting = LoadSettingBool(SettingsKeys.SettingKeys.ImportAsMove, false);
Telemetry = LoadSettingBool(SettingsKeys.SettingKeys.Telemetry, true);
BetaMode = LoadSettingBool(SettingsKeys.SettingKeys.BetaMode, false);
LastContentCheck = LoadSettingDateTime(SettingsKeys.SettingKeys.LastContentCheck, DateTime.MinValue);
//AutoUpdateLODs = LoadSettingBool("ModManager", "AutoUpdateLODs", true);
//WebClientTimeout = LoadSettingInt("ModManager", "WebclientTimeout", 5);
//ModMakerControllerModOption = LoadSettingBool("ModMaker", "AutoAddControllerMixins", false);
//ModMakerAutoInjectCustomKeybindsOption = LoadSettingBool("ModMaker", "AutoInjectCustomKeybinds", false);


//UpdaterServiceUsername = LoadSettingString("UpdaterService", "Username", null);
//UpdaterServiceLZMAStoragePath = LoadSettingString("UpdaterService", "LZMAStoragePath", null);
//UpdaterServiceManifestStoragePath = LoadSettingString("UpdaterService", "ManifestStoragePath", null);

//LogModStartup = LoadSettingBool("Logging", "LogModStartup", false);
//LogMixinStartup = LoadSettingBool("Logging", "LogMixinStartup", false);
//EnableTelemetry = LoadSettingBool("Logging", "EnableTelemetry", true);
//LogModInstallation = LoadSettingBool("Logging", "LogModInstallation", false);
//LogModMakerCompiler = LoadSettingBool("Logging", "LogModMakerCompiler", false);

//ModLibraryPath = LoadSettingString("ModLibrary", "LibraryPath", null);

//DeveloperMode = LoadSettingBool("UI", "DeveloperMode", false);
//DarkTheme = LoadSettingBool("UI", "DarkTheme", false);
Loaded = true;
}

Expand Down
3 changes: 2 additions & 1 deletion ALOTInstallerCore/ModManager/ME3Tweaks/BackupHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.IO;
using System.Linq;
using ALOTInstallerCore.Helpers;
using ALOTInstallerCore.Helpers.AppSettings;
using ALOTInstallerCore.ModManager.Objects;
using ALOTInstallerCore.ModManager.Services;
using Serilog;
Expand Down Expand Up @@ -902,7 +903,7 @@ public static void UnlinkBackup(MEGame meGame)
break;
}
#elif LINUX

// Remove backup here
#endif

}
Expand Down

0 comments on commit 2b187ff

Please sign in to comment.