Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/client-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,76 @@ jobs:
APPLE_SIGNING_IDENTITY: ${{ env.CERT_ID }}
NO_STRIP: true
with:
releaseId: ${{ github.event.release.id || '' }}
tagName: ${{ github.event.release.tag_name || inputs.tagName || 'v__VERSION__' }} # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: "Auto-release v__VERSION__"
releaseBody: "See the assets to download this version and install. This release was created automatically."
releaseDraft: false
prerelease: true
args: ${{ matrix.args }}
projectPath: "./desktop"

publish-aur:
needs: publish-tauri
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- uses: actions/checkout@v7

- name: Update and publish AUR packages
env:
AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ github.event.release.tag_name || inputs.tagName }}
run: |
# stop the script on errors and unset variables
set -euo pipefail

# require the ssh key used to publish to aur
if [[ -z "$AUR_SSH_PRIVATE_KEY" ]]; then
echo "AUR_SSH_PRIVATE_KEY is required to publish the AUR packages." >&2
exit 1
fi

# read the desktop version and choose the release tag
version="$(jq -r '.version' desktop/src-tauri/tauri.conf.json)"
tag="${RELEASE_TAG:-v${version}}"
[[ "$version" =~ ^[0-9]+(\.[0-9]+)*$ ]]
[[ "$tag" =~ ^[A-Za-z0-9._-]+$ ]]

# download the x86_64 deb package from the github release
deb_name="Drop.Desktop.Client_${version}_amd64.deb"
gh release download "$tag" \
--repo "$GITHUB_REPOSITORY" \
--pattern "$deb_name" \
--dir "$RUNNER_TEMP"
deb_path="$RUNNER_TEMP/$deb_name"

# configure ssh access to the aur git server
mkdir -p "$HOME/.ssh"
chmod 700 "$HOME/.ssh"
printf '%s\n' "$AUR_SSH_PRIVATE_KEY" > "$HOME/.ssh/aur"
chmod 600 "$HOME/.ssh/aur"
ssh-keyscan -H aur.archlinux.org >> "$HOME/.ssh/known_hosts"
eval "$(ssh-agent -s)"
ssh-add "$HOME/.ssh/aur"

# fill the release-specific values in both package recipes
node packages/update-aur-packages.mjs "$tag" "$version" "$deb_path"

# publish each updated recipe to its aur repository
for package in drop-oss-app-bin drop-oss-app; do
package_dir="$RUNNER_TEMP/$package"
git clone "ssh://aur@aur.archlinux.org/$package.git" "$package_dir"
cp "packages/$package/PKGBUILD" "$package_dir/PKGBUILD"
cp "packages/$package/.SRCINFO" "$package_dir/.SRCINFO"
git -C "$package_dir" config user.name "github-actions[bot]"
git -C "$package_dir" config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git -C "$package_dir" add PKGBUILD .SRCINFO
if ! git -C "$package_dir" diff --cached --quiet; then
# create and push a commit only when the recipe changed
git -C "$package_dir" commit -m "Update to $version"
git -C "$package_dir" push origin HEAD:master
fi
done
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

Drop is an open-source game distribution platform, similar to GameVault or Steam. It's designed to distribute and share DRM-free games quickly, all while being incredibly flexible, beautiful, and fast.

> [!NOTE]
> Drop is in maintenance mode. Maintainers will not contribute new large features, but bugs will continue to be fixed and external contributions will continue to be merged.

<div align="center">
<img src="https://droposs.org/_ipx/f_webp&q_80/images/carousel/store.png" alt="Drop Screenshot" width="900rem"/>
</div>
Expand Down
31 changes: 0 additions & 31 deletions desktop/.gitlab-ci.yml

This file was deleted.

