So I have a program I want to automate the installation of, it is basically just an archive of the program that is ready to be used, I can just unpack it somewhere and run its shell script to start using the program.
But I want to have a desktop shortcut for it so that I can run it anywhere instead of navigating through files just to run its shell script. So I found this thing to create a desktop shortcut:
I just add it to usr/share/applications and then edit the details. However I want to automate this process, I would like to know if there is a way of doing this? Like maybe a script to unpack the archive to a certain place then create a .desktop file for it too?
as per the destop file you are posting that will only open gedit. any simple script can automate the process. I’m assuming you don’t have to install it everytime? you just need a desktop file for the binary to execute by clicking am I understanding you correctly?
If you know the commands to type in a terminal to do the steps you want, then creating a script is easy. Begin the script with a standard sh bang and just insert each command.
#!/bin/bash
make a directory:
mkdir /opt/scilab
command to untar the file:
tar -xf scilab-2023.1.0.bin.x86_64-linux-gnu.tar.xz -C /opt/scilab/
This will take the latest binary tar archive and create an arch package named: scilab-2023.1.0-1-x86_64.pkg.tar.zst
This will install the software in the folder /usr/local/scilab-2023.1.0
And the program can be started with command: /usr/local/scilab-2023.1.0/bin/scilab
PS
The installation is big (600 MB). If you allow stripping of the binaries it will become a little smaller (470 MB). To do so, just remove the options line.
yay scilab
5 aur/jupyter-scilab_kernel-git 135.git.b2e9069-1 (+0 0.00)
A Jupyter kernel for Scilab
4 aur/python-sciscipy 1.0.1-1 (+1 0.00) (Orphaned)
A Scilab API for Python
3 aur/scilab-git 6.2.0.r216.g81a9cc04933-1 (+8 0.00)
A scientific software package for numerical computations.
2 aur/scilab-bin 2023.1.0-1 (+30 0.10)
A software package for numerical computation, providing a powerful computing environment for engineering and scientific applications.
1 aur/scilab 6.1.1-1 (+85 0.11) (Out-of-date: 2023-03-11)
A scientific software package for numerical computations.