OctoLauncher 1.3.5

This commit is contained in:
OctoWoW
2026-08-14 11:37:18 +00:00
parent 5dca94a3fc
commit f9d89601f1
11 changed files with 239 additions and 29 deletions
+11 -4
View File
@@ -2,14 +2,21 @@ import { patchConfig, patchExecutable } from '~main/modules/patcher';
import Preferences from '~main/modules/preferences';
import Updater from '~main/modules/updater';
import { getClientVersion } from '~main/utils';
import { stopSeeding } from '~main/modules/aria2';
import { createTRPCRouter, publicProcedure } from '../trpc';
export const patcherRouter = createTRPCRouter({
apply: publicProcedure.mutation(async () => {
await patchExecutable();
await patchConfig(true);
await Updater.recordPatchedWow();
Preferences.data = { version: await getClientVersion() };
// release the seeder's file handles so the patchers can write
stopSeeding();
try {
await patchExecutable();
await patchConfig(true);
await Updater.recordPatchedWow();
Preferences.data = { version: await getClientVersion() };
} finally {
await Updater.refreshSeeding();
}
})
});