Configure Holo the things!
Configure your system and fetch holochain commandline binaries hc (the holochain utility) and holochain (the rust conductor).
Uses native system package management, but there are a lot of Linux distros out there... will fall back to recommending you install something and run the script again. Help us out by submitting patches for your system!
sh -c "$(curl -fsSL https://raw.githubusercontent.com/holochain/hcup/master/hcup-bootstrap.sh)"
(Expects some basic system utilities to be avaliable: sudo, curl, which, tar, etc)
Uses Homebrew.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/holochain/hcup/master/hcup-bootstrap.sh)"
Will install brew if not already installed.
Uses Chocolatey.
In an ADMIN powershell (v5):
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/holochain/hcup/master/hcup-bootstrap.ps1'))
Will install choco.exe if not already installed. Please see Chocolatey Install for information on why an "Admin" Powershell is required.
$ hcup help
usage: hcup [options] <command> <...>
command: help = show this message
command: list = list targets
command: install <target> = run <target> module
command: upgrade = upgrade all selected target modules
option: -v = verbose logging
$ hcup list
holochain - tools needed to run holochain applications
holochain-dev - tools needed to run and build holochain applications
$ hcup install holochain-dev
$ hcup upgrade
System installation / configuration is a very broad target that is almost impossible to manage by a small group of developers. We need your support to test, find problems, and get things working on all your systems!
A: There are several phases to the hcup script.
The "Getting Started" shell one-liners download nodejs binaries for your system / architecture. Nodejs binaries are relatively portable, and pretty easy to build for other systems if we should need to. These scripts include a bundled bootstrap script (Phase 1 below), which is also run everytime you invoke hcup.
- Make sure
${dataDir}/bin/hcup-nodeis a valid nodejs binary - Make sure
gitis installed on the system - Make sure
${dataDir}/repois a current checkout of themasterbranch of this repository
If we are not a "shell one-liner" we also execute the commandline options specified.
A: If the "shell one-liner" is not working, see the next question.
- Make sure your platform is detected properly at the top of
lib/env.js(including thepackageToolproperty), there are some breakout helpers in/lib/env/*.js. - Make sure the
installPackagefunction is properly registered inlib/coreModules/platform/index.jsfor your packageTool. - Test it out! Hopefully That is all that is needed. If your platform uses different package names, you may need to customize the individual modules.
A: The "shell one-liner" is supposed to do the minimal amount of work to get a nodejs application running. Any changes made to the nodejs download / unpackaging should be duplicated in lib/coreModules/node/index.js so that already installed versions of hcup can upgrade in parallel.
- If you are on a platform with a "Bourne"-compatible shell (this includes macOs and most x-nix distributions) you can make additions to
build/hcup-bootstrap.shand rebuild withnpm test. - If you are on Windows, we currently require Powershell version 5 (Because that is when
Expand-Archivewas introduced), We'd love to expand platform coverage, but need your help to do so. You can editbuild/hcup-bootstrap.ps1and rebuild withnpm test. PLEASE keep all files encoded as utf-8 and unix (\n) line endings. - If you are on a platform with neither of these options, feel free to submit a patch adding another
build/hcup-bootstrap.*script.
A: Please view the issues in this repository for things we still need to do!
Copyright (C) 2019, Holochain Trust
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.