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

Debian file associations #274

Closed
schadfield opened this issue Dec 10, 2022 · 13 comments
Closed

Debian file associations #274

schadfield opened this issue Dec 10, 2022 · 13 comments
Labels
bug Something isn't working fixed Issue fixed and release pending

Comments

@schadfield
Copy link

schadfield commented Dec 10, 2022

I'm submitting a…

  • [ X] bug report

Short description of the issue/suggestion:

When I install the deb file created by JavaPackager my custom file association for *.kif files is not being created.

Steps to reproduce the issue/enhancement:

  1. Create a deb file by building the project (https://github.com/schadfield/shogi-explorer).
  2. Install the deb file with dpkg: dpkg -i shogi-explorer/target/packages/linux/ShogiExplorer_.deb

What is the expected behavior?

Files with extension "kif" are associated with mime type "application/x-shogi-explorer".

What is the current behavior?

The files remain associated with "text/plain".

The deb file includes "ShogiExplorer.xml" but this is not installed anywhere on the system.

Please tell us about your environment:

  • JavaPackager version: 1.6.7
  • OS version: Debian 11
  • JDK version: OpenJDK 64-Bit Server VM (build 17.0.4+8-Debian-1deb11u1, mixed mode, sharing)
  • Build tool:
    • [ X] Maven
@fvarrui
Copy link
Owner

fvarrui commented Dec 23, 2022

Hi @schadfield!
I've just have a look into it and, as you said, it seems that ShogiExplorer.xml file (which associates mime type with file extension) is not being distributed:

fran@fran-VirtualBox:~/shogi-explorer/target/packages/linux$ dpkg -c ShogiExplorer_4.15.0.deb 
drwxr-xr-x root/root         0 2022-12-23 12:22 ./opt/
drwxr-xr-x root/root         0 2022-12-23 12:22 ./opt/ShogiExplorer/
drwxr-xr-x root/root         0 2022-12-23 12:22 ./opt/ShogiExplorer/libs/
-rw-r--r-- root/root    149642 2022-12-23 12:22 ./opt/ShogiExplorer/ShogiExplorer.png
-rw-r--r-- root/root     11017 2022-12-23 12:22 ./opt/ShogiExplorer/libs/AbsoluteLayout-RELEASE160.jar
-rw-r--r-- root/root     12659 2022-12-23 12:22 ./opt/ShogiExplorer/libs/appdirs-1.2.1.jar
-rw-r--r-- root/root    485898 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-anim-1.16.jar
-rw-r--r-- root/root    424607 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-awt-util-1.16.jar
-rw-r--r-- root/root    704905 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-bridge-1.16.jar
-rw-r--r-- root/root    112371 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-codec-1.16.jar
-rw-r--r-- root/root      8431 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-constants-1.16.jar
-rw-r--r-- root/root    330361 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-css-1.16.jar
-rw-r--r-- root/root    184060 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-dom-1.16.jar
-rw-r--r-- root/root     10239 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-ext-1.16.jar
-rw-r--r-- root/root    192085 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-gvt-1.16.jar
-rw-r--r-- root/root     11464 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-i18n-1.16.jar
-rw-r--r-- root/root     76872 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-parser-1.16.jar
-rw-r--r-- root/root     25198 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-script-1.16.jar
-rw-r--r-- root/root      6665 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-shared-resources-1.16.jar
-rw-r--r-- root/root    232734 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-svg-dom-1.16.jar
-rw-r--r-- root/root    227487 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-svggen-1.16.jar
-rw-r--r-- root/root    129300 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-transcoder-1.16.jar
-rw-r--r-- root/root    127485 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-util-1.16.jar
-rw-r--r-- root/root     33870 2022-12-23 12:22 ./opt/ShogiExplorer/libs/batik-xml-1.16.jar
-rw-r--r-- root/root     83613 2022-12-23 12:22 ./opt/ShogiExplorer/libs/commons-io-1.3.1.jar
-rw-r--r-- root/root     38015 2022-12-23 12:22 ./opt/ShogiExplorer/libs/commons-logging-1.0.4.jar
-rw-r--r-- root/root  14386028 2022-12-23 12:22 ./opt/ShogiExplorer/libs/icu4j-72.1.jar
-rw-r--r-- root/root    330246 2022-12-23 12:22 ./opt/ShogiExplorer/libs/jcommon-1.0.23.jar
-rw-r--r-- root/root   1565065 2022-12-23 12:22 ./opt/ShogiExplorer/libs/jfreechart-1.0.19.jar
-rw-r--r-- root/root     55481 2022-12-23 12:22 ./opt/ShogiExplorer/libs/jfreechart-swt-1.0.jar
-rw-r--r-- root/root   1509440 2022-12-23 12:22 ./opt/ShogiExplorer/libs/jna-5.6.0.jar
-rw-r--r-- root/root   2735878 2022-12-23 12:22 ./opt/ShogiExplorer/libs/jna-platform-5.6.0.jar
-rw-r--r-- root/root     29680 2022-12-23 12:22 ./opt/ShogiExplorer/libs/mxparser-1.2.2.jar
-rw-r--r-- root/root   1919744 2022-12-23 12:22 ./opt/ShogiExplorer/libs/org.eclipse.swt.cocoa.macosx.x86_64-4.3.jar
-rw-r--r-- root/root     18236 2022-12-23 12:22 ./opt/ShogiExplorer/libs/swtgraphics2d-1.0.jar
-rw-r--r-- root/root    220536 2022-12-23 12:22 ./opt/ShogiExplorer/libs/xml-apis-1.4.01.jar
-rw-r--r-- root/root     85686 2022-12-23 12:22 ./opt/ShogiExplorer/libs/xml-apis-ext-1.3.04.jar
-rw-r--r-- root/root    675889 2022-12-23 12:22 ./opt/ShogiExplorer/libs/xmlgraphics-commons-2.7.jar
-rw-r--r-- root/root      7188 2022-12-23 12:22 ./opt/ShogiExplorer/libs/xmlpull-1.1.3.1.jar
-rw-r--r-- root/root    633140 2022-12-23 12:22 ./opt/ShogiExplorer/libs/xstream-1.4.19.jar
-rwxr-xr-x root/root   5214389 2022-12-23 12:22 ./opt/ShogiExplorer/ShogiExplorer
drwxr-xr-x root/root         0 2022-12-23 12:22 ./usr/
drwxr-xr-x root/root         0 2022-12-23 12:22 ./usr/share/
drwxr-xr-x root/root         0 2022-12-23 12:22 ./usr/share/applications/
-rw-r--r-- root/root       332 2022-12-23 12:22 ./usr/share/applications/ShogiExplorer.desktop
drwxr-xr-x root/root         0 2022-12-23 12:22 ./usr/local/
drwxr-xr-x root/root         0 2022-12-23 12:22 ./usr/local/bin/
lrwxrwxrwx root/root         0 2022-12-23 12:22 ./usr/local/bin/ShogiExplorer -> /opt/ShogiExplorer/ShogiExplorer

I'll try to fix this asap.
Thanks!

@fvarrui fvarrui added the bug Something isn't working label Jan 8, 2023
@fvarrui
Copy link
Owner

fvarrui commented Jan 12, 2023

Currently working on this issue. Find changes in issue-274 branch.

@fvarrui
Copy link
Owner

fvarrui commented Jan 12, 2023

It seems to be working fine now with DEB packages:

image

Testing with RPM packages!

@fvarrui
Copy link
Owner

fvarrui commented Jan 12, 2023

You can test this version of JavaPackager following next steps:

git clone https://github.com/fvarrui/JavaPackager --branch issue-274
cd JavaPackager
./gradlew publishToMavenLocal

Last step will install JavaPackager 1.7.0-SNAPSHOT in your local repo.

Build with Java 11 (not higher), due to Gradle incompatibility (should fix this one day 😅 )

Finally, change JavaPackager version in your pom.xml to 1.7.0-SNAPSHOT and:

mvn clean package

You can use whatever Java version you want to build your app (AFAIK ShogiExplorer needs 17?) ... just Java 11 to build the plugin

@fvarrui fvarrui added the feedback Waiting for feedback label Jan 12, 2023
@fvarrui
Copy link
Owner

fvarrui commented Jan 16, 2023

RPM packages also seems to be working fine

@fvarrui
Copy link
Owner

fvarrui commented Jan 16, 2023

Branch issue-274 merged into devel, ready to be released

@fvarrui fvarrui added fixed Issue fixed and release pending and removed feedback Waiting for feedback labels Jan 16, 2023
@schadfield
Copy link
Author

Thanks. I am afraid I haven't had a chance to test it yet.

@fvarrui
Copy link
Owner

fvarrui commented Jan 16, 2023

Hi @schadfield!
Don't worry, you can test it from devel branch

@schadfield
Copy link
Author

I have tested the devel branch version on Debian 11 and it works correctly. Thank you very much.

@fvarrui
Copy link
Owner

fvarrui commented Jan 16, 2023

Great! Thanks

@fvarrui
Copy link
Owner

fvarrui commented Jan 16, 2023

I tested RPM on Fedora 37 and it works fine too

@schadfield
Copy link
Author

Enjoy analysing your shogi games ;-)

@fvarrui
Copy link
Owner

fvarrui commented Feb 8, 2023

JavaPackager 1.7.0 released to Maven Central

@fvarrui fvarrui closed this as completed Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Issue fixed and release pending
Projects
None yet
Development

No branches or pull requests

2 participants