New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing barcode scanner serial interface #1801
Conversation
@@ -35,6 +38,44 @@ const config: ForgeConfig = { | |||
}, | |||
}), | |||
], | |||
hooks: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy paste from here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is quite something! injecting yarn install into the electron build - quite the trick!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was in a rush so did it that way, potentially there is something else we can do. The problem btw is module not found in built version (but fine when running local dev)
@@ -15,6 +15,9 @@ export const mainConfig: Configuration = { | |||
module: { | |||
rules, | |||
}, | |||
externals: { | |||
serialport: 'serialport', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also from here: serialport/node-serialport#2464 (comment)
for (const scanner of SUPPORTED_SCANNERS) { | ||
// const productIds = scanner.products.map(p => p.id); | ||
const deviceInfo = devices.find( | ||
d => d.vendorId === scanner.vendorId // && | ||
d => { | ||
let vendorId = Number('0x' + d.vendorId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vendorId is a string of a hex number (without 0x), so for zebra was: 05E0
Bundle size differenceComparing this PR to
|
Added a bit more in the linked issue, closing for now, I think it should be revisited when we do further barcode work/deployments |
Draft PR trying to use serial interface, using the following configuration for zebra scanner:
it's from our wiki page btw: https://wiki.sussol.net/doku.php/msupply:hardware:barcode_scanner
Building for windows is done with this action (from build test fork):
https://github.com/andreievg/open-msupply-actions-test/blob/develop/.github/workflows/build-test.yaml