-
-
Notifications
You must be signed in to change notification settings - Fork 776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long Path checkbox #3821
Long Path checkbox #3821
Conversation
scripts/installer.nsi
Outdated
${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' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If git is not installed on the user's system, or if the installation path is not cmd\git.exe, the installation may fail.
And, xmake may install git in its own package installation directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only for installing the xmake-repo package does git need to support long paths, but for some packages that need to handle long paths, we will turn on long paths to support it.
So I don't think git's setting of longpath is necessary, it's automatically supported by xmake when installing packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this setting may have an effect on other programs and it is recommended that more detailed descriptive information be provided to tell the user the context in which it is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know about that policy, so I will remove the execution of git. The description will be modified to inform the user that it needs to reboot to make sure that all program have registered the new key value.
From the Microsoft docs:
The registry key will not be reloaded during the lifetime of the process. In order for all apps on the system to recognize the value of the key, a reboot might be required because some processes may have started before the key was set.
ok, thanks |
Sometimes when xmake is building a package on Windows, it fails because the path is too long to handle. This issue can also occur when installing a package from a repository with a lot of submodules. Therefore, this PR attempts to mitigate the problem by providing a setting in the NSIS installer.
The NSIS configuration file is modified to:
Unfortunately, the execution of git opens a terminal for a short time (~100ms). I did some research to remove this behavior, but it seems that the only way is to use nsExec plugin which is already present in the codebase but not enabled by default. Therefore, if you prefer to have a silent execution, you would have to compile the plugin first (That's why I have set this PR in draft mode).