From a5fb305197612efc25c5f3c34bcba1e206378b8e Mon Sep 17 00:00:00 2001 From: A2va <49582555+A2va@users.noreply.github.com> Date: Tue, 6 Jun 2023 15:57:08 +0200 Subject: Long Path checkbox --- scripts/installer.nsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/scripts/installer.nsi b/scripts/installer.nsi index 9d309fdbe..9257f235c 100644 --- a/scripts/installer.nsi +++ b/scripts/installer.nsi @@ -285,6 +285,19 @@ Section "XMake (required)" InstallExeutable SectionEnd +Section "Enable Long Path" LongPath + ; Get git path from the registry + ReadRegStr $R0 ${HKLM} "SOFTWARE\GitForWindows" "InstallPath" + ${If} $NOADMIN == "false" + ; In admin enable long path on both git system config and in registry + WriteRegDWORD ${HKLM} "SYSTEM\CurrentControlSet\Control\FileSystem" "LongPathsEnabled" 1 + Exec '"$R0\cmd\git.exe" config --system core.longpaths true' + ${Else} + ; Enable only in git global config + Exec '"$R0\cmd\git.exe" config --global core.longpaths true' + ${EndIf} +SectionEnd + Section "Add to PATH" InstallPath ${If} $NOADMIN == "false" @@ -314,11 +327,13 @@ SectionEnd ; Language strings LangString DESC_InstallExeutable ${LANG_ENGLISH} "A cross-platform build utility based on Lua" LangString DESC_InstallPath ${LANG_ENGLISH} "Add xmake to PATH" +LangString DESC_LongPath ${LANG_ENGLISH} "Enable long path on both Windows and Git" ; Assign language strings to sections !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${InstallExeutable} $(DESC_InstallExeutable) !insertmacro MUI_DESCRIPTION_TEXT ${InstallPath} $(DESC_InstallPath) +!insertmacro MUI_DESCRIPTION_TEXT ${LongPath} $(DESC_LongPath) !insertmacro MUI_FUNCTION_DESCRIPTION_END ;-------------------------------- -- cgit v1.3.1 From 79ec23a4de0853f33f6cd9471b42aa23032cca85 Mon Sep 17 00:00:00 2001 From: A2va <49582555+A2va@users.noreply.github.com> Date: Tue, 6 Jun 2023 16:29:21 +0200 Subject: Remove git execution --- scripts/installer.nsi | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/installer.nsi b/scripts/installer.nsi index 9257f235c..e446e699f 100644 --- a/scripts/installer.nsi +++ b/scripts/installer.nsi @@ -286,15 +286,9 @@ Section "XMake (required)" InstallExeutable SectionEnd Section "Enable Long Path" LongPath - ; Get git path from the registry - ReadRegStr $R0 ${HKLM} "SOFTWARE\GitForWindows" "InstallPath" ${If} $NOADMIN == "false" - ; In admin enable long path on both git system config and in registry + ; Enable long path WriteRegDWORD ${HKLM} "SYSTEM\CurrentControlSet\Control\FileSystem" "LongPathsEnabled" 1 - Exec '"$R0\cmd\git.exe" config --system core.longpaths true' - ${Else} - ; Enable only in git global config - Exec '"$R0\cmd\git.exe" config --global core.longpaths true' ${EndIf} SectionEnd -- cgit v1.3.1 From 4bce1b31261aee7af7b575441d71230acf97cb1b Mon Sep 17 00:00:00 2001 From: A2va <49582555+A2va@users.noreply.github.com> Date: Tue, 6 Jun 2023 16:56:54 +0200 Subject: Improve description --- scripts/installer.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/installer.nsi b/scripts/installer.nsi index e446e699f..c9dd87736 100644 --- a/scripts/installer.nsi +++ b/scripts/installer.nsi @@ -321,7 +321,7 @@ SectionEnd ; Language strings LangString DESC_InstallExeutable ${LANG_ENGLISH} "A cross-platform build utility based on Lua" LangString DESC_InstallPath ${LANG_ENGLISH} "Add xmake to PATH" -LangString DESC_LongPath ${LANG_ENGLISH} "Enable long path on both Windows and Git" +LangString DESC_LongPath ${LANG_ENGLISH} "Increases the maximum path length limit, up to 32,767 characters (before 256). This can be useful if a project has many recursive subfolders to make sure that the project is compiled without errors. A reboot might be required because some processes may have started before the new value was set" ; Assign language strings to sections !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN -- cgit v1.3.1