4 changes: 2 additions & 2 deletions desktop/src-tauri/process/src/process_handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ impl ProcessHandler for UMUNativeLauncher {
.map_or("", |v| v);

let game_id = if umu_id_override.is_empty() {
&game_version.version_id
"umu-default"
} else {
umu_id_override
};
Expand Down Expand Up @@ -365,7 +365,7 @@ impl ProcessHandler for UMUCompatLauncher {
.map_or("", |v| v);

let game_id = if umu_id_override.is_empty() {
&game_version.version_id
"umu-default"
} else {
umu_id_override
};
Expand Down
20 changes: 20 additions & 0 deletions packages/drop-oss-app-bin/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
pkgbase = drop-oss-app-bin
pkgdesc = The client application for the open-source, self-hosted game distribution platform Drop
pkgver = DROP_PKG_VER
pkgrel = DROP_PKG_REL
url = https://droposs.org/
arch = any
license = LicenseRef-GPL-3.0
makedepends = libarchive
depends = glib2
depends = glibc
depends = gcc-libs
depends = webkit2gtk-4.1
depends = umu-launcher
depends = libappindicator
depends = libayatana-appindicator
conflicts = drop-oss-app
source = https://github.com/Drop-OSS/drop/releases/download/DROP_RELEASE_TAG/Drop.Desktop.Client_DROP_PKG_VER_amd64.deb
sha256sums = DROP_DEB_SHA256

pkgname = drop-oss-app-bin
24 changes: 24 additions & 0 deletions packages/drop-oss-app-bin/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Maintainer: DecDuck <declanahofmeyr@gmail.com>
# Maintainer: quexeky <git@quexeky.dev>

pkgname=drop-oss-app-bin
pkgver=DROP_PKG_VER
pkgrel=DROP_PKG_REL
pkgdesc="The client application for the open-source, self-hosted game distribution platform Drop"
arch=(any)
conflicts=('drop-oss-app')
url="https://droposs.org/"
license=('LicenseRef-GPL-3.0')
depends=('glib2' 'glibc' 'gcc-libs' 'webkit2gtk-4.1' 'umu-launcher' 'libappindicator' 'libayatana-appindicator')
makedepends=('libarchive')
source=("https://github.com/Drop-OSS/drop/releases/download/DROP_RELEASE_TAG/Drop.Desktop.Client_DROP_PKG_VER_amd64.deb")
sha256sums=('DROP_DEB_SHA256')

prepare() {
bsdtar -xf ./*.deb
bsdtar -xf data.tar.*
}

package() {
cp -r "$srcdir/usr" "$pkgdir"
}
22 changes: 22 additions & 0 deletions packages/drop-oss-app/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pkgbase = drop-oss-app
pkgdesc = Desktop client for the Drop OSS project.
pkgver = DROP_PKG_VER
pkgrel = DROP_PKG_REL
url = https://droposs.org/
arch = any
license = AGPL-3.0-only
makedepends = pnpm
makedepends = cargo-nightly
makedepends = gcc
makedepends = pkgconf
depends = glib2
depends = glibc
depends = gcc-libs
depends = webkit2gtk-4.1
depends = umu-launcher
depends = libappindicator
depends = libayatana-appindicator
source = git+https://github.com/Drop-OSS/drop.git#tag=DROP_RELEASE_TAG
sha256sums = SKIP

pkgname = drop-oss-app
48 changes: 48 additions & 0 deletions packages/drop-oss-app/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Maintainer: quexeky <aur@quexeky.dev>
# Maintainer: DecDuck <declanahofmeyr@gmail.com>

pkgname=drop-oss-app
pkgver=DROP_PKG_VER
pkgrel=DROP_PKG_REL
pkgdesc="Desktop client for the Drop OSS project."
arch=(any)
url="https://droposs.org/"
license=('AGPL-3.0-only')
depends=('glib2' 'glibc' 'gcc-libs' 'webkit2gtk-4.1' 'umu-launcher' 'libappindicator' 'libayatana-appindicator')
makedepends=('pnpm' 'cargo-nightly' 'gcc' 'pkgconf')
source=("git+https://github.com/Drop-OSS/drop.git#tag=DROP_RELEASE_TAG")
sha256sums=('SKIP')

_desktop="
[Desktop Entry]\n
Type=Application\n
Version=DROP_PKG_VER\n
Name=Drop Desktop App\n
Comment=Drop client for Linux\n
Path=/usr/bin/\n
Exec=drop-app\n
Icon=drop-oss-app\n
Terminal=false\n
"

prepare() {
echo "$_desktop" > drop-oss-app.desktop
}

build() {
cd drop
pnpm install
cd desktop
export RUSTUP_TOOLCHAIN=nightly
CFLAGS+=' -ffat-lto-objects'
pnpm tauri build --no-bundle
}

package() {
echo -e "$_desktop" > drop-oss-app.desktop
install -Dm0755 -t "$pkgdir/usr/share/applications" "drop-oss-app.desktop"
cd drop/desktop
cp src-tauri/icons/icon.png ./drop-oss-app.png
install -Dm0755 -t "$pkgdir/usr/share/pixmaps" "./drop-oss-app.png"
install -Dm0755 -t "$pkgdir/usr/bin" "src-tauri/target/release/drop-app"
}
52 changes: 52 additions & 0 deletions packages/update-aur-packages.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { createHash } from "node:crypto";
import { readFile, writeFile } from "node:fs/promises";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";

function replaceToken(text, token, value, expectedCount) {
const actualCount = text.split(token).length - 1;
if (actualCount !== expectedCount) {
throw new Error(`Expected ${expectedCount} ${token} tokens, found ${actualCount}`);
}
return text.replaceAll(token, value);
}

async function updateFile(path, transform) {
const original = await readFile(path, "utf8");
await writeFile(path, transform(original));
}

const [tag, version, debPath, ...extraArgs] = process.argv.slice(2);
if (!tag || !version || !debPath || extraArgs.length > 0) {
throw new Error("usage: update-aur-packages.mjs TAG VERSION DEB_PATH");
}
if (!/^[A-Za-z0-9._-]+$/.test(tag)) {
throw new Error("Release tag contains unsupported characters");
}
if (!/^[0-9]+(?:\.[0-9]+)*$/.test(version)) {
throw new Error("Package version must contain numeric dot-separated components");
}

const packagesDir = dirname(fileURLToPath(import.meta.url));
const checksum = createHash("sha256").update(await readFile(debPath)).digest("hex");
const tokens = [
["DROP_PKG_VER", version],
["DROP_PKG_REL", "1"],
["DROP_RELEASE_TAG", tag],
["DROP_DEB_SHA256", checksum],
];
const files = [
{ packageName: "drop-oss-app", fileName: "PKGBUILD", tokenCounts: [2, 1, 1, 0] },
{ packageName: "drop-oss-app", fileName: ".SRCINFO", tokenCounts: [1, 1, 1, 0] },
{ packageName: "drop-oss-app-bin", fileName: "PKGBUILD", tokenCounts: [2, 1, 1, 1] },
{ packageName: "drop-oss-app-bin", fileName: ".SRCINFO", tokenCounts: [2, 1, 1, 1] },
];

for (const { packageName, fileName, tokenCounts } of files) {
await updateFile(join(packagesDir, packageName, fileName), (text) =>
tokens.reduce(
(updated, [token, value], index) => replaceToken(updated, token, value, tokenCounts[index]),
text,
),
);
}
4 changes: 4 additions & 0 deletions server/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ GIANT_BOMB_API_KEY=""
IGDB_CLIENT_ID=""
IGDB_CLIENT_SECRET=""

# PCGamingWiki bot account credentials (create a bot password in MediaWiki)
PCGAMINGWIKI_BOT_USERNAME=""
PCGAMINGWIKI_BOT_PASSWORD=""

EXTERNAL_URL="http://localhost:3000"

NUXT_PORT=4000
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"license": "AGPL-3.0-or-later",
"engines": {
"node": ">=22.16.0"
"node": ">=24.0.0"
},
"scripts": {
"build": "nuxt build",
Expand Down
Loading
Loading