Multibit-Legacy / multibit-hd

Deprecated Bitcoin Wallet
https://multibit.org/blog/2017/07/26/multibit-shutdown.html
Other
173 stars 114 forks source link

Linux installer requires improvement #126

Closed gary-rowe closed 9 years ago

gary-rowe commented 10 years ago

The Linux installer should provide the following features:

We should also consider apt-get and rpm packaging for later.

gary-rowe commented 10 years ago

We'll need the installer to do the following automatically for Ubuntu but including the process here means we can support alternative Linux distros:

Install JDK 7

For OpenJDK 7

$ sudo apt-get install openjdk-7-jdk 

For Oracle JDK7 (from the webup8 team):

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java7-installer

Install MultiBit HD

Get multibit-hd.jar from the build Move it into /opt/multibit-hd:

$ mv multibit-hd.jar /opt/multibit-hd

Get trademark-logo.png from the build (or website) and copy it into Unity:

$ cp trademark-logo.png /usr/share/pixmaps/multibit-hd.png

Create a launch script:

$ gedit /opt/multibit-hd/multibit-hd.sh

Fill in the contents using this template (to ensure Bitcoin URIs are transferred):

#!/bin/sh
exec java -jar /opt/multibit-hd/multibit-hd.jar "$@"

Save it, make it executable and create a symlink to it:

$ chmod +x /opt/multibit-hd/multibit-hd.sh
$ cd /usr/bin
$ ln -s /opt/multibit-hd/multibit-hd.sh multibit-hd

Create a desktop file:

$ gedit multibit-hd.desktop

Fill in the contents using this template:

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=java -jar /opt/multibit-hd.jar %U
Name[en_US]=MultiBit HD
Comment=Secure lightweight international Bitcoin wallet
Comment[en_US]=Secure lightweight international Bitcoin wallet
Name=MultiBit HD
Categories=Network;
MimeType=x-scheme-handler/bitcoin;

Install it into Unity and update the desktop database to register the protocol handler:

$ desktop-file-install multibit-hd.desktop
$ update-desktop-database

Verify that MultiBit HD appears in the Unity dashboard and launches correctly under the following scenarios:

gary-rowe commented 9 years ago

As part of this update I've bumped the JRE version to JRE1.7.0_72 using tar.gz downloaded from the main Java download site: http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html. These have been packed and archived into a single downloadable JWrapper environment that can be overlaid on to mbhd-install through a simple unzip operation.

gary-rowe commented 9 years ago

Here's a better version of the above script. It relies on the installer being present in the user directory along with a suitable icon (trademark-logo.png):

Removed script due to errors, see corrected version later

Running the above using sudo ./install-ubuntu.sh develop-SNAPSHOT should result in a nicely integrated MultiBit HD on Ubuntu for the develop-SNAPSHOT version.

gary-rowe commented 9 years ago

To close this issue someone needs to:

owen-kellie-smith commented 9 years ago

No logo and no wallet details for me on Ubuntu 14.04.

Steps taken.

  1. Copied https://multibit.org/releases/multibit-hd-0.0.3/mbhd-0.0.3-linux to ~/mbhd-0.0.3-linux
  2. Copied a logo to ~/trademark-logo.png.
  3. Created install-ubuntu.sh as above.
  4. Executed with sudo ./install-ubuntu.sh 0.0.3
  5. Unity dock didn't show a logo nologo
  6. opened a browser and clicked on MultiBit.org donate link
  7. Multibit HD launched, but with different wallet details nowalletdetails

If I open Multibit HD from a recent build i.e. via java -jar mbhd-install/target/multibit-hd.jar I get wallet details: withdetails

gary-rowe commented 9 years ago

Thanks for taking the time to explore this, Owen - I appreciate the effort. The 0.0.3 release is a bit dated now so it'll be missing those extra bits.

I'm concerned that you're not seeing the icon. I'll revisit this later today to check that I don't have a previously installed icon that's working giving me a false sense of it working.

owen-kellie-smith commented 9 years ago

Thanks Gary. Please can you consider adding a ubuntu-uninstall.sh script to this issue as well ? Would that help ensure the install process is repeatable?

gary-rowe commented 9 years ago

Sure. The uninstall would be limited to /usr/bin and /opt/multibit-hd and removal from Unity.

gary-rowe commented 9 years ago

OK, I found the problem with the graphics. This version should work now. It's in the source code as before, but I'll edit my earlier script in case anyone finds this later.

install-ubuntu.sh (raw) uninstall-ubuntu.sh (raw)

Ready for review and close.

owen-kellie-smith commented 9 years ago

Logo appears now fine in Ubuntu.

owen-kellie-smith commented 9 years ago

Though uninstall only removes one logo.

After install-ubuntu.sh withlogo

After uninstall-ubuntu.sh afteruninstall

and clicking on the plain Multibit HD icon starts Multibit HD

gary-rowe commented 9 years ago

This might be due to an earlier .desktop lurking in one of the Unity locations. Can you verify that there is no MultiBit variant in any of these directories:

If there's nothing in there you may need to use the Privacy tool to clear your history. Open Dash | "Privacy" | Clear history.

owen-kellie-smith commented 9 years ago

Works fine in Ubuntu.

Did as you suggested, and also
sudo rm /usr/bin/mbhd sudo rm /usr/share/applications/mbhd.desktop

Got: nombhd

Copied logo from https://beta.multibit.org/images/common/banner.png and renamed it trademark-logo.png

Reran sudo install-ubuntu.sh 0.0.3

Got: withlogo

owen-kellie-smith commented 9 years ago

Spoke too soon. bitcoin: link doesn't connect to multibitHD any more

nolinkfound

gary-rowe commented 9 years ago

Hmm, works for me. Could you have a poke around the Firefox settings just in case it's lost the application reference?

owen-kellie-smith commented 9 years ago

Firefox Edit > Preferences > Applications [search for bitcoin] returns

prefs

owen-kellie-smith commented 9 years ago

bitcoin: link is now working in Ubuntu.

With current build running (with most recent commit being 9bd73e8b52d08a107fbde981fb709775df0a093b) bitcoin: link doesn't change focus, but if I manually change focus to MBHD then I see the "Payment labelld ... Continue?" message.

With MBHD not running, bitcoin: link starts up current build.

gary-rowe commented 9 years ago

Looks like Ubuntu just needed a nudge. I'll close this one now.