1

often run into this issue with documentation where the documentation is trying to be as exhaustive as possible and as such make the simplest use case impossible to unearth.

https://docs.appimage.org/packaging-guide/manual.html#creating-an-appdir-manually

this documentation seems ok enough but I'm pretty sure I don't need 99% of what they claim.

I'm in the use case where I built something from unity. I have a folder that contains my main binary and then ton and tons and tons of other junk.

when you click on the binary it runs perfectly it has an icon and all.

How do I just put that entire folder into an .appimage file including instructions on what's the right binary to run?

seems like all I need to do is create a folder named MyUnityGame.AppDir and inside have my whole folder I mentioned plus a .desktop file that points to the binary and that's it right?

all the rest sounds like it would apply to something that's not self contained / that has dependencies, which isn't my case.

what's next once I have my .desktop?

(and most error-proof) to use a precompiled one from this repository.

where's the precompiled AppRun file?

EDIT : I guess it's this one : https://github.com/AppImage/AppImageKit/blob/master/resources/AppRun

can I just have it as :

#!/bin/sh
exec myunitygame.desktop "$@"

seems like the rest is superfluous in my case

2
  • Do not go to the above link. As of 7-May-2023, it attempts to download malware. I am unable to get past the scam page(s) and to the underlying "real page."
    – LiamF
    May 7, 2023 at 7:18
  • @LiamF jsut click on the flag icon and report it for malware url
    – tatsu
    May 31, 2023 at 16:40

1 Answer 1

3

I don't understand what exactly you are looking for. Here is bash script which I have created to make Appimage for Brave browser. This assumes you have already downloaded brave browser deb file. You also need to download appimagetool.

#!/bin/bash -x

set +e
APP=Brave
patharch=x86_64
package="brave-browser_1.33.100_amd64.deb"
URL="https://github.com/brave/brave-browser/releases/"
if  [ ! -f $package ]; then
    wget -c $URL$package
else
    echo "$package file exists"
fi

mkdir -p ./$APP.AppDir
rm -rf ./$APP.AppDir/*
cd $APP.AppDir/
find ../ -name *.deb -exec dpkg -x \{\} . \;

cp opt/brave.com/brave/product_logo_48.png ./Brave.png
# find . -name $APP.desktop -exec cp \{\} . \;
# find -name $APP.png -exec cp \{\} . \;

cat > $APP.desktop <<EOF
[Desktop Entry]
Type=Application
Name=brave-browser
Exec=brave-browser %U
StartupNotify=true
Icon=Brave
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml_xml;image/webp;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
EOF

mkdir -p usr/bin/
mv ./opt/brave.com/brave/* usr/bin/ ; rm -rf ./opt

AppRun="AppRun"

if  [ ! -f ../../$AppRun ]; then
    wget -c https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-${patharch} -O AppRun
else
    cp ../../AppRun .
fi
chmod a+x AppRun

# generate_type2_appimage
cd ..
VERSION=""
VERSION=$VERSION ../appimagetool -v -n ./$APP.AppDir/

if [ -d "./$APP.AppDir/" ] ; then
  rm -rf ./$APP.AppDir
fi

Hope this helps.

8
  • thanks, it actually might, though in the meantime I built my abomination with appimagetool also, testing it now.
    – tatsu
    Jan 11, 2022 at 15:42
  • @Someone Thanks I have removed the wrong URL link from the script. The Icon is picked from the package only.
    – AjayC
    Jan 11, 2022 at 15:45
  • "brave-browser_1.33.100_amd64.deb" is this just a variable name or is it a path? Am I supposed to put my binary name in lieu of this variable?
    – tatsu
    Jan 11, 2022 at 15:49
  • @tatsu. Download the deb file and put the same in the location where this script is stored. Else provide a URL link to the file. Create URL variable for the web path.
    – AjayC
    Jan 11, 2022 at 15:52
  • in the ned this scitpt is only setup post running appimagetool all of this setup I've already done manually. I don't really see how this script helps me.
    – tatsu
    Jan 11, 2022 at 15:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .