kusa-mochi / baby-drawing

drawing app for every babies.
GNU General Public License v3.0
0 stars 0 forks source link

Build for RaspPi #4

Open kusa-mochi opened 2 years ago

kusa-mochi commented 2 years ago

Installed Ruby and FPM according to this site.

modified package.json to this:

{ "name": "Mochi", "email": "whoatemyapplepie@gmail.com", "url": "https://slash-mochi.net/", "description": "the drawing app for babies.", "license": "MIT License", "repository": "https://github.com/kusa-mochi/baby-drawing.git", "version": "0.1.1", "private": true, "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", "electron:build": "vue-cli-service electron:build", "electron:serve": "vue-cli-service electron:serve", "postinstall": "electron-builder install-app-deps", "postuninstall": "electron-builder install-app-deps" }, "main": "background.js", "dependencies": { "core-js": "^3.6.5", "vue": "^2.6.11", "vuex": "^3.4.0" }, "devDependencies": { "@vue/cli-plugin-babel": "~4.5.0", "@vue/cli-plugin-vuex": "~4.5.0", "@vue/cli-service": "~4.5.0", "electron": "^9.0.0", "electron-devtools-installer": "^3.1.0", "sass": "^1.26.5", "sass-loader": "^8.0.2", "vue-cli-plugin-electron-builder": "~2.0.0-rc.4", "vue-template-compiler": "^2.6.11" }, "linux": { "target": "AppImage" } }

and create vue.config.js file in the folder that has package.json. The content of vue.config.js is like this:

module.exports = { pluginOptions: { electronBuilder: { builderOptions: { "appId": "net.slash-mochi.baby-drawing", "productName": "baby-drawing", "copyright": "Copyright Mochi", "target": "AppImage" } } } }

Then, run the next command:

USE_SYSTEM_FPM=true yarn electron:build --linux deb --armv7l

Finally got next error...

⠴ Building modern bundle for production...

DONE Compiled successfully in 25110ms 1:19:01 AM

File Size Gzipped

dist_electron/bundled/js/chunk-vendors.8d9f4c9d.js 87.02 KiB 30.18 KiB dist_electron/bundled/js/app.6d094cb9.js 5.15 KiB 2.08 KiB dist_electron/bundled/css/app.6d67b578.css 0.36 KiB 0.23 KiB

Images and other types of assets omitted.

DONE Build complete. The dist_electron/bundled directory is ready to be deployed. INFO Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html

⠹ Bundling main process...

DONE Compiled successfully in 12777ms 1:19:15 AM

File Size Gzipped

dist_electron/bundled/background.js 190.83 KiB 59.06 KiB

Images and other types of assets omitted.

INFO Building app with electron-builder: • electron-builder version=22.8.0 os=5.15.61-v7+ • author is missed in the package.json appPackageFile=/src/baby-drawing/baby-drawing/dist_electron/bundled/package.json • writing effective config file=dist_electron/builder-effective-config.yaml • packaging platform=linux arch=armv7l electron=9.3.0 appOutDir=dist_electron/linux-armv7l-unpacked • building target=deb arch=armv7l file=dist_electron/Mochi_0.1.1_armv7l.deb

/src/baby-drawing/baby-drawing/node_modules/app-builder-lib/src/targets/fpm.ts:82 throw new Error(errors.join("\n\n")) ^ Error: Please specify author 'email' in the application package.json

See https://docs.npmjs.com/files/package.json#people-fields-author-contributors

It is required to set Linux .deb package maintainer. Or you can set maintainer in the custom linux options. (see https://www.electron.build/configuration/linux).

at FpmTarget.computeFpmMetaInfoOptions (/src/baby-drawing/baby-drawing/node_modules/app-builder-lib/src/targets/fpm.ts:82:13)
at FpmTarget.build (/src/baby-drawing/baby-drawing/node_modules/app-builder-lib/src/targets/fpm.ts:135:24)
at /src/baby-drawing/baby-drawing/node_modules/app-builder-lib/src/platformPackager.ts:133:11
at async Promise.all (index 0)
at AsyncTaskManager.awaitTasks (/src/baby-drawing/baby-drawing/node_modules/builder-util/src/asyncTaskManager.ts:65:25)
at Packager.doBuild (/src/baby-drawing/baby-drawing/node_modules/app-builder-lib/src/packager.ts:456:5)
at executeFinally (/src/baby-drawing/baby-drawing/node_modules/builder-util/src/promise.ts:12:14)
at Packager._build (/src/baby-drawing/baby-drawing/node_modules/app-builder-lib/src/packager.ts:373:31)
at Packager.build (/src/baby-drawing/baby-drawing/node_modules/app-builder-lib/src/packager.ts:337:12)
at executeFinally (/src/baby-drawing/baby-drawing/node_modules/builder-util/src/promise.ts:12:14)

error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

kusa-mochi commented 2 years ago

Defined "name", "email", "url" and "author" in the package.json. Like this:

{

"name": "Mochi", "email": "whoatemyapplepie@gmail.com", "url": "https://slash-mochi.net/", "author": "Mochi whoatemyapplepie@gmail.com",

And run the next command:

USE_SYSTEM_FPM=true yarn electron:build --linux deb --armv7l

Then the build was completed. The name of the output file was "Mochi_0.1.1_armv7l.deb".