Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
fix: lol process name
Browse files Browse the repository at this point in the history
  • Loading branch information
sekwah41 committed Mar 27, 2023
1 parent 045e0f6 commit f820758
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
--- src/original/moba-desktop/src/dialogs/select-game-folder-dialog.js
+++ src/modified/moba-desktop/src/dialogs/select-game-folder-dialog.js
@@ -11,21 +11,44 @@
Object.defineProperty(exports, "__esModule", { value: true });
@@ -12,22 +12,43 @@
exports.showSelectLolClientFolderDialog = void 0;
const ipc_messages_types_1 = require("../../../moba-shared/src/common/types/desktop/ipc-messages.types");
-const remote_1 = require("@electron/remote");
+const remote_1 = require("@electron/remote/main");
const remote_1 = require("@electron/remote");
+const prompt = require('electron-prompt');
const ipc_renderer_1 = require("../utils/ipc-renderer");
function showSelectLolClientFolderDialog(window) {
Expand Down Expand Up @@ -46,11 +44,12 @@
if (!result.canceled) {
const folder = result.filePaths ? result.filePaths[0] : null;
const setupResult = yield ipc_renderer_1.ipcRendererInvoke(ipc_messages_types_1.IPC_MESSAGE.SET_GAME_FOLDER_PATH, folder);
+ alert("Folder set to: " + JSON.stringify(result) + setupResult);
if (!setupResult) {
alert('Invalid game folder, please, try again.');
- alert('Invalid game folder, please, try again.');
return null;
@@ -46,4 +69,4 @@
}
return folder;
@@ -46,4 +67,4 @@
}
}
exports.showSelectLolClientFolderDialog = showSelectLolClientFolderDialog;
Expand Down
9 changes: 0 additions & 9 deletions patches/moba-desktop/src/utils/desktop-bridge.js.diff
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
--- src/original/moba-desktop/src/utils/desktop-bridge.js
+++ src/modified/moba-desktop/src/utils/desktop-bridge.js
@@ -22,7 +22,7 @@
exports.bridge = void 0;
const os = __importStar(require("os"));
const path = __importStar(require("path"));
-const remote_1 = require("@electron/remote");
+const remote_1 = require("@electron/remote/main");
const select_game_folder_dialog_1 = require("../dialogs/select-game-folder-dialog");
const ipc_renderer_1 = require("./ipc-renderer");
const select_folder_dialog_1 = require("../dialogs/select-folder-dialog");
@@ -32,8 +32,9 @@
exports.bridge = {
version: remote_1.app.getVersion() === '0.0.1' ? version_const_1.DEV_DESKTOP_APP_VERSION : remote_1.app.getVersion(),
Expand Down
11 changes: 7 additions & 4 deletions patches/moba-desktop/src/utils/environment.js.diff
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
--- src/original/moba-desktop/src/utils/environment.js
+++ src/modified/moba-desktop/src/utils/environment.js
@@ -24,6 +24,7 @@
@@ -24,15 +24,16 @@
exports.APP_USER_MODEL_ID = 'MobalyticsHQ.DesktopApp';
exports.isOsX = process.platform === 'darwin';
exports.isWin = process.platform === 'win32';
+exports.isLinux = process.platform === 'linux';
exports.isX64 = process.arch === 'x64';
exports.IS_JEST_TESTING = process.env.JEST_WORKER_ID !== undefined;
exports.IS_ELECTRON_DEV = require('electron-is-dev');
@@ -32,7 +33,7 @@
exports.LolProcessName = exports.isWin ? exports.LoLProcessNameWin : exports.LoLProcessNameMac;
-exports.IS_ELECTRON_DEV = require('electron-is-dev');
+exports.IS_ELECTRON_DEV = require('electron-is-dev') || process.env.FORCE_ELECTRON_DEV === 'true'
exports.LoLProcessNameWin = 'LeagueClient.exe';
exports.LoLProcessNameMac = 'LeagueClient.app';
-exports.LolProcessName = exports.isWin ? exports.LoLProcessNameWin : exports.LoLProcessNameMac;
+exports.LolProcessName = (exports.isWin || exports.isLinux) ? exports.LoLProcessNameWin : exports.LoLProcessNameMac;
exports.RiotClientNameWin = 'RiotClientServices.exe';
exports.RiotClientNameMac = '';
-exports.RiotClientName = exports.isWin ? exports.RiotClientNameWin : exports.RiotClientNameMac;
Expand Down
10 changes: 9 additions & 1 deletion patches/moba-desktop/src/utils/lcu-connection.js.diff
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
--- src/original/moba-desktop/src/utils/lcu-connection.js
+++ src/modified/moba-desktop/src/utils/lcu-connection.js
@@ -124,4 +124,4 @@
@@ -113,6 +113,7 @@
exports.getLCUPathFromFs = getLCUPathFromFs;
function isValidLCUPath(dirPath) {
return __awaiter(this, void 0, void 0, function* () {
+ console.log(dirPath, environment_1.LolProcessName);
if (!dirPath)
return false;
try {
@@ -124,4 +125,4 @@
});
}
exports.isValidLCUPath = isValidLCUPath;
Expand Down
7 changes: 5 additions & 2 deletions patches/moba-desktop/src/windows/main/main.window.js.diff
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
let mainWindow;
let appWindowState;
function getMainWindowState() {
@@ -73,11 +74,13 @@
@@ -71,13 +72,16 @@
preload: path.join(__dirname, 'main.preload.js'),
nodeIntegration: false,
contextIsolation: false,
+ sandbox: false,
webSecurity: true,
allowRunningInsecureContent: false,
+ enableRemoteModule: true,
Expand All @@ -22,7 +25,7 @@
frame: false,
titleBarStyle: 'hidden',
maximizable: true,
@@ -92,6 +95,8 @@
@@ -92,6 +96,8 @@
mainWindow.focus();
}
});
Expand Down

0 comments on commit f820758

Please sign in to comment.