-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Download and use MSYS/make locally for Windows postinstall #792
Conversation
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.
Makes sense to me overall. Did you test it as a git dependency on Windows already?
npm-scripts.js
Outdated
|
||
function addMsysToPath() | ||
{ | ||
process.env['PATH'] = process.cwd() + '\\worker\\out\\msys\\bin;' + process.env['PATH']; |
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.
process.cwd()
is probably not a good idea, since it can be called from anywhere. __dirname
should be a better alternative
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.
But the paths in all commands are relative to the cwd.
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.
Hm... yes, other paths are implicitly relative to cwd, but that isn't necessarily what they should be.
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.
Yet this is what they are. 🙂 Currently it looks like the script (with package.json) can be anywhere, but everything else should be in the current directory, rather than vice versa.
I tested it from a local tar obtained by |
You need to make linter happy |
Co-authored-by: Nazar Mokrynskyi <[email protected]>
@snnz would you be so kind porting this to Rust as well, please? |
Unfortunately, I do not know Rust at all. But since it is not a big task, I've tried to write something similar to the Node version looking at the examples. Probably it is clumsy, but it works. However, I didn't manage to complete the installation, because it failed with an error "Filename longer than 260 characters". There are some really long names like " I also noticed that the script |
|
But as to the |
If it works in both native Windows and MinGW environment - sure, let's use that. |
I have added it to the PR, since whether |
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.
Thanks a lot.
Is this ready? Tested?
Co-authored-by: Iñaki Baz Castillo <[email protected]>
So? Is this ready? |
Yes, I suppose so. Github's ci runs without problems, and I also use it successfully to upgrade mediasoup in my dev system. |
Running GH CI here. Merging once it passes. Thanks! |
Released in 3.11.10. Thanks! |
This makes unnecessary to install
MSYS
manually and avoids the problem of the incorrectmake
versions in thePATH
.