From 77791217a09ce255f0e94cebc087e756fed76199 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Fri, 17 Apr 2009 21:53:48 +0000 Subject: [PATCH] Refactor Visual Studio 2008 build and make libauto3 and Lua 5.0 build on VC9. * The most important project properties (especially paths) are now stored in VSProps files in generalised ways. * Projects share VSProps files so they place output files in same locations and thus agree on where to find them. * Avoid inconsistencies between build configurations/platforms as has happened often before. * Now distributable binaries (aegisub.exe and aegisub-auto3.dll) will be placed in $(SolutionDir)/bin/, static libraries under $(SolutionDir)/lib/ and object files etc. under $(SolutionDir)/build/. Note that those locations are controlled by where the solution file is placed in the file system. * libauto3 is no longer pulled in by a #pragma in auto4_auto3.c, but must instead be pulled in by making the aegisub project depend on the auto3 project, which must in turn depend on the lua50 project. * Final binary filenames are now somewhat different. You get aegisub32.exe, aegisub64d.exe, aegisub-auto3lib32d.dll and more. * There's still more that can be factored out, things like optimisation flags and defines. Originally committed to SVN as r2819. --- .../aegisub_exe_filename.vsprops | 11 + .../aegisub_vs2008/aegisub_vs2008.vcproj | 24 +- .../contrib_includedirs.vsprops | 11 + .../aegisub_vs2008/libraries_outdirs.vsprops | 27 + .../shipped_stub_libs_dir.vsprops | 7 + .../aegisub_vs2008/suffix_debug32.vsprops | 11 + .../aegisub_vs2008/suffix_debug64.vsprops | 11 + .../aegisub_vs2008/suffix_release32.vsprops | 11 + .../aegisub_vs2008/suffix_release64.vsprops | 11 + aegisub/src/auto4_auto3.cpp | 4 - aegisub/src/libauto3/auto3_vc9.vcproj | 375 ++++++++++++++ aegisub/src/libauto3/auto3_vc9.vsprops | 16 + .../universalcharset_2008.vcproj | 16 +- contrib/csri/csri_2008.vcproj | 16 +- contrib/lua50/includedirs.vsprops | 7 + contrib/lua50/lua50_vc9.vcproj | 487 ++++++++++++++++++ contrib/lua51/lua51_vc9.vcproj | 28 +- 17 files changed, 1005 insertions(+), 68 deletions(-) create mode 100644 aegisub/build/aegisub_vs2008/aegisub_exe_filename.vsprops create mode 100644 aegisub/build/aegisub_vs2008/contrib_includedirs.vsprops create mode 100644 aegisub/build/aegisub_vs2008/libraries_outdirs.vsprops create mode 100644 aegisub/build/aegisub_vs2008/shipped_stub_libs_dir.vsprops create mode 100644 aegisub/build/aegisub_vs2008/suffix_debug32.vsprops create mode 100644 aegisub/build/aegisub_vs2008/suffix_debug64.vsprops create mode 100644 aegisub/build/aegisub_vs2008/suffix_release32.vsprops create mode 100644 aegisub/build/aegisub_vs2008/suffix_release64.vsprops create mode 100644 aegisub/src/libauto3/auto3_vc9.vcproj create mode 100644 aegisub/src/libauto3/auto3_vc9.vsprops create mode 100644 contrib/lua50/includedirs.vsprops create mode 100644 contrib/lua50/lua50_vc9.vcproj diff --git a/aegisub/build/aegisub_vs2008/aegisub_exe_filename.vsprops b/aegisub/build/aegisub_vs2008/aegisub_exe_filename.vsprops new file mode 100644 index 000000000..5066f3bd3 --- /dev/null +++ b/aegisub/build/aegisub_vs2008/aegisub_exe_filename.vsprops @@ -0,0 +1,11 @@ + + + + diff --git a/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj b/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj index edd2aceba..dbf76c4f8 100644 --- a/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj +++ b/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj @@ -21,9 +21,9 @@ @@ -218,8 +210,6 @@ @@ -308,7 +295,6 @@ /> + + + diff --git a/aegisub/build/aegisub_vs2008/libraries_outdirs.vsprops b/aegisub/build/aegisub_vs2008/libraries_outdirs.vsprops new file mode 100644 index 000000000..f012a6c1f --- /dev/null +++ b/aegisub/build/aegisub_vs2008/libraries_outdirs.vsprops @@ -0,0 +1,27 @@ + + + + + + + diff --git a/aegisub/build/aegisub_vs2008/shipped_stub_libs_dir.vsprops b/aegisub/build/aegisub_vs2008/shipped_stub_libs_dir.vsprops new file mode 100644 index 000000000..29d03b70f --- /dev/null +++ b/aegisub/build/aegisub_vs2008/shipped_stub_libs_dir.vsprops @@ -0,0 +1,7 @@ + + + diff --git a/aegisub/build/aegisub_vs2008/suffix_debug32.vsprops b/aegisub/build/aegisub_vs2008/suffix_debug32.vsprops new file mode 100644 index 000000000..4c94fde59 --- /dev/null +++ b/aegisub/build/aegisub_vs2008/suffix_debug32.vsprops @@ -0,0 +1,11 @@ + + + + diff --git a/aegisub/build/aegisub_vs2008/suffix_debug64.vsprops b/aegisub/build/aegisub_vs2008/suffix_debug64.vsprops new file mode 100644 index 000000000..b5456fb24 --- /dev/null +++ b/aegisub/build/aegisub_vs2008/suffix_debug64.vsprops @@ -0,0 +1,11 @@ + + + + diff --git a/aegisub/build/aegisub_vs2008/suffix_release32.vsprops b/aegisub/build/aegisub_vs2008/suffix_release32.vsprops new file mode 100644 index 000000000..1bcb5227b --- /dev/null +++ b/aegisub/build/aegisub_vs2008/suffix_release32.vsprops @@ -0,0 +1,11 @@ + + + + diff --git a/aegisub/build/aegisub_vs2008/suffix_release64.vsprops b/aegisub/build/aegisub_vs2008/suffix_release64.vsprops new file mode 100644 index 000000000..d18e6d58f --- /dev/null +++ b/aegisub/build/aegisub_vs2008/suffix_release64.vsprops @@ -0,0 +1,11 @@ + + + + diff --git a/aegisub/src/auto4_auto3.cpp b/aegisub/src/auto4_auto3.cpp index feda45f1f..a97005c85 100644 --- a/aegisub/src/auto4_auto3.cpp +++ b/aegisub/src/auto4_auto3.cpp @@ -39,10 +39,6 @@ #ifdef WITH_AUTOMATION #ifdef WITH_AUTO3 -#if __VISUALC__ >= 1200 -#pragma comment(lib,"aegisub-auto3.lib") -#endif - #include #include #include "auto4_auto3.h" diff --git a/aegisub/src/libauto3/auto3_vc9.vcproj b/aegisub/src/libauto3/auto3_vc9.vcproj new file mode 100644 index 000000000..82fb2747a --- /dev/null +++ b/aegisub/src/libauto3/auto3_vc9.vcproj @@ -0,0 +1,375 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aegisub/src/libauto3/auto3_vc9.vsprops b/aegisub/src/libauto3/auto3_vc9.vsprops new file mode 100644 index 000000000..5001be863 --- /dev/null +++ b/aegisub/src/libauto3/auto3_vc9.vsprops @@ -0,0 +1,16 @@ + + + + + diff --git a/aegisub/universalchardet/universalcharset_2008.vcproj b/aegisub/universalchardet/universalcharset_2008.vcproj index f42f290a0..8586e3956 100644 --- a/aegisub/universalchardet/universalcharset_2008.vcproj +++ b/aegisub/universalchardet/universalcharset_2008.vcproj @@ -21,9 +21,8 @@ @@ -189,7 +184,6 @@ /> @@ -251,7 +244,6 @@ /> @@ -197,7 +192,6 @@ /> @@ -261,7 +254,6 @@ /> + + diff --git a/contrib/lua50/lua50_vc9.vcproj b/contrib/lua50/lua50_vc9.vcproj new file mode 100644 index 000000000..55703d7bd --- /dev/null +++ b/contrib/lua50/lua50_vc9.vcproj @@ -0,0 +1,487 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/lua51/lua51_vc9.vcproj b/contrib/lua51/lua51_vc9.vcproj index a50e98d0f..d322af9da 100644 --- a/contrib/lua51/lua51_vc9.vcproj +++ b/contrib/lua51/lua51_vc9.vcproj @@ -21,11 +21,9 @@