FrogTheFrog / steam-gyro-for-cemuhook

App to add Steam Controller's motion support to Cemuhook
MIT License
164 stars 18 forks source link

Raspberry Pi support #40

Closed tomasdeltell closed 2 years ago

tomasdeltell commented 4 years ago

There would be a possibility to get support for raspberry pi?

FrogTheFrog commented 4 years ago

I have added a build for ARMv7 (AppImage), but have no real way to test it and leave it up to you :+1:

tomasdeltell commented 4 years ago

I will test it tomorrow and post the results ;)

tomasdeltell commented 4 years ago

It installs fine, installing some dependencies first, but depending on X11 to run, it gives me some errors. Can the application be launched without a graphical environment?

FrogTheFrog commented 4 years ago

I'll try to see what I can do on weekend.

tomasdeltell commented 4 years ago

Can you add a Deb package for the raspberry?

FrogTheFrog commented 4 years ago

I've added the debian package.

tomasdeltell commented 4 years ago

After solving some errors in my system, when launching it gives this error:

A JavaScript error occurred in the main process
Uncaught Exception:
Error: /tmp/.org.chromium.Chromium.fNv0qI: wrong ELF class: ELFCLASS64
    at process.func (electron/js2c/asar.js:140:31)
    at process.func [as dlopen] (electron/js2c/asar.js:140:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:922:18)
    at Object.func (electron/js2c/asar.js:140:31)
    at Object.func [as .node] (electron/js2c/asar.js:149:18)
    at Module.load (internal/modules/cjs/loader.js:735:32)
    at Module._load (internal/modules/cjs/loader.js:648:12)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Module.require (internal/modules/cjs/loader.js:775:19)

I found this about this problem: https://github.com/electron-userland/electron-builder/issues/2586

FrogTheFrog commented 3 years ago

I've got a Raspberry4 and will try to see if I can build the project natively.

tomasdeltell commented 3 years ago

Thank you!

FrogTheFrog commented 3 years ago

I have built the AppImage for armv7l, however I'm not able to build deb as it seems the electron-builder does not support it :/. UI works, unless you try to use the graph option, then it starts to lag real bad :D. UI process won't be created so no need to worry about it anyway.

Good news is that I have confirmed that it works in-game! Make sure to set proper ip address both in the app and cemuhook (depends on your Raspberry's ip), for ex. 192.168.0.4.

tomasdeltell commented 3 years ago

Thank you! I will test it and tell you the results

tomasdeltell commented 3 years ago

When I launch it, I have a Segmentation Fault. I want to clarify that in my raspberry I use osmc as OS and it does not run X11 directly. Is there a way to start it in headless mode?

FrogTheFrog commented 3 years ago

Not really, but I can try something, just to see if it works. Could you try to build the app yourself on osmc in the meantime?

tomasdeltell commented 3 years ago

Yes. How can I build the app?

FrogTheFrog commented 3 years ago

Do you have a discord? I think it would be faster to chat there :) If you have, add me to friends: FrogTheFrog#1801.

tomasdeltell commented 3 years ago

I have not discord. I'm installing electron-builder

FrogTheFrog commented 3 years ago

Nvm then, what you need to do:

  1. Download this repo.
  2. Install nodejs and npm via the os package manager.
  3. In the repo directory run npm i.
  4. If you get compile errors about missing libraries, install them via the os package manager and continue from step 3.
  5. If you had to do step 4, delete node_modules directory and continue from step 3.
  6. In the repo directory run npm run build:dist and then npm run start.
tomasdeltell commented 3 years ago

I am trying to compile it, the process is extremely slow on rpi. I will report the result. Did you get something from you?

tomasdeltell commented 3 years ago

I've got it to work! I had to install x11 from here. The problem now is when I start the application with this method, the performance drops. I keep trying to compile the current branch of the project, but it gives me errors

tomasdeltell commented 3 years ago

Have you made any progress?

FrogTheFrog commented 3 years ago

Sorry, I will not be able to sit down on this project for some time. What kind of errors do you get?

tomasdeltell commented 3 years ago

$ npm i npm WARN npm npm does not support Node.js v10.21.0 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9. npm WARN npm You can find the latest version at https://nodejs.org/

