diff --git a/build_scripts/win/test.bat b/build_scripts/win/test.bat deleted file mode 100644 index 612ad0d..0000000 --- a/build_scripts/win/test.bat +++ /dev/null @@ -1,9 +0,0 @@ -@ECHO Starting 7zip: -"C:\Program Files\7-Zip\7z.exe" a -t7z Z:\Programming\Cpp\2018-09-12_OpenVR_AdvancedSettings\OpenVR-AdvancedSettings\\\bin\\win64\\AdvancedSettings\AdvancedSettings-2-8-0.7z Z:\Programming\Cpp\2018-09-12_OpenVR_AdvancedSettings\OpenVR-AdvancedSettings\\bin\\win64\\AdvancedSettings\* -IF ERRORLEVEL 1 EXIT /B 1 -@ECHO 7zip done. -@ECHO Starting NSIS: -cd Z:\Programming\Cpp\2018-09-12_OpenVR_AdvancedSettings\NSISPortable\App\NSIS -makensis /V2 /WX Z:\Programming\Cpp\2018-09-12_OpenVR_AdvancedSettings\OpenVR-AdvancedSettings\installer\installer.nsi -IF ERRORLEVEL 1 EXIT /B 1 -@ECHO NSIS done. diff --git a/build_scripts/win/verify_formatting.cmd b/build_scripts/win/verify_formatting.cmd index 997643d..eeb532b 100644 --- a/build_scripts/win/verify_formatting.cmd +++ b/build_scripts/win/verify_formatting.cmd @@ -32,7 +32,7 @@ ECHO %current_activity%: Clang-format located. %CLANG_FORMAT_LOC% --version -python %project_dir%/build_scripts/run-clang-format.py %project_dir%/src -r --color never --clang-format-executable %CLANG_FORMAT_LOC% +%PYTHON_LOC%python %project_dir%/build_scripts/run-clang-format.py %project_dir%/src -r --color never --clang-format-executable %CLANG_FORMAT_LOC% IF NOT ERRORLEVEL 1 ( ECHO FORMATTED CORRECTLY. ) ELSE ( diff --git a/build_windows.cmd b/build_windows.cmd index 624b04f..be5ab62 100644 --- a/build_windows.cmd +++ b/build_windows.cmd @@ -22,13 +22,13 @@ SET project_dir=%folder_path% ECHO %top_level_activity%: Calling build script. -%PYTHON%python %project_dir%\build_scripts\win\build.py build +%PYTHON_LOC%python %project_dir%\build_scripts\win\build.py build IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps% call %project_dir%\build_scripts\win\test.bat IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps% ECHO %top_level_activity%: Calling deployment script. -%PYTHON%python %project_dir%\build_scripts\win\build.py deploy +%PYTHON_LOC%python %project_dir%\build_scripts\win\build.py deploy IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps% call %project_dir%\build_scripts\win\test.bat IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps% @@ -40,7 +40,7 @@ IF NOT DEFINED BUILD_PACKAGE ( EXIT /B %exit_code_success% ) ECHO %top_level_activity%: Calling packaging script. -%PYTHON%python %project_dir%\build_scripts\win\build.py package +%PYTHON_LOC%python %project_dir%\build_scripts\win\build.py package IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps% call %project_dir%\build_scripts\win\test.bat IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps% diff --git a/docs/building_for_windows.md b/docs/building_for_windows.md index 8a2dcf5..68dc163 100644 --- a/docs/building_for_windows.md +++ b/docs/building_for_windows.md @@ -23,7 +23,9 @@ For pushing changes to the repo: 2. Clang format. Part of the [LLVM collection](https://releases.llvm.org/download.html). Additionally, for fully building portable and installer release versions: + 3. [7zip](https://www.7-zip.org/download.html) + 4. [Nullsoft Scriptable Install System (NSIS)](https://sourceforge.net/projects/nsis/) @@ -39,6 +41,7 @@ The following environmental variables are relevant for building the project. | `ZIP_LOC` | Path to your 7zip `.exe`. Both portable and installer will work. | | `NSIS_LOC` | Path to your installation of NSIS containing the `makensis` file. Both portable and installer will work. | | `LLVM_LOC` | Path to your LLVM bin directory containing `clang-format.exe`. Not necessary for building with the MSVC compiler, but necessary for pushing changes to the repo. Leave as empty string if your `clang-format`.exe` and `clang-cl.exe` are in the path. | +| `PYTHON_LOC` | A non-error-checked way of referring to a specific python installation. Must end on a backslash or be undefined. If undefined `python` must be in the path. | If an environment variable isn't set a default value will be provided. The default values are shown in the table below. @@ -50,6 +53,7 @@ If an environment variable isn't set a default value will be provided. The defau | `ZIP_LOC` | `"C:\Program Files\7-Zip\7z.exe"` | | `NSIS_LOC` | `"C:\Program Files (x86)\NSIS\"` | | `LLVM_LOC` | `"C:\Program Files\LLVM\bin\"` | +| `PYTHON_LOC` | NONE SUPPLIED. It is expected that `python` is in the path if `PYTHON_LOC` is defined.| Additionally, these optional environment variables are supported.