@echo off
REM THIS CREATES FOR EACH INSTALLER SCRIPT
REM AN INSTALLER
set _ProjectName=poc
set _SystemVersion=1.1.8
set _EnvironmentType=dev
set _EnvironmentOwner=yordgeor
set _RootPath=E:
set _BuildInstallersBaseDir=%_RootPath%\%_ProjectName%\%_ProjectName%.%_SystemVersion%.%_EnvironmentType%.%_EnvironmentOwner%\sfw\nsi\
ECHO DELETE ALL THE EXE FILES
ECHO.
for /f "tokens=*" %%i in ('dir "%_BuildInstallersBaseDir%\*.exe" /s /b') do CMD /C start /min cmd /c DEL /S /Q "%%i"
ECHO.
ECHO DELETE FIRST ALL THE EXES
ECHO.
for /f "tokens=*" %%i in ('dir "%_BuildInstallersBaseDir%\*.txt" /s /b') do CMD /C start /min cmd /c DEL /S /Q "%%i"
ECHO.
echo DELETE ALL THE zip FILES
ECHO.
for /f "tokens=*" %%i in ('dir "%_BuildInstallersBaseDir%\*.zip" /s /b') do CMD /C start /min cmd /c DEL /S /Q "%%i"
ECHO.
ECHO BUILD ALL THE INSTALL SCRIPTS TO EXE'S
ECHO.
for /f "tokens=*" %%i in ('dir "%_BuildInstallersBaseDir%\*.nsi" /b /s') do cmd /c start /min cmd /c echo BUILDING %%i&"%ProgramFiles(x86)%\NSIS\makensis.exe" /V4 %%i
ECHO.
::ZIP THEM ALSO
for /f "tokens=*" %%i in ('dir "%_BuildInstallersBaseDir%\*.exe" /s /b') do "%ProgramFiles(x86)%\IZArc\IZArc.exe" -ad "%%i"
ECHO.
ECHO rename the exes to txt files
ECHO.
for /f "tokens=*" %%i in ('dir "%_BuildInstallersBaseDir%\*.zip" /s /b') do copy /y %%i %%i.txt
ECHO.
ECHO DONE
PAUSE
:: FILE:BuildAllinstallersWithOUT_PAUSE.2.0.cmd
:: PURPOSE: To compile all the nsi scripts recursively, zip them and rename them to *.zip.txt
:: REQUIREMENTS: google download nsis , and time module
:: REQUIREMENTS: google download IZarc + command line add-on
:: AUTHOR:Yordan Georiev
:: HINT: Place a desktop icon , right click assign N as shortcut , call wiht AltGr + N