igdmapps / igdm

Desktop application for Instagram DMs
MIT License
1.96k stars 407 forks source link

[Improvment Suggestion] I would like to compile and package as a Linux app #1009

Open gusbemacbe opened 5 years ago

gusbemacbe commented 5 years ago

Hello @ifedapoolarewaju !

Yes, I have read the README which tells me to run npm install and npm start, but I would like to compile and package the developing/testing/unstable repository as a Linux app on a Linux OS, but the problem is when I run gulp build && build --dir or gulp build && build -mwl --x64, it downloads the Electron designed for macOS and gives errors. I also tried to run npm run dist linux zip, but it still downloads Electron for macOS and gives the same errors. I have removed the macOS and Windows distributions from package.json, but it still gives the problem due to the path /usr/local/Cellar/go/1.12.1/libexec/src/runtime/asm_amd64 which is designed for macOS. Here is full error:

  • electron-builder version=20.43.0
  • loaded configuration file=package.json ("build" field)
  • writing effective config file=dist/builder-effective-config.yaml
  • no native production dependencies
  • packaging       platform=linux arch=x64 electron=2.0.12 appOutDir=dist/linux-unpacked
  • downloading               parts=8 size=49 MB url=https://github.com/electron/electron/releases/download/v2.0.12/electron-v2.0.12-linux-x64.zip
  • retrying (1)             
  • retrying (2)             
  • retrying (3)             
  ⨯ part download request failed with status code 403
github.com/develar/app-builder/pkg/download.(*Part).doRequest
        /Volumes/data/Documents/app-builder/pkg/download/Part.go:128
github.com/develar/app-builder/pkg/download.(*Part).download
        /Volumes/data/Documents/app-builder/pkg/download/Part.go:66
github.com/develar/app-builder/pkg/download.(*Downloader).DownloadResolved.func1.1
        /Volumes/data/Documents/app-builder/pkg/download/downloader.go:110
github.com/develar/app-builder/pkg/util.MapAsyncConcurrency.func2
        /Volumes/data/Documents/app-builder/pkg/util/async.go:67
runtime.goexit
        /usr/local/Cellar/go/1.12.1/libexec/src/runtime/asm_amd64.s:1337

Error: /home/gusbemacbe/node_modules/app-builder-bin/linux/x64/app-builder exited with code 1
    at ChildProcess.childProcess.once.code (/home/gusbemacbe/node_modules/builder-util/src/util.ts:244:14)
    at Object.onceWrapper (events.js:286:20)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
From previous event:
    at _unpack (/home/gusbemacbe/node_modules/app-builder-lib/out/electron/ElectronFramework.js:298:18)
    at unpack (/home/gusbemacbe/node_modules/app-builder-lib/out/electron/ElectronFramework.js:257:18)
    at ElectronFramework.prepareApplicationStageDirectory (/home/gusbemacbe/node_modules/app-builder-lib/src/electron/ElectronFramework.ts:125:12)
    at /home/gusbemacbe/node_modules/app-builder-lib/src/platformPackager.ts:180:21
    at Generator.next (<anonymous>)
From previous event:
    at LinuxPackager.doPack (/home/gusbemacbe/node_modules/app-builder-lib/src/platformPackager.ts:167:165)
    at /home/gusbemacbe/node_modules/app-builder-lib/src/platformPackager.ts:113:16
    at Generator.next (<anonymous>)
From previous event:
    at LinuxPackager.pack (/home/gusbemacbe/node_modules/app-builder-lib/src/platformPackager.ts:111:95)
    at /home/gusbemacbe/node_modules/app-builder-lib/src/packager.ts:430:24
    at Generator.next (<anonymous>)
    at xfs.stat (/home/gusbemacbe/node_modules/fs-extra-p/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16)
    at /home/gusbemacbe/node_modules/graceful-fs/polyfills.js:285:20
    at FSReqWrap.oncomplete (fs.js:154:5)
From previous event:
    at Packager.doBuild (/home/gusbemacbe/node_modules/app-builder-lib/src/packager.ts:396:24)
    at /home/gusbemacbe/node_modules/app-builder-lib/src/packager.ts:366:57
    at Generator.next (<anonymous>)
    at /home/gusbemacbe/node_modules/graceful-fs/graceful-fs.js:111:16
    at /home/gusbemacbe/node_modules/graceful-fs/graceful-fs.js:45:10
    at FSReqWrap.args [as oncomplete] (fs.js:140:20)
From previous event:
    at Packager._build (/home/gusbemacbe/node_modules/app-builder-lib/src/packager.ts:335:133)
    at /home/gusbemacbe/node_modules/app-builder-lib/src/packager.ts:331:23
    at Generator.next (<anonymous>)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
From previous event:
    at Packager.build (/home/gusbemacbe/node_modules/app-builder-lib/src/packager.ts:288:14)
    at build (/home/gusbemacbe/node_modules/app-builder-lib/src/index.ts:59:28)
    at build (/home/gusbemacbe/node_modules/electron-builder/src/builder.ts:228:10)
    at then (/home/gusbemacbe/node_modules/electron-builder/src/cli/cli.ts:49:19)

It is why you should improve the README for programmers who want to compile, build and package.

duplicate-issues[bot] commented 5 years ago

Hey @gusbemacbe,

We did a quick check and this issue looks very darn similar to

This could be a coincidence, but if any of these issues solves your problem then I did a good job :smile:

If not, the maintainers will get to this issue shortly.

Cheers, Your Friendly Neighborhood ProBot

erikwesselius commented 5 years ago

Hello @gusbemacbe, I get a similar error when trying to compile buttercup on an Arch Linux machine: https://pastebin.com/kcUgW5WB Did you solve this issue? If so, how?

gusbemacbe commented 5 years ago

Hi @erikwesselius

Yes, I did. But the macOS path has been solved, and you need to install some modules required.

To solve the macOS path, you use nvm, install the node version 8.9.1, required by the most of repos, including Thermal and @sylveon's VSCode's transparency enabling and switch to the version.

npm install
npm install app-builder-lib electron-builder gulp jquery popper.js
npm run dist linux zip

Do not worry about few errors. These errors are related to Windows because you are not a Windows user.