Giter Club home page Giter Club logo

barcode-to-pc-server's Introduction

Barcode to PC server

Links

Server

App

Overview

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.

Setup

  1. Install the required System dependencies:

    • Node.js v14
    • Python 3
    • If you're building on macOS, run: brew install glib
  2. 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:

Run

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

Release

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 the repo permissions
  • The installer will be put in the electron/dist/ folder.
  • If you get sass errors run cd ../ionic && npm rebuild node-sass --force

Code Signing

  1. Set certificateSubjectName or certificateSha1 parameter in the package.json
  2. Connect the physical token (Use the Microsoft Remote Desktop app to share the token with virtual machines)
  3. Run npm run publish

Resources:

Simulate updates

  1. Install minio as explained here
  2. 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

Publishing updates

The server implements electron-update.

To publish an update:

  1. Draft a new release on GitHub and name it v<new version number>
  2. Increase the version number of the package.json
  3. Commit & push the changes
  4. Add a tag and name it v<new version number>
  5. Push the tag
  6. 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.

Translations

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.