mirror of
https://github.com/finos/SymphonyElectron.git
synced 2026-07-29 23:57:56 -05:00
@@ -47,9 +47,4 @@ rm -f $tempFilePath
|
|||||||
## For launching symphony with sandbox enabled, create a shell script that is used as the launch point for the app
|
## For launching symphony with sandbox enabled, create a shell script that is used as the launch point for the app
|
||||||
EXEC_PATH=$installPath/Symphony.app/Contents/MacOS
|
EXEC_PATH=$installPath/Symphony.app/Contents/MacOS
|
||||||
exec $EXEC_PATH/Symphony --install $newPath
|
exec $EXEC_PATH/Symphony --install $newPath
|
||||||
mv $EXEC_PATH/Symphony $EXEC_PATH/Symphony-bin
|
chmod 755 $EXEC_PATH/Symphony
|
||||||
cat > $EXEC_PATH/Symphony << EOT
|
|
||||||
#!/bin/sh
|
|
||||||
exec "\${0%/*}/Symphony-bin" --enable-sandbox \$@
|
|
||||||
EOT
|
|
||||||
chmod 755 $EXEC_PATH/Symphony
|
|
||||||
|
|||||||
@@ -57,7 +57,6 @@
|
|||||||
<ROW Component="Symphony" ComponentId="{A6B4BA2F-2403-4B8E-9303-BF8400A9B1C4}" Directory_="Symphony_Dir" Attributes="0"/>
|
<ROW Component="Symphony" ComponentId="{A6B4BA2F-2403-4B8E-9303-BF8400A9B1C4}" Directory_="Symphony_Dir" Attributes="0"/>
|
||||||
<ROW Component="Symphony.config" ComponentId="{644A231D-2C96-4D3D-ADB0-7820DA373499}" Directory_="config_Dir" Attributes="0" KeyPath="Symphony.config_1" Type="0"/>
|
<ROW Component="Symphony.config" ComponentId="{644A231D-2C96-4D3D-ADB0-7820DA373499}" Directory_="config_Dir" Attributes="0" KeyPath="Symphony.config_1" Type="0"/>
|
||||||
<ROW Component="Symphony.exe" ComponentId="{853053E4-D96C-42FE-9AF1-52FF1F449FFD}" Directory_="APPDIR" Attributes="256" KeyPath="Symphony.exe"/>
|
<ROW Component="Symphony.exe" ComponentId="{853053E4-D96C-42FE-9AF1-52FF1F449FFD}" Directory_="APPDIR" Attributes="256" KeyPath="Symphony.exe"/>
|
||||||
<ROW Component="SymphonyElectron.exe" ComponentId="{050ABDCB-63C1-46C4-8E40-B3C80931C3DA}" Directory_="APPDIR" Attributes="256" KeyPath="SymphonyElectron.exe"/>
|
|
||||||
<ROW Component="am.pak" ComponentId="{76F935B8-6077-4C7A-AD1B-77E2DBA856CC}" Directory_="locales_Dir" Attributes="0" KeyPath="am.pak" Type="0"/>
|
<ROW Component="am.pak" ComponentId="{76F935B8-6077-4C7A-AD1B-77E2DBA856CC}" Directory_="locales_Dir" Attributes="0" KeyPath="am.pak" Type="0"/>
|
||||||
<ROW Component="appupdate.yml" ComponentId="{F7586760-660A-4C38-8937-138DBEC18D34}" Directory_="resources_Dir" Attributes="0" KeyPath="appupdate.yml" Type="0"/>
|
<ROW Component="appupdate.yml" ComponentId="{F7586760-660A-4C38-8937-138DBEC18D34}" Directory_="resources_Dir" Attributes="0" KeyPath="appupdate.yml" Type="0"/>
|
||||||
<ROW Component="blink_image_resources_200_percent.pak" ComponentId="{56AB17A5-B690-4CBE-A39D-512381AAAFE1}" Directory_="APPDIR" Attributes="0" KeyPath="blink_image_resources_200_percent.pak" Type="0"/>
|
<ROW Component="blink_image_resources_200_percent.pak" ComponentId="{56AB17A5-B690-4CBE-A39D-512381AAAFE1}" Directory_="APPDIR" Attributes="0" KeyPath="blink_image_resources_200_percent.pak" Type="0"/>
|
||||||
@@ -69,16 +68,15 @@
|
|||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
||||||
<ROW Feature="D564007E3BBE4F85950A09B470A7CA65" Title="Visual C++ Redistributable for Visual Studio 2013 x86" Description="Visual C++ Redistributable for Visual Studio 2013 x86" Display="3" Level="1" Attributes="0" Components="AI_CustomARPName"/>
|
<ROW Feature="D564007E3BBE4F85950A09B470A7CA65" Title="Visual C++ Redistributable for Visual Studio 2013 x86" Description="Visual C++ Redistributable for Visual Studio 2013 x86" Display="3" Level="1" Attributes="0" Components="AI_CustomARPName"/>
|
||||||
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_CustomARPName PodUrl ProductInformation ScreenSnippet.exe Symphony Symphony.config Symphony.exe SymphonyElectron.exe am.pak appupdate.yml blink_image_resources_200_percent.pak d3dcompiler_47.dll ffmpeg.dll libEGL.dll libGLESv2.dll node.dll"/>
|
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_CustomARPName PodUrl ProductInformation ScreenSnippet.exe Symphony Symphony.config Symphony.exe am.pak appupdate.yml blink_image_resources_200_percent.pak d3dcompiler_47.dll ffmpeg.dll libEGL.dll libGLESv2.dll node.dll"/>
|
||||||
<ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
|
<ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
||||||
<ROW File="LICENSE.electron.txt" Component_="blink_image_resources_200_percent.pak" FileName="LICENS~1.TXT|LICENSE.electron.txt" Attributes="0" SourcePath="..\..\dist\win-unpacked\LICENSE.electron.txt" SelfReg="false" NextFile="LICENSES.chromium.html"/>
|
<ROW File="LICENSE.electron.txt" Component_="blink_image_resources_200_percent.pak" FileName="LICENS~1.TXT|LICENSE.electron.txt" Attributes="0" SourcePath="..\..\dist\win-unpacked\LICENSE.electron.txt" SelfReg="false" NextFile="LICENSES.chromium.html"/>
|
||||||
<ROW File="LICENSES.chromium.html" Component_="blink_image_resources_200_percent.pak" FileName="LICENS~1.HTM|LICENSES.chromium.html" Attributes="0" SourcePath="..\..\dist\win-unpacked\LICENSES.chromium.html" SelfReg="false" NextFile="natives_blob.bin"/>
|
<ROW File="LICENSES.chromium.html" Component_="blink_image_resources_200_percent.pak" FileName="LICENS~1.HTM|LICENSES.chromium.html" Attributes="0" SourcePath="..\..\dist\win-unpacked\LICENSES.chromium.html" SelfReg="false" NextFile="natives_blob.bin"/>
|
||||||
<ROW File="ScreenSnippet.exe" Component_="ScreenSnippet.exe" FileName="SCREEN~1.EXE|ScreenSnippet.exe" Attributes="0" SourcePath="..\..\node_modules\screen-snippet\bin\Release\ScreenSnippet.exe" SelfReg="false" NextFile="SymphonyElectron.exe" DigSign="true"/>
|
<ROW File="ScreenSnippet.exe" Component_="ScreenSnippet.exe" FileName="SCREEN~1.EXE|ScreenSnippet.exe" Attributes="0" SourcePath="..\..\node_modules\screen-snippet\bin\Release\ScreenSnippet.exe" SelfReg="false" DigSign="true"/>
|
||||||
<ROW File="Symphony.config_1" Component_="Symphony.config" FileName="SYMPHO~1.CON|Symphony.config" Attributes="0" SourcePath="..\..\dist\win-unpacked\config\Symphony.config" SelfReg="false" NextFile="ScreenSnippet.exe"/>
|
<ROW File="Symphony.config_1" Component_="Symphony.config" FileName="SYMPHO~1.CON|Symphony.config" Attributes="0" SourcePath="..\..\dist\win-unpacked\config\Symphony.config" SelfReg="false" NextFile="ScreenSnippet.exe"/>
|
||||||
<ROW File="Symphony.exe" Component_="Symphony.exe" FileName="Symphony.exe" Attributes="0" SourcePath="Symphony.exe" SelfReg="false" NextFile="ui_resources_200_percent.pak" DigSign="true"/>
|
<ROW File="Symphony.exe" Component_="Symphony.exe" FileName="Symphony.exe" Attributes="0" SourcePath="..\..\dist\win-unpacked\Symphony.exe" SelfReg="false" NextFile="ui_resources_200_percent.pak" DigSign="true"/>
|
||||||
<ROW File="SymphonyElectron.exe" Component_="SymphonyElectron.exe" FileName="SYMPHO~1.EXE|Symphony-Electron.exe" Attributes="0" SourcePath="..\..\dist\win-unpacked\Symphony-Electron.exe" SelfReg="false" DigSign="true"/>
|
|
||||||
<ROW File="am.pak" Component_="am.pak" FileName="am.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\am.pak" SelfReg="false" NextFile="ar.pak"/>
|
<ROW File="am.pak" Component_="am.pak" FileName="am.pak" Attributes="0" SourcePath="..\..\dist\win-unpacked\locales\am.pak" SelfReg="false" NextFile="ar.pak"/>
|
||||||
<ROW File="app.asar" Component_="appupdate.yml" FileName="APP~1.ASA|app.asar" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar" SelfReg="false" NextFile="electron.asar"/>
|
<ROW File="app.asar" Component_="appupdate.yml" FileName="APP~1.ASA|app.asar" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar" SelfReg="false" NextFile="electron.asar"/>
|
||||||
<ROW File="appupdate.yml" Component_="appupdate.yml" FileName="APP-UP~1.YML|app-update.yml" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app-update.yml" SelfReg="false" NextFile="app.asar"/>
|
<ROW File="appupdate.yml" Component_="appupdate.yml" FileName="APP-UP~1.YML|app-update.yml" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app-update.yml" SelfReg="false" NextFile="app.asar"/>
|
||||||
@@ -362,7 +360,7 @@
|
|||||||
<ROW Action="SET_APPDIR" Type="307" Source="APPDIR" Target="[ProgramFilesFolder][Manufacturer]\[ProductName]" MultiBuildTarget="DefaultBuild:[AI_UserProgramFiles][Manufacturer]\[ProductName]"/>
|
<ROW Action="SET_APPDIR" Type="307" Source="APPDIR" Target="[ProgramFilesFolder][Manufacturer]\[ProductName]" MultiBuildTarget="DefaultBuild:[AI_UserProgramFiles][Manufacturer]\[ProductName]"/>
|
||||||
<ROW Action="SET_SHORTCUTDIR" Type="307" Source="SHORTCUTDIR" Target="[ProgramMenuFolder][ProductName]"/>
|
<ROW Action="SET_SHORTCUTDIR" Type="307" Source="SHORTCUTDIR" Target="[ProgramMenuFolder][ProductName]"/>
|
||||||
<ROW Action="SET_TARGETDIR_TO_APPDIR" Type="51" Source="TARGETDIR" Target="[APPDIR]"/>
|
<ROW Action="SET_TARGETDIR_TO_APPDIR" Type="51" Source="TARGETDIR" Target="[APPDIR]"/>
|
||||||
<ROW Action="Symphony.exe" Type="1042" Source="SymphonyElectron.exe" Target="--install"/>
|
<ROW Action="Symphony.exe" Type="1042" Source="Symphony.exe" Target="--install"/>
|
||||||
<ROW Action="UninstallPreviousVersions" Type="1" Source="aicustact.dll" Target="UninstallPreviousVersions" Options="1"/>
|
<ROW Action="UninstallPreviousVersions" Type="1" Source="aicustact.dll" Target="UninstallPreviousVersions" Options="1"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ let externalDisplay;
|
|||||||
// user selected display id for notification
|
// user selected display id for notification
|
||||||
let displayId;
|
let displayId;
|
||||||
|
|
||||||
|
let sandboxed = false;
|
||||||
|
|
||||||
let config = {
|
let config = {
|
||||||
// corner to put notifications
|
// corner to put notifications
|
||||||
// upper-right, upper-left, lower-right, lower-left
|
// upper-right, upper-left, lower-right, lower-left
|
||||||
@@ -131,7 +133,7 @@ let config = {
|
|||||||
acceptFirstMouse: true,
|
acceptFirstMouse: true,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
preload: path.join(__dirname, 'electron-notify-preload.js'),
|
preload: path.join(__dirname, 'electron-notify-preload.js'),
|
||||||
sandbox: !isNodeEnv,
|
sandbox: sandboxed,
|
||||||
nodeIntegration: isNodeEnv
|
nodeIntegration: isNodeEnv
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ let configurationWindow;
|
|||||||
let screens;
|
let screens;
|
||||||
let position;
|
let position;
|
||||||
let display;
|
let display;
|
||||||
|
let sandboxed = false;
|
||||||
|
|
||||||
let windowConfig = {
|
let windowConfig = {
|
||||||
width: 460,
|
width: 460,
|
||||||
@@ -27,7 +28,7 @@ let windowConfig = {
|
|||||||
resizable: false,
|
resizable: false,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
preload: path.join(__dirname, 'configure-notification-position-preload.js'),
|
preload: path.join(__dirname, 'configure-notification-position-preload.js'),
|
||||||
sandbox: true,
|
sandbox: sandboxed,
|
||||||
nodeIntegration: false
|
nodeIntegration: false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+6
-1
@@ -37,6 +37,7 @@ let boundsChangeWindow;
|
|||||||
let alwaysOnTop = false;
|
let alwaysOnTop = false;
|
||||||
let position = 'lower-right';
|
let position = 'lower-right';
|
||||||
let display;
|
let display;
|
||||||
|
let sandboxed = false;
|
||||||
|
|
||||||
// note: this file is built using browserify in prebuild step.
|
// note: this file is built using browserify in prebuild step.
|
||||||
const preloadMainScript = path.join(__dirname, 'preload/_preloadMain.js');
|
const preloadMainScript = path.join(__dirname, 'preload/_preloadMain.js');
|
||||||
@@ -81,9 +82,10 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
|||||||
minHeight: MIN_HEIGHT,
|
minHeight: MIN_HEIGHT,
|
||||||
alwaysOnTop: false,
|
alwaysOnTop: false,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
sandbox: !isNodeEnv,
|
sandbox: sandboxed,
|
||||||
nodeIntegration: isNodeEnv,
|
nodeIntegration: isNodeEnv,
|
||||||
preload: preloadMainScript,
|
preload: preloadMainScript,
|
||||||
|
nativeWindowOpen: true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -212,6 +214,9 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
|||||||
// bug in electron is preventing this from working in sandboxed evt...
|
// bug in electron is preventing this from working in sandboxed evt...
|
||||||
// https://github.com/electron/electron/issues/8841
|
// https://github.com/electron/electron/issues/8841
|
||||||
mainWindow.webContents.on('will-navigate', function(event, willNavUrl) {
|
mainWindow.webContents.on('will-navigate', function(event, willNavUrl) {
|
||||||
|
if (!sandboxed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
openUrlInDefaultBrower(willNavUrl);
|
openUrlInDefaultBrower(willNavUrl);
|
||||||
});
|
});
|
||||||
|
|||||||
+4
-3
@@ -10,8 +10,9 @@
|
|||||||
"demo-win": "npm run prebuild && cross-env ELECTRON_DEV=true electron . --url=file:///demo/index.html",
|
"demo-win": "npm run prebuild && cross-env ELECTRON_DEV=true electron . --url=file:///demo/index.html",
|
||||||
"demo-mac": "npm run prebuild && cross-env ELECTRON_DEV=true electron . --url=file://$(pwd)/demo/index.html",
|
"demo-mac": "npm run prebuild && cross-env ELECTRON_DEV=true electron . --url=file://$(pwd)/demo/index.html",
|
||||||
"unpacked-mac": "npm run prebuild && npm run test && build --mac --dir",
|
"unpacked-mac": "npm run prebuild && npm run test && build --mac --dir",
|
||||||
"unpacked-win": "npm run prebuild && npm run test && build --win --x64 --dir && npm run rename-exe",
|
"packed-mac": "npm run unpacked-mac && packagesbuild -v installer/mac/symphony-mac-packager.pkgproj",
|
||||||
"unpacked-win-x86": "npm run prebuild && npm run test && build --win --ia32 --dir && npm run rename-exe",
|
"unpacked-win": "npm run prebuild && npm run test && build --win --x64 --dir",
|
||||||
|
"unpacked-win-x86": "npm run prebuild && npm run test && build --win --ia32",
|
||||||
"prebuild": "npm run rebuild && npm run browserify-preload",
|
"prebuild": "npm run rebuild && npm run browserify-preload",
|
||||||
"browserify-preload": "browserify -o js/preload/_preloadMain.js -x electron --insert-global-vars=__filename,__dirname js/preload/preloadMain.js",
|
"browserify-preload": "browserify -o js/preload/_preloadMain.js -x electron --insert-global-vars=__filename,__dirname js/preload/preloadMain.js",
|
||||||
"rebuild": "electron-rebuild -f",
|
"rebuild": "electron-rebuild -f",
|
||||||
@@ -69,7 +70,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"browserify": "^14.1.0",
|
"browserify": "^14.1.0",
|
||||||
"cross-env": "^3.2.4",
|
"cross-env": "^3.2.4",
|
||||||
"electron": "1.6.11",
|
"electron": "1.7.5",
|
||||||
"electron-builder": "^13.9.0",
|
"electron-builder": "^13.9.0",
|
||||||
"electron-builder-squirrel-windows": "^12.3.0",
|
"electron-builder-squirrel-windows": "^12.3.0",
|
||||||
"electron-packager": "^8.5.2",
|
"electron-packager": "^8.5.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user