node-hid@1.3.1 install /home/osmc/git/steam-gyro-for-cemuhook/node_modules/node-hid prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.21.0 runtime=node arch=arm libc= platform=linux) Package libusb-1.0 was not found in the pkg-config search path. Perhaps you should add the directory containing libusb-1.0.pc' to the PKG_CONFIG_PATH environment variable No package 'libusb-1.0' found gyp: Call to 'pkg-config libusb-1.0 --cflags-only-I | sed s/-I//g' returned exit status 0 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error:gyp` failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:349:16) gyp ERR! stack at ChildProcess.emit (events.js:198:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) gyp ERR! System Linux 4.19.122-2-osmc gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /home/osmc/git/steam-gyro-for-cemuhook/node_modules/node-hid gyp ERR! node -v v10.21.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN @angular/core@10.2.1 requires a peer of zone.js@~0.10.3 but none is installed. You must install peer dependencies yourself. npm WARN sass-loader@10.0.4 requires a peer of sass@^1.3.0 but none is installed. You must install peer dependencies yourself. npm WARN sass-loader@10.0.4 requires a peer of fibers@>= 3.1.0 but none is installed. You must install peer dependencies yourself. npm WARN steam-gyro-for-cemuhook@1.4.2 No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-hid@1.3.1 install: prebuild-install || node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-hid@1.3.1 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/osmc/.npm/_logs/2020-11-17T09_39_36_532Z-debug.log

FrogTheFrog commented 3 years ago

You need to install libusb-dev and libusb system packages.

tomasdeltell commented 3 years ago

Thank you. App is building, it's taking more than 5 hours xD

tomasdeltell commented 3 years ago

I have not been able to build it on the raspberry, after 48 hours it did not finish. On my x86_64 PC, after finishing the above commands correctly, the command npm run start throws this error:

$ npm run start

> steam-gyro-for-cemuhook@1.4.2 start /home/tomas/git/steam-gyro-for-cemuhook
> electron ./dist/main.bundle.js

/home/tomas/git/steam-gyro-for-cemuhook/node_modules/electron/dist/electron exited with signal SIGSEGV
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! steam-gyro-for-cemuhook@1.4.2 start: `electron ./dist/main.bundle.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the steam-gyro-for-cemuhook@1.4.2 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/tomas/.npm/_logs/2020-11-18T14_54_27_160Z-debug.log
[tomas@JohnHenry steam-gyro-for-cemuhook]$ cat /home/tomas/.npm/_logs/2020-11-18T14_54_27_160Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'start' ]
2 info using npm@6.14.8
3 info using node@v15.2.1
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle steam-gyro-for-cemuhook@1.4.2~prestart: steam-gyro-for-cemuhook@1.4.2
6 info lifecycle steam-gyro-for-cemuhook@1.4.2~start: steam-gyro-for-cemuhook@1.4.2
7 verbose lifecycle steam-gyro-for-cemuhook@1.4.2~start: unsafe-perm in lifecycle true
8 verbose lifecycle steam-gyro-for-cemuhook@1.4.2~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/tomas/git/steam-gyro-for-cemuhook/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
9 verbose lifecycle steam-gyro-for-cemuhook@1.4.2~start: CWD: /home/tomas/git/steam-gyro-for-cemuhook
10 silly lifecycle steam-gyro-for-cemuhook@1.4.2~start: Args: [ '-c', 'electron ./dist/main.bundle.js' ]
11 silly lifecycle steam-gyro-for-cemuhook@1.4.2~start: Returned: code: 1  signal: null
12 info lifecycle steam-gyro-for-cemuhook@1.4.2~start: Failed to exec start script
13 verbose stack Error: steam-gyro-for-cemuhook@1.4.2 start: `electron ./dist/main.bundle.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (node:events:329:20)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (node:events:329:20)
13 verbose stack     at maybeClose (node:internal/child_process:1055:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:288:5)
14 verbose pkgid steam-gyro-for-cemuhook@1.4.2
15 verbose cwd /home/tomas/git/steam-gyro-for-cemuhook
16 verbose Linux 5.4.64-1-vfio-lts
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "start"
18 verbose node v15.2.1
19 verbose npm  v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error steam-gyro-for-cemuhook@1.4.2 start: `electron ./dist/main.bundle.js`
22 error Exit status 1
23 error Failed at the steam-gyro-for-cemuhook@1.4.2 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
FrogTheFrog commented 3 years ago

Did you run npm run build:dist? That's the only way I know that could produce this error :/

FrogTheFrog commented 3 years ago

Also, what kind of RaspberryPi do you have?

tomasdeltell commented 3 years ago

Did you run npm run build:dist? That's the only way I know that could produce this error :/

