mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix Native Game compiler installs
This commit is contained in:
parent
b94e55c78b
commit
931733c49d
@ -3,6 +3,7 @@
|
|||||||
#### Version - 3.0.1.6 - 9/??/2022
|
#### Version - 3.0.1.6 - 9/??/2022
|
||||||
* Fix Cyberpunk 2077 GoG recognition
|
* Fix Cyberpunk 2077 GoG recognition
|
||||||
* Add a CLI command `list-games` to list all games recognized by WJ and their versions/locations
|
* Add a CLI command `list-games` to list all games recognized by WJ and their versions/locations
|
||||||
|
* Fix Native Game compiler installs
|
||||||
|
|
||||||
#### Version - 3.0.1.5 - 9/26/2022
|
#### Version - 3.0.1.5 - 9/26/2022
|
||||||
* Fix MO2ArchiveName resolution
|
* Fix MO2ArchiveName resolution
|
||||||
|
@ -169,7 +169,11 @@ public class StandardInstaller : AInstaller<StandardInstaller>
|
|||||||
|
|
||||||
private void CreateOutputMods()
|
private void CreateOutputMods()
|
||||||
{
|
{
|
||||||
_configuration.Install.Combine("profiles")
|
// Non MO2 Installs won't have this
|
||||||
|
var profileDir = _configuration.Install.Combine("profiles");
|
||||||
|
if (!profileDir.DirectoryExists()) return;
|
||||||
|
|
||||||
|
profileDir.Combine("profiles")
|
||||||
.EnumerateFiles()
|
.EnumerateFiles()
|
||||||
.Where(f => f.FileName == Consts.SettingsIni)
|
.Where(f => f.FileName == Consts.SettingsIni)
|
||||||
.Do(f =>
|
.Do(f =>
|
||||||
@ -331,45 +335,50 @@ public class StandardInstaller : AInstaller<StandardInstaller>
|
|||||||
|
|
||||||
private void SetScreenSizeInPrefs()
|
private void SetScreenSizeInPrefs()
|
||||||
{
|
{
|
||||||
|
var profilesPath = _configuration.Install.Combine("profiles");
|
||||||
if (_configuration.SystemParameters == null)
|
if (_configuration.SystemParameters == null)
|
||||||
_logger.LogWarning("No SystemParameters set, ignoring ini settings for system parameters");
|
_logger.LogWarning("No SystemParameters set, ignoring ini settings for system parameters");
|
||||||
|
|
||||||
var config = new IniParserConfiguration {AllowDuplicateKeys = true, AllowDuplicateSections = true};
|
var config = new IniParserConfiguration {AllowDuplicateKeys = true, AllowDuplicateSections = true};
|
||||||
config.CommentRegex = new Regex(@"^(#|;)(.*)");
|
config.CommentRegex = new Regex(@"^(#|;)(.*)");
|
||||||
var oblivionPath = (RelativePath) "Oblivion.ini";
|
var oblivionPath = (RelativePath) "Oblivion.ini";
|
||||||
foreach (var file in _configuration.Install.Combine("profiles").EnumerateFiles()
|
|
||||||
.Where(f => ((string) f.FileName).EndsWith("refs.ini") || f.FileName == oblivionPath))
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var parser = new FileIniDataParser(new IniDataParser(config));
|
|
||||||
var data = parser.ReadFile(file.ToString());
|
|
||||||
var modified = false;
|
|
||||||
if (data.Sections["Display"] != null)
|
|
||||||
if (data.Sections["Display"]["iSize W"] != null && data.Sections["Display"]["iSize H"] != null)
|
|
||||||
{
|
|
||||||
data.Sections["Display"]["iSize W"] =
|
|
||||||
_configuration.SystemParameters.ScreenWidth.ToString(CultureInfo.CurrentCulture);
|
|
||||||
data.Sections["Display"]["iSize H"] =
|
|
||||||
_configuration.SystemParameters.ScreenHeight.ToString(CultureInfo.CurrentCulture);
|
|
||||||
modified = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (data.Sections["MEMORY"] != null)
|
if (profilesPath.DirectoryExists())
|
||||||
if (data.Sections["MEMORY"]["VideoMemorySizeMb"] != null)
|
{
|
||||||
{
|
foreach (var file in profilesPath.EnumerateFiles()
|
||||||
data.Sections["MEMORY"]["VideoMemorySizeMb"] =
|
.Where(f => ((string) f.FileName).EndsWith("refs.ini") || f.FileName == oblivionPath))
|
||||||
_configuration.SystemParameters.EnbLEVRAMSize.ToString(CultureInfo.CurrentCulture);
|
try
|
||||||
modified = true;
|
{
|
||||||
}
|
var parser = new FileIniDataParser(new IniDataParser(config));
|
||||||
|
var data = parser.ReadFile(file.ToString());
|
||||||
|
var modified = false;
|
||||||
|
if (data.Sections["Display"] != null)
|
||||||
|
if (data.Sections["Display"]["iSize W"] != null && data.Sections["Display"]["iSize H"] != null)
|
||||||
|
{
|
||||||
|
data.Sections["Display"]["iSize W"] =
|
||||||
|
_configuration.SystemParameters.ScreenWidth.ToString(CultureInfo.CurrentCulture);
|
||||||
|
data.Sections["Display"]["iSize H"] =
|
||||||
|
_configuration.SystemParameters.ScreenHeight.ToString(CultureInfo.CurrentCulture);
|
||||||
|
modified = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!modified) continue;
|
if (data.Sections["MEMORY"] != null)
|
||||||
parser.WriteFile(file.ToString(), data);
|
if (data.Sections["MEMORY"]["VideoMemorySizeMb"] != null)
|
||||||
_logger.LogTrace("Remapped screen size in {file}", file);
|
{
|
||||||
}
|
data.Sections["MEMORY"]["VideoMemorySizeMb"] =
|
||||||
catch (Exception ex)
|
_configuration.SystemParameters.EnbLEVRAMSize.ToString(CultureInfo.CurrentCulture);
|
||||||
{
|
modified = true;
|
||||||
_logger.LogCritical(ex, "Skipping screen size remap for {file} due to parse error.", file);
|
}
|
||||||
}
|
|
||||||
|
if (!modified) continue;
|
||||||
|
parser.WriteFile(file.ToString(), data);
|
||||||
|
_logger.LogTrace("Remapped screen size in {file}", file);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogCritical(ex, "Skipping screen size remap for {file} due to parse error.", file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var tweaksPath = (RelativePath) "SSEDisplayTweaks.ini";
|
var tweaksPath = (RelativePath) "SSEDisplayTweaks.ini";
|
||||||
foreach (var file in _configuration.Install.EnumerateFiles()
|
foreach (var file in _configuration.Install.EnumerateFiles()
|
||||||
|
Loading…
Reference in New Issue
Block a user