Fix JabRef-post-image.wsf to make it agnostic to the location of the …#13033
Fix JabRef-post-image.wsf to make it agnostic to the location of the …#13033alexeysemenyukoracle wants to merge 95 commits intoJabRef:mainfrom
Conversation
…project build directory
|
Thanks for the contribution! Looks good from my side. Would you please resolce the conflicts then we can merge it! |
|
Due to the modularization which we merged after the alpha, the jpackage resources are now under jabgui/buildres/windows and in the corresponding build gradle file. |
|
Right, but there is no JabRef-post-image.wsf script in these resources anymore. Instead, there is "main.wxs". If this is a permanent fix and not a temporary workaround for jpackage's bug in JDK24, then this pull request can be discarded. Otherwise, I can merge and integrate it later. |
|
I totally overlooked that it was integrated into the main.wxs now. I think it was originally meant to be a workaround by @koppor but could be a permanent solution now as well if it works as intended. |
|
I think, we should get this in. The idea of the script was IMHO: Take the JDK generated main.w... file as "leading X and add necessary things afterwards. I will try to take care later. (And @alexeysemenyukoracle thank you so much for the time invested!) |
|
As far as I understood openjdk/jdk#19318 (comment) and https://bugs.openjdk.org/browse/JDK-8355651, we should update to JDK25 to have the script working again? 😅 |
|
Blocked by:
Debugging more:
Wishes: |
|
Windows: The ChatGPT-solution (dc293db) seems to be wired... Needs more investigation. |
|
I'd stick to the current workaround with "main.wxs" and revisit this PR later when you decide to migrate to a newer JDK version. |
…mage # Conflicts: # jabgui/build.gradle.kts
|
I merged Too late here for a proper-follow-up now. 😅 |
|
@trag-bot didn't find any issues in the code! ✅✨ |
* upstream/just-jdk25: Use LTWA file from mirror (JabRef#14892) Re-enable JavaDoc formatting (JabRef#14860)
| wxsFile.Close(); | ||
|
|
||
| // Add registry values for JabRef Browser Extension | ||
| contents = contents.replace("</Product>", "<DirectoryRef Id=\"TARGETDIR\"><Component Id=\"RegistryJabRefBrowserEntries\" Guid=\"b6bc55ad-905c-4258-89b1-8b37abbe559c\" Win64=\"yes\"><RegistryKey Root=\"HKMU\" Key=\"SOFTWARE\\Mozilla\\NativeMessagingHosts\\org.jabref.jabref\" Action=\"createAndRemoveOnUninstall\" ForceCreateOnInstall=\"yes\"><RegistryValue Type=\"string\" Value=\"[INSTALLDIR]jabref-firefox.json\"/></RegistryKey><RegistryKey Root=\"HKMU\" Key=\"Software\\Google\\Chrome\\NativeMessagingHosts\\org.jabref.jabref\" Action=\"createAndRemoveOnUninstall\" ForceCreateOnInstall=\"yes\"><RegistryValue Type=\"string\" Value=\"[INSTALLDIR]jabref-chrome.json\"/></RegistryKey><RegistryKey Root=\"HKMU\" Key=\"Software\\Microsoft\\Edge\\NativeMessagingHosts\\org.jabref.jabref\" Action=\"createAndRemoveOnUninstall\" ForceCreateOnInstall=\"yes\"><RegistryValue Type=\"string\" Value=\"[INSTALLDIR]jabref-chrome.json\"/></RegistryKey><RegistryKey Root=\"HKMU\" Key=\"Software\\Google\\Chrome\\Extensions\\bifehkofibaamoeaopjglfkddgkijdlh\" Action=\"createAndRemoveOnUninstall\" ForceCreateOnInstall=\"yes\"><RegistryValue Type=\"string\" Name=\"update_url\" Value=\"https://clients2.google.com/service/update2/crx\" /></RegistryKey><RegistryKey Root=\"HKMU\" Key=\"Software\\Wow6432Node\\Google\\Chrome\\Extensions\\bifehkofibaamoeaopjglfkddgkijdlh\" Action=\"createAndRemoveOnUninstall\" ForceCreateOnInstall=\"yes\"><RegistryValue Type=\"string\" Name=\"update_url\" Value=\"https://clients2.google.com/service/update2/crx\" /></RegistryKey><RegistryKey Root=\"HKMU\" Key=\"Software\\Microsoft\\Edge\\Extensions\\pgkajmkfgbehiomipedjhoddkejohfna\" Action=\"createAndRemoveOnUninstall\" ForceCreateOnInstall=\"yes\"><RegistryValue Type=\"string\" Name=\"update_url\" Value=\"https://edge.microsoft.com/extensionwebstorebase/v1/crx\" /></RegistryKey><RegistryKey Root=\"HKMU\" Key=\"Software\\Wow6432Node\\Microsoft\\Edge\\Extensions\\pgkajmkfgbehiomipedjhoddkejohfna\" Action=\"createAndRemoveOnUninstall\" ForceCreateOnInstall=\"yes\"><RegistryValue Type=\"string\" Name=\"update_url\" Value=\"https://edge.microsoft.com/extensionwebstorebase/v1/crx\" /></RegistryKey></Component></DirectoryRef><Feature Id=\"BrowserExtension\" Level=\"1\"><ComponentRef Id=\"RegistryJabRefBrowserEntries\" /></Feature></Product>"); |
|
Blocked by gradle/gradle#20930 (comment) |
|
Your pull request conflicts with the target branch. Please merge with your code. For a step-by-step guide to resolve merge conflicts, see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line. |
Fix JabRef-post-image.wsf script to make it independent of the project build location.
Build-only change to eliminate dependencies on the context in which the "post-image" jpackage script is called on Windows.
Closes #13034
Important: the baseline for the fix is
v6.0-alpha2tag. There is no JabRef-post-image.wsf in the main branch after #12990, so this PR can not be integrated as-is.Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if change is visible to the user)