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

Fix for finding file identifier in add-launch-to-msi.js #46

Closed
mcantrell opened this issue Dec 14, 2021 · 4 comments
Closed

Fix for finding file identifier in add-launch-to-msi.js #46

mcantrell opened this issue Dec 14, 2021 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@mcantrell
Copy link

jpackage created an MSI with a LongFileName|ShortFileName format which caused the lookup to fail. I ended up using the FindFileIdentifier function in this post to resolve the identifier:

https://stackoverflow.com/a/1681410

You may want to consider enhancing your script to account for these differences if you stumble upon the same issue.

@wiverson
Copy link
Owner

This is great, probably explains an error someone else ran into. I'll merge it in after the holidays, or if you want to send in a PR that would be great.

@wiverson wiverson self-assigned this Dec 15, 2021
@wiverson wiverson added the bug Something isn't working label Dec 15, 2021
@wiverson wiverson added this to the january-2022 milestone Dec 17, 2021
@hrzafer
Copy link

hrzafer commented Dec 17, 2021

Replacing this part:

sql = "SELECT File from File where FileName='${app.name}.exe'";
view = database.OpenView(sql);
view.Execute();
var file = view.Fetch().StringData(1)
WScript.StdErr.WriteLine(file);
view.Close();

with

var file = FindFileIdentifier(database, "${app.name}.exe");

worked.

Thanks.

@hrzafer
Copy link

hrzafer commented Dec 17, 2021

BTW what is the command line equivalent of the goal in the exec-maven-plugin for this? It must be something like:

cd target
cscript packaging/add-launch-to-msi.js [SOME OPTIONS  HERE]

I don't want to run mvn:install for every try.

wiverson added a commit that referenced this issue Jan 16, 2022
@wiverson
Copy link
Owner

Updated template to use @hrzafer fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants