-
Notifications
You must be signed in to change notification settings - Fork 33
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
u3d/install: add support for installing .msi packages on Windows #230
Conversation
lib/u3d/installer.rb
Outdated
@@ -311,7 +311,11 @@ def install_exe(file_path, installation_path: nil, info: {}) | |||
command = nil | |||
if info['cmd'] | |||
command = info['cmd'] | |||
command.sub!(/{FILENAME}/, file_path) | |||
if /msiexec/ =~ command | |||
command.sub!(/{FILENAME}/, '"' + file_path.gsub(%r{\/(\d)}, '/\\\\\1').tr('/', '\\') + '"') |
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.
turn this into a private method?
windows_path(file_path) or something?
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.
Maybe put in utils?
This could be reusable
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.
as you wish. At least extract it from here to that we can understand what happens without decrypting the code :)
I just realized that in the same file we already do some windows sanitization. In a different way:
|
Oh right. Well this is not the good way then, let me change that. The issue we had was when sub was called with |
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.
Fine for me. A last install test maybe? After merging.
This adds support for downloading and installing .msi packages for Windows.