From 01ed5451e4a34dcdf3a9b5057361d08ec2b7f1da Mon Sep 17 00:00:00 2001 From: Souryo Date: Sun, 17 Jan 2016 11:11:53 -0500 Subject: [PATCH] x86 & x64 versions now use the same .exe file (both versions are packaged inside the .exe) --- DependencyPacker/DependencyPacker.csproj | 99 +++++++++++++++++++++ DependencyPacker/Program.cs | 21 +++++ DependencyPacker/Properties/AssemblyInfo.cs | 36 ++++++++ GUI.NET/App.config | 6 -- GUI.NET/GUI.NET.csproj | 46 +++++++--- GUI.NET/Program.cs | 84 +++++++++-------- GUI.NET/Properties/AssemblyInfo.cs | 2 +- GUI.NET/ResourceManager.cs | 37 +++++--- GUI.NET/RuntimeChecker.cs | 2 +- NES.sln | 37 ++++++++ 10 files changed, 306 insertions(+), 64 deletions(-) create mode 100644 DependencyPacker/DependencyPacker.csproj create mode 100644 DependencyPacker/Program.cs create mode 100644 DependencyPacker/Properties/AssemblyInfo.cs delete mode 100644 GUI.NET/App.config diff --git a/DependencyPacker/DependencyPacker.csproj b/DependencyPacker/DependencyPacker.csproj new file mode 100644 index 00000000..e5f93672 --- /dev/null +++ b/DependencyPacker/DependencyPacker.csproj @@ -0,0 +1,99 @@ + + + + + Debug + AnyCPU + {AABB5225-3A49-47FF-8A48-031673CADCE9} + Exe + Properties + DependencyPacker + DependencyPacker + v4.5 + 512 + + + AnyCPU + true + full + false + ..\bin\Any CPU\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + ..\bin\Any CPU\Release\ + TRACE + prompt + 4 + false + + + true + ..\bin\x64\Debug\ + DEBUG;TRACE + full + x64 + prompt + MinimumRecommendedRules.ruleset + true + + + ..\bin\x64\Release\ + TRACE + true + pdbonly + x64 + prompt + MinimumRecommendedRules.ruleset + true + + + true + ..\bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + true + + + ..\bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + true + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DependencyPacker/Program.cs b/DependencyPacker/Program.cs new file mode 100644 index 00000000..ded5c352 --- /dev/null +++ b/DependencyPacker/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; +using System.IO.Compression; + +namespace DependencyPacker +{ + class Program + { + static void Main(string[] args) + { + if(File.Exists("Dependencies.zip")) { + File.Delete("Dependencies.zip"); + } + ZipFile.CreateFromDirectory("Dependencies", "Dependencies.zip"); + } + } +} diff --git a/DependencyPacker/Properties/AssemblyInfo.cs b/DependencyPacker/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..50e15dcc --- /dev/null +++ b/DependencyPacker/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("DependencyPacker")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Mesen")] +[assembly: AssemblyProduct("DependencyPacker")] +[assembly: AssemblyCopyright("Copyright © Mesen 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("2cbd9a92-f7b8-4d71-bec3-2fd8810871f5")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/GUI.NET/App.config b/GUI.NET/App.config deleted file mode 100644 index 8e156463..00000000 --- a/GUI.NET/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/GUI.NET/GUI.NET.csproj b/GUI.NET/GUI.NET.csproj index 0f6174aa..fe86a214 100644 --- a/GUI.NET/GUI.NET.csproj +++ b/GUI.NET/GUI.NET.csproj @@ -59,6 +59,27 @@ MinimumRecommendedRules.ruleset true + + true + ..\bin\Any CPU\Debug\ + DEBUG;TRACE + true + full + AnyCPU + prompt + MinimumRecommendedRules.ruleset + false + + + ..\bin\Any CPU\Release\ + TRACE + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset + false + @@ -444,17 +465,8 @@ - - - - - Dependencies\BlipBuffer.dll - - - Dependencies\NesNtsc.dll - - - Dependencies\WinMesen.dll + + Dependencies\Dependencies.zip Dependencies\MesenIcon.bmp @@ -469,6 +481,18 @@ + + mkdir "Dependencies" +copy "$(SolutionDir)bin\x86\$(ConfigurationName)\WinMesen.dll" "Dependencies\WinMesen.x86.dll" +copy "$(SolutionDir)bin\x86\$(ConfigurationName)\BlipBuffer.dll" "Dependencies\BlipBuffer.x86.dll" +copy "$(SolutionDir)bin\x86\$(ConfigurationName)\NesNtsc.dll" "Dependencies\NesNtsc.x86.dll" + +copy "$(SolutionDir)bin\x64\$(ConfigurationName)\WinMesen.dll" "Dependencies\WinMesen.x64.dll" +copy "$(SolutionDir)bin\x64\$(ConfigurationName)\BlipBuffer.dll" "Dependencies\BlipBuffer.x64.dll" +copy "$(SolutionDir)bin\x64\$(ConfigurationName)\NesNtsc.dll" "Dependencies\NesNtsc.x64.dll" + +call DependencyPacker.exe "$(OutDir)" +