Skip to content

Commit

Permalink
Updating Linux Scripts for Qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
rlancaste committed Apr 15, 2024
1 parent d6f91a3 commit 3f693a2
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ Another thought I had in the back of my mind was that there were a copule of rea

git clone https://github.com/rlancaste/stellarsolver.git

- Run the installLinux.sh script
- Change into the directory of the Linux install scripts:

./installLinux.sh
cd stellarsolver/linux-scripts

- Run the appropriate script for your system and purpose. For example:

./installStellarSolverTesterQt6.sh

- It will build and install the program and create a shortcut on the desktop

Expand Down
18 changes: 18 additions & 0 deletions linux-scripts/installStellarSolverLibraryQt6.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

#This gets the directory of the script, but note that the script is in a subdirectory, so to get the Repo's directory, we need ../
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../

#This installs the dependencies
if [ -f /usr/lib/fedora-release ]; then
sudo dnf -y install git cmake qt6 cfitsio-devel gsl-devel wcslib-devel
else
sudo apt -y install git cmake qt6-base-dev libgl1-mesa-dev libcfitsio-dev libgsl-dev wcslib-dev
fi

#This makes and installs the library
mkdir -p $DIR/build
cd $DIR/build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo $DIR
make -j $(expr $(nproc) + 2)
sudo make install
File renamed without changes.
36 changes: 36 additions & 0 deletions linux-scripts/installStellarSolverTesterQt6.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

#This gets the directory of the script, but note that the script is in a subdirectory, so to get the Repo's directory, we need ../
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../

#This installs the dependencies
if [ -f /usr/lib/fedora-release ]; then
sudo dnf -y install git cmake qt6 cfitsio-devel gsl-devel wcslib-devel
else
sudo apt -y install git cmake qt6-base-dev libgl1-mesa-dev libcfitsio-dev libgsl-dev wcslib-dev
fi

#This makes and installs the library
mkdir -p $DIR/build
cd $DIR/build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTER=ON $DIR
make -j $(expr $(nproc) + 2)
sudo make install

#This copies the icon into the pictures directory for the section below
cp $DIR/tester/StellarSolverIcon.png $HOME/Pictures/

# This will create a shortcut on the desktop for launching StellarSolver
##################
cat >$HOME/Desktop/StellarSolverTester.desktop <<-EOF
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=$HOME/Pictures/StellarSolverIcon.png
Icon=$HOME/Pictures/StellarSolverIcon.png
Exec=/usr/bin/StellarSolverTester
Name[en_US]=StellarSolverTester
Name=StellarSolverTester
EOF
##################

0 comments on commit 3f693a2

Please sign in to comment.