In my x86_64 PC this is the result of npm run build:dist

$ npm run build:dist

> steam-gyro-for-cemuhook@1.4.2 build:dist /home/tomas/git/steam-gyro-for-cemuhook
> rimraf dist && npm run build:backend && npm run build:frontend

> steam-gyro-for-cemuhook@1.4.2 build:backend /home/tomas/git/steam-gyro-for-cemuhook
> cross-env NODE_ENV=production webpack --config ./webpack/backend.js

[webpack-cli] Compilation finished
Hash: 14eda2f3c2cd9800a625
Version: webpack 4.44.2
Time: 8400ms
Built at: 18/11/2020 15:53:30
          Asset      Size  Chunks             Chunk Names
images/icon.ico   111 KiB          [emitted]  
images/icon.png  14.3 KiB          [emitted]  
 main.bundle.js   506 KiB       0  [emitted]  main
Entrypoint main = main.bundle.js
  [1] ../node_modules/rxjs/_esm5/internal/Subscriber.js 8.44 KiB {0} [built]
  [3] ../node_modules/rxjs/_esm5/internal/Observable.js + 1 modules 4.75 KiB {0} [built]
      | ../node_modules/rxjs/_esm5/internal/Observable.js 3.95 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/util/toSubscriber.js 776 bytes [built]
  [4] ../node_modules/rxjs/_esm5/internal/Subscription.js 5.09 KiB {0} [built]
  [5] ../node_modules/rxjs/_esm5/internal/Subject.js 5.25 KiB {0} [built]
  [8] ../node_modules/rxjs/_esm5/internal/scheduler/async.js 312 bytes {0} [built]
 [14] external "path" 42 bytes {0} [built]
 [58] ../node_modules/rxjs/_esm5/index.js + 19 modules 35.8 KiB {0} [built]
      | ../node_modules/rxjs/_esm5/index.js 3.33 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/scheduler/animationFrame.js 420 bytes [built]
      | ../node_modules/rxjs/_esm5/internal/scheduler/VirtualTimeScheduler.js 3.58 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/util/isObservable.js 302 bytes [built]
      | ../node_modules/rxjs/_esm5/internal/observable/bindCallback.js 3.85 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/bindNodeCallback.js 4.3 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/forkJoin.js 2.59 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/fromEvent.js 2.67 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/fromEventPattern.js 1.22 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/generate.js 3.58 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/iif.js 433 bytes [built]
      | ../node_modules/rxjs/_esm5/internal/observable/interval.js 1.01 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/never.js 282 bytes [built]
      | ../node_modules/rxjs/_esm5/internal/observable/onErrorResumeNext.js 1 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/pairs.js 1.5 KiB [built]
      |     + 5 hidden modules
[105] external "electron" 42 bytes {0} [built]
[136] ./backend/lib/app-manager/index.ts 13.7 KiB {0} [built]
[199] ./backend/main.ts 759 bytes {0} [built]
[200] ../node_modules/winston/lib/winston.js 4.34 KiB {0} [built]
[265] ./backend/lib/ipc-main.ts 1.21 KiB {0} [built]
[272] ./backend/lib/app-manager/app-server.ts 1.25 KiB {0} [built]
[352] ./backend/lib/app-manager/app-user-interface.ts 5.61 KiB {0} [built]
[356] ./backend/lib/app-manager/app-user-settings.ts 1.84 KiB {0} [built]
    + 349 hidden modules

> steam-gyro-for-cemuhook@1.4.2 build:frontend /home/tomas/git/steam-gyro-for-cemuhook
> cross-env NODE_ENV=production webpack --config ./webpack/frontend.js

