Fix build scripts so they work with simplified project configurations on

Windows.
This commit is contained in:
casey langen 2023-01-11 00:00:50 -08:00
parent b13602e610
commit d7f6dbe46f
9 changed files with 32 additions and 33 deletions

View File

@ -10,14 +10,12 @@ echo "*** BUILDING MILKDROP ***"
MSBuild.exe ../milkdrop2-musikcube/milkdrop2-musikcube.sln /m /nologo /verbosity:minimal /p:Configuration=Release /p:Platform=Win32 MSBuild.exe ../milkdrop2-musikcube/milkdrop2-musikcube.sln /m /nologo /verbosity:minimal /p:Configuration=Release /p:Platform=Win32
echo "*** BUILDING WIN32 ***" echo "*** BUILDING WIN32 ***"
MSBuild.exe musikcube.sln /m /nologo /verbosity:minimal /p:Configuration=Release-Win /p:Platform=Win32 MSBuild.exe musikcube.sln /m /nologo /verbosity:minimal /p:Configuration=Release /p:Platform=Win32
MSBuild.exe musikcube.sln /m /nologo /verbosity:minimal /p:Configuration=Release-Con /p:Platform=Win32 MSBuild.exe musikcube.sln /target:musikcube /m /nologo /verbosity:minimal /p:ExternalCompilerOptions=PDCURSES_WINCON /p:Configuration=Release /p:Platform=Win32 /p:ForceImportAfterCppTargets=%scriptdir%\windows-cmd.props
MSBuild.exe musikcube.sln /m /nologo /verbosity:minimal /p:Configuration=Release-DLL /p:Platform=Win32
echo "*** BUILDING x64 ***" echo "*** BUILDING x64 ***"
MSBuild.exe musikcube.sln /m /nologo /verbosity:minimal /p:Configuration=Release-Win /p:Platform=x64 MSBuild.exe musikcube.sln /m /nologo /verbosity:minimal /p:Configuration=Release /p:Platform=x64
MSBuild.exe musikcube.sln /m /nologo /verbosity:minimal /p:Configuration=Release-Con /p:Platform=x64 MSBuild.exe musikcube.sln /target:musikcube /m /nologo /verbosity:minimal /p:ExternalCompilerOptions=PDCURSES_WINCON /p:Configuration=Release /p:Platform=x64 /p:ForceImportAfterCppTargets=%scriptdir%\windows-cmd.props
MSBuild.exe musikcube.sln /m /nologo /verbosity:minimal /p:Configuration=Release-DLL /p:Platform=x64
echo "*** DONE ***" echo "*** DONE ***"
@echo off @echo off

View File

@ -5,15 +5,7 @@ rd /s /q bin64
echo "*** CLEANING ALL BUILD FILES ***" echo "*** CLEANING ALL BUILD FILES ***"
MSBuild.exe ../milkdrop2-musikcube/milkdrop2-musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Release /p:Platform=Win32 MSBuild.exe ../milkdrop2-musikcube/milkdrop2-musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Release /p:Platform=Win32
MSBuild.exe ../milkdrop2-musikcube/milkdrop2-musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Debug /p:Platform=Win32 MSBuild.exe ../milkdrop2-musikcube/milkdrop2-musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Debug /p:Platform=Win32
MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Release-Win /p:Platform=Win32 MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Release /p:Platform=Win32
MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Release-Con /p:Platform=Win32 MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Debug /p:Platform=Win32
MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Release-DLL /p:Platform=Win32 MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Release /p:Platform=x64
MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Debug-Win /p:Platform=Win32 MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Debug /p:Platform=x64
MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Debug-Con /p:Platform=Win32
MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Debug-DLL /p:Platform=Win32
MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Release-Win /p:Platform=x64
MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Release-Con /p:Platform=x64
MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Release-DLL /p:Platform=x64
MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Debug-Win /p:Platform=x64
MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Debug-Con /p:Platform=x64
MSBuild.exe musikcube.sln /m /t:Clean /nologo /verbosity:minimal /p:Configuration=Debug-DLL /p:Platform=x64

9
script/windows-cmd.props Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup Condition="'$(ProjectName)'=='musikcube'">
<Link>
<SubSystem>Console</SubSystem>
<OutputFile>$(TargetDir)\musikcube-cmd.exe</OutputFile>
</Link>
</ItemDefinitionGroup>
</Project>

