feat: support to choose install dir on win (#436)
* feat: support to choose install dir on win * force to update the draft release --------- Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
This commit is contained in:
parent
a503d757a6
commit
0d481b31ab
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
|
@ -3,34 +3,49 @@ const { FuseV1Options, FuseVersion } = require('@electron/fuses');
|
|||
|
||||
module.exports = {
|
||||
packagerConfig: {
|
||||
icon: 'api-testing.ico',
|
||||
asar: true,
|
||||
},
|
||||
rebuildConfig: {},
|
||||
makers: [
|
||||
{
|
||||
name: '@electron-forge/maker-squirrel',
|
||||
config: {},
|
||||
config: {
|
||||
icon: 'api-testing.ico'
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '@electron-forge/maker-deb',
|
||||
config: {},
|
||||
config: {
|
||||
options: {
|
||||
icon: 'api-testing.ico'
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '@electron-forge/maker-rpm',
|
||||
config: {},
|
||||
config: {
|
||||
icon: 'api-testing.ico'
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '@electron-forge/maker-dmg',
|
||||
config: {
|
||||
format: 'ULFO'
|
||||
format: 'ULFO',
|
||||
icon: 'api-testing.ico'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '@electron-forge/maker-wix',
|
||||
config: {
|
||||
language: 1033,
|
||||
manufacturer: 'API Testing Authors'
|
||||
manufacturer: 'API Testing Authors',
|
||||
icon: 'api-testing.ico'
|
||||
},
|
||||
ui: {
|
||||
"enabled": true,
|
||||
"chooseDirectory": true
|
||||
}
|
||||
}
|
||||
],
|
||||
plugins: [
|
||||
|
@ -58,7 +73,8 @@ module.exports = {
|
|||
owner: 'linuxsuren',
|
||||
name: 'api-testing'
|
||||
},
|
||||
prerelease: true
|
||||
prerelease: true,
|
||||
force: true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -9,14 +9,15 @@ const spawn = require("child_process").spawn;
|
|||
const createWindow = () => {
|
||||
// Create the browser window.
|
||||
const mainWindow = new BrowserWindow({
|
||||
width: 1000,
|
||||
width: 1024,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, 'preload.js'),
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false,
|
||||
enableRemoteModule: true
|
||||
}
|
||||
},
|
||||
icon: path.join(__dirname, '/api-testing.ico'),
|
||||
})
|
||||
|
||||
server.control(() => {
|
||||
|
@ -70,13 +71,13 @@ let serverProcess;
|
|||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
app.whenReady().then(() => {
|
||||
// const homedir = require('os').homedir();
|
||||
const homedir = require('os').homedir();
|
||||
|
||||
serverProcess = spawn("atest", [
|
||||
"server",
|
||||
"--http-port", server.getPort(),
|
||||
// TODO below setting is not working
|
||||
// "--local-storage", path.join(homedir, ".atest", "data", "*.yaml")
|
||||
"--local-storage", path.join(homedir, ".atest", "data", "*.yaml")
|
||||
]);
|
||||
|
||||
createWindow()
|
||||
|
|
Loading…
Reference in New Issue