Skip to content
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

Symlinks not working on Windows #48

Closed
kal247 opened this issue Jul 12, 2021 · 4 comments
Closed

Symlinks not working on Windows #48

kal247 opened this issue Jul 12, 2021 · 4 comments

Comments

@kal247
Copy link

kal247 commented Jul 12, 2021

Hello,

I'm not able to use symbolic link(s) to call the packed script(s), on Windows 10 and Server 2016.

Please see this link for example code and details : https://perlmonks.org/?node_id=11134716

If it's not supported, I'd suggest to document it (maybe also the fact that macOS aliases and Windows shortcuts won't work, it's not necessarily obvious for everyone).

Thanks

@rschupp
Copy link
Owner

rschupp commented Jul 14, 2021

if it's not supported, I'd suggest to document it (maybe also the fact that macOS aliases and Windows shortcuts won't work, it's not necessarily obvious for everyone).

Where does it say that it should work?

@rschupp rschupp closed this as completed Jul 14, 2021
@kal247
Copy link
Author

kal247 commented Jul 14, 2021

Here :

when multiple programs are packaged, the produced executable will run the one that has the same basename as $0 (i.e. the filename used to invoke it).

Plus, on Linux and macOS, any Perl script called through a symlink has $0 = symlink name.

I've now made some additional tests on Windows, and a process invoked through a symlink gets the executable name, so I suppose that perl doesn't even get the symlink, is it correct?

@AlDanial
Copy link

Ref AlDanial/cloc#849, PAR-Packer's issue with symlinks on Windows causes problems for Perl executables installed via winget.

@Dragon1573
Copy link

Ref AlDanial/cloc#849, PAR-Packer's issue with symlinks on Windows causes problems for Perl executables installed via winget.

For any portable executable, winget.exe will create a symbolic link for that executable in specific folders (mostly %LOCALAPPDATA%\Microsoft\WinGet\Links and C:\Program Files\WinGet\Links), and add them into $PATH environment variables. This mechanism is how winget.exe is designed to be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants