mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Support for building wegame specific version
This commit is contained in:
parent
56214defaf
commit
291614cb3c
@ -274,7 +274,10 @@ async function performFsJob(job) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ipcMain.handle("fs-job", (event, arg) => performFsJob(arg));
|
ipcMain.on("fs-job", async (event, arg) => {
|
||||||
|
const result = await performFsJob(arg);
|
||||||
|
event.reply("fs-response", { id: arg.id, result });
|
||||||
|
});
|
||||||
|
|
||||||
steam.init(isDev);
|
steam.init(isDev);
|
||||||
steam.listen();
|
steam.listen();
|
||||||
|
1
electron_wegame/.gitignore
vendored
Normal file
1
electron_wegame/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
wegame_sdk
|
@ -1,6 +1,9 @@
|
|||||||
/* eslint-disable quotes,no-undef */
|
/* eslint-disable quotes,no-undef */
|
||||||
|
|
||||||
const { app, BrowserWindow, Menu, MenuItem, ipcMain, shell } = require("electron");
|
const { app, BrowserWindow, Menu, MenuItem, ipcMain, shell } = require("electron");
|
||||||
|
|
||||||
|
app.commandLine.appendSwitch("in-process-gpu");
|
||||||
|
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const url = require("url");
|
const url = require("url");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
@ -49,7 +52,7 @@ function createWindow() {
|
|||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
webSecurity: false,
|
webSecurity: false,
|
||||||
},
|
},
|
||||||
allowRunningInsecureContent: false,
|
// allowRunningInsecureContent: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isLocal) {
|
if (isLocal) {
|
||||||
@ -63,7 +66,7 @@ function createWindow() {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
win.webContents.session.clearCache();
|
win.webContents.session.clearCache(() => null);
|
||||||
win.webContents.session.clearStorageData();
|
win.webContents.session.clearStorageData();
|
||||||
|
|
||||||
win.webContents.on("new-window", (event, pth) => {
|
win.webContents.on("new-window", (event, pth) => {
|
||||||
@ -81,7 +84,7 @@ function createWindow() {
|
|||||||
|
|
||||||
const mainItem = new MenuItem({
|
const mainItem = new MenuItem({
|
||||||
label: "Toggle Dev Tools",
|
label: "Toggle Dev Tools",
|
||||||
click: () => win.toggleDevTools(),
|
click: () => win.webContents.toggleDevTools(),
|
||||||
accelerator: "F12",
|
accelerator: "F12",
|
||||||
});
|
});
|
||||||
menu.append(mainItem);
|
menu.append(mainItem);
|
||||||
@ -161,20 +164,20 @@ async function writeFileSafe(filename, contents) {
|
|||||||
console.warn(prefix, "Concurrent write process on", filename);
|
console.warn(prefix, "Concurrent write process on", filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
fileLock.acquire(filename, async () => {
|
await fileLock.acquire(filename, async () => {
|
||||||
console.log(prefix, "Starting write on", niceFileName(filename), "in transaction", transactionId);
|
console.log(prefix, "Starting write on", niceFileName(filename), "in transaction", transactionId);
|
||||||
|
|
||||||
if (!fs.existsSync(filename)) {
|
if (!fs.existsSync(filename)) {
|
||||||
// this one is easy
|
// this one is easy
|
||||||
console.log(prefix, "Writing file instantly because it does not exist:", niceFileName(filename));
|
console.log(prefix, "Writing file instantly because it does not exist:", niceFileName(filename));
|
||||||
await fs.promises.writeFile(filename, contents, { encoding: "utf8" });
|
fs.writeFileSync(filename, contents, { encoding: "utf8" });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// first, write a temporary file (.tmp-XXX)
|
// first, write a temporary file (.tmp-XXX)
|
||||||
const tempName = filename + ".tmp-" + transactionId;
|
const tempName = filename + ".tmp-" + transactionId;
|
||||||
console.log(prefix, "Writing temporary file", niceFileName(tempName));
|
console.log(prefix, "Writing temporary file", niceFileName(tempName));
|
||||||
await fs.promises.writeFile(tempName, contents, { encoding: "utf8" });
|
fs.writeFileSync(tempName, contents, { encoding: "utf8" });
|
||||||
|
|
||||||
// now, rename the original file to (.backup-XXX)
|
// now, rename the original file to (.backup-XXX)
|
||||||
const oldTemporaryName = filename + ".backup-" + transactionId;
|
const oldTemporaryName = filename + ".backup-" + transactionId;
|
||||||
@ -185,7 +188,7 @@ async function writeFileSafe(filename, contents) {
|
|||||||
"to",
|
"to",
|
||||||
niceFileName(oldTemporaryName)
|
niceFileName(oldTemporaryName)
|
||||||
);
|
);
|
||||||
await fs.promises.rename(filename, oldTemporaryName);
|
fs.renameSync(filename, oldTemporaryName);
|
||||||
|
|
||||||
// now, rename the temporary file (.tmp-XXX) to the target
|
// now, rename the temporary file (.tmp-XXX) to the target
|
||||||
console.log(
|
console.log(
|
||||||
@ -195,7 +198,7 @@ async function writeFileSafe(filename, contents) {
|
|||||||
"to the original",
|
"to the original",
|
||||||
niceFileName(filename)
|
niceFileName(filename)
|
||||||
);
|
);
|
||||||
await fs.promises.rename(tempName, filename);
|
fs.renameSync(tempName, filename);
|
||||||
|
|
||||||
// we are done now, try to create a backup, but don't fail if the backup fails
|
// we are done now, try to create a backup, but don't fail if the backup fails
|
||||||
try {
|
try {
|
||||||
@ -204,12 +207,12 @@ async function writeFileSafe(filename, contents) {
|
|||||||
if (fs.existsSync(backupFileName)) {
|
if (fs.existsSync(backupFileName)) {
|
||||||
console.log(prefix, "Deleting old backup file", niceFileName(backupFileName));
|
console.log(prefix, "Deleting old backup file", niceFileName(backupFileName));
|
||||||
// delete the old backup
|
// delete the old backup
|
||||||
await fs.promises.unlink(backupFileName);
|
fs.unlinkSync(backupFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// rename the old file to the new backup file
|
// rename the old file to the new backup file
|
||||||
console.log(prefix, "Moving", niceFileName(oldTemporaryName), "to the backup file location");
|
console.log(prefix, "Moving", niceFileName(oldTemporaryName), "to the backup file location");
|
||||||
await fs.promises.rename(oldTemporaryName, backupFileName);
|
fs.renameSync(oldTemporaryName, backupFileName);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
console.error(prefix, "Failed to switch backup files:", ex);
|
console.error(prefix, "Failed to switch backup files:", ex);
|
||||||
}
|
}
|
||||||
@ -229,12 +232,13 @@ async function performFsJob(job) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const data = await fs.promises.readFile(fname, { encoding: "utf8" });
|
const data = fs.readFileSync(fname, { encoding: "utf8" });
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
data,
|
data,
|
||||||
};
|
};
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
|
console.error(ex);
|
||||||
return {
|
return {
|
||||||
error: ex,
|
error: ex,
|
||||||
};
|
};
|
||||||
@ -242,12 +246,13 @@ async function performFsJob(job) {
|
|||||||
}
|
}
|
||||||
case "write": {
|
case "write": {
|
||||||
try {
|
try {
|
||||||
await writeFileSafe(fname, job.contents);
|
writeFileSafe(fname, job.contents);
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
data: job.contents,
|
data: job.contents,
|
||||||
};
|
};
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
|
console.error(ex);
|
||||||
return {
|
return {
|
||||||
error: ex,
|
error: ex,
|
||||||
};
|
};
|
||||||
@ -256,8 +261,9 @@ async function performFsJob(job) {
|
|||||||
|
|
||||||
case "delete": {
|
case "delete": {
|
||||||
try {
|
try {
|
||||||
await fs.promises.unlink(fname);
|
fs.unlinkSync(fname);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
|
console.error(ex);
|
||||||
return {
|
return {
|
||||||
error: ex,
|
error: ex,
|
||||||
};
|
};
|
||||||
@ -274,7 +280,9 @@ async function performFsJob(job) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ipcMain.handle("fs-job", (event, arg) => performFsJob(arg));
|
ipcMain.on("fs-job", async (event, arg) => {
|
||||||
|
const result = await performFsJob(arg);
|
||||||
|
event.sender.send("fs-response", { id: arg.id, result });
|
||||||
|
});
|
||||||
wegame.init(isDev);
|
wegame.init(isDev);
|
||||||
wegame.listen();
|
wegame.listen();
|
||||||
|
@ -1,5 +1,48 @@
|
|||||||
|
const railsdk = require("./wegame_sdk/railsdk.js");
|
||||||
|
const { dialog } = require("electron");
|
||||||
|
|
||||||
function init(isDev) {
|
function init(isDev) {
|
||||||
console.log("wegame: init");
|
console.log("Step 1: wegame: init");
|
||||||
|
|
||||||
|
try {
|
||||||
|
console.log("Step 2: Calling need restart app");
|
||||||
|
const need_restart = railsdk.RailNeedRestartAppForCheckingEnvironment(
|
||||||
|
2001639,
|
||||||
|
[`--rail_render_pid=${process.pid}`] //,"--rail_debug_mode",
|
||||||
|
);
|
||||||
|
console.log("Step 3: Needs restart =", need_restart);
|
||||||
|
if (need_restart) {
|
||||||
|
console.error("Step 4: Need restart");
|
||||||
|
dialog.showErrorBox("加载RailSDK失败", "请先运行WeGame开发者版本");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error("Rail SDK error:", err);
|
||||||
|
dialog.showErrorBox("加载RailSDK失败", err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Step 5: starting rail sdk");
|
||||||
|
if (railsdk.RailInitialize() === false) {
|
||||||
|
console.error("RailInitialize() = false");
|
||||||
|
dialog.showErrorBox("RailInitialize调用失败", "请先运行WeGame开发者版本");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Initialize RailSDK success!");
|
||||||
|
|
||||||
|
railsdk.RailRegisterEvent(railsdk.RailEventID.kRailEventSystemStateChanged, event => {
|
||||||
|
console.log(event);
|
||||||
|
if (event.result === railsdk.RailResult.kSuccess) {
|
||||||
|
if (
|
||||||
|
event.state === railsdk.RailSystemState.kSystemStatePlatformOffline ||
|
||||||
|
event.state === railsdk.RailSystemState.kSystemStatePlatformExit ||
|
||||||
|
event.state === railsdk.RailSystemState.kSystemStateGameExitByAntiAddiction
|
||||||
|
) {
|
||||||
|
remote.app.exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function listen() {
|
function listen() {
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -247,7 +247,7 @@ function gulptasksJS($, gulp, buildFolder, browserSync) {
|
|||||||
requireUncached("./webpack.production.config.js")({
|
requireUncached("./webpack.production.config.js")({
|
||||||
enableAssert: false,
|
enableAssert: false,
|
||||||
environment: "prod",
|
environment: "prod",
|
||||||
es6: true,
|
es6: false,
|
||||||
standalone: true,
|
standalone: true,
|
||||||
wegameVersion: true,
|
wegameVersion: true,
|
||||||
})
|
})
|
||||||
|
@ -44,6 +44,8 @@ function gulptasksStandalone($, gulp) {
|
|||||||
const requiredFiles = [
|
const requiredFiles = [
|
||||||
path.join(electronBaseDir, "node_modules", "**", "*.*"),
|
path.join(electronBaseDir, "node_modules", "**", "*.*"),
|
||||||
path.join(electronBaseDir, "node_modules", "**", ".*"),
|
path.join(electronBaseDir, "node_modules", "**", ".*"),
|
||||||
|
path.join(electronBaseDir, "wegame_sdk", "**", "*.*"),
|
||||||
|
path.join(electronBaseDir, "wegame_sdk", "**", ".*"),
|
||||||
path.join(electronBaseDir, "favicon*"),
|
path.join(electronBaseDir, "favicon*"),
|
||||||
|
|
||||||
// fails on platforms which support symlinks
|
// fails on platforms which support symlinks
|
||||||
@ -133,11 +135,10 @@ function gulptasksStandalone($, gulp) {
|
|||||||
const tomlFile = fs.readFileSync(path.join(__dirname, ".itch.toml"));
|
const tomlFile = fs.readFileSync(path.join(__dirname, ".itch.toml"));
|
||||||
const privateArtifactsPath = "node_modules/shapez.io-private-artifacts";
|
const privateArtifactsPath = "node_modules/shapez.io-private-artifacts";
|
||||||
|
|
||||||
let asar;
|
let asar = steam;
|
||||||
if (steam && fs.existsSync(path.join(tempDestBuildDir, privateArtifactsPath))) {
|
if (steam && fs.existsSync(path.join(tempDestBuildDir, privateArtifactsPath))) {
|
||||||
|
// @ts-expect-error
|
||||||
asar = { unpackDir: privateArtifactsPath };
|
asar = { unpackDir: privateArtifactsPath };
|
||||||
} else {
|
|
||||||
asar = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
packager({
|
packager({
|
||||||
|
@ -2,16 +2,16 @@
|
|||||||
{
|
{
|
||||||
"appid" "1318690"
|
"appid" "1318690"
|
||||||
"desc" "$DESC$"
|
"desc" "$DESC$"
|
||||||
"buildoutput" "C:\work\shapez.io\gulp\steampipe\steamtemp"
|
"buildoutput" "C:\work\shapez\shapez.io\gulp\steampipe\steamtemp"
|
||||||
"contentroot" ""
|
"contentroot" ""
|
||||||
"setlive" ""
|
"setlive" ""
|
||||||
"preview" "0"
|
"preview" "0"
|
||||||
"local" ""
|
"local" ""
|
||||||
"depots"
|
"depots"
|
||||||
{
|
{
|
||||||
"1318691" "C:\work\shapez.io\gulp\steampipe\scripts\windows.vdf"
|
"1318691" "C:\work\shapez\shapez.io\gulp\steampipe\scripts\windows.vdf"
|
||||||
"1318694" "C:\work\shapez.io\gulp\steampipe\scripts\china-windows.vdf"
|
"1318694" "C:\work\shapez\shapez.io\gulp\steampipe\scripts\china-windows.vdf"
|
||||||
"1318692" "C:\work\shapez.io\gulp\steampipe\scripts\linux.vdf"
|
"1318692" "C:\work\shapez\shapez.io\gulp\steampipe\scripts\linux.vdf"
|
||||||
"1318695" "C:\work\shapez.io\gulp\steampipe\scripts\china-linux.vdf"
|
"1318695" "C:\work\shapez\shapez.io\gulp\steampipe\scripts\china-linux.vdf"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"DepotBuildConfig"
|
"DepotBuildConfig"
|
||||||
{
|
{
|
||||||
"DepotID" "1318695"
|
"DepotID" "1318695"
|
||||||
"contentroot" "C:\work\shapez.io\tmp_standalone_files_china\shapez.io-standalonechina-linux-x64"
|
"contentroot" "C:\work\shapez\shapez.io\tmp_standalone_files_china\shapez.io-standalonechina-linux-x64"
|
||||||
"FileMapping"
|
"FileMapping"
|
||||||
{
|
{
|
||||||
"LocalPath" "*"
|
"LocalPath" "*"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"DepotBuildConfig"
|
"DepotBuildConfig"
|
||||||
{
|
{
|
||||||
"DepotID" "1318694"
|
"DepotID" "1318694"
|
||||||
"contentroot" "C:\work\shapez.io\tmp_standalone_files_china\shapez.io-standalonechina-win32-x64"
|
"contentroot" "C:\work\shapez\shapez.io\tmp_standalone_files_china\shapez.io-standalonechina-win32-x64"
|
||||||
"FileMapping"
|
"FileMapping"
|
||||||
{
|
{
|
||||||
"LocalPath" "*"
|
"LocalPath" "*"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"DepotBuildConfig"
|
"DepotBuildConfig"
|
||||||
{
|
{
|
||||||
"DepotID" "1318692"
|
"DepotID" "1318692"
|
||||||
"contentroot" "C:\work\shapez.io\tmp_standalone_files\shapez.io-standalone-linux-x64"
|
"contentroot" "C:\work\shapez\shapez.io\tmp_standalone_files\shapez.io-standalone-linux-x64"
|
||||||
"FileMapping"
|
"FileMapping"
|
||||||
{
|
{
|
||||||
"LocalPath" "*"
|
"LocalPath" "*"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"DepotBuildConfig"
|
"DepotBuildConfig"
|
||||||
{
|
{
|
||||||
"DepotID" "1318691"
|
"DepotID" "1318691"
|
||||||
"contentroot" "C:\work\shapez.io\tmp_standalone_files\shapez.io-standalone-win32-x64"
|
"contentroot" "C:\work\shapez\shapez.io\tmp_standalone_files\shapez.io-standalone-win32-x64"
|
||||||
"FileMapping"
|
"FileMapping"
|
||||||
{
|
{
|
||||||
"LocalPath" "*"
|
"LocalPath" "*"
|
||||||
|
@ -105,6 +105,10 @@ export class SteamAchievementProvider extends AchievementProviderInterface {
|
|||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (G_WEGAME_VERSION) {
|
||||||
|
return Promise.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
this.ipc = getIPCRenderer();
|
this.ipc = getIPCRenderer();
|
||||||
|
|
||||||
return this.ipc.invoke("steam:is-initialized").then(initialized => {
|
return this.ipc.invoke("steam:is-initialized").then(initialized => {
|
||||||
@ -125,6 +129,10 @@ export class SteamAchievementProvider extends AchievementProviderInterface {
|
|||||||
activate(key) {
|
activate(key) {
|
||||||
let promise;
|
let promise;
|
||||||
|
|
||||||
|
if (G_WEGAME_VERSION) {
|
||||||
|
return Promise.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.initialized) {
|
if (!this.initialized) {
|
||||||
promise = Promise.resolve();
|
promise = Promise.resolve();
|
||||||
} else {
|
} else {
|
||||||
|
@ -7,6 +7,24 @@ const logger = createLogger("electron-storage");
|
|||||||
export class StorageImplElectron extends StorageInterface {
|
export class StorageImplElectron extends StorageInterface {
|
||||||
constructor(app) {
|
constructor(app) {
|
||||||
super(app);
|
super(app);
|
||||||
|
|
||||||
|
/** @type {Object.<number, {resolve:Function, reject: Function}>} */
|
||||||
|
this.jobs = {};
|
||||||
|
this.jobId = 0;
|
||||||
|
|
||||||
|
getIPCRenderer().on("fs-response", (event, arg) => {
|
||||||
|
const id = arg.id;
|
||||||
|
if (!this.jobs[id]) {
|
||||||
|
logger.warn("Got unhandled FS response, job not known:", id);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const { resolve, reject } = this.jobs[id];
|
||||||
|
if (arg.result.success) {
|
||||||
|
resolve(arg.result.data);
|
||||||
|
} else {
|
||||||
|
reject(arg.result.error);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initialize() {
|
initialize() {
|
||||||
@ -15,52 +33,42 @@ export class StorageImplElectron extends StorageInterface {
|
|||||||
|
|
||||||
writeFileAsync(filename, contents) {
|
writeFileAsync(filename, contents) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getIPCRenderer()
|
// ipcMain
|
||||||
.invoke("fs-job", {
|
const jobId = ++this.jobId;
|
||||||
|
this.jobs[jobId] = { resolve, reject };
|
||||||
|
|
||||||
|
getIPCRenderer().send("fs-job", {
|
||||||
type: "write",
|
type: "write",
|
||||||
filename,
|
filename,
|
||||||
contents,
|
contents,
|
||||||
})
|
id: jobId,
|
||||||
.then(result => {
|
|
||||||
if (result.success) {
|
|
||||||
resolve(result.data);
|
|
||||||
} else {
|
|
||||||
reject(result.error);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
readFileAsync(filename) {
|
readFileAsync(filename) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getIPCRenderer()
|
// ipcMain
|
||||||
.invoke("fs-job", {
|
const jobId = ++this.jobId;
|
||||||
|
this.jobs[jobId] = { resolve, reject };
|
||||||
|
|
||||||
|
getIPCRenderer().send("fs-job", {
|
||||||
type: "read",
|
type: "read",
|
||||||
filename,
|
filename,
|
||||||
})
|
id: jobId,
|
||||||
.then(result => {
|
|
||||||
if (result.success) {
|
|
||||||
resolve(result.data);
|
|
||||||
} else {
|
|
||||||
reject(result.error);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteFileAsync(filename) {
|
deleteFileAsync(filename) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getIPCRenderer()
|
// ipcMain
|
||||||
.invoke("fs-job", {
|
const jobId = ++this.jobId;
|
||||||
|
this.jobs[jobId] = { resolve, reject };
|
||||||
|
getIPCRenderer().send("fs-job", {
|
||||||
type: "delete",
|
type: "delete",
|
||||||
filename,
|
filename,
|
||||||
})
|
id: jobId,
|
||||||
.then(result => {
|
|
||||||
if (result.success) {
|
|
||||||
resolve(result.data);
|
|
||||||
} else {
|
|
||||||
reject(result.error);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -73,6 +73,10 @@ export class PlatformWrapperImplElectron extends PlatformWrapperImplBrowser {
|
|||||||
initializeDlcStatus() {
|
initializeDlcStatus() {
|
||||||
const renderer = getIPCRenderer();
|
const renderer = getIPCRenderer();
|
||||||
|
|
||||||
|
if (G_WEGAME_VERSION) {
|
||||||
|
return Promise.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
logger.log("Checking DLC ownership ...");
|
logger.log("Checking DLC ownership ...");
|
||||||
// @todo: Don't hardcode the app id
|
// @todo: Don't hardcode the app id
|
||||||
return renderer.invoke("steam:check-app-ownership", 1625400).then(
|
return renderer.invoke("steam:check-app-ownership", 1625400).then(
|
||||||
|
@ -87,7 +87,7 @@ export class MainMenuState extends GameState {
|
|||||||
|
|
||||||
<div class="mainContainer">
|
<div class="mainContainer">
|
||||||
${
|
${
|
||||||
isSupportedBrowser()
|
G_IS_STANDALONE || isSupportedBrowser()
|
||||||
? ""
|
? ""
|
||||||
: `<div class="browserWarning">${T.mainMenu.browserWarning}</div>`
|
: `<div class="browserWarning">${T.mainMenu.browserWarning}</div>`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user