summaryrefslogtreecommitdiff
path: root/tools/installer_ng/Common/GenerateInnoGuiCompatScript.bat
blob: dc97c96507e521582457fe5bf0cdd26404f2bff1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@echo off
set GetVer=for /F "tokens=1,2,3 delims= " %%i in (build.no) do set MirVer=%%i.%%j.%%k
set BomRem=http://miranda-ng.org/distr/installer/bom_remove.exe
set BomAdd=http://miranda-ng.org/distr/installer/bom_add.exe
for %%* in (.) do set InnoX=%%~n*
rem Get version
..\Tools\wget.exe -O build.no http://svn.miranda-ng.org/main/trunk/build/build.no
%GetVer%
del /F /Q build.no
rem end

rem Create Inno setup compatible script that compiles without passing parameters to compiler
if %InnoX% == InnoNG_32 (
  ..\Tools\wget.exe -O utf-8_32.vbs http://miranda-ng.org/distr/installer/utf-8_32.vbs
  ..\Tools\wget.exe -O bom_remove.exe %BomRem%
  ..\Tools\wget.exe -O bom_add.exe %BomAdd%
  bom_remove.exe MirandaNG.iss
  cscript utf-8_32.vbs
  echo #define AppVer "%MirVer%" >> MirandaNG32.iss
  echo.>> MirandaNG32.iss
  type MirandaNG.iss >>  MirandaNG32.iss
  bom_add.exe MirandaNG.iss
  del /f /q utf-8_32.vbs
  del /f /q bom_remove.exe
  del /f /q bom_add.exe
) else if %InnoX% == InnoNG_64 (
  ..\Tools\wget.exe -O utf-8_64.vbs http://miranda-ng.org/distr/installer/utf-8_64.vbs
  ..\Tools\wget.exe -O bom_remove.exe %BomRem%
  ..\Tools\wget.exe -O bom_add.exe %BomAdd%
  bom_remove.exe MirandaNG.iss
  cscript utf-8_64.vbs
  echo #define AppVer "%MirVer%" >> MirandaNG64.iss
  echo.>> MirandaNG64.iss
  type MirandaNG.iss >> MirandaNG64.iss
  bom_add.exe MirandaNG.iss
  del /f /q utf-8_64.vbs
  del /f /q bom_remove.exe
  del /f /q bom_add.exe
)
rem end

rem Delete bat file
del "%~f0
rem end