#36: Add ability to select Linux distribution type if OS is unsupported - partial
This commit is contained in:
@@ -284,6 +284,7 @@ const saveUiSettings = () => {
|
||||
try {
|
||||
fs.writeFileSync(settingFile, JSON.stringify({
|
||||
launch_hidden: launchHidden,
|
||||
platform_override: platformOverride,
|
||||
}), 'utf-8');
|
||||
} catch (e) {
|
||||
}
|
||||
@@ -662,7 +663,7 @@ ipcMain.on(Constants.IPC_Get_Platform, (event) => {
|
||||
const platform = os.platform();
|
||||
if (platform === 'linux') {
|
||||
if (platformOverride && (platformOverride.trim().length > 0)) {
|
||||
sendResponse(platformOverride, 'linux');
|
||||
sendResponse(platformOverride.trim(), 'linux');
|
||||
} else {
|
||||
const scriptFile = path.join(os.tmpdir(), 'repertory_detect_linux.sh');
|
||||
fs.writeFileSync(scriptFile, detectScript);
|
||||
@@ -948,6 +949,12 @@ ipcMain.on(Constants.IPC_Set_Config_Values, (event, data) => {
|
||||
setConfigValue(0);
|
||||
});
|
||||
|
||||
ipcMain.on(Constants.IPC_Set_Linux_AppPlatform, (event, data) => {
|
||||
platformOverride = data.AppPlatform;
|
||||
saveUiSettings();
|
||||
event.returnValue = true;
|
||||
});
|
||||
|
||||
ipcMain.on(Constants.IPC_Shutdown, () => {
|
||||
closeApplication();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user