Skip to content

Commit

Permalink
Update documentation to mention setup command
Browse files Browse the repository at this point in the history
  • Loading branch information
tobil4sk committed Aug 31, 2024
1 parent dc31a4d commit 05d52f6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 12 deletions.
33 changes: 24 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,38 @@

hxcpp is the runtime support for the c++ backend of the [haxe](http://haxe.org/) compiler. This contains the headers, libraries and support code required to generate a fully compiled executable from haxe code.

## Installing from haxelib

# building the tools
```sh
haxelib install hxcpp
```

## Installing from git

```sh
haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp
```
REPO=$(pwd)
cd ${REPO}/tools/run
haxe compile.hxml
cd ${REPO}/tools/hxcpp
haxe compile.hxml
cd $REPO

Alternatively, if you plan on modifying hxcpp for development, you can clone manually and use `haxelib dev`:

```sh
git clone https://github.com/HaxeFoundation/hxcpp
haxelib dev hxcpp ./hxcpp
```

# cppia
### Build the tools

You first need to build the cppia host.
When installing from git, it is necessary to build the hxcpp build tool:

```sh
haxelib run hxcpp setup
```

### cppia

You first need to build the cppia host.

```sh
REPO=$(pwd)
cd ${REPO}/project
haxe compile-cppia.hxml
Expand Down
4 changes: 3 additions & 1 deletion tools/hxcpp/BuildTool.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1847,6 +1847,8 @@ class BuildTool
Log.println(' ${BOLD}resize${NORMAL} #megabytes -- Only keep #megabytes MB');
Log.println(' ${BOLD}list${NORMAL} -- list cache usage');
Log.println(' ${BOLD}details${NORMAL} -- list cache usage, per file');
Log.println(' ${BOLD}haxelib run hxcpp${NORMAL} ${ITALIC}${WHITE}setup${NORMAL}');
Log.println(' Rebuild the hxcpp build tool');
Log.println('');
}

Expand Down Expand Up @@ -2348,7 +2350,7 @@ class BuildTool
{
var ver = Std.parseInt(inVersion);
if (ver>6)
Log.error("Your version of hxcpp.n is out-of-date. Please update by compiling 'haxe compile.hxml' in hxcpp/tools/hxcpp.");
Log.error("Your version of hxcpp.n is out-of-date. Please update by running 'haxelib run hxcpp setup'");
}

public function resolvePath(inPath:String)
Expand Down
3 changes: 1 addition & 2 deletions tools/run/RunMain.hx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ class RunMain
log('This version of hxcpp ($dir) appears to be a source/developement version.');
log("Before this can be used, you need to:");
log(" 1. Rebuild the main command-line tool, this can be done with:");
log(" cd tools/hxcpp");
log(" haxe compile.hxml");
log(" haxelib run hxcpp setup");
log(" 2. FOR HXCPP API < 330:");
log(" Build the binaries appropriate to your system(s), this can be done with:");
log(" cd project");
Expand Down

0 comments on commit 05d52f6

Please sign in to comment.