Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable rel with deb info build type #129

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 32 additions & 35 deletions defaults.inc.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ Rem ****************************************************************************
rem "Build defaults - environment Variables"
Rem ************************************************************************************************************************************************************************************

rem Release or Debug
set BUILD_TYPE=Release

if "%~1" == "Debug" (set BUILD_TYPE=%~1)

Rem ************************************************************************************************************************************************************************************
rem "CUSTOMIZE HERE:"
Rem ************************************************************************************************************************************************************************************
Expand All @@ -20,42 +15,44 @@ Rem If you intend to modify or specify them outside, keep the scheme!
Rem ************************************************************************************************************************************************************************************
Rem Branding options

if "%APP_NAME%" == "" set APP_NAME=Nextcloud
if "%APP_NAME_SANITIZED%" == "" set APP_NAME_SANITIZED=Nextcloud
if "%APP_NAME%" == "" set "APP_NAME=Nextcloud"
if "%APP_NAME_SANITIZED%" == "" set "APP_NAME_SANITIZED=Nextcloud"

if "%USE_BRANDING%" == "" set "USE_BRANDING=0"

if "%USE_BRANDING%" == "" set USE_BRANDING=0
if "%BUILD_TYPE%" == "" set "BUILD_TYPE=Release"

Rem ************************************************************************************************************************************************************************************
Rem Build environment

rem Comma separated list of build targets (default: Win64, Win32)
if "%BUILD_TARGETS%" == "" set BUILD_TARGETS=Win64
if "%BUILD_TARGETS%" == "" set "BUILD_TARGETS=Win64"

if "%PROJECT_PATH%" == "" set PROJECT_PATH=c:/Nextcloud/client-building
if "%PROJECT_PATH%" == "" set "PROJECT_PATH=c:/Nextcloud/client-building"

if "%Png2Ico_EXECUTABLE%" == "" set Png2Ico_EXECUTABLE=c:/Nextcloud/tools/png2ico.exe
if "%Png2Ico_EXECUTABLE%" == "" set "Png2Ico_EXECUTABLE=c:/Nextcloud/tools/png2ico.exe"

if "%VS_VERSION%" == "" set VS_VERSION=2022
if "%VS_VERSION%" == "" set "VS_VERSION=2022"

Rem Required for Qt's windeployqt to find the VC Redist Setup (and for auto-discovery of signtool.exe)
if "%VCINSTALLDIR%" == "" (
if "%VS_VERSION%" == "2017" (
set VCINSTALLDIR=C:\Program^ Files^ ^(x86^)\Microsoft^ Visual^ Studio\2017\Community\VC
set "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC"
)
if "%VS_VERSION%" == "2019" (
set VCINSTALLDIR=C:\Program^ Files^ ^(x86^)\Microsoft^ Visual^ Studio\2019\Community\VC
set "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC""
)
if "%VS_VERSION%" == "2022" (
set "VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio\2022\Community\VC"
)
)

Rem Required for Git Bash's mkdir.exe (mkdir -p ...)
if "%WIN_GIT_PATH%" == "" set WIN_GIT_PATH=C:\Program Files\Git
if "%WIN_GIT_PATH%" == "" set "WIN_GIT_PATH=C:\Program Files\Git"

Rem ************************************************************************************************************************************************************************************
Rem Test run? 1 = just show environment variables, 0 = normal build (default)
if "%TEST_RUN%" == "" set TEST_RUN=0
if "%TEST_RUN%" == "" set "TEST_RUN=0"

Rem ************************************************************************************************************************************************************************************
Rem Date and version for Desktop and Installer build
Expand All @@ -64,44 +61,44 @@ Rem Try to use our locale-independent helper
call "%~dp0/datetime.inc.bat"
if "%BUILD_DATE%" == "" (
if "%_date%" == "" (
set BUILD_DATE=%date:~10,4%%date:~4,2%%date:~7,2%
set "BUILD_DATE=%date:~10,4%%date:~4,2%%date:~7,2%"
) else (
set BUILD_DATE=%_date:~0,4%%_date:~5,2%%_date:~8,2%
set "BUILD_DATE=%_date:~0,4%%_date:~5,2%%_date:~8,2%"
)
)

if "%VERSION_SUFFIX%" == "" set VERSION_SUFFIX=daily
if "%VERSION_SUFFIX%" == "" set "VERSION_SUFFIX=daily"

Rem Git tags for checkout
Rem Desktop Client (master for daily build or e.g.: stable-2.5.3)
Rem You may query the available tags with "git tag" within ./desktop
if "%TAG_DESKTOP%" == "" set TAG_DESKTOP=master
if "%TAG_DESKTOP%" == "" set "TAG_DESKTOP=master"

Rem ************************************************************************************************************************************************************************************

Rem Git pull defaults
if "%PULL_DESKTOP%" == "" set PULL_DESKTOP=1
if "%PULL_DESKTOP%" == "" set "PULL_DESKTOP=1"

Rem Git checkout defaults
if "%CHECKOUT_DESKTOP%" == "" set CHECKOUT_DESKTOP=1
if "%CHECKOUT_DESKTOP%" == "" set "CHECKOUT_DESKTOP=1"

Rem Branding overrides
if "%USE_BRANDING%" == "1" (
set PULL_DESKTOP=0
set CHECKOUT_DESKTOP=0
set "PULL_DESKTOP=0"
set "CHECKOUT_DESKTOP=0"
)

