-
Notifications
You must be signed in to change notification settings - Fork 2
WIP: modified wix so msi will be added to the system path #251
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
base: master
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @Hahihula, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant improvement to the Windows installer for the 'eim' application. By integrating a custom WiX template, the installer will now automatically append the application's installation path to the system's environment variables. This change simplifies the post-installation setup for users, enabling them to execute the application directly from any command-line interface without manual configuration. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request aims to add the application's installation directory to the system PATH on Windows. The change in tauri.conf.json is correct for enabling a custom WiX template. However, the provided WiX template in wix/main.wxs is incomplete; it's a fragment instead of a full template file, which will cause the installer build to fail. My review includes a critical comment explaining how to create a proper WiX template based on Tauri's default and correctly include the PATH modification logic.
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | ||
| <Fragment> | ||
| <Component Id="Path" Guid="A6734AA2-8C86-49D5-8501-2DD147D7C816" Directory="INSTALLDIR"> | ||
| <Environment | ||
| Id="PATH" | ||
| Name="PATH" | ||
| Value="[INSTALLDIR]" | ||
| Permanent="no" | ||
| Part="last" | ||
| Action="set" | ||
| System="yes" /> | ||
| </Component> | ||
| </Fragment> | ||
| </Wix> |
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.
This file is a WiX fragment, but Tauri's wix.template option expects a full WiX source file that defines a <Product>. As a fragment, this file is incomplete and will cause the MSI build to fail.
You should use the default Tauri WiX template as a starting point. You can find it in the Tauri repository. After obtaining the full template, you need to add your Component for modifying the PATH and then reference it from a Feature.
-
Place the following
Componentinside theINSTALLDIRDirectoryelement in your template:<Component Id="Path" Guid="A6734AA2-8C86-49D5-8501-2DD147D7C816"> <Environment Id="Path" Name="PATH" Value="[INSTALLDIR]" Permanent="no" Part="last" Action="set" System="yes" /> </Component>
-
Add a reference to this component inside the main
Featureelement:<Feature Id="MainFeature" Title="Main Feature" Level="1"> {{> main.wxs.components}} <ComponentRef Id="Path" /> </Feature>
This will correctly integrate your PATH modification into the installer.
2761231 to
e94f451
Compare
00add7c to
8f4b48d
Compare
8f4b48d to
7bfd32d
Compare
This shoud cause futere msi windows installers of the eim to actually add the eim to the system path automatically.