Skip to content

A GUI based application to flash Krux firmware on K210 based devices (WIP)

License

Notifications You must be signed in to change notification settings

selfcustody/krux-installer

Repository files navigation

Krux Installer

Build main branch

Krux Installer (alpha versions) aims to be a GUI based tool to build, flash and debug Krux

As it now, the generated application execute, without typing any command in terminal.

For more information, see flash the firmware onto the device.

Tested machines

  • Linux:
    • Archlinux;
    • Ubuntu;
  • Windows:
    • Windows 10

Untested machines

  • MacOS

Install

Build from source

Download nodejs

First of all, you will need Node.js installed in you system. We recommend use the latest LTS version.

Download from Node.js binaries

You can install node.js in your system downloading it from official nodejs website and following provided instructions.

Download from NVM (Node Version Manager)

Alternatively, if you have a linux or macos system, you can have multiple versions of Node.js using nvm.

To install nvm, follow the instructions.

Once installed, we recomend to install the latest LTS node:

nvm install --lts

Download repository

Now you can download the source code:

git clone https://github.com/qlrd/krux-installer.git

Install dependencies

Install all dependencies:

yarn install

Additionaly, you can upgrade dependencies to its latest versions. Have some caution with this command, once that executing this command can broke some functionalities, mainly those related to the use of google-chrome and chromiumdriver in E2e tests.

TIP: Before execute this command, always check the latest supported chromium version at Electron Stable Releases page

yarn upgrade-interactive --latest

Live compile to development environment

When a change is made, we recommend to execute dev subcommand:

yarn run dev

if you want to show some debug messages:

DEBUG=krux:* yarn run dev

Debug development app with VSCode/VSCodium

If you're codding with VSCode/VSCodium, go to Run and Debug tab and select Debug App:

VScodium Debug

Test

Prepare tests

To test, you need to write specification tests under pageobjects definitions:

  • You can write your own E2E specification test files on test/e2e/specs folder;

  • You can define the [PageObjects] on test/e2e/pageobjects folder.

Before run tests, you will need to build the application.

Build

Before running build, verify builder config to setup the build target on specific os (Operational System).

The <target> depends depends on the running platform (i.e., linux, darwin -- MacOS, and win32 -- Windows).

For more information, see Electron Builder page.

Run all tests

The wdio.conf.mts is configured to check if your system have krux.zip.* resources.

  • If not, it will, run all tests, including download tests;
  • If yes, it will skip tests that download resources.
yarn run build

If you want to build a specific target to a specifi os, run

yarn run build --<os> <target>

If you want to debug some messages, add the DEBUG environment variable.

In linux/mac:

DEBUG=krux:* yarn run build --<os> <target>
Run tests

To run all tests in command line:

NODE_ENV=test yarn run e2e

Debug test in VSCode/VSCodium

If you're codding with VSCode/VSCodium, the NODE_ENV variable is already configured. To run, tests, go to Run and Debug tab and select Test E2E App:

VScodium E2E test