Skip to content

Commit

Permalink
Merge branch 'development' into cpp_dbg_db
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan63 committed Feb 20, 2024
2 parents 28e6421 + 539601b commit 236f538
Show file tree
Hide file tree
Showing 1,626 changed files with 36,377 additions and 67,044 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Cancel previous jobs
on:
workflow_run:
workflows: ["CI"]
types:
- requested
jobs:
cancel:
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
workflow_id: ${{ github.event.workflow.id }}
702 changes: 365 additions & 337 deletions .github/workflows/main.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,4 @@ tests/server/test.js.map
lib.sexp
src/compiler/version.ml
tests/party
tests/misc/projects/Issue10863/error.log
4 changes: 4 additions & 0 deletions .vscode/schemas/define.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
"reserved": {
"type": "boolean",
"markdownDescription": "Reserved defines may not be defined from the command line."
},
"deprecated": {
"type": "string",
"markdownDescription": "Reason for the define to be deprecated."
}
},
"required": [
Expand Down
3 changes: 1 addition & 2 deletions .vscode/schemas/meta.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
"flash",
"php",
"cpp",
"cs",
"java",
"jvm",
"python",
"hl",
"eval"
Expand Down
26 changes: 8 additions & 18 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ devcontainer:
ocaml-nox \
camlp5 \
opam \
libpcre3-dev \
libpcre2-dev \
zlib1g-dev \
libgtk2.0-dev \
libmbedtls-dev \
Expand Down Expand Up @@ -91,8 +91,11 @@ devcontainer:
RUN git config --global codespaces-theme.hide-status 1

# Install OCaml libraries
COPY opam .
COPY haxe.opam .
RUN opam init --disable-sandboxing
RUN opam switch create 4.08.1
RUN eval $(opam env)
RUN opam env
RUN opam install . --yes --deps-only --no-depexts
RUN opam list
RUN ocamlopt -v
Expand Down Expand Up @@ -218,7 +221,6 @@ xmldoc:
RUN haxelib newrepo
RUN haxelib git hxcpp https://github.com/HaxeFoundation/hxcpp
RUN haxelib git hxjava https://github.com/HaxeFoundation/hxjava
RUN haxelib git hxcs https://github.com/HaxeFoundation/hxcs
RUN haxe doc.hxml

ARG COMMIT
Expand Down Expand Up @@ -268,11 +270,6 @@ test-environment-php:
DO +INSTALL_PACKAGES --PACKAGES="php-cli php-mbstring php-sqlite3"
SAVE IMAGE --cache-hint

test-environment-cs:
FROM +test-environment
DO +INSTALL_PACKAGES --PACKAGES="mono-devel mono-mcs"
SAVE IMAGE --cache-hint

test-environment-hl:
FROM +test-environment
DO +INSTALL_PACKAGES --PACKAGES="cmake ninja-build libturbojpeg-dev libpng-dev zlib1g-dev libvorbis-dev libsqlite3-dev"
Expand All @@ -281,7 +278,7 @@ test-environment-hl:
test-environment-lua:
# hererocks uses pip
FROM +test-environment-python
DO +INSTALL_PACKAGES --PACKAGES="libssl-dev libreadline-dev python3-pip unzip libpcre3-dev cmake"
DO +INSTALL_PACKAGES --PACKAGES="libssl-dev libreadline-dev python3-pip unzip libpcre2-dev cmake"
RUN ln -s /root/.local/bin/hererocks /bin/
SAVE IMAGE --cache-hint

Expand Down Expand Up @@ -358,12 +355,6 @@ test-jvm:
ENV GITHUB_ACTIONS=$GITHUB_ACTIONS
DO +RUN_CI --TEST=jvm

test-cs:
FROM +test-environment-cs
ARG GITHUB_ACTIONS
ENV GITHUB_ACTIONS=$GITHUB_ACTIONS
DO +RUN_CI --TEST=cs

test-php:
FROM +test-environment-php
ARG GITHUB_ACTIONS
Expand All @@ -386,7 +377,7 @@ test-flash:
FROM +test-environment-flash
ARG GITHUB_ACTIONS
ENV GITHUB_ACTIONS=$GITHUB_ACTIONS
DO +RUN_CI --TEST=flash9
DO +RUN_CI --TEST=flash

test-all:
ARG TARGETPLATFORM
Expand All @@ -397,9 +388,8 @@ test-all:
BUILD +test-python
BUILD +test-java
BUILD +test-jvm
BUILD +test-cs
BUILD +test-cpp
# BUILD +test-lua
BUILD +test-lua
BUILD +test-js
BUILD +test-flash

Expand Down
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,14 @@ PACKAGE_FILE_NAME=haxe_$(COMMIT_DATE)_$(COMMIT_SHA)
HAXE_VERSION=$(shell $(CURDIR)/$(HAXE_OUTPUT) -version 2>&1 | awk '{print $$1;}')
HAXE_VERSION_SHORT=$(shell echo "$(HAXE_VERSION)" | grep -oE "^[0-9]+\.[0-9]+\.[0-9]+")

NEKO_VERSION=2.3.0
NEKO_MAJOR_VERSION=$(shell echo "$(NEKO_VERSION)" | grep -oE "^[0-9]+")
NEKO_VERSION_TAG=v$(shell echo "$(NEKO_VERSION)" | sed "s/\./-/g")

ifneq ($(STATICLINK),0)
LIB_PARAMS= -cclib '-Wl,-Bstatic -lpcre -lz -lmbedtls -lmbedx509 -lmbedcrypto -Wl,-Bdynamic '
LIB_PARAMS= -cclib '-Wl,-Bstatic -lpcre2-8 -lz -lmbedtls -lmbedx509 -lmbedcrypto -Wl,-Bdynamic '
else
LIB_PARAMS?= -cclib -lpcre -cclib -lz -cclib -lmbedtls -cclib -lmbedx509 -cclib -lmbedcrypto
LIB_PARAMS?= -cclib -lpcre2-8 -cclib -lz -cclib -lmbedtls -cclib -lmbedx509 -cclib -lmbedcrypto
endif
ifeq ($(SYSTEM_NAME),Mac)
LIB_PARAMS+= -cclib '-framework Security -framework CoreFoundation'
Expand Down Expand Up @@ -158,22 +162,20 @@ xmldoc:
$(CURDIR)/$(HAXELIB_OUTPUT) newrepo && \
$(CURDIR)/$(HAXELIB_OUTPUT) git hxcpp https://github.com/HaxeFoundation/hxcpp && \
$(CURDIR)/$(HAXELIB_OUTPUT) git hxjava https://github.com/HaxeFoundation/hxjava && \
$(CURDIR)/$(HAXELIB_OUTPUT) git hxcs https://github.com/HaxeFoundation/hxcs && \
PATH="$(CURDIR):$(PATH)" $(CURDIR)/$(HAXE_OUTPUT) doc.hxml

$(INSTALLER_TMP_DIR):
mkdir -p $(INSTALLER_TMP_DIR)

$(INSTALLER_TMP_DIR)/neko-osx64.tar.gz: $(INSTALLER_TMP_DIR)
wget -nv https://github.com/HaxeFoundation/neko/releases/download/v2-3-0/neko-2.3.0-osx64.tar.gz -O installer/neko-osx64.tar.gz
wget -nv https://github.com/HaxeFoundation/neko/releases/download/$(NEKO_VERSION_TAG)/neko-$(NEKO_VERSION)-osx64.tar.gz -O installer/neko-osx64.tar.gz

# Installer

package_installer_mac: $(INSTALLER_TMP_DIR)/neko-osx64.tar.gz package_unix
$(eval OUTFILE := $(shell pwd)/$(PACKAGE_OUT_DIR)/$(PACKAGE_FILE_NAME)_installer.tar.gz)
$(eval PACKFILE := $(shell pwd)/$(PACKAGE_OUT_DIR)/$(PACKAGE_FILE_NAME)_bin.tar.gz)
$(eval VERSION := $(shell $(CURDIR)/$(HAXE_OUTPUT) -version 2>&1))
$(eval NEKOVER := $(shell neko -version 2>&1))
bash -c "rm -rf $(INSTALLER_TMP_DIR)/{resources,pkg,tgz,haxe.tar.gz}"
mkdir $(INSTALLER_TMP_DIR)/resources
# neko - unpack to change the dir name
Expand All @@ -186,6 +188,8 @@ package_installer_mac: $(INSTALLER_TMP_DIR)/neko-osx64.tar.gz package_unix
cd $(INSTALLER_TMP_DIR)/resources && tar -zcvf haxe.tar.gz haxe
# scripts
cp -rf extra/mac-installer/* $(INSTALLER_TMP_DIR)/resources
sed -i '' 's/%%NEKO_VERSION%%/$(NEKO_VERSION)/g' $(INSTALLER_TMP_DIR)/resources/scripts/neko-postinstall.sh
sed -i '' 's/%%NEKO_MAJOR_VERSION%%/$(NEKO_MAJOR_VERSION)/g' $(INSTALLER_TMP_DIR)/resources/scripts/neko-postinstall.sh
cd $(INSTALLER_TMP_DIR)/resources && tar -zcvf scripts.tar.gz scripts
# installer structure
mkdir -p $(INSTALLER_TMP_DIR)/pkg
Expand All @@ -201,12 +205,12 @@ package_installer_mac: $(INSTALLER_TMP_DIR)/neko-osx64.tar.gz package_unix
sed -i '' 's/%%VERSION%%/$(VERSION)/g' PackageInfo ;\
sed -i '' 's/%%VERSTRING%%/$(VERSION)/g' PackageInfo ;\
sed -i '' 's/%%VERLONG%%/$(VERSION)/g' PackageInfo ;\
sed -i '' 's/%%NEKOVER%%/$(NEKOVER)/g' PackageInfo ;\
sed -i '' 's/%%NEKOVER%%/$(NEKO_VERSION)/g' PackageInfo ;\
cd .. ;\
sed -i '' 's/%%VERSION%%/$(VERSION)/g' Distribution ;\
sed -i '' 's/%%VERSTRING%%/$(VERSION)/g' Distribution ;\
sed -i '' 's/%%VERLONG%%/$(VERSION)/g' Distribution ;\
sed -i '' 's/%%NEKOVER%%/$(NEKOVER)/g' Distribution ;\
sed -i '' 's/%%NEKOVER%%/$(NEKO_VERSION)/g' Distribution ;\
sed -i '' 's/%%INSTKB%%/$$INSTKBH/g' Distribution"
# repackage
cd $(INSTALLER_TMP_DIR)/pkg; xar --compression none -cf ../$(PACKAGE_FILE_NAME).pkg *
Expand Down
11 changes: 7 additions & 4 deletions Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ CC_CMD=($(COMPILER) $(ALL_CFLAGS) -c $< 2>tmp.cmi && $(FILTER)) || ($(FILTER) &&
endif

ifeq ($(STATICLINK),0)
LIB_PARAMS = -cclib -lpcre -cclib -lz -cclib -lcrypt32 -cclib -lmbedtls -cclib -lmbedcrypto -cclib -lmbedx509
LIB_PARAMS = -cclib -lpcre2-8 -cclib -lz -cclib -lcrypt32 -cclib -lmbedtls -cclib -lmbedcrypto -cclib -lmbedx509
endif

PACKAGE_FILES=$(HAXE_OUTPUT) $(HAXELIB_OUTPUT) std \
"$$(cygcheck $(CURDIR)/$(HAXE_OUTPUT) | grep zlib1.dll | sed -e 's/^\s*//')" \
"$$(cygcheck $(CURDIR)/$(HAXE_OUTPUT) | grep libpcre-1.dll | sed -e 's/^\s*//')" \
"$$(cygcheck $(CURDIR)/$(HAXE_OUTPUT) | grep libpcre2-8-0.dll | sed -e 's/^\s*//')" \
"$$(cygcheck $(CURDIR)/$(HAXE_OUTPUT) | grep libmbedcrypto.dll | sed -e 's/^\s*//')" \
"$$(cygcheck $(CURDIR)/$(HAXE_OUTPUT) | grep libmbedtls.dll | sed -e 's/^\s*//')" \
"$$(cygcheck $(CURDIR)/$(HAXE_OUTPUT) | grep libmbedx509.dll | sed -e 's/^\s*//')"
Expand All @@ -75,13 +75,15 @@ package_choco:
mkdir -p OUTPUT
7z x -y out/$(PACKAGE_FILE_NAME)_bin.zip -oout > log.txt || type log.txt
mv out/$(PACKAGE_FILE_NAME) out/choco
sed -e 's/@SNAPSHOT_VERSION@/$(HAXE_VERSION_SHORT)-SNAP$(COMMIT_DATE)/g' extra/choco/haxe.nuspec > out/choco/haxe.nuspec
cp extra/choco/haxe.nuspec out/choco/haxe.nuspec
sed -i 's/@SNAPSHOT_VERSION@/$(HAXE_VERSION_SHORT)-SNAP$(COMMIT_DATE)/g' out/choco/haxe.nuspec
sed -i 's/@NEKO_VERSION@/$(NEKO_VERSION)/g' out/choco/haxe.nuspec
cd out/choco && choco pack
mv out/choco/haxe.*.nupkg out
rm -rf out/choco

$(INSTALLER_TMP_DIR)/neko-win.zip: $(INSTALLER_TMP_DIR)
wget -nv https://github.com/HaxeFoundation/neko/releases/download/v2-3-0/neko-2.3.0-win$(NEKO_ARCH_STR).zip -O installer/neko-win.zip
curl -L https://github.com/HaxeFoundation/neko/releases/download/$(NEKO_VERSION_TAG)/neko-$(NEKO_VERSION)-win$(NEKO_ARCH_STR).zip -o installer/neko-win.zip

package_installer_win: $(INSTALLER_TMP_DIR)/neko-win.zip package_win
$(eval OUTFILE := $(PACKAGE_OUT_DIR)/$(PACKAGE_FILE_NAME)_installer.zip)
Expand All @@ -104,6 +106,7 @@ package_installer_win: $(INSTALLER_TMP_DIR)/neko-win.zip package_win
sed -i "s/%%VERSION%%/$(HAXE_VERSION_SHORT)/g" $(INSTALLER_TMP_DIR)/installer.nsi
sed -i "s/%%VERSTRING%%/$(HAXE_VERSION)/g" $(INSTALLER_TMP_DIR)/installer.nsi
sed -i "s/%%VERLONG%%/$(HAXE_VERSION)/g" $(INSTALLER_TMP_DIR)/installer.nsi
sed -i "s/%%NEKO_VERSION%%/$(NEKO_VERSION)/g" $(INSTALLER_TMP_DIR)/installer.nsi
cd $(INSTALLER_TMP_DIR) && makensis installer.nsi
7z a -r -tzip $(OUTFILE) $(INSTALLER_TMP_DIR)/*.exe
dir $(PACKAGE_OUT_DIR)
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ Haxe allows you to compile for the following targets:

* JavaScript
* C++
* C#
* Java
* JVM
* Lua
* PHP 7
Expand Down
3 changes: 2 additions & 1 deletion dune
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
(data_only_dirs extra lib std tests)
(dirs :standard \ tests std extra)
(data_only_dirs lib)
4 changes: 2 additions & 2 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(lang dune 1.11)
(lang dune 3.0)
(name haxe)

(package
Expand All @@ -7,4 +7,4 @@

(package
(name haxe_prebuild)
)
)
6 changes: 3 additions & 3 deletions extra/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ You need to install some native libraries as well as some OCaml libraries.
To install the native libraries, use the appropriate system package manager.

* Mac OS X
* Use [Homebrew](https://brew.sh/), `brew install zlib pcre`.
* Use [Homebrew](https://brew.sh/), `brew install zlib pcre2 mbedtls`.
* Debian / Ubuntu
* `sudo apt install libpcre3-dev zlib1g-dev`.
* `sudo apt install libpcre2-dev zlib1g-dev libmbedtls-dev`.
* Windows (Cygwin)
* Run the Cygwin [setup-x86_64.exe](https://cygwin.com/install.html) against the Cygwin installation directory. Install `make`, `git`, `zlib-devel`, `libpcre-devel`, `mingw64-x86_64-gcc-core`, `mingw64-x86_64-zlib`, and `mingw64-x86_64-pcre`. You may need to select "Not Installed" in the dropdown list to see the packages. Copy `zlib1.dll` and `libpcre-1.dll` from `path/to/cygwin/usr/x86_64-w64-mingw32/sys-root/mingw/bin` to the checked out Haxe source directory.
* Run the Cygwin [setup-x86_64.exe](https://cygwin.com/install.html) against the Cygwin installation directory. Install `make`, `git`, `zlib-devel`, `libpcre2-devel`, `mingw64-x86_64-gcc-core`, `mingw64-x86_64-zlib`, and `mingw64-x86_64-pcre2`. You may need to select "Not Installed" in the dropdown list to see the packages. Copy `zlib1.dll` and `libpcre2-8-0.dll` from `path/to/cygwin/usr/x86_64-w64-mingw32/sys-root/mingw/bin` to the checked out Haxe source directory.
* Install Neko by either
* Download the [Neko binaries](https://nekovm.org/download/), and add the extracted directory to the beginning of PATH.
* Install the [Chocolatey Neko package](https://chocolatey.org/packages/neko).
Expand Down
Loading

0 comments on commit 236f538

Please sign in to comment.