mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 12:44:46 +01:00
build.bat: now creates the ZIP package too if 7-ZIP is installed in the default location
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@483 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
d8b57345b6
commit
67d8e4602c
41
build.bat
41
build.bat
@ -1,5 +1,8 @@
|
|||||||
@ECHO OFF
|
@ECHO OFF
|
||||||
SETLOCAL
|
SETLOCAL
|
||||||
|
SET "VERSION=3.2"
|
||||||
|
SET "SEVENZIP_PATH=%PROGRAMFILES%\7-Zip\7z.exe"
|
||||||
|
|
||||||
CD /D %~dp0
|
CD /D %~dp0
|
||||||
|
|
||||||
rem Check for the help switches
|
rem Check for the help switches
|
||||||
@ -51,17 +54,18 @@ POPD
|
|||||||
|
|
||||||
IF /I "%BUILDTYPE%" == "Clean" GOTO END
|
IF /I "%BUILDTYPE%" == "Clean" GOTO END
|
||||||
|
|
||||||
|
IF DEFINED SEVENZIP_PATH IF EXIST "%SEVENZIP_PATH%" CALL :SubZipFile
|
||||||
|
|
||||||
CALL :SubDetectInnoSetup
|
CALL :SubDetectInnoSetup
|
||||||
|
|
||||||
IF DEFINED InnoSetupPath (
|
IF DEFINED InnoSetupPath (
|
||||||
PUSHD "installer"
|
PUSHD "installer"
|
||||||
|
|
||||||
TITLE Compiling installer...
|
TITLE Compiling installer...
|
||||||
"%InnoSetupPath%\iscc.exe" /Q "Subtitle_Edit_installer.iss"
|
"%InnoSetupPath%\iscc.exe" /O.. /Q "Subtitle_Edit_installer.iss"
|
||||||
IF %ERRORLEVEL% NEQ 0 GOTO EndWithError
|
IF %ERRORLEVEL% NEQ 0 GOTO EndWithError
|
||||||
|
|
||||||
ECHO. & ECHO Installer compiled successfully!
|
ECHO. & ECHO Installer compiled successfully!
|
||||||
MOVE /Y "SubtitleEdit-*-setup.exe" ".." >NUL
|
|
||||||
POPD
|
POPD
|
||||||
) ELSE (
|
) ELSE (
|
||||||
ECHO Inno Setup wasn't found; the installer wasn't built
|
ECHO Inno Setup wasn't found; the installer wasn't built
|
||||||
@ -69,12 +73,45 @@ IF DEFINED InnoSetupPath (
|
|||||||
|
|
||||||
|
|
||||||
:END
|
:END
|
||||||
|
TITLE Compiling Subtitle Edit finished!
|
||||||
ECHO.
|
ECHO.
|
||||||
ENDLOCAL
|
ENDLOCAL
|
||||||
PAUSE
|
PAUSE
|
||||||
EXIT /B
|
EXIT /B
|
||||||
|
|
||||||
|
|
||||||
|
:SubZipFile
|
||||||
|
TITLE Creating the ZIP file...
|
||||||
|
PUSHD "src\bin\Release"
|
||||||
|
IF EXIST "temp_zip" RD /S /Q "temp_zip"
|
||||||
|
IF NOT EXIST "temp_zip" MD "temp_zip"
|
||||||
|
IF NOT EXIST "temp_zip\Languages" MD "temp_zip\Languages"
|
||||||
|
IF NOT EXIST "temp_zip\Tesseract" MD "temp_zip\Tesseract"
|
||||||
|
IF NOT EXIST "temp_zip\Tesseract\tessdata" MD "temp_zip\Tesseract\tessdata"
|
||||||
|
|
||||||
|
COPY /Y /V "..\..\gpl.txt" "temp_zip\"
|
||||||
|
COPY /Y /V "..\..\Changelog.txt" "temp_zip\"
|
||||||
|
COPY /Y /V "Interop.QuartzTypeLib.dll" "temp_zip\"
|
||||||
|
COPY /Y /V "Hunspellx86.dll" "temp_zip\"
|
||||||
|
COPY /Y /V "NHunspell.dll" "temp_zip\"
|
||||||
|
COPY /Y /V "SubtitleEdit.exe" "temp_zip\"
|
||||||
|
COPY /Y /V "Languages\*.xml" "temp_zip\Languages\"
|
||||||
|
COPY /Y /V "..\..\..\Tesseract\leptonlib.dll" "temp_zip\Tesseract\"
|
||||||
|
COPY /Y /V "..\..\..\Tesseract\tesseract.exe" "temp_zip\Tesseract\"
|
||||||
|
COPY /Y /V "..\..\..\Tesseract\tessdata\eng.traineddata" "temp_zip\Tesseract\tessdata\"
|
||||||
|
|
||||||
|
PUSHD "temp_zip"
|
||||||
|
START "" /B /WAIT "%SEVENZIP_PATH%" a -tzip -mx=9 "SE%VERSION%.zip" * >NUL
|
||||||
|
IF %ERRORLEVEL% NEQ 0 GOTO EndWithError
|
||||||
|
|
||||||
|
|
||||||
|
MOVE /Y "SE%VERSION%.zip" "..\..\..\.." >NUL
|
||||||
|
POPD
|
||||||
|
IF EXIST "temp_zip" RD /S /Q "temp_zip"
|
||||||
|
POPD
|
||||||
|
EXIT /B
|
||||||
|
|
||||||
|
|
||||||
:EndWithError
|
:EndWithError
|
||||||
Title Compiling Subtitle Edit [ERROR]
|
Title Compiling Subtitle Edit [ERROR]
|
||||||
ECHO. & ECHO.
|
ECHO. & ECHO.
|
||||||
|
@ -26,11 +26,6 @@
|
|||||||
#error Update your Inno Setup version
|
#error Update your Inno Setup version
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
;#ifnexist "..\src\bin\Release\SubtitleEdit.exe"
|
|
||||||
; #error Compile Subtitle Edit first
|
|
||||||
;#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define installer_build_number "16"
|
#define installer_build_number "16"
|
||||||
|
|
||||||
#define VerMajor
|
#define VerMajor
|
||||||
@ -40,6 +35,9 @@
|
|||||||
|
|
||||||
#define bindir "..\src\Bin\Release"
|
#define bindir "..\src\Bin\Release"
|
||||||
|
|
||||||
|
;#ifnexist "..\src\bin\Release\SubtitleEdit.exe"
|
||||||
|
; #error Compile Subtitle Edit first
|
||||||
|
;#endif
|
||||||
|
|
||||||
#expr ParseVersion(bindir + "\SubtitleEdit.exe", VerMajor, VerMinor, VerBuild, VerRevision)
|
#expr ParseVersion(bindir + "\SubtitleEdit.exe", VerMajor, VerMinor, VerBuild, VerRevision)
|
||||||
#define app_version str(VerMajor) + "." + str(VerMinor) + "." + str(VerBuild) + "." + str(VerRevision)
|
#define app_version str(VerMajor) + "." + str(VerMinor) + "." + str(VerBuild) + "." + str(VerRevision)
|
||||||
@ -191,6 +189,7 @@ Source: ..\Dictionaries\en_US_names_etc.xml; DestDir: {userappdata}\Subtit
|
|||||||
Source: ..\Dictionaries\en_US_user.xml; DestDir: {userappdata}\Subtitle Edit\Dictionaries; Flags: ignoreversion onlyifdoesntexist uninsneveruninstall; Components: main
|
Source: ..\Dictionaries\en_US_user.xml; DestDir: {userappdata}\Subtitle Edit\Dictionaries; Flags: ignoreversion onlyifdoesntexist uninsneveruninstall; Components: main
|
||||||
Source: ..\Dictionaries\eng_OCRFixReplaceList.xml; DestDir: {userappdata}\Subtitle Edit\Dictionaries; Flags: ignoreversion onlyifdoesntexist uninsneveruninstall; Components: main
|
Source: ..\Dictionaries\eng_OCRFixReplaceList.xml; DestDir: {userappdata}\Subtitle Edit\Dictionaries; Flags: ignoreversion onlyifdoesntexist uninsneveruninstall; Components: main
|
||||||
Source: ..\Dictionaries\names_etc.xml; DestDir: {userappdata}\Subtitle Edit\Dictionaries; Flags: ignoreversion onlyifdoesntexist uninsneveruninstall; Components: main
|
Source: ..\Dictionaries\names_etc.xml; DestDir: {userappdata}\Subtitle Edit\Dictionaries; Flags: ignoreversion onlyifdoesntexist uninsneveruninstall; Components: main
|
||||||
|
Source: ..\Dictionaries\swe_OCRFixReplaceList.xml; DestDir: {userappdata}\Subtitle Edit\Dictionaries; Flags: ignoreversion onlyifdoesntexist uninsneveruninstall; Components: main
|
||||||
Source: ..\Tesseract\tessdata\eng.traineddata; DestDir: {app}\Tesseract\tessdata; Flags: ignoreversion; Components: main
|
Source: ..\Tesseract\tessdata\eng.traineddata; DestDir: {app}\Tesseract\tessdata; Flags: ignoreversion; Components: main
|
||||||
Source: ..\Tesseract\leptonlib.dll; DestDir: {app}\Tesseract; Flags: ignoreversion; Components: main
|
Source: ..\Tesseract\leptonlib.dll; DestDir: {app}\Tesseract; Flags: ignoreversion; Components: main
|
||||||
Source: ..\Tesseract\tesseract.exe; DestDir: {app}\Tesseract; Flags: ignoreversion; Components: main
|
Source: ..\Tesseract\tesseract.exe; DestDir: {app}\Tesseract; Flags: ignoreversion; Components: main
|
||||||
@ -318,6 +317,7 @@ begin
|
|||||||
DeleteFile(ExpandConstant('{userappdata}\Subtitle Edit\Dictionaries\en_US_user.xml'));
|
DeleteFile(ExpandConstant('{userappdata}\Subtitle Edit\Dictionaries\en_US_user.xml'));
|
||||||
DeleteFile(ExpandConstant('{userappdata}\Subtitle Edit\Dictionaries\eng_OCRFixReplaceList.xml'));
|
DeleteFile(ExpandConstant('{userappdata}\Subtitle Edit\Dictionaries\eng_OCRFixReplaceList.xml'));
|
||||||
DeleteFile(ExpandConstant('{userappdata}\Subtitle Edit\Dictionaries\names_etc.xml'));
|
DeleteFile(ExpandConstant('{userappdata}\Subtitle Edit\Dictionaries\names_etc.xml'));
|
||||||
|
DeleteFile(ExpandConstant('{userappdata}\Subtitle Edit\Dictionaries\swe_OCRFixReplaceList.xml'));
|
||||||
DelTree(ExpandConstant('{userappdata}\Subtitle Edit\Dictionaries\*.dic'), False, True, False);
|
DelTree(ExpandConstant('{userappdata}\Subtitle Edit\Dictionaries\*.dic'), False, True, False);
|
||||||
DelTree(ExpandConstant('{userappdata}\Subtitle Edit\Dictionaries\*.aff'), False, True, False);
|
DelTree(ExpandConstant('{userappdata}\Subtitle Edit\Dictionaries\*.aff'), False, True, False);
|
||||||
RemoveDir(ExpandConstant('{userappdata}\Subtitle Edit\Dictionaries'));
|
RemoveDir(ExpandConstant('{userappdata}\Subtitle Edit\Dictionaries'));
|
||||||
|
Loading…
Reference in New Issue
Block a user