Building gSender

Let us know how it goes. Depending on how you set the container up you might have to refer to that original github post to copy the build output from the container to your filesystem.

On another note - this linter is annoying! I do not write the way it wants things.. like putting a closing curly brace on the same line as an else..

if(blah) {
//..
} else {
//..
}
1 Like

Here’s my steps that are failing.

  1. Install Node v20
  2. Clone gsender repo, from root gsender folder, checkout branch of your choice (eg dev)
  3. yarn install
  4. yarn build
  5. cd dist/gsender
  6. yarn install
  7. npm install --save @electron/remote
$ npm install electron
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: react-dom@19.1.0
npm error Found: react@18.3.1
npm error node_modules/react
npm error   peer react@">=16.8.0" from @emotion/react@11.14.0
npm error   node_modules/@emotion/react
npm error     @emotion/react@"^11.8.1" from react-select@5.10.1
npm error     node_modules/react-select
npm error       react-select@"*" from @types/react-select@5.0.1
npm error       node_modules/@types/react-select
npm error         dev @types/react-select@"^5.0.1" from the root project
npm error   peer react@">=16.8.0" from @emotion/use-insertion-effect-with-fallbacks@1.2.0
npm error   node_modules/@emotion/use-insertion-effect-with-fallbacks
npm error     @emotion/use-insertion-effect-with-fallbacks@"^1.2.0" from @emotion/react@11.14.0
npm error     node_modules/@emotion/react
npm error       @emotion/react@"^11.8.1" from react-select@5.10.1
npm error       node_modules/react-select
npm error         react-select@"*" from @types/react-select@5.0.1
npm error         node_modules/@types/react-select
npm error   9 more (@sentry/react, @tanstack/react-router, ...)
npm error
npm error Could not resolve dependency:
npm error peer react@"^19.1.0" from react-dom@19.1.0
npm error node_modules/react-dom
npm error   peer react-dom@">=18.0.0 || >=19.0.0" from @tanstack/react-router@1.121.0
npm error   node_modules/@tanstack/react-router
npm error     peer @tanstack/react-router@"^1.121.0" from @tanstack/react-router-devtools@1.121.0
npm error     node_modules/@tanstack/react-router-devtools
npm error       @tanstack/react-router-devtools@"^1.121.0" from @tanstack/router-devtools@1.121.0
npm error       node_modules/@tanstack/router-devtools
npm error     2 more (@tanstack/router-devtools, @tanstack/router-plugin)
npm error   peer react-dom@">=18.0.0 || >=19.0.0" from @tanstack/react-router-devtools@1.121.0
npm error   node_modules/@tanstack/react-router-devtools
npm error     @tanstack/react-router-devtools@"^1.121.0" from @tanstack/router-devtools@1.121.0
npm error     node_modules/@tanstack/router-devtools
npm error       dev @tanstack/router-devtools@"^1.46.7" from the root project
npm error   4 more (@tanstack/react-store, @tanstack/router-devtools, ...)
npm error
npm error Conflicting peer dependency: react@19.1.0
npm error node_modules/react
npm error   peer react@"^19.1.0" from react-dom@19.1.0
npm error   node_modules/react-dom
npm error     peer react-dom@">=18.0.0 || >=19.0.0" from @tanstack/react-router@1.121.0
npm error     node_modules/@tanstack/react-router
npm error       peer @tanstack/react-router@"^1.121.0" from @tanstack/react-router-devtools@1.121.0
npm error       node_modules/@tanstack/react-router-devtools
npm error         @tanstack/react-router-devtools@"^1.121.0" from @tanstack/router-devtools@1.121.0
npm error         node_modules/@tanstack/router-devtools
npm error       2 more (@tanstack/router-devtools, @tanstack/router-plugin)
npm error     peer react-dom@">=18.0.0 || >=19.0.0" from @tanstack/react-router-devtools@1.121.0
npm error     node_modules/@tanstack/react-router-devtools
npm error       @tanstack/react-router-devtools@"^1.121.0" from @tanstack/router-devtools@1.121.0
npm error       node_modules/@tanstack/router-devtools
npm error         dev @tanstack/router-devtools@"^1.46.7" from the root project
npm error     4 more (@tanstack/react-store, @tanstack/router-devtools, ...)
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\Greg\AppData\Local\npm-cache\_logs\2025-06-11T01_41_56_043Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\Greg\AppData\Local\npm-cache\_logs\2025-06-11T01_41_56_043Z-debug-0.log

