Work on scripts.

master
Dominik Deák 4 years ago
parent e868806128
commit 295a4ed79f
No known key found for this signature in database
GPG Key ID: 85514EC0CCE7007C
  1. 30
      Scripts/Build/BuildDarwin.sh
  2. 114
      Scripts/Build/BuildWindows.cmd

@ -2,37 +2,37 @@
configureCMake() {
cmake -S "${productRepoPath}" -B "${productBuildPath}" \
-D CMAKE_PREFIX_PATH="${libQtPath}" \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_OSX_DEPLOYMENT_TARGET=10.12 \
-D CMAKE_OSX_ARCHITECTURES=x86_64 \
-D SYNERGY_ENTERPRISE=ON \
cmake -S "${productRepoPath}" -B "${productBuildPath}" \
-D CMAKE_PREFIX_PATH="${libQtPath}" \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_OSX_DEPLOYMENT_TARGET=10.12 \
-D CMAKE_OSX_ARCHITECTURES=x86_64 \
-D SYNERGY_ENTERPRISE=ON \
-D SYNERGY_REVISION="${productRevision}" \
|| exit 1
|| exit 1
}
buildApplication() {
pushd "${productBuildPath}" || exit 1
pushd "${productBuildPath}" || exit 1
make -j || exit 1
make install/strip || exit 1
make -j || exit 1
make install/strip || exit 1
macdeployqt "${productBuildPath}/bundle/Synergy.app" || exit 1
macdeployqt "${productBuildPath}/bundle/Synergy.app" || exit 1
rsync -a --delete "${productBuildPath}/bundle/Synergy.app" "${binariesPath}/${productName}.app" || exit 1
rsync -a --delete "${productBuildPath}/bundle/Synergy.app" "${binariesPath}/${productName}.app" || exit 1
popd
popd
}
buildDMG() {
ln -s /Applications "${productBuildPath}/bundle/Applications"
ln -s /Applications "${productBuildPath}/bundle/Applications"
hdiutil create -volname "${productName} ${productVersion}" -srcfolder "${productBuildPath}/bundle" -ov -format UDZO "${binariesPath}/${productPackageName}.dmg" || exit 1
hdiutil create -volname "${productName} ${productVersion}" -srcfolder "${productBuildPath}/bundle" -ov -format UDZO "${binariesPath}/${productPackageName}.dmg" || exit 1
}

