Server
- 💾 Download (Windows, macOS and Linux): https://barcodetopc.com/#download-server
- 📁 Source-code: https://github.com/fttx/barcode-to-pc-server
App
- 📱Download (Android): https://play.google.com/store/apps/details?id=com.barcodetopc
- 📱 Download (iOS): https://itunes.apple.com/app/id1180168368
- 📁 Source-code: https://github.com/fttx/barcode-to-pc-app
The project is divided into two modules/folders:
- electron: contains the core, native dependencies, and helper scripts
- ionic: user interface
When executing npm commands make sure to change the current directory to electron: cd electron
.
-
Install the required System dependencies:
- Node.js v14
- Python 3
- If you're building on macOS, run:
brew install glib
-
Clone the repository
git clone https://github.com/fttx/barcode-to-pc-server/ cd barcode-to-pc-server cd electron npm install
If you get errors check these links:
- nutjs.dev: https://nutjs.dev/tutorials/first_steps
- electron-builder: https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build#linux
- node_mdns: https://github.com/agnat/node_mdns#installation
The npm start
command:
- Runs the Electron app in development mode
- Launches the ionic project in livereload mode
Notes:
- If you're editing the electron folder, you have to quit the server and run it again. Use the F6 button on Visual Studio Code.
- If you're using Windows use the PowerShell
npm run build # builds the angular project in prod mode and generates the signed installer for the current platform
npm run publish # same as build, but uploads the installer to GitHub releases
- To enable the publishing to GitHub releases set
GH_TOKEN
environment variable and give all therepo
permissions - The installer will be put in the electron/dist/ folder.
- If you get sass errors run
cd ../ionic && npm rebuild node-sass --force
- Set
certificateSubjectName
orcertificateSha1
parameter in the package.json - Connect the physical token (Use the Microsoft Remote Desktop app to share the token with virtual machines)
- Run
npm run publish
Resources:
- Install minio as explained here
- Run
./node_modules/.bin/electron-builder --project ./dist/ -c.compression=store --config.publish.provider=s3 --config.publish.endpoint=http://IP:9000 --config.publish.bucket=test-update
The server implements electron-update.
To publish an update:
- Draft a new
release on GitHub
and name it
v<new version number>
- Increase the version number of the package.json
- Commit & push the changes
- Add a tag and name it
v<new version number>
- Push the tag
- Run
npm run publish
Note: for macOS delete the electron/electron-resources/*.rtf
folder and run: npm run publish
At this point if all looks good the only thing left to do is to publish the Github release draft.
Language | Contributors |
---|---|
Chinese | - |
Deutsch | Bruno Wenger |
Español | Juan Manuel |
Italiano | Francesco Accardi |
English | Filippo Tortomasi |
Arabic | Bassam Mawardi |
Are you fluent in any other language than English? If you found a typo, or want to help translate Barcode to PC, get in touch here.