diff options
| author | A2va <[email protected]> | 2023-06-06 15:57:08 +0200 |
|---|---|---|
| committer | A2va <[email protected]> | 2023-06-06 15:57:08 +0200 |
| commit | a5fb305197612efc25c5f3c34bcba1e206378b8e (patch) | |
| tree | ee378520c601d96ad9815a4a340c93a34af6526c /scripts | |
| parent | 068a8296f6e7f1b3dab18b81efc7a46f4874af58 (diff) | |
Long Path checkbox
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/installer.nsi | 15 |
1 files changed, 15 insertions, 0 deletions
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 ;-------------------------------- |
