Modified by wuvvy_
Version 3.13.1
-
Install the required dependencies:
- Node.js: https://nodejs.org
- RobotJS: https://github.com/octalmage/robotjs#building
- electron-builder: https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build#linux
- node_mdns: https://github.com/agnat/node_mdns#installation
- If you're building on Windows, install these packages:
- Bonjour SDK for Windows v3.0 (bonjoursdksetup.exe)
- Python 2.7 and Visual C++ Build Environment
- If you're building on macOS, install these packages:
brew install glib
- If you're building on Linux, install these packages:
sudo apt-get install -y libx11-dev libxtst-dev libpng-dev zlib1g-dev icnsutils graphicsmagick libavahi-compat-libdnssd-dev && sudo snap install snapcraft --classic
-
Clone the repository
git clone https://github.com/fttx/barcode-to-pc-server/ cd barcode-to-pc-server npm install
The npm start
command:
- Runs the Electron app in development mode
- Launches the ionic project in livereload mode
Notes:
npm run build
must be called at least once before usingnpm start
- 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 cmd.exe
npm run dist # build the angular project in prod mode and generate the app install files for the current platform, works with Windows/macOS/Linux. Out dir: dist/dist/
npm run publish # build the angular project in prod mode and generate the app installer for the current platform and uploads it 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 dist/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.