Merge pull request #34 from galenguyer/fix-release-assets
Copy release assets instead of changing working directory at runtime
This commit is contained in:
@@ -1304,7 +1304,12 @@ if not exist "$(TargetDir)\savedata" mkdir "$(TargetDir)\savedata"</Command>
|
|||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Message>Copying sound assets to output directory</Message>
|
<Message>Copying sound assets to output directory</Message>
|
||||||
<Command>xcopy /q /y /i /s /e "$(ProjectDir)Durango\Sound" "$(OutDir)Durango\Sound"
|
<Command>xcopy /q /y /i /s /e "$(ProjectDir)Durango\Sound" "$(OutDir)Durango\Sound"
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)music" "$(OutDir)music"</Command>
|
xcopy /q /y /i /s /e "$(ProjectDir)music" "$(OutDir)music"
|
||||||
|
xcopy /q /y /i /s /e "$(ProjectDir)Windows64\GameHDD" "$(OutDir)Windows64\GameHDD"
|
||||||
|
xcopy /q /y /i /s /e "$(ProjectDir)Common\Media" "$(OutDir)Common\Media"
|
||||||
|
xcopy /q /y /i /s /e "$(ProjectDir)Common\res" "$(OutDir)Common\res"
|
||||||
|
xcopy /q /y /i /s /e "$(ProjectDir)Common\Trial" "$(OutDir)Common\Trial"
|
||||||
|
xcopy /q /y /i /s /e "$(ProjectDir)Common\Tutorial" "$(OutDir)Common\Tutorial"</Command>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
<ImageXex>
|
<ImageXex>
|
||||||
<ConfigurationFile>$(ProjectDir)xbox\xex-dev.xml</ConfigurationFile>
|
<ConfigurationFile>$(ProjectDir)xbox\xex-dev.xml</ConfigurationFile>
|
||||||
@@ -1437,7 +1442,12 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
|||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Message>Copying sound assets to output directory</Message>
|
<Message>Copying sound assets to output directory</Message>
|
||||||
<Command>xcopy /q /y /i /s /e "$(ProjectDir)Durango\Sound" "$(OutDir)Durango\Sound"
|
<Command>xcopy /q /y /i /s /e "$(ProjectDir)Durango\Sound" "$(OutDir)Durango\Sound"
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)music" "$(OutDir)music"</Command>
|
xcopy /q /y /i /s /e "$(ProjectDir)music" "$(OutDir)music"
|
||||||
|
xcopy /q /y /i /s /e "$(ProjectDir)Windows64\GameHDD" "$(OutDir)Windows64\GameHDD"
|
||||||
|
xcopy /q /y /i /s /e "$(ProjectDir)Common\Media" "$(OutDir)Common\Media"
|
||||||
|
xcopy /q /y /i /s /e "$(ProjectDir)Common\res" "$(OutDir)Common\res"
|
||||||
|
xcopy /q /y /i /s /e "$(ProjectDir)Common\Trial" "$(OutDir)Common\Trial"
|
||||||
|
xcopy /q /y /i /s /e "$(ProjectDir)Common\Tutorial" "$(OutDir)Common\Tutorial"</Command>
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
<ImageXex>
|
<ImageXex>
|
||||||
<ConfigurationFile>$(ProjectDir)xbox\xex-dev.xml</ConfigurationFile>
|
<ConfigurationFile>$(ProjectDir)xbox\xex-dev.xml</ConfigurationFile>
|
||||||
|
|||||||
@@ -716,26 +716,6 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
|||||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||||
|
|
||||||
|
|
||||||
WCHAR exePath[MAX_PATH] = { 0 };
|
|
||||||
GetModuleFileNameW(NULL, exePath, MAX_PATH);
|
|
||||||
WCHAR* lastSlash = wcsrchr(exePath, L'\\');
|
|
||||||
if (lastSlash) {
|
|
||||||
*lastSlash = L'\0';
|
|
||||||
|
|
||||||
WCHAR devCheckPath[MAX_PATH] = { 0 };
|
|
||||||
swprintf_s(devCheckPath, MAX_PATH, L"%s\\..\\..\\Minecraft.Client\\Minecraft.Client.vcxproj", exePath);
|
|
||||||
|
|
||||||
if (GetFileAttributesW(devCheckPath) != INVALID_FILE_ATTRIBUTES) {
|
|
||||||
WCHAR projectPath[MAX_PATH] = { 0 };
|
|
||||||
swprintf_s(projectPath, MAX_PATH, L"%s\\..\\..\\Minecraft.Client", exePath);
|
|
||||||
SetCurrentDirectoryW(projectPath);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
SetCurrentDirectoryW(exePath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Declare DPI awareness so GetSystemMetrics returns physical pixels
|
// Declare DPI awareness so GetSystemMetrics returns physical pixels
|
||||||
SetProcessDPIAware();
|
SetProcessDPIAware();
|
||||||
g_iScreenWidth = GetSystemMetrics(SM_CXSCREEN);
|
g_iScreenWidth = GetSystemMetrics(SM_CXSCREEN);
|
||||||
|
|||||||
Reference in New Issue
Block a user