diff --git a/src/classisland.test.ts b/src/classisland.test.ts index 0706885..f6d3906 100644 --- a/src/classisland.test.ts +++ b/src/classisland.test.ts @@ -38,12 +38,12 @@ function classIslandHealthResponse(input: string | URL): Response | undefined { : undefined; } -test("ClassIsland versions enforce the 2.1.1.0 minimum", () => { - assert.equal(compareClassIslandVersions("2.1.1.0", "2.1.1.0"), 0); - assert.equal(compareClassIslandVersions("2.1.1.1", "2.1.1.0") > 0, true); - assert.equal(compareClassIslandVersions("2.1.0.9", "2.1.1.0") < 0, true); - assert.equal(isCompatibleClassIslandVersion("2.1.1.0"), true); - assert.equal(isCompatibleClassIslandVersion("2.1.0.9"), false); +test("ClassIsland versions enforce the 2.0.0.0 minimum", () => { + assert.equal(compareClassIslandVersions("2.0.0.0", "2.0.0.0"), 0); + assert.equal(compareClassIslandVersions("2.0.0.1", "2.0.0.0") > 0, true); + assert.equal(compareClassIslandVersions("1.9.0.9", "2.0.0.0") < 0, true); + assert.equal(isCompatibleClassIslandVersion("2.0.0.0"), true); + assert.equal(isCompatibleClassIslandVersion("1.9.0.9"), false); assert.equal(isCompatibleClassIslandVersion(undefined), false); }); @@ -74,8 +74,8 @@ test("discovers multiple ClassIsland versions and marks old versions incompatibl const paths = ["C:\\Portable\\ClassIsland.exe", "D:\\Old\\ClassIsland.exe", "C:\\Program Files\\ClassIsland\\ClassIsland.exe"]; const versions: Record = { [paths[0]]: "2.1.1.0", - [paths[1]]: "2.0.4.0", - [paths[2]]: "2.1.1.0" + [paths[1]]: "1.9.0.0", + [paths[2]]: "2.0.4.0" }; const found = await discoverClassIslandInstallations({ platform: "win32", @@ -91,7 +91,8 @@ test("discovers multiple ClassIsland versions and marks old versions incompatibl assert.equal(found.find((item) => item.executablePath === paths[0])?.isRunning, true); assert.deepEqual(found.find((item) => item.executablePath === paths[0])?.launchArgs, ["--quiet"]); assert.equal(found.find((item) => item.executablePath === paths[1])?.compatible, false); - assert.match(found.find((item) => item.executablePath === paths[1])?.reason || "", /2\.1\.1\.0/); + assert.match(found.find((item) => item.executablePath === paths[1])?.reason || "", /2\.0\.0\.0/); + assert.equal(found.find((item) => item.executablePath === paths[2])?.compatible, true); }); test("maps the running ClassIsland.Desktop process back to its launcher and closes the real instance", async () => { @@ -289,7 +290,7 @@ test("does not write a package when ClassIsland is too old or the digest is inva try { const exe = path.win32.join(root, "ClassIsland.exe"); fs.writeFileSync(exe, "test executable"); - const oldInstaller = new ClassIslandInstaller({ platform: "win32", executablePaths: [exe], runningProcesses: [], versionOf: () => "2.1.0.9", exists: (candidate) => fs.existsSync(candidate) }); + const oldInstaller = new ClassIslandInstaller({ platform: "win32", executablePaths: [exe], runningProcesses: [], versionOf: () => "1.9.0.0", exists: (candidate) => fs.existsSync(candidate) }); const [oldTarget] = await oldInstaller.detect(); const [oldResult] = await oldInstaller.install([oldTarget.id]); assert.equal(oldResult.action, "skipped"); diff --git a/src/classisland.ts b/src/classisland.ts index 15d4875..e30f1e9 100644 --- a/src/classisland.ts +++ b/src/classisland.ts @@ -10,7 +10,7 @@ import { DEFAULT_MARKETPLACE_PROXY_URL, describeDownloadAttempt, marketplaceRequ export const CLASSISLAND_PLUGIN_REPOSITORY = "SECTL/ClassIsland-SecAgent-Plugin"; export const CLASSISLAND_PLUGIN_ID = "classisland.secagent"; export const CLASSISLAND_PLUGIN_ASSET_NAME = "ClassIsland.SecAgent.Plugin.cipx"; -export const MIN_CLASSISLAND_VERSION = "2.1.1.0"; +export const MIN_CLASSISLAND_VERSION = "2.0.0.0"; export const CLASSISLAND_RELEASE_API_URL = `https://api.github.com/repos/${CLASSISLAND_PLUGIN_REPOSITORY}/releases/latest`; const CLASSISLAND_RELEASE_PAGE_URL = `https://github.com/${CLASSISLAND_PLUGIN_REPOSITORY}/releases/latest`; diff --git a/src/renderer/src/components/OobeWizard.tsx b/src/renderer/src/components/OobeWizard.tsx index fbdeb4b..144daf4 100644 --- a/src/renderer/src/components/OobeWizard.tsx +++ b/src/renderer/src/components/OobeWizard.tsx @@ -555,7 +555,7 @@ export function OobeWizard() { return false; } if (selectedTargets.some((target) => !target.compatible)) { - setError("所选 ClassIsland 版本低于 2.1.1.0,无法安装联动插件"); + setError("所选 ClassIsland 版本低于 2.0.0.0,无法安装联动插件"); return false; } // Holds land on the 50-100 half of the card when the SecAgent connector