Skip to content

Make the linux shortcut script show a more specific error message#309

Open
Poikilos wants to merge 3 commits intosimlu:developfrom
Poikilos:develop
Open

Make the linux shortcut script show a more specific error message#309
Poikilos wants to merge 3 commits intosimlu:developfrom
Poikilos:develop

Conversation

@Poikilos
Copy link
Contributor

@Poikilos Poikilos commented Jun 13, 2022

Hi, I made the original install and uninstall scripts, and this is an improved version with the following changes:

  • Don't assume every error is that java is not installed.
    • Check for the java command first and show that specific error instead of running the program.
    • If the program runs but has a bad exit code, create and show a full, dated error log (~/var/log/voxelshop/last_run.err) from the output (~/var/log/voxelshop/last_run.log)
    • Clean up the irrelevant err file on run, and remove both log files (and directories if empty) on uninstall.
    • Use xmessage instead of notify-send so the user doesn't miss the error message and can copy&paste it (also, xmessage is from xorg so it works on virtually any desktop environment).
  • More reliably ensure the correct panel is restarted (check for XDG_SESSION_DESKTOP or XDG_CURRENT_DESKTOP instead of relying on trial & error with killall).
  • Detect the static files in case not running from the static directory (for testing or other scenarios when static's contents aren't in the unzipped release folder from which the script must run). This change allows running the install script using an absolute path as long as the working directory contains the jar files and the install script is in the same folder as "share". For example, run the script using its full path the repo directory when the current directory is the unzipped directory of the latest zip release.

Poikilos added 2 commits June 13, 2022 16:28
…every error is that java is not installed). Only restart the panel for the running desktop environment. Detect the files in case not running from the static directory (for testing or other scenarios when static's contents aren't in the unzipped release folder from which the script must run).
@Poikilos Poikilos changed the title Make the linux icon show a more specific error message Make the linux shortcut script show a more specific error message Jun 14, 2022
Copy link
Owner

@simlu simlu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello back and thank you for this!

Left some minor comments, but overall this looks great! Let me know if you want to address these

…stead of overwriting the destination. Check for the destination before creating it. Remove old commented lines. Make the script POSIX compatible (do without bash-specific features). Remove directories showing what is being done, but without redundant output. Do not reload mate-panel--That is usually unnecessary.
@simlu
Copy link
Owner

simlu commented Jun 25, 2022

Haven't forgotten about this PR. But I do have to fix CI. Will try and schedule some time for it soon

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.

2 participants