mirror of
https://github.com/YACReader/yacreader
synced 2025-07-19 05:24:57 -04:00
Add an script to create the windows installer automatically
This commit is contained in:
56
ci/win/create_installer.cmd
Normal file
56
ci/win/create_installer.cmd
Normal file
@ -0,0 +1,56 @@
|
||||
@echo off
|
||||
|
||||
SET src_path=..\..\..
|
||||
|
||||
IF "%1"=="x64" (
|
||||
SET exe_path=%src_path%\release64
|
||||
) ELSE (
|
||||
SET exe_path=%src_path%\release
|
||||
)
|
||||
|
||||
rmdir /S /Q installer_contents
|
||||
|
||||
mkdir installer_contents
|
||||
|
||||
copy * installer_contents
|
||||
|
||||
cd installer_contents
|
||||
|
||||
copy %src_path%\COPYING.txt .
|
||||
copy %src_path%\README.md .
|
||||
|
||||
copy %exe_path%\YACReader.exe .
|
||||
copy %exe_path%\YACReaderLibrary.exe .
|
||||
copy %exe_path%\YACReaderLibraryServer.exe .
|
||||
|
||||
windeployqt --release YACReader.exe
|
||||
windeployqt --release --qmldir %src_path%\YACReaderLibrary\qml YACReaderLibrary.exe
|
||||
windeployqt YACReaderLibraryServer.exe
|
||||
|
||||
mkdir utils
|
||||
|
||||
IF "%2"=="7z" (
|
||||
copy %src_path%\dependencies\7zip\win\%1\7z.dll .\utils\7z.dll
|
||||
) ELSE (
|
||||
copy %src_path%\dependencies\unarr\win\%1\unarr.dll .
|
||||
)
|
||||
|
||||
copy %src_path%\dependencies\qrencode\win\%1\qrencode.dll .
|
||||
copy %src_path%\dependencies\pdfium\win\%1\pdfium.dll .
|
||||
copy %src_path%\dependencies\openssl\win\%1\libeay32.dll .
|
||||
copy %src_path%\dependencies\openssl\win\%1\ssleay32.dll .
|
||||
|
||||
xcopy %src_path%\release\server .\server /i /e
|
||||
xcopy %src_path%\release\languages .\languages /i /e
|
||||
|
||||
copy %src_path%\vc_redist.%1.exe .
|
||||
|
||||
type %src_path%\common\yacreader_global.h | findstr /R /C:"#define VERSION " > tmp
|
||||
set /p VERSION= < tmp
|
||||
set VERSION=%VERSION:#define VERSION "=%
|
||||
set VERSION=%VERSION:"=%
|
||||
echo %VERSION%
|
||||
|
||||
iscc /DVERSION=%VERSION% /DPLATFORM=%1 /DCOMPRESSED_ARCHIVE_BACKEND=%2 build_installer.iss
|
||||
|
||||
cd ..
|
Reference in New Issue
Block a user