Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Manually testing the launcher on all platforms

Hiroto Shioi edited this page Nov 1, 2019 · 4 revisions

This document summarizes the manual testing of cardano-launcher on Linux, Windows, and Mac.

Linux

On Linux, there's a branch v2-integration-diasm that is integrating the new launcher.

How to build the Daedalus with the new launcher.

  1. Clone the repo git clone https://github.com/input-output-hk/daedalus.git
  2. Checkout to branch git checkout v2-integration-diasm
  3. Run the script below
nix-build --argstr backend jormungandr --argstr cluster jormungandr-testnet -A daedalus

Running Daedalus

If the build is successful, run daedalus with script below:

./result/bin/daedalus

Caveat

  • This branched is tagged as DO NOT MERGE so this branch won't be merged.
  • There's no indication of block sync progress on Daedalus. It only shows Starting Cardano Node. I'm assuming this is because the backend is jormungandr which probably does not have API that Daedalus can use to figure out the sync progress.
  • You have to wait for decent amount of time for Daedalus to sync the blockchain

Mac

  • stack version: Version 2.1.3, Git revision 0fa51b9925decd937e4a993ad90cb686f88fa282 (7739 commits) x86_64 hpack-0.31.2
  • Daedalus version: 0.14.0#3.0.3.7144
  • OS version: macOS Sierra 10.12.6
  • commit: b0da31e4a977b947cac5d9d42f898957c7737e01

Running Daedalus

Unfortunately, there's no cross-compilation available for darwin which means you'll have to build the executable on the machine you're testing on.

  1. Clone the repository git clone [email protected]:input-output-hk/cardano-shell.git
  2. Build the cardano-launcher executable using stack with following command
stack install --local-bin-path ./bin cardano-launcher:exe:cardano-launcher

If the build is successful, there should be a bin directory that contains cardano-launcher.

  1. Copy the executable over to Daedalus directory

cp ./cardano-launcher /Applications/Daedalus.app/Contents/MacOS/cardano-launcher

  1. Launch Daedalus from LaunchPad

Running update sytem

1 . Download daedalus installer from website https://daedaluswallet.io/#download 2. Rename the installer to installer.pkg 3. Copy the installer to Daedalus state directory

cp /path/to/installer.pkg ${HOME}/Library/Application Support/Daedalus
  1. Run Daedalus from LaunchPad

Issues

  • The launcher would still delete the installer file even if the user cancels the installation. I've wrote a small script that would check which exitcode does the installer return if the process was cancelled/success and it always return ExitSuccess.
import System.Process
import System.Exit

testInstaller :: FilePath -> IO ExitCode
testInstaller installerPath = do
  let installProcess = proc "open" [installerPath, "-FW"]
  withCreateProcess installProcess (\ _ _ _ ph -> waitForProcess ph)
  • The launcher would fail silently. It will not exit itself without calling popup/error message. This makes it hard for user to figure out what has gone wrong.

Windows

  • Windows version: Window 10 Home version 1903, build 18362.418
  • Daedalus version: 0.14.0#3.0.3.7144
  • Commit: b0da31e4a977b947cac5d9d42f898957c7737e01

Notes

On Windows, launcher-config.yaml had to be modified for the launcher to operate.

launcher-config.yaml

walletLogging: true
nodeArgs:
- --tlsca
- tls/server/ca.crt
- --tlscert
- tls/server/server.crt
- --tlskey
- tls/server/server.key
- --no-client-auth
- --log-console-off
- --update-server
- https://update-cardano-mainnet.iohk.io
- --keyfile
- Secrets-1.0\secret.key
- --topology
- ${DAEDALUS_INSTALL_DIRECTORY}\wallet-topology.yaml
- --wallet-db-path
- Wallet-1.0
- --update-latest-path
- Installer.exe
- --wallet-address
- 127.0.0.1:0
- --update-with-package
statePath: ${APPDATA}\Daedalus
nodePath: ${DAEDALUS_INSTALL_DIRECTORY}\cardano-node.exe
launcherLogsPrefix: Logs\pub
walletArgs: []
nodeDbPath: DB-1.0
workingDir: ${APPDATA}\Daedalus
frontendOnlyMode: true
nodeLogPath: null
logsPrefix: Logs
configuration:
  seed: null
  filePath: ${DAEDALUS_INSTALL_DIRECTORY}\configuration.yaml
  key: mainnet_wallet_win64
  systemStart: null
updateArchive: Installer.exe
updaterArgs: []
updaterPath: Installer.bat
walletPath: ${DAEDALUS_INSTALL_DIRECTORY}\Daedalus.exe
nodeLogConfig: ${DAEDALUS_INSTALL_DIRECTORY}\log-config-prod.yaml
nodeTimeoutSec: 60
tlsPath: tls
x509ToolPath: ${DAEDALUS_INSTALL_DIRECTORY}\cardano-x509-certificates.exe

Running Daedalus

  1. Build the executable with script nix-build updater-test-win.nix
  2. Replace the cardano-launcher.exe with the launcher we've just built (Usually, it's located within D:Daedalus directory)
  3. Replace launcher-config.yaml with modified one (Config file is located in the same directory as launcher)
  4. Run Daedalus from Desktop icon

Running update system

  1. Download Windows daedalus installer from https://daedaluswallet.io/#download
  2. Rename it to Installer
  3. Place the installer within Daedalus state directory (Path should be C:Users/UserName/AppData/Roaming/Daedalus/)
  4. Run Daedalus from Desktop icon

Issues

Some issue showed up while testing on Windows, but they're already fixed.