-
Notifications
You must be signed in to change notification settings - Fork 71
Add integration shell scripts for linux! #1082
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/bin/bash | ||
| # Required to launch correctly | ||
| #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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
|
||
| #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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| 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 |
There was a problem hiding this comment.
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 commentThere was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.