Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bf0c09556 | ||
|
|
0a29f10468 | ||
|
|
7e1ea9fcad | ||
|
|
f2f44bcc3d | ||
|
|
0638737562 | ||
|
|
966e0eeb52 | ||
|
|
1ba5d1655b | ||
|
|
f1830f63f5 | ||
|
|
f9752b3ea6 | ||
|
|
955890dabf | ||
|
|
a7842e2c12 |
@@ -4,6 +4,11 @@ on:
|
|||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: "Release tag to upload to (e.g. 0.1.0)"
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -15,17 +20,17 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||||
|
|
||||||
steps:
|
permissions:
|
||||||
- name: Checkout repository
|
contents: write
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Node
|
steps:
|
||||||
uses: actions/setup-node@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
|
|
||||||
- name: Install Rust
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
|
|
||||||
- name: Install dependencies (Linux only)
|
- name: Install dependencies (Linux only)
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
@@ -42,43 +47,46 @@ jobs:
|
|||||||
libayatana-appindicator3-dev \
|
libayatana-appindicator3-dev \
|
||||||
librsvg2-dev
|
librsvg2-dev
|
||||||
|
|
||||||
- name: Install frontend dependencies
|
- run: npm install
|
||||||
run: npm install
|
- run: npm run tauri build
|
||||||
|
|
||||||
- name: Build Tauri app
|
# --- macOS fix ---
|
||||||
run: npm run tauri build
|
- name: Prepare macOS app
|
||||||
|
if: matrix.os == 'macos-latest'
|
||||||
|
run: |
|
||||||
|
APP_PATH=$(find src-tauri/target/release/bundle/macos -name "*.app")
|
||||||
|
APP_NAME=$(basename "$APP_PATH" .app)
|
||||||
|
|
||||||
- name: Upload artifacts
|
xattr -cr "$APP_PATH"
|
||||||
uses: actions/upload-artifact@v4
|
codesign --deep --force --sign - "$APP_PATH"
|
||||||
|
|
||||||
|
ditto -c -k --keepParent "$APP_PATH" "$APP_NAME-macos.zip"
|
||||||
|
|
||||||
|
# --- Get release Tag ---
|
||||||
|
- name: Get release tag
|
||||||
|
id: get_tag
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
TAG="${{ inputs.tag }}"
|
||||||
|
if [ "${{ github.event_name }}" = "release" ]; then
|
||||||
|
TAG="${{ github.event.release.tag_name }}"
|
||||||
|
elif [ -z "$TAG" ]; then
|
||||||
|
TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
# --- Upload to release ---
|
||||||
|
- name: Upload to GitHub Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
name: tauri-build-${{ matrix.os }}
|
tag_name: ${{ steps.get_tag.outputs.tag }}
|
||||||
path: |
|
files: |
|
||||||
src-tauri/target/release/bundle/**/!(node_modules)/
|
|
||||||
src-tauri/target/release/bundle/**/*.AppImage
|
src-tauri/target/release/bundle/**/*.AppImage
|
||||||
src-tauri/target/release/bundle/**/*.dmg
|
|
||||||
src-tauri/target/release/bundle/**/*.msi
|
src-tauri/target/release/bundle/**/*.msi
|
||||||
src-tauri/target/release/bundle/**/*.exe
|
src-tauri/target/release/bundle/**/*.exe
|
||||||
src-tauri/target/release/bundle/**/*.deb
|
src-tauri/target/release/bundle/**/*.deb
|
||||||
src-tauri/target/release/bundle/**/*.rpm
|
src-tauri/target/release/bundle/**/*.rpm
|
||||||
|
*.zip
|
||||||
release:
|
|
||||||
name: Upload to GitHub Release
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Download all artifacts
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
path: artifacts
|
|
||||||
|
|
||||||
- name: Upload to Release
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.event.release.tag_name }}
|
|
||||||
files: artifacts/**/*
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "saturn-launcher",
|
"name": "saturn-launcher",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.1",
|
"version": "0.1.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
Generated
+1
-1
@@ -3887,7 +3887,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "saturn-launcher"
|
name = "saturn-launcher"
|
||||||
version = "0.1.1"
|
version = "0.1.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"lyceris",
|
"lyceris",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "saturn-launcher"
|
name = "saturn-launcher"
|
||||||
version = "0.1.1"
|
version = "0.1.3"
|
||||||
description = "A minecraft launcher for Saturn Client"
|
description = "A minecraft launcher for Saturn Client"
|
||||||
authors = ["SaturnClient"]
|
authors = ["SaturnClient"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ impl Default for AppState {
|
|||||||
max_memory: 2048,
|
max_memory: 2048,
|
||||||
features: FeatureSettings::default(),
|
features: FeatureSettings::default(),
|
||||||
},
|
},
|
||||||
version: String::from("1.21.6"),
|
version: String::from("1.21.11"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "saturn-launcher",
|
"productName": "Saturn Launcher",
|
||||||
"version": "0.1.1",
|
"version": "0.1.3",
|
||||||
"identifier": "org.saturnclient.saturn-launcher",
|
"identifier": "org.saturnclient.saturn-launcher",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "npm run dev",
|
"beforeDevCommand": "npm run dev",
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
"app": {
|
"app": {
|
||||||
"windows": [
|
"windows": [
|
||||||
{
|
{
|
||||||
"title": "Saturn Launcher v0.1.1",
|
"title": "Saturn Launcher v0.1.3",
|
||||||
"width": 1000,
|
"width": 1000,
|
||||||
"height": 650,
|
"height": 650,
|
||||||
"backgroundColor": "#0a0a0a",
|
"backgroundColor": "#0a0a0a",
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import { motion, AnimatePresence } from "framer-motion";
|
|||||||
import { GameVersion, Mod } from "@/lib/types";
|
import { GameVersion, Mod } from "@/lib/types";
|
||||||
import { versions } from "@/lib/launcher";
|
import { versions } from "@/lib/launcher";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
|
import { useRef } from "react";
|
||||||
|
|
||||||
function cn(...inputs: ClassValue[]) {
|
function cn(...inputs: ClassValue[]) {
|
||||||
return twMerge(clsx(inputs));
|
return twMerge(clsx(inputs));
|
||||||
@@ -44,18 +45,21 @@ const ModsSection: React.FC<ModsSectionProps> = ({ version }) => {
|
|||||||
string[]
|
string[]
|
||||||
>([]);
|
>([]);
|
||||||
|
|
||||||
|
const requestIdRef = useRef(0);
|
||||||
|
|
||||||
const loadMods = async () => {
|
const loadMods = async () => {
|
||||||
|
const requestId = ++requestIdRef.current;
|
||||||
|
|
||||||
if (activeTab === "installed") {
|
if (activeTab === "installed") {
|
||||||
const m = await getInstalledMods(version.id);
|
const m = await getInstalledMods(version.id);
|
||||||
setMods(m);
|
|
||||||
if (activeTab === "installed") {
|
if (requestId === requestIdRef.current) {
|
||||||
// Fix: If discover mods takes too long and the user switches tabs it glitches
|
|
||||||
setMods(m);
|
setMods(m);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const m = await discoverMods(searchQuery);
|
const m = await discoverMods(searchQuery);
|
||||||
if (activeTab === "discover") {
|
|
||||||
// Fix: If discover mods takes too long and the user switches tabs it glitches
|
if (requestId === requestIdRef.current) {
|
||||||
setMods(m);
|
setMods(m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+28
-3
@@ -6,17 +6,42 @@ export const versions: GameVersion[] = [
|
|||||||
{
|
{
|
||||||
id: "1.21.4",
|
id: "1.21.4",
|
||||||
name: "Fabric 1.21.4",
|
name: "Fabric 1.21.4",
|
||||||
loader_version: "0.18.6",
|
loader_version: "0.19.0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "1.21.5",
|
id: "1.21.5",
|
||||||
name: "Fabric 1.21.5",
|
name: "Fabric 1.21.5",
|
||||||
loader_version: "0.18.6",
|
loader_version: "0.19.0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "1.21.6",
|
id: "1.21.6",
|
||||||
name: "Fabric 1.21.6",
|
name: "Fabric 1.21.6",
|
||||||
loader_version: "0.18.6",
|
loader_version: "0.19.0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "1.21.7",
|
||||||
|
name: "Fabric 1.21.7",
|
||||||
|
loader_version: "0.19.0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "1.21.8",
|
||||||
|
name: "Fabric 1.21.8",
|
||||||
|
loader_version: "0.19.0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "1.21.9",
|
||||||
|
name: "Fabric 1.21.9",
|
||||||
|
loader_version: "0.19.0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "1.21.10",
|
||||||
|
name: "Fabric 1.21.10",
|
||||||
|
loader_version: "0.19.0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "1.21.11",
|
||||||
|
name: "Fabric 1.21.11",
|
||||||
|
loader_version: "0.19.0",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user