@rem (Created by Setup Helper at Sat Jun 07 22:41:08 2008)
@echo.
@echo   This creates a new distribution Emacs-23-DISTRIBID-emacsw32-1.58.exe file.
@echo   The .exe file will include YOUR current Emacs tree, that is
@echo   everything in "c:\Cherokee-MinGW\Emacs\emacs\".
@echo.
@echo   Your are encourage to only keep the core Emacs dist there.
@echo   If you want to include other files you may edit the script file
@echo   before your create the installation package.
@echo.

@if not "%1"=="" goto mk-iss

@c:\Cherokee-MinGW\Emacs\emacs\bin\emacs.exe -batch -Q -eval  "(unless (y-or-n-p \"You will be prompted for DISTRIBID (since you did not give it as a parameter).\nDo you want to continue? \") (kill-emacs 1))
@if %errorlevel% GTR 0 exit /b %errorlevel%

:mk-iss
@if exist %0\..\temp-installer.iss del %0\..\temp-installer.iss
@c:\Cherokee-MinGW\Emacs\emacs\bin\emacs.exe -batch -Q -l %0\..\lisp\mkInstaller.el --eval="(mkInstaller-create-iss \"%1\" \"%2\")"
@if %errorlevel% GTR 0 exit /b %errorlevel%

@if not "%1"=="" goto run

@echo.
@c:\Cherokee-MinGW\Emacs\emacs\bin\emacs.exe -batch -Q -eval  "(unless (y-or-n-p \"Do you want to run the Inno script above to create the .exe? \") (kill-emacs 1))
@if %errorlevel% GTR 0 goto fin

@c:\Cherokee-MinGW\Emacs\emacs\bin\emacs.exe -batch -Q -eval  "(unless (y-or-n-p \"Do you want to start Inno Setup first to edit the script? \") (kill-emacs 1))
@if %errorlevel% GTR 0 goto run

@echo Could not find Inno Setup 5 Compiler
@rem %0\..\temp-installer.iss
@goto fin

:run
@echo Could not find Inno Setup 5 Compiler
@rem iscc.exe %0\..\temp-installer.iss

:fin
