#36: Add ability to select Linux distribution type if OS is unsupported - partial

This commit is contained in:
2019-08-28 18:58:43 -05:00
parent 0671a39809
commit 0105602a44
11 changed files with 194 additions and 38 deletions

View File

@@ -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();
});