Rem Updater: ON = build, OFF = don't build (default)
if "%BUILD_UPDATER%" == "" set BUILD_UPDATER=OFF
if "%BUILD_UPDATER%" == "" set "BUILD_UPDATER=OFF"

Rem ************************************************************************************************************************************************************************************
Rem Installer Options: 1 = build, 0 = don't build (default)
if "%BUILD_INSTALLER%" == "" set BUILD_INSTALLER=0
if "%BUILD_INSTALLER%" == "" set "BUILD_INSTALLER=0"

Rem MSI installer: 1 = build (default), 0 = don't build (default)
if "%BUILD_INSTALLER_MSI%" == "" set BUILD_INSTALLER_MSI=1
if "%BUILD_INSTALLER_MSI%" == "" set "BUILD_INSTALLER_MSI=1"

if "%INSTALLER_OUTPUT_PATH%" == "" set INSTALLER_OUTPUT_PATH=%PROJECT_PATH%/daily/
if "%INSTALLER_OUTPUT_PATH%" == "" set "INSTALLER_OUTPUT_PATH=%PROJECT_PATH%/daily/"

Rem ************************************************************************************************************************************************************************************
Rem Code Signing Options: 1 = enable (default), 0 = disable
Expand All @@ -122,24 +119,24 @@ if "%SIGN_TIMESTAMP_DIGEST_ALG%" == "" set "SIGN_TIMESTAMP_DIGEST_ALG=sha25

Rem ************************************************************************************************************************************************************************************
Rem Upload build: 1 = enable (default), 0 = disable
if "%UPLOAD_BUILD%" == "" set UPLOAD_BUILD=1
if "%UPLOAD_BUILD%" == "" set "UPLOAD_BUILD=1"

Rem Delete build after successful upload: 1 = delete, 0 = keep (default)
if "%UPLOAD_DELETE%" == "" set UPLOAD_DELETE=0
if "%UPLOAD_DELETE%" == "" set "UPLOAD_DELETE=0"

Rem: Note: Storing SFTP_PATH outside in Windows's env leads to trouble due to the preceding slash!
if "%SFTP_PATH%" == "" set SFTP_PATH=/var/www/html/desktop/daily/Windows
if "%SFTP_SERVER%" == "" set SFTP_SERVER=
if "%SFTP_USER%" == "" set SFTP_USER=
if "%SFTP_PATH%" == "" set "SFTP_PATH=/var/www/html/desktop/daily/Windows"
if "%SFTP_SERVER%" == "" set "SFTP_SERVER="
if "%SFTP_USER%" == "" set "SFTP_USER="

Rem ************************************************************************************************************************************************************************************
Rem CMake extra build flags (optional)

Rem Here you may define special flags for the Desktop build, e.g. the Update Server URL
Rem ( -DAPPLICATION_UPDATE_URL="https://your.url" ). see: desktop/build/config.h and version.h
if "%CMAKE_EXTRA_FLAGS_DESKTOP%" == "" set CMAKE_EXTRA_FLAGS_DESKTOP=
if "%CMAKE_EXTRA_FLAGS_DESKTOP%" == "" set "CMAKE_EXTRA_FLAGS_DESKTOP="

Rem Optional extra flags for the NSIS Installer build tool
if "%NSIS_EXTRA_FLAGS%" == "" set NSIS_EXTRA_FLAGS=
if "%NSIS_EXTRA_FLAGS%" == "" set "NSIS_EXTRA_FLAGS="

Rem ************************************************************************************************************************************************************************************
6 changes: 5 additions & 1 deletion single-build-installer-collect.bat
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,12 @@ if exist "%MY_BUILD_PATH%/src/gui/%APP_NAME_SANITIZED%.ico" (
)
if %ERRORLEVEL% neq 0 goto onError

if "%BUILD_TYPE%" == "RelWithDebInfo" (
set "PDB_OPTION=--pdb"
)

echo "* run windeployqt "%MY_COLLECT_PATH%/%APP_NAME_SANITIZED%.exe."
start "run windeployqt" /D "%MY_COLLECT_PATH%/" /B /wait windeployqt --compiler-runtime --qmldir "%MY_REPO%\src" --release --force --verbose 2 "%MY_COLLECT_PATH%/%APP_NAME_SANITIZED%.exe" "%MY_COLLECT_PATH%/%APP_NAME_SANITIZED%_csync.dll" "%MY_COLLECT_PATH%/%APP_NAME_SANITIZED%cmd.exe" "%MY_COLLECT_PATH%/%APP_NAME_SANITIZED%sync.dll"
start "run windeployqt" /D "%MY_COLLECT_PATH%/" /B /wait windeployqt %PDB_OPTION% --compiler-runtime --qmldir "%MY_REPO%\src" --pdb --release --force --verbose 2 "%MY_COLLECT_PATH%/%APP_NAME_SANITIZED%.exe" "%MY_COLLECT_PATH%/%APP_NAME_SANITIZED%_csync.dll" "%MY_COLLECT_PATH%/%APP_NAME_SANITIZED%cmd.exe" "%MY_COLLECT_PATH%/%APP_NAME_SANITIZED%sync.dll"
if %ERRORLEVEL% neq 0 goto onError

Rem Remove Qt bearer plugins, they seem to cause issues on Windows
Expand Down