From c7fa87f61bfa6d8eb6897a679cf1a42b3007932f Mon Sep 17 00:00:00 2001 From: CreepPork Date: Thu, 27 Sep 2018 22:34:31 +0300 Subject: [PATCH 01/58] Cleaned up for rewrite and renamed everything to Hephaestus --- AddonBuilder/App.config | 7 +- AddonBuilder/FodyWeavers.xml | 10 - ...{AddonBuilder.csproj => Hephaestus.csproj} | 45 +- AddonBuilder/Hephaestus.ini | 56 --- AddonBuilder/Models/Hash.cs | 14 - AddonBuilder/Program.cs | 407 +----------------- AddonBuilder/Properties/AssemblyInfo.cs | 2 +- AddonBuilder/Resources/icon.ico | Bin 28331 -> 0 bytes AddonBuilder/Services/Updater/AutoUpdater.cs | 9 - .../Services/Updater/CheckIfLatest.cs | 20 - .../Services/Updater/GetLatestVersion.cs | 36 -- AddonBuilder/Services/Updater/Updater.cs | 37 -- AddonBuilder/Utility/AssemblyUtil.cs | 48 --- AddonBuilder/Utility/ConsoleUtil.cs | 25 -- AddonBuilder/Utility/HashUtil.cs | 109 ----- AddonBuilder/packages.config | 9 - AddonBuilder.sln => Hephaestus.sln | 2 +- 17 files changed, 18 insertions(+), 818 deletions(-) delete mode 100644 AddonBuilder/FodyWeavers.xml rename AddonBuilder/{AddonBuilder.csproj => Hephaestus.csproj} (62%) delete mode 100644 AddonBuilder/Hephaestus.ini delete mode 100644 AddonBuilder/Models/Hash.cs delete mode 100644 AddonBuilder/Resources/icon.ico delete mode 100644 AddonBuilder/Services/Updater/AutoUpdater.cs delete mode 100644 AddonBuilder/Services/Updater/CheckIfLatest.cs delete mode 100644 AddonBuilder/Services/Updater/GetLatestVersion.cs delete mode 100644 AddonBuilder/Services/Updater/Updater.cs delete mode 100644 AddonBuilder/Utility/AssemblyUtil.cs delete mode 100644 AddonBuilder/Utility/ConsoleUtil.cs delete mode 100644 AddonBuilder/Utility/HashUtil.cs delete mode 100644 AddonBuilder/packages.config rename AddonBuilder.sln => Hephaestus.sln (85%) diff --git a/AddonBuilder/App.config b/AddonBuilder/App.config index 2a83c36..bd27edc 100644 --- a/AddonBuilder/App.config +++ b/AddonBuilder/App.config @@ -1,7 +1,6 @@ - - + - + - \ No newline at end of file + diff --git a/AddonBuilder/FodyWeavers.xml b/AddonBuilder/FodyWeavers.xml deleted file mode 100644 index 33b58eb..0000000 --- a/AddonBuilder/FodyWeavers.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - INIFileParser - RestSharp - - - diff --git a/AddonBuilder/AddonBuilder.csproj b/AddonBuilder/Hephaestus.csproj similarity index 62% rename from AddonBuilder/AddonBuilder.csproj rename to AddonBuilder/Hephaestus.csproj index 1df5fca..2382a9a 100644 --- a/AddonBuilder/AddonBuilder.csproj +++ b/AddonBuilder/Hephaestus.csproj @@ -6,12 +6,15 @@ AnyCPU {9116D28C-8A32-4DBB-B773-EB4D2ADB3B4F} Exe - AddonBuilder - AddonBuilder - v4.5.2 + Hephaestus + Hephaestus + v4.6.1 512 true false + + + publish\ true Disk @@ -31,11 +34,12 @@ AnyCPU true full - false + true bin\Debug\ DEBUG;TRACE prompt 4 + false AnyCPU @@ -47,27 +51,16 @@ 4 - Resources\icon.ico + + false - - ..\packages\Costura.Fody.1.6.2\lib\dotnet\Costura.dll - - - ..\packages\ini-parser.2.5.2\lib\net20\INIFileParser.dll - - - ..\packages\RestSharp.106.2.0\lib\net452\RestSharp.dll - - - ..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll - @@ -78,23 +71,11 @@ - - - - - - - - - - Always - - @@ -108,16 +89,10 @@ false - - - - - - \ No newline at end of file diff --git a/AddonBuilder/Hephaestus.ini b/AddonBuilder/Hephaestus.ini deleted file mode 100644 index 626fdf6..0000000 --- a/AddonBuilder/Hephaestus.ini +++ /dev/null @@ -1,56 +0,0 @@ -[AddonFolders] - -; Path for the folder where the source folders are located -sourceDir = H:\Steam\steamapps\common\Arma 3\AresModAchillesExpansion\@AresModAchillesExpansion\addons - -; Path for the folder where the *.pbo's shall be moved -targetDir = H:\Steam\steamapps\common\Arma 3\AresModAchillesExpansion\@AresModAchillesExpansion\addons - -[AddonInformation] - -; Prefix: you can access your addon files via \\\ -; Prefix: if projPrefix is "" then \\ -projectPrefix = achilles - -[AddonSigning] - -; Folder where the biprivatekey is located -privateKeyDir = H:\Steam\steamapps\common\Arma 3 - -; Prefix for your bikey: _.biprivatekey -privateKeyPrefix = achilles - -; Default version (if you don't specify the version as an argument): _dev.biprivatekey -privateKeyVersionDefault = dev - -[ArmaInformation] - -; Arma 3 folder -ArmaFolder = H:\Steam\steamapps\common\Arma 3 - -; Addon Builder folder -AddonBuilderDir = E:\Games\SteamApps\common\Arma 3 Tools\AddonBuilder - -; Enable or disable closing of Arma 3 when found -ShutdownArma = true - -; Open Arma 3 after build is finished -OpenArma = true - -; Which executable to open (arma3.exe or arma3_x64.exe or arma3battleye.exe) -OpenArmaExecutable = arma3battleye.exe - -; Arguments to launch Arma 3 with -OpenArmaArguments = -noSplash "C:\Users\Uldis\Documents\Arma 3 - Other Profiles\CreepPork\missions\EnyoDev.VR\mission.sqm" -showScriptErrors "-mod=H:\Steam\steamapps\common\Arma 3\!Workshop\@CBA_A3;H:\Steam\steamapps\common\Arma 3\AresModAchillesExpansion\@AresModAchillesExpansion" -beservice - -; Do not modify below this if you don't know what you are doing! (obligatory warning, because why not? But yeah, you shouldn't touch it.) -[Checksums] -achillesDATA_F_ACHILLES = CA372C515ECA3C1EFB7EA3C0CEB296F70CDF40D3 -achillesDATA_F_ARES = B8059FEC0E676757671C0D5B836530FB2C77A624 -achillesFUNCTIONS_F_ACHILLES = 243EB06E1E02A070D4CA6131F2DD30E69591C773 -achillesFUNCTIONS_F_ARES = 76B45591774FE9ACCE9A251A968B0CCB567A4EF0 -achillesLANGUAGE_F = F3E0460A809610D23DEC8055100E9433A27FDA94 -achillesMODULES_F_ACHILLES = C5650981336828464F3CFF9249A4C5C6DA809916 -achillesMODULES_F_ARES = ED0B9EB94F84363785E63F8536DED9E8A9AE6759 -achillesSETTINGS_F = EAA5E87375EF606706AC1F9FB09E493EDD3C3E45 -achillesUI_F = A6BCB36DF4EA548EAFDAA5586CA164572E87E28D \ No newline at end of file diff --git a/AddonBuilder/Models/Hash.cs b/AddonBuilder/Models/Hash.cs deleted file mode 100644 index eb0c9fb..0000000 --- a/AddonBuilder/Models/Hash.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace AddonBuilder.Models -{ - public class Hash - { - public string ChecksumName { get; set; } - public string FileHash { get; set; } - - public Hash(string checksumName, string hash) - { - ChecksumName = checksumName; - FileHash = hash; - } - } -} diff --git a/AddonBuilder/Program.cs b/AddonBuilder/Program.cs index 91e28c2..94c53bd 100644 --- a/AddonBuilder/Program.cs +++ b/AddonBuilder/Program.cs @@ -1,410 +1,9 @@ -using IniParser; -using IniParser.Model; -using System; -using System.IO; -using System.Diagnostics; -using System.Threading; -using System.Collections.Generic; -using AddonBuilder.Models; -using AddonBuilder.Utility; +using System; -namespace AddonBuilder +namespace Hephaestus { public class Program { - private static readonly string ConfigFileName = "Hephaestus.ini"; - - private static bool hasPrivateKey = false; - - public static void Main(string[] args) - { - // Show our info - Console.WriteLine($"Launching {AssemblyUtil.GetTitle()} v {AssemblyUtil.GetVersion()}"); - Console.WriteLine("Made by " + AssemblyUtil.GetCompany()); - Console.WriteLine("========"); - - // If config.ini was not found, display an error - if (!File.Exists(ConfigFileName)) - { - ConsoleUtil.ShowConsoleErrorMsg($"Failed to find {ConfigFileName}, please ensure it is in the same directory as the application."); - Environment.Exit(1); - } - - //TODO: Finish the updater - - //Console.WriteLine("Checking for updates..."); - //// Check for updates - //if (NetworkInterface.GetIsNetworkAvailable()) - //{ - // //new Task(() => { }).Start(); - // Classes.Updates.Updater.UpdateManager(appVersion); - //} - //else - //{ - // ShowConsoleErrorMsg("Failed to check for updates! No internet connection available!"); - //} - - // Read our .ini info - var iniParser = new FileIniDataParser(); - IniData iniData = iniParser.ReadFile(ConfigFileName); - - string sourceDir = iniData["AddonFolders"]["sourceDir"]; - string targetDir = iniData["AddonFolders"]["targetDir"]; - - string projectPrefix = iniData["AddonInformation"]["projectPrefix"]; - - string privateKeyDir = iniData["AddonSigning"]["privateKeyDir"]; - string privateKeyPrefix = iniData["AddonSigning"]["privateKeyPrefix"]; - string privateKeyVersion = iniData["AddonSigning"]["privateKeyVersionDefault"]; - - string armaFolder = iniData["ArmaInformation"]["ArmaFolder"]; - string addonBuilderDir = iniData["ArmaInformation"]["AddonBuilderDir"]; - bool shutdownArma = bool.Parse(iniData["ArmaInformation"]["ShutdownArma"]); - bool openArma = bool.Parse(iniData["ArmaInformation"]["OpenArma"]); - string armaExecutable = iniData["ArmaInformation"]["OpenArmaExecutable"]; - string armaLaunchArguments = iniData["ArmaInformation"]["OpenArmaArguments"]; - - // Check if any arguments were passed (version number) - if (args.Length > 0) - { - privateKeyVersion = args[0]; - Console.WriteLine("Detected build version: {0}!", privateKeyVersion); - } - - // Handle files and folders (show errors and/or create) - HandleFolders(sourceDir, targetDir, privateKeyDir, armaFolder, addonBuilderDir, projectPrefix); - HandleFiles(armaFolder, addonBuilderDir, privateKeyDir, privateKeyPrefix, privateKeyVersion); - - // Get the Addon Builder exe - string addonBuilderExe = addonBuilderDir + "\\" + "AddonBuilder.exe"; - - // Close Arma if open - if (shutdownArma) - { - HandleArmaClose(); - } - else - { - Console.WriteLine("Found Arma 3 open, not shutting down!"); - } - - // Get the private key full path - string privateKey = privateKeyDir + "\\" + privateKeyPrefix + "_" + privateKeyVersion + ".biprivatekey"; - - // Handle the building of the addons - HandleBuild(addonBuilderExe, sourceDir, targetDir, privateKey, projectPrefix, openArma, armaLaunchArguments, - armaFolder, armaExecutable); - - Console.WriteLine("Finished all tasks. Exiting!"); - } - - /// - /// Handles folders information, shows error messages and/or creates folders if required. - /// - /// Source directory (to get the folders with code) - /// Target directory (to put the PBOs) - /// Private key directory - /// Arma 3 folder - /// Addon Builder folder - private static void HandleFolders(string source, string target, string privateKey, string armaFolder, - string addonBuilder, string projectPrefix) - { - if (!Directory.Exists(source)) - { - ConsoleUtil.ShowConsoleErrorMsg( - $"The given source path does not exist or does not represent a valid path:\n {source}"); - Environment.Exit(1); - } - - if (Directory.GetDirectories(source).Length == 0) - { - ConsoleUtil.ShowConsoleErrorMsg($"The given source path does not contain any buildable folders:\n {source}"); - Environment.Exit(1); - } - - if (!Directory.Exists(target)) - { - Console.WriteLine("Target directory does not exist! Creating folder!"); - Directory.CreateDirectory(target); - } - - if (!Directory.Exists(privateKey)) - { - Console.WriteLine("Failed to find the private key directory!"); - } - - if (!Directory.Exists(armaFolder)) - { - ConsoleUtil.ShowConsoleErrorMsg( - $"The given path to the Arma 3 game directory does not exist or does not represent a valid path:\n {armaFolder}"); - Environment.Exit(1); - } - - if (!Directory.Exists(addonBuilder)) - { - ConsoleUtil.ShowConsoleErrorMsg( - $"The given path to the Arma 3 Addon Builder does not exist or does not represent a valid path:\n {addonBuilder}"); - Environment.Exit(1); - } - - if (!Directory.Exists(Path.GetTempPath() + "\\" + projectPrefix)) - { - Console.WriteLine("Temporary directory not found, creating!"); - Directory.CreateDirectory(Path.GetTempPath() + "\\" + projectPrefix); - } - } - - /// - /// Handles errors if some of the required files do not exist. - /// - /// Arma 3 folder - /// Addon Builder folder - /// Private key folder - /// Private key prefix - /// Private key version (default or one from the argument) - private static void HandleFiles(string armaFolder, string addonBuilder, string privateKey, - string privateKeyPrefix, string privateKeyVersion) - { - string privateKeyName = privateKeyPrefix + "_" + privateKeyVersion + ".biprivatekey"; - if (!File.Exists(privateKey + "\\" + privateKeyName)) - { - Console.WriteLine("No private key has been found! Skipping the signing of the PBOs!"); - } - else - { - hasPrivateKey = true; - } - - if (!File.Exists(armaFolder + "\\" + "arma3_x64.exe") | !File.Exists(armaFolder + "\\" + "arma3.exe")) - { - ConsoleUtil.ShowConsoleErrorMsg( - $"The given Arma 3 game path does not contain any valid Arma 3 executables:\n {armaFolder}"); - Environment.Exit(1); - } - - if (!File.Exists(addonBuilder + "\\" + "AddonBuilder.exe")) - { - ConsoleUtil.ShowConsoleErrorMsg( - $"The given Addon Builder path does not contain a valid Addon Builder executable:\n {addonBuilder}"); - Environment.Exit(1); - } - } - - /// - /// Handles the closing of Arma 3 if open - /// - private static void HandleArmaClose() - { - Process[] processes = Process.GetProcesses(); - string processName32 = "arma3"; - string processName64 = "arma3_x64"; - - foreach (Process proc in processes) - { - string processName = proc.ProcessName.ToLower(); - if (processName == processName32 | processName == processName64) - { - Console.WriteLine("Found Arma 3 open, closing!"); - - if (!proc.HasExited) - { - proc.CloseMainWindow(); - - proc.WaitForExit(); - } - - proc.Close(); - } - } - } - - static bool haveAllBuildersClosed = false; - static int buildersNotLaunched = 0; - static int closedBuilders = 0; - - /// - /// Handle the building of the folders to get the magical PBOs - /// - /// Full path including .exe to Addon Builder - /// Source directory of the code - /// Target directory where the built PBOs will be placed - /// The private key full path - /// Project prefix - /// Should we open Arma after build is complete? - /// Arguments to launch Arma with - /// Arma 3 Folder - /// Executable of Arma to launch with - private static void HandleBuild(string addonBuilder, string source, string target, string privateKey, - string projectPrefix, bool openArma, string openArmaArguments, string armaFolder, string armaExecutable) - { - string[] folders = Directory.GetDirectories(source); - - int folderCount = folders.Length; - - var parser = new FileIniDataParser(); - IniData iniData = parser.ReadFile(ConfigFileName); - - int addedHashes = 0; - List hashesToChange = new List(); - - foreach (var folder in folders) - { - try - { - Process builder = new Process(); - - string folderName = Path.GetFileName(folder); - - if (hasPrivateKey) - { - builder.StartInfo.Arguments = "\"" + folder + "\"" + " " + "\"" + target + "\"" + - " -packonly -sign=" + "\"" + privateKey + "\"" + " -prefix=" + - "\"" + projectPrefix + "\"" + "\\" + folderName + " -temp=" + - "\"" + Path.GetTempPath() + "\\" + projectPrefix + "\"" + - " -binarizeFullLogs"; - } - else - { - builder.StartInfo.Arguments = "\"" + folder + "\"" + " " + "\"" + target + "\"" + - " -packonly -prefix=" + "\"" + projectPrefix + "\"" + "\\" + - folderName + " -temp=" + "\"" + Path.GetTempPath() + "\\" + - projectPrefix + "\"" + " -binarizeFullLogs"; - } - - builder.StartInfo.RedirectStandardOutput = true; - builder.StartInfo.UseShellExecute = false; - builder.StartInfo.CreateNoWindow = true; - builder.StartInfo.FileName = addonBuilder; - - builder.EnableRaisingEvents = true; - builder.Exited += (sender, e) => BuilderExit(sender, e, folderCount, openArmaArguments, armaFolder, - armaExecutable, openArma); - - string checksumName = projectPrefix.ToLower() + folderName.ToUpper(); - string hash = HashUtil.HashDirectory("SHA1", new DirectoryInfo(folder)); - - if (iniData["Checksums"][checksumName] == null) - { - Console.WriteLine("No checksum found for {0}! Generating hash and building!", folderName); - - iniData["Checksums"].AddKey(checksumName, hash); - - addedHashes++; - - builder.Start(); - } - else if (iniData["Checksums"][checksumName] != hash) - { - Console.WriteLine("Hash mismatch for {0}! Building!", folderName); - - builder.Start(); - - hashesToChange.Add(new Hash(checksumName, hash)); - } - else - { - Console.WriteLine("Not building {0} because the file hasn't changed!", folderName); - buildersNotLaunched++; - } - } - catch (Exception ex) - { - Console.WriteLine("Failed to start Addon Builder!"); - Console.WriteLine("Error is: " + ex); - Console.WriteLine("Press any key to continue..."); - Console.ReadKey(); - Environment.Exit(1); - } - } - - while (!haveAllBuildersClosed | buildersNotLaunched == folderCount) - { - Thread.Sleep(100); - if (hashesToChange.Count > 0 | addedHashes > 0) - { - if (hashesToChange.Count > 0) - { - Hash[] hashes = hashesToChange.ToArray(); - foreach (var hash in hashes) - { - iniData["Checksums"].RemoveKey(hash.ChecksumName); - iniData["Checksums"].AddKey(hash.ChecksumName, hash.FileHash); - } - } - - parser.WriteFile(ConfigFileName, iniData); - } - - if (openArma) - { - if (buildersNotLaunched == folderCount) - { - try - { - Console.WriteLine("Nothing built, opening Arma 3!"); - Process arma = new Process(); - arma.StartInfo.Arguments = openArmaArguments; - arma.StartInfo.FileName = armaFolder + "\\" + armaExecutable; - arma.Start(); - break; - } - catch (Exception ex) - { - Console.WriteLine("Failed to start Arma 3!"); - Console.WriteLine("Error is: " + ex); - Console.WriteLine("Press any key to continue..."); - Console.ReadKey(); - Environment.Exit(1); - } - } - } - else - { - if (buildersNotLaunched + closedBuilders == folderCount) - { - break; - } - } - } - } - - /// - /// Handles the exit of each builder and when all of the builders have exited, then start up Arma 3. - /// - /// Builder object - /// Event arguments - /// Number of folders (number of builders launched) - /// Arguments to open Arma with - /// Arma 3 Folder - /// Arma 3 Executable to launch the game with - /// Should we open Arma? - private static void BuilderExit(object sender, EventArgs e, int folderCount, string openArmaArguments, - string armaFolder, string armaExecutable, bool openArma) - { - closedBuilders++; - if (closedBuilders + buildersNotLaunched == folderCount) - { - haveAllBuildersClosed = true; - if (openArma) - { - try - { - Console.WriteLine("All builders finished, opening Arma 3!"); - Process arma = new Process(); - arma.StartInfo.Arguments = openArmaArguments; - arma.StartInfo.FileName = armaFolder + "\\" + armaExecutable; - arma.Start(); - } - catch (Exception ex) - { - Console.WriteLine("Failed to start Arma 3!"); - Console.WriteLine("Error is: " + ex); - Console.WriteLine("Press any key to continue..."); - Console.ReadKey(); - Environment.Exit(1); - } - } - } - } + } } diff --git a/AddonBuilder/Properties/AssemblyInfo.cs b/AddonBuilder/Properties/AssemblyInfo.cs index fdb54e5..b52bd56 100644 --- a/AddonBuilder/Properties/AssemblyInfo.cs +++ b/AddonBuilder/Properties/AssemblyInfo.cs @@ -31,4 +31,4 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.5.*")] \ No newline at end of file +[assembly: AssemblyVersion("2.0.*")] \ No newline at end of file diff --git a/AddonBuilder/Resources/icon.ico b/AddonBuilder/Resources/icon.ico deleted file mode 100644 index 2ffd55056ea7312f6f36277a0c93c1cad4ba9b33..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28331 zcmc(H2|ShA|NnD0`!14QgrbN-_7Evai&nc9LWoKc_u6GEEmR^*X;D;?Qrr;jNFkD2 z6m48fDBJ&Yu6yU_YpQAHJM;ZN^LqQ7=bX=Ww$EAa(_k15BVhsp7*JWv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T#1f4h!Lo3~-3 zA-BF%VM$qwBX3Sj?WvWncdhNBa^GmZeBCgnM?GCw(W05kUL9B*v7cJ$7V??OG1r}ni(%v=6rD1-jt8zWSYkCUigT{e^Bn`i+e4Esn@<1eQcdq&T-gP zk|0(#%W1mjJ8_HFEb4`rJ-ft}f?H&iRgDGDRu;NciCvWoHS#suK<(xBeHELvFBRJqHAWcL-q5uD z#@q75h4P=-i*BSWTt)U?$HNi5b(W8Lc<+PJj{Bs9Yy_|1pX@oE;_3DOU-xgrwpHP(jA zTto0kT+nVx-Aqk?Egtd?4kEkO6GtTn1?dj7@QRW|p;en@aqnDmNV4kh?sTlU{h-|@ zdF-fzzPiPb4!`VB5H3JtgCpj@Vufd^my7-_i%yr}BDc?m^@EzQj09DyhJRh-fA_Of zBb!vz^A72KYHY6-T2Yo*>?o8o4o+E^ERri%$i%Z&WA; kzmrzNFY-FyQpRu#t{30?luIs!&pk2AMb>7QOq@dhAExiO7ytkO diff --git a/AddonBuilder/Services/Updater/AutoUpdater.cs b/AddonBuilder/Services/Updater/AutoUpdater.cs deleted file mode 100644 index b3c0b43..0000000 --- a/AddonBuilder/Services/Updater/AutoUpdater.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace AddonBuilder.Classes.Updates -{ - class AutoUpdater - { - public static void DoUpdate() - { - } - } -} \ No newline at end of file diff --git a/AddonBuilder/Services/Updater/CheckIfLatest.cs b/AddonBuilder/Services/Updater/CheckIfLatest.cs deleted file mode 100644 index 16102f1..0000000 --- a/AddonBuilder/Services/Updater/CheckIfLatest.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; - -namespace AddonBuilder.Classes.Updates -{ - class CheckIfLatest - { - public static bool IsLatest(string currentVersion, string releaseVersion) - { - bool isLatest = false; - - Version _currentVersion = Version.Parse(currentVersion.Remove(0, 1)); - Version _releaseVersion = Version.Parse(releaseVersion.Remove(0, 1)); - - if (_currentVersion >= _releaseVersion) - isLatest = true; - - return isLatest; - } - } -} \ No newline at end of file diff --git a/AddonBuilder/Services/Updater/GetLatestVersion.cs b/AddonBuilder/Services/Updater/GetLatestVersion.cs deleted file mode 100644 index 7865f7d..0000000 --- a/AddonBuilder/Services/Updater/GetLatestVersion.cs +++ /dev/null @@ -1,36 +0,0 @@ -using AddonBuilder.Utility; -using RestSharp; -using RestSharp.Deserializers; - -namespace AddonBuilder.Classes.Updates -{ - class GetLatestVersion - { - class GitHubData - { - public string TagName { get; set; } - } - - static string ReleaseVersion { get; set; } = ""; - - public static string GetVersionFromGitHub() - { - var client = new RestClient("https://api.github.com"); - var request = new RestRequest("/repos/ArmaAchilles/AddonBuilder/releases/latest"); - - IRestResponse response = client.Execute(request); - - if (response.IsSuccessful) - { - GitHubData data = new JsonDeserializer().Deserialize(response); - ReleaseVersion = data.TagName; - } - else - { - ConsoleUtil.ShowConsoleErrorMsg("Failed to fetch latest version of Addon Builder!"); - } - - return ReleaseVersion; - } - } -} \ No newline at end of file diff --git a/AddonBuilder/Services/Updater/Updater.cs b/AddonBuilder/Services/Updater/Updater.cs deleted file mode 100644 index 4a3616f..0000000 --- a/AddonBuilder/Services/Updater/Updater.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; - -namespace AddonBuilder.Classes.Updates -{ - class Updater - { - public static void UpdateManager(string currentVersion) - { - string releaseVersion = GetLatestVersion.GetVersionFromGitHub(); - if (releaseVersion != "") - { - bool isLatestVersion = CheckIfLatest.IsLatest(currentVersion, releaseVersion); - - if (isLatestVersion) // TODO: Don't forget to set back to !isLatestVersion! - { - Console.WriteLine("Update is available to Addon Builder!\nDo you wish to update (y/n)?"); - ConsoleKeyInfo pressedKey = Console.ReadKey(); - - switch (pressedKey.Key) - { - case ConsoleKey.Y: - AutoUpdater.DoUpdate(); - break; - - case ConsoleKey.N: - Console.WriteLine("Canceled auto updating!"); - break; - - default: - Console.WriteLine("Wrong key pressed! Canceling auto update!"); - break; - } - } - } - } - } -} \ No newline at end of file diff --git a/AddonBuilder/Utility/AssemblyUtil.cs b/AddonBuilder/Utility/AssemblyUtil.cs deleted file mode 100644 index e2a4793..0000000 --- a/AddonBuilder/Utility/AssemblyUtil.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Reflection; - -namespace AddonBuilder.Utility -{ - /// - /// Utility class that provides various methods to access specific assembly attributes. - /// - public static class AssemblyUtil - { - public static string GetTitle() - { - var attribute = GetAssemblyAttribute(); - if (attribute != null) - return attribute.Title; - return string.Empty; - } - - public static string GetCompany() - { - var attribute = GetAssemblyAttribute(); - if (attribute != null) - return attribute.Company; - return string.Empty; - } - - public static string GetCopyright() - { - var attribute = GetAssemblyAttribute(); - if (attribute != null) - return attribute.Copyright; - return string.Empty; - } - - public static string GetVersion() - { - return Assembly.GetCallingAssembly().GetName().Version.ToString(); - } - - private static T GetAssemblyAttribute() where T : Attribute - { - object[] attributes = Assembly.GetExecutingAssembly() - .GetCustomAttributes(typeof(T), true); - if (attributes == null || attributes.Length == 0) return null; - return (T)attributes[0]; - } - } -} diff --git a/AddonBuilder/Utility/ConsoleUtil.cs b/AddonBuilder/Utility/ConsoleUtil.cs deleted file mode 100644 index c43fdd6..0000000 --- a/AddonBuilder/Utility/ConsoleUtil.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; - -namespace AddonBuilder.Utility -{ - /// - /// Utility class that facilitates the execution of various console based tasks. - /// - public static class ConsoleUtil - { - /// - /// Helper method that displays a given message in the console in red indicating an error. - /// - /// The message to display in the console - public static void ShowConsoleErrorMsg(string message) - { - Console.Clear(); - ConsoleColor previousConsoleColor = Console.ForegroundColor; - Console.ForegroundColor = ConsoleColor.Red; - Console.WriteLine($"{message}"); - Console.ForegroundColor = previousConsoleColor; - Console.WriteLine("\nPress any key to continue."); - Console.ReadKey(); - } - } -} diff --git a/AddonBuilder/Utility/HashUtil.cs b/AddonBuilder/Utility/HashUtil.cs deleted file mode 100644 index 0289b46..0000000 --- a/AddonBuilder/Utility/HashUtil.cs +++ /dev/null @@ -1,109 +0,0 @@ -using System; -using System.Security.Cryptography; -using System.IO; - -namespace AddonBuilder.Utility -{ - public static class HashUtil - { - /// - /// Recursively computes a hash of the specified directory. - /// - /// - /// The name of the hash algorithm. - /// - /// - /// The directory to hash. - /// - /// - /// A hash of the specified directory and all of its subdirectories and files. - /// - /// - /// The hash is based on the names of all subdirectories and files, - /// and the contents of all files. It treats names as case sensitive. - /// It ignores the order of directory entries. - /// The way this method computes the hash from these things is not - /// specified in any standard, so the resulting hash will probably - /// not match hashes computed by any other program. - /// - public static string HashDirectory(string algorithmName, DirectoryInfo directoryInfo) - { - using (var hashAlgorithm = HashAlgorithm.Create(algorithmName)) - { - // CryptoStream and BinaryWriter seem the easiest way - // to hash strings together with other data. - using (var cryptoStream = new CryptoStream(Stream.Null, hashAlgorithm, CryptoStreamMode.Write)) - using (var binaryWriter = new BinaryWriter(cryptoStream)) - { - // Get the names of files and subdirectories at this level. - // Don't bother with EnumerateFileSystemInfos because we - // need all the names so that we can sort them. - FileSystemInfo[] infos = directoryInfo.GetFileSystemInfos(); - - // Because the order in which the file system returns - // directory entries is unspecified, it should not affect - // the hash. Sort the entries by name, to ensure this. - // It might be nicer to treat the file names as case - // insensitive, but StringComparison.OrdinalIgnoreCase is - // not guaranteed to exactly match the case tables used - // by the file system, so let's not even try. - Array.Sort(infos, (a, b) => string.Compare(a.Name, b.Name, StringComparison.Ordinal)); - - // The following loop could be split in two parts: - // first compute a hash of each subdirectory and file, - // and then write all the hashes to cryptoStream. - // That way, the first part could be run in parallel. - // However, most of the time will probably be spent - // waiting for disk I/O, and parallelism is unlikely - // to help with that; it might just slow things down. - foreach (FileSystemInfo info in infos) - { - // Hash the name of the file or subdirectory. - // BinaryWriter.Write(string) includes a length prefix. - // Alternatively, we could write the characters and - // a null character. - binaryWriter.Write(info.Name); - - if ((info.Attributes & FileAttributes.Directory) == 0) - { - // Write a flag that indicates this is a file, - // not a directory. - binaryWriter.Write((byte)'F'); - - // Instead of writing the contents of the file - // directly to cryptoStream, hash it and write - // only the hash. This way, we don't have to - // hash the length of the file separately and - // worry that the length might change while - // we're reading. - binaryWriter.Write(HashFile(algorithmName, (FileInfo)info)); - } - else - { - // Write a flag that indicates this is a directory, - // not a file. - binaryWriter.Write((byte)'D'); - - // Recursively hash the subdirectory. - binaryWriter.Write(HashDirectory(algorithmName, (DirectoryInfo)info)); - } - } - } - - // CryptoStream.Dispose has called - // HashAlgorithm.TransformFinalBlock for us. - - return BitConverter.ToString(hashAlgorithm.Hash).Replace("-", String.Empty); - } - } - - private static byte[] HashFile(string algorithmName, FileInfo fileInfo) - { - using (var hashAlgorithm = HashAlgorithm.Create(algorithmName)) - using (var inputStream = fileInfo.OpenRead()) - { - return hashAlgorithm.ComputeHash(inputStream); - } - } - } -} \ No newline at end of file diff --git a/AddonBuilder/packages.config b/AddonBuilder/packages.config deleted file mode 100644 index c79f575..0000000 --- a/AddonBuilder/packages.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/AddonBuilder.sln b/Hephaestus.sln similarity index 85% rename from AddonBuilder.sln rename to Hephaestus.sln index ea27519..bfca1a1 100644 --- a/AddonBuilder.sln +++ b/Hephaestus.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26430.16 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddonBuilder", "AddonBuilder\AddonBuilder.csproj", "{9116D28C-8A32-4DBB-B773-EB4D2ADB3B4F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hephaestus", "AddonBuilder\Hephaestus.csproj", "{9116D28C-8A32-4DBB-B773-EB4D2ADB3B4F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution From 37b80b86728b8f74474d459ffd9acfb42a64daa4 Mon Sep 17 00:00:00 2001 From: CreepPork Date: Thu, 27 Sep 2018 23:12:11 +0300 Subject: [PATCH 02/58] Added Hephaestus Configurator backbone --- Hephaestus.sln | 6 + HephaestusConfigurator/App.config | 6 + .../HephaestusConfigurator.csproj | 112 ++++++++++++++++ HephaestusConfigurator/Main.Designer.cs | 47 +++++++ HephaestusConfigurator/Main.cs | 20 +++ HephaestusConfigurator/Main.resx | 120 ++++++++++++++++++ HephaestusConfigurator/Program.cs | 22 ++++ .../Properties/AssemblyInfo.cs | 36 ++++++ .../Properties/Resources.Designer.cs | 63 +++++++++ .../Properties/Resources.resx | 117 +++++++++++++++++ .../Properties/Settings.Designer.cs | 26 ++++ .../Properties/Settings.settings | 7 + 12 files changed, 582 insertions(+) create mode 100644 HephaestusConfigurator/App.config create mode 100644 HephaestusConfigurator/HephaestusConfigurator.csproj create mode 100644 HephaestusConfigurator/Main.Designer.cs create mode 100644 HephaestusConfigurator/Main.cs create mode 100644 HephaestusConfigurator/Main.resx create mode 100644 HephaestusConfigurator/Program.cs create mode 100644 HephaestusConfigurator/Properties/AssemblyInfo.cs create mode 100644 HephaestusConfigurator/Properties/Resources.Designer.cs create mode 100644 HephaestusConfigurator/Properties/Resources.resx create mode 100644 HephaestusConfigurator/Properties/Settings.Designer.cs create mode 100644 HephaestusConfigurator/Properties/Settings.settings diff --git a/Hephaestus.sln b/Hephaestus.sln index bfca1a1..7aed6a9 100644 --- a/Hephaestus.sln +++ b/Hephaestus.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 15.0.26430.16 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hephaestus", "AddonBuilder\Hephaestus.csproj", "{9116D28C-8A32-4DBB-B773-EB4D2ADB3B4F}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HephaestusConfigurator", "HephaestusConfigurator\HephaestusConfigurator.csproj", "{25452612-5037-4477-81C5-A350CCF29813}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {9116D28C-8A32-4DBB-B773-EB4D2ADB3B4F}.Debug|Any CPU.Build.0 = Debug|Any CPU {9116D28C-8A32-4DBB-B773-EB4D2ADB3B4F}.Release|Any CPU.ActiveCfg = Release|Any CPU {9116D28C-8A32-4DBB-B773-EB4D2ADB3B4F}.Release|Any CPU.Build.0 = Release|Any CPU + {25452612-5037-4477-81C5-A350CCF29813}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {25452612-5037-4477-81C5-A350CCF29813}.Debug|Any CPU.Build.0 = Debug|Any CPU + {25452612-5037-4477-81C5-A350CCF29813}.Release|Any CPU.ActiveCfg = Release|Any CPU + {25452612-5037-4477-81C5-A350CCF29813}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/HephaestusConfigurator/App.config b/HephaestusConfigurator/App.config new file mode 100644 index 0000000..bae5d6d --- /dev/null +++ b/HephaestusConfigurator/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/HephaestusConfigurator/HephaestusConfigurator.csproj b/HephaestusConfigurator/HephaestusConfigurator.csproj new file mode 100644 index 0000000..5446b4c --- /dev/null +++ b/HephaestusConfigurator/HephaestusConfigurator.csproj @@ -0,0 +1,112 @@ + + + + + Debug + AnyCPU + {25452612-5037-4477-81C5-A350CCF29813} + WinExe + HephaestusConfigurator + HephaestusConfigurator + v4.6.1 + 512 + true + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + AnyCPU + true + full + true + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Main.cs + + + + + Main.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + False + Microsoft .NET Framework 4.6.1 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + \ No newline at end of file diff --git a/HephaestusConfigurator/Main.Designer.cs b/HephaestusConfigurator/Main.Designer.cs new file mode 100644 index 0000000..45f55fb --- /dev/null +++ b/HephaestusConfigurator/Main.Designer.cs @@ -0,0 +1,47 @@ +namespace HephaestusConfigurator +{ + partial class Main + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // Main + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(282, 253); + this.Name = "Main"; + this.Text = "Hephaestus Configurator"; + this.ResumeLayout(false); + + } + + #endregion + } +} + diff --git a/HephaestusConfigurator/Main.cs b/HephaestusConfigurator/Main.cs new file mode 100644 index 0000000..d9a6c6c --- /dev/null +++ b/HephaestusConfigurator/Main.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace HephaestusConfigurator +{ + public partial class Main : Form + { + public Main() + { + InitializeComponent(); + } + } +} diff --git a/HephaestusConfigurator/Main.resx b/HephaestusConfigurator/Main.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/HephaestusConfigurator/Main.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/HephaestusConfigurator/Program.cs b/HephaestusConfigurator/Program.cs new file mode 100644 index 0000000..3e2a898 --- /dev/null +++ b/HephaestusConfigurator/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace HephaestusConfigurator +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Main()); + } + } +} diff --git a/HephaestusConfigurator/Properties/AssemblyInfo.cs b/HephaestusConfigurator/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..285c97a --- /dev/null +++ b/HephaestusConfigurator/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("HephaestusConfigurator")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("HephaestusConfigurator")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("25452612-5037-4477-81c5-a350ccf29813")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/HephaestusConfigurator/Properties/Resources.Designer.cs b/HephaestusConfigurator/Properties/Resources.Designer.cs new file mode 100644 index 0000000..580b02d --- /dev/null +++ b/HephaestusConfigurator/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace HephaestusConfigurator.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HephaestusConfigurator.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/HephaestusConfigurator/Properties/Resources.resx b/HephaestusConfigurator/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/HephaestusConfigurator/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/HephaestusConfigurator/Properties/Settings.Designer.cs b/HephaestusConfigurator/Properties/Settings.Designer.cs new file mode 100644 index 0000000..a88c31b --- /dev/null +++ b/HephaestusConfigurator/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace HephaestusConfigurator.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.1.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/HephaestusConfigurator/Properties/Settings.settings b/HephaestusConfigurator/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/HephaestusConfigurator/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + From ed94709cd7cc73e63cf573800d6790b2e8ecfd35 Mon Sep 17 00:00:00 2001 From: CreepPork Date: Fri, 28 Sep 2018 18:21:31 +0300 Subject: [PATCH 03/58] Development I can't be bothered to split the commits into proper ones --- AddonBuilder/Classes/Settings.cs | 43 +++++++ AddonBuilder/Hephaestus.csproj | 7 +- AddonBuilder/Program.cs | 37 +++++- AddonBuilder/packages.config | 4 + Hephaestus.sln | 10 +- HephaestusConfigurator/App.config | 6 +- HephaestusConfigurator/App.xaml | 18 +++ HephaestusConfigurator/App.xaml.cs | 17 +++ .../HephaestusConfigurator.csproj | 109 ++++++++-------- HephaestusConfigurator/Main.Designer.cs | 47 ------- HephaestusConfigurator/Main.cs | 20 --- HephaestusConfigurator/Main.resx | 120 ------------------ HephaestusConfigurator/MainWindow.xaml | 7 + HephaestusConfigurator/MainWindow.xaml.cs | 29 +++++ HephaestusConfigurator/Program.cs | 22 ---- .../Properties/AssemblyInfo.cs | 23 +++- .../Properties/Resources.Designer.cs | 42 +++--- .../Properties/Settings.Designer.cs | 22 ++-- .../Properties/Settings.settings | 4 +- HephaestusConfigurator/packages.config | 5 + 20 files changed, 286 insertions(+), 306 deletions(-) create mode 100644 AddonBuilder/Classes/Settings.cs create mode 100644 AddonBuilder/packages.config create mode 100644 HephaestusConfigurator/App.xaml create mode 100644 HephaestusConfigurator/App.xaml.cs delete mode 100644 HephaestusConfigurator/Main.Designer.cs delete mode 100644 HephaestusConfigurator/Main.cs delete mode 100644 HephaestusConfigurator/Main.resx create mode 100644 HephaestusConfigurator/MainWindow.xaml create mode 100644 HephaestusConfigurator/MainWindow.xaml.cs delete mode 100644 HephaestusConfigurator/Program.cs create mode 100644 HephaestusConfigurator/packages.config diff --git a/AddonBuilder/Classes/Settings.cs b/AddonBuilder/Classes/Settings.cs new file mode 100644 index 0000000..c837838 --- /dev/null +++ b/AddonBuilder/Classes/Settings.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Hephaestus.Classes +{ + public class Settings + { + public class Directories + { + public string SourceDirectory { get; set; } + public string TargetDirectory { get; set; } + + public string AddonBuilderDirectory { get; set; } + } + + public string ProjectPrefix { get; set; } + + public class Signing + { + public string PrivateKeyDirectory { get; set; } + public string PrivateKeyPrefix { get; set; } + public string PrivateKeyDefaultVersion { get; set; } + } + + public class GameInformation + { + public string GameFolder { get; set; } + public string GameExecutable { get; set; } + public string GameExecutableArguments { get; set; } + + public bool ShutdownGameBeforeBuilding { get; set; } + public bool StartGameAfterBuilding { get; set; } + } + + public class Checksums + { + // + } + } +} diff --git a/AddonBuilder/Hephaestus.csproj b/AddonBuilder/Hephaestus.csproj index 2382a9a..97add25 100644 --- a/AddonBuilder/Hephaestus.csproj +++ b/AddonBuilder/Hephaestus.csproj @@ -34,7 +34,7 @@ AnyCPU true full - true + false bin\Debug\ DEBUG;TRACE prompt @@ -58,6 +58,9 @@ false + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + @@ -71,11 +74,13 @@ + + diff --git a/AddonBuilder/Program.cs b/AddonBuilder/Program.cs index 94c53bd..0cfde04 100644 --- a/AddonBuilder/Program.cs +++ b/AddonBuilder/Program.cs @@ -1,9 +1,44 @@ using System; +using Newtonsoft.Json; namespace Hephaestus { public class Program { - + public static void Main() + { + HandleJson(); + + Console.WriteLine("Press any key to exit..."); + Console.ReadKey(); + } + + public static void HandleJson() + { + ReadJson(); + } + + public static void ReadJson() + { + + } + + // Read the JSON + + // If default then open Hephaestus Configurator + + // Check if all entries in JSON are true + + // Get all the PBOs + + // Check if they were previously built + + // Close Arma 3 (if set so) + + // Build changed PBOs + + // Launch Arma 3 + + // Exit } } diff --git a/AddonBuilder/packages.config b/AddonBuilder/packages.config new file mode 100644 index 0000000..5762754 --- /dev/null +++ b/AddonBuilder/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Hephaestus.sln b/Hephaestus.sln index 7aed6a9..dbb0ab5 100644 --- a/Hephaestus.sln +++ b/Hephaestus.sln @@ -5,7 +5,7 @@ VisualStudioVersion = 15.0.26430.16 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hephaestus", "AddonBuilder\Hephaestus.csproj", "{9116D28C-8A32-4DBB-B773-EB4D2ADB3B4F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HephaestusConfigurator", "HephaestusConfigurator\HephaestusConfigurator.csproj", "{25452612-5037-4477-81C5-A350CCF29813}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HephaestusConfigurator", "HephaestusConfigurator\HephaestusConfigurator.csproj", "{6F63C674-A4AC-4F8A-B9C9-6CD64A3B0218}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -17,10 +17,10 @@ Global {9116D28C-8A32-4DBB-B773-EB4D2ADB3B4F}.Debug|Any CPU.Build.0 = Debug|Any CPU {9116D28C-8A32-4DBB-B773-EB4D2ADB3B4F}.Release|Any CPU.ActiveCfg = Release|Any CPU {9116D28C-8A32-4DBB-B773-EB4D2ADB3B4F}.Release|Any CPU.Build.0 = Release|Any CPU - {25452612-5037-4477-81C5-A350CCF29813}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {25452612-5037-4477-81C5-A350CCF29813}.Debug|Any CPU.Build.0 = Debug|Any CPU - {25452612-5037-4477-81C5-A350CCF29813}.Release|Any CPU.ActiveCfg = Release|Any CPU - {25452612-5037-4477-81C5-A350CCF29813}.Release|Any CPU.Build.0 = Release|Any CPU + {6F63C674-A4AC-4F8A-B9C9-6CD64A3B0218}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F63C674-A4AC-4F8A-B9C9-6CD64A3B0218}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F63C674-A4AC-4F8A-B9C9-6CD64A3B0218}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F63C674-A4AC-4F8A-B9C9-6CD64A3B0218}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/HephaestusConfigurator/App.config b/HephaestusConfigurator/App.config index bae5d6d..88fa402 100644 --- a/HephaestusConfigurator/App.config +++ b/HephaestusConfigurator/App.config @@ -1,6 +1,6 @@ - + - + - + \ No newline at end of file diff --git a/HephaestusConfigurator/App.xaml b/HephaestusConfigurator/App.xaml new file mode 100644 index 0000000..77f5955 --- /dev/null +++ b/HephaestusConfigurator/App.xaml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/HephaestusConfigurator/App.xaml.cs b/HephaestusConfigurator/App.xaml.cs new file mode 100644 index 0000000..de1fb2f --- /dev/null +++ b/HephaestusConfigurator/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace HephaestusConfigurator +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/HephaestusConfigurator/HephaestusConfigurator.csproj b/HephaestusConfigurator/HephaestusConfigurator.csproj index 5446b4c..1523e43 100644 --- a/HephaestusConfigurator/HephaestusConfigurator.csproj +++ b/HephaestusConfigurator/HephaestusConfigurator.csproj @@ -4,40 +4,25 @@ Debug AnyCPU - {25452612-5037-4477-81C5-A350CCF29813} + {6F63C674-A4AC-4F8A-B9C9-6CD64A3B0218} WinExe HephaestusConfigurator HephaestusConfigurator - v4.6.1 + v4.5.2 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 true - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true AnyCPU true full - true + false bin\Debug\ DEBUG;TRACE prompt 4 - false AnyCPU @@ -49,64 +34,74 @@ 4 + + ..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll + + + ..\packages\MahApps.Metro.1.6.5\lib\net45\MahApps.Metro.dll + + + + ..\packages\ControlzEx.3.0.2.4\lib\net45\System.Windows.Interactivity.dll + + + - - - - - - + + 4.0 + + + + - - Form + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code - - Main.cs + + MainWindow.xaml + Code + + + + + Code - - - - Main.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - True - Resources.resx True + Resources.resx - - SettingsSingleFileGenerator - Settings.Designer.cs - True Settings.settings True + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + - - - False - Microsoft .NET Framework 4.6.1 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - \ No newline at end of file diff --git a/HephaestusConfigurator/Main.Designer.cs b/HephaestusConfigurator/Main.Designer.cs deleted file mode 100644 index 45f55fb..0000000 --- a/HephaestusConfigurator/Main.Designer.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace HephaestusConfigurator -{ - partial class Main - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.SuspendLayout(); - // - // Main - // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(282, 253); - this.Name = "Main"; - this.Text = "Hephaestus Configurator"; - this.ResumeLayout(false); - - } - - #endregion - } -} - diff --git a/HephaestusConfigurator/Main.cs b/HephaestusConfigurator/Main.cs deleted file mode 100644 index d9a6c6c..0000000 --- a/HephaestusConfigurator/Main.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace HephaestusConfigurator -{ - public partial class Main : Form - { - public Main() - { - InitializeComponent(); - } - } -} diff --git a/HephaestusConfigurator/Main.resx b/HephaestusConfigurator/Main.resx deleted file mode 100644 index 1af7de1..0000000 --- a/HephaestusConfigurator/Main.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/HephaestusConfigurator/MainWindow.xaml b/HephaestusConfigurator/MainWindow.xaml new file mode 100644 index 0000000..284ef72 --- /dev/null +++ b/HephaestusConfigurator/MainWindow.xaml @@ -0,0 +1,7 @@ + + + diff --git a/HephaestusConfigurator/MainWindow.xaml.cs b/HephaestusConfigurator/MainWindow.xaml.cs new file mode 100644 index 0000000..ad3b7e6 --- /dev/null +++ b/HephaestusConfigurator/MainWindow.xaml.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using MahApps.Metro.Controls; + +namespace HephaestusConfigurator +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow + { + public MainWindow() + { + InitializeComponent(); + } + } +} diff --git a/HephaestusConfigurator/Program.cs b/HephaestusConfigurator/Program.cs deleted file mode 100644 index 3e2a898..0000000 --- a/HephaestusConfigurator/Program.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace HephaestusConfigurator -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new Main()); - } - } -} diff --git a/HephaestusConfigurator/Properties/AssemblyInfo.cs b/HephaestusConfigurator/Properties/AssemblyInfo.cs index 285c97a..0f4bc5b 100644 --- a/HephaestusConfigurator/Properties/AssemblyInfo.cs +++ b/HephaestusConfigurator/Properties/AssemblyInfo.cs @@ -1,6 +1,8 @@ using System.Reflection; +using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +using System.Windows; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information @@ -19,8 +21,25 @@ // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("25452612-5037-4477-81c5-a350ccf29813")] +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + // Version information for an assembly consists of the following four values: // diff --git a/HephaestusConfigurator/Properties/Resources.Designer.cs b/HephaestusConfigurator/Properties/Resources.Designer.cs index 580b02d..b9779d7 100644 --- a/HephaestusConfigurator/Properties/Resources.Designer.cs +++ b/HephaestusConfigurator/Properties/Resources.Designer.cs @@ -8,10 +8,10 @@ // //------------------------------------------------------------------------------ -namespace HephaestusConfigurator.Properties { - using System; - - +namespace HephaestusConfigurator.Properties +{ + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -22,40 +22,48 @@ namespace HephaestusConfigurator.Properties { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - + internal class Resources + { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { + internal Resources() + { } - + /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HephaestusConfigurator.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { + internal static global::System.Globalization.CultureInfo Culture + { + get + { return resourceCulture; } - set { + set + { resourceCulture = value; } } diff --git a/HephaestusConfigurator/Properties/Settings.Designer.cs b/HephaestusConfigurator/Properties/Settings.Designer.cs index a88c31b..f56695c 100644 --- a/HephaestusConfigurator/Properties/Settings.Designer.cs +++ b/HephaestusConfigurator/Properties/Settings.Designer.cs @@ -8,17 +8,21 @@ // //------------------------------------------------------------------------------ -namespace HephaestusConfigurator.Properties { - - +namespace HephaestusConfigurator.Properties +{ + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.1.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { + + public static Settings Default + { + get + { return defaultInstance; } } diff --git a/HephaestusConfigurator/Properties/Settings.settings b/HephaestusConfigurator/Properties/Settings.settings index 3964565..033d7a5 100644 --- a/HephaestusConfigurator/Properties/Settings.settings +++ b/HephaestusConfigurator/Properties/Settings.settings @@ -1,7 +1,7 @@  - + - + \ No newline at end of file diff --git a/HephaestusConfigurator/packages.config b/HephaestusConfigurator/packages.config new file mode 100644 index 0000000..c444da8 --- /dev/null +++ b/HephaestusConfigurator/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file From ae06358a0725eb89d18cd7249737729480fc9ba5 Mon Sep 17 00:00:00 2001 From: Ralfs Date: Fri, 5 Oct 2018 22:19:32 +0300 Subject: [PATCH 04/58] Some more development --- AddonBuilder/Classes/Settings.cs | 43 ------- AddonBuilder/Hephaestus.csproj | 5 +- Hephaestus.sln | 9 ++ HephaestusCommon/Classes/Settings.cs | 28 +++++ HephaestusCommon/HephaestusCommon.csproj | 47 ++++++++ HephaestusCommon/Properties/AssemblyInfo.cs | 36 ++++++ .../HephaestusConfigurator.csproj | 25 +++++ HephaestusConfigurator/MainWindow.xaml | 106 +++++++++++++++++- HephaestusConfigurator/MainWindow.xaml.cs | 96 ++++++++++++++-- .../Resources/AchillesLogo.ico | Bin 0 -> 47770 bytes HephaestusConfigurator/Utilities/Dialogs.cs | 48 ++++++++ HephaestusConfigurator/packages.config | 1 + 12 files changed, 385 insertions(+), 59 deletions(-) delete mode 100644 AddonBuilder/Classes/Settings.cs create mode 100644 HephaestusCommon/Classes/Settings.cs create mode 100644 HephaestusCommon/HephaestusCommon.csproj create mode 100644 HephaestusCommon/Properties/AssemblyInfo.cs create mode 100644 HephaestusConfigurator/Resources/AchillesLogo.ico create mode 100644 HephaestusConfigurator/Utilities/Dialogs.cs diff --git a/AddonBuilder/Classes/Settings.cs b/AddonBuilder/Classes/Settings.cs deleted file mode 100644 index c837838..0000000 --- a/AddonBuilder/Classes/Settings.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Hephaestus.Classes -{ - public class Settings - { - public class Directories - { - public string SourceDirectory { get; set; } - public string TargetDirectory { get; set; } - - public string AddonBuilderDirectory { get; set; } - } - - public string ProjectPrefix { get; set; } - - public class Signing - { - public string PrivateKeyDirectory { get; set; } - public string PrivateKeyPrefix { get; set; } - public string PrivateKeyDefaultVersion { get; set; } - } - - public class GameInformation - { - public string GameFolder { get; set; } - public string GameExecutable { get; set; } - public string GameExecutableArguments { get; set; } - - public bool ShutdownGameBeforeBuilding { get; set; } - public bool StartGameAfterBuilding { get; set; } - } - - public class Checksums - { - // - } - } -} diff --git a/AddonBuilder/Hephaestus.csproj b/AddonBuilder/Hephaestus.csproj index 97add25..c2a63cc 100644 --- a/AddonBuilder/Hephaestus.csproj +++ b/AddonBuilder/Hephaestus.csproj @@ -74,7 +74,6 @@ - @@ -94,7 +93,9 @@ false - + + + diff --git a/Hephaestus.sln b/Hephaestus.sln index dbb0ab5..c7c896f 100644 --- a/Hephaestus.sln +++ b/Hephaestus.sln @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hephaestus", "AddonBuilder\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HephaestusConfigurator", "HephaestusConfigurator\HephaestusConfigurator.csproj", "{6F63C674-A4AC-4F8A-B9C9-6CD64A3B0218}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HephaestusCommon", "HephaestusCommon\HephaestusCommon.csproj", "{FFCFE2DB-A143-4914-BD83-77059294EECE}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,8 +23,15 @@ Global {6F63C674-A4AC-4F8A-B9C9-6CD64A3B0218}.Debug|Any CPU.Build.0 = Debug|Any CPU {6F63C674-A4AC-4F8A-B9C9-6CD64A3B0218}.Release|Any CPU.ActiveCfg = Release|Any CPU {6F63C674-A4AC-4F8A-B9C9-6CD64A3B0218}.Release|Any CPU.Build.0 = Release|Any CPU + {FFCFE2DB-A143-4914-BD83-77059294EECE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FFCFE2DB-A143-4914-BD83-77059294EECE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FFCFE2DB-A143-4914-BD83-77059294EECE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FFCFE2DB-A143-4914-BD83-77059294EECE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9C28540A-3EB6-4700-AC49-8DB634D337AA} + EndGlobalSection EndGlobal diff --git a/HephaestusCommon/Classes/Settings.cs b/HephaestusCommon/Classes/Settings.cs new file mode 100644 index 0000000..96c8d38 --- /dev/null +++ b/HephaestusCommon/Classes/Settings.cs @@ -0,0 +1,28 @@ +using System.Collections.Generic; + +namespace HephaestusCommon.Classes +{ + public class Settings + { + public class Project + { + public string SourceDirectory { get; set; } + public string TargetDirectory { get; set; } + + public string AddonBuilderFile { get; set; } + + public string ProjectPrefix { get; set; } + + public string PrivateKeyFile { get; set; } + + public string GameExecutable { get; set; } + public string GameExecutableArguments { get; set; } + + public bool ShutdownGameBeforeBuilding { get; set; } + public bool StartGameAfterBuilding { get; set; } + + // Folder name, checksum + Dictionary Checksums { get; set; } + } + } +} diff --git a/HephaestusCommon/HephaestusCommon.csproj b/HephaestusCommon/HephaestusCommon.csproj new file mode 100644 index 0000000..dfc2f74 --- /dev/null +++ b/HephaestusCommon/HephaestusCommon.csproj @@ -0,0 +1,47 @@ + + + + + Debug + AnyCPU + {FFCFE2DB-A143-4914-BD83-77059294EECE} + Library + Properties + HephaestusCommon + HephaestusCommon + v4.6.2 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/HephaestusCommon/Properties/AssemblyInfo.cs b/HephaestusCommon/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..2eb26b6 --- /dev/null +++ b/HephaestusCommon/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("HephaestusCommon")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("HephaestusCommon")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ffcfe2db-a143-4914-bd83-77059294eece")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/HephaestusConfigurator/HephaestusConfigurator.csproj b/HephaestusConfigurator/HephaestusConfigurator.csproj index 1523e43..e719cbe 100644 --- a/HephaestusConfigurator/HephaestusConfigurator.csproj +++ b/HephaestusConfigurator/HephaestusConfigurator.csproj @@ -33,13 +33,34 @@ prompt 4 + + Resources\AchillesLogo.ico + ..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll + + ..\HephaestusCommon\bin\Debug\HephaestusCommon.dll + ..\packages\MahApps.Metro.1.6.5\lib\net45\MahApps.Metro.dll + + ..\packages\WindowsAPICodePack.1.1.0\lib\Microsoft.WindowsAPICodePack.dll + + + ..\packages\WindowsAPICodePack.1.1.0\lib\Microsoft.WindowsAPICodePack.ExtendedLinguisticServices.dll + + + ..\packages\WindowsAPICodePack.1.1.0\lib\Microsoft.WindowsAPICodePack.Sensors.dll + + + ..\packages\WindowsAPICodePack.1.1.0\lib\Microsoft.WindowsAPICodePack.Shell.dll + + + ..\packages\WindowsAPICodePack.1.1.0\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll + @@ -63,6 +84,7 @@ MSBuild:Compile Designer + MSBuild:Compile Designer @@ -103,5 +125,8 @@ + + + \ No newline at end of file diff --git a/HephaestusConfigurator/MainWindow.xaml b/HephaestusConfigurator/MainWindow.xaml index 284ef72..d8a8da6 100644 --- a/HephaestusConfigurator/MainWindow.xaml +++ b/HephaestusConfigurator/MainWindow.xaml @@ -2,6 +2,108 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" - Title="Hephaestus Configurator" Height="300" Width="400"> - + WindowTitleBrush="#561D25" + NonActiveWindowTitleBrush="#561D25" + BorderBrush="#561D25" + NonActiveBorderBrush="#561D25" + Title="Hephaestus Configurator" Height="450" Width="650"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +