--- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ "url": "https://github.com/atom/atom/issues" }, "license": "MIT", - "electronVersion": "5.0.13", "dependencies": { "@atom/nsfw": "1.0.26", "@atom/source-map-support": "^0.3.4", --- a/script/build +++ b/script/build @@ -33,7 +33,7 @@ .wrap(yargs.terminalWidth()) .argv -const checkChromedriverVersion = require('./lib/check-chromedriver-version') +// const checkChromedriverVersion = require('./lib/check-chromedriver-version') const cleanOutputDirectory = require('./lib/clean-output-directory') const codeSignOnMac = require('./lib/code-sign-on-mac') const codeSignOnWindows = require('./lib/code-sign-on-windows') @@ -64,12 +64,12 @@ }) const CONFIG = require('./config') -process.env.ELECTRON_VERSION = CONFIG.appMetadata.electronVersion +// process.env.ELECTRON_VERSION = CONFIG.appMetadata.electronVersion let binariesPromise = Promise.resolve() if (!argv.existingBinaries) { - checkChromedriverVersion() + // checkChromedriverVersion() cleanOutputDirectory() copyAssets() transpilePackagesWithCustomTranspilerPaths() @@ -88,74 +88,5 @@ if (!argv.generateApiDocs) { binariesPromise - .then(packageApplication) .then(packagedAppPath => generateStartupSnapshot(packagedAppPath).then(() => packagedAppPath)) - .then(async packagedAppPath => { - switch (process.platform) { - case 'darwin': { - if (argv.codeSign) { - await codeSignOnMac(packagedAppPath) - await notarizeOnMac(packagedAppPath) - } else if (argv.testSign) { - testSignOnMac(packagedAppPath) - } else { - console.log('Skipping code-signing. Specify the --code-sign option to perform code-signing'.gray) - } - break - } - case 'win32': { - if (argv.testSign) { - console.log('Test signing is not supported on Windows, skipping.'.gray) - } - - if (argv.codeSign) { - const executablesToSign = [ path.join(packagedAppPath, CONFIG.executableName) ] - if (argv.createWindowsInstaller) { - executablesToSign.push(path.join(__dirname, 'node_modules', '@atom', 'electron-winstaller', 'vendor', 'Squirrel.exe')) - } - codeSignOnWindows(executablesToSign) - } else { - console.log('Skipping code-signing. Specify the --code-sign option to perform code-signing'.gray) - } - if (argv.createWindowsInstaller) { - return createWindowsInstaller(packagedAppPath) - .then((installerPath) => { - argv.codeSign && codeSignOnWindows([installerPath]) - return packagedAppPath - }) - } else { - console.log('Skipping creating installer. Specify the --create-windows-installer option to create a Squirrel-based Windows installer.'.gray) - } - break - } - case 'linux': { - if (argv.createDebianPackage) { - createDebianPackage(packagedAppPath) - } else { - console.log('Skipping creating debian package. Specify the --create-debian-package option to create it.'.gray) - } - - if (argv.createRpmPackage) { - createRpmPackage(packagedAppPath) - } else { - console.log('Skipping creating rpm package. Specify the --create-rpm-package option to create it.'.gray) - } - break - } - } - - return Promise.resolve(packagedAppPath) - }).then(packagedAppPath => { - if (argv.compressArtifacts) { - compressArtifacts(packagedAppPath) - } else { - console.log('Skipping artifacts compression. Specify the --compress-artifacts option to compress Atom binaries (and symbols on macOS)'.gray) - } - - if (argv.install != null) { - installApplication(packagedAppPath, argv.install) - } else { - console.log('Skipping installation. Specify the --install option to install Atom'.gray) - } - }) } --- a/script/lib/generate-startup-snapshot.js +++ b/script/lib/generate-startup-snapshot.js @@ -286,17 +286,14 @@ CONFIG.executableName ); } else { - nodeBundledInElectronPath = path.join( - packagedAppPath, - CONFIG.executableName - ); + nodeBundledInElectronPath = 'electron5'; } childProcess.execFileSync( nodeBundledInElectronPath, [verifySnapshotScriptPath, snapshotScriptPath], { env: Object.assign({}, process.env, { ELECTRON_RUN_AS_NODE: 1 }) } ); - + /* console.log('Generating startup blob with mksnapshot'); childProcess.spawnSync(process.execPath, [ path.join( @@ -338,5 +335,6 @@ destinationPath ); } + */ }); }; --- a/script/package.json +++ b/script/package.json @@ -10,9 +10,7 @@ "coffeelint": "1.15.7", "colors": "1.1.2", "donna": "1.0.16", - "electron-chromedriver": "^9.0.0", "electron-link": "0.4.1", - "electron-mksnapshot": "^9.0.2", "electron-packager": "12.2.0", "@atom/electron-winstaller": "0.0.1", "eslint": "^5.16.0", --- a/src/compile-cache.js +++ b/src/compile-cache.js @@ -138,7 +138,7 @@ exports.install = function(resourcesPath, nodeRequire) { return { column, line: row, - source: path.join(resourcesPath, 'app', 'static', relativePath), + source: path.join(resourcesPath, 'static', relativePath), name: null }; } --- a/src/module-cache.js +++ b/src/module-cache.js @@ -270,7 +270,7 @@ function registerBuiltins(devMode) { if ( devMode || - !cache.resourcePath.startsWith(`${process.resourcesPath}${path.sep}`) + !cache.resourcePath.startsWith('/usr/lib/atom/') ) { const fs = require('fs-plus'); const atomJsPath = path.join(cache.resourcePath, 'exports', 'atom.js'); --- a/src/package-manager.js +++ b/src/package-manager.js @@ -939,7 +939,7 @@ isBundledPackagePath(packagePath) { if ( this.devMode && - !this.resourcePath.startsWith(`${process.resourcesPath}${path.sep}`) + !this.resourcePath.startsWith('/usr/lib/atom/') ) { return false; } --- a/src/task-bootstrap.js +++ b/src/task-bootstrap.js @@ -3,7 +3,7 @@ const CompileCache = require('./compile-cache'); CompileCache.setCacheDirectory(compileCachePath); -CompileCache.install(`${process.resourcesPath}`, require); +CompileCache.install('/usr/lib/atom', require); const setupGlobals = function() { global.attachEvent = function() {}; --- a/static/index.js +++ b/static/index.js @@ -40,7 +40,7 @@ const devMode = getWindowLoadSettings().devMode || !getWindowLoadSettings().resourcePath.startsWith( - process.resourcesPath + path.sep + '/usr/lib/atom' ); useSnapshot = !devMode && typeof snapshotResult !== 'undefined'; @@ -134,7 +134,7 @@ ? snapshotResult.customRequire('../src/compile-cache.js') : require('../src/compile-cache'); CompileCache.setAtomHomeDirectory(process.env.ATOM_HOME); - CompileCache.install(process.resourcesPath, require); + CompileCache.install('/usr/lib/atom', require); const ModuleCache = useSnapshot ? snapshotResult.customRequire('../src/module-cache.js')