<SignAssembly>false</SignAssembly>\r
<AssemblyOriginatorKeyFile>\r
</AssemblyOriginatorKeyFile>\r
- <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>\r
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>\r
<ApplicationManifest>DTXManiaGR.exe.x86.manifest</ApplicationManifest>\r
</PropertyGroup>\r
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">\r
</PropertyGroup>\r
<ItemGroup>\r
<Reference Include="Microsoft.VisualBasic" />\r
- <Reference Include="SlimDXc_net20x86_Jun2010, Version=1002.0.10.43, Culture=neutral, processorArchitecture=x86">\r
+ <Reference Include="SlimDXc_net20x86_Jun2010, Version=1002.0.10.43, Culture=neutral, PublicKeyToken=53d0e4ef1f1579f5, processorArchitecture=x86">\r
<SpecificVersion>False</SpecificVersion>\r
- <HintPath>..\実行時フォルダ\SlimDXc_net20x86_Jun2010.dll</HintPath>\r
+ <HintPath>..\実行時フォルダ\dll\SlimDXc_net20x86_Jun2010.dll</HintPath>\r
</Reference>\r
<Reference Include="System" />\r
<Reference Include="System.Data" />\r
</Target>\r
-->\r
<PropertyGroup>\r
- <PostBuildEvent>copy /Y "$(TargetPath)" "$(SolutionDir)..\実行時フォルダ"</PostBuildEvent>\r
+ <PostBuildEvent>copy /Y "$(TargetPath)" "$(SolutionDir)..\実行時フォルダ"\r
+move /Y "$(TargetDir)\Bass.Net.dll" "$(TargetDir)dll"\r
+move /Y "$(TargetDir)\DirectShowLib-2005.dll" "$(TargetDir)dll"\r
+move /Y "$(TargetDir)\FDK.dll" "$(TargetDir)dll"\r
+move /Y "$(TargetDir)\SlimDXc_net20x86_Jun2010.dll" "$(TargetDir)dll"\r
+</PostBuildEvent>\r
</PropertyGroup>\r
</Project>
\ No newline at end of file
using System.Threading;\r
using System.Diagnostics;\r
using System.Windows.Forms;\r
+using System.IO;\r
using FDK;\r
\r
namespace DTXMania\r
{\r
internal class Program\r
{\r
- #region [ 二重機動チェック、DLL存在チェック ]\r
+ #region [ 二重起動チェック、DLL存在チェック ]\r
//-----------------------------\r
private static Mutex mutex二重起動防止用;\r
\r
- private static bool tDLLの存在チェック( string strDll名, string str存在しないときに表示するエラー文字列jp, string str存在しないときに表示するエラー文字列en )\r
+ private static bool tDLLの存在チェック( string strDll名, string str存在しないときに表示するエラー文字列jp, string str存在しないときに表示するエラー文字列en, bool bLoadDllCheck )\r
{\r
- string str存在しないときに表示するエラー文字列 = (CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja") ?\r
+ string str存在しないときに表示するエラー文字列 = ( CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja" ) ?\r
str存在しないときに表示するエラー文字列jp : str存在しないときに表示するエラー文字列en;\r
- IntPtr hModule = LoadLibrary( strDll名 );\r
- if( hModule == IntPtr.Zero )\r
+ if ( bLoadDllCheck )\r
{\r
- MessageBox.Show( str存在しないときに表示するエラー文字列, "DTXMania runtime error", MessageBoxButtons.OK, MessageBoxIcon.Hand );\r
- return false;\r
+ IntPtr hModule = LoadLibrary( strDll名 ); // 実際にLoadDll()してチェックする\r
+ if ( hModule == IntPtr.Zero )\r
+ {\r
+ MessageBox.Show( str存在しないときに表示するエラー文字列, "DTXMania runtime error", MessageBoxButtons.OK, MessageBoxIcon.Hand );\r
+ return false;\r
+ }\r
+ FreeLibrary( hModule );\r
+ }\r
+ else\r
+ { // 単純にファイルの存在有無をチェックするだけ (プロジェクトで「参照」していたり、アンマネージドなDLLが暗黙リンクされるものはこちら)\r
+ string path = Path.Combine( System.IO.Directory.GetCurrentDirectory(), strDll名 );\r
+ if ( !File.Exists( path ) )\r
+ {\r
+ MessageBox.Show( str存在しないときに表示するエラー文字列, "DTXMania runtime error", MessageBoxButtons.OK, MessageBoxIcon.Hand );\r
+ return false;\r
+ }\r
}\r
- FreeLibrary( hModule );\r
return true;\r
}\r
+ private static bool tDLLの存在チェック( string strDll名, string str存在しないときに表示するエラー文字列jp, string str存在しないときに表示するエラー文字列en )\r
+ {\r
+ return tDLLの存在チェック( strDll名, str存在しないときに表示するエラー文字列jp, str存在しないときに表示するエラー文字列en, false );\r
+ }\r
\r
#region [DllImport]\r
[DllImport( "kernel32", CharSet = CharSet.Unicode, SetLastError = true )]\r
//-----------------------------\r
#endregion\r
\r
- [STAThread]\r
+ [STAThread] \r
private static void Main()\r
{\r
mutex二重起動防止用 = new Mutex( false, "DTXManiaMutex" );\r
bool flag = false;\r
\r
#region [DLLの存在チェック]\r
- if (!tDLLの存在チェック("SlimDX" + CDTXMania.SLIMDXDLL,\r
+ if ( !tDLLの存在チェック( "dll\\SlimDX" + CDTXMania.SLIMDXDLL + ".dll",\r
"SlimDX" + CDTXMania.SLIMDXDLL + ".dll またはその依存するdllが存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。",\r
"SlimDX" + CDTXMania.SLIMDXDLL + ".dll, or its depended DLL, is not found." + newLine + "Please download DTXMania again."\r
- )) flag = true;\r
- if (!tDLLの存在チェック("FDK.dll",\r
+ ) ) flag = true;\r
+ if ( !tDLLの存在チェック( "dll\\FDK.dll",\r
"FDK.dll またはその依存するdllが存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。",\r
"FDK.dll, or its depended DLL, is not found." + newLine + "Please download DTXMania again."\r
) ) flag = true;\r
- if( !tDLLの存在チェック( "xadec.dll",\r
+ if ( !tDLLの存在チェック( "dll\\xadec.dll",\r
"xadec.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。",\r
"xadec.dll is not found." + newLine + "Please download DTXMania again."\r
) ) flag = true;\r
- if( !tDLLの存在チェック( "SoundDecoder.dll",\r
+ if ( !tDLLの存在チェック( "dll\\SoundDecoder.dll",\r
"SoundDecoder.dll またはその依存するdllが存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。",\r
"SoundDecoder.dll, or its depended DLL, is not found." + newLine + "Please download DTXMania again."\r
) ) flag = true;\r
- if (!tDLLの存在チェック(CDTXMania.D3DXDLL,\r
+ if ( !tDLLの存在チェック( CDTXMania.D3DXDLL,\r
CDTXMania.D3DXDLL + " が存在しません。" + newLine + "DirectX Redist フォルダの DXSETUP.exe を実行し、" + newLine + "必要な DirectX ランタイムをインストールしてください。",\r
- CDTXMania.D3DXDLL + " is not found." + newLine + "Please execute DXSETUP.exe in \"DirectX Redist\" folder, to install DirectX runtimes required for DTXMania."\r
- )) flag = true;\r
- if ( !tDLLの存在チェック( "bass.dll",\r
+ CDTXMania.D3DXDLL + " is not found." + newLine + "Please execute DXSETUP.exe in \"DirectX Redist\" folder, to install DirectX runtimes required for DTXMania.",\r
+ true\r
+ ) ) flag = true;\r
+ if ( !tDLLの存在チェック( "dll\\bass.dll",\r
"bass.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。",\r
"baas.dll is not found." + newLine + "Please download DTXMania again."\r
) ) flag = true;\r
- if ( !tDLLの存在チェック( "Bass.Net.dll",\r
+ if ( !tDLLの存在チェック( "dll\\Bass.Net.dll",\r
"Bass.Net.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。",\r
"Bass.Net.dll is not found." + newLine + "Please download DTXMania again."\r
) ) flag = true;\r
- if ( !tDLLの存在チェック( "bassmix.dll",\r
+ if ( !tDLLの存在チェック( "dll\\bassmix.dll",\r
"bassmix.dll を読み込めません。bassmix.dll か bass.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。",\r
"bassmix.dll is not loaded. bassmix.dll or bass.dll must not exist." + newLine + "Please download DTXMania again."\r
) ) flag = true;\r
- if ( !tDLLの存在チェック( "bassasio.dll",\r
+ if ( !tDLLの存在チェック( "dll\\bassasio.dll",\r
"bassasio.dll を読み込めません。bassasio.dll か bass.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。",\r
"bassasio.dll is not loaded. bassasio.dll or bass.dll must not exist." + newLine + "Please download DTXMania again."\r
) ) flag = true;\r
- if ( !tDLLの存在チェック( "basswasapi.dll",\r
+ if ( !tDLLの存在チェック( "dll\\basswasapi.dll",\r
"basswasapi.dll を読み込めません。basswasapi.dll か bass.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。",\r
"basswasapi.dll is not loaded. basswasapi.dll or bass.dll must not exist." + newLine + "Please download DTXMania again."\r
) ) flag = true;\r
- if ( !tDLLの存在チェック( "bass_fx.dll",\r
+ if ( !tDLLの存在チェック( "dll\\bass_fx.dll",\r
"bass_fx.dll を読み込めません。bass_fx.dll か bass.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。",\r
"bass_fx.dll is not loaded. bass_fx.dll or bass.dll must not exist." + newLine + "Please download DTXMania again."\r
) ) flag = true;\r
- if ( !tDLLの存在チェック( "DirectShowLib-2005.dll",\r
+ if ( !tDLLの存在チェック( "dll\\DirectShowLib-2005.dll",\r
"DirectShowLib-2005.dll が存在しません。" + newLine + "DTXManiaをダウンロードしなおしてください。",\r
"DirectShowLib-2005.dll is not found." + newLine + "Please download DTXMania again."\r
) ) flag = true;\r
<FileAlignment>512</FileAlignment>\r
<TargetFrameworkSubset>\r
</TargetFrameworkSubset>\r
- <SignAssembly>false</SignAssembly>\r
- <AssemblyOriginatorKeyFile>\r
- </AssemblyOriginatorKeyFile>\r
+ <SignAssembly>true</SignAssembly>\r
+ <AssemblyOriginatorKeyFile>SlimDXKey_yyagi.snk</AssemblyOriginatorKeyFile>\r
<ApplicationIcon>\r
</ApplicationIcon>\r
</PropertyGroup>\r
<ItemGroup>\r
<Reference Include="Bass.Net, Version=2.4.10.3, Culture=neutral, PublicKeyToken=b7566c273e6ef480, processorArchitecture=MSIL">\r
<SpecificVersion>False</SpecificVersion>\r
- <HintPath>..\実行時フォルダ\Bass.Net.dll</HintPath>\r
+ <HintPath>..\実行時フォルダ\dll\Bass.Net.dll</HintPath>\r
</Reference>\r
<Reference Include="DirectShowLib-2005, Version=2.1.0.0, Culture=neutral, PublicKeyToken=67e7b740cdfc2d3f, processorArchitecture=MSIL">\r
<SpecificVersion>False</SpecificVersion>\r
- <HintPath>..\実行時フォルダ\DirectShowLib-2005.dll</HintPath>\r
+ <HintPath>..\実行時フォルダ\dll\DirectShowLib-2005.dll</HintPath>\r
</Reference>\r
<Reference Include="SlimDXc_net20x86_Jun2010, Version=1002.0.10.43, Culture=neutral, PublicKeyToken=53d0e4ef1f1579f5, processorArchitecture=x86">\r
<SpecificVersion>False</SpecificVersion>\r
- <HintPath>..\実行時フォルダ\SlimDXc_net20x86_Jun2010.dll</HintPath>\r
+ <HintPath>..\実行時フォルダ\dll\SlimDXc_net20x86_Jun2010.dll</HintPath>\r
</Reference>\r
<Reference Include="System" />\r
<Reference Include="System.Data" />\r
<ItemGroup>\r
<Content Include="コード\01.フレームワーク\Resources\sdx_icon_black.ico" />\r
</ItemGroup>\r
+ <ItemGroup>\r
+ <None Include="SlimDXKey_yyagi.snk" />\r
+ </ItemGroup>\r
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
Other similar extension points exist, see Microsoft.Common.targets.\r
</Target>\r
-->\r
<PropertyGroup>\r
- <PostBuildEvent>copy /Y "$(TargetPath)" "$(SolutionDir)..\実行時フォルダ"\r
-copy /Y "$(TargetPath)" "$(SolutionDir)..\実行時フォルダ(DTXCreator)"</PostBuildEvent>\r
+ <PostBuildEvent>copy /Y "$(TargetPath)" "$(SolutionDir)..\実行時フォルダ\dll"\r
+copy /Y "$(TargetPath)" "$(SolutionDir)..\実行時フォルダ(DTXCreator)"\r
+copy /Y "$(TargetPath)" "$(SolutionDir)\bin\x86\Debug\dll\"\r
+\r
+\r
+</PostBuildEvent>\r
</PropertyGroup>\r
</Project>
\ No newline at end of file