Skip to content

Commit

Permalink
Merge branch 'replace_appimagelauncher' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
Xmetalfanx committed Oct 31, 2024
2 parents 1adacdd + 136c524 commit fec6fcb
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ systemtools_menu_items=(
5 "Install Intel Microcode support"
6 "Install Java support"
7 "Install Stacer"
8 "Install AppImageLauncher"
9 "Install Czhawka"
8 "Install Czhawka"
9 "Install Go_AppImageD"
S "Return to Main Software Menu"
M "Return to Main Menu"
Q "Exit to Prompt"
Expand All @@ -25,9 +25,8 @@ function systemToolsSoftwareMenuCaseStatement() {
5) installIntelMicroCode ;;
6) checkForJava ;;
7) installStacer ;;
8) installAppImageLauncher ;;
9) installCzhawka
sleep 4;;
8) installCzhawka ;;
9) install_go_appimaged ;;
[sS]) mainSoftwareMenuType ;;
[mM]) mainMenuType ;;
[qQ]) quitScript ;;
Expand Down
3 changes: 2 additions & 1 deletion functions/universal/software/f_systemtools.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
. $softwareDir/systemtools/f_appimagelauncher.cfg
# . $softwareDir/systemtools/f_appimagelauncher.cfg
. $softwareDir/systemtools/f_go_appimaged.cfg
. $softwareDir/systemtools/f_ventoy.cfg


Expand Down
60 changes: 60 additions & 0 deletions functions/universal/software/systemtools/f_go_appimaged.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# note: I split this up into different functions

function remove_preexisting_similar_appimage_tools() {

# if "true" exit code, service exists... aka "0" ... a false is "1"
if appimaged_service_exists=$(sudo systemctl list-unit-files appimaged.service &>/dev/null) ; then
fancy_message info "Existing appimaged service detected as active"
fancy_message action "Removing pre-existing simliar AppImage related tools"
fancy_message info "I think if pre-existing methods are NOT there ... this code may result in some error message"

# Remove pre-existing similar tools
sudo systemctl --user stop appimaged.service || true
sudo apt-get -y remove appimagelauncher || true

else
fancy_message info "No Pre-existing appimage service detected"
fi

}

function clearing_appimage_related_cache() {

# Clear cache
fancy_message action "Clearing AppImage related cache"

rm "$HOME"/.local/share/applications/appimage*

[ -f ~/.config/systemd/user/default.target.wants/appimagelauncherd.service ] && rm ~/.config/systemd/user/default.target.wants/appimagelauncherd.service
}
######################################################################################

# instructions below from: https://github.com/probonopd/go-appimage/tree/master/src/appimaged
function download_and_setup_go_appimaged() {

# create ~/Applications if its not already there
[ ! -d "~/Applications" ] && fancy_message action "Creating ~/Applications" && mkdir -p ~/Applications

# Download
fancy_message action "Downloading Go-Appimaged AppImage"
wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimaged-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2) -P ~/Applications/

fancy_message action "Setting GoAppimaged Appimage to executable"
chmod +x /home/$USER/Applications/appimaged-*.AppImage
}

# ref: https://github.com/probonopd/go-appimage/tree/master/src/appimaged
function install_go_appimaged() {

remove_preexisting_similar_appimage_tools
clearing_appimage_related_cache

# Optionally, install Firejail (if you want sandboxing functionality)

download_and_setup_go_appimaged

# Launch

fancy_message action "Launching AppImaged AppImage"
~/Applications/appimaged-*.AppImage
}

0 comments on commit fec6fcb

Please sign in to comment.