Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions scripts/appimage_integrator.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# Required to launch correctly
Copy link
Member

Choose a reason for hiding this comment

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

assuming you're referring to the shebang (#!/bin/bash) at the top of the script, that is required for all bash scripts and doesn't really need a comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was following the precursor script's lead in launch.sh, if it seems better fit to remove it, I see no issue in doing so!

Copy link
Contributor

Choose a reason for hiding this comment

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

That comment doesn't refer to the shebang, but rather what the script does. You can remove it or make it say what the integrator scripts do.

#please note that this is the APPIMAGE version of this bash script, they are not cross compatible, and one will not work for the other

# Move to AO's directory
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
cd "${SCRIPT_DIR}"

#put into user's local library
mkdir ~/.local/Attorney_Online
mv -f {.*,*} ~/.local/Attorney_Online
Comment on lines +9 to +11
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this bit is really necessary. I think we should probably do something similar to Project Ignis, where we create a desktop file pointing to wherever the user put the program folder in. Gives them a bit more freedom to decide where to put AO, which can be useful if you have multiple installs/base folders.


#add .desktop file (which should allow most DE's easy access to the program
mkdir ~/.local/share/applications
rm ~/.local/share/applications/'Attorney Online'.desktop
touch ~/.local/share/applications/'Attorney Online'.desktop
#please note that the best way forward here is to have the real logo in path, but this is a temporary logo, easily replaceable.
printf "[Desktop Entry]\nType=Application\nName=Attorney Online\nComment=The courtroom drama simulator\nExec=$(realpath ~/.local/Attorney_Online/Attorney_Online-*-x86_64.AppImage)\nIcon=$(realpath ~/.local/Attorney_Online)/base/themes/AOHD/placeholder.webp\nCategories=Game;" >> ~/.local/share/applications/'Attorney Online'.desktop
Copy link
Contributor

Choose a reason for hiding this comment

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

Due to the above, the paths to the executable and icon would need to become

Exec=$(realpath $(pwd)/Attorney_Online-*-x86_64.AppImage)
Icon=$(pwd)/base/themes/AOHD/placeholder.webp


#marking the program as executable
chmod +x ~/.local/Attorney_Online/Attorney_Online-*-x86_64.AppImage
#running the executable
~/.local/Attorney_Online/Attorney_Online-*-x86_64.AppImage
Comment on lines +20 to +23
Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly, these bits would change to just point to the AppImage that is in the folder we're running this from.

Similar changes should be applied to the other file.

26 changes: 26 additions & 0 deletions scripts/dynamic_integrator.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
# Required to launch correctly

# Move to AO's directory
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
cd "${SCRIPT_DIR}"

#put into user's local library
mkdir ~/.local/Attorney_Online
mv -fu {.*,*} ~/.local/Attorney_Online

#add .desktop file (which should allow most DE's easy access to the program
mkdir ~/.local/share/applications
rm ~/.local/share/applications/'Attorney Online'.desktop
touch ~/.local/share/applications/'Attorney Online'.desktop
#please note that the best way forward here is to have the real logo in path, but this is a temporary logo, easily replaceable.
printf "[Desktop Entry]\nType=Application\nName=Attorney Online\nComment=The courtroom drama simulator\nExec=$(realpath ~/.local/Attorney_Online)/launch.sh\nIcon=$(realpath ~/.local/Attorney_Online)/base/themes/AOHD/placeholder.webp\nCategories=Game;" >> ~/.local/share/applications/'Attorney Online'.desktop

#making the launch.sh (probably not necessary, but if we removed launch.sh and replaced it with this, it makes the path clear without any mud from installing)
rm ~/.local/Attorney_Online/launch.sh
touch ~/.local/Attorney_Online/launch.sh
printf "#!/bin/bash\ncd $(realpath ~/.local/Attorney_Online)\nchmod +x $(realpath ~/.local/Attorney_Online/Attorney_Online)\nLD_LIBRARY_PATH=. $(realpath ~/.local/Attorney_Online/Attorney_Online)" >> ~/.local/Attorney_Online/launch.sh

#running the program
chmod +x ~/.local/Attorney_Online/launch.sh
~/.local/Attorney_Online/launch.sh