From daf3df51e4be2acde7c25a3f3dd2eee7ce184f37 Mon Sep 17 00:00:00 2001 From: Michael Schuster Date: Wed, 11 Mar 2020 05:35:11 +0100 Subject: [PATCH 01/10] Fix comment typo Signed-off-by: Michael Schuster Signed-off-by: dogwolf --- nextcloud.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextcloud.nsi b/nextcloud.nsi index 00a41af11..8c0d815fd 100644 --- a/nextcloud.nsi +++ b/nextcloud.nsi @@ -433,7 +433,7 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION !finalize '"${CURRENT_PATH}\sign.bat" "%1"' !endif !if ${UPLOAD_BUILD} != 0 - !finalize '"${CURRENT_PATH}\upload.bat" %1' ; note: %1 quotes intenionally removed! + !finalize '"${CURRENT_PATH}\upload.bat" %1' ; note: %1 quotes intentionally removed! !endif SectionEnd !endif ;IS_INNER_SIGN_UNINSTALLER From 11ddad191624d3222e12b4081ea9ded82882566a Mon Sep 17 00:00:00 2001 From: Michael Schuster Date: Wed, 11 Mar 2020 07:23:50 +0100 Subject: [PATCH 02/10] Windows Explorer integration: Respect user choice for the client's first launch Ensure that the config variable 'showInExplorerNavigationPane' reflects the user's choice and write it to the nextcloud.cfg file. Signed-off-by: Michael Schuster Signed-off-by: dogwolf --- nextcloud.nsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/nextcloud.nsi b/nextcloud.nsi index 8c0d815fd..0342c04eb 100644 --- a/nextcloud.nsi +++ b/nextcloud.nsi @@ -558,6 +558,28 @@ Section -post WriteRegDWORD ${MEMENTO_REGISTRY_ROOT} "${MEMENTO_REGISTRY_KEY}" "NoRepair" "1" + ;Respect user choices for the client's first launch. + Var /GLOBAL configFileName + StrCpy $configFileName "$APPDATA\${APPLICATION_NAME}\${APPLICATION_SHORTNAME}.cfg" + + !ifdef OPTION_SECTION_SC_SHELL_EXT + Var /GLOBAL showInExplorerNavigationPane + + ${If} ${SectionIsSelected} ${SEC_SHELL_EXT} + StrCpy $showInExplorerNavigationPane "true" + ${Else} + StrCpy $showInExplorerNavigationPane "false" + ${EndIf} + + CreateDirectory "$APPDATA\${APPLICATION_NAME}" + + SetShellVarContext all + DeleteINIStr "$configFileName" "General" "showInExplorerNavigationPane" + WriteIniStr "$configFileName" "General" "showInExplorerNavigationPane" "$showInExplorerNavigationPane" + SetShellVarContext current + !endif + + SetDetailsPrint textonly DetailPrint $UNINSTALLER_FINISHED_Detail SectionEnd From 2e38d5735100843514a40ec3b4a293e88514db2d Mon Sep 17 00:00:00 2001 From: Michael Schuster Date: Wed, 11 Mar 2020 10:51:14 +0100 Subject: [PATCH 03/10] Add CFG file variable for App config Signed-off-by: Michael Schuster Signed-off-by: dogwolf --- nextcloud.nsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nextcloud.nsi b/nextcloud.nsi index 0342c04eb..0b528ba1f 100644 --- a/nextcloud.nsi +++ b/nextcloud.nsi @@ -5,6 +5,7 @@ !define APPLICATION_VENDOR "$%APPLICATION_VENDOR%" !define APPLICATION_EXECUTABLE "nextcloud.exe" !define APPLICATION_CMD_EXECUTABLE "nextcloudcmd.exe" +!define APPLICATION_CONFIG_FILE "nextcloud.cfg" !define APPLICATION_DOMAIN "nextcloud.com" !define APPLICATION_LICENSE "" !define WIN_SETUP_BITMAP_PATH "$%PROJECT_PATH%\desktop\admin\win\nsi" @@ -560,7 +561,7 @@ Section -post ;Respect user choices for the client's first launch. Var /GLOBAL configFileName - StrCpy $configFileName "$APPDATA\${APPLICATION_NAME}\${APPLICATION_SHORTNAME}.cfg" + StrCpy $configFileName "$APPDATA\${APPLICATION_NAME}\${APPLICATION_CONFIG_FILE}" !ifdef OPTION_SECTION_SC_SHELL_EXT Var /GLOBAL showInExplorerNavigationPane From 0f447a33a030951246ba38bafe7d82587a3837ab Mon Sep 17 00:00:00 2001 From: dogwolf Date: Mon, 25 May 2020 22:59:05 +0200 Subject: [PATCH 04/10] Update single-build-desktop.bat Rename nextcloud to the app_name parameter Signed-off-by: dogwolf --- single-build-desktop.bat | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/single-build-desktop.bat b/single-build-desktop.bat index 12656bc5d..4ca2ac137 100644 --- a/single-build-desktop.bat +++ b/single-build-desktop.bat @@ -151,6 +151,20 @@ 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 -rf" /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 -rf" /B /wait rm -drf "%MY_INSTALL_PATH%/config/nextcloud/" + ) +) + 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%/" if %ERRORLEVEL% neq 0 goto onError @@ -171,4 +185,4 @@ if "!%*!" == "" ( echo "Missing environment variable: %*" exit /B 1 ) -exit /B \ No newline at end of file +exit /B From 76044ce1815af5c662982110f35e7a26469b3f92 Mon Sep 17 00:00:00 2001 From: dogwolf Date: Mon, 25 May 2020 23:01:15 +0200 Subject: [PATCH 05/10] Update nextcloud.nsi Rename nextcloud to app_name parameter Signed-off-by: dogwolf --- nextcloud.nsi | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/nextcloud.nsi b/nextcloud.nsi index 0b528ba1f..3ec9fd5cd 100644 --- a/nextcloud.nsi +++ b/nextcloud.nsi @@ -1,10 +1,14 @@ ;Nextcloud installer script. +!if "$%USE_BRANDING%" == "1" + !define APPLICATION_NAME "$%APP_NAME%" +!else + !define APPLICATION_NAME "nextcloud" +!endif -!define APPLICATION_SHORTNAME "nextcloud" -!define APPLICATION_NAME "Nextcloud" +!define APPLICATION_SHORTNAME "${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 "" From 53e9457c662de7f00128051c6918a95adb26dc86 Mon Sep 17 00:00:00 2001 From: dogwolf Date: Mon, 25 May 2020 23:04:28 +0200 Subject: [PATCH 06/10] Update single-build-installer-collect.bat Fixed nextcloudsync.dll name otherwise executable returns an error Signed-off-by: dogwolf --- single-build-installer-collect.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/single-build-installer-collect.bat b/single-build-installer-collect.bat index 800595582..b41297a90 100644 --- a/single-build-installer-collect.bat +++ b/single-build-installer-collect.bat @@ -226,7 +226,7 @@ if "%USE_CODE_SIGNING%" == "0" ( "shellext/OCUtil.dll" "%APP_NAME_SANITIZED%.exe" "%APP_NAME_SANITIZED%cmd.exe" - "%APP_NAME_SANITIZED%sync.dll" + "nextcloudsync.dll" "OCContextMenu.dll" "OCOverlays.dll" "ocsync.dll" @@ -260,4 +260,4 @@ if "!%*!" == "" ( echo "Missing environment variable: %*" exit /B 1 ) -exit /B \ No newline at end of file +exit /B From cd1d1062ea74566a5b4b05bd596c9994026e1a4a Mon Sep 17 00:00:00 2001 From: dogwolf Date: Sun, 31 May 2020 17:27:22 +0200 Subject: [PATCH 07/10] Update single-build-desktop.bat Signed-off-by: dogwolf From 760066e0881cb78d528c267c552047a3c48c8466 Mon Sep 17 00:00:00 2001 From: dogwolf Date: Sun, 31 May 2020 17:39:14 +0200 Subject: [PATCH 08/10] Update single-build-desktop.bat Signed-off-by: dogwolf --- single-build-desktop.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/single-build-desktop.bat b/single-build-desktop.bat index 4ca2ac137..774e3ff2d 100644 --- a/single-build-desktop.bat +++ b/single-build-desktop.bat @@ -158,10 +158,10 @@ if "%USE_BRANDING%" == "1" ( 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 -rf" /B /wait rm -drf "%MY_INSTALL_PATH%/bin/nextcloud/" + start "rm branded dir" /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 -rf" /B /wait rm -drf "%MY_INSTALL_PATH%/config/nextcloud/" + start "rm branded dir" /B /wait rm -drf "%MY_INSTALL_PATH%/config/nextcloud/" ) ) From afd3679ce5fa62fd8f56cf36b456d61375123b6e Mon Sep 17 00:00:00 2001 From: dogwolf Date: Sun, 31 May 2020 17:27:22 +0200 Subject: [PATCH 09/10] Update single-build-desktop.bat Signed-off-by: dogwolf From e1b925712efd3257f36d6a1c7cbd880115c243f4 Mon Sep 17 00:00:00 2001 From: dogwolf Date: Sun, 31 May 2020 17:27:22 +0200 Subject: [PATCH 10/10] Update single-build-desktop.bat Signed-off-by: dogwolf