-
The Linux equivalent is adding a .desktop file to /usr/share/applications. As an example, here's mpv's desktop entry, which is installed at /usr/share/applications/mpv.desktop on my Debian machine (not in /etc/ as the URL might imply!).
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
I suggest creating a shell script to wrap the application so that you can show an error if Java isn't installed or there is a silent crash. I created an install script for the voxelshop project (which is a Java program) here: https://github.com/poikilos/voxelshop/blob/develop/static/install-linux.sh (I improved it just now, but if the PR accepted it will end up here: https://github.com/simlu/voxelshop/blob/develop/static/install-linux.sh). The script generates a desktop file and a bash script which shows the console log if there is a bad exit code (rather than simply doing nothing if java isn't installed or disappearing if an error occurs which writes to the log but doesn't show an error). The project has an Apache2 license and I'm the only author of this script so you can cite the author as VoxelShop or me. Of course, for a professional program, packaging it is ideal, but the generated files are still applicable. An example of the code the install script generates is here: https://pastebin.com/DNKc3hzw and an example of the desktop file it generates is here: https://pastebin.com/VZ5UZzVg . Unfortunately using variables is limited within desktop files to certain desktop environments (a workaround is here), so generating the file (or at least the Path (working directory) and Exec lines) during installation to use absolute paths is best.
-
I suggest creating a shell script to wrap the application so that you can show an error if Java isn't installed or there is a silent crash. I created an install script for the voxelshop project (which is a Java program) here: https://github.com/poikilos/voxelshop/blob/develop/static/install-linux.sh (I improved it just now, but if the PR accepted it will end up here: https://github.com/simlu/voxelshop/blob/develop/static/install-linux.sh). The script generates a desktop file and a bash script which shows the console log if there is a bad exit code (rather than simply doing nothing if java isn't installed or disappearing if an error occurs which writes to the log but doesn't show an error). The project has an Apache2 license and I'm the only author of this script so you can cite the author as VoxelShop or me. Of course, for a professional program, packaging it is ideal, but the generated files are still applicable. An example of the code the install script generates is here: https://pastebin.com/DNKc3hzw and an example of the desktop file it generates is here: https://pastebin.com/VZ5UZzVg . Unfortunately using variables is limited within desktop files to certain desktop environments (a workaround is here), so generating the file (or at least the Path (working directory) and Exec lines) during installation to use absolute paths is best.