Compiling @angular/cdk/keycodes : module as esm2015
Compiling @angular/animations : module as esm2015
Compiling @angular/core : module as esm2015
Compiling @angular/common : module as esm2015
Compiling @angular/cdk/observers : module as esm2015
Compiling @angular/animations/browser : module as esm2015
Compiling @angular/cdk/collections : module as esm2015
Compiling @angular/cdk/platform : module as esm2015
Compiling @angular/platform-browser : module as esm2015
Compiling @angular/cdk/bidi : module as esm2015
Compiling @angular/cdk/a11y : module as esm2015
Compiling @angular/forms : module as esm2015
Compiling @angular/platform-browser/animations : module as esm2015
Compiling @angular/cdk/portal : module as esm2015
Compiling @angular/cdk/scrolling : module as esm2015
Compiling @angular/common/http : module as esm2015
Compiling @angular/cdk/text-field : module as esm2015
Compiling @angular/material/core : module as esm2015
Compiling @angular/cdk/layout : module as esm2015
Compiling @angular/platform-browser-dynamic : module as esm2015
Compiling @angular/cdk/overlay : module as esm2015
Compiling @angular/material/form-field : module as esm2015
Compiling @angular/material/divider : module as esm2015
Compiling @angular/router : module as esm2015
Compiling @angular/material/button : module as esm2015
Compiling @angular/material/button-toggle : module as esm2015
Compiling @angular/material/card : module as esm2015
Compiling @angular/material/icon : module as esm2015
Compiling @angular/material/input : module as esm2015
Compiling @angular/material/list : module as esm2015
Compiling @angular/material/select : module as esm2015
Compiling @angular/material/toolbar : module as esm2015
Compiling @angular/material/tooltip : module as esm2015
Compiling @swimlane/ngx-charts : module as esm2015
[webpack-cli] Compilation finished
Hash: 02490ca185f27c23d576
Version: webpack 4.44.2
Time: 18187ms
Built at: 18/11/2020 15:53:58
                         Asset       Size  Chunks             Chunk Names
          fonts/hack-bold.woff    141 KiB          [emitted]  
         fonts/hack-bold.woff2    105 KiB          [emitted]  
    fonts/hack-bolditalic.woff    148 KiB          [emitted]  
   fonts/hack-bolditalic.woff2    111 KiB          [emitted]  
        fonts/hack-italic.woff    145 KiB          [emitted]  
       fonts/hack-italic.woff2    109 KiB          [emitted]  
       fonts/hack-regular.woff    138 KiB          [emitted]  
      fonts/hack-regular.woff2    104 KiB          [emitted]  
            frontend.bundle.js   1.84 MiB       0  [emitted]  frontend
          icons/air-filter.svg   1.55 KiB          [emitted]  
icons/alert-circle-outline.svg  504 bytes          [emitted]  
          icons/chart-line.svg  411 bytes          [emitted]  
                 icons/cog.svg   1.19 KiB          [emitted]  
             icons/gamepad.svg  420 bytes          [emitted]  
 icons/information-outline.svg  523 bytes          [emitted]  
                icons/play.svg  339 bytes          [emitted]  
       icons/playlist-edit.svg  579 bytes          [emitted]  
              icons/server.svg  624 bytes          [emitted]  
                icons/stop.svg  326 bytes          [emitted]  
            icons/wifi-off.svg  781 bytes          [emitted]  
                icons/wifi.svg  623 bytes          [emitted]  
                    index.html  230 bytes          [emitted]  
Entrypoint frontend = frontend.bundle.js
  [0] ../node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js 1.22 MiB {0} [built]
  [1] ../node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js 212 KiB {0} [built]
 [23] ../node_modules/rxjs/_esm5/index.js + 13 modules 27.2 KiB {0} [built]
      | ../node_modules/rxjs/_esm5/index.js 3.33 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/scheduler/VirtualTimeScheduler.js 3.58 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/bindCallback.js 3.85 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/bindNodeCallback.js 4.3 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/fromEventPattern.js 1.22 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/generate.js 3.58 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/iif.js 433 bytes [built]
      | ../node_modules/rxjs/_esm5/internal/observable/interval.js 1.01 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/never.js 282 bytes [built]
      | ../node_modules/rxjs/_esm5/internal/observable/onErrorResumeNext.js 1 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/pairs.js 1.5 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/partition.js 543 bytes [built]
      | ../node_modules/rxjs/_esm5/internal/observable/range.js 1.33 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/observable/using.js 977 bytes [built]
 [25] ../node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js 80.8 KiB {0} [built]
 [30] ../node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/animations.js + 1 modules 203 KiB {0} [built]
      | ../node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/animations.js 20.1 KiB [built]
      | ../node_modules/@angular/animations/__ivy_ngcc__/fesm2015/browser.js 183 KiB [built]
 [31] ../node_modules/rxjs/_esm5/operators/index.js + 73 modules 137 KiB {0} [built]
      | ../node_modules/rxjs/_esm5/operators/index.js 6.15 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/operators/buffer.js 1.4 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/operators/bufferCount.js 3.39 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/operators/bufferTime.js 6.32 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/operators/bufferToggle.js 4.24 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/operators/bufferWhen.js 2.9 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/operators/combineAll.js 307 bytes [built]
      | ../node_modules/rxjs/_esm5/internal/operators/combineLatest.js 855 bytes [built]
      | ../node_modules/rxjs/_esm5/internal/operators/concat.js 431 bytes [built]
      | ../node_modules/rxjs/_esm5/internal/operators/concatMapTo.js 279 bytes [built]
      | ../node_modules/rxjs/_esm5/internal/operators/count.js 1.72 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/operators/debounce.js 2.74 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/operators/delay.js 3.4 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/operators/delayWhen.js 5.3 KiB [built]
      | ../node_modules/rxjs/_esm5/internal/operators/dematerialize.js 1.01 KiB [built]
      |     + 59 hidden modules
 [69] ../node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js 223 KiB {0} [built]
