this commit should fix all the previous issues, also peppy fixed osu!.exe patch update
This commit is contained in:
parent
397c2255c1
commit
705e47a1b8
|
@ -9,7 +9,6 @@ const checkUpdateURL =
|
|||
"https://osu.ppy.sh/web/check-updates.php?action=check&stream=";
|
||||
const ignoredOsuEntities = [
|
||||
"osu!auth.dll",
|
||||
"osu!.exe"
|
||||
];
|
||||
const osuEntities = [
|
||||
"avcodec-51.dll",
|
||||
|
@ -417,8 +416,6 @@ async function findOsuInstallation() {
|
|||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
|
||||
async function updateOsuConfigHashes(osuPath) {
|
||||
const osuCfg = path.join(osuPath, "osu!.cfg");
|
||||
const fileStream = await fs.promises.readFile(osuCfg, "utf-8");
|
||||
|
@ -435,7 +432,9 @@ async function updateOsuConfigHashes(osuPath) {
|
|||
const filePath = path.join(osuPath, fileName);
|
||||
if (!fs.existsSync(filePath)) continue;
|
||||
const binaryFileContents = await fs.promises.readFile(filePath);
|
||||
const existingFileMD5 = crypto.createHash("md5").update(binaryFileContents).digest("hex");
|
||||
const existingFileMD5 = crypto.createHash("md5").update(
|
||||
binaryFileContents,
|
||||
).digest("hex");
|
||||
if (value == existingFileMD5) newLines.push(line);
|
||||
else newLines.push(`${key} = ${existingFileMD5}`);
|
||||
} else if (line.startsWith("u_UpdaterAutoStart")) {
|
||||
|
@ -448,7 +447,7 @@ async function updateOsuConfigHashes(osuPath) {
|
|||
}
|
||||
}
|
||||
|
||||
await fs.promises.writeFile(osuCfg, newLines.join("\n"), 'utf-8');
|
||||
await fs.promises.writeFile(osuCfg, newLines.join("\n"), "utf-8");
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
@ -465,5 +464,5 @@ module.exports = {
|
|||
getUIFiles,
|
||||
replaceUIFile,
|
||||
findOsuInstallation,
|
||||
updateOsuConfigHashes
|
||||
updateOsuConfigHashes,
|
||||
};
|
||||
|
|
20
main.js
20
main.js
|
@ -369,7 +369,8 @@ function registerIPCPipes() {
|
|||
progress: Math.ceil(data.progress),
|
||||
});
|
||||
mainWindow.webContents.send("ezpplauncher:launchstatus", {
|
||||
status: `Downloading ${data.fileName}(${formatBytes(data.loaded)}/${formatBytes(data.total)
|
||||
status: `Downloading ${data.fileName}(${formatBytes(data.loaded)}/${
|
||||
formatBytes(data.total)
|
||||
})...`,
|
||||
});
|
||||
});
|
||||
|
@ -399,7 +400,8 @@ function registerIPCPipes() {
|
|||
progress: Math.ceil(data.progress),
|
||||
});
|
||||
mainWindow.webContents.send("ezpplauncher:launchstatus", {
|
||||
status: `Downloading ${data.fileName}(${formatBytes(data.loaded)}/${formatBytes(data.total)
|
||||
status: `Downloading ${data.fileName}(${formatBytes(data.loaded)}/${
|
||||
formatBytes(data.total)
|
||||
})...`,
|
||||
});
|
||||
});
|
||||
|
@ -445,7 +447,8 @@ function registerIPCPipes() {
|
|||
progress: Math.ceil(data.progress),
|
||||
});
|
||||
mainWindow.webContents.send("ezpplauncher:launchstatus", {
|
||||
status: `Downloading ${data.fileName}(${formatBytes(data.loaded)}/${formatBytes(data.total)
|
||||
status: `Downloading ${data.fileName}(${formatBytes(data.loaded)}/${
|
||||
formatBytes(data.total)
|
||||
})...`,
|
||||
});
|
||||
});
|
||||
|
@ -477,7 +480,11 @@ function registerIPCPipes() {
|
|||
const userConfig = getUserConfig(osuPath);
|
||||
richPresence.updateVersion(await userConfig.get("LastVersion"));
|
||||
richPresence.update();
|
||||
await userConfig.set("ShowInterfaceDuringRelax", "1");
|
||||
if (currentUser) {
|
||||
await userConfig.set("CredentialEndpoint", "ez-pp.farm");
|
||||
await userConfig.set("SavePassword", "1");
|
||||
await userConfig.set("SaveUsername", "1");
|
||||
await userConfig.set("Username", currentUser.username);
|
||||
await userConfig.set("Password", currentUser.password);
|
||||
}
|
||||
|
@ -559,13 +566,14 @@ function createWindow() {
|
|||
registerIPCPipes();
|
||||
|
||||
const presenceEnabled = config.get("presence");
|
||||
if (presenceEnabled == undefined)
|
||||
if (presenceEnabled == undefined) {
|
||||
richPresence.connect();
|
||||
else {
|
||||
} else {
|
||||
console.log(presenceEnabled);
|
||||
if (presenceEnabled == "true")
|
||||
if (presenceEnabled == "true") {
|
||||
richPresence.connect();
|
||||
}
|
||||
}
|
||||
// Uncomment the following line of code when app is ready to be packaged.
|
||||
// loadURL(mainWindow);
|
||||
|
||||
|
|
|
@ -150,9 +150,15 @@
|
|||
/>
|
||||
<!-- TODO: if user has donator, display heart indicator-->
|
||||
{#if $currentUser && $currentUser.id == 1001}
|
||||
<Indicator color="red" border size="xl" placement="top-right">
|
||||
<Indicator
|
||||
class="pointer-events-none"
|
||||
color="red"
|
||||
border
|
||||
size="xl"
|
||||
placement="top-right"
|
||||
>
|
||||
<span class="text-red-300 text-xs font-bold">
|
||||
<HeartSolid size="xs" />
|
||||
<HeartSolid class="select-none pointer-events-none" size="xs" />
|
||||
</span>
|
||||
</Indicator>
|
||||
{/if}
|
||||
|
|
Loading…
Reference in New Issue
Block a user