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

Add Info plist to mac resources #5986

Merged
merged 11 commits into from
Apr 26, 2020
Merged

Add Info plist to mac resources #5986

merged 11 commits into from
Apr 26, 2020

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented Feb 21, 2020

Hopefully fixes #5935

Can't test it as I don't own a mac.

Based on https://hg.openjdk.java.net/jdk/jdk/file/tip/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/resources/Runtime-Info.plist.template

Added the key NSSupportsAutomaticGraphicsSwitching with a value of true.

  • Change in CHANGELOG.md described (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for bigger UI changes)
  • Checked documentation: Is the information available and up to date? If not: Issue created at https://github.com/JabRef/user-documentation/issues.

@stefan-kolb
Copy link
Member

@LinusDietz Could you test this for us? 😺

@tobiasdiez
Copy link
Member

The file name needs to be exactly the same one as in the upstream jdk, so in this case Runtime-Info.plist I guess

* upstream/master:
  Fix NPE in OpenAccessDoi (#5994)
  Move generate BibTeX keys to Edit menu (#5987)
  Fixed display of groups and links column in MainTable (#5985)
  Fixed loosing group if the most bottom one in list is dragged on itself (#5983)
  Dividers (#5975)
  Add initial section on code quality (#5991)
  Create .sonarcloud.properties
  Add new IntelliJ video tutorial to docs. (#5984)
  Fix checkstyle
  Optimize stream() code
  Use application/x-bibtex for Grobid instance
@Siedlerchr
Copy link
Member Author

@halirutan Could you test again? I renamed the file, hopefully it gets replaced

@Siedlerchr
Copy link
Member Author

I downloaded the newly built ones and it still does not use the custom one.
Although it should: https://bugs.openjdk.java.net/browse/JDK-8233175

@halirutan
Copy link
Collaborator

@Siedlerchr This bugreport is exactly what I was looking at as well, and I also find it odd that it doesn't work. You test if the solution works by downloading the mac tar.gz and looking at the Info.plist. I guess there's no way around debugging the Gradle task.

@tobiasdiez
Copy link
Member

According to
https://github.com/openjdk/jdk/blob/a94b4fc695ad29653b87ff1ec572babcda4cca5c/src/jdk.incubator.jpackage/macosx/classes/jdk/incubator/jpackage/internal/MacAppImageBuilder.java#L71-L74
the file should end on template. It should work now. Note that the info.plist in the Contents/runtime folder is changed, there is also one directly in Contents.

@Siedlerchr
Copy link
Member Author

I'm out of ideas. It seems like those plist file is always overwritten again or regenerated.

@halirutan
Copy link
Collaborator

@Siedlerchr Stupid question: When jpackage is run through Gradle, is it called twice? Once for building the image and one for building the installer? What I want to point at is that we set the resource-folder in the installerOptions but shouldn't this be an option for jpackageImage?

@Siedlerchr
Copy link
Member Author

@halirutan Interesting thought, we have proesses for copying over the jabfox related extension stuff,

if (OperatingSystem.current().isLinux()) {
    tasks.jpackageImage.doLast {
        copy {
            from("${projectDir}/buildres/linux") {
                include "native-messaging-host/**", "jabrefHost.py"
            }
            into "$buildDir/distribution/JabRef/lib"
        }
    }
}

Feel free to add a task for mac (You should be able to directly push to this branch)

@tobiasdiez
Copy link
Member

Good observation @halirutan. I tried to include the resource directory now already for the image creation.

@Siedlerchr
Copy link
Member Author

Seems like it didn't work. No idea why it doesnt work

@koppor koppor force-pushed the master branch 5 times, most recently from b8ef7b7 to 21c6e5e Compare March 4, 2020 17:02
@koppor koppor changed the title add Info plist to mac resources [WIP] add Info plist to mac resources Mar 6, 2020
* upstream/master: (287 commits)
  Bump junit-vintage-engine from 5.6.1 to 5.6.2 (#6276)
  Number of items found in ImportEntriesDialog (#6248)
  Fix dependency label
  Bump flexmark-ext-gfm-strikethrough from 0.61.0 to 0.61.6 (#6273)
  Bump unirest-java from 3.7.01 to 3.7.02 (#6275)
  Bump junit-platform-launcher from 1.6.1 to 1.6.2 (#6279)
  Bump flexmark-ext-gfm-tasklist from 0.61.0 to 0.61.6 (#6278)
  Bump junit-jupiter from 5.6.1 to 5.6.2 (#6274)
  Bump flexmark from 0.61.0 to 0.61.6 (#6280)
  Bump classgraph from 4.8.68 to 4.8.69 (#6277)
  Bump org.beryx.jlink from 2.17.4 to 2.17.5 (#6281)
  Improve performance (#6270)
  Improve calculation of matched entries upon change (#6268)
  Fix sort by priority (#6222) (#6265)
  Squashed 'src/main/resources/csl-styles/' changes from 88726cb..db54e56
  Use https everywhere
  Entry editor: Add more tooltips and wrap tooltips if necessary (#6239)
  JDK14 switch - and checkstyle skipping (#6250)
  Bump postgresql from 42.2.11 to 42.2.12 (#6254)
  Bump unirest-java from 3.7.00 to 3.7.01 (#6253)
  ...
@Siedlerchr
Copy link
Member Author

Trying again with the jdk14 release version

* upstream/addInfoPlist:
  Try to load resources already for image creation
  Update Runtime-Info.plist.template
  Create Info-lite.plist.template
  Rename Runtime-Info.plist to Runtime-Info.plist.template
@Siedlerchr
Copy link
Member Author

Refs beryx/badass-jlink-plugin#132

@koppor koppor changed the title [WIP] add Info plist to mac resources Add Info plist to mac resources Apr 23, 2020
# By Tobias Diez (10) and others
# Via dimitra-karadima (5) and others
* upstream/master: (62 commits)
  Backward compatibility for 4.3.1 (#6296)
  Fix Export to clipboard Dialog icon (#6345)
  Refactor EntryEditorPreferences (#6245)
  Update label names
  Squashed 'src/main/resources/csl-locales/' changes from d0ee4d13c9..79845b087b
  Squashed 'src/main/resources/csl-styles/' changes from c1793d2..143464e
  Cite work by @ayaankazerouni
  Improve performance for loading files (#6332)
  Add ADR von JUnit vs. AssertJ (#6335)
  'Name' textfield on focus instead of 'OK' button when user clicks on 'Add subgroup' option (#6330)
  Bump jurt from 6.3.2 to 6.4.3 (#6325)
  Bump unoil from 6.3.2 to 6.4.3 (#6320)
  Bump ridl from 6.3.2 to 6.4.3 (#6326)
  Bump classgraph from 4.8.69 to 4.8.71 (#6322)
  Bump flexmark from 0.61.6 to 0.61.16 (#6318)
  Bump richtextfx from 0.10.4 to 0.10.5 (#6319)
  Bump guava from 28.2-jre to 29.0-jre (#6323)
  Bump flexmark-ext-gfm-tasklist from 0.61.6 to 0.61.16 (#6327)
  Bump org.beryx.jlink from 2.17.5 to 2.17.7 (#6324)
  Improve performance massively by fixing a stupid binding mistake (#6316)
  ...

# Conflicts:
#	build.gradle
@Siedlerchr Siedlerchr marked this pull request as ready for review April 26, 2020 17:33
@Siedlerchr
Copy link
Member Author

Siedlerchr commented Apr 26, 2020

Okay, I got it to work. At least the Runtime-Info.plist is correct now. The Info.plist under Contents also

@Siedlerchr Siedlerchr merged commit 1486358 into master Apr 26, 2020
@Siedlerchr Siedlerchr deleted the addInfoPlist branch April 26, 2020 17:52
Siedlerchr added a commit that referenced this pull request Apr 30, 2020
…ionCaseInsensitive

* upstream/master:
  New Crowdin translations (#6375)
  Squashed 'src/main/resources/csl-styles/' changes from 143464e..906cd6d
  Fixes #6357: File directory (#6377)
  Disable the generate button if the ID field is empty (#6371)
  Fix Preferences style value too long (#6372)
  Fix various Dark theme issues (#6368)
  Correct label name in dependabot
  Bump java-diff-utils from 4.5 to 4.7 (#6365)
  Try with info.plist.template also (#6366)
  Fix wrong button order (Apply and Cancel) in ManageProtectedTermsDialog. (#6358)
  Bump flexmark-ext-gfm-strikethrough from 0.61.6 to 0.61.20 (#6361)
  Bump checkstyle from 8.31 to 8.32 (#6360)
  Bump flexmark-ext-gfm-tasklist from 0.61.16 to 0.61.20 (#6364)
  Bump flexmark from 0.61.16 to 0.61.20 (#6359)
  Bump org.beryx.jlink from 2.17.7 to 2.17.8 (#6362)
  Bump classgraph from 4.8.71 to 4.8.77 (#6363)
  Change blue and red colors in Merge entries dialog in Dark theme (#6356)
  Add Info plist to mac resources (#5986)
  Backward compatibility for 4.3.1 (#6296)
koppor pushed a commit that referenced this pull request Apr 25, 2022
76b4268 Style for Acta Physica Sinica (物理学报) (#6009)
604de6f MLA Publication Date update (#5927)
41ce2d4 Update netherlands-journal-of-geosciences-geologie-en-mijnbouw.csl (#6027)
ad08f5d Adds space after title writing in ABNT style file (#6031)
0b5c1c2 Create CRCAO Light (#5935)
2f42b8c Create annals-of-laboratory-medicine.csl (#5959)
80a9506 Create annual-review-of-linguistics (#5992)
0fb9c40 Update the-journal-of-egyptian-archaeology.csl (#6028)
5ff53b1 Update guide-des-citations-references-et-abreviations-juridiques.csl (#6002)
c1c0212 Update society-for-american-archaeology.csl (#5919)
129ef3c Update administrative-science-quarterly.csl (#5991)
8bc22bd Create multilingual-matters.csl (#5955)
aca84fd Create expert-reviews-in-molecular-medicine.csl (#5961)
3c4ddc0 Create ethnobiology-letters.csl (#5986)
c301e04 Update heidelberg-university-faculty-of-medicine.csl (#5932)
a8c4396 Update tyndale-bulletin.csl (#5949)
c18cbcf Bluebook hotfix
d950b2b  Create incontext-studies-in-translation-and-interculturalism.csl (#5907)
7cfc106 Bump nokogiri from 1.13.2 to 1.13.4 (#6016)
0baa43a Liebert update (#6026)
41ca2b3 Bluebook Add space for ibid  (#6025)
6707a37 Update american-journal-of-botany.csl (#5954)
926fad5 Update boletin-de-pediatria.csl (#6024)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 76b4268
Jonathan-Oliveira pushed a commit to Jonathan-Oliveira/jabref that referenced this pull request May 7, 2022
76b4268 Style for Acta Physica Sinica (物理学报) (JabRef#6009)
604de6f MLA Publication Date update (JabRef#5927)
41ce2d4 Update netherlands-journal-of-geosciences-geologie-en-mijnbouw.csl (JabRef#6027)
ad08f5d Adds space after title writing in ABNT style file (JabRef#6031)
0b5c1c2 Create CRCAO Light (JabRef#5935)
2f42b8c Create annals-of-laboratory-medicine.csl (JabRef#5959)
80a9506 Create annual-review-of-linguistics (JabRef#5992)
0fb9c40 Update the-journal-of-egyptian-archaeology.csl (JabRef#6028)
5ff53b1 Update guide-des-citations-references-et-abreviations-juridiques.csl (JabRef#6002)
c1c0212 Update society-for-american-archaeology.csl (JabRef#5919)
129ef3c Update administrative-science-quarterly.csl (JabRef#5991)
8bc22bd Create multilingual-matters.csl (JabRef#5955)
aca84fd Create expert-reviews-in-molecular-medicine.csl (JabRef#5961)
3c4ddc0 Create ethnobiology-letters.csl (JabRef#5986)
c301e04 Update heidelberg-university-faculty-of-medicine.csl (JabRef#5932)
a8c4396 Update tyndale-bulletin.csl (JabRef#5949)
c18cbcf Bluebook hotfix
d950b2b  Create incontext-studies-in-translation-and-interculturalism.csl (JabRef#5907)
7cfc106 Bump nokogiri from 1.13.2 to 1.13.4 (JabRef#6016)
0baa43a Liebert update (JabRef#6026)
41ca2b3 Bluebook Add space for ibid  (JabRef#6025)
6707a37 Update american-journal-of-botany.csl (JabRef#5954)
926fad5 Update boletin-de-pediatria.csl (JabRef#6024)

git-subtree-dir: buildres/csl/csl-styles
git-subtree-split: 76b4268
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.

JabRef switches on macOS to discrete graphics which is not necessary
5 participants