summaryrefslogtreecommitdiff
path: root/tools/build_scripts/z3_PackArchivesStable.bat
blob: f3506d9d6c51ad6f3c1c14db017b6b9a3a67db93 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
set tp=%1
if  "%tp%"=="" (echo "please specify target platform 32 or 64!" && pause && goto :EOF)

for /F "tokens=1,2,3,4 delims= " %%i in (build\build.no.stable) do (
  if "%%l" == "" (
     set MirVer=%%i.%%j.%%k
  ) else (
     set MirVer=%%i.%%j.%%k.%%l
  )
)

call a_SetVar%tp%.bat

if /i '%tp%' == '64' set bit=_x64
if /i '%tp%' == '32' set CompileString=%ISCC% /Dptx86 /DAppVer=%MirVer% "MirandaNG.iss" 
if /i '%tp%' == '64' set CompileString=%ISCC% /DAppVer=%MirVer% "MirandaNG.iss"

set comp=%2
if "%comp%"=="" (echo "please specify target compiler folder!" && pause && goto :EOF)

if not exist %ArchDistr% mkdir %ArchDistr%

pushd "%comp%\Symbols%tp%"
%CompressIt% a -mx=9 "miranda-ng-debug-symbols_pdb%bit%.7z" *.pdb .\Plugins\*.pdb .\Core\*.pdb .\Libs\*.pdb
move /Y miranda-ng-debug*.7z %ArchDistr%
popd

pushd "%comp%\Release%tp%"

if exist %ArchDistr%\miranda-ng-v0.9*%bit%.7z del /F /Q %ArchDistr%\miranda-ng-v0.9*%bit%.7z
if exist %ArchDistr%\miranda-ng-v0.9*%bit%.exe del /F /Q %ArchDistr%\miranda-ng-v0.9*%bit%.exe
%CompressIt% a -r -mx=9 "miranda-ng-v%MirVer%%bit%.7z" Miranda%tp%.exe -i@..\..\%comp%\z3_PackArchives.txt
move /Y miranda-ng*.7z %ArchDistr%

del /f /q miranda%tp%.exe
del /f /q *.dll
del /f /q /s *.iobj
del /f /q /s *.ipdb
del /f /q hashes.txt
for /f %%a in (..\..\z3_PackArchives.txt) do del /s /q  %%a
rd /s /q Core
rd /s /q Libs

rem Create directories and copy script and download needed files
pushd %StableInstDir%
mkdir tmp
mkdir InnoNG_%tp%
mkdir InnoNG_%tp%\Files\Languages
copy /V /Y MirandaNG.iss InnoNG_%tp%
xcopy Common\* InnoNG_%tp% /I /S /V /Y
curl -o tmp\InnoSetup5.7z https://miranda-ng.org/distr/installer/InnoSetup5.7z
curl -o tmp\MNG_Sounds.7z https://miranda-ng.org/distr/addons/Sounds/MNG_Sounds.7z
%CompressIt% x tmp\InnoSetup5.7z -y -oTools
%CompressIt% x %ArchDistr%\miranda-ng-v%MirVer%%bit%.7z -y -oInnoNG_%tp%\Files
%CompressIt% x tmp\MNG_Sounds.7z -y -oInnoNG_%tp%\Files
popd
rem end

copy /V /Y Languages\langpack_czech.txt %StableInstDir%\InnoNG_%tp%\Files\Languages
copy /V /Y Languages\langpack_german.txt %StableInstDir%\InnoNG_%tp%\Files\Languages
copy /V /Y Languages\langpack_polish.txt %StableInstDir%\InnoNG_%tp%\Files\Languages
copy /V /Y Languages\langpack_russian.txt %StableInstDir%\InnoNG_%tp%\Files\Languages
copy /V /Y Plugins\Clist_blind.dll %StableInstDir%\InnoNG_%tp%\Files\Plugins
copy /V /Y Plugins\Clist_nicer.dll %StableInstDir%\InnoNG_%tp%\Files\Plugins
copy /V /Y Plugins\Cln_skinedit.dll %StableInstDir%\InnoNG_%tp%\Files\Plugins
copy /V /Y Plugins\Scriver.dll %StableInstDir%\InnoNG_%tp%\Files\Plugins
rd /s /q Languages
pushd %StableInstDir%\InnoNG_%tp%
%CompileString%
cd ..
call cleanup.bat
move /Y miranda-ng-v0.9*%bit%.exe "%ArchDistr%\"
popd

REM %CompressIt% a -r -mx=9 "miranda-ng-plugins-stable%bit%.7z"
REM move /Y miranda-ng-plugins*.7z %ArchDistr%

cd ..

rem if exist "Release%tp%" rd /Q /S "Release%tp%" >nul
rem if exist "Symbols%tp%" rd /Q /S "Symbols%tp%" >nul

popd