diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a4e50fdea6..5da79394ebc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - We fixed an issue where it was no longer possible to connect to LibreOffice. [#5261](https://github.com/JabRef/jabref/issues/5261) - The "All entries group" is no longer shown when no library is open. - We fixed an exception which occurred when closing JabRef. [#5348](https://github.com/JabRef/jabref/issues/5348) +- We fixed a few problems that prevented JabFox to communicate with JabRef. [#4737](https://github.com/JabRef/jabref/issues/4737) [#4303](https://github.com/JabRef/jabref/issues/4303) - We fixed an error where the groups containing an entry loose their highlight color when scrolling. [#5022](https://github.com/JabRef/jabref/issues/5022) - After assigning an entry to a group, the item count is now properly colored to reflect the new membership of the entry. [#3112](https://github.com/JabRef/jabref/issues/3112) - The group panel is now properly updated when switching between libraries (or when closing/opening one). [#3142](https://github.com/JabRef/jabref/issues/3142) diff --git a/build.gradle b/build.gradle index b3d7851f76a..7192e613482 100644 --- a/build.gradle +++ b/build.gradle @@ -506,14 +506,11 @@ modernizer { } // Release tasks -task generateFinalJabRefPS1File(type: Copy) { - from('buildres') { - include 'JabRef.ps1' - } - into 'build' - filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [jabRefJarFileName: jar.archiveName]) +task deleteInstallerTemp(type: Delete) { + delete "$buildDir/installer" } +jpackage.dependsOn deleteInstallerTemp jlink { options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages'] launcher { @@ -584,7 +581,9 @@ jlink { '--app-version', "${project.version}", '--win-upgrade-uuid', 'd636b4ee-6f10-451e-bf57-c89656780e36', '--win-dir-chooser', - '--win-shortcut' + '--win-shortcut', + '--temp', "$buildDir/installer", + '--resource-dir', "${projectDir}/buildres" ] } @@ -609,6 +608,14 @@ jlink { } } } +tasks.jpackageImage.doLast { + copy { + from("/buildres/") { + include "jabref.json", "JabRefHost.bat", "JabRefHost.ps1" + } + into "$buildDir/distribution/JabRef" + } +} jmh { warmupIterations = 5 diff --git a/buildres/JabRef-post-image.wsf b/buildres/JabRef-post-image.wsf new file mode 100644 index 00000000000..56ddd9097f4 --- /dev/null +++ b/buildres/JabRef-post-image.wsf @@ -0,0 +1,35 @@ + + + + + + diff --git a/buildres/JabRef.bat b/buildres/JabRefHost.bat similarity index 60% rename from buildres/JabRef.bat rename to buildres/JabRefHost.bat index 7a2cee363b0..d44d94f282c 100644 --- a/buildres/JabRef.bat +++ b/buildres/JabRefHost.bat @@ -1,3 +1,3 @@ @echo off pushd %~dp0 -@powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File ".\JabRef.ps1" +@powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File ".\JabRefHost.ps1" diff --git a/buildres/JabRef.ps1 b/buildres/JabRefHost.ps1 similarity index 72% rename from buildres/JabRef.ps1 rename to buildres/JabRefHost.ps1 index fe814e6013e..f31df86f74e 100644 --- a/buildres/JabRef.ps1 +++ b/buildres/JabRefHost.ps1 @@ -11,8 +11,7 @@ function Respond($response) { } } -$jabRefJarFileName = "@jabRefJarFileName@" -$jabRefJar = [System.IO.Path]::Combine($PSScriptRoot, $jabRefJarFileName) +$jabRefExe = [System.IO.Path]::Combine($PSScriptRoot, "JabRef.exe") try { $reader = New-Object System.IO.BinaryReader([System.Console]::OpenStandardInput()) @@ -21,16 +20,16 @@ try { $message = $messageRaw | ConvertFrom-Json if ($message.Status -eq "validate") { - if (-not (Test-Path $jabRefJar)) { - return Respond @{message="jarNotFound";path=$jabRefJar} + if (-not (Test-Path $jabRefExe)) { + return Respond @{message="jarNotFound";path=$jabRefExe} } else { return Respond @{message="jarFound"} } } - - if (-not (Test-Path $jabRefJar)) { + + if (-not (Test-Path $jabRefExe)) { $wshell = New-Object -ComObject Wscript.Shell - $popup = "Unable to locate '$jabRefJarFileName' in '$([System.IO.Path]::GetDirectoryName($jabRefJar))'." + $popup = "Unable to locate '$jabRefExe'." $wshell.Popup($popup,0,"JabRef", 0x0 + 0x30) return } @@ -39,7 +38,7 @@ try { #$wshell.Popup($message.Text,0,"JabRef", 0x0 + 0x30) $messageText = $message.Text - $output = & java -jar $jabRefJar -importBibtex "$messageText" 2>&1 + $output = & $jabRefExe -importBibtex "$messageText" 2>&1 #$output = & echoargs -importBibtex $messageText 2>&1 #$wshell.Popup($output,0,"JabRef", 0x0 + 0x30) return Respond @{message="ok";output="$output"} diff --git a/buildres/JabRefTopBanner.bmp b/buildres/JabRefTopBanner.bmp new file mode 100644 index 00000000000..7e95c3b8fd7 Binary files /dev/null and b/buildres/JabRefTopBanner.bmp differ diff --git a/buildres/jabref.json b/buildres/jabref.json index dee50f008fe..9024c5b17f4 100644 --- a/buildres/jabref.json +++ b/buildres/jabref.json @@ -1,7 +1,7 @@ { "name": "org.jabref.jabref", "description": "JabRef", - "path": "JabRef.bat", + "path": "JabRefHost.bat", "type": "stdio", "allowed_extensions": [ "@jabfox"