convert info.ini

This commit is contained in:
Bitl 2024-01-25 22:21:13 -07:00
parent d46752b3ae
commit 79b4918f27
7 changed files with 37 additions and 18 deletions

View File

@ -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)

View File

@ -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");
}
}

View File

@ -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";

View File

@ -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.

View File

@ -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

View File

@ -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"
}
}