@ -2,93 +2,93 @@
:main
if [%vcvarsallPath] equ [] (
echo error: The required environment variables were not configured.
exit 1
)
if [%vcvarsallPath] equ [] (
echo error: The required environment variables were not configured.
exit 1
)
call "%vcvarsallPath%" x64 || exit 1
call "%vcvarsallPath%" x64 || exit 1
call :configureCMake
call :buildBinaries
call :buildMSI
call :buildZIP
call :configureCMake
call :buildBinaries
call :buildMSI
call :buildZIP
endlocal
endlocal
exit 0
exit 0
:configureCMake
cmake -S "%productRepoPath%" -B "%productBuildPath%"^
-G "%cmakeGenerator%"^
-D CMAKE_PREFIX_PATH="%libQtPath%"^
-D CMAKE_BUILD_TYPE=Release^
-D SYNERGY_ENTERPRISE=ON^
-D SYNERGY_REVISION="%productRevision%"^
|| exit 1
cmake -S "%productRepoPath%" -B "%productBuildPath%"^
-G "%cmakeGenerator%"^
-D CMAKE_PREFIX_PATH="%libQtPath%"^
-D CMAKE_BUILD_TYPE=Release^
-D SYNERGY_ENTERPRISE=ON^
-D SYNERGY_REVISION="%productRevision%"^
|| exit 1
exit /b 0
exit /b 0
:buildBinaries
pushd "%productBuildPath%" || exit 1
pushd "%productBuildPath%" || exit 1
msbuild synergy-core.sln /p:Platform="x64" /p:Configuration=Release /m || exit 1
msbuild synergy-core.sln /p:Platform="x64" /p:Configuration=Release /m || exit 1
popd
popd
exit /b 0
exit /b 0
:buildMSI
pushd "%productBuildPath%\installer" || exit 1
pushd "%productBuildPath%\installer" || exit 1
msbuild Synergy.sln /p:Configuration=Release || exit 1
msbuild Synergy.sln /p:Configuration=Release || exit 1
popd
popd
copy "%productBuildPath%\installer\bin\Release\Synergy.msi" "%binariesPath%" || exit 1
del "%binariesPath%\%productPackageName%.msi"
ren "%binariesPath%\Synergy.msi" "%productPackageName%.msi" || exit 1
copy "%productBuildPath%\installer\bin\Release\Synergy.msi" "%binariesPath%" || exit 1
del "%binariesPath%\%productPackageName%.msi"
ren "%binariesPath%\Synergy.msi" "%productPackageName%.msi" || exit 1
exit /b 0
exit /b 0
:buildZIP
setlocal
setlocal
set sourcePath=%productBuildPath%\bin\Release
set productPath=%productBuildPath%\bin\%productPackageName%
set sourcePath=%productBuildPath%\bin\Release
set productPath=%productBuildPath%\bin\%productPackageName%
mkdir "%productPath%"
mkdir "%productPath%"
copy "%sourcePath%\libEGL.dll" "%productPath%" || exit 1
copy "%sourcePath%\libGLESv2.dll" "%productPath%" || exit 1
copy "%sourcePath%\Qt5Core.dll" "%productPath%" || exit 1
copy "%sourcePath%\Qt5Gui.dll" "%productPath%" || exit 1
copy "%sourcePath%\Qt5Network.dll" "%productPath%" || exit 1
copy "%sourcePath%\Qt5Svg.dll" "%productPath%" || exit 1
copy "%sourcePath%\Qt5Widgets.dll" "%productPath%" || exit 1
copy "%sourcePath%\synergy.exe" "%productPath%" || exit 1
copy "%sourcePath%\synergyc.exe" "%productPath%" || exit 1
copy "%sourcePath%\synergyd.exe" "%productPath%" || exit 1
copy "%sourcePath%\synergys.exe" "%productPath%" || exit 1
copy "%sourcePath%\syntool.exe" "%productPath%" || exit 1
copy "%sourcePath%\libEGL.dll" "%productPath%" || exit 1
copy "%sourcePath%\libGLESv2.dll" "%productPath%" || exit 1
copy "%sourcePath%\Qt5Core.dll" "%productPath%" || exit 1
copy "%sourcePath%\Qt5Gui.dll" "%productPath%" || exit 1
copy "%sourcePath%\Qt5Network.dll" "%productPath%" || exit 1
copy "%sourcePath%\Qt5Svg.dll" "%productPath%" || exit 1
copy "%sourcePath%\Qt5Widgets.dll" "%productPath%" || exit 1
copy "%sourcePath%\synergy.exe" "%productPath%" || exit 1
copy "%sourcePath%\synergyc.exe" "%productPath%" || exit 1
copy "%sourcePath%\synergyd.exe" "%productPath%" || exit 1
copy "%sourcePath%\synergys.exe" "%productPath%" || exit 1
copy "%sourcePath%\syntool.exe" "%productPath%" || exit 1
mkdir "%productPath%\Platforms"
copy "%sourcePath%\Platforms" "%productPath%\Platforms" || exit 1
mkdir "%productPath%\Platforms"
copy "%sourcePath%\Platforms" "%productPath%\Platforms" || exit 1
mkdir "%productPath%\Styles"
copy "%sourcePath%\Styles" "%productPath%\Styles" || exit 1
mkdir "%productPath%\Styles"
copy "%sourcePath%\Styles" "%productPath%\Styles" || exit 1
mkdir "%productPath%\OpenSSL"
copy "%productRepoPath%\ext\openssl\windows\x64\bin\*" "%productPath%\OpenSSL" || exit 1
copy "%productRepoPath%\ext\openssl\windows\x64\bin\*.dll" "%productPath%" || exit 1
mkdir "%productPath%\OpenSSL"
copy "%productRepoPath%\ext\openssl\windows\x64\bin\*" "%productPath%\OpenSSL" || exit 1
copy "%productRepoPath%\ext\openssl\windows\x64\bin\*.dll" "%productPath%" || exit 1
set zipPath=%binariesPath%\%productPackageName%.zip
set zipPath=%binariesPath%\%productPackageName%.zip
powershell.exe -nologo -noprofile -command "& { Compress-Archive -Force -Path '%productPath%' -DestinationPath '%zipPath%' }" || exit 1
powershell.exe -nologo -noprofile -command "& { Compress-Archive -Force -Path '%productPath%' -DestinationPath '%zipPath%' }" || exit 1
endlocal
exit /b 0
endlocal
exit /b 0

Loading…
Cancel
Save