mirror of
https://github.com/NaiboWang/EasySpider.git
synced 2025-04-23 04:34:22 +08:00
Multi-Platform Support
This commit is contained in:
parent
fe0e84f64b
commit
d0c08ccd97
@ -10,6 +10,14 @@ if (process.platform === 'win32' || process.platform === 'win64') {
|
|||||||
driverPath = path.join(__dirname, "chrome_win32/chromedriver_win32.exe");
|
driverPath = path.join(__dirname, "chrome_win32/chromedriver_win32.exe");
|
||||||
chromeBinaryPath = path.join(__dirname, "chrome_win32/chrome.exe");
|
chromeBinaryPath = path.join(__dirname, "chrome_win32/chrome.exe");
|
||||||
execute_path = path.join(__dirname, "chrome_win32/execute.bat");
|
execute_path = path.join(__dirname, "chrome_win32/execute.bat");
|
||||||
|
} else if (process.platform === 'darwin') {
|
||||||
|
driverPath = path.join(__dirname, "chrome_mac/chromedriver");
|
||||||
|
chromeBinaryPath = path.join(__dirname, "chrome_mac/Chromium.app/Contents/MacOS/Chromium");
|
||||||
|
execute_path = path.join(__dirname, "chrome_mac/execute.sh");
|
||||||
|
} else if (process.platform === 'linux') {
|
||||||
|
driverPath = path.join(__dirname, "chrome_linux/chromedriver");
|
||||||
|
chromeBinaryPath = path.join(__dirname, "chrome_linux/chrome");
|
||||||
|
execute_path = path.join(__dirname, "chrome_linux/execute.sh");
|
||||||
}
|
}
|
||||||
|
|
||||||
let server_address = "https://servicewrapper.systems";
|
let server_address = "https://servicewrapper.systems";
|
||||||
@ -146,7 +154,7 @@ function handleOpenBrowser(event) {
|
|||||||
const win = BrowserWindow.fromWebContents(webContents);
|
const win = BrowserWindow.fromWebContents(webContents);
|
||||||
runBrowser();
|
runBrowser();
|
||||||
flowchart_window = new BrowserWindow({
|
flowchart_window = new BrowserWindow({
|
||||||
width: 1440,
|
width: 1600,
|
||||||
height: 900,
|
height: 900,
|
||||||
icon: iconPath,
|
icon: iconPath,
|
||||||
});
|
});
|
||||||
|
@ -680,8 +680,8 @@ if __name__ == '__main__':
|
|||||||
driver_path = os.path.join(
|
driver_path = os.path.join(
|
||||||
os.getcwd(), "EasySpider/resources/app/chrome_win32/chromedriver_win32.exe")
|
os.getcwd(), "EasySpider/resources/app/chrome_win32/chromedriver_win32.exe")
|
||||||
elif sys.platform == "linux" and platform.architecture()[0] == "64bit":
|
elif sys.platform == "linux" and platform.architecture()[0] == "64bit":
|
||||||
options.binary_location = "EasySpider/chrome_linux64/chrome"
|
options.binary_location = "EasySpider/resources/app/chrome_linux64/chrome"
|
||||||
driver_path = "EasySpider/chrome_linux64/chromedriver_linux64"
|
driver_path = "EasySpider/resources/app/chrome_linux64/chromedriver_linux64"
|
||||||
elif sys.platform == "darwin" and platform.architecture()[0] == "64bit":
|
elif sys.platform == "darwin" and platform.architecture()[0] == "64bit":
|
||||||
options.binary_location = "EasySpider/chrome_mac64/chrome"
|
options.binary_location = "EasySpider/chrome_mac64/chrome"
|
||||||
driver_path = "EasySpider/chrome_mac64/chromedriver_mac64"
|
driver_path = "EasySpider/chrome_mac64/chromedriver_mac64"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user