Skip to content

Commit

Permalink
Enabling AnyCPU builds with 64-bit SMPSOUT.
Browse files Browse the repository at this point in the history
  • Loading branch information
MainMemory committed May 15, 2015
1 parent d335ad2 commit a4c877c
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 65 deletions.
6 changes: 2 additions & 4 deletions LZ/LZ.csproj
Expand Up @@ -13,21 +13,19 @@
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
Expand Down
6 changes: 2 additions & 4 deletions S2HPZ/S2HPZ.csproj
Expand Up @@ -33,21 +33,19 @@
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
Expand Down
52 changes: 12 additions & 40 deletions SonicBGScrollSaver.sln
Expand Up @@ -14,53 +14,25 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{299A269C-28FE-4A88-AD98-1598973CF327}.Debug|Any CPU.ActiveCfg = Debug|x86
{299A269C-28FE-4A88-AD98-1598973CF327}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{299A269C-28FE-4A88-AD98-1598973CF327}.Debug|Mixed Platforms.Build.0 = Debug|x86
{299A269C-28FE-4A88-AD98-1598973CF327}.Debug|x86.ActiveCfg = Debug|x86
{299A269C-28FE-4A88-AD98-1598973CF327}.Debug|x86.Build.0 = Debug|x86
{299A269C-28FE-4A88-AD98-1598973CF327}.Release|Any CPU.ActiveCfg = Release|x86
{299A269C-28FE-4A88-AD98-1598973CF327}.Release|Mixed Platforms.ActiveCfg = Release|x86
{299A269C-28FE-4A88-AD98-1598973CF327}.Release|Mixed Platforms.Build.0 = Release|x86
{299A269C-28FE-4A88-AD98-1598973CF327}.Release|x86.ActiveCfg = Release|x86
{299A269C-28FE-4A88-AD98-1598973CF327}.Release|x86.Build.0 = Release|x86
{669DC177-624D-4078-B354-64FE519D5D43}.Debug|Any CPU.ActiveCfg = Debug|x86
{669DC177-624D-4078-B354-64FE519D5D43}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{669DC177-624D-4078-B354-64FE519D5D43}.Debug|Mixed Platforms.Build.0 = Debug|x86
{669DC177-624D-4078-B354-64FE519D5D43}.Debug|x86.ActiveCfg = Debug|x86
{669DC177-624D-4078-B354-64FE519D5D43}.Debug|x86.Build.0 = Debug|x86
{669DC177-624D-4078-B354-64FE519D5D43}.Release|Any CPU.ActiveCfg = Release|x86
{669DC177-624D-4078-B354-64FE519D5D43}.Release|Mixed Platforms.ActiveCfg = Release|x86
{669DC177-624D-4078-B354-64FE519D5D43}.Release|Mixed Platforms.Build.0 = Release|x86
{669DC177-624D-4078-B354-64FE519D5D43}.Release|x86.ActiveCfg = Release|x86
{669DC177-624D-4078-B354-64FE519D5D43}.Release|x86.Build.0 = Release|x86
{9D1837F1-E1B1-40B1-86ED-D7A724AF9626}.Debug|Any CPU.ActiveCfg = Debug|x86
{9D1837F1-E1B1-40B1-86ED-D7A724AF9626}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{9D1837F1-E1B1-40B1-86ED-D7A724AF9626}.Debug|Mixed Platforms.Build.0 = Debug|x86
{9D1837F1-E1B1-40B1-86ED-D7A724AF9626}.Debug|x86.ActiveCfg = Debug|x86
{9D1837F1-E1B1-40B1-86ED-D7A724AF9626}.Debug|x86.Build.0 = Debug|x86
{9D1837F1-E1B1-40B1-86ED-D7A724AF9626}.Release|Any CPU.ActiveCfg = Release|x86
{9D1837F1-E1B1-40B1-86ED-D7A724AF9626}.Release|Mixed Platforms.ActiveCfg = Release|x86
{9D1837F1-E1B1-40B1-86ED-D7A724AF9626}.Release|Mixed Platforms.Build.0 = Release|x86
{9D1837F1-E1B1-40B1-86ED-D7A724AF9626}.Release|x86.ActiveCfg = Release|x86
{9D1837F1-E1B1-40B1-86ED-D7A724AF9626}.Release|x86.Build.0 = Release|x86
{299A269C-28FE-4A88-AD98-1598973CF327}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{299A269C-28FE-4A88-AD98-1598973CF327}.Debug|Any CPU.Build.0 = Debug|Any CPU
{299A269C-28FE-4A88-AD98-1598973CF327}.Release|Any CPU.ActiveCfg = Release|Any CPU
{299A269C-28FE-4A88-AD98-1598973CF327}.Release|Any CPU.Build.0 = Release|Any CPU
{669DC177-624D-4078-B354-64FE519D5D43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{669DC177-624D-4078-B354-64FE519D5D43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{669DC177-624D-4078-B354-64FE519D5D43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{669DC177-624D-4078-B354-64FE519D5D43}.Release|Any CPU.Build.0 = Release|Any CPU
{9D1837F1-E1B1-40B1-86ED-D7A724AF9626}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D1837F1-E1B1-40B1-86ED-D7A724AF9626}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D1837F1-E1B1-40B1-86ED-D7A724AF9626}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D1837F1-E1B1-40B1-86ED-D7A724AF9626}.Release|Any CPU.Build.0 = Release|Any CPU
{1003123A-87FC-4CBD-BBD4-387A075B548F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1003123A-87FC-4CBD-BBD4-387A075B548F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1003123A-87FC-4CBD-BBD4-387A075B548F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{1003123A-87FC-4CBD-BBD4-387A075B548F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{1003123A-87FC-4CBD-BBD4-387A075B548F}.Debug|x86.ActiveCfg = Debug|Any CPU
{1003123A-87FC-4CBD-BBD4-387A075B548F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1003123A-87FC-4CBD-BBD4-387A075B548F}.Release|Any CPU.Build.0 = Release|Any CPU
{1003123A-87FC-4CBD-BBD4-387A075B548F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{1003123A-87FC-4CBD-BBD4-387A075B548F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{1003123A-87FC-4CBD-BBD4-387A075B548F}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
9 changes: 8 additions & 1 deletion SonicBGScrollSaver/Music.cs
Expand Up @@ -45,8 +45,15 @@ internal static unsafe void Init()
short songCount = 0;
foreach (string song in IniSerializer.Deserialize<SongList>(ini).songs.Keys)
songNums.Add(song, songCount++);
string dir = Environment.CurrentDirectory;
Environment.CurrentDirectory = Path.Combine(Environment.CurrentDirectory, "lib" + (IntPtr.Size == 8 ? "64" : "32"));
try { InitializeDriver(); }
catch { return; }
catch
{
Environment.CurrentDirectory = dir;
return;
}
Environment.CurrentDirectory = dir;
uint custcnt;
IntPtr* p = GetCustomSongs(out custcnt);
for (uint i = 0; i < custcnt; i++)
Expand Down
33 changes: 17 additions & 16 deletions SonicBGScrollSaver/SonicBGScrollSaver.csproj
Expand Up @@ -33,26 +33,25 @@
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="ManagedWinapi, Version=0.3.0.0, Culture=neutral, processorArchitecture=MSIL">
Expand Down Expand Up @@ -131,9 +130,12 @@
<Compile Include="Settings.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="SMPSOUT.dll">
<None Include="lib32\SMPSOUT.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</None>
<None Include="lib64\SMPSOUT.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
Expand All @@ -154,7 +156,6 @@
</Target>
-->
<Target Name="AfterBuild">
<Copy SourceFiles="$(TargetPath)" DestinationFiles="$(TargetDir)\$(TargetName).scr"
SkipUnchangedFiles="true" />
<Copy SourceFiles="$(TargetPath)" DestinationFiles="$(TargetDir)\$(TargetName).scr" SkipUnchangedFiles="true" />
</Target>
</Project>
File renamed without changes.
Binary file added SonicBGScrollSaver/lib64/SMPSOUT.dll
Binary file not shown.

0 comments on commit a4c877c

Please sign in to comment.