skylot / jadx

Dex to Java decompiler
Apache License 2.0
41.02k stars 4.81k forks source link

[feature] Install desktop from file from jadx-gui #1392

Open yotamN opened 2 years ago

yotamN commented 2 years ago

It would be nice, just like with Intellij to support adding a desktop entry so people could launch Jadx properly through their desktop environment.

There needs to be several conditions to handle cases when that action is unwanted:

I think that best way would be to show a popup the first time Jadx is opened and afterward showing it in the menubar.

skylot commented 2 years ago

@yotamN I thought that already done by package maintainers. But I understand that jadx itself missing a nice packaging for different distros or installer for Windows or macOS. And I think such packaging is a better way to correctly handle desktop files, icons, and other OS/distro dependent files.

just like with Intellij

Do you mean JetBrains Toolbox or this is can be done directly from IntelliJ apps? Just asking, maybe I miss something :)

Also, beside packaging, I am thinking about creating something like jadx-launcher to:

yotamN commented 2 years ago

Ideally Jadx would be packaged in all of the common Linux distributions but we are not there yet. It seems that Java packaging is still a bit of a problem, for example I tried to package Jadx into Fedora but it seems they don't ship Gradle, only Maven, so if you have any idea how to proceed I would love to hear because I prefer the user the package manager.

But even if we could package it into all of the popular distributions, there would still be people that can't use it for whatever reason (maybe they use the minimalist distribution of the month) and for them it would be helpful to create a desktop entry easily.


Do you mean JetBrains Toolbox or this is can be done directly from IntelliJ apps? Just asking, maybe I miss something :)

You can create a desktop entry from Intellij apps like so: Screenshot from 2022-02-25 14-47-56


Also, beside packaging, I am thinking about creating something like jadx-launcher

I think instead of a separate launcher it would be nicer to manage it through Jadx. For example the startup settings you could set to some configurations file that would be set after a restart. Auto downloading can also be done that way just like Firefox is doing it.

skylot commented 2 years ago

I tried to package Jadx into Fedora but it seems they don't ship Gradle, only Maven

Wait, you only need Gradle for build package, in this case you can use Gradle wrapper script, but anyway downloading already built artifacts is much easier. And after build you don't need Gradle at all.

You can create a desktop entry from Intellij apps like so:

Haha, I don't have that entry. And Create Command-line Launcher forcing to use Toolbox app

For example the startup settings you could set to some configurations file that would be set after a restart

Sure. But to apply that config, I need to write scripts twice in bash and in windows batch script to support both systems :(

@yotamN And as for your issue, I don't think I will do it, sorry. If you want, you can submit a PR.

cskwrd commented 2 years ago

@skylot I recently encountered a project for deploying jar files in a cross-platform manner that might be easier than creating your own launcher. https://www.jdeploy.com/

bbb651 commented 2 months ago

I agree @skylot that it should be done by package maintainers and not the application itself, I didn't know Intellij had that feature but it's a hack for broken packages, not a proper solution (and won't work with flatpak by default) .

However, a jadx.desktop file should be included in the repo, even if it work for 100% of distos (paths might be slightly different) it would go a long way towards making sure packages include it and is what most apps do, the official jadx package on arch is currently missing a desktop file completely.