如何在 Debian 11(bullseye)上从源代码构建完整的 Kstars(Kstars + INDI + INDI 第三方驱动程序 + Stellar Solver)?

如何在 Debian 11(bullseye)上从源代码构建完整的 Kstars(Kstars + INDI + INDI 第三方驱动程序 + Stellar Solver)?

如何在 Debian 11(bullseye)上从源代码构建完整的 Kstars(Kstars + INDI + INDI 第三方驱动程序 + Stellar Solver)?

我只是不知道在哪里写这个问题,我会自己回答。

答案1

这个问题的解决方案如下:

  1. 确保有稳定的互联网连接。我们将使用 git 从 Debian 存储库下载 Kstars、INDI、INDI 第三方驱动程序、Stellar Solver 和其他依赖项的源代码。
  2. 使用任何终端以 root 身份登录。
  3. 保存并在单个批处理中运行以下脚本。
echo "Installing the required packages for Kstars from Debian repos using apt-get..."
apt update
apt -y install breeze-icon-theme build-essential cdbs cmake dkms extra-cmake-modules fxload gettext git kdoctools5 kinit-dev kio libavcodec-dev libavdevice-dev libboost-dev libboost-regex-dev libcfitsio-dev libcurl4-gnutls-dev libdc1394-22-dev libeigen3-dev libfftw3-dev libftdi1-dev libftdi-dev libgmock-dev libgphoto2-dev libgps-dev libgsl0-dev libgsl-dev libgtest-dev libindi-dev libjpeg-dev libkf5crash-dev libkf5newstuff-dev libkf5notifications-dev libkf5notifyconfig-dev libkf5plotting-dev libkf5xmlgui-dev libkrb5-dev liblimesuite-dev libnova-dev libqt5svg5-dev libqt5websockets5-dev libraw-dev librtlsdr-dev libsecret-1-dev libtheora-dev libtiff-dev libusb-1.0-0-dev libusb-dev qt5keychain-dev qtdeclarative5-dev wcslib-dev xplanet xplanet-images zlib1g-dev aria2 axel wget qtbase5-dev 
echo "Done installing therequired packages for kstarts using apt-get "

mkdir kstars_src && cd kstars_src
echo "Your current directory is `pwd` "
echo "Downloading project INDI source code using git .."
git clone --depth 1 https://github.com/indilib/indi.git
cd indi && mkdir -p build
echo "Your current directory is `pwd`. preparing and building.."
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug -B build/
cd build
make -j $(nproc)
make -j $(nproc) install
cd ../../

echo "Your current directory is `pwd` "
echo "Downloading project INDI 3rd party drivers and libraries source code using git .."
git clone --depth=1 https://github.com/indilib/indi-3rdparty
cd  indi-3rdparty 
echo "Your current directory is `pwd` .. preparing a building each driver and each library in this folder"
#$pwd=`pwd`;

mkdir -p indi-3rdparty-build-libraries
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug -DBUILD_LIBS=1 -B indi-3rdparty-build-libraries
cd indi-3rdparty-build-libraries
make -j $(nproc)
make -j $(nproc) install
cd ..

mkdir -p indi-3rdparty-build-drivers
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug -B indi-3rdparty-build-drivers
cd indi-3rdparty-build-drivers
make -j $(nproc)
make -j $(nproc) install
echo "Your current directory is `pwd` done with INDI 3rdparty drivers and libraries. "
cd ../../

echo "Downloading project StellarSolver using git .."
echo "Your current directory is `pwd`"
git clone https://github.com/rlancaste/stellarsolver.git
cd stellarsolver
mkdir -p build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTER=ON -B build
cd build
make -j $(nproc)
make -j $(nproc) install
cd ../../

echo "Your current directory is `pwd` . Done with StellarSolver. "
echo "Downloading project kstars source code using git .."
git clone https://anongit.kde.org/kstars
cd kstars && mkdir -p build
cmake  -DCMAKE_INSTALL_PREFIX=/usr -B build
cd build
make -j $(nproc)
make -j $(nproc) install

相关内容