diff --git a/script/build-win.bat b/script/build-win.bat
index 0d728f2cc..3f208978f 100644
--- a/script/build-win.bat
+++ b/script/build-win.bat
@@ -10,14 +10,12 @@ echo "*** BUILDING MILKDROP ***"
MSBuild.exe ../milkdrop2-musikcube/milkdrop2-musikcube.sln /m /nologo /verbosity:minimal /p:Configuration=Release /p:Platform=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-Con /p:Platform=Win32
-MSBuild.exe musikcube.sln /m /nologo /verbosity:minimal /p:Configuration=Release-DLL /p:Platform=Win32
+MSBuild.exe musikcube.sln /m /nologo /verbosity:minimal /p:Configuration=Release /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
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-Con /p:Platform=x64
-MSBuild.exe musikcube.sln /m /nologo /verbosity:minimal /p:Configuration=Release-DLL /p:Platform=x64
+MSBuild.exe musikcube.sln /m /nologo /verbosity:minimal /p:Configuration=Release /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
echo "*** DONE ***"
@echo off
diff --git a/script/clean-win.bat b/script/clean-win.bat
index 71855fa7d..6658a864b 100644
--- a/script/clean-win.bat
+++ b/script/clean-win.bat
@@ -5,15 +5,7 @@ rd /s /q bin64
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=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-Con /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=Debug-Win /p:Platform=Win32
-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
+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=Debug /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 /p:Platform=x64
diff --git a/script/windows-cmd.props b/script/windows-cmd.props
new file mode 100644
index 000000000..56e2e5b91
--- /dev/null
+++ b/script/windows-cmd.props
@@ -0,0 +1,9 @@
+
+
+
+
+ Console
+ $(TargetDir)\musikcube-cmd.exe
+
+
+
diff --git a/src/3rdparty/3rdparty.vcxproj b/src/3rdparty/3rdparty.vcxproj
index 1725b2833..98126a07d 100755
--- a/src/3rdparty/3rdparty.vcxproj
+++ b/src/3rdparty/3rdparty.vcxproj
@@ -95,7 +95,7 @@
Disabled
./include/;./include/sqlite/;./win32_include/;%(AdditionalIncludeDirectories)
- WIN32;PDC_FORCE_UTF8;PDC_WIDE;_DEBUG;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)
+ $(ExternalCompilerOptions);WIN32;PDC_FORCE_UTF8;PDC_WIDE;_DEBUG;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)
EnableFastChecks
MultiThreadedDebug
@@ -114,7 +114,7 @@
Disabled
./include/;./include/sqlite/;./win32_include/;%(AdditionalIncludeDirectories)
- WIN32;PDC_FORCE_UTF8;PDC_WIDE;_DEBUG;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)
+ $(ExternalCompilerOptions);WIN32;PDC_FORCE_UTF8;PDC_WIDE;_DEBUG;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)
EnableFastChecks
MultiThreadedDebug
@@ -136,7 +136,7 @@
true
Speed
./include/;./include/sqlite;./win32_include/;%(AdditionalIncludeDirectories)
- NDEBUG;WIN32;PDC_FORCE_UTF8;PDC_WIDE;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)
+ $(ExternalCompilerOptions);NDEBUG;WIN32;PDC_FORCE_UTF8;PDC_WIDE;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)
MultiThreaded
@@ -158,7 +158,7 @@
true
Speed
./include/;./include/sqlite;./win32_include/;%(AdditionalIncludeDirectories)
- WIN32;PDC_FORCE_UTF8;PDC_WIDE;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)
+ $(ExternalCompilerOptions);NDEBUG;WIN32;PDC_FORCE_UTF8;PDC_WIDE;_CRT_SECURE_NO_DEPRECATE;SQLITE_THREADSAFE;PDCURSES_WINGUI;%(PreprocessorDefinitions)
MultiThreaded
diff --git a/src/3rdparty/win32_src/pdcurses/pdcwincon.c b/src/3rdparty/win32_src/pdcurses/pdcwincon.c
index 920d9c2f0..b2de15628 100644
--- a/src/3rdparty/win32_src/pdcurses/pdcwincon.c
+++ b/src/3rdparty/win32_src/pdcurses/pdcwincon.c
@@ -1,4 +1,4 @@
-#ifdef PDCURSES_WINCON
+#if defined PDCURSES_WINCON
#include "wincon/pdcclip.c"
#include "wincon/pdcdisp.c"
#include "wincon/pdcgetsc.c"
diff --git a/src/3rdparty/win32_src/pdcurses/pdcwingui.c b/src/3rdparty/win32_src/pdcurses/pdcwingui.c
index 95701476b..e98bc6c69 100644
--- a/src/3rdparty/win32_src/pdcurses/pdcwingui.c
+++ b/src/3rdparty/win32_src/pdcurses/pdcwingui.c
@@ -1,4 +1,4 @@
-#ifdef PDCURSES_WINGUI
+#if !defined PDCURSES_WINCON
#include "wingui/pdcclip.c"
#include "wingui/pdcdisp.c"
#include "wingui/pdcgetsc.c"
diff --git a/src/musikcube/Main.cpp b/src/musikcube/Main.cpp
index 8d4902404..e8bdae39e 100644
--- a/src/musikcube/Main.cpp
+++ b/src/musikcube/Main.cpp
@@ -78,7 +78,7 @@ using namespace cursespp;
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 APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) {
diff --git a/src/musikcube/cursespp/App.cpp b/src/musikcube/cursespp/App.cpp
index 93363f0ac..2cd86f2c9 100755
--- a/src/musikcube/cursespp/App.cpp
+++ b/src/musikcube/cursespp/App.cpp
@@ -303,7 +303,7 @@ void App::InitCurses() {
#ifdef WIN32
PDC_set_function_key(FUNCTION_KEY_SHUT_DOWN, 4);
- #ifdef PDCURSES_WINGUI
+ #if defined PDCURSES_WINGUI && !defined PDCURSES_WINCON
/* needs to happen after initscr() */
PDC_set_default_menu_visibility(0);
PDC_set_window_resized_callback(&pdcWinguiResizeCallback);
@@ -387,13 +387,13 @@ bool App::RegisterFont(const std::string& filename) {
}
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());
#endif
}
void App::SetDefaultMenuVisibility(bool visible) {
-#if defined(PDCURSES_WINGUI)
+#if defined(PDCURSES_WINGUI) && !defined(PDCURSES_WINCON)
PDC_set_default_menu_visibility(visible);
#endif
}
@@ -605,7 +605,7 @@ process:
}
}
- resized |=
+ resized |=
lastWidth != Screen::GetWidth() ||
lastHeight != Screen::GetHeight();
if (resized) {
diff --git a/src/musikcube/musikcube.vcxproj b/src/musikcube/musikcube.vcxproj
index 4dd6d8c66..373130dbe 100755
--- a/src/musikcube/musikcube.vcxproj
+++ b/src/musikcube/musikcube.vcxproj
@@ -105,7 +105,7 @@
Disabled
./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../3rdparty/asio/asio/include;%(AdditionalIncludeDirectories)
- 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)
+ $(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)
true
EnableFastChecks
MultiThreadedDebug
@@ -152,7 +152,7 @@ xcopy "$(SolutionDir)src\3rdparty\bin\win\font\*.ttf" "$(TargetDir)fonts\" /Y /e
Disabled
./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../3rdparty/asio/asio/include;%(AdditionalIncludeDirectories)
- 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)
+ $(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)
EnableFastChecks
MultiThreadedDebug
Use
@@ -196,7 +196,7 @@ xcopy "$(SolutionDir)src\3rdparty\bin\win\font\*.ttf" "$(TargetDir)fonts\" /Y /e
./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../3rdparty/asio/asio/include;%(AdditionalIncludeDirectories)
- 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)
+ $(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)
MultiThreaded
Use
Level3
@@ -249,7 +249,7 @@ xcopy "$(SolutionDir)src\3rdparty\bin\win\font\*.ttf" "$(TargetDir)fonts\" /Y /e
./;../;./cursespp;../3rdparty/include;../3rdparty/win32_include;../3rdparty/asio/asio/include;%(AdditionalIncludeDirectories)
- 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)
+ $(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)
MultiThreaded
Use
Level3