win32: only call 'exit' when building in teamcity
[deb_libcec.git] / support / create-installer.bat
index b1f55f96437b1f70eb8d2e8913e77ee2cfc978be..d9f6a579d3b3a20d8586250000f3633716b199f3 100644 (file)
@@ -1,5 +1,7 @@
 @echo off
 
+set EXITCODE=1
+
 rem Check for NSIS
 IF EXIST "%ProgramFiles%\NSIS\makensis.exe" (
   set NSIS="%ProgramFiles%\NSIS\makensis.exe"
@@ -127,10 +129,14 @@ IF EXIST "..\support\private\sign-binary.cmd" (
   CALL ..\support\private\sign-binary.cmd ..\build\libCEC-installer.exe
 )
 
-mv ..\build\libCEC-installer.exe ..\build\libCEC-%1%-installer.exe
-
-echo. The installer can be found here: ..\build\libCEC-%1%-installer.exe
+IF "%1%"=="" (
+  echo. The installer can be found here: ..\build\libCEC-installer.exe
+) ELSE (
+  move ..\build\libCEC-installer.exe ..\build\libCEC-%1%-installer.exe
+  echo. The installer can be found here: ..\build\libCEC-%1%-installer.exe
+)
 
+set EXITCODE=0
 GOTO EXIT
 
 :NOSDK10
@@ -159,3 +165,9 @@ del /s /f /q ..\build\x64
 rmdir ..\build\x64
 cd ..\support
 
+IF "%1%"=="" (
+  echo. exitcode = %EXITCODE%
+) ELSE (
+  exit %EXITCODE%
+)
+