You built the exe before right? I noticed you didn’t run yarn prepare (that wipes out the previous build). This is what is working for me

(In container terminal)

yarn prepare
yarn install
yarn prebuild-latest
yarn lint
yarn build

(In local terminal - cwd dist/gsender)

yarn install
npm install --save @electron/remote
npx electron-packager . RiftCoderGsender --platform=win32 --arch=x64

Bingo, thx. I had used my fork and didn’t pull the latest from upstream!

Compiled and working. I wonder if they’d accept a PR to add @electron/remote to their config.

1 Like

Great! Yeah I would think they would.. but I don’t know the package managers well enough to fix that at the moment - it’s in the dependencies in package.json but for some reason it’s getting left out. They have 50 different build targets.. and many of those invoke scripts.. so I imagine it might take some effort to unravel.

Success! Thanks to your instructions this was not very hard to do.

It took me about six hours but that’s only because I run a source based system. It took awhile to update my kernel config and then when I got to the first npm command I found out that my nodejs was built without npm. Node takes an hour and half to compile on my system because Google’s V8 engine is huge. The next build will be much quicker.

I opted to not use VSCode so I had to look up some Docker commands. This was my first foray with Docker so I learned a lot.

System Info:

linux kernel gentoo-6.12.31
docker 28.0.1
nodejs 22.13.1
yarn 1.22.22

Commands:

# building from scratch
mkdir gSender_build && cd gSender_build
printf "FROM node:18-bullseye\n" >> Dockerfile
docker build -t gsender-docker-image .

# run the container and start bash
docker run -it --entrypoint /bin/bash --name gsender-docker-container gsender-docker-image

# subsequent builds can start here using the existing gsender-docker-image
docker run -it --entrypoint /bin/bash gsender-docker-image

# skip on subsequent builds
git clone https://github.com/Sienci-Labs/gsender.git gsender

cd gsender
yarn prepare
yarn install
yarn prebuild-latest
yarn lint
yarn build

# now back in host terminal CWD=gSender_build
docker cp gsender-docker-container:/gsender/dist .
docker cp gsender-docker-container:/gsender/bin .
cd dist/gsender
yarn install
npm install electron
npm install electron-packager
npm install --save @electron/remote
npx electron-packager . my-gSender --platform=linux --arch=x64

Thanks again for your help! Now I just need to learn JS and gSender’s code base :laughing:

That’s awesome Michael. I’m sure some folks will be very happy you’ve got a Linux build setup working and documented. It’s good that it is so similar.

1 Like

Let’s pretend I have the ability to make a useful contribution to gSender. Who knows, it might even be true!

With that it mind I was thinking about how best to set things up. This is my plan.

  • Fork Sienci’s repo on GitHub
  • Clone that to my machine and create a branch for my work
  • The build process then clones my local repo
  • If my changes are good merge to master, push to my fork, and submit a PR to Sienci

Does that seem like a sensible way to do things? I don’t think I need or want to edit code inside the container. I’ve never contributed to an open source project before but I do have a couple of small open source projects on my GitHub. I’ve even received a couple of PR’s but never submitted one.

EDIT:
Thinking a bit more and I guess it doesn’t matter whether the build clones my local repo or my fork if I’m working in a separate branch. Sometimes I over complicate things!

Btw love the image - if you want to share your fork I’ll apply some feature branches to my local build :slight_smile:

I’m applying GitHub - siganberg/gsender at feature/allow-negative-thickness-value to mine as well.