[116] ./frontend/app/shared/shared.module.ts 1.64 KiB {0} [built]
[156] ../node_modules/css-loader/dist/cjs.js??ref--7-1!../node_modules/postcss-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./frontend/style.global.scss 70.9 KiB {0} [built]
[201] ./frontend/main.ts 635 bytes {0} [built]
[206] ../node_modules/core-js/es/reflect/index.js 721 bytes {0} [built]
[244] ../node_modules/hammerjs/hammer.js 72.1 KiB {0} [built]
[245] ../node_modules/zone.js/dist/zone.js 161 KiB {0} [built]
[246] ./frontend/style.global.scss 439 bytes {0} [built]
[247] ./frontend/app/app.module.ts 2.91 KiB {0} [built]
    + 420 hidden modules
Child HtmlWebpackCompiler:
                          Asset      Size  Chunks  Chunk Names
    __child-HtmlWebpackPlugin_0  4.01 KiB       0  HtmlWebpackPlugin_0
    Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
    [0] ../node_modules/html-webpack-plugin/lib/loader.js!./frontend/index.html 271 bytes {0} [built]
tomasdeltell commented 3 years ago

Also, what kind of RaspberryPi do you have?

A 3B+

tomasdeltell commented 3 years ago

What could be the problem? I have tried again but it still fails.

FrogTheFrog commented 3 years ago

I honestly don't know. One stupid solution that might work is to completely delete the download git source and download/build it again from scratch. Some project components do not completely rebuild (if you failed to build them for the first time) unless you do that for some reason.

tomasdeltell commented 3 years ago

I've try that you tell without success. I've deleted the dierctory and executed 'npm i', 'npm run build:dist' and 'npm run start' with same result.

FrogTheFrog commented 3 years ago

Sorry, but I have no idea what's wrong then. You need to somehow launch compiled main.bundle.js with electron's binary (located in node_modules, I think), Maybe it is not finding the bundle for some reason?

tomasdeltell commented 3 years ago

If i build it with npm run build:linux it build the packages (snap, appimage and pacman) and the application works (including headless mode!!), but the arm package is not building. How can I build the arm packages?

FrogTheFrog commented 3 years ago

Congrats! I'm interested in the performance though, is it any better?

tomasdeltell commented 3 years ago

I can't not test in the raspberry. In my PC RAM used by application has decreased a bit. However even though it runs in headless mode it still needs the graphical server to work.Therefore in the raspberry it will continue to consume too many resources. Finally I have managed to automate how to launch the application from the raspberry, without using the command line, so for now it works. It would be interesting a headless mode that doesn't really need the graphical server to work. If you can implement this, it would be great.

Thank you

tomasdeltell commented 3 years ago

Can you help me build the package for the Raspberry?

FrogTheFrog commented 3 years ago

Ah sorry, I did not see that you've said that the arm package is not building. The easiest way to do it is to replace "build:linux": "rimraf release && electron-builder build --linux --x64" with "build:linux": "rimraf release && electron-builder build --linux --armv7l" in package.json.

Additionally, replace:

               "linux": {
            "target": [
                "AppImage",
                "pacman",
                "snap",
                "rpm",
                "deb"
            ],
            "publish": [
                "github"
            ],
            "icon": "./assets/icon.png",
            "category": "Utility"
        },

with

               "linux": {
            "target": [
                "AppImage"
            ],
            "publish": [
                "github"
            ],
            "icon": "./assets/icon.png",
            "category": "Utility"
        },

I'm not sure if other target types apart from "AppImage" are supported for arm. Also, I think that the app must be build on the Raspberry itself.

tomasdeltell commented 3 years ago

Thank you, I can build the AppImage and the DEB package.

FrogTheFrog commented 2 years ago

I'm archiving this project and therefore closing this issue.