Files
notforever-ship-it ab84cc38cd Release 0.7.0: a step-by-step guide like RestedXP, with an arrow
- Pick a difficulty, then a guide for your level and faction: RestedXP's free classic guides,
  Alliance and Horde, levels 1 to 60 (CC BY-NC-SA 4.0, credited in the README and Help).
- The step window shows the step you are on and ticks it off as you accept, kill, loot and
  hand in; the guide moves on by itself. The gear opens every guide by level.
- An arrow at the top of the screen points at the next place, with the distance in yards.
- Casual leaves out group quests and elite quests, Medium leaves out group quests, Hard does all.
- New commands: /er guides, /er arrow, /er next, /er stop.
2026-10-08 18:11:30 +01:00

40 lines
1.6 KiB
JavaScript

// Copies the addon from this project into the game's AddOns folder, replacing only its own folder.
// The addon files live at the repo root (launchers expect the .toc there), so only the game's files
// are copied: the .toc, the Lua files and the Data and Media folders. Development files stay behind.
// Usage: node tools/install.js [path to Interface\AddOns]
const fs = require("fs");
const path = require("path");
const ROOT = path.resolve(__dirname, "..");
const ADDON = "EasyRoute";
const target = path.resolve(process.argv[2] || "E:\\Ravencraft\\twmoa_1181\\Interface\\AddOns");
if (!fs.existsSync(target)) {
console.error(`AddOns folder not found: ${target}`);
process.exit(1);
}
if (!fs.existsSync(path.join(ROOT, `${ADDON}.toc`))) {
console.error(`${ADDON}.toc is missing from the project. Restore it with: git checkout -- .`);
process.exit(1);
}
const entries = fs.readdirSync(ROOT, { withFileTypes: true }).filter((e) => {
if (e.isDirectory()) return e.name === "Data" || e.name === "Media";
return e.name.endsWith(".lua") || e.name === `${ADDON}.toc`;
});
const dest = path.join(target, ADDON);
fs.rmSync(dest, { recursive: true, force: true });
fs.mkdirSync(dest, { recursive: true });
let count = 0;
for (const entry of entries) {
const from = path.join(ROOT, entry.name);
const to = path.join(dest, entry.name);
fs.cpSync(from, to, { recursive: true });
count += entry.isDirectory() ? fs.readdirSync(from).length : 1;
}
const version = (fs.readFileSync(path.join(dest, `${ADDON}.toc`), "utf8").match(/## Version:\s*(\S+)/) || [])[1];
console.log(`Installed ${ADDON} ${version} (${count} files) -> ${dest}`);