Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger(a)uvena.de>
Committer: Enrico Tröger <enrico.troeger(a)uvena.de>
Date: Sun, 14 Apr 2024 11:51:54 UTC
Commit: 9c2ea2c320ffa235777c85e0e9fd5e4002873ac0
https://github.com/geany/geany-plugins/commit/9c2ea2c320ffa235777c85e0e9fd5…
Log Message:
-----------
Windows installer: Prefer Geany installation directory over user's HOME
If no explicit installation directory was specified and an existing,
Geany installation was found, then use its installation directory.
Closes #1321.
Modified Paths:
--------------
build/geany-plugins.nsi
Modified: build/geany-plugins.nsi
25 lines changed, 14 insertions(+), 11 deletions(-)
===================================================================
@@ -73,7 +73,7 @@ ManifestSupportedOS all
OutFile "${GEANY_PLUGINS_INSTALLER_NAME}"
-Var Answer
+Var UserIsAdmin
Var UserName
Var GEANY_INSTDIR
Var UNINSTDIR
@@ -154,7 +154,7 @@ SectionEnd
Section -Post
WriteUninstaller "$INSTDIR\uninst-plugins.exe"
WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" Path "$INSTDIR"
- ${if} $Answer == "yes" ; if user is admin
+ ${if} $UserIsAdmin == "yes"
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst-plugins.exe"
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\bin\Geany.exe"
@@ -376,16 +376,13 @@ FunctionEnd
Function .onInit
; (from http://jabref.svn.sourceforge.net/viewvc/jabref/trunk/jabref/src/windows/ns…)
; If the user does *not* have administrator privileges, abort
- StrCpy $Answer ""
+ StrCpy $UserIsAdmin ""
StrCpy $UserName ""
- !insertmacro IsUserAdmin $Answer $UserName ; macro from LyXUtils.nsh
- ${if} $Answer == "yes"
+ !insertmacro IsUserAdmin $UserIsAdmin $UserName ; macro from LyXUtils.nsh
+ ${if} $UserIsAdmin == "yes"
SetShellVarContext all ; set that e.g. shortcuts will be created for all users
${else}
SetShellVarContext current
- ; TODO is this really what we want? $PROGRAMFILES is not much better because
- ; probably the unprivileged user can't write it anyways
- StrCpy $INSTDIR "$PROFILE\$(^Name)"
${endif}
; prevent running multiple instances of the installer
@@ -401,6 +398,12 @@ Function .onInit
StrCpy $INSTDIR "$GEANY_INSTDIR"
${EndIf}
+ ; if $INSTDIR has not been set yet above, set it to the profile directory for non-admin users
+ ${If} $INSTDIR == ""
+ ${AndIf} $UserIsAdmin != "yes"
+ StrCpy $INSTDIR "$PROFILE\$(^Name)"
+ ${EndIf}
+
; warn about a new install over an existing installation
ReadRegStr $R0 SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString"
StrCmp $R0 "" finish
@@ -431,9 +434,9 @@ FunctionEnd
Function un.onInit
; If the user does *not* have administrator privileges, abort
- StrCpy $Answer ""
- !insertmacro IsUserAdmin $Answer $UserName
- ${if} $Answer == "yes"
+ StrCpy $UserIsAdmin ""
+ !insertmacro IsUserAdmin $UserIsAdmin $UserName
+ ${if} $UserIsAdmin == "yes"
SetShellVarContext all
${else}
; check if the Geany has been installed with admin permisions
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger(a)uvena.de>
Committer: GitHub <noreply(a)github.com>
Date: Sun, 23 Jun 2024 21:06:14 UTC
Commit: 739a801144426662759d956496fd6ba39b2b43f8
https://github.com/geany/geany-plugins/commit/739a801144426662759d956496fd6…
Log Message:
-----------
Merge pull request #1324 from eht16/issue1321_fix_windows_user_installation
Windows installer: Prefer Geany installation directory over user's HOME
Modified Paths:
--------------
build/geany-plugins.nsi
Modified: build/geany-plugins.nsi
25 lines changed, 14 insertions(+), 11 deletions(-)
===================================================================
@@ -73,7 +73,7 @@ ManifestSupportedOS all
OutFile "${GEANY_PLUGINS_INSTALLER_NAME}"
-Var Answer
+Var UserIsAdmin
Var UserName
Var GEANY_INSTDIR
Var UNINSTDIR
@@ -156,7 +156,7 @@ Section -Post
WriteUninstaller "$INSTDIR\uninst-plugins.exe"
WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" Path "$INSTDIR"
- ${if} $Answer == "yes" ; if user is admin
+ ${if} $UserIsAdmin == "yes"
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst-plugins.exe"
WriteRegStr SHCTX "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\bin\Geany.exe"
@@ -378,16 +378,13 @@ FunctionEnd
Function .onInit
; (from http://jabref.svn.sourceforge.net/viewvc/jabref/trunk/jabref/src/windows/ns…)
; If the user does *not* have administrator privileges, abort
- StrCpy $Answer ""
+ StrCpy $UserIsAdmin ""
StrCpy $UserName ""
- !insertmacro IsUserAdmin $Answer $UserName ; macro from LyXUtils.nsh
- ${if} $Answer == "yes"
+ !insertmacro IsUserAdmin $UserIsAdmin $UserName ; macro from LyXUtils.nsh
+ ${if} $UserIsAdmin == "yes"
SetShellVarContext all ; set that e.g. shortcuts will be created for all users
${else}
SetShellVarContext current
- ; TODO is this really what we want? $PROGRAMFILES is not much better because
- ; probably the unprivileged user can't write it anyways
- StrCpy $INSTDIR "$PROFILE\$(^Name)"
${endif}
; prevent running multiple instances of the installer
@@ -403,6 +400,12 @@ Function .onInit
StrCpy $INSTDIR "$GEANY_INSTDIR"
${EndIf}
+ ; if $INSTDIR has not been set yet above, set it to the profile directory for non-admin users
+ ${If} $INSTDIR == ""
+ ${AndIf} $UserIsAdmin != "yes"
+ StrCpy $INSTDIR "$PROFILE\$(^Name)"
+ ${EndIf}
+
; warn about a new install over an existing installation
ReadRegStr $R0 SHCTX "${PRODUCT_UNINST_KEY}" "UninstallString"
StrCmp $R0 "" finish
@@ -433,9 +436,9 @@ FunctionEnd
Function un.onInit
; If the user does *not* have administrator privileges, abort
- StrCpy $Answer ""
- !insertmacro IsUserAdmin $Answer $UserName
- ${if} $Answer == "yes"
+ StrCpy $UserIsAdmin ""
+ !insertmacro IsUserAdmin $UserIsAdmin $UserName
+ ${if} $UserIsAdmin == "yes"
SetShellVarContext all
${else}
; check if the Geany has been installed with admin permisions
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger(a)uvena.de>
Committer: Enrico Tröger <enrico.troeger(a)uvena.de>
Date: Sun, 09 Jun 2024 11:16:06 UTC
Commit: 5d487fc95cddaa56763ffc6e135c7ffe30788c64
https://github.com/geany/geany-plugins/commit/5d487fc95cddaa56763ffc6e135c7…
Log Message:
-----------
Addons: Hide status icon on startup until Geany has started
This avoids showing the status icon without an icon on startup and
even if it is disabled while Geany is starting.
Modified Paths:
--------------
addons/src/ao_systray.c
Modified: addons/src/ao_systray.c
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -189,6 +189,7 @@ static void ao_systray_init(AoSystray *self)
const gchar *icon_name;
priv->icon = gtk_status_icon_new();
+ gtk_status_icon_set_visible(priv->icon, FALSE);
icon_name = gtk_window_get_icon_name(GTK_WINDOW(geany->main_widgets->window));
if (icon_name) /* Geany >= 1.23 */
gtk_status_icon_set_from_icon_name(priv->icon, icon_name);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).