mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
Added ScreenShareIndicatorFrame.exe to installer
This commit is contained in:
parent
02f741c834
commit
3cd0dc8ba3
@ -174,6 +174,7 @@
|
||||
<ROW File="Jobber.exe" Component_="Jobber.exe" FileName="Jobber.exe" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\vendor\jobber\Jobber.exe" SelfReg="false" NextFile="keyboardlayoutmanager.node" DigSign="true"/>
|
||||
<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="ScreenShareIndicatorFrame.exe" Component_="ScreenShareIndicatorFrame.exe" FileName="SCREEN~2.EXE|ScreenShareIndicatorFrame.exe" Attributes="0" SourcePath="..\..\node_modules\screen-share-indicator-frame\ScreenShareIndicatorFrame.exe" SelfReg="false" 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" NextFile="indexvalidatorx64.exe" DigSign="true"/>
|
||||
<ROW File="ScreenSnippet.exe.config" Component_="blink_image_resources_200_percent.pak" FileName="SCREEN~1.CON|ScreenSnippet.exe.config" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\screen-snippet\bin\Release\ScreenSnippet.exe.config" SelfReg="false" NextFile="v8_context_snapshot.bin"/>
|
||||
<ROW File="ScreenSnippet.resources.dll" Component_="ScreenSnippet.resources.dll" FileName="SCREEN~1.DLL|ScreenSnippet.resources.dll" Attributes="0" SourcePath="..\..\dist\win-unpacked\resources\app.asar.unpacked\node_modules\screen-snippet\bin\Release\ja-JP\ScreenSnippet.resources.dll" SelfReg="false" NextFile="ScreenSnippet.resources.dll_1"/>
|
||||
|
@ -173,6 +173,7 @@
|
||||
<ROW File="Jobber.exe" Component_="Jobber.exe" FileName="Jobber.exe" Attributes="0" SourcePath="..\..\dist\win-ia32-unpacked\resources\app.asar.unpacked\node_modules\spawn-rx\vendor\jobber\Jobber.exe" SelfReg="false" NextFile="keyboardlayoutmanager.node" DigSign="true"/>
|
||||
<ROW File="LICENSE.electron.txt" Component_="blink_image_resources_200_percent.pak" FileName="LICENS~1.TXT|LICENSE.electron.txt" Attributes="0" SourcePath="..\..\dist\win-ia32-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-ia32-unpacked\LICENSES.chromium.html" SelfReg="false" NextFile="natives_blob.bin"/>
|
||||
<ROW File="ScreenShareIndicatorFrame.exe" Component_="ScreenShareIndicatorFrame.exe" FileName="SCREEN~2.EXE|ScreenShareIndicatorFrame.exe" Attributes="0" SourcePath="..\..\dist\win-ia32-unpacked\resources\app.asar.unpacked\node_modules\screen-share-indicator-frame\ScreenShareIndicatorFrame.exe" SelfReg="false" DigSign="true"/>
|
||||
<ROW File="ScreenSnippet.exe" Component_="ScreenSnippet.exe" FileName="SCREEN~1.EXE|ScreenSnippet.exe" Attributes="0" SourcePath="..\..\dist\win-ia32-unpacked\resources\app.asar.unpacked\node_modules\screen-snippet\bin\Release\ScreenSnippet.exe" SelfReg="false" NextFile="ScreenSnippet.resources.dll" DigSign="true"/>
|
||||
<ROW File="ScreenSnippet.exe.config" Component_="blink_image_resources_200_percent.pak" FileName="SCREEN~1.CON|ScreenSnippet.exe.config" Attributes="0" SourcePath="..\..\dist\win-ia32-unpacked\resources\app.asar.unpacked\node_modules\screen-snippet\bin\Release\ScreenSnippet.exe.config" SelfReg="false" NextFile="v8_context_snapshot.bin"/>
|
||||
<ROW File="ScreenSnippet.resources.dll" Component_="ScreenSnippet.resources.dll" FileName="SCREEN~1.DLL|ScreenSnippet.resources.dll" Attributes="0" SourcePath="..\..\dist\win-ia32-unpacked\resources\app.asar.unpacked\node_modules\screen-snippet\bin\Release\en-US\ScreenSnippet.resources.dll" SelfReg="false" NextFile="ScreenSnippet.resources.dll_1"/>
|
||||
|
@ -133,6 +133,7 @@
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"screen-snippet": "git+https://github.com/symphonyoss/ScreenSnippet.git#v1.0.8",
|
||||
"screen-share-indicator-frame": "git+https://github.com/mattias-symphony/ScreenShareIndicatorFrame.git",
|
||||
"swift-search": "2.0.1"
|
||||
}
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ export class WindowHandler {
|
||||
private screenSharingFrameWindow: Electron.BrowserWindow | null = null;
|
||||
private basicAuthWindow: Electron.BrowserWindow | null = null;
|
||||
private notificationSettingsWindow: Electron.BrowserWindow | null = null;
|
||||
private child: ChildProcess | undefined;
|
||||
private screenShareIndicatorFrameUtil: string;
|
||||
|
||||
constructor(opts?: Electron.BrowserViewConstructorOptions) {
|
||||
// Use these variables only on initial setup
|
||||
@ -115,6 +115,11 @@ export class WindowHandler {
|
||||
this.isAutoReload = false;
|
||||
this.isOnline = true;
|
||||
|
||||
this.screenShareIndicatorFrameUtil = !isWindowsOS ? '' : isDevEnv
|
||||
? path.join(__dirname,
|
||||
'../../../node_modules/screen-share-indicator-frame/ScreenShareIndicatorFrame.exe')
|
||||
: path.join(path.dirname(app.getPath('exe')), 'ScreenShareIndicatorFrame.exe');
|
||||
|
||||
this.appMenu = null;
|
||||
const locale: LocaleType = (this.config.locale || app.getLocale()) as LocaleType;
|
||||
i18n.setLocale(locale);
|
||||
@ -367,7 +372,7 @@ export class WindowHandler {
|
||||
browserWindow.destroy();
|
||||
|
||||
if (isWindowsOS) {
|
||||
this.execCmd('C:\\symphony\\ScreenShareIndicatorFrame\\x64\\Release\\ScreenShareIndicatorFrame.exe', [] );
|
||||
this.execCmd(this.screenShareIndicatorFrameUtil, []);
|
||||
} else {
|
||||
if (this.screenSharingFrameWindow && windowExists(this.screenSharingFrameWindow)) {
|
||||
this.screenSharingFrameWindow.close();
|
||||
@ -520,12 +525,14 @@ export class WindowHandler {
|
||||
this.addWindow(opts.winKey, this.screenPickerWindow);
|
||||
});
|
||||
ipcMain.once('screen-source-selected', (_event, source) => {
|
||||
const str = JSON.stringify(source);
|
||||
logger.info(`window-handler: screen-source-selected, source: ${str} id: ${id}!`);
|
||||
const type = source.id.split(':')[0];
|
||||
if (type === 'window') {
|
||||
const hwnd = source.id.split(':')[1];
|
||||
this.execCmd('C:\\symphony\\ScreenShareIndicatorFrame\\x64\\Release\\ScreenShareIndicatorFrame.exe', [ hwnd ] );
|
||||
if (isWindowsOS) {
|
||||
const str = JSON.stringify(source);
|
||||
logger.info(`window-handler: screen-source-selected, source: ${str} id: ${id}!`);
|
||||
const type = source.id.split(':')[0];
|
||||
if (type === 'window') {
|
||||
const hwnd = source.id.split(':')[1];
|
||||
this.execCmd(this.screenShareIndicatorFrameUtil, [ hwnd ]);
|
||||
}
|
||||
}
|
||||
|
||||
window.send('start-share' + id, source);
|
||||
@ -728,7 +735,7 @@ export class WindowHandler {
|
||||
logger.info(`window-handler: MG element: ${str}`);
|
||||
const winX: string = element.bounds.x.toString();
|
||||
const winY: string = element.bounds.y.toString();
|
||||
this.execCmd('C:\\symphony\\ScreenShareIndicatorFrame\\x64\\Release\\ScreenShareIndicatorFrame.exe', [ winX, winY ] );
|
||||
this.execCmd(this.screenShareIndicatorFrameUtil, [ winX, winY ]);
|
||||
} else {
|
||||
this.createScrenSharingFrameWindow('screen-sharing-frame',
|
||||
element.workArea.width,
|
||||
@ -970,17 +977,13 @@ export class WindowHandler {
|
||||
/**
|
||||
* Executes the given command via a child process
|
||||
*
|
||||
* Windows: uses custom built windows screen capture tool
|
||||
* Mac OSX: uses built-in screencapture tool which has been
|
||||
* available since OSX ver 10.2.
|
||||
*
|
||||
* @param captureUtil {string}
|
||||
* @param captureUtilArgs {captureUtilArgs}
|
||||
* @example execCmd('-i -s', '/user/desktop/symphonyImage-1544025391698.png')
|
||||
* @param util {string}
|
||||
* @param utilArgs {ReadonlyArray<string>}
|
||||
*/
|
||||
private execCmd(captureUtil: string, captureUtilArgs: ReadonlyArray<string>): Promise<ChildProcess> {
|
||||
private execCmd(util: string, utilArgs: ReadonlyArray<string>): Promise<ChildProcess> {
|
||||
logger.info(`window handler: execCmd: util: ${util} utilArgs: ${utilArgs}`);
|
||||
return new Promise<ChildProcess>((resolve, reject) => {
|
||||
return this.child = execFile(captureUtil, captureUtilArgs, (error: ExecException | null) => {
|
||||
return execFile(util, utilArgs, (error: ExecException | null) => {
|
||||
if (error && error.killed) {
|
||||
// processs was killed, just resolve with no data.
|
||||
return reject(error);
|
||||
|
Loading…
Reference in New Issue
Block a user