-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(portable): adding splash image to portable nsis package #4425
feat(portable): adding splash image to portable nsis package #4425
Conversation
I am opening this PR early as a draft in order to get the conversation started and get the benefit of CI. I am still working through it, but I welcome any feedback, help, or tips. |
…mage, based on existence of splash image
…E only if one is provided
//tslint:disable-next-line:no-invalid-template-strings | ||
artifactName: "${productName}Portable.${version}.${ext}", | ||
splashImage: path.resolve(getFixtureDir(), "installerHeader.bmp"), |
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.
I am not a fan of this one. However, I tried tracing through the code quickly and did not find an appropriate location to translate relative input (some-dir/my-image.bmp
) to the full path (C:\\Users\\Me\\my-project\\some-dir\\my-image.bmp
). I am not sure if NSIS will use a relative path (most likely yes), but it didn't work when I just followed the examples of existing tests.
I'd appreciate any help here. Where would be the best place in the code to resolve the path for this image?
I applied your changes. But functionality doesn't work correctly — image disappears too quickly. Please address this issue. |
Can you give me more details? What project did you apply this to? I tested it on two projects, and the image always disappeared immediately before the app started. How can I repro the issue you saw? Also, why is this closed? Is there really no chance to work on improvements for PRs submitted to this projects before they are rejected? |
Added by you test :) |
Is this feature working? If so, can we update the documentation? So far I can set the splashImage. I can see that the portable exe contains the bmp image (inspecting with 7z) but the image is never displayed. (I wouldn't miss it, the extraction takes about 20 seconds) |
@montoyaaguirre As far as I know, this is not actually working yet. I implemented the functionality in the NSIS script and validated that, and I had implemented part of passing a variable into the NSIS script. However, I never figured out how the internal module that runs the scripts gets options provided by the publicly-documented module. I had asked for help in a comment on the MR, but instead it was just merged in. I got distracted by other projects so I never looked back to implement the rest of the functionality. If you know more about how the options passing works, I'm happy to help implement the rest. And yes, there are small trivial projects that unzip very fast. Those are projects that just shouldn't have a splash image. But there are also larger more involved projects that take 20 to 30 seconds to unzip, sometimes even longer, and those are the ones where this image is necessary. It is certainly not correct to include it in every project. So to summarize, currently the NSIS scripts are working but there is no way for you to actually pass in an image. |
This PR is meant to address #2548 and #3972 by allowing a developer to add a splash image that is displayed while the portable Windows executable is extracting files. This lets the user know that the application is doing work and will soon open.