ScratchJr-Desktop icon indicating copy to clipboard operation
ScratchJr-Desktop copied to clipboard

Creating deb package on Ubuntu 19.04 or later

Open jjamor opened this issue 5 years ago • 2 comments

Hello,

I sucessfully created a Debian package with ubuntu 20.04 dependencies by doing following steps in a clean Ubuntu container:

apt install -y npm build-essential libx11-xcb-dev libxtst-dev libxss-dev libgconf2-dev libnss3-dev libasound2-dev libgtk2.0-dev libnotify4-dev git npm install

Replace libgconf2-4 with libgconf-2-4 in ./node_modules/electron-installer-debian/src/dependencies.js

Then,

npm run package ./node_modules/.bin/electron-installer-debian --src out/ScratchJr-linux-x64/ --dest /ScratchJr/out --arch amd64

The generated package out/ScratchJr*deb can be installed without dependency problems in Ubuntu 20.04. But it still cannot be started because of following error:

(ScratchJr:158785): Pango-ERROR **: 15:51:51.138: Harfbuzz version too old (1.4.2)

Electron support says that you should use a more recent of electron. How could I change it?

(Yes, I do not know anything about npm).

Thanks!!

jjamor avatar Apr 25 '20 14:04 jjamor

Congrats on getting that far then!

Welcome to your first npm project. You might want to do an npm update in the same folder where you did the npm install. The electron version comes from what's specified in the package.json file.

When you do an npm install or an npm update, it puts all the libraries needed in the node_modules folder. The packager (npm run package) will pick up the necessary libraries out of there and put them into your installer.

Hope this helps? Jfo

jfo8000 avatar Apr 25 '20 22:04 jfo8000

Hi, thanks for your help!!

Sorry, I tried to do an npm update before npm run package, and later I tried to:

npm -i -D electron@latest

In both cases, generated binary fails with the same error.

Should I manually update package.json ? How?

Thanks again!!

jjamor avatar Apr 26 '20 14:04 jjamor