From 66f421dd776007f3a11e0c40a8f357b586d3a92b Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Thu, 22 Jun 2017 21:04:42 -0400 Subject: [PATCH] relying on the good setup scripts for buildsuper --- buildsuper.bat | 16 +++++++--------- buildsuper_x86.bat | 14 +++++++------- meta/build.cpp | 8 ++++++-- .../setup_cl_generic.bat | 0 .../setup_cl_x64.bat | 0 .../setup_cl_x86.bat | 0 6 files changed, 20 insertions(+), 18 deletions(-) rename {build_scripts => windows_scripts}/setup_cl_generic.bat (100%) rename {build_scripts => windows_scripts}/setup_cl_x64.bat (100%) rename {build_scripts => windows_scripts}/setup_cl_x86.bat (100%) diff --git a/buildsuper.bat b/buildsuper.bat index 5f99c6f8..1949f1e1 100644 --- a/buildsuper.bat +++ b/buildsuper.bat @@ -1,7 +1,12 @@ @echo off -IF NOT DEFINED LIB (call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64) -IF NOT DEFINED LIB (call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64) +REM This stores the path of the buildsuper.bat script +REM in CODE_HOME. This way you can always include the +REM default files no matter where you store your code. +REM And no matter how you call buildsuper.bat. +SET CODE_HOME=%~dp0 + +IF NOT DEFINED LIB (call "%CODE_HOME%\\build_scripts\\setup_cl_x64.bat") SET SRC=%1 if "%SRC%" == "" SET SRC=4coder_default_bindings.cpp @@ -12,13 +17,6 @@ SET DEBUG=/Zi SET BUILD_DLL=/LD /link /INCREMENTAL:NO /OPT:REF SET EXPORTS=/EXPORT:get_bindings /EXPORT:get_alpha_4coder_version -REM This stores the path of the buildsuper.bat script -REM in CODE_HOME. This way you can always include the -REM default files no matter where you store your code. -REM And no matter how you call buildsuper.bat. - -SET CODE_HOME=%~dp0 - cl %OPTS% /I"%CODE_HOME% " %DEBUG% "%SRC%" /Fecustom_4coder %BUILD_DLL% %EXPORTS% REM file spammation preventation diff --git a/buildsuper_x86.bat b/buildsuper_x86.bat index 22035658..68ffe664 100644 --- a/buildsuper_x86.bat +++ b/buildsuper_x86.bat @@ -1,6 +1,12 @@ @echo off -IF NOT DEFINED LIB (call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64_x86) +REM This stores the path of the buildsuper.bat script +REM in CODE_HOME. This way you can always include the +REM default files no matter where you store your code. +REM And no matter how you call buildsuper.bat. +SET CODE_HOME=%~dp0 + +IF NOT DEFINED LIB (call "%CODE_HOME%\\build_scripts\\setup_cl_x86.bat") SET SRC=%1 if "%SRC%" == "" SET SRC=4coder_default_bindings.cpp @@ -11,12 +17,6 @@ SET DEBUG=/Zi SET BUILD_DLL=/LD /link /INCREMENTAL:NO /OPT:REF SET EXPORTS=/EXPORT:get_bindings /EXPORT:get_alpha_4coder_version -REM This stores the path of the buildsuper.bat script -REM in CODE_HOME. This way you can always include the -REM default files no matter where you store your code. -REM And no matter how you call buildsuper.bat. -SET CODE_HOME=%~dp0 - cl /I%CODE_HOME% %OPTS% %DEBUG% %SRC% /Fecustom_4coder %BUILD_DLL% %EXPORTS% REM file spammation preventation diff --git a/meta/build.cpp b/meta/build.cpp index 74b43066..2b31797d 100644 --- a/meta/build.cpp +++ b/meta/build.cpp @@ -158,7 +158,7 @@ build_cl(u32 flags, char *code_path, char *code_file, char *out_path, char *out_ init_build_line(&line_prefix); if (flags & X86){ - build_ap(line_prefix, "%s\\build_scripts\\setup_cl_x86.bat & ", code_path); + build_ap(line_prefix, "%s\\windows_scripts\\setup_cl_x86.bat & ", code_path); } if (flags & OPTS){ @@ -361,7 +361,7 @@ buildsuper(char *code_path, char *out_path, char *filename, b32 x86_build){ char *build_script = "buildsuper.bat"; if (x86_build){ prefix_1 = code_path; - prefix_2 = "\\build_script\\setup_cl_x86.bat & "; + prefix_2 = "\\windows_scripts\\setup_cl_x86.bat & "; build_script = "buildsuper_x86.bat"; } systemf("%s%scall \"%s\\%s\" %s", prefix_1, prefix_2, code_path, build_script, filename); @@ -760,6 +760,10 @@ package(char *cdir){ copy_file(0, "buildsuper" BAT, dir, 0, 0); +#if defined(IS_WINDOWS) + copy_folder(dir, "windows_scripts"); +#endif + copy_folder(dir, "4coder_API"); copy_folder(dir, "4coder_helper"); copy_folder(dir, "4coder_lib"); diff --git a/build_scripts/setup_cl_generic.bat b/windows_scripts/setup_cl_generic.bat similarity index 100% rename from build_scripts/setup_cl_generic.bat rename to windows_scripts/setup_cl_generic.bat diff --git a/build_scripts/setup_cl_x64.bat b/windows_scripts/setup_cl_x64.bat similarity index 100% rename from build_scripts/setup_cl_x64.bat rename to windows_scripts/setup_cl_x64.bat diff --git a/build_scripts/setup_cl_x86.bat b/windows_scripts/setup_cl_x86.bat similarity index 100% rename from build_scripts/setup_cl_x86.bat rename to windows_scripts/setup_cl_x86.bat