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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ A Windows desktop app for building and maintaining Minecraft modpacks. It create
projects and installs real mods from Modrinth, with every change reviewed before it is applied.
Awake Launcher is not required.

> **What's new in 1.3.4:** see [docs/releases/v1.3.4.md](docs/releases/v1.3.4.md).
> **What's new in 1.4.0:** see [docs/releases/v1.4.0.md](docs/releases/v1.4.0.md).

**Version 1.3.4 · Windows x64 · English, ไทย, 简体中文, 繁體中文 · GPL-3.0-only**
**Version 1.4.0 · Windows x64 · English, ไทย, 简体中文, 繁體中文 · GPL-3.0-only**

## Install

1. Download `Awake-Modpack-Manager-v1.3.4-Windows-x64-Setup.exe` from the
1. Download `Awake-Modpack-Manager-v1.4.0-Windows-x64-Setup.exe` from the
[latest release](https://github.com/awakenginexe/Awake-Modpack-Manager/releases/latest).
2. Optional: check it against `SHA256SUMS.txt` from the same release
(`Get-FileHash .\Awake-Modpack-Manager-v1.3.4-Windows-x64-Setup.exe`).
(`Get-FileHash .\Awake-Modpack-Manager-v1.4.0-Windows-x64-Setup.exe`).
3. Run the installer. It installs for your Windows user only (no administrator rights) into
`%LOCALAPPDATA%\Awake Modpack Manager`.
The installer is **not code-signed** yet, so Windows SmartScreen may warn that it is from an
Expand Down
6 changes: 3 additions & 3 deletions docs/HANDOFF.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Development checkpoint: Manager 1.3.4 and Native Core 0.4.2
# Development checkpoint: Manager 1.4.0 and Native Core 0.4.2

Unreleased until the owner approves the pull request and tags `v1.3.4`.
Unreleased until the owner approves the pull request and tags `v1.4.0`.

## Where things are

- Manager: branch `release/1.3.4`. `npm ci`, then `npm test`, `npm run typecheck`, `cargo test --manifest-path src-tauri/Cargo.toml --lib`.
- Manager: branch `release/1.4.0`. `npm ci`, then `npm test`, `npm run typecheck`, `cargo test --manifest-path src-tauri/Cargo.toml --lib`.
- Native Core: Awake Launcher branch `release/3.2.2`. `.github/workflows/native-core-package.yml` builds it with the recorded toolchain and commits a delivery under `native-core/redistribution/<commit12>/`. `scripts/helper-pin.json` pins that delivery.
- Release: pushing a version tag runs `.github/workflows/awake-beta.yml`, which builds, verifies, assembles every asset and publishes the release. `SHA256SUMS.txt` is required by in-app updates.

Expand Down
25 changes: 25 additions & 0 deletions docs/releases/v1.4.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Awake Modpack Manager 1.4.0

Works with **Awake Launcher 3.2.2** and newer.

## New

- **Turn a mod on or off with one click.** Every row on the Mods page has a switch. It is applied at once: no draft, no Review page. The change still goes through the same check, backup and rollback as a reviewed draft. If a switch would affect other mods (a conflict, or another mod pulled in), it is not applied silently: it is put in your draft and a message says so. A draft you were already building is kept.
- **A full project page when you click a mod, resource pack or shader.** Instead of the narrow panel on the right, a window opens with the project's own description and screenshots from Modrinth or CurseForge on the left, and the versions, the install or "Add to draft" button and "Open project page" on the right.

## Changed

- The mods table always shows the switch; on a narrow window it drops the Dependencies column instead.
- "Enable" and "Disable" in a mod's right-click menu and details panel are applied at once too. Enabling or disabling several selected mods still goes through the draft.

## Fixed

- **An instance managed here could show as "Read-only", and "Manage mods here" answered "This instance is already managed here."** This happened when the Manager's helper could not list its instances (for example after a jar saved from a browser was dropped into the mods folder). The Manager hid that error and treated the instance as unmanaged. It now shows the helper's message under the instance list and on "Manage mods here". The helper's own fix for browser-saved jars is separate and ships with a newer helper.

## Safety

Project descriptions are written by anyone on the two sites. They are never inserted as HTML: only plain formatting, https links and https images are rebuilt from them, and links open in your browser. Images in a description load from the address the author used.

## Not verified on a real machine yet

Checked with the automated tests and the built-in demo data. Still unverified in the desktop app against a real instance: the switch on a large pack, and real Modrinth and CurseForge project pages (descriptions, screenshots).
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "awake-modpack-manager",
"private": true,
"version": "1.3.4",
"version": "1.4.0",
"license": "GPL-3.0-only",
"type": "module",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "awake-modpack-manager"
version = "1.3.4"
version = "1.4.0"
description = "Awake Modpack Manager desktop host"
license = "GPL-3.0-only"
repository = "https://github.com/awakenginexe/Awake-Modpack-Manager"
Expand Down
34 changes: 28 additions & 6 deletions src-tauri/src/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,15 @@ pub struct ProjectDetail {
license: Option<String>,
categories: Vec<String>,
page_url: Option<String>,
/// The project's own long description, as the site stores it: Markdown (Modrinth) or HTML (CurseForge).
/// The window renders it through an allowlist; nothing here is trusted.
body: String,
body_format: &'static str,
gallery: Vec<String>,
}
/// Screenshots, at most 12, and only from https.
fn gallery(list: &Value, key: &str) -> Vec<String> {
list.as_array().map_or(vec![], |g| g.iter().filter_map(|x| x[key].as_str()).filter(|u| u.starts_with("https://")).take(12).map(String::from).collect())
}

pub fn parse_modrinth_detail(p: &Value, members: &Value) -> ProjectDetail {
Expand All @@ -1039,10 +1048,13 @@ pub fn parse_modrinth_detail(p: &Value, members: &Value) -> ProjectDetail {
updated_at: p["updated"].as_str().map(Into::into),
license: p["license"]["id"].as_str().filter(|l| !l.is_empty()).map(Into::into),
categories: p["categories"].as_array().map_or(vec![], |c| c.iter().filter_map(|x| x.as_str().map(String::from)).collect()),
page_url: Some(format!("https://modrinth.com/mod/{}", s(p, "slug"))),
page_url: Some(format!("https://modrinth.com/{}/{}", p["project_type"].as_str().filter(|t| ["resourcepack", "shader"].contains(t)).unwrap_or("mod"), s(p, "slug"))),
body: s(p, "body").into(),
body_format: "markdown",
gallery: gallery(&p["gallery"], "url"),
}
}
pub fn parse_curseforge_detail(p: &Value) -> ProjectDetail {
pub fn parse_curseforge_detail(p: &Value, description: &str) -> ProjectDetail {
ProjectDetail {
author: p["authors"][0]["name"].as_str().unwrap_or("").into(),
summary: s(p, "summary").into(),
Expand All @@ -1051,6 +1063,9 @@ pub fn parse_curseforge_detail(p: &Value) -> ProjectDetail {
license: None,
categories: p["categories"].as_array().map_or(vec![], |c| c.iter().filter_map(|x| x["name"].as_str().map(String::from)).collect()),
page_url: p["links"]["websiteUrl"].as_str().filter(|u| u.starts_with("https://")).map(Into::into),
body: description.into(),
body_format: "html",
gallery: gallery(&p["screenshots"], "url"),
}
}

Expand All @@ -1064,7 +1079,12 @@ pub async fn project_detail(provider: String, project_id: String) -> HostResult<
let members = get_json(&format!("{MODRINTH}/project/{}/members", encode(id))).unwrap_or(Value::Null);
Ok(parse_modrinth_detail(&project, &members))
}
"curseforge" => Ok(parse_curseforge_detail(&cf_get(&format!("/mods/{}", encode(id)))?["data"])),
"curseforge" => {
let project = cf_get(&format!("/mods/{}", encode(id)))?;
// The long description is its own request; the rest of the page is still useful without it.
let description = cf_get(&format!("/mods/{}/description", encode(id))).unwrap_or(Value::Null);
Ok(parse_curseforge_detail(&project["data"], description["data"].as_str().unwrap_or("")))
}
_ => err("invalid", "Unknown mod provider."),
}
})
Expand Down Expand Up @@ -1169,9 +1189,11 @@ mod tests {

#[test]
fn project_details_read_both_providers() {
let m = parse_modrinth_detail(&json!({"slug": "sodium", "description": "Fast", "downloads": 5.0, "updated": "2026-01-01T00:00:00Z", "license": {"id": "LGPL-3.0"}, "categories": ["optimization"]}), &json!([{"role": "Member", "user": {"username": "b"}}, {"role": "Owner", "user": {"username": "jelly"}}]));
assert_eq!((m.author.as_str(), m.license.as_deref(), m.page_url.as_deref()), ("jelly", Some("LGPL-3.0"), Some("https://modrinth.com/mod/sodium")));
let c = parse_curseforge_detail(&json!({"authors": [{"name": "mezz"}], "summary": "Items", "downloadCount": 9.0, "categories": [{"name": "API"}], "links": {"websiteUrl": "https://www.curseforge.com/minecraft/mc-mods/jei"}}));
let m = parse_modrinth_detail(&json!({"slug": "sodium", "description": "Fast", "downloads": 5.0, "updated": "2026-01-01T00:00:00Z", "license": {"id": "LGPL-3.0"}, "categories": ["optimization"], "project_type": "shader", "body": "# Hi", "gallery": [{"url": "https://cdn.modrinth.com/a.png"}, {"url": "http://plain/b.png"}]}), &json!([{"role": "Member", "user": {"username": "b"}}, {"role": "Owner", "user": {"username": "jelly"}}]));
assert_eq!((m.author.as_str(), m.license.as_deref(), m.page_url.as_deref()), ("jelly", Some("LGPL-3.0"), Some("https://modrinth.com/shader/sodium")));
assert_eq!((m.body.as_str(), m.body_format, m.gallery), ("# Hi", "markdown", vec!["https://cdn.modrinth.com/a.png".to_string()]));
let c = parse_curseforge_detail(&json!({"authors": [{"name": "mezz"}], "summary": "Items", "downloadCount": 9.0, "categories": [{"name": "API"}], "links": {"websiteUrl": "https://www.curseforge.com/minecraft/mc-mods/jei"}, "screenshots": [{"url": "https://media.forgecdn.net/s.png"}]}), "<p>Items</p>");
assert_eq!((c.body.as_str(), c.body_format, c.gallery.len()), ("<p>Items</p>", "html", 1));
assert_eq!((c.author.as_str(), c.categories.len(), c.downloads), ("mezz", 1, Some(9.0)));
}

Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "Awake Modpack Manager",
"version": "1.3.4",
"version": "1.4.0",
"identifier": "io.github.awakenginexe.AwakeModpackManager",
"build": {
"frontendDist": "../dist",
Expand Down
10 changes: 8 additions & 2 deletions src/backend/composite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export function createCompositeBackend(helper: ManagerBackend, launcher: Manager
const launcherPaths = new Map<string, string>();
const samePath = (p: string) => p.replace(/\\/g, '/').toLowerCase();
let retry: ReturnType<typeof setTimeout> | undefined;
/** Why the helper could not say which instances are connected; until it can, none may be connected again. */
let sharedError: BackendError | null = null;

const all = [parts.helper, parts.launcher];
const noHelper = (): Promise<never> => Promise.reject(new BackendError('unsupported', 'Only Manager projects (the Manager helper) support this.'));
Expand Down Expand Up @@ -59,7 +61,9 @@ export function createCompositeBackend(helper: ManagerBackend, launcher: Manager
async function withShared(list: InstanceSummary[]): Promise<InstanceSummary[]> {
for (const i of list) if (i.path) launcherPaths.set(i.id, i.path);
if (!parts.helper.handshake) return list;
const connected = new Map((await helper.listInstances('manager').catch(() => [] as InstanceSummary[])).filter((w) => w.sharedRoot).map((w) => [samePath(w.sharedRoot!), w]));
sharedError = null;
const mine = await helper.listInstances('manager').catch((e) => { sharedError = e instanceof BackendError ? e : new BackendError('protocol', String(e)); return [] as InstanceSummary[]; });
const connected = new Map(mine.filter((w) => w.sharedRoot).map((w) => [samePath(w.sharedRoot!), w]));
sharedOf.clear();
return list.map((i) => {
const w = i.path ? connected.get(samePath(i.path)) : undefined;
Expand Down Expand Up @@ -115,7 +119,7 @@ export function createCompositeBackend(helper: ManagerBackend, launcher: Manager
startLauncher: async () => { await launcher.startLauncher?.(); scheduleLauncherRetry(); },
makeProfilePrivate: async () => { await launcher.makeProfilePrivate?.(); clearTimeout(retry); await connectPart(parts.launcher); emit(); scheduleLauncherRetry(); },
setPreferredProfile: (d) => launcher.setPreferredProfile?.(d),
instanceWarnings: () => current.backend.instanceWarnings?.() ?? [],
instanceWarnings: () => [...(current.backend.instanceWarnings?.() ?? []), ...(current === parts.launcher && sharedError ? [{ code: sharedError.code, path: sharedError.message }] : [])],

async listInstances(installationId) {
const p = backend.partFor(installationId);
Expand Down Expand Up @@ -197,6 +201,8 @@ export function createCompositeBackend(helper: ManagerBackend, launcher: Manager
},
canShareInstances: () => !!parts.helper.handshake && !!parts.launcher.handshake && !!helper.canAdopt?.() && !!launcher.canEnroll?.(),
async shareInstance(id) {
// Without the helper's list an instance it already manages looks unconnected, and connecting it again is refused.
if (sharedError) throw sharedError;
const path = launcherPaths.get(id);
if (!path || !helper.adoptInstance || !launcher.enrollInstance) throw new BackendError('unsupported', 'Update Awake Launcher to 3.2.0 or newer to manage this instance here.');
// The Launcher refuses to start the game for this instance until it hears the outcome.
Expand Down
2 changes: 1 addition & 1 deletion src/backend/host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BackendError, type AddedContent, type ContentEntry, type ContentImage,
export interface FetchedPack { token: string; format: 'mrpack' | 'curseforge'; size: number; sha256: string; notes: string[] }
export interface ProjectMeta { provider: ProviderId; projectId: string; name: string; iconUrl?: string; restricted?: boolean; pageUrl?: string }
export interface ModUpdate { provider: ProviderId; projectId: string; installedVersionId: string; candidate: { id: string; name: string; releaseType: 'release' | 'beta' | 'alpha' } | null }
export interface ProjectDetail { author: string; summary: string; downloads: number | null; updatedAt: string | null; license: string | null; categories: string[]; pageUrl: string | null }
export interface ProjectDetail { author: string; summary: string; downloads: number | null; updatedAt: string | null; license: string | null; categories: string[]; pageUrl: string | null; body?: string; bodyFormat?: 'markdown' | 'html'; gallery?: string[] }
export interface ProjectRef { provider: ProviderId; projectId: string; versionId?: string }

/**
Expand Down
15 changes: 15 additions & 0 deletions src/backend/mock/MockBackend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,21 @@ export class MockBackend implements ManagerBackend {

/* ----- resource packs & shaders ----- */

/** A made-up project page, so the details window has something to show in the demo. */
async projectDetail(provider: ProviderId, projectId: string) {
await this.delay(this.opts.latencyMs);
const shot = (hue: number) => `data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 360"><rect width="640" height="360" fill="hsl(${hue} 55% 32%)"/><rect y="250" width="640" height="110" fill="hsl(${hue} 45% 20%)"/><circle cx="500" cy="90" r="42" fill="hsl(${(hue + 40) % 360} 80% 70%)"/></svg>`)}`;
const seed = [...projectId].reduce((n, c) => n + c.charCodeAt(0), 0);
return {
author: 'demo-author', summary: '', downloads: null, updatedAt: '2026-11-03T16:30:00Z', license: 'MIT', categories: ['library', 'utility'], pageUrl: null,
bodyFormat: provider === 'curseforge' ? 'html' as const : 'markdown' as const,
body: provider === 'curseforge'
? '<h2>About</h2><p>A <strong>demo</strong> page written as HTML.</p><ul><li>One thing</li><li>Another</li></ul><script>window.bad = 1</script>'
: '# About\n\nA **demo** page written as Markdown, with a [link](https://example.com/).\n\n## Features\n\n- One thing\n- Another\n\n```\n/give @s demo\n```',
gallery: [shot(seed % 360), shot((seed + 120) % 360), shot((seed + 240) % 360)],
};
}

async contentProviders(): Promise<ProviderInfo[]> { return this.opts.providers ?? DEFAULT_PROVIDERS; }
searchContent(q: ContentSearchQuery): Promise<ContentSearchPage> {
return this.call(() => {
Expand Down
Loading
Loading