Skip to content
Permalink
Browse files

- improved App.config file compatibility

  • Loading branch information...
cozy1 committed Mar 10, 2019
1 parent 47e75b2 commit 3b4767c49cbfda5878f9eda7f4b9445ebfc6a463
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<!-- monitor this change -->
<!-- TODO: monitor this change -->
<!-- may cause Defender to quarantine the app -->
<startup useLegacyV2RuntimeActivationPolicy="true">
<!-- force newer version of .NET Framework to be backward compatible -->
@@ -10,4 +10,8 @@
<!-- solution to MS error 'caused the assembly to be sandboxed' -->
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration>
<!-- establish runtime status of App.config using ConfigurationSettings.AppSettings -->
<appSettings>
<add key="key" value="true" />
</appSettings>
</configuration>
@@ -12,6 +12,7 @@
using RocksmithToolkitLib.XmlRepository;
using System.Threading;
using RocksmithToolkitGUI.Config;
using System.Configuration;
//
// DEVNOTE: WHEN ISSUING NEW RELEASE VERION OF TOOLKIT ...
// Modify the RocksmithToolkitLib prebuild event which will update
@@ -253,10 +254,23 @@ private void MainForm_FormClosing(object sender, FormClosingEventArgs e)

private void MainForm_Shown(object sender, EventArgs e)
{
// confirm and log App.config was properly loaded at runtime
var appConfigStatus = "<ERROR> Load Failed";
if (Convert.ToBoolean(ConfigurationSettings.AppSettings["key"]))
appConfigStatus = "Load Successful";

ConfigGlobals.Log.Info("+ App.config Status (" + appConfigStatus + ")");

// validate and log runtime display setting
ConfigGlobals.Log.Info(" - System Display DPI Setting (" + GeneralExtension.GetDisplayDpi(this) + ")");
ConfigGlobals.Log.Info(" - System Display Screen Scale Factor (" + GeneralExtension.GetDisplayScalingFactor(this) * 100 + "%)");
if (!GeneralExtension.ValidateDisplaySettings(this, this))
ConfigGlobals.Log.Info(" - Adjusted AutoScaleDimensions, AutoScaleMode, and AutoSize ...");

// don't bug the Developers when in design mode ;)
if (GeneralExtension.IsInDesignMode)
return;

bool showRevNote = ConfigRepository.Instance().GetBoolean("general_showrevnote");
if (showRevNote)
{
@@ -271,12 +285,6 @@ private void MainForm_Shown(object sender, EventArgs e)
if (!firstRun)
return;

// validate display setting
ConfigGlobals.Log.Info(" - System Display DPI Setting (" + GeneralExtension.GetDisplayDpi(this) + ")" + Environment.NewLine);
ConfigGlobals.Log.Info(" - System Display Screen Scale Factor (" + GeneralExtension.GetDisplayScalingFactor(this) * 100 + "%) " + Environment.NewLine);
if (!GeneralExtension.ValidateDisplaySettings(this, this))
ConfigGlobals.Log.Info(" - Adjusted AutoScaleDimensions, AutoScaleMode, and AutoSize ..." + Environment.NewLine);

MessageBox.Show(new Form { TopMost = true },
"Welcome to the Song Creator Toolkit for Rocksmith ..." + Environment.NewLine +
"Commonly known as, 'the toolkit'." + Environment.NewLine + Environment.NewLine +
@@ -29,5 +29,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("6b07b79c")]
[assembly: AssemblyInformationalVersion("47e75b2f")]
[assembly: AssemblyConfiguration("")]
@@ -1,5 +1,6 @@
Rocksmith Toolkit Release Notes

- improved App.config file compatibility
- added additional popup messages to Auto Updater to help users with process
- added system display setting logging and verification
- fixed VS Sandbox error that occurs when using newer version of .NET Framework
@@ -28,7 +28,6 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<ApplicationManifest>app.manifest</ApplicationManifest>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
@@ -44,6 +43,7 @@
<CodeAnalysisRuleSet>..\CodeAnalysis.ruleset</CodeAnalysisRuleSet>
<NoWarn>
</NoWarn>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
@@ -58,16 +58,17 @@
<PropertyGroup>
<ApplicationIcon>songcreator.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<NoWin32Manifest>false</NoWin32Manifest>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RocksmithToolkitMac|x86' ">
<OutputPath>bin\RocksmithToolkit\</OutputPath>
<Optimize>true</Optimize>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -348,6 +349,7 @@
<DependentUpon>ZpeConverter.cs</DependentUpon>
</EmbeddedResource>
<None Include="App.config">
<SubType>Designer</SubType>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="app.manifest">

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -40,7 +40,12 @@ public UpdateForm()

public void Init(ToolkitVersionOnline onlineVersion)
{
// DELETE OLD UPDATER APP IF EXISTS
if (onlineVersion.UpdateAvailable)
this.Text = "Toolkit update is available ...";
else
this.Text = "Toolkit is already up to date ...";

// delete old updater application
var updatingAppPath = Path.Combine(LocalToolkitDir, APP_UPDATING);
if (File.Exists(updatingAppPath))
File.Delete(updatingAppPath);
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<!-- <assemblyIdentity version="1.0.0.0" name="RocksmithToolkitGUI.app" /> -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
<!-- <assemblyIdentity version="1.0.0.0" name="RocksmithToolkitGUI.app" /> -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
@@ -14,28 +14,29 @@
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on and is
<!--<requestedExecutionLevel level="asInvoker" uiAccess="false" />-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on and is
is designed to work with. Uncomment the appropriate elements and Windows will
automatically selected the most compatible environment. -->
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
@@ -46,7 +47,7 @@
</windowsSettings>
</application>

<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<dependency>
<dependentAssembly>
<assemblyIdentity

This file was deleted.

Oops, something went wrong.
@@ -27,5 +27,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("6b07b79c")]
[assembly: AssemblyInformationalVersion("47e75b2f")]
[assembly: AssemblyConfiguration("")]
@@ -23,6 +23,7 @@
<DefineConstants>TRACE;DEBUG;CODE_ANALYSIS</DefineConstants>
<NoWarn>
</NoWarn>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<PlatformTarget>x86</PlatformTarget>
@@ -31,6 +32,7 @@
<Optimize>true</Optimize>
<DebugType>none</DebugType>
<NoWarn>0169, 0162</NoWarn>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
@@ -229,7 +231,6 @@
<Compile Include="DLCPackage\ToolkitInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="Resources\albumart.dds" />
<None Include="Resources\Console_soundbank.bnk" />
<None Include="Resources\pedals2014.json" />
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<!-- monitor this change -->
<!-- TODO: monitor this change -->
<!-- may cause Defender to quarantine the app -->
<startup useLegacyV2RuntimeActivationPolicy="true">
<!-- force newer version of .NET Framework to be backward compatible -->
@@ -10,4 +10,8 @@
<!-- solution to MS error 'caused the assembly to be sandboxed' -->
<loadFromRemoteSources enabled="true"/>
</runtime>
<!-- establish runtime status of App.config using ConfigurationSettings.AppSettings -->
<appSettings>
<add key="key" value="true" />
</appSettings>
</configuration>
@@ -270,7 +270,7 @@ public AutoUpdaterForm(string[] args)
var lockedLocalFiles = DeleteDirectory(localToolkitDir);
if (lockedLocalFiles.Any())
{
ShowCurrentOperation("<WARNING> Local toolkit directory cleanup failed ...");
ShowCurrentOperation("<WARNING> localToolkitDir cleanup failed ...");
if (!ShowLockedFilesAndContinue(lockedLocalFiles))
Environment.Exit(1);
}
@@ -329,7 +329,7 @@ public AutoUpdaterForm(string[] args)
var lockedTempFiles = DeleteDirectory(tempToolkitDir);
if (lockedTempFiles.Any())
{
ShowCurrentOperation("<WARNING> tempToolkitDir full cleanup failed ...");
ShowCurrentOperation("<WARNING> tempToolkitDir cleanup failed ...");
if (!ShowLockedFilesAndContinue(lockedTempFiles))
Environment.Exit(1);
}
@@ -379,6 +379,7 @@ public AutoUpdaterForm(string[] args)

private void DownloadFile(Uri downloadUri, string destPath, int attempts = 4)
{
ShowCurrentOperation("Downloading: " + Path.GetFileName(destPath) + " ...");
pbUpdate.Style = ProgressBarStyle.Continuous;
pbUpdate.Refresh();

@@ -450,7 +451,7 @@ private void Completed(object sender, AsyncCompletedEventArgs e)
else if (e.Cancelled == true)
{
dlStatus = DownloadStatus.CANCEL;
ShowCurrentOperation("Download cancelled ...");
ShowCurrentOperation("<WARNING> Download cancelled ...");
MessageBox.Show("Download has been canceled.");
}
else
@@ -721,7 +722,7 @@ private void RollBack(string srcDir, string destDir)

if (lockedFiles.Any())
{
ShowCurrentOperation("<ERROR> Rollback failed, locked files ...");
ShowCurrentOperation("<ERROR> Rollback failed ...");
if (!ShowLockedFilesAndContinue(lockedFiles))
Environment.Exit(0);
}
@@ -29,5 +29,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("6b07b79c")]
[assembly: AssemblyInformationalVersion("47e75b2f")]
[assembly: AssemblyConfiguration("")]
@@ -23,6 +23,7 @@
<DefineConstants>TRACE;DEBUG;CODE_ANALYSIS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
@@ -31,6 +32,7 @@
<OutputPath>bin\Release\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>autoupdater.ico</ApplicationIcon>
@@ -49,6 +51,7 @@
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
@@ -1,3 +1,3 @@
2.9.2.0
6b07b79c
47e75b2f

0 comments on commit 3b4767c

Please sign in to comment.
You can’t perform that action at this time.