diff --git a/Novetus/NovetusCore/NETEnhancements/NETExtensions.cs b/Novetus/NovetusCore/NETEnhancements/NETExtensions.cs index a29ae8f..cdce0e2 100644 --- a/Novetus/NovetusCore/NETEnhancements/NETExtensions.cs +++ b/Novetus/NovetusCore/NETEnhancements/NETExtensions.cs @@ -22,6 +22,7 @@ namespace Novetus.Core //https://www.dotnetperls.com/between-before-after //https://stackoverflow.com/questions/12422619/can-i-disable-the-close-button-of-a-form-using-c //https://stackoverflow.com/questions/9031537/really-simple-encryption-with-c-sharp-and-symmetricalgorithm + //https://stackoverflow.com/questions/101265/why-is-there-no-foreach-extension-method-on-ienumerable #region Rich Text Box Extensions public static void AppendText(this RichTextBox box, string text, Color color) diff --git a/Novetus/NovetusCore/StorageAndFunctions/FileManagement.cs b/Novetus/NovetusCore/StorageAndFunctions/FileManagement.cs index f48b0fc..cb38abb 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/FileManagement.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/FileManagement.cs @@ -773,22 +773,21 @@ namespace Novetus.Core initialBootup; string verNumber = "Invalid File"; - - INIFile ini = new INIFile(infopath, false); - string section = "ProgramInfo"; + JSONFile json = new JSONFile(infopath, section, false); + //not using the GlobalVars definitions as those are empty until we fill them in. - versionbranch = ini.IniReadValue(section, "Branch", "0.0"); - defaultclient = ini.IniReadValue(section, "DefaultClient", "2009E"); - defaultmap = ini.IniReadValue(section, "DefaultMap", "Dev - Baseplate2048.rbxl"); - regclient1 = ini.IniReadValue(section, "UserAgentRegisterClient1", "2007M"); - regclient2 = ini.IniReadValue(section, "UserAgentRegisterClient2", "2009L"); - extendedversionnumber = ini.IniReadValue(section, "ExtendedVersionNumber", "False"); - extendedversiontemplate = ini.IniReadValue(section, "ExtendedVersionTemplate", "%version%"); - extendedversionrevision = ini.IniReadValue(section, "ExtendedVersionRevision", "-1"); - isSnapshot = ini.IniReadValue(section, "IsSnapshot", "False"); - initialBootup = ini.IniReadValue(section, "InitialBootup", "True"); + versionbranch = json.JsonReadValue(section, "Branch", "0.0"); + defaultclient = json.JsonReadValue(section, "DefaultClient", "2009E"); + defaultmap = json.JsonReadValue(section, "DefaultMap", "Dev - Baseplate2048.rbxl"); + regclient1 = json.JsonReadValue(section, "UserAgentRegisterClient1", "2007M"); + regclient2 = json.JsonReadValue(section, "UserAgentRegisterClient2", "2009L"); + extendedversionnumber = json.JsonReadValue(section, "ExtendedVersionNumber", "False"); + extendedversiontemplate = json.JsonReadValue(section, "ExtendedVersionTemplate", "%version%"); + extendedversionrevision = json.JsonReadValue(section, "ExtendedVersionRevision", "-1"); + isSnapshot = json.JsonReadValue(section, "IsSnapshot", "False"); + initialBootup = json.JsonReadValue(section, "InitialBootup", "True"); try { @@ -855,13 +854,13 @@ namespace Novetus.Core public static void TurnOffInitialSequence() { //READ - INIFile ini = new INIFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName, false); string section = "ProgramInfo"; + JSONFile json = new JSONFile(GlobalPaths.ConfigDir + "\\" + GlobalPaths.InfoName, section, false); - string initialBootup = ini.IniReadValue(section, "InitialBootup", "True"); + string initialBootup = json.JsonReadValue(section, "InitialBootup", "True"); if (ConvertSafe.ToBooleanSafe(initialBootup) == true) { - ini.IniWriteValue(section, "InitialBootup", "False"); + json.JsonWriteValue(section, "InitialBootup", "False"); } } diff --git a/Novetus/NovetusCore/StorageAndFunctions/GlobalPaths.cs b/Novetus/NovetusCore/StorageAndFunctions/GlobalPaths.cs index 4ef5643..2c48490 100644 --- a/Novetus/NovetusCore/StorageAndFunctions/GlobalPaths.cs +++ b/Novetus/NovetusCore/StorageAndFunctions/GlobalPaths.cs @@ -113,7 +113,7 @@ namespace Novetus.Core #region File Names public static readonly string ConfigName = "config.json"; public static string ConfigNameCustomization = "config_customization.json"; - public static readonly string InfoName = "info.ini"; + public static readonly string InfoName = "info.json"; public static readonly string ScriptName = "CSMPFunctions"; public static readonly string ScriptGenName = "CSMPBoot"; public static readonly string ContentProviderXMLName = "ContentProviders.json"; diff --git a/changelog.txt b/changelog.txt index cb055e2..13b593d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,7 @@ +EDGE Snapshot v24.8790.39939.1 +Enhancements: +- Converted info.ini to the JSON format. +--------------------------------------------------------------------------- EDGE Snapshot v24.8790.38411.1 Enhancements: - Added a revamped Novetus Dependency Installer based off of NSIS that streamlines the installation of Novetus' dependencies. diff --git a/scripts/launcher/info.ini b/old/info.ini similarity index 100% rename from scripts/launcher/info.ini rename to old/info.ini diff --git a/scripts/batch/github_sync.bat b/scripts/batch/github_sync.bat index ebfe81a..a7d167e 100644 --- a/scripts/batch/github_sync.bat +++ b/scripts/batch/github_sync.bat @@ -113,7 +113,7 @@ XCOPY "%cd%\Novetus\config\PartColors.json" "%launcherscriptdir%" /y XCOPY "%cd%\Novetus\config\splashes.txt" "%launcherscriptdir%" /y XCOPY "%cd%\Novetus\config\splashes-special.txt" "%launcherscriptdir%" /y XCOPY "%cd%\Novetus\config\names-special.txt" "%launcherscriptdir%" /y -XCOPY "%cd%\Novetus\config\info.ini" "%launcherscriptdir%" /y +XCOPY "%cd%\Novetus\config\info.json" "%launcherscriptdir%" /y XCOPY "%cd%\Novetus\config\FileDeleteFilter.txt" "%launcherscriptdir%" /y XCOPY "%cd%\Novetus\config\term-list.txt" "%launcherscriptdir%" /y diff --git a/scripts/launcher/info.json b/scripts/launcher/info.json new file mode 100644 index 0000000..2d1ead3 --- /dev/null +++ b/scripts/launcher/info.json @@ -0,0 +1,15 @@ +{ + "ProgramInfo": { + "Branch": "2.0", + "DefaultClient": "2009E", + "DefaultMap": "Dev - Baseplate2048.rbxl.bz2", + "UserAgentRegisterClient1": "2007M", + "UserAgentRegisterClient2": "2010L", + "IsSnapshot": "True", + "ExtendedVersionNumber": "True", + "ExtendedVersionTemplate": "EDGE Snapshot v24.%build%.%revision%.%extended-revision%", + "ExtendedVersionRevision": "1", + "InitialBootup": "False", + "IsLite": "False" + } +} \ No newline at end of file