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

u3d/install: add support for installing .msi packages on Windows #230

Merged
merged 4 commits into from
Jan 15, 2018

Conversation

niezbop
Copy link
Member

@niezbop niezbop commented Jan 15, 2018

This adds support for downloading and installing .msi packages for Windows.

@niezbop niezbop requested a review from lacostej January 15, 2018 12:20
@niezbop niezbop added the bug label Jan 15, 2018
@lacostej lacostej added enhancement and removed bug labels Jan 15, 2018
@@ -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('/', '\\') + '"')
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

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 :)

@lacostej lacostej changed the title u3d/install: add support on .msi packages on Windows u3d/install: add support for installing .msi packages on Windows Jan 15, 2018
@lacostej
Copy link
Member

I just realized that in the same file we already do some windows sanitization. In a different way:

      final_path = installation_path.tr('/', '\\')

@niezbop
Copy link
Member Author

niezbop commented Jan 15, 2018

Oh right. Well this is not the good way then, let me change that. The issue we had was when sub was called with \[digit] which was causing issues with the download path. I'll use the new correct one then.

Copy link
Member

@lacostej lacostej left a 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.

@niezbop niezbop merged commit 442610f into DragonBox:master Jan 15, 2018
@niezbop niezbop deleted the install/windows_msi branch January 15, 2018 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants