mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-02-01 19:15:07 +01:00
Merge branch 'main' into translation-update
This commit is contained in:
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@@ -41,8 +41,6 @@ jobs:
|
|||||||
- name: Build Linux
|
- name: Build Linux
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y libarchive-tools
|
|
||||||
yarn build:linux
|
yarn build:linux
|
||||||
env:
|
env:
|
||||||
MAIN_VITE_API_URL: ${{ vars.MAIN_VITE_STAGING_API_URL }}
|
MAIN_VITE_API_URL: ${{ vars.MAIN_VITE_STAGING_API_URL }}
|
||||||
@@ -98,5 +96,4 @@ jobs:
|
|||||||
dist/*.tar.gz
|
dist/*.tar.gz
|
||||||
dist/*.yml
|
dist/*.yml
|
||||||
dist/*.blockmap
|
dist/*.blockmap
|
||||||
dist/*.pacman
|
|
||||||
dist/*.AppImage
|
dist/*.AppImage
|
||||||
|
|||||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -42,8 +42,6 @@ jobs:
|
|||||||
- name: Build Linux
|
- name: Build Linux
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y libarchive-tools
|
|
||||||
yarn build:linux
|
yarn build:linux
|
||||||
env:
|
env:
|
||||||
MAIN_VITE_API_URL: ${{ vars.MAIN_VITE_API_URL }}
|
MAIN_VITE_API_URL: ${{ vars.MAIN_VITE_API_URL }}
|
||||||
@@ -90,7 +88,6 @@ jobs:
|
|||||||
dist/*.tar.gz
|
dist/*.tar.gz
|
||||||
dist/*.yml
|
dist/*.yml
|
||||||
dist/*.blockmap
|
dist/*.blockmap
|
||||||
dist/*.pacman
|
|
||||||
|
|
||||||
- name: Upload build
|
- name: Upload build
|
||||||
env:
|
env:
|
||||||
@@ -119,6 +116,5 @@ jobs:
|
|||||||
dist/*.tar.gz
|
dist/*.tar.gz
|
||||||
dist/*.yml
|
dist/*.yml
|
||||||
dist/*.blockmap
|
dist/*.blockmap
|
||||||
dist/*.pacman
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
160
.github/workflows/update-aur.yml
vendored
Normal file
160
.github/workflows/update-aur.yml
vendored
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
name: Update AUR Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-aur:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: archlinux:latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
pacman -Syu --noconfirm
|
||||||
|
pacman -S --noconfirm nodejs npm git base-devel openssh jq pacman-contrib
|
||||||
|
|
||||||
|
- name: Create builder user
|
||||||
|
run: |
|
||||||
|
# Create builder user with home directory
|
||||||
|
useradd -m -s /bin/bash builder
|
||||||
|
|
||||||
|
# Add builder to wheel group for sudo access
|
||||||
|
usermod -aG wheel builder
|
||||||
|
|
||||||
|
# Configure sudo for builder user (no password required)
|
||||||
|
echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
||||||
|
|
||||||
|
- name: Setup SSH for AUR
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "${{ secrets.AUR_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
chmod 700 ~/.ssh
|
||||||
|
|
||||||
|
# Add AUR host key to known_hosts
|
||||||
|
ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
# Configure SSH to use the key
|
||||||
|
cat > ~/.ssh/config << EOF
|
||||||
|
Host aur.archlinux.org
|
||||||
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
IdentitiesOnly yes
|
||||||
|
User aur
|
||||||
|
UserKnownHostsFile ~/.ssh/known_hosts
|
||||||
|
StrictHostKeyChecking no
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Start SSH agent and add key
|
||||||
|
eval "$(ssh-agent -s)"
|
||||||
|
ssh-add ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
export GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa -F ~/.ssh/config -o UserKnownHostsFile=$SSH_PATH/known_hosts"
|
||||||
|
|
||||||
|
git clone ssh://aur@aur.archlinux.org/hydra-launcher-bin.git
|
||||||
|
|
||||||
|
# Give builder user ownership of the repository
|
||||||
|
chown -R builder:builder hydra-launcher-bin
|
||||||
|
|
||||||
|
- name: Get version to update
|
||||||
|
id: get-version
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.event_name }}" = "release" ]; then
|
||||||
|
VERSION="${{ github.event.release.tag_name }}"
|
||||||
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
echo "source=release" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "Getting latest release version"
|
||||||
|
VERSION=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.tag_name' | sed 's/^v//')
|
||||||
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
echo "source=latest" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Version to update: $VERSION"
|
||||||
|
|
||||||
|
- name: Check if update is needed
|
||||||
|
id: check-update
|
||||||
|
run: |
|
||||||
|
CURRENT_VERSION=$(grep '^pkgver=' hydra-launcher-bin/PKGBUILD | cut -d'=' -f2)
|
||||||
|
NEW_VERSION="${{ steps.get-version.outputs.version }}"
|
||||||
|
NEW_VERSION="3.7.0"
|
||||||
|
|
||||||
|
echo "Current AUR version: $CURRENT_VERSION"
|
||||||
|
echo "New version: $NEW_VERSION"
|
||||||
|
|
||||||
|
if [ "$CURRENT_VERSION" = "$NEW_VERSION" ]; then
|
||||||
|
echo "update_needed=false" >> $GITHUB_OUTPUT
|
||||||
|
echo "No update needed - versions are the same"
|
||||||
|
else
|
||||||
|
echo "update_needed=true" >> $GITHUB_OUTPUT
|
||||||
|
echo "Update needed"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Update PKGBUILD and .SRCINFO
|
||||||
|
if: steps.check-update.outputs.update_needed == 'true'
|
||||||
|
run: |
|
||||||
|
# Update pkgver in PKGBUILD
|
||||||
|
cd hydra-launcher-bin
|
||||||
|
NEW_VERSION="${{ steps.get-version.outputs.version }}"
|
||||||
|
NEW_VERSION=3.7.0
|
||||||
|
|
||||||
|
echo "Updating PKGBUILD pkgver to $NEW_VERSION"
|
||||||
|
|
||||||
|
# Read PKGBUILD and update pkgver line
|
||||||
|
sed -i "s/^pkgver=.*/pkgver=$NEW_VERSION/" ./PKGBUILD
|
||||||
|
|
||||||
|
# Reset pkgrel to 1 when version changes
|
||||||
|
sed -i "s/^pkgrel=.*/pkgrel=1/" ./PKGBUILD
|
||||||
|
|
||||||
|
echo "✅ Successfully updated pkgver to $NEW_VERSION in ./PKGBUILD"
|
||||||
|
|
||||||
|
# Update package checksums and generate .SRCINFO as builder user
|
||||||
|
sudo -u builder updpkgsums
|
||||||
|
sudo -u builder makepkg --printsrcinfo > .SRCINFO
|
||||||
|
|
||||||
|
- name: Configure Git
|
||||||
|
if: steps.check-update.outputs.update_needed == 'true'
|
||||||
|
run: |
|
||||||
|
cd hydra-launcher-bin
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
|
- name: Commit and push changes
|
||||||
|
if: steps.check-update.outputs.update_needed == 'true'
|
||||||
|
run: |
|
||||||
|
cd hydra-launcher-bin
|
||||||
|
git add PKGBUILD .SRCINFO
|
||||||
|
|
||||||
|
echo "## Git Diff Preview"
|
||||||
|
echo "Changes that would be made:"
|
||||||
|
git diff PKGBUILD .SRCINFO || echo "No changes to show"
|
||||||
|
echo ""
|
||||||
|
echo "Staged changes:"
|
||||||
|
git add PKGBUILD .SRCINFO
|
||||||
|
git diff --staged || echo "No staged changes"
|
||||||
|
|
||||||
|
if git diff --staged --quiet; then
|
||||||
|
echo "No changes to commit"
|
||||||
|
else
|
||||||
|
COMMIT_MSG="Update to ${{ steps.get-version.outputs.version }} (automated release update)"
|
||||||
|
|
||||||
|
git commit -m "$COMMIT_MSG"
|
||||||
|
# git push origin master
|
||||||
|
echo "Successfully updated AUR package to version ${{ steps.get-version.outputs.version }}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Create summary
|
||||||
|
if: always()
|
||||||
|
run: |
|
||||||
|
echo "## AUR Update Summary" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "- **Version**: ${{ steps.get-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "- **Source**: ${{ steps.get-version.outputs.source }}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "- **Update needed**: ${{ steps.check-update.outputs.update_needed }}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
if [ "${{ steps.check-update.outputs.update_needed }}" = "true" ]; then
|
||||||
|
echo "- **Status**: ✅ AUR package updated successfully" >> $GITHUB_STEP_SUMMARY
|
||||||
|
else
|
||||||
|
echo "- **Status**: ⏭️ No update needed" >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
@@ -56,7 +56,6 @@ linux:
|
|||||||
- AppImage
|
- AppImage
|
||||||
- snap
|
- snap
|
||||||
- deb
|
- deb
|
||||||
- pacman
|
|
||||||
- rpm
|
- rpm
|
||||||
maintainer: electronjs.org
|
maintainer: electronjs.org
|
||||||
category: Game
|
category: Game
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const s3 = new S3Client({
|
|||||||
|
|
||||||
const dist = path.resolve(__dirname, "..", "dist");
|
const dist = path.resolve(__dirname, "..", "dist");
|
||||||
|
|
||||||
const extensionsToUpload = [".deb", ".exe", ".pacman", ".AppImage"];
|
const extensionsToUpload = [".deb", ".exe", ".AppImage"];
|
||||||
|
|
||||||
fs.readdir(dist, async (err, files) => {
|
fs.readdir(dist, async (err, files) => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
|
|||||||
@@ -153,11 +153,13 @@ export function GameDetailsContent() {
|
|||||||
>
|
>
|
||||||
<section className="game-details__container">
|
<section className="game-details__container">
|
||||||
<div ref={heroRef} className="game-details__hero">
|
<div ref={heroRef} className="game-details__hero">
|
||||||
<img
|
<div className="game-details__hero-image-wrapper">
|
||||||
src={heroImage}
|
<img
|
||||||
className="game-details__hero-image"
|
src={heroImage}
|
||||||
alt={game?.title}
|
className="game-details__hero-image"
|
||||||
/>
|
alt={game?.title}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
className="game-details__hero-backdrop"
|
className="game-details__hero-backdrop"
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -569,27 +569,55 @@ $hero-height: 300px;
|
|||||||
&__hero-logo-backdrop {
|
&__hero-logo-backdrop {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: linear-gradient(0deg, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
&__hero-image-wrapper {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 384px;
|
||||||
|
max-height: 384px;
|
||||||
|
overflow: hidden;
|
||||||
|
border-radius: 0px 0px 8px 8px;
|
||||||
|
z-index: 0;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: linear-gradient(
|
||||||
|
0deg,
|
||||||
|
rgba(0, 0, 0, 0.3) 60%,
|
||||||
|
transparent 100%
|
||||||
|
);
|
||||||
|
z-index: 1;
|
||||||
|
pointer-events: none;
|
||||||
|
border-radius: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1250px) {
|
||||||
|
height: calc(350px + 82px);
|
||||||
|
min-height: calc(350px + 84px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&__hero-image {
|
&__hero-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc($hero-height + 72px);
|
height: 100%;
|
||||||
min-height: calc($hero-height + 72px);
|
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
object-position: top;
|
object-position: top;
|
||||||
transition: all ease 0.2s;
|
transition: all ease 0.2s;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
|
border-radius: 0px 0px 8px 8px;
|
||||||
|
|
||||||
@media (min-width: 1250px) {
|
@media (min-width: 1250px) {
|
||||||
object-position: center;
|
object-position: center;
|
||||||
height: calc(350px + 72px);
|
|
||||||
min-height: calc(350px + 72px);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,12 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 8px;
|
||||||
|
|
||||||
|
&__container {
|
||||||
|
padding: 0px 12px 12px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
&--stuck {
|
&--stuck {
|
||||||
background: rgba(0, 0, 0, 0.7);
|
background: rgba(0, 0, 0, 0.7);
|
||||||
|
|||||||
@@ -50,25 +50,29 @@ export function HeroPanel() {
|
|||||||
game?.download?.status === "paused";
|
game?.download?.status === "paused";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="hero-panel">
|
<div className="hero-panel__container">
|
||||||
<div className="hero-panel__content">{getInfo()}</div>
|
<div className="hero-panel">
|
||||||
<div className="hero-panel__actions">
|
<div className="hero-panel__content">{getInfo()}</div>
|
||||||
<HeroPanelActions />
|
<div className="hero-panel__actions">
|
||||||
</div>
|
<HeroPanelActions />
|
||||||
|
</div>
|
||||||
|
|
||||||
{showProgressBar && (
|
{showProgressBar && (
|
||||||
<progress
|
<progress
|
||||||
max={1}
|
max={1}
|
||||||
value={
|
value={
|
||||||
isGameDownloading ? lastPacket?.progress : game?.download?.progress
|
isGameDownloading
|
||||||
}
|
? lastPacket?.progress
|
||||||
className={`hero-panel__progress-bar ${
|
: game?.download?.progress
|
||||||
game?.download?.status === "paused"
|
}
|
||||||
? "hero-panel__progress-bar--disabled"
|
className={`hero-panel__progress-bar ${
|
||||||
: ""
|
game?.download?.status === "paused"
|
||||||
}`}
|
? "hero-panel__progress-bar--disabled"
|
||||||
/>
|
: ""
|
||||||
)}
|
}`}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user