aboutsummaryrefslogtreecommitdiff
path: root/buildtools/packman/packman.cmd
diff options
context:
space:
mode:
authorBryan Galdrikian <[email protected]>2018-01-22 14:04:16 -0800
committerBryan Galdrikian <[email protected]>2018-01-22 14:04:16 -0800
commit1dc1a87fba520bb45c1ce8165e8ea2c83c0a308d (patch)
tree5f8ca75a6b92c60fb5cf3b14282fc4cc1c127eb2 /buildtools/packman/packman.cmd
parentUpdating readme.md to show updated UE4 Blast integration branches (diff)
downloadblast-1dc1a87fba520bb45c1ce8165e8ea2c83c0a308d.tar.xz
blast-1dc1a87fba520bb45c1ce8165e8ea2c83c0a308d.zip
Changes for 1.1.2 release candidate
See README.md, docs/release_notes.txt
Diffstat (limited to 'buildtools/packman/packman.cmd')
-rw-r--r--buildtools/packman/packman.cmd20
1 files changed, 19 insertions, 1 deletions
diff --git a/buildtools/packman/packman.cmd b/buildtools/packman/packman.cmd
index a17027e..03e2cf8 100644
--- a/buildtools/packman/packman.cmd
+++ b/buildtools/packman/packman.cmd
@@ -7,7 +7,21 @@
@if not defined PM_PYTHON goto :PYTHON_ENV_ERROR
@if not defined PM_MODULE goto :MODULE_ENV_ERROR
-@"%PM_PYTHON%" "%PM_MODULE%" %*
+:: Generate temporary path for variable file
+:TEMP_VAR_PATH_LOOP
+@set "PM_VAR_PATH=%tmp%\tmp.%RANDOM%.pmvars"
+@if exist "%PM_VAR_PATH%" goto :TEMP_VAR_PATH_LOOP
+
+@"%PM_PYTHON%" "%PM_MODULE%" %* --var-path="%PM_VAR_PATH%"
+@if errorlevel 1 goto :eof
+
+:: Marshall environment variables into the current environment if they have been generated and remove temporary file
+@if exist "%PM_VAR_PATH%" (
+ @for /F "usebackq tokens=*" %%A in ("%PM_VAR_PATH%") do @set "%%A"
+ @if errorlevel 1 goto :VAR_ERROR
+ @del /F "%PM_VAR_PATH%"
+)
+@set PM_VAR_PATH=
@goto :eof
:: Subroutines below
@@ -19,5 +33,9 @@
@echo User environment variable PM_MODULE is not set! Please configure machine for packman or call configure.bat.
@exit /b 1
+:VAR_ERROR
+@echo Error while processing and setting environment variables!
+@exit /b 1
+
:RESET_ERROR
@exit /b 0 \ No newline at end of file