GithubHelp home page GithubHelp logo

jiabinc / daedalus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from input-output-hk/daedalus

0.0 1.0 0.0 125.57 MB

Daedalus - cryptocurrency wallet

License: MIT License

JavaScript 77.57% Nix 2.26% Gherkin 2.87% Emacs Lisp 0.01% Haskell 4.90% Python 2.59% NSIS 0.06% C 0.19% C++ 0.70% Batchfile 0.49% Shell 0.59% CSS 7.75% HTML 0.03%

daedalus's Introduction

Document maintainer: Nikola Glumac
Document status: Active

Daedalus

Build status Windows build status Release

Daedalus - cryptocurrency wallet

Automated build

CI/dev build scripts

Platform-specific build scripts facilitate building Daedalus the way it is built by the IOHK CI:

Linux/macOS

This script requires Nix, (optionally) configured with the IOHK binary cache.

scripts/build-installer-unix.sh [OPTIONS..]

The result can be found at installers/csl-daedalus/daedalus-*.pkg.

Pure Nix installer build

This will use nix to build a Linux installer. Using the IOHK binary cache will speed things up.

nix build -f ./release.nix mainnet.installer

The result can be found at ./result/daedalus-*.bin.

Nix Shell

shell.nix provides a way to load a shell with all the correct versions of all the required dependencies for development. Run nix-shell in the daedalus directory to start the shell.

shell.nix also provides a script for updating yarn.lock. Run nix-shell -A fixYarnLock to update yarn.lock file.

Windows

This batch file requires Node.js and 7zip.

scripts/build-installer-win64.bat

The result will can be found at .\daedalus-*.exe.

Stepwise build

Install Node.js dependencies.

To ensure secure and reproducible builds we are using yarn to manage dependencies.

$ yarn install

Development

Run with:

$ export CARDANO_TLS_PATH={path-to-cardano-sl}/run/tls-files/
$ yarn run dev

Note: requires a node version >= 8 and an yarn version >= 1.7.0.

Development - with Cardano Wallet

Build and run Cardano SL

Build with:

$ brew install haskell-stack # OR curl -ssl https://get.haskellstack.org/ | sh
$ stack setup
$ stack install cpphs
$ brew install xz # OR sudo apt-get install xz-utils
$ brew install rocksdb # OR sudo apt-get install librocksdb-dev
$ git clone [email protected]:input-output-hk/cardano-sl.git
$ cd cardano-sl/
$ ./scripts/build/cardano-sl.sh

Run with:

$ tmux new-session -s cardano
$ WALLET_CLIENT_AUTH_DISABLE=1 ./scripts/launch/demo-with-wallet-api.sh

Stop with:

$ tmux kill-session -t cardano

Development - network options

There are three different network options you can run Daedalus in: mainnet, testnet and development (default). To set desired network option use NETWORK environment variable:

$ export NETWORK=testnet
$ yarn run dev

Testing

You can run the test suite in two different modes:

One-time run: For running tests once using the application in production mode:

$ yarn run test

Watch & Rerun on file changes: For development purposes run the tests continuously in watch mode which will re-run tests when source code changes:

$ yarn run test:watch

You can find more details regarding tests setup within Running Daedalus acceptance tests README file.

CSS Modules

This boilerplate out of the box is configured to use css-modules.

All .css file extensions will use css-modules unless it has .global.css.

If you need global styles, stylesheets with .global.css will not go through the css-modules loader. e.g. app.global.css

Externals

If you use any 3rd party libraries which can't or won't be built with webpack, you must list them in your webpack.config.base.js๏ผš

externals: [
  // put your node 3rd party libraries which can't be built with webpack here (mysql, mongodb, and so on..)
]

For a common example, to install Bootstrap, yarn install --save bootstrap and link them in the head of app.html

<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css" />
<link rel="image/svg+xml" href="../node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.eot" />
...

Make sure to list bootstrap in externals in webpack.config.base.js or the app won't include them in the package:

externals: ['bootstrap']

Packaging

$ yarn run package

To package apps for all platforms:

$ yarn run package:all

To package apps with options:

$ yarn run package -- --[option]

Options

  • --name, -n: Application name (default: ElectronReact)
  • --version, -v: Electron version (default: latest version)
  • --asar, -a: asar support (default: false)
  • --icon, -i: Application icon
  • --all: pack for all platforms

Use electron-packager to pack your app with --all options for darwin (osx), linux and win32 (windows) platform. After build, you will find them in release folder. Otherwise, you will only find one for your os.

daedalus's People

Contributors

dominikguzei avatar nikolaglumac avatar darko-mijic avatar thedanheller avatar domenkozar avatar deepfire avatar rvl avatar cleverca22 avatar jmitchell avatar marcushurney avatar georgeee avatar disassembler avatar dniku avatar akegalj avatar adlk avatar volhovm avatar jagajaga avatar naryl avatar fersel avatar ktorz avatar nikosbentenitis avatar rockbmb avatar amias-iohk avatar flyingleafe avatar gromakovsky avatar globin avatar sebastiengllmt avatar int-index avatar

Watchers

James Cloos avatar

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.