diff --git a/.gitignore b/.gitignore index 8da856e..579945a 100644 --- a/.gitignore +++ b/.gitignore @@ -240,3 +240,4 @@ pip-log.txt *.suo SCJMapper-V2.suo *.suo +/.vs/SCJMapper-V2/v15/Server/sqlite3 diff --git a/OGL/LoaderStatics.cs b/OGL/LoaderStatics.cs index b34b4fb..a267a63 100644 --- a/OGL/LoaderStatics.cs +++ b/OGL/LoaderStatics.cs @@ -16,9 +16,12 @@ namespace SCJMapper_V2.OGL.TextureLoaders /// The parameters in this class have only effect on the following Texture loads. public static class TextureLoaderParameters { +#if DEBUG + public static bool Verbose = true; +#else /// (Debug Aid, should be set to false) If set to false only Errors will be printed. If set to true, debug information (Warnings and Queries) will be printed in addition to Errors. public static bool Verbose = false; - +#endif /// Always-valid fallback parameter for GL.BindTexture (Default: 0). This number will be returned if loading the Texture failed. You can set this to a checkerboard texture or similar, which you have already loaded. public static uint OpenGLDefaultTexture = 0; diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 6e3b535..2da81e7 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 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("2.31.0.65")] -[assembly: AssemblyFileVersion("2.31.0.65")] +[assembly: AssemblyVersion( "2.32.0.66" )] +[assembly: AssemblyFileVersion( "2.32.0.66" )] diff --git a/SC/SCDefaultProfile.cs b/SC/SCDefaultProfile.cs index fb39278..82e149f 100644 --- a/SC/SCDefaultProfile.cs +++ b/SC/SCDefaultProfile.cs @@ -56,6 +56,19 @@ namespace SCJMapper_V2.SC } } + // second try to get the SC defaultProfile from the DataXML.pak + string patchProfile = Path.Combine( SCPath.SCClientUSERPath, defaultProfileName ); + if ( File.Exists( patchProfile ) ) { // 20171126 PTU patch location in ..\USER\defaultProfile.xml + using ( StreamReader sr = new StreamReader( patchProfile ) ) { + retVal = sr.ReadToEnd( ); + UsedDefProfile = "USER Directory defaultProfile.xml"; + log.InfoFormat( "- Use {0}", UsedDefProfile ); + + return retVal; // EXIT + } + } + + // PTU 3.0 those cannot longer work - but let them in for a while // second try to get the SC defaultProfile from the DataXML.pak retVal = ExtractDefaultBinProfile( defaultProfileName ); if ( !String.IsNullOrEmpty( retVal ) ) { diff --git a/SC/SCPath.cs b/SC/SCPath.cs index 68a5d8a..a8a1f4c 100644 --- a/SC/SCPath.cs +++ b/SC/SCPath.cs @@ -92,12 +92,13 @@ namespace SCJMapper_V2.SC { get { log.Debug( "SCLauncherFile4 - Entry" ); - String scLauncher = ( String )Registry.GetValue( @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\CIGLauncher.exe", "", null ); + String scLauncher = (String)Registry.GetValue( @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\CIGLauncher.exe", "", null ); if ( scLauncher != null ) { log.Info( "SCLauncherFile4 - Found HKCU - CIGLauncher.exe" ); if ( File.Exists( scLauncher ) ) { return scLauncher; - } else { + } + else { log.WarnFormat( "SCLauncherFile4 - file does not exist: {0}", scLauncher ); return ""; } @@ -107,8 +108,30 @@ namespace SCJMapper_V2.SC } } + /// + /// Try to locate the launcher from Alpha 3.0.0 PTU - e.g. E:\G\StarCitizen\RSI PTU Launcher + /// + static private String SCLauncherDir5 + { + get { + log.Debug( "SCLauncherDir5 - Entry" ); + String scLauncher = (String)Registry.GetValue( @"HKEY_LOCAL_MACHINE\SOFTWARE\94a6df8a-d3f9-558d-bb04-097c192530b9", "InstallLocation", null ); + if ( scLauncher != null ) { + log.Info( "SCLauncherDir5 - Found HKLM -InstallLocation" ); + if ( Directory.Exists( scLauncher ) ) { + return scLauncher; + } + else { + log.WarnFormat( "SCLauncherDir5 - directory does not exist: {0}", scLauncher ); + return ""; + } + } + log.Warn( "SCLauncherDir5 - did not found HKLM - InstallLocation" ); + return ""; + } + } + // one more would be here - // HKEY_CURRENT_USER\Software\Cloud Imperium Games\StarCitizen UninstallString e.g. E:\G\StarCitizen\uninst.exe @@ -148,7 +171,19 @@ namespace SCJMapper_V2.SC return ""; // sorry path does not exist } else { - // start the registry search - sequence 4..1 to get the newest method first + // start the registry search - sequence 5..1 to get the newest method first + + scp = SCLauncherDir5; +#if DEBUG + //*************************************** + //scp = ""; // TEST not found (COMMENT OUT FOR PRODUCTIVE BUILD) + //*************************************** +#endif + if ( !string.IsNullOrEmpty( scp ) ) { + // AC 1.1.6 path OK - this one needs no adjustments anymore but removing the filename + scp = Path.GetDirectoryName( scp ); // "E:\G\StarCitizen" + return scp; + } scp = SCLauncherFile4; #if DEBUG @@ -256,7 +291,7 @@ namespace SCJMapper_V2.SC scp = Path.Combine( scp, "StarCitizen" ); string scpX = ""; if ( appSettings.UsePTU ) { - scpX = Path.Combine( scp, "Test" ); + scpX = Path.Combine( scp, "LIVE" ); // NEW for PTU 3.0.0 if ( Directory.Exists( scpX ) ) return scpX; // else not found PTU // Issue a warning here to let the user know diff --git a/SCJMapper-V2.csproj b/SCJMapper-V2.csproj index 00b1060..fbb7fa8 100644 --- a/SCJMapper-V2.csproj +++ b/SCJMapper-V2.csproj @@ -26,8 +26,8 @@ false false true - 65 - 2.31.0.%2a + 66 + 2.32.0.%2a false true diff --git a/defaultProfile.xml b/defaultProfile.xml index 604fa3e..df9eb0d 100644 --- a/defaultProfile.xml +++ b/defaultProfile.xml @@ -337,18 +337,28 @@ - + + + + + + + + - - + + + + + @@ -448,10 +458,11 @@ - - - - + + + + + @@ -504,8 +515,8 @@ - - + + @@ -557,7 +568,9 @@ + + @@ -634,6 +647,13 @@ + + + + + + + @@ -641,39 +661,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -752,8 +746,8 @@ - + @@ -838,6 +832,20 @@ + + + + + + + + + + + + + + @@ -859,18 +867,6 @@ - - - - - - - - - - - - @@ -894,6 +890,14 @@ + + + + + + + + @@ -1072,8 +1076,9 @@ - - + + + @@ -1159,27 +1164,19 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + +