Merge branch 'master' into release
[deb_libcec.git] / support / create-installer.bat
index fb68cb613fec3fef03c7c006fe19bf48c4c83849..73b7a0f1341a5c9fc803a7f6aa20bd109a739503 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
 )
 
-move ..\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,4 @@ del /s /f /q ..\build\x64
 rmdir ..\build\x64
 cd ..\support
 
+exit %EXITCODE%