-
Notifications
You must be signed in to change notification settings - Fork 236
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
Fix #61 (insufficient rights to create symlink) #69
Conversation
On Windows 10, symlink creation is not allowed unless the process runs with elevated rights. As per https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/#joC5tFKhdXs2gGml.97, starting with Windows 10 Insiders build 14972, symlinks can be created without needing to elevate the console as administrator. To use this functionality, 0x2 needs to be set in the flags argument for the CreateSymbolicLinkW() call. This fixes FreeCAD#61
Note that this still fails unless the user has activated developer mode. This should probably go into notes somewhere, or be printed when the symlink creation fails. |
@wschildbach do you mind opening a thread on the FC Forums in regard to this issue for more community discussion ? Thanks |
…ymbolic link This change was suggested by @afester.
@sgrogan write in #61 (comment)
|
This will actually only serve pre-0.17 versions (in 0.17 onwards it is bundled with FreeCAD itself, and IIRC symlinks are not used anymore on win) so I think we can consider this macro as deprecated now. I don't know if it's better to apply this patch or not.. |
is there a way to conditionally apply it if a user is running windows and pre-0.17 FC ? |
I don't think the patch will cause any problems. No need to conditionally apply it, the question is how long to maintain the macro. The only utility I see is if a user is using 0.16-legacy and using add-ons. Don't know how many add-ons work with this version. IMHO the macro is obsolete, superseded by built in functionality, and can be removed from the repo. |
Some on older machines still use 0.16 we've even seen 0.15 on the forums recently. |
I think we could remove the macro, it probably doesn't even work anymore... |
Agreed |
Seems the question is more about deployment than the code behavior, but let me know if I can help by testing... |
Okay we decided to remove the macro, because it is too old now, and, since the addon manager now seems to work for everybody, it would only be useful for pre-0.17 users, I don't think (I hope!) there are many left :) So this PR doesn't apply anymore... I'm closing it then, thanks anyway for the effort and help @wschildbach ! |
On Windows 10, symlink creation is not allowed unless the process runs with elevated rights.
As per https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/#joC5tFKhdXs2gGml.97, starting with Windows 10 Insiders build 14972, symlinks can be created without needing to elevate the console as administrator.
To use this functionality, 0x2 needs to be set in the flags argument for the CreateSymbolicLinkW() call. This fixes #61 .
A separate patch for the integrated AddOnManager is forthcoming.