Skip to content
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
26 changes: 15 additions & 11 deletions nextcloud.nsi
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
;Nextcloud installer script.

!define APPLICATION_SHORTNAME "nextcloud"
!define APPLICATION_NAME "Nextcloud"
!if "$%USE_BRANDING%" == "1"
!define APPLICATION_NAME "$%APP_NAME%"
!else
!define APPLICATION_NAME "nextcloud"
!endif
!define APPLICATION_SHORTNAME "${APPLICATION_NAME}"
!define APPLICATION_NAME "${APPLICATION_NAME}"
!define APPLICATION_VENDOR "$%APPLICATION_VENDOR%"
!define APPLICATION_EXECUTABLE "nextcloud.exe"
!define APPLICATION_CMD_EXECUTABLE "nextcloudcmd.exe"
!define APPLICATION_EXECUTABLE "${APPLICATION_NAME}.exe"
!define APPLICATION_CMD_EXECUTABLE "${APPLICATION_NAME}cmd.exe"
!define APPLICATION_CONFIG_FILE "nextcloud.cfg"
!define APPLICATION_DOMAIN "nextcloud.com"
!define APPLICATION_LICENSE ""
Expand Down Expand Up @@ -57,7 +61,7 @@
;-----------------------------------------------------------------------------

; Safe to use Win64's exe version since we require both builds for this combined installer.
!getdllversion "${SETUP_COLLECTION_PATH}\Win64\nextcloud.exe" expv_
!getdllversion "${SETUP_COLLECTION_PATH}\Win64\${APPLICATION_NAME}.exe" expv_
!define VER_MAJOR "${expv_1}"
!define VER_MINOR "${expv_2}"
!define VER_PATCH "${expv_3}"
Expand All @@ -77,10 +81,10 @@ Var NoAutomaticUpdates
;-----------------------------------------------------------------------------

!define INSTALLER_FILENAME "${APPLICATION_SHORTNAME}-${VERSION}-${MIRALL_VERSION_SUFFIX}-${BUILD_TIME_FILENAME}-${BUILD_TYPE}.exe"
Name "Nextcloud"
Name "${APPLICATION_NAME}"
BrandingText "${APPLICATION_NAME} ${VERSION} - ${BUILD_TIME}"
;IS_INNER_SIGN_UNINSTALLER;OutFile "${PROJECT_PATH}\client-building\daily\${INSTALLER_FILENAME}"
InstallDir "$PROGRAMFILES64\Nextcloud" ; use the correct path for Win64 (on Win32 this is identical to $PROGRAMFILES)
InstallDir "$PROGRAMFILES64\${APPLICATION_NAME}" ; use the correct path for Win64 (on Win32 this is identical to $PROGRAMFILES)
InstallDirRegKey HKCU "Software\${APPLICATION_VENDOR}\${APPLICATION_NAME}" ""
InstType Standard
InstType Full
Expand Down Expand Up @@ -477,7 +481,7 @@ SectionGroup $SectionGroup_Shortcuts
DetailPrint $OPTION_SECTION_SC_START_MENU_DetailPrint
SetDetailsPrint listonly
SetShellVarContext all
CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}" "" "$INSTDIR\nextcloud.ico" 0
CreateShortCut "$SMPROGRAMS\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}" "" "$INSTDIR\${APPLICATION_NAME}.ico" 0
SetShellVarContext current
${MementoSectionEnd}
!endif
Expand All @@ -489,7 +493,7 @@ SectionGroup $SectionGroup_Shortcuts
DetailPrint $OPTION_SECTION_SC_DESKTOP_DetailPrint
SetDetailsPrint listonly
SetShellVarContext all
CreateShortCut "$DESKTOP\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}" "" "$INSTDIR\nextcloud.ico" 0
CreateShortCut "$DESKTOP\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}" "" "$INSTDIR\${APPLICATION_NAME}.ico" 0
SetShellVarContext current
${MementoSectionEnd}
!endif
Expand All @@ -501,7 +505,7 @@ SectionGroup $SectionGroup_Shortcuts
DetailPrint $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint
SetShellVarContext all
SetDetailsPrint listonly
CreateShortCut "$QUICKLAUNCH\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}" "" "$INSTDIR\nextcloud.ico" 0
CreateShortCut "$QUICKLAUNCH\${APPLICATION_NAME}.lnk" "$INSTDIR\${APPLICATION_EXECUTABLE}" "" "$INSTDIR\${APPLICATION_NAME}.ico" 0
SetShellVarContext current
${MementoSectionEnd}
!endif
Expand Down
17 changes: 17 additions & 0 deletions single-build-desktop.bat
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ rem "check for required environment variables"
Rem ******************************************************************************************

call :testEnv APP_NAME
call :testEnv USE_BRANDING
call :testEnv PROJECT_PATH
call :testEnv BUILD_TYPE
call :testEnv BUILD_ARCH
Expand Down Expand Up @@ -159,6 +160,22 @@ if "%BUILD_TYPE%" == "Debug" (
) else (
set WINDEPLOYQT_BUILD_TYPE=release
)

if "%USE_BRANDING%" == "1" (
start "mv nextcloud" /B /wait mv "%MY_INSTALL_PATH%/bin/nextcloud.exe" "%MY_INSTALL_PATH%/bin/%APP_NAME%.exe"
start "mv nextcloudcmd" /B /wait mv "%MY_INSTALL_PATH%/bin/nextcloudcmd.exe" "%MY_INSTALL_PATH%/bin/%APP_NAME%cmd.exe"
if exist "%MY_INSTALL_PATH%/bin/nextcloud/" (
start "mkdir " /B /wait "%WIN_GIT_PATH%\usr\bin\mkdir.exe" -p "%MY_INSTALL_PATH%/bin/%APP_NAME_SANITIZED%/"
start "mv bin files" /B /wait mv "%MY_INSTALL_PATH%/bin/nextcloud/"* "%MY_INSTALL_PATH%/bin/%APP_NAME_SANITIZED%/"
start "rm folder" /B /wait rm -drf "%MY_INSTALL_PATH%/bin/nextcloud/"
start "mkdir %MY_INSTALL_PATH%/config/%APP_NAME%/" /B /wait "%WIN_GIT_PATH%\usr\bin\mkdir.exe" -p "%MY_INSTALL_PATH%/config/%APP_NAME%/"
start "mv config files" /B /wait mv "%MY_INSTALL_PATH%/config/nextcloud/"* "%MY_INSTALL_PATH%/config/%APP_NAME%/"
start "rm folder" /B /wait rm -drf "%MY_INSTALL_PATH%/config/nextcloud/"
)
)

if %ERRORLEVEL% neq 0 goto onError

echo "* Run windeployqt to collect all %APP_NAME%.exe dependencies and output it to %MY_QT_DEPLOYMENT_PATH%/."
start "windeployqt" /B /wait windeployqt.exe --%WINDEPLOYQT_BUILD_TYPE% --compiler-runtime "%MY_INSTALL_PATH%/bin/%APP_NAME%.exe" --dir "%MY_QT_DEPLOYMENT_PATH%/" --qmldir "%MY_REPO%/src/gui"
if %ERRORLEVEL% neq 0 goto onError
Expand Down