View File

@ -95,7 +95,7 @@
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./include/;./include/sqlite/;./win32_include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>./include/;./include/sqlite/;./win32_include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;PDC_FORCE_UTF8;PDC_WIDE;_DEBUG;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>$(ExternalCompilerOptions);WIN32;PDC_FORCE_UTF8;PDC_WIDE;_DEBUG;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@ -114,7 +114,7 @@
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./include/;./include/sqlite/;./win32_include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>./include/;./include/sqlite/;./win32_include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;PDC_FORCE_UTF8;PDC_WIDE;_DEBUG;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>$(ExternalCompilerOptions);WIN32;PDC_FORCE_UTF8;PDC_WIDE;_DEBUG;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
@ -136,7 +136,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>./include/;./include/sqlite;./win32_include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>./include/;./include/sqlite;./win32_include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;WIN32;PDC_FORCE_UTF8;PDC_WIDE;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>$(ExternalCompilerOptions);NDEBUG;WIN32;PDC_FORCE_UTF8;PDC_WIDE;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>
@ -158,7 +158,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>./include/;./include/sqlite;./win32_include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>./include/;./include/sqlite;./win32_include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;PDC_FORCE_UTF8;PDC_WIDE;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>$(ExternalCompilerOptions);NDEBUG;WIN32;PDC_FORCE_UTF8;PDC_WIDE;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader> <PrecompiledHeader>
</PrecompiledHeader> </PrecompiledHeader>

View File

@ -1,4 +1,4 @@
#ifdef PDCURSES_WINCON #if defined PDCURSES_WINCON
#include "wincon/pdcclip.c" #include "wincon/pdcclip.c"
#include "wincon/pdcdisp.c" #include "wincon/pdcdisp.c"
#include "wincon/pdcgetsc.c" #include "wincon/pdcgetsc.c"

View File

@ -1,4 +1,4 @@
#ifdef PDCURSES_WINGUI #if !defined PDCURSES_WINCON
#include "wingui/pdcclip.c" #include "wingui/pdcclip.c"
#include "wingui/pdcdisp.c" #include "wingui/pdcdisp.c"
#include "wingui/pdcgetsc.c" #include "wingui/pdcgetsc.c"

View File

@ -78,7 +78,7 @@ using namespace cursespp;
namespace keys = musik::cube::prefs::keys; namespace keys = musik::cube::prefs::keys;
#if defined(WIN32) && defined(PDCURSES_WINGUI) #if defined(WIN32) && !defined(PDCURSES_WINCON)
int _main(int argc, wchar_t* argv[]); int _main(int argc, wchar_t* argv[]);
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) { int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) {

View File

@ -303,7 +303,7 @@ void App::InitCurses() {
#ifdef WIN32 #ifdef WIN32
PDC_set_function_key(FUNCTION_KEY_SHUT_DOWN, 4); PDC_set_function_key(FUNCTION_KEY_SHUT_DOWN, 4);
#ifdef PDCURSES_WINGUI #if defined PDCURSES_WINGUI && !defined PDCURSES_WINCON
/* needs to happen after initscr() */ /* needs to happen after initscr() */
PDC_set_default_menu_visibility(0); PDC_set_default_menu_visibility(0);
PDC_set_window_resized_callback(&pdcWinguiResizeCallback); PDC_set_window_resized_callback(&pdcWinguiResizeCallback);
@ -387,13 +387,13 @@ bool App::RegisterFont(const std::string& filename) {
} }
void App::SetDefaultFontface(const std::string& fontface) { void App::SetDefaultFontface(const std::string& fontface) {
#if defined(PDCURSES_WINGUI) #if defined(PDCURSES_WINGUI) && !defined(PDCURSES_WINCON)
PDC_set_preferred_fontface(u8to16(fontface).c_str()); PDC_set_preferred_fontface(u8to16(fontface).c_str());
#endif #endif
} }
void App::SetDefaultMenuVisibility(bool visible) { void App::SetDefaultMenuVisibility(bool visible) {
#if defined(PDCURSES_WINGUI) #if defined(PDCURSES_WINGUI) && !defined(PDCURSES_WINCON)
PDC_set_default_menu_visibility(visible); PDC_set_default_menu_visibility(visible);
#endif #endif
} }

View File

@ -105,7 +105,7 @@
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../3rdparty/asio/asio/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../3rdparty/asio/asio/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;CURL_STATICLIB;BOOST_DATE_TIME_NO_LIB;BOOST_REGEX_NO_LIB;_WEBSOCKETPP_CPP11_TYPE_TRAITS_;_WEBSOCKETPP_CPP11_RANDOM_DEVICE_;ASIO_STANDALONE;_DEBUG;_SCL_SECURE_NO_WARNINGS;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>$(ExternalCompilerOptions);WIN32;CURL_STATICLIB;BOOST_DATE_TIME_NO_LIB;BOOST_REGEX_NO_LIB;_WEBSOCKETPP_CPP11_TYPE_TRAITS_;_WEBSOCKETPP_CPP11_RANDOM_DEVICE_;ASIO_STANDALONE;_DEBUG;_SCL_SECURE_NO_WARNINGS;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild> <MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@ -152,7 +152,7 @@ xcopy "$(SolutionDir)src\3rdparty\bin\win\font\*.ttf" "$(TargetDir)fonts\" /Y /e
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../3rdparty/asio/asio/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../3rdparty/asio/asio/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;CURL_STATICLIB;BOOST_DATE_TIME_NO_LIB;BOOST_REGEX_NO_LIB;_WEBSOCKETPP_CPP11_TYPE_TRAITS_;_WEBSOCKETPP_CPP11_RANDOM_DEVICE_;ASIO_STANDALONE;_DEBUG;_SCL_SECURE_NO_WARNINGS;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>$(ExternalCompilerOptions);WIN32;CURL_STATICLIB;BOOST_DATE_TIME_NO_LIB;BOOST_REGEX_NO_LIB;_WEBSOCKETPP_CPP11_TYPE_TRAITS_;_WEBSOCKETPP_CPP11_RANDOM_DEVICE_;ASIO_STANDALONE;_DEBUG;_SCL_SECURE_NO_WARNINGS;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
@ -196,7 +196,7 @@ xcopy "$(SolutionDir)src\3rdparty\bin\win\font\*.ttf" "$(TargetDir)fonts\" /Y /e
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../3rdparty/asio/asio/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../3rdparty/asio/asio/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;CURL_STATICLIB;BOOST_DATE_TIME_NO_LIB;BOOST_REGEX_NO_LIB;_WEBSOCKETPP_CPP11_TYPE_TRAITS_;_WEBSOCKETPP_CPP11_RANDOM_DEVICE_;ASIO_STANDALONE;NDEBUG;_SCL_SECURE_NO_WARNINGS;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>$(ExternalCompilerOptions);WIN32;CURL_STATICLIB;BOOST_DATE_TIME_NO_LIB;BOOST_REGEX_NO_LIB;_WEBSOCKETPP_CPP11_TYPE_TRAITS_;_WEBSOCKETPP_CPP11_RANDOM_DEVICE_;ASIO_STANDALONE;NDEBUG;_SCL_SECURE_NO_WARNINGS;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
@ -249,7 +249,7 @@ xcopy "$(SolutionDir)src\3rdparty\bin\win\font\*.ttf" "$(TargetDir)fonts\" /Y /e
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile> <ClCompile>
<AdditionalIncludeDirectories>./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../3rdparty/asio/asio/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../3rdparty/asio/asio/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;CURL_STATICLIB;BOOST_DATE_TIME_NO_LIB;BOOST_REGEX_NO_LIB;_WEBSOCKETPP_CPP11_TYPE_TRAITS_;_WEBSOCKETPP_CPP11_RANDOM_DEVICE_;ASIO_STANDALONE;NDEBUG;_SCL_SECURE_NO_WARNINGS;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>$(ExternalCompilerOptions);WIN32;CURL_STATICLIB;BOOST_DATE_TIME_NO_LIB;BOOST_REGEX_NO_LIB;_WEBSOCKETPP_CPP11_TYPE_TRAITS_;_WEBSOCKETPP_CPP11_RANDOM_DEVICE_;ASIO_STANDALONE;NDEBUG;_SCL_SECURE_NO_WARNINGS;PDCURSES_WINGUI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>