initial commit
This commit is contained in:
commit
8fdfb5df56
3 changed files with 65 additions and 0 deletions
17
.drone.yml
Normal file
17
.drone.yml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Build fjord launcher unlocked
|
||||||
|
image: debian
|
||||||
|
commands:
|
||||||
|
- '/drone/src/compilation.sh'
|
||||||
|
volumes:
|
||||||
|
- name: program-archives
|
||||||
|
path: /compiled
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: program-archives
|
||||||
|
host:
|
||||||
|
path: /mnt/user/files/repos/archives
|
0
README.md
Normal file
0
README.md
Normal file
48
compilation.sh
Executable file
48
compilation.sh
Executable file
|
@ -0,0 +1,48 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
program_name="fjord-launcher-unlocked"
|
||||||
|
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||||
|
|
||||||
|
# prep
|
||||||
|
workdir=$(mktemp -d)
|
||||||
|
built_dir=${COMPILED_DIR:-/compiled}/$program_name
|
||||||
|
mkdir -p $built_dir
|
||||||
|
apt update && apt install curl jq -y
|
||||||
|
|
||||||
|
# check whether it's up-to-date
|
||||||
|
version_file=$built_dir/version
|
||||||
|
touch $version_file
|
||||||
|
# also available via gitlab.com/librewolf-community/browser/source/-/raw/main/{version,release}
|
||||||
|
version=$(curl 'https://api.github.com/repos/hero-persson/FjordLauncherUnlocked/releases/latest' | jq '.tag_name' -r)
|
||||||
|
if grep -q $version $version_file; then
|
||||||
|
echo "already up to date, exiting"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# install deps
|
||||||
|
apt install qt6-base-dev qtchooser qt6-base-dev-tools libqt6core6 libqt6core5compat6-dev libqt6network6 qt6-networkauth-dev cmake ninja-build g++ extra-cmake-modules zlib1g-dev openjdk-17-jdk libgl1-mesa-dev scdoc -y
|
||||||
|
|
||||||
|
# get source and build
|
||||||
|
cd $workdir
|
||||||
|
curl -LO $(curl 'https://api.github.com/repos/hero-persson/FjordLauncherUnlocked/releases/latest' | jq '.assets' | jq '.[0].browser_download_url' -r) # .assets.[0].browser_download_url doesn't work on debian's old version of jq
|
||||||
|
tar -xzf FjordLauncher-$version.tar.gz
|
||||||
|
cd FjordLauncher-$version
|
||||||
|
cmake -S . -B build -G Ninja \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||||
|
-DENABLE_LTO=ON
|
||||||
|
# -DLauncher_QT_VERSION_MAJOR="5" # if you want to use Qt 5
|
||||||
|
cmake --build build
|
||||||
|
|
||||||
|
# package into archive
|
||||||
|
mkdir -p $workdir/result/
|
||||||
|
DESTDIR=$workdir/result/ cmake --install build
|
||||||
|
cd $workdir/result/
|
||||||
|
#rm -rf librewolf-allow-dark/
|
||||||
|
#mv result/ librewolf-allow-dark/
|
||||||
|
apt install zstd -y
|
||||||
|
tar --zstd -cf $built_dir/$program_name.tar.zst .
|
||||||
|
echo $version >$version_file
|
||||||
|
|
||||||
|
echo "$program_name updated to $version"
|
Loading…
Add table
Add a link
Reference in a new issue