From f881c549c243cebb017f8fb0686590ae94236ae7 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 8 Feb 2020 00:55:31 +0100 Subject: [PATCH] Changes of Linux ptb v0.0.17 --- appasar/ptb/app_bootstrap/autoStart/linux.js | 3 +- appasar/ptb/app_bootstrap/singleInstance.js | 4 +- appasar/ptb/app_bootstrap/splash/index.js | 8 +- electronasar/ptb/browser/api/app.js | 87 ---- electronasar/ptb/browser/api/auto-updater.js | 7 - .../api/auto-updater/auto-updater-native.js | 7 - .../api/auto-updater/auto-updater-win.js | 70 --- .../api/auto-updater/squirrel-update-win.js | 106 ---- electronasar/ptb/browser/api/browser-view.js | 12 - .../ptb/browser/api/browser-window.js | 170 ------ .../ptb/browser/api/content-tracing.js | 11 - .../ptb/browser/api/crash-reporter.js | 9 - electronasar/ptb/browser/api/dialog.js | 183 ------- .../ptb/browser/api/exports/electron.js | 18 - .../ptb/browser/api/global-shortcut.js | 2 - .../ptb/browser/api/in-app-purchase.js | 21 - electronasar/ptb/browser/api/ipc-main.js | 7 - .../ptb/browser/api/menu-item-roles.js | 308 ----------- electronasar/ptb/browser/api/menu-item.js | 73 --- electronasar/ptb/browser/api/menu-utils.js | 154 ------ electronasar/ptb/browser/api/menu.js | 262 ---------- electronasar/ptb/browser/api/module-list.js | 35 -- electronasar/ptb/browser/api/net-log.js | 27 - electronasar/ptb/browser/api/net.js | 357 ------------- electronasar/ptb/browser/api/notification.js | 6 - electronasar/ptb/browser/api/power-monitor.js | 42 -- .../ptb/browser/api/power-save-blocker.js | 2 - electronasar/ptb/browser/api/protocol.js | 26 - electronasar/ptb/browser/api/screen.js | 7 - electronasar/ptb/browser/api/session.js | 40 -- .../ptb/browser/api/system-preferences.js | 7 - .../ptb/browser/api/top-level-window.js | 19 - electronasar/ptb/browser/api/touch-bar.js | 310 ----------- electronasar/ptb/browser/api/tray.js | 8 - electronasar/ptb/browser/api/view.js | 7 - .../ptb/browser/api/web-contents-view.js | 10 - electronasar/ptb/browser/api/web-contents.js | 446 ---------------- electronasar/ptb/browser/chrome-extension.js | 489 ------------------ .../ptb/browser/crash-reporter-init.js | 22 - electronasar/ptb/browser/default-menu.js | 49 -- electronasar/ptb/browser/desktop-capturer.js | 85 --- electronasar/ptb/browser/devtools.js | 92 ---- .../ptb/browser/guest-view-manager.js | 364 ------------- .../ptb/browser/guest-window-manager.js | 330 ------------ electronasar/ptb/browser/init.js | 186 ------- .../ptb/browser/ipc-main-internal-utils.js | 52 -- electronasar/ptb/browser/ipc-main-internal.js | 7 - .../ptb/browser/navigation-controller.js | 224 -------- electronasar/ptb/browser/objects-registry.js | 120 ----- electronasar/ptb/browser/rpc-server.js | 481 ----------------- electronasar/ptb/common/api/clipboard.js | 25 - electronasar/ptb/common/api/deprecate.js | 186 ------- electronasar/ptb/common/api/deprecations.js | 8 - .../ptb/common/api/exports/electron.js | 33 -- electronasar/ptb/common/api/is-promise.js | 11 - electronasar/ptb/common/api/module-list.js | 11 - electronasar/ptb/common/api/native-image.js | 3 - electronasar/ptb/common/api/shell.js | 2 - electronasar/ptb/common/atom-binding-setup.js | 18 - electronasar/ptb/common/buffer-utils.js | 63 --- electronasar/ptb/common/clipboard-utils.js | 49 -- electronasar/ptb/common/crash-reporter.js | 77 --- electronasar/ptb/common/error-utils.js | 36 -- electronasar/ptb/common/init.js | 60 --- .../ptb/common/parse-features-string.js | 19 - electronasar/ptb/common/reset-search-paths.js | 43 -- electronasar/ptb/common/web-view-methods.js | 68 --- .../ptb/renderer/api/crash-reporter.js | 9 - .../ptb/renderer/api/desktop-capturer.js | 37 -- .../ptb/renderer/api/exports/electron.js | 20 - electronasar/ptb/renderer/api/ipc-renderer.js | 22 - electronasar/ptb/renderer/api/module-list.js | 17 - electronasar/ptb/renderer/api/remote.js | 339 ------------ electronasar/ptb/renderer/api/web-frame.js | 81 --- .../ptb/renderer/callbacks-registry.js | 51 -- electronasar/ptb/renderer/chrome-api.js | 173 ------- .../ptb/renderer/content-scripts-injector.js | 108 ---- electronasar/ptb/renderer/extensions/event.js | 21 - electronasar/ptb/renderer/extensions/i18n.js | 52 -- .../ptb/renderer/extensions/storage.js | 87 ---- .../ptb/renderer/extensions/web-navigation.js | 18 - electronasar/ptb/renderer/init.js | 175 ------- electronasar/ptb/renderer/inspector.js | 52 -- .../renderer/ipc-renderer-internal-utils.js | 41 -- .../ptb/renderer/ipc-renderer-internal.js | 19 - .../ptb/renderer/security-warnings.js | 238 --------- electronasar/ptb/renderer/web-frame-init.js | 13 - .../renderer/web-view/guest-view-internal.js | 110 ---- .../renderer/web-view/web-view-attributes.js | 250 --------- .../renderer/web-view/web-view-constants.js | 2 - .../ptb/renderer/web-view/web-view-element.js | 101 ---- .../ptb/renderer/web-view/web-view-impl.js | 232 --------- .../ptb/renderer/web-view/web-view-init.js | 32 -- electronasar/ptb/renderer/window-setup.js | 246 --------- electronasar/ptb/worker/init.js | 29 -- 95 files changed, 8 insertions(+), 8651 deletions(-) delete mode 100644 electronasar/ptb/browser/api/app.js delete mode 100644 electronasar/ptb/browser/api/auto-updater.js delete mode 100644 electronasar/ptb/browser/api/auto-updater/auto-updater-native.js delete mode 100644 electronasar/ptb/browser/api/auto-updater/auto-updater-win.js delete mode 100644 electronasar/ptb/browser/api/auto-updater/squirrel-update-win.js delete mode 100644 electronasar/ptb/browser/api/browser-view.js delete mode 100644 electronasar/ptb/browser/api/browser-window.js delete mode 100644 electronasar/ptb/browser/api/content-tracing.js delete mode 100644 electronasar/ptb/browser/api/crash-reporter.js delete mode 100644 electronasar/ptb/browser/api/dialog.js delete mode 100644 electronasar/ptb/browser/api/exports/electron.js delete mode 100644 electronasar/ptb/browser/api/global-shortcut.js delete mode 100644 electronasar/ptb/browser/api/in-app-purchase.js delete mode 100644 electronasar/ptb/browser/api/ipc-main.js delete mode 100644 electronasar/ptb/browser/api/menu-item-roles.js delete mode 100644 electronasar/ptb/browser/api/menu-item.js delete mode 100644 electronasar/ptb/browser/api/menu-utils.js delete mode 100644 electronasar/ptb/browser/api/menu.js delete mode 100644 electronasar/ptb/browser/api/module-list.js delete mode 100644 electronasar/ptb/browser/api/net-log.js delete mode 100644 electronasar/ptb/browser/api/net.js delete mode 100644 electronasar/ptb/browser/api/notification.js delete mode 100644 electronasar/ptb/browser/api/power-monitor.js delete mode 100644 electronasar/ptb/browser/api/power-save-blocker.js delete mode 100644 electronasar/ptb/browser/api/protocol.js delete mode 100644 electronasar/ptb/browser/api/screen.js delete mode 100644 electronasar/ptb/browser/api/session.js delete mode 100644 electronasar/ptb/browser/api/system-preferences.js delete mode 100644 electronasar/ptb/browser/api/top-level-window.js delete mode 100644 electronasar/ptb/browser/api/touch-bar.js delete mode 100644 electronasar/ptb/browser/api/tray.js delete mode 100644 electronasar/ptb/browser/api/view.js delete mode 100644 electronasar/ptb/browser/api/web-contents-view.js delete mode 100644 electronasar/ptb/browser/api/web-contents.js delete mode 100644 electronasar/ptb/browser/chrome-extension.js delete mode 100644 electronasar/ptb/browser/crash-reporter-init.js delete mode 100644 electronasar/ptb/browser/default-menu.js delete mode 100644 electronasar/ptb/browser/desktop-capturer.js delete mode 100644 electronasar/ptb/browser/devtools.js delete mode 100644 electronasar/ptb/browser/guest-view-manager.js delete mode 100644 electronasar/ptb/browser/guest-window-manager.js delete mode 100644 electronasar/ptb/browser/init.js delete mode 100644 electronasar/ptb/browser/ipc-main-internal-utils.js delete mode 100644 electronasar/ptb/browser/ipc-main-internal.js delete mode 100644 electronasar/ptb/browser/navigation-controller.js delete mode 100644 electronasar/ptb/browser/objects-registry.js delete mode 100644 electronasar/ptb/browser/rpc-server.js delete mode 100644 electronasar/ptb/common/api/clipboard.js delete mode 100644 electronasar/ptb/common/api/deprecate.js delete mode 100644 electronasar/ptb/common/api/deprecations.js delete mode 100644 electronasar/ptb/common/api/exports/electron.js delete mode 100644 electronasar/ptb/common/api/is-promise.js delete mode 100644 electronasar/ptb/common/api/module-list.js delete mode 100644 electronasar/ptb/common/api/native-image.js delete mode 100644 electronasar/ptb/common/api/shell.js delete mode 100644 electronasar/ptb/common/atom-binding-setup.js delete mode 100644 electronasar/ptb/common/buffer-utils.js delete mode 100644 electronasar/ptb/common/clipboard-utils.js delete mode 100644 electronasar/ptb/common/crash-reporter.js delete mode 100644 electronasar/ptb/common/error-utils.js delete mode 100644 electronasar/ptb/common/init.js delete mode 100644 electronasar/ptb/common/parse-features-string.js delete mode 100644 electronasar/ptb/common/reset-search-paths.js delete mode 100644 electronasar/ptb/common/web-view-methods.js delete mode 100644 electronasar/ptb/renderer/api/crash-reporter.js delete mode 100644 electronasar/ptb/renderer/api/desktop-capturer.js delete mode 100644 electronasar/ptb/renderer/api/exports/electron.js delete mode 100644 electronasar/ptb/renderer/api/ipc-renderer.js delete mode 100644 electronasar/ptb/renderer/api/module-list.js delete mode 100644 electronasar/ptb/renderer/api/remote.js delete mode 100644 electronasar/ptb/renderer/api/web-frame.js delete mode 100644 electronasar/ptb/renderer/callbacks-registry.js delete mode 100644 electronasar/ptb/renderer/chrome-api.js delete mode 100644 electronasar/ptb/renderer/content-scripts-injector.js delete mode 100644 electronasar/ptb/renderer/extensions/event.js delete mode 100644 electronasar/ptb/renderer/extensions/i18n.js delete mode 100644 electronasar/ptb/renderer/extensions/storage.js delete mode 100644 electronasar/ptb/renderer/extensions/web-navigation.js delete mode 100644 electronasar/ptb/renderer/init.js delete mode 100644 electronasar/ptb/renderer/inspector.js delete mode 100644 electronasar/ptb/renderer/ipc-renderer-internal-utils.js delete mode 100644 electronasar/ptb/renderer/ipc-renderer-internal.js delete mode 100644 electronasar/ptb/renderer/security-warnings.js delete mode 100644 electronasar/ptb/renderer/web-frame-init.js delete mode 100644 electronasar/ptb/renderer/web-view/guest-view-internal.js delete mode 100644 electronasar/ptb/renderer/web-view/web-view-attributes.js delete mode 100644 electronasar/ptb/renderer/web-view/web-view-constants.js delete mode 100644 electronasar/ptb/renderer/web-view/web-view-element.js delete mode 100644 electronasar/ptb/renderer/web-view/web-view-impl.js delete mode 100644 electronasar/ptb/renderer/web-view/web-view-init.js delete mode 100644 electronasar/ptb/renderer/window-setup.js delete mode 100644 electronasar/ptb/worker/init.js diff --git a/appasar/ptb/app_bootstrap/autoStart/linux.js b/appasar/ptb/app_bootstrap/autoStart/linux.js index 4097e7f..e1895f1 100644 --- a/appasar/ptb/app_bootstrap/autoStart/linux.js +++ b/appasar/ptb/app_bootstrap/autoStart/linux.js @@ -31,7 +31,8 @@ const exePath = _electron.app.getPath('exe'); const exeDir = _path2.default.dirname(exePath); const iconPath = _path2.default.join(exeDir, 'discord.png'); const autostartDir = _path2.default.join(_electron.app.getPath('appData'), 'autostart'); -const autostartFileName = _path2.default.join(autostartDir, _electron.app.getName() + '-' + _buildInfo2.default.releaseChannel + '.desktop'); +const electronAppName = _electron.app.name ? _electron.app.name : _electron.app.getName(); +const autostartFileName = _path2.default.join(autostartDir, electronAppName + '-' + _buildInfo2.default.releaseChannel + '.desktop'); const desktopFile = `[Desktop Entry] Type=Application Exec=${exePath} diff --git a/appasar/ptb/app_bootstrap/singleInstance.js b/appasar/ptb/app_bootstrap/singleInstance.js index a7d305c..03cf578 100644 --- a/appasar/ptb/app_bootstrap/singleInstance.js +++ b/appasar/ptb/app_bootstrap/singleInstance.js @@ -90,9 +90,9 @@ function tryStart(socketPath, callback, otherAppFound) { } function makeSocketPath() { - let name = _electron.app.getName(); + let name = _electron.app.name ? _electron.app.name : _electron.app.getName(); if (_buildInfo2.default.releaseChannel !== 'stable') { - name = _electron.app.getName() + _buildInfo2.default.releaseChannel; + name += _buildInfo2.default.releaseChannel; } if (process.platform === 'win32') { diff --git a/appasar/ptb/app_bootstrap/splash/index.js b/appasar/ptb/app_bootstrap/splash/index.js index be7b3cd..cdbdd03 100644 --- a/appasar/ptb/app_bootstrap/splash/index.js +++ b/appasar/ptb/app_bootstrap/splash/index.js @@ -22,7 +22,7 @@ object-assign * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var r=n(4),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,c=o?Symbol.for("react.provider"):60109,p=o?Symbol.for("react.context"):60110,f=o?Symbol.for("react.concurrent_mode"):60111,d=o?Symbol.for("react.forward_ref"):60112,h=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,y="function"==typeof Symbol&&Symbol.iterator;function g(e){for(var t=arguments.length-1,n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=0;rA.length&&A.push(e)}function I(e,t,n){return null==e?0:function e(t,n,r,o){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var u=!1;if(null===t)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case a:u=!0}}if(u)return r(o,t,""===n?"."+M(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;sA.length&&A.push(e)}function R(e,t,n){return null==e?0:function e(t,n,r,o){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var u=!1;if(null===t)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case a:u=!0}}if(u)return r(o,t,""===n?"."+M(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;sthis.eventPool.length&&this.eventPool.push(e)}function pe(e){e.eventPool=[],e.getPooled=se,e.release=ce}o(ue.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ae)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ae)},persist:function(){this.isPersistent=ae},isPersistent:le,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=le,this._dispatchInstances=this._dispatchListeners=null}}),ue.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},ue.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,pe(n),n},pe(ue);var fe=ue.extend({data:null}),de=ue.extend({data:null}),he=[9,13,27,32],me=H&&"CompositionEvent"in window,ve=null;H&&"documentMode"in document&&(ve=document.documentMode);var ye=H&&"TextEvent"in window&&!ve,ge=H&&(!me||ve&&8=ve),be=String.fromCharCode(32),Ee={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},xe=!1;function we(e,t){switch(e){case"keyup":return-1!==he.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function ke(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Se=!1;var Ce={eventTypes:Ee,extractEvents:function(e,t,n,r){var o=void 0,i=void 0;if(me)e:{switch(e){case"compositionstart":o=Ee.compositionStart;break e;case"compositionend":o=Ee.compositionEnd;break e;case"compositionupdate":o=Ee.compositionUpdate;break e}o=void 0}else Se?we(e,n)&&(o=Ee.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=Ee.compositionStart);return o?(ge&&"ko"!==n.locale&&(Se||o!==Ee.compositionStart?o===Ee.compositionEnd&&Se&&(i=ie()):(re="value"in(ne=r)?ne.value:ne.textContent,Se=!0)),o=fe.getPooled(o,t,n,r),i?o.data=i:null!==(i=ke(n))&&(o.data=i),K(o),i=o):i=null,(e=ye?function(e,t){switch(e){case"compositionend":return ke(t);case"keypress":return 32!==t.which?null:(xe=!0,be);case"textInput":return(e=t.data)===be&&xe?null:e;default:return null}}(e,n):function(e,t){if(Se)return"compositionend"===e||!me&&we(e,t)?(e=ie(),oe=re=ne=null,Se=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1