Skip to content

Fix build instructions #579

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

Merged
merged 5 commits into from
Jul 22, 2025
Merged

Fix build instructions #579

merged 5 commits into from
Jul 22, 2025

Conversation

espertus
Copy link
Contributor

@espertus espertus commented Jul 20, 2025

This addresses issue #578. (Fixes #578)

The reason I don't recommend gradlew run is that runs all the modules and has to be exited with Ctrl + C.

FYI I removed the reference to jabgui.bat because that script failed when I ran it in a Windows CMD shell or in PowerShell. I will file an issue in the JabRef repo.

@Siedlerchr
Copy link
Member

@koppor I always use gradlew run

@koppor
Copy link
Member

koppor commented Jul 20, 2025

The section is about building a binary. That "run" appears strange.

@koppor
Copy link
Member

koppor commented Jul 20, 2025

The reason I don't recommend gradlew run is that runs all the modules and has to be exited with Ctrl + C.

One can use ./gradlew :jabgui:run.

See also https://blog.jabref.org/2025/05/31/run-pr/

The aim of that section is, however, to have an installer (or at least a portable edition) - not just run

The new task to call is :jabgui:jpackage. See https://github.com/JabRef/jabref/blob/b4b5094c3ebdc9a3145800dc3aaa1b051713c8c7/.github/workflows/binaries.yml#L236C163-L236C179.

Proposal:

  1. Try out ./gradlew :jabgui:jpackage
  2. Adapt the text where to find the binaries. It should be jabgui/build/packages and then windows-latest/linux/...
  3. Add another section of how to run from source:

Section outline:

  1. Download gg.cmd from https://github.com/eirikb/gg#ggcmd
  2. sh ./gg.cmd jbang https://github.com/JabRef/jabref/blob/main/.jbang/CloneJabRef.java
  3. cd into the checkout directory
  4. Move gg.cmd there
  5. sh ./gg.cmd just run-gui

These steps are adapted from https://blog.jabref.org/2025/05/31/run-pr/ (instead of just run-pr xyz, it is just run-gui)

You can adapt if you find other things more intuitive. For instance, CloneJabRef.java takes an argument for a target directory.

One could do:

  1. Download gg.cmd from https://github.com/eirikb/gg#ggcmd
  2. sh ./gg.cmd jbang https://github.com/JabRef/jabref/blob/main/.jbang/CloneJabRef.java jabref
  3. cd jabref
  4. mv ../gg.cmd .
  5. sh ./gg.cmd just run-gui

FYI I removed the reference to jabgui.bat because that script failed when I ran it in a Windows CMD shell or in PowerShell. I will file an issue in the JabRef repo.

One neesd to run the .exe:

image

@espertus
Copy link
Contributor Author

Try out ./gradlew :jabgui:jpackage

That failed for me because it relies on WiX, which I do not have installed. Should I add it as a prerequiste on Windows?

@Siedlerchr
Copy link
Member

Ah yes, wixtoolset is a requirement for jpackage on windows

@Siedlerchr
Copy link
Member

After thinking again about your issue and seeing your email, I think this might be what you want https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace/

@koppor
Copy link
Member

koppor commented Jul 20, 2025

Google found https://stackoverflow.com/a/79256849/873282

But

While the source code is freely available under the terms of the LICENSE, all other aspects of the project--including opening or commenting on issues, participating in discussions and downloading releases--require adherence to the Maintenance Fee.

https://github.com/wixtoolset/issues#open-source-maintenance-fee

Locally, I have WiX v3.14 running. I think, this version is not covered by that fee.

winget install --id=WiXToolset.WiXToolset  -e

@espertus
Copy link
Contributor Author

Thank you for the feedback. I have updated the PR to use the jabgui:jpackage task.

I added a Running from source section. Is there any reason to use gg instead of .gradlew jabgui:run?

I have added a JabRef PR: Add WixToolset (and Bash for Windows recommendation) to Windows setup.

@koppor koppor merged commit 3aa44db into JabRef:main Jul 22, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect instructions for building from source
4 participants