From e4a26202b1970a77b6a82ec9446f9aec2e596004 Mon Sep 17 00:00:00 2001 From: LukeLeo Date: Wed, 3 Aug 2016 21:51:56 +0800 Subject: [PATCH 1/6] Modify for VC2013 script --- templates/vc10.mpd | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) mode change 100644 => 100755 templates/vc10.mpd diff --git a/templates/vc10.mpd b/templates/vc10.mpd old mode 100644 new mode 100755 index af1bc8fce..abc582b5b --- a/templates/vc10.mpd +++ b/templates/vc10.mpd @@ -25,9 +25,11 @@ <%foreach(platforms)%> <%foreach(configurations)%> - <%if(type_is_dynamic)%>DynamicLibrary<%else%><%if(type_is_static && staticname)%>StaticLibrary<%else%><%if(custom_only)%>Utility<%else%><%if(makeoutput)%>Makefile<%else%>Application<%endif%><%endif%><%endif%><%endif%> + <%if(type_is_static && staticname)%>StaticLibrary<%else%><%if(type_is_dynamic)%>DynamicLibrary<%else%><%if(custom_only)%>Utility<%else%><%if(makeoutput)%>Makefile<%else%>Application<%endif%><%endif%><%endif%><%endif%> <%if(UseOfMFC)%> - <%UseOfMFC%> + <%if(compares(UseOfMFC,1))%>Static<%else%><%if(compares(UseOfMFC,2))%>Dynamic<%endif%><%endif%> +<%else%> + false <%endif%> <%if(UseOfATL)%> <%UseOfATL%> @@ -88,7 +90,7 @@ <%makeclean%> CONF=<%configuration%> <%makeoutput%> <%else%> - <%if(type_is_dynamic)%><%if(dllout)%><%dllout%>\<%else%><%libout%>\<%endif%><%else%><%if(type_is_static)%><%libout%>\<%else%><%if(exeout)%><%exeout%>\<%if(windows_style)%><%output_dir("Debug")%>\<%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%>\<%else%><%output_dir(".")%>\<%endif%><%endif%><%endif%><%endif%> + <%if(type_is_dynamic)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%><%else%><%if(type_is_static&&staticname)%><%libout%><%else%><%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug")%><%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%><%endif%><%endif%> <%if(intdir)%><%intdir%>\<%else%><%intermediate_dir%>\<%noextension(project_file)%>\<%if(output_subdir)%><%output_subdir%>\<%endif%><%endif%> <%if(debug_prj)%>true<%else%>false<%endif%> <%if(type_is_dynamic)%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%else%><%if(type_is_static)%><%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%else%><%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%endif%><%endif%> @@ -193,7 +195,13 @@ <%if(SmallerTypeCheck)%> true <%endif%> - <%if(runtime_library)%><%runtime_library%><%else%><%if(type_is_static || need_staticflags)%><%if(debug_prj)%>MultiThreadedDebug<%else%>MultiThreaded<%endif%><%else%><%if(debug_prj)%>MultiThreadedDebugDLL<%else%>MultiThreadedDLL<%endif%><%endif%><%endif%> + +<%if(runtime_library)%> + <%if(compares(runtime_library,0))%>MultiThreaded<%else%><%if(compares(runtime_library,1))%>MultiThreadedDebug<%else%><%if(compares(runtime_library,2))%>MultiThreadedDLL<%else%><%if(compares(runtime_library,3))%>MultiThreadedDebugDLL<%endif%><%endif%><%endif%><%endif%> +<%else%> + <%if(type_is_static || need_staticflags)%><%if(debug_prj)%>MultiThreadedDebug<%else%>MultiThreaded<%endif%><%else%><%if(debug_prj)%>MultiThreadedDebugDLL<%else%>MultiThreadedDLL<%endif%><%endif%> +<%endif%> + <%if(StructMemberAlignment)%> <%StructMemberAlignment%> <%endif%> @@ -272,9 +280,11 @@ <%BrowseInformationFile%> <%endif%> <%if(compares(warning_level, all))%>EnableAllWarnings<%else%><%if(compares(warning_level, none) || compares(warning_level, 0))%>TurnOffAllWarnings<%else%>Level<%warning_level("3")%><%endif%><%endif%> + <%if(!managed && debug_format)%> - <%debug_format%> + <%if(compares(debug_format, 0))%>None<%else%><%if(compares(debug_format, 1))%>OldStyle<%else%><%if(compares(debug_format, 2))%>ProgramDatabase<%else%><%if(compares(debug_format, 3))%>EditAndContinue<%endif%><%endif%><%endif%><%endif%> <%endif%> + <%if(CallingConvention)%> <%CallingConvention%> <%endif%> @@ -337,12 +347,12 @@ <%eval(prelink)%> <%endif%> -<%if(type_is_static)%> +<%if(type_is_static && staticname)%> <%if(staticname)%> <%libout%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%> <%endif%> - %(AdditionalDependencies) + <%foreach(reverse(libs))%><%fornotfirst(";")%><%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%><%endfor%><%foreach(reverse(lit_libs))%>;<%lit_lib%>.lib<%endfor%><%foreach(reverse(pure_libs))%> <%pure_lib%><%endfor%>;%(AdditionalDependencies) <%foreach(libpaths)%><%libpath%>;<%endfor%>%(AdditionalLibraryDirectories) <%if(SuppressStartupBanner)%> true @@ -406,7 +416,8 @@ <%if(GenerateDebugInformation)%> <%GenerateDebugInformation%> <%endif%> - <%foreach(reverse(libs))%><%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>;<%endfor%><%foreach(reverse(lit_libs))%><%lit_lib%>.lib;<%endfor%><%foreach(reverse(pure_libs))%> <%pure_lib%>;<%endfor%>%(AdditionalDependencies) + <%foreach(reverse(libs))%><%fornotfirst(";")%><%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%><%endfor%><%foreach(reverse(lit_libs))%>;<%lit_lib%>.lib<%endfor%><%foreach(reverse(pure_libs))%> <%pure_lib%><%endfor%>;%(AdditionalDependencies) + <%foreach(libpaths)%><%libpath%>;<%endfor%>%(AdditionalLibraryDirectories) <%if(exename || sharedname || staticname)%> $(OutDir)<%if(type_is_dynamic)%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%else%><%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%><%endif%> <%endif%> @@ -425,7 +436,9 @@ <%if(PerUserRedirection)%> true <%endif%> + <%if(LinkStatus)%> true <%endif%> @@ -846,9 +859,9 @@ <%endfor%> <%endif%> -<%if(resource_files && !type_is_static)%> +<%if(resource_files)%> -<%foreach(resource_files)%> +<%foreach(uniq(resource_files))%> <<%if(ends_with(resource_file,\.rc))%>ResourceCompile<%else%>None<%endif%> Include="<%resource_file%>" /> <%endfor%> From 8b41a4676a7a87f762589d013d1509b9edbfb15e Mon Sep 17 00:00:00 2001 From: LukeLeo Date: Thu, 25 Aug 2016 20:25:45 +0800 Subject: [PATCH 2/6] add often used mpb file --- config/lukeCrashRpt.mpb | 10 ++++++++++ config/lukeCrashRpts.mpb | 10 ++++++++++ config/lukeace.mpb | 8 ++++++++ config/lukecvimageu.mpb | 7 +++++++ config/lukecvimageus.mpb | 7 +++++++ config/lukedsagentu.mpb | 7 +++++++ config/lukedsagentus.mpb | 7 +++++++ config/lukedslibus.mpb | 9 +++++++++ config/lukeexe.mpb | 5 +++++ config/lukelibutilsu.mpb | 7 +++++++ config/lukelibutilsus.mpb | 7 +++++++ config/lukelogu.mpb | 7 +++++++ config/lukelogus.mpb | 12 ++++++++++++ config/lukemfcs.mpb | 10 ++++++++++ config/lukeopenssl.mpb | 7 +++++++ config/lukercsvnver.mpb | 12 ++++++++++++ config/lukesqlite.mpb | 23 +++++++++++++++++++++++ config/lukestatic.mpb | 6 ++++++ config/lukexvid.mpb | 7 +++++++ templates/vc10.mpd | 33 +++++++++++++++++++++++---------- 20 files changed, 191 insertions(+), 10 deletions(-) create mode 100644 config/lukeCrashRpt.mpb create mode 100644 config/lukeCrashRpts.mpb create mode 100644 config/lukeace.mpb create mode 100644 config/lukecvimageu.mpb create mode 100644 config/lukecvimageus.mpb create mode 100644 config/lukedsagentu.mpb create mode 100644 config/lukedsagentus.mpb create mode 100644 config/lukedslibus.mpb create mode 100644 config/lukeexe.mpb create mode 100644 config/lukelibutilsu.mpb create mode 100644 config/lukelibutilsus.mpb create mode 100644 config/lukelogu.mpb create mode 100644 config/lukelogus.mpb create mode 100644 config/lukemfcs.mpb create mode 100644 config/lukeopenssl.mpb create mode 100644 config/lukercsvnver.mpb create mode 100644 config/lukesqlite.mpb create mode 100644 config/lukestatic.mpb create mode 100644 config/lukexvid.mpb diff --git a/config/lukeCrashRpt.mpb b/config/lukeCrashRpt.mpb new file mode 100644 index 000000000..0277084a7 --- /dev/null +++ b/config/lukeCrashRpt.mpb @@ -0,0 +1,10 @@ +project{ + libs+=CrashRpt1403 + includes +=$(LMX_LIB_ROOT)\CrashRpt\include + specific(prop:microsoft) { + libpaths +=$(LMX_LIB_ROOT)\CrashRpt\$(PlatformName)\lib + Release::optimize=0 + Release::GenerateDebugInformation=true + Release::debug_format=3 + } +} \ No newline at end of file diff --git a/config/lukeCrashRpts.mpb b/config/lukeCrashRpts.mpb new file mode 100644 index 000000000..8e99d6822 --- /dev/null +++ b/config/lukeCrashRpts.mpb @@ -0,0 +1,10 @@ +project{ + libs+=CrashRpt1403s + includes +=$(LMX_LIB_ROOT)\CrashRpt\include + specific(prop:microsoft) { + libpaths +=$(LMX_LIB_ROOT)\CrashRpt\$(PlatformName)\lib + Release::optimize=0 + Release::GenerateDebugInformation=true + Release::debug_format=3 + } +} \ No newline at end of file diff --git a/config/lukeace.mpb b/config/lukeace.mpb new file mode 100644 index 000000000..405c630cd --- /dev/null +++ b/config/lukeace.mpb @@ -0,0 +1,8 @@ +project{ + libs+=ACE + libpaths+=$(ACE_ROOT)\lib + includes+=$(ACE_ROOT) + specific(prop:microsoft) { + DisableSpecificWarnings += 4996 + } +} diff --git a/config/lukecvimageu.mpb b/config/lukecvimageu.mpb new file mode 100644 index 000000000..65ee0b5ab --- /dev/null +++ b/config/lukecvimageu.mpb @@ -0,0 +1,7 @@ +project{ + libs+=pngu jpegu zlibu jbigu jasperu libpsdu mngu libdcru CxImageu + includes +=$(LMX_LIB_ROOT)\CxImage\include + specific(prop:microsoft) { + libpaths +=$(LMX_LIB_ROOT)\CxImage\Unicode\$(PlatformName)\lib + } +} \ No newline at end of file diff --git a/config/lukecvimageus.mpb b/config/lukecvimageus.mpb new file mode 100644 index 000000000..b663d3917 --- /dev/null +++ b/config/lukecvimageus.mpb @@ -0,0 +1,7 @@ +project{ + libs+=pngus jpegus zlibus jbigus jasperus libpsdus mngus libdcrus CxImageus + includes +=$(LMX_LIB_ROOT)\CxImage\include + specific(prop:microsoft) { + libpaths +=$(LMX_LIB_ROOT)\CxImage\Unicode\$(PlatformName)\lib + } +} \ No newline at end of file diff --git a/config/lukedsagentu.mpb b/config/lukedsagentu.mpb new file mode 100644 index 000000000..908163636 --- /dev/null +++ b/config/lukedsagentu.mpb @@ -0,0 +1,7 @@ +project{ + libs+=DShowUtilAgentu + includes +=$(LMX_LIB_ROOT)\DShowUtilAgent\include + specific(prop:microsoft) { + libpaths +=$(LMX_LIB_ROOT)\DShowUtilAgent\Unicode\$(PlatformName)\lib + } +} \ No newline at end of file diff --git a/config/lukedsagentus.mpb b/config/lukedsagentus.mpb new file mode 100644 index 000000000..485929bcb --- /dev/null +++ b/config/lukedsagentus.mpb @@ -0,0 +1,7 @@ +project{ + libs+=DShowUtilAgentus + includes +=$(LMX_LIB_ROOT)\DShowUtilAgent\include + specific(prop:microsoft) { + libpaths +=$(LMX_LIB_ROOT)\DShowUtilAgent\Unicode\$(PlatformName)\lib + } +} \ No newline at end of file diff --git a/config/lukedslibus.mpb b/config/lukedslibus.mpb new file mode 100644 index 000000000..fb39e684f --- /dev/null +++ b/config/lukedslibus.mpb @@ -0,0 +1,9 @@ +project{ + libs+=DShowUtilLibus BaseClassesus libxvidcore + lit_libs+=strmiids + includes +=$(LMX_LIB_ROOT)\DShowUtilAgent\include + specific(prop:microsoft) { + libpaths +=$(LMX_LIB_ROOT)\DShowUtilAgent\Unicode\$(PlatformName)\lib + libpaths +=$(LMX_LIB_ROOT)\xvidcore\$(PlatformName)\lib + } +} \ No newline at end of file diff --git a/config/lukeexe.mpb b/config/lukeexe.mpb new file mode 100644 index 000000000..6c01afb7d --- /dev/null +++ b/config/lukeexe.mpb @@ -0,0 +1,5 @@ +project: winapp{ + specific(prop:microsoft) { + Debug::exe_ext = _Debug.exe + } +} diff --git a/config/lukelibutilsu.mpb b/config/lukelibutilsu.mpb new file mode 100644 index 000000000..bfd2e5238 --- /dev/null +++ b/config/lukelibutilsu.mpb @@ -0,0 +1,7 @@ +project{ + libs+=LmxLibUtilToolsu + includes +=$(LMX_LIB_ROOT)\LmxLibUtilTools\include + specific(prop:microsoft) { + libpaths +=$(LMX_LIB_ROOT)\LmxLibUtilTools\Unicode\$(PlatformName)\lib + } +} \ No newline at end of file diff --git a/config/lukelibutilsus.mpb b/config/lukelibutilsus.mpb new file mode 100644 index 000000000..da7ada3b1 --- /dev/null +++ b/config/lukelibutilsus.mpb @@ -0,0 +1,7 @@ +project{ + libs+=LmxLibUtilToolsus + includes +=$(LMX_LIB_ROOT)\LmxLibUtilTools\include + specific(prop:microsoft) { + libpaths +=$(LMX_LIB_ROOT)\LmxLibUtilTools\Unicode\$(PlatformName)\lib + } +} \ No newline at end of file diff --git a/config/lukelogu.mpb b/config/lukelogu.mpb new file mode 100644 index 000000000..c352ff4d8 --- /dev/null +++ b/config/lukelogu.mpb @@ -0,0 +1,7 @@ +project{ + libs+=Log4cplusAgentu + includes +=$(LMX_LIB_ROOT)\log4cplus\include + specific(prop:microsoft) { + libpaths +=$(LMX_LIB_ROOT)\log4cplus\Unicode\$(PlatformName)\lib + } +} \ No newline at end of file diff --git a/config/lukelogus.mpb b/config/lukelogus.mpb new file mode 100644 index 000000000..565244dc8 --- /dev/null +++ b/config/lukelogus.mpb @@ -0,0 +1,12 @@ +project{ + libs+=Log4cplusAgentus + + expand(LMX_LIB_ROOT){ + $(LMX_LIB_ROOT) + } + + includes +=$(LMX_LIB_ROOT)\log4cplus\include + specific(prop:microsoft) { + libpaths +=$(LMX_LIB_ROOT)\log4cplus\Unicode\$(PlatformName)\lib + } +} \ No newline at end of file diff --git a/config/lukemfcs.mpb b/config/lukemfcs.mpb new file mode 100644 index 000000000..07f20e24e --- /dev/null +++ b/config/lukemfcs.mpb @@ -0,0 +1,10 @@ +project: winapp{ + requires += mfc + + specific(prop:microsoft) { + UseOfMFC=1 + unicode_mfc_entry = wWinMainCRTStartup + Debug::runtime_library = 1 + Release::runtime_library = 0 + } +} diff --git a/config/lukeopenssl.mpb b/config/lukeopenssl.mpb new file mode 100644 index 000000000..38c83c626 --- /dev/null +++ b/config/lukeopenssl.mpb @@ -0,0 +1,7 @@ +project{ + lit_libs+=ssleay32 libeay32 + includes +=$(SSL_ROOT)\include + specific(prop:microsoft) { + libpaths +=$(SSL_ROOT)\$(PlatformName)\lib + } +} \ No newline at end of file diff --git a/config/lukercsvnver.mpb b/config/lukercsvnver.mpb new file mode 100644 index 000000000..1784972e7 --- /dev/null +++ b/config/lukercsvnver.mpb @@ -0,0 +1,12 @@ +project{ + specific(prop:microsoft){ + Release::prebuild += PreBuildEx.bat $(SolutionDir) $(ProjectDir) $(ProjectName) 1 $(PlatformName) + } + + expand(ProjectName){ + $(ProjectName) + } + Resource_Files{ + $(ProjectName).rc + } +} \ No newline at end of file diff --git a/config/lukesqlite.mpb b/config/lukesqlite.mpb new file mode 100644 index 000000000..c357502a1 --- /dev/null +++ b/config/lukesqlite.mpb @@ -0,0 +1,23 @@ +project{ + libs+=sqlite3 + + expand(LMX_LIB_ROOT){ + $(LMX_LIB_ROOT) + } + + macros+=SQLITE_HAS_CODEC + + includes +=$(LMX_LIB_ROOT)\sqlite3\include + specific(prop:microsoft) { + libpaths +=$(LMX_LIB_ROOT)\sqlite3\$(PlatformName)\lib + } + + Source_Files{ + *.cpp + CppSqlite{ + no_pch=1 + $(LMX_LIB_ROOT)\sqlite3\Src\CppSQLite3.cpp + $(LMX_LIB_ROOT)\sqlite3\Src\CodingConv.cpp + } + } +} \ No newline at end of file diff --git a/config/lukestatic.mpb b/config/lukestatic.mpb new file mode 100644 index 000000000..83b9b7f02 --- /dev/null +++ b/config/lukestatic.mpb @@ -0,0 +1,6 @@ +project{ + specific(prop:microsoft) { + Debug::runtime_library = 1 + Release::runtime_library = 0 + } +} diff --git a/config/lukexvid.mpb b/config/lukexvid.mpb new file mode 100644 index 000000000..1e5079fdc --- /dev/null +++ b/config/lukexvid.mpb @@ -0,0 +1,7 @@ +project{ + libs+=libxvidcore + includes +=$(LMX_LIB_ROOT)\xvidcore\include + specific(prop:microsoft) { + libpaths +=$(LMX_LIB_ROOT)\xvidcore\$(PlatformName)\lib + } +} \ No newline at end of file diff --git a/templates/vc10.mpd b/templates/vc10.mpd index af1bc8fce..abc582b5b 100644 --- a/templates/vc10.mpd +++ b/templates/vc10.mpd @@ -25,9 +25,11 @@ <%foreach(platforms)%> <%foreach(configurations)%> - <%if(type_is_dynamic)%>DynamicLibrary<%else%><%if(type_is_static && staticname)%>StaticLibrary<%else%><%if(custom_only)%>Utility<%else%><%if(makeoutput)%>Makefile<%else%>Application<%endif%><%endif%><%endif%><%endif%> + <%if(type_is_static && staticname)%>StaticLibrary<%else%><%if(type_is_dynamic)%>DynamicLibrary<%else%><%if(custom_only)%>Utility<%else%><%if(makeoutput)%>Makefile<%else%>Application<%endif%><%endif%><%endif%><%endif%> <%if(UseOfMFC)%> - <%UseOfMFC%> + <%if(compares(UseOfMFC,1))%>Static<%else%><%if(compares(UseOfMFC,2))%>Dynamic<%endif%><%endif%> +<%else%> + false <%endif%> <%if(UseOfATL)%> <%UseOfATL%> @@ -88,7 +90,7 @@ <%makeclean%> CONF=<%configuration%> <%makeoutput%> <%else%> - <%if(type_is_dynamic)%><%if(dllout)%><%dllout%>\<%else%><%libout%>\<%endif%><%else%><%if(type_is_static)%><%libout%>\<%else%><%if(exeout)%><%exeout%>\<%if(windows_style)%><%output_dir("Debug")%>\<%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%>\<%else%><%output_dir(".")%>\<%endif%><%endif%><%endif%><%endif%> + <%if(type_is_dynamic)%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%><%else%><%if(type_is_static&&staticname)%><%libout%><%else%><%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug")%><%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%><%endif%><%endif%> <%if(intdir)%><%intdir%>\<%else%><%intermediate_dir%>\<%noextension(project_file)%>\<%if(output_subdir)%><%output_subdir%>\<%endif%><%endif%> <%if(debug_prj)%>true<%else%>false<%endif%> <%if(type_is_dynamic)%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%else%><%if(type_is_static)%><%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%else%><%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%endif%><%endif%> @@ -193,7 +195,13 @@ <%if(SmallerTypeCheck)%> true <%endif%> - <%if(runtime_library)%><%runtime_library%><%else%><%if(type_is_static || need_staticflags)%><%if(debug_prj)%>MultiThreadedDebug<%else%>MultiThreaded<%endif%><%else%><%if(debug_prj)%>MultiThreadedDebugDLL<%else%>MultiThreadedDLL<%endif%><%endif%><%endif%> + +<%if(runtime_library)%> + <%if(compares(runtime_library,0))%>MultiThreaded<%else%><%if(compares(runtime_library,1))%>MultiThreadedDebug<%else%><%if(compares(runtime_library,2))%>MultiThreadedDLL<%else%><%if(compares(runtime_library,3))%>MultiThreadedDebugDLL<%endif%><%endif%><%endif%><%endif%> +<%else%> + <%if(type_is_static || need_staticflags)%><%if(debug_prj)%>MultiThreadedDebug<%else%>MultiThreaded<%endif%><%else%><%if(debug_prj)%>MultiThreadedDebugDLL<%else%>MultiThreadedDLL<%endif%><%endif%> +<%endif%> + <%if(StructMemberAlignment)%> <%StructMemberAlignment%> <%endif%> @@ -272,9 +280,11 @@ <%BrowseInformationFile%> <%endif%> <%if(compares(warning_level, all))%>EnableAllWarnings<%else%><%if(compares(warning_level, none) || compares(warning_level, 0))%>TurnOffAllWarnings<%else%>Level<%warning_level("3")%><%endif%><%endif%> + <%if(!managed && debug_format)%> - <%debug_format%> + <%if(compares(debug_format, 0))%>None<%else%><%if(compares(debug_format, 1))%>OldStyle<%else%><%if(compares(debug_format, 2))%>ProgramDatabase<%else%><%if(compares(debug_format, 3))%>EditAndContinue<%endif%><%endif%><%endif%><%endif%> <%endif%> + <%if(CallingConvention)%> <%CallingConvention%> <%endif%> @@ -337,12 +347,12 @@ <%eval(prelink)%> <%endif%> -<%if(type_is_static)%> +<%if(type_is_static && staticname)%> <%if(staticname)%> <%libout%>\<%libname_prefix%><%staticname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%> <%endif%> - %(AdditionalDependencies) + <%foreach(reverse(libs))%><%fornotfirst(";")%><%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%><%endfor%><%foreach(reverse(lit_libs))%>;<%lit_lib%>.lib<%endfor%><%foreach(reverse(pure_libs))%> <%pure_lib%><%endfor%>;%(AdditionalDependencies) <%foreach(libpaths)%><%libpath%>;<%endfor%>%(AdditionalLibraryDirectories) <%if(SuppressStartupBanner)%> true @@ -406,7 +416,8 @@ <%if(GenerateDebugInformation)%> <%GenerateDebugInformation%> <%endif%> - <%foreach(reverse(libs))%><%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%>;<%endfor%><%foreach(reverse(lit_libs))%><%lit_lib%>.lib;<%endfor%><%foreach(reverse(pure_libs))%> <%pure_lib%>;<%endfor%>%(AdditionalDependencies) + <%foreach(reverse(libs))%><%fornotfirst(";")%><%libname_prefix%><%lib%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%lib_ext%><%endfor%><%foreach(reverse(lit_libs))%>;<%lit_lib%>.lib<%endfor%><%foreach(reverse(pure_libs))%> <%pure_lib%><%endfor%>;%(AdditionalDependencies) + <%foreach(libpaths)%><%libpath%>;<%endfor%>%(AdditionalLibraryDirectories) <%if(exename || sharedname || staticname)%> $(OutDir)<%if(type_is_dynamic)%><%libname_prefix%><%sharedname%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%else%><%exename%><%if(use_exe_modifier)%><%lib_modifier%><%endif%><%exe_ext%><%endif%> <%endif%> @@ -425,7 +436,9 @@ <%if(PerUserRedirection)%> true <%endif%> + <%if(LinkStatus)%> true <%endif%> @@ -846,9 +859,9 @@ <%endfor%> <%endif%> -<%if(resource_files && !type_is_static)%> +<%if(resource_files)%> -<%foreach(resource_files)%> +<%foreach(uniq(resource_files))%> <<%if(ends_with(resource_file,\.rc))%>ResourceCompile<%else%>None<%endif%> Include="<%resource_file%>" /> <%endfor%> From daad02e28ccab9be8728723c728af9a456cc6994 Mon Sep 17 00:00:00 2001 From: Luke Date: Tue, 13 Sep 2016 10:15:10 +0800 Subject: [PATCH 3/6] Create README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000..bcaac344e --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# MPC +MPC (The Makefile, Project, and Workspace Creator)是一个可以生成工程脚本的工具,通过该工具可以在多个平台生成C++的工程脚本,虽然它的名声可能没有Cmake大,但它的功能完全可以甩cmake好几条街。 From 5fca0061d6ab1759616d536c318cf3ce26ed78aa Mon Sep 17 00:00:00 2001 From: LukeLeo Date: Wed, 28 Sep 2016 10:02:19 +0800 Subject: [PATCH 4/6] remove private config script --- config/lukeCrashRpt.mpb | 10 ---------- config/lukeCrashRpts.mpb | 10 ---------- config/lukeace.mpb | 8 -------- config/lukecvimageu.mpb | 7 ------- config/lukecvimageus.mpb | 7 ------- config/lukedsagentu.mpb | 7 ------- config/lukedsagentus.mpb | 7 ------- config/lukedslibus.mpb | 9 --------- config/lukeexe.mpb | 5 ----- config/lukelibutilsu.mpb | 7 ------- config/lukelibutilsus.mpb | 7 ------- config/lukelogu.mpb | 7 ------- config/lukelogus.mpb | 12 ------------ config/lukemfcs.mpb | 10 ---------- config/lukeopenssl.mpb | 7 ------- config/lukercsvnver.mpb | 12 ------------ config/lukesqlite.mpb | 23 ----------------------- config/lukestatic.mpb | 6 ------ config/lukexvid.mpb | 7 ------- 19 files changed, 168 deletions(-) delete mode 100644 config/lukeCrashRpt.mpb delete mode 100644 config/lukeCrashRpts.mpb delete mode 100644 config/lukeace.mpb delete mode 100644 config/lukecvimageu.mpb delete mode 100644 config/lukecvimageus.mpb delete mode 100644 config/lukedsagentu.mpb delete mode 100644 config/lukedsagentus.mpb delete mode 100644 config/lukedslibus.mpb delete mode 100644 config/lukeexe.mpb delete mode 100644 config/lukelibutilsu.mpb delete mode 100644 config/lukelibutilsus.mpb delete mode 100644 config/lukelogu.mpb delete mode 100644 config/lukelogus.mpb delete mode 100644 config/lukemfcs.mpb delete mode 100644 config/lukeopenssl.mpb delete mode 100644 config/lukercsvnver.mpb delete mode 100644 config/lukesqlite.mpb delete mode 100644 config/lukestatic.mpb delete mode 100644 config/lukexvid.mpb diff --git a/config/lukeCrashRpt.mpb b/config/lukeCrashRpt.mpb deleted file mode 100644 index 0277084a7..000000000 --- a/config/lukeCrashRpt.mpb +++ /dev/null @@ -1,10 +0,0 @@ -project{ - libs+=CrashRpt1403 - includes +=$(LMX_LIB_ROOT)\CrashRpt\include - specific(prop:microsoft) { - libpaths +=$(LMX_LIB_ROOT)\CrashRpt\$(PlatformName)\lib - Release::optimize=0 - Release::GenerateDebugInformation=true - Release::debug_format=3 - } -} \ No newline at end of file diff --git a/config/lukeCrashRpts.mpb b/config/lukeCrashRpts.mpb deleted file mode 100644 index 8e99d6822..000000000 --- a/config/lukeCrashRpts.mpb +++ /dev/null @@ -1,10 +0,0 @@ -project{ - libs+=CrashRpt1403s - includes +=$(LMX_LIB_ROOT)\CrashRpt\include - specific(prop:microsoft) { - libpaths +=$(LMX_LIB_ROOT)\CrashRpt\$(PlatformName)\lib - Release::optimize=0 - Release::GenerateDebugInformation=true - Release::debug_format=3 - } -} \ No newline at end of file diff --git a/config/lukeace.mpb b/config/lukeace.mpb deleted file mode 100644 index 405c630cd..000000000 --- a/config/lukeace.mpb +++ /dev/null @@ -1,8 +0,0 @@ -project{ - libs+=ACE - libpaths+=$(ACE_ROOT)\lib - includes+=$(ACE_ROOT) - specific(prop:microsoft) { - DisableSpecificWarnings += 4996 - } -} diff --git a/config/lukecvimageu.mpb b/config/lukecvimageu.mpb deleted file mode 100644 index 65ee0b5ab..000000000 --- a/config/lukecvimageu.mpb +++ /dev/null @@ -1,7 +0,0 @@ -project{ - libs+=pngu jpegu zlibu jbigu jasperu libpsdu mngu libdcru CxImageu - includes +=$(LMX_LIB_ROOT)\CxImage\include - specific(prop:microsoft) { - libpaths +=$(LMX_LIB_ROOT)\CxImage\Unicode\$(PlatformName)\lib - } -} \ No newline at end of file diff --git a/config/lukecvimageus.mpb b/config/lukecvimageus.mpb deleted file mode 100644 index b663d3917..000000000 --- a/config/lukecvimageus.mpb +++ /dev/null @@ -1,7 +0,0 @@ -project{ - libs+=pngus jpegus zlibus jbigus jasperus libpsdus mngus libdcrus CxImageus - includes +=$(LMX_LIB_ROOT)\CxImage\include - specific(prop:microsoft) { - libpaths +=$(LMX_LIB_ROOT)\CxImage\Unicode\$(PlatformName)\lib - } -} \ No newline at end of file diff --git a/config/lukedsagentu.mpb b/config/lukedsagentu.mpb deleted file mode 100644 index 908163636..000000000 --- a/config/lukedsagentu.mpb +++ /dev/null @@ -1,7 +0,0 @@ -project{ - libs+=DShowUtilAgentu - includes +=$(LMX_LIB_ROOT)\DShowUtilAgent\include - specific(prop:microsoft) { - libpaths +=$(LMX_LIB_ROOT)\DShowUtilAgent\Unicode\$(PlatformName)\lib - } -} \ No newline at end of file diff --git a/config/lukedsagentus.mpb b/config/lukedsagentus.mpb deleted file mode 100644 index 485929bcb..000000000 --- a/config/lukedsagentus.mpb +++ /dev/null @@ -1,7 +0,0 @@ -project{ - libs+=DShowUtilAgentus - includes +=$(LMX_LIB_ROOT)\DShowUtilAgent\include - specific(prop:microsoft) { - libpaths +=$(LMX_LIB_ROOT)\DShowUtilAgent\Unicode\$(PlatformName)\lib - } -} \ No newline at end of file diff --git a/config/lukedslibus.mpb b/config/lukedslibus.mpb deleted file mode 100644 index fb39e684f..000000000 --- a/config/lukedslibus.mpb +++ /dev/null @@ -1,9 +0,0 @@ -project{ - libs+=DShowUtilLibus BaseClassesus libxvidcore - lit_libs+=strmiids - includes +=$(LMX_LIB_ROOT)\DShowUtilAgent\include - specific(prop:microsoft) { - libpaths +=$(LMX_LIB_ROOT)\DShowUtilAgent\Unicode\$(PlatformName)\lib - libpaths +=$(LMX_LIB_ROOT)\xvidcore\$(PlatformName)\lib - } -} \ No newline at end of file diff --git a/config/lukeexe.mpb b/config/lukeexe.mpb deleted file mode 100644 index 6c01afb7d..000000000 --- a/config/lukeexe.mpb +++ /dev/null @@ -1,5 +0,0 @@ -project: winapp{ - specific(prop:microsoft) { - Debug::exe_ext = _Debug.exe - } -} diff --git a/config/lukelibutilsu.mpb b/config/lukelibutilsu.mpb deleted file mode 100644 index bfd2e5238..000000000 --- a/config/lukelibutilsu.mpb +++ /dev/null @@ -1,7 +0,0 @@ -project{ - libs+=LmxLibUtilToolsu - includes +=$(LMX_LIB_ROOT)\LmxLibUtilTools\include - specific(prop:microsoft) { - libpaths +=$(LMX_LIB_ROOT)\LmxLibUtilTools\Unicode\$(PlatformName)\lib - } -} \ No newline at end of file diff --git a/config/lukelibutilsus.mpb b/config/lukelibutilsus.mpb deleted file mode 100644 index da7ada3b1..000000000 --- a/config/lukelibutilsus.mpb +++ /dev/null @@ -1,7 +0,0 @@ -project{ - libs+=LmxLibUtilToolsus - includes +=$(LMX_LIB_ROOT)\LmxLibUtilTools\include - specific(prop:microsoft) { - libpaths +=$(LMX_LIB_ROOT)\LmxLibUtilTools\Unicode\$(PlatformName)\lib - } -} \ No newline at end of file diff --git a/config/lukelogu.mpb b/config/lukelogu.mpb deleted file mode 100644 index c352ff4d8..000000000 --- a/config/lukelogu.mpb +++ /dev/null @@ -1,7 +0,0 @@ -project{ - libs+=Log4cplusAgentu - includes +=$(LMX_LIB_ROOT)\log4cplus\include - specific(prop:microsoft) { - libpaths +=$(LMX_LIB_ROOT)\log4cplus\Unicode\$(PlatformName)\lib - } -} \ No newline at end of file diff --git a/config/lukelogus.mpb b/config/lukelogus.mpb deleted file mode 100644 index 565244dc8..000000000 --- a/config/lukelogus.mpb +++ /dev/null @@ -1,12 +0,0 @@ -project{ - libs+=Log4cplusAgentus - - expand(LMX_LIB_ROOT){ - $(LMX_LIB_ROOT) - } - - includes +=$(LMX_LIB_ROOT)\log4cplus\include - specific(prop:microsoft) { - libpaths +=$(LMX_LIB_ROOT)\log4cplus\Unicode\$(PlatformName)\lib - } -} \ No newline at end of file diff --git a/config/lukemfcs.mpb b/config/lukemfcs.mpb deleted file mode 100644 index 07f20e24e..000000000 --- a/config/lukemfcs.mpb +++ /dev/null @@ -1,10 +0,0 @@ -project: winapp{ - requires += mfc - - specific(prop:microsoft) { - UseOfMFC=1 - unicode_mfc_entry = wWinMainCRTStartup - Debug::runtime_library = 1 - Release::runtime_library = 0 - } -} diff --git a/config/lukeopenssl.mpb b/config/lukeopenssl.mpb deleted file mode 100644 index 38c83c626..000000000 --- a/config/lukeopenssl.mpb +++ /dev/null @@ -1,7 +0,0 @@ -project{ - lit_libs+=ssleay32 libeay32 - includes +=$(SSL_ROOT)\include - specific(prop:microsoft) { - libpaths +=$(SSL_ROOT)\$(PlatformName)\lib - } -} \ No newline at end of file diff --git a/config/lukercsvnver.mpb b/config/lukercsvnver.mpb deleted file mode 100644 index 1784972e7..000000000 --- a/config/lukercsvnver.mpb +++ /dev/null @@ -1,12 +0,0 @@ -project{ - specific(prop:microsoft){ - Release::prebuild += PreBuildEx.bat $(SolutionDir) $(ProjectDir) $(ProjectName) 1 $(PlatformName) - } - - expand(ProjectName){ - $(ProjectName) - } - Resource_Files{ - $(ProjectName).rc - } -} \ No newline at end of file diff --git a/config/lukesqlite.mpb b/config/lukesqlite.mpb deleted file mode 100644 index c357502a1..000000000 --- a/config/lukesqlite.mpb +++ /dev/null @@ -1,23 +0,0 @@ -project{ - libs+=sqlite3 - - expand(LMX_LIB_ROOT){ - $(LMX_LIB_ROOT) - } - - macros+=SQLITE_HAS_CODEC - - includes +=$(LMX_LIB_ROOT)\sqlite3\include - specific(prop:microsoft) { - libpaths +=$(LMX_LIB_ROOT)\sqlite3\$(PlatformName)\lib - } - - Source_Files{ - *.cpp - CppSqlite{ - no_pch=1 - $(LMX_LIB_ROOT)\sqlite3\Src\CppSQLite3.cpp - $(LMX_LIB_ROOT)\sqlite3\Src\CodingConv.cpp - } - } -} \ No newline at end of file diff --git a/config/lukestatic.mpb b/config/lukestatic.mpb deleted file mode 100644 index 83b9b7f02..000000000 --- a/config/lukestatic.mpb +++ /dev/null @@ -1,6 +0,0 @@ -project{ - specific(prop:microsoft) { - Debug::runtime_library = 1 - Release::runtime_library = 0 - } -} diff --git a/config/lukexvid.mpb b/config/lukexvid.mpb deleted file mode 100644 index 1e5079fdc..000000000 --- a/config/lukexvid.mpb +++ /dev/null @@ -1,7 +0,0 @@ -project{ - libs+=libxvidcore - includes +=$(LMX_LIB_ROOT)\xvidcore\include - specific(prop:microsoft) { - libpaths +=$(LMX_LIB_ROOT)\xvidcore\$(PlatformName)\lib - } -} \ No newline at end of file From 5ed707f7e1aba387bf335abfd497d59ad371c927 Mon Sep 17 00:00:00 2001 From: LukeLeo Date: Wed, 28 Sep 2016 10:07:18 +0800 Subject: [PATCH 5/6] remove private file --- README.md | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index bcaac344e..000000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# MPC -MPC (The Makefile, Project, and Workspace Creator)是一个可以生成工程脚本的工具,通过该工具可以在多个平台生成C++的工程脚本,虽然它的名声可能没有Cmake大,但它的功能完全可以甩cmake好几条街。 From fc8bf98c59a55ef042e9c732b86234491af794dd Mon Sep 17 00:00:00 2001 From: LukeLeo Date: Fri, 9 Dec 2016 17:18:30 +0800 Subject: [PATCH 6/6] bug fix for mismatch vs version --- modules/VC11WorkspaceCreator.pm | 2 +- modules/VC12WorkspaceCreator.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/VC11WorkspaceCreator.pm b/modules/VC11WorkspaceCreator.pm index 79eb33519..c1387fddd 100644 --- a/modules/VC11WorkspaceCreator.pm +++ b/modules/VC11WorkspaceCreator.pm @@ -29,7 +29,7 @@ sub pre_workspace { print $fh '', $crlf, 'Microsoft Visual Studio Solution File, Format Version 11.00', $crlf; $self->print_workspace_comment($fh, - '# Visual Studio 2011', $crlf, + '# Visual Studio 2012', $crlf, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf, diff --git a/modules/VC12WorkspaceCreator.pm b/modules/VC12WorkspaceCreator.pm index bed947379..3795ac2ea 100644 --- a/modules/VC12WorkspaceCreator.pm +++ b/modules/VC12WorkspaceCreator.pm @@ -29,7 +29,7 @@ sub pre_workspace { print $fh '', $crlf, 'Microsoft Visual Studio Solution File, Format Version 12.00', $crlf; $self->print_workspace_comment($fh, - '# Visual Studio 2012', $crlf, + '# Visual Studio 2013', $crlf, '#', $crlf, '# This file was generated by MPC. Any changes made directly to', $crlf, '# this file will be lost the next time it is generated.', $crlf,