Skip to content

Commit

Permalink
[make] Use haxelib git to install hxcpp
Browse files Browse the repository at this point in the history
Installing from lib.haxe.org via ssl causes problems.

On Mac, it downloads incorrectly whenever the `--quiet` flag is used.

On Windows, it gives the error:
```
Error: Failed with error: X509 - Certificate verification failed, e.g. CRL, CA or signature check failed
```
  • Loading branch information
tobil4sk committed Sep 3, 2024
1 parent 56eaaf0 commit c8c6935
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,16 @@ HAXELIB_INTERP=HAXE_STD_PATH=$(HAXE_STD_PATH) $(CURDIR)/$(HAXE_OUTPUT) \
--hxb-lib $(HAXELIB_SRC_PATH)/haxelib_hxb.zip \
--run haxelib.client.Main

haxelib_hxcpp: $(HAXELIB_SRC_PATH)/haxelib_hxb.zip
$(HAXELIB_INTERP) config > /dev/null || $(HAXELIB_INTERP) newrepo
$(HAXELIB_INTERP) path hxcpp > /dev/null || \
($(HAXELIB_INTERP) git hxcpp https://github.com/HaxeFoundation/hxcpp.git && \
hxcpp_path=`$(HAXELIB_INTERP) libpath hxcpp` && \
$(CURDIR)/$(HAXE_OUTPUT) --cwd $$hxcpp_path/tools/hxcpp compile.hxml)

# haxelib should depends on haxe, but we don't want to do that...
# since haxelib isn't available in PATH yet, we have to pass -D no-compilation and build manually
haxelib: $(HAXELIB_SRC_PATH)/haxelib_hxb.zip
$(HAXELIB_INTERP) config > /dev/null || $(HAXELIB_INTERP) newrepo
$(HAXELIB_INTERP) path hxcpp > /dev/null || $(HAXELIB_INTERP) install hxcpp --quiet
haxelib: $(HAXELIB_SRC_PATH)/haxelib_hxb.zip haxelib_hxcpp
hxcpp_path=`$(HAXELIB_INTERP) libpath hxcpp` \
HAXE_STD_PATH=$(HAXE_STD_PATH) $(CURDIR)/$(HAXE_OUTPUT) --cwd $(HAXELIB_SRC_PATH) \
client_cpp.hxml -D destination=../../../../$(HAXELIB_OUTPUT) -D no-compilation -D hxcpp.path=$$hxcpp_path
Expand Down

0 comments on commit c8c6935

Please sign in to comment.