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

Manually test the launcher on all platforms #336

Closed
5 of 6 tasks
HirotoShioi opened this issue Oct 28, 2019 · 4 comments
Closed
5 of 6 tasks

Manually test the launcher on all platforms #336

HirotoShioi opened this issue Oct 28, 2019 · 4 comments
Assignees

Comments

@HirotoShioi
Copy link
Contributor

HirotoShioi commented Oct 28, 2019

Manually test the cardano-launcher on all platforms.

Note: I have tested the update system and it works as intended. Means I have tested the update system by launching Daedalus and see if it executes installer file/script.

Windows

  • I have tested and confirmed that the cardano-launcher works as intended
  • I have tested the update system and it works as intended.

Linux

  • I have tested and confirmed that the cardano-launcher works as intended
  • I have tested the update system and it works as intended.

Mac

  • I have tested and confirmed that the cardano-launcher works as intended
  • I have tested the update system and it works as intended.
@HirotoShioi HirotoShioi self-assigned this Oct 28, 2019
@HirotoShioi
Copy link
Contributor Author

HirotoShioi commented Oct 28, 2019

Windows

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

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

#332
#329

@HirotoShioi
Copy link
Contributor Author

HirotoShioi commented Oct 28, 2019

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

@HirotoShioi
Copy link
Contributor Author

HirotoShioi commented Oct 29, 2019

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
Mac version: macOS Sierra 10.12.6
commit: b0da31e

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 ./ cardano-launcher:cardano-launcher

If the build is successful, you should have cardano-launcher on your working directory

  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)

@HirotoShioi
Copy link
Contributor Author

@CodiePP CodiePP added this to the release-node-1.0.0 testing milestone Nov 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants