Open DAC324 opened 2 years ago
The built package would be stored at out/atom-amd64.deb
.
I would say pay close attention to the spelling of the --create-debian-package
flag, as it's long and easy to mistype, and because non-existent or typo'd flags are silently ignored (!) and the build takes a long time. I don't see anything in that output above about building the debian (.deb
) package.
I made a script to build just the debian package after the rest of the build is already done. Because I've ended up in this exact situation before. (See below). This should be saved as script/some-filename.js
so it can import the script/config.js
file and the glob
module properly.
#! /usr/bin/env node
const glob = require('glob');
const CONFIG = require('./config');
const createDebianPackage = require('./lib/create-debian-package');
const outDir = CONFIG.buildOutputPath;
const appName = CONFIG.appMetadata.name;
console.log(`Searching for completed Atom build using glob pattern: ${outDir}/${appName}-*/`);
const packagedAppPath = glob.sync(`${outDir}/${appName}-*/`)[0];
console.log('Found Atom build at: ' + packagedAppPath);
createDebianPackage(packagedAppPath);
EDIT: Updated with a better script.
Indeed, it looks like I made an error while typing/pasting that flag.
What appeared strange, though, was that script/build
complained about a missing dpkg-deb
command in the first instance.
After re-installing dpkg
, at least that error was gone.
Tried again yesterday, this time with --no-bootstrap
amended
script/build --no-bootstrap --create-debian-package
and then, a Debian package was indeed created:
Generating startup blob with mksnapshot
Moving generated startup blob into "/home/gerd/Download/atom/src/atom/out/atom-dev-1.63.0-dev-b2b1d3e5b-amd64/v8_context_snapshot.bin"
Moving generated startup blob into "/home/gerd/Download/atom/src/atom/out/atom-dev-1.63.0-dev-b2b1d3e5b-amd64/snapshot_blob.bin"
Creating Debian package for "/home/gerd/Download/atom/src/atom/out/atom-dev-1.63.0-dev-b2b1d3e5b-amd64"
Creating Debian package directory structure at "/tmp/atom-dev-1.63.0-dev-b2b1d3e5b-amd64"
Copying "/home/gerd/Download/atom/src/atom/out/atom-dev-1.63.0-dev-b2b1d3e5b-amd64" to "/tmp/atom-dev-1.63.0-dev-b2b1d3e5b-amd64/usr/share/atom-dev"
Copying binaries into "/tmp/atom-dev-1.63.0-dev-b2b1d3e5b-amd64/usr/bin"
Writing control file into "/tmp/atom-dev-1.63.0-dev-b2b1d3e5b-amd64/DEBIAN"
Writing desktop entry file into "/tmp/atom-dev-1.63.0-dev-b2b1d3e5b-amd64/usr/share/applications"
Copying icon into "/tmp/atom-dev-1.63.0-dev-b2b1d3e5b-amd64/usr/share/pixmaps"
Copying license into "/tmp/atom-dev-1.63.0-dev-b2b1d3e5b-amd64/usr/share/doc/atom-dev"
Copying polkit configuration into "/tmp/atom-dev-1.63.0-dev-b2b1d3e5b-amd64/usr/share"
Generating .deb file from /tmp/atom-dev-1.63.0-dev-b2b1d3e5b-amd64
dpkg-deb: Building Package »atom-dev« in »/tmp/atom-dev-1.63.0-dev-b2b1d3e5b-amd64.deb«.
Copying generated package into "/home/gerd/Download/atom/src/atom/out/atom-amd64.deb"
Nevertheless, that Debian package built that way, appears to be broken.
At first, the entry in the .desktop
file appears to be incorrect:
nohup: failed to run '/usr/lib/atom/atom': No such file or directory
After correcting the .desktop
file to point to the correct path /usr/share/atom-dev/atom
, I only get
$ /usr/share/atom-dev/atom
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module '../build/Release/nslog.node'
Require stack:
- /usr/share/atom-dev/resources/app.asar/node_modules/nslog/lib/nslog.js
- /usr/share/atom-dev/resources/app.asar/src/main-process/start.js
- /usr/share/atom-dev/resources/app.asar/src/main-process/main.js
-
at Module._resolveFilename (internal/modules/cjs/loader.js:972:15)
at Function.n._resolveFilename (electron/js2c/browser_init.js:249:921)
at Module._load (internal/modules/cjs/loader.js:848:27)
at Function.f._load (electron/js2c/asar_bundle.js:5:12633)
at Module.require (internal/modules/cjs/loader.js:1032:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/usr/share/atom-dev/resources/app.asar/node_modules/nslog/lib/nslog.js:5:11)
at Object.<anonymous> (/usr/share/atom-dev/resources/app.asar/node_modules/nslog/lib/nslog.js:15:4)
at Module._compile (internal/modules/cjs/loader.js:1152:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1173:10)
Hello all,
just ran
script/build --create-debian-package
as per instructions. The process apparently completed successfully:However, I was not able to find the newly created Debian package. Is there anything to be done in addition?