Skip to content

Commit

Permalink
Merge branch 'develop' into 8.3.0-Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtynjala committed Mar 3, 2025
2 parents d7b2b75 + 3aa32e2 commit 9f9a5b9
Show file tree
Hide file tree
Showing 22 changed files with 185 additions and 119 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ jobs:
notify:
runs-on: ubuntu-20.04
needs: [package-haxelib, docs, android, flash-samples, air-samples, hashlink-samples, html5-samples, ios, linux, macos, neko-samples, windows]
needs: [package-haxelib, docs, android, flash-samples, air-samples, hashlink-samples, hashlinkc-samples, html5-samples, ios, linux, macos, neko-samples, windows]
if: ${{ github.repository == 'openfl/lime' && github.event_name != 'pull_request' }}
steps:
- name: Notify Discord
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,12 @@ Lime currently supports the following targets:
lime test hl

Desktop builds are currently designed to be built on the same host OS


Join the Community
==================

Have a question? Want a new place to hang out?

* [Forums](https://community.openfl.org/c/lime/19)
* [Discord](https://discordapp.com/invite/tDgq8EE)
3 changes: 3 additions & 0 deletions docs/ImportAll.hx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ import lime.net.HTTPRequest;
import lime.net.HTTPRequestHeader;
import lime.net.HTTPRequestMethod;
import lime.net.URIParser;
import lime.system.BackgroundWorker;
import lime.system.CFFI;
import lime.system.CFFIPointer;
import lime.system.Clipboard;
Expand All @@ -125,6 +126,7 @@ import lime.system.Sensor;
import lime.system.SensorType;
import lime.system.System;
import lime.system.ThreadPool;
import lime.system.WorkOutput;
import lime.text.harfbuzz.HB;
import lime.text.harfbuzz.HBBlob;
import lime.text.harfbuzz.HBBuffer;
Expand Down Expand Up @@ -169,6 +171,7 @@ import lime.ui.Window;
import lime.ui.WindowAttributes;
import lime.utils.ArrayBuffer;
import lime.utils.ArrayBufferView;
import lime.utils.AssetBundle;
import lime.utils.AssetCache;
import lime.utils.AssetLibrary;
import lime.utils.AssetManifest;
Expand Down
2 changes: 1 addition & 1 deletion project/Build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@
<files id="native-toolkit-harfbuzz" if="LIME_HARFBUZZ" />
<files id="native-toolkit-jpeg" if="LIME_JPEG" />
<files id="native-toolkit-lzma" if="LIME_LZMA" />
<files id="native-toolkit-mbedtls" if="LIME_MBEDTLS" />
<files id="native-toolkit-mbedtls" if="LIME_MBEDTLS" unless="static_link" />
<files id="native-toolkit-mojoal" if="LIME_MOJOAL" />
<files id="native-toolkit-neko" if="LIME_NEKO" />
<files id="native-toolkit-ogg" if="LIME_OGG" />
Expand Down
2 changes: 1 addition & 1 deletion project/lib/curl
Submodule curl updated 2226 files
28 changes: 24 additions & 4 deletions project/lib/curl-files.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<xml>
<include name="${HXCPP}/project/thirdparty/mbedtls_files.xml" noerror="true" if="static_link"/>
<set name="HAS_HXCPP_MBEDTLS_FLAGS" value="1" if="MBEDTLS_DIR" />
<include name="${HXCPP}/src/hx/libs/ssl/Build.xml" unless="MBEDTLS_DIR"/>

<files id="native-toolkit-curl-depends" >
<depend name="${NATIVE_TOOLKIT_PATH}/curl/include/curl/curl.h" />
Expand All @@ -23,7 +26,22 @@
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/zlib/" />

<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/axtls" if="NATIVE_TOOLKIT_HAVE_AXTLS" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/mbedtls/include" if="NATIVE_TOOLKIT_HAVE_MBEDTLS" />

<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/mbedtls/include" if="NATIVE_TOOLKIT_HAVE_MBEDTLS" unless="static_link"/>
<section if="static_link">

<include name="${HXCPP}/project/thirdparty/mbedtls_flags.xml" if="HAS_HXCPP_MBEDTLS_FLAGS" />

<section unless="HAS_HXCPP_MBEDTLS_FLAGS">

<compilerflag value="-I${MBEDTLS_DIR}/include" />
<compilerflag value="-I${HXCPP}/src/hx/libs/ssl" />
<compilerflag value="-I${this_dir}/custom/mbedtls_hxcpp" />
<compilerflag value="-DMBEDTLS_USER_CONFIG_FILE=&lt;mbedtls_config.h&gt;" />

</section>

</section>

<compilerflag value="-DBUILDING_LIBCURL" />
<compilerflag value="-DCURL_STATICLIB" />
Expand All @@ -41,7 +59,6 @@

<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/asyn-ares.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/curl_multibyte.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/idn_win32.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/inet_ntop.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/inet_pton.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/krb5.c" />
Expand All @@ -58,12 +75,12 @@
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/asyn-thread.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/base64.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/bufref.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/cfilters.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/conncache.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/connect.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/content_encoding.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/cookie.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/curl_addrinfo.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/curl_ctype.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/curl_des.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/curl_endian.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/curl_fnmatch.c" />
Expand All @@ -76,19 +93,20 @@
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/curl_threads.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/dict.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/doh.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/dotdot.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/dynbuf.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/easy.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/escape.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/file.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/fileinfo.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/fopen.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/formdata.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/ftp.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/ftplistparser.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/getenv.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/getinfo.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/gopher.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/hash.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/headers.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/hmac.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/hostasyn.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/hostip.c" />
Expand All @@ -103,6 +121,7 @@
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/http_proxy.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/http.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/if2ip.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/idn.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/imap.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/llist.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/md4.c" />
Expand All @@ -113,6 +132,7 @@
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/multi.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/netrc.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/nonblock.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/noproxy.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/parsedate.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/pingpong.c" />
<file name="${NATIVE_TOOLKIT_PATH}/curl/lib/pop3.c" />
Expand Down
Empty file.
5 changes: 5 additions & 0 deletions src/lime/graphics/Image.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,11 @@ class Image
__fromBase64(Base64.encode(bytes), type, onload);
return true;
#elseif (lime_cffi && !macro)
if (bytes == null || bytes.length == 0)
{
return false;
}

var imageBuffer:ImageBuffer = null;

#if !cs
Expand Down
3 changes: 2 additions & 1 deletion src/lime/media/openal/AL.hx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ class AL
public static inline var EFFECT_VOCAL_MORPHER:Int = 0x0007;
public static inline var EFFECT_PITCH_SHIFTER:Int = 0x0008;
public static inline var EFFECT_RING_MODULATOR:Int = 0x0009;
public static inline var FFECT_AUTOWAH:Int = 0x000A;
public static inline var FFECT_AUTOWAH:Int = 0x000A; // TODO: deprecate and remove
public static inline var EFFECT_AUTOWAH:Int = 0x000A;
public static inline var EFFECT_COMPRESSOR:Int = 0x000B;
public static inline var EFFECT_EQUALIZER:Int = 0x000C;
/* Auxiliary Effect Slot properties. */
Expand Down
2 changes: 1 addition & 1 deletion src/lime/system/System.hx
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ class System
#end

/**
Opens a file with the suste, default application.
Opens a file with the system default application.
In a web browser, opens a URL with target `_blank`.
**/
Expand Down
7 changes: 7 additions & 0 deletions templates/cpp/static/BuildMain.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

<include name="${HXCPP}/build-tool/BuildCommon.xml" />

<include name="${HXCPP}/project/thirdparty/mbedtls-files.xml" noerror="true" />
<set name="HAS_HXCPP_MBEDTLS_FILES" value="1" if="MBEDTLS_DIR" />
<include name="${HXCPP}/src/hx/libs/ssl/Build.xml" unless="HAS_HXCPP_MBEDTLS_FILES" />

<files id="main">

<file name="Main.cpp" />
Expand All @@ -11,6 +15,8 @@
<target id="main" output="Main${DBG}" tool="linker" toolid="exe">

<files id="main" />
<files id="mbedtls" if="HAS_HXCPP_MBEDTLS_FILES" />
<files id="hxcpp_ssl" unless="HAS_HXCPP_MBEDTLS_FILES" />
::foreach ndlls::
<lib name="::path::" />::end::

Expand All @@ -35,6 +41,7 @@
<lib name="rpcrt4.lib" />
<lib name="dwrite.lib" />
<lib name="setupapi.lib" />
<lib name="crypt32.lib" />

</section>

Expand Down
4 changes: 2 additions & 2 deletions templates/cpp/static/Main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <stdio.h>

#if defined(HX_WINDOWS) && !defined(HXCPP_DEBUG)
#if defined(HX_WINDOWS) && !defined(HXCPP_DEBUGGER)
#include <windows.h>
#endif

Expand All @@ -14,7 +14,7 @@ ::foreach ndlls::::if (registerStatics)::
extern "C" int ::nameSafe::_register_prims ();::end::::end::


#if defined(HX_WINDOWS) && !defined(HXCPP_DEBUG)
#if defined(HX_WINDOWS) && !defined(HXCPP_DEBUGGER)
int __stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
#else
extern "C" int main(int argc, char *argv[]) {
Expand Down
2 changes: 2 additions & 0 deletions templates/ios/template/{{app.file}}.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@
"\"$(SRCROOT)/::APP_FILE::/lib/x86_64\"",
);
OTHER_LDFLAGS = (
"-lmbedtls_hxcpp",
::foreach ndlls:: "-l::name::",
::end::
::foreach linkedLibraries:: "-l::__current__::",
Expand Down Expand Up @@ -448,6 +449,7 @@
"\"$(SRCROOT)/::APP_FILE::/lib/x86_64\"",
);
OTHER_LDFLAGS = (
"-lmbedtls_hxcpp",
::foreach ndlls:: "-l::name::",
::end::
::foreach linkedLibraries:: "-l::__current__::",
Expand Down
15 changes: 15 additions & 0 deletions templates/ios/template/{{app.file}}/haxe/BuildHxcppMbedtls.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<xml>

<include name="${HXCPP}/project/thirdparty/mbedtls-files.xml" noerror="true" />
<set name="HAS_HXCPP_MBEDTLS_FILES" value="1" if="MBEDTLS_DIR" />
<include name="${HXCPP}/build-tool/BuildCommon.xml" unless="HAS_HXCPP_MBEDTLS_FILES" />
<include name="${HXCPP}/src/hx/libs/ssl/Build.xml" unless="HAS_HXCPP_MBEDTLS_FILES" />

<target id="default" output="libmbedtls_hxcpp${DBG}" tool="linker" toolid="static_link">

<files id="mbedtls" if="HAS_HXCPP_MBEDTLS_FILES" />
<files id="hxcpp_ssl" unless="HAS_HXCPP_MBEDTLS_FILES" />

</target>

</xml>
76 changes: 35 additions & 41 deletions templates/ios/template/{{app.file}}/haxe/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,10 @@ endif

HAXE_BUILDS := $(ARCHS:%=build-haxe-%)

ifeq ("$(ACTION)","clean")
default: clean
else
default: $(HAXE_BUILDS)
endif

ifeq ("$(CONFIGURATION)","Debug")
BUILD_STYLE := Debug
endif

default: debug_print

ifeq ("$(BUILD_STYLE)","Debug")
DEBUG := -debug
CONFIG := Debug
Expand All @@ -31,46 +23,48 @@ ifeq ("$(HAXE_OS)","iphonesimulator")
endif
CONFIG := $(CONFIG)-$(HAXE_OS)

debug_print:
@echo "Make $(HAXE_BUILDS)"

LIB_BASE := build/$(CONFIG)/::CPP_LIBPREFIX::ApplicationMain$(DEBUG)
LIB_DEST := $(DEBUG)/libApplicationMain.a
LIB_MBEDTLS_DEST := $(DEBUG)/libmbedtls_hxcpp.a

build-haxe-i386:
@echo "Haxe simulator build: $(CONFIG)"
haxe Build.hxml -D simulator -cpp build/$(CONFIG) $(DEBUG)
cd build/$(CONFIG); ::HAXELIB_PATH:: export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml $(DEBUG) -options Options.txt
cp build/$(CONFIG)/::CPP_LIBPREFIX::ApplicationMain$(DEBUG).iphonesim.a ../lib/i386$(LIB_DEST)
touch ../Classes/Main.mm
SIMULATOR_ARCH = i386 x86_64

build-haxe-x86_64:
@echo "Haxe simulator build: $(CONFIG)-64"
haxe Build.hxml -D simulator -D HXCPP_M64 -cpp build/$(CONFIG)-64 $(DEBUG)
cd build/$(CONFIG)-64; ::HAXELIB_PATH:: export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml $(DEBUG) -options Options.txt
cp build/$(CONFIG)-64/::CPP_LIBPREFIX::ApplicationMain$(DEBUG).iphonesim-64.a ../lib/x86_64$(LIB_DEST)
touch ../Classes/Main.mm
SUFFIX_i386 =
SUFFIX_x86_64 = -64
SUFFIX_armv6 =
SUFFIX_armv7 = -v7
SUFFIX_arm64 = -64

build-haxe-armv6:
@echo "Haxe device build: $(CONFIG)"
haxe Build.hxml -D HXCPP_ARMV6 -cpp build/$(CONFIG) $(DEBUG)
cd build/$(CONFIG); ::HAXELIB_PATH:: export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml $(DEBUG) -options Options.txt
cp build/$(CONFIG)/::CPP_LIBPREFIX::ApplicationMain$(DEBUG).iphoneos.a ../lib/armv6$(LIB_DEST)
touch ../Classes/Main.mm
HXCPP_FLAGS_i386 = -D simulator
HXCPP_FLAGS_x86_64 = -D simulator -D HXCPP_M64
HXCPP_FLAGS_armv6 = -D HXCPP_ARMV6
HXCPP_FLAGS_armv7 = -D HXCPP_ARMV7
HXCPP_FLAGS_arm64 = -D HXCPP_ARM64

build-haxe-armv7:
@echo "Haxe device build: $(CONFIG)-v7"
haxe Build.hxml -D HXCPP_ARMV7 -cpp build/$(CONFIG)-v7 $(DEBUG)
cd build/$(CONFIG)-v7; ::HAXELIB_PATH:: export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml $(DEBUG) -options Options.txt
cp build/$(CONFIG)-v7/::CPP_LIBPREFIX::ApplicationMain$(DEBUG).iphoneos-v7.a ../lib/armv7$(LIB_DEST)
touch ../Classes/Main.mm
ifeq ("$(ACTION)","clean")
default: clean
else
default: $(HAXE_BUILDS)
endif

build-haxe-arm64:
@echo "Haxe device build: $(CONFIG)-64"
haxe Build.hxml -D HXCPP_ARM64 -cpp build/$(CONFIG)-64 $(DEBUG)
cd build/$(CONFIG)-64; ::HAXELIB_PATH:: export HXCPP_NO_COLOR=1; haxelib run ::CPP_BUILD_LIBRARY:: Build.xml $(DEBUG) -options Options.txt
cp build/$(CONFIG)-64/::CPP_LIBPREFIX::ApplicationMain$(DEBUG).iphoneos-64.a ../lib/arm64$(LIB_DEST)
default: debug_print

debug_print:
@echo "Make $(HAXE_BUILDS)"

$(HAXE_BUILDS): build-haxe-%:
@echo "Haxe $(if $(filter $*,$(SIMULATOR_ARCH)),simulator,device) build: $(CONFIG)$(SUFFIX_$*)"
haxe Build.hxml $(HXCPP_FLAGS_$*) -cpp build/$(CONFIG)$(SUFFIX_$*) $(DEBUG)
cd build/$(CONFIG)$(SUFFIX_$*); ::HAXELIB_PATH:: export HXCPP_NO_COLOR=1; \
haxelib run ::CPP_BUILD_LIBRARY:: Build.xml haxe -Ddestination=$(CURDIR)/../lib/$*$(LIB_DEST) \
-options Options.txt $(DEBUG)
touch ../Classes/Main.mm
cd build/$(CONFIG)$(SUFFIX_$*); ::HAXELIB_PATH:: export HXCPP_NO_COLOR=1; \
::CPP_CACHE_WORKAROUND:: haxelib run ::CPP_BUILD_LIBRARY:: $(CURDIR)/BuildHxcppMbedtls.xml \
-Ddestination=$(CURDIR)/../lib/$*$(LIB_MBEDTLS_DEST) \
-options $(CURDIR)/build/$(CONFIG)$(SUFFIX_$*)/Options.txt $(DEBUG)

clean:
rm -rf build

.PHONY: default debug_print clean $(HAXE_BUILDS)
.SUFFIXES:
2 changes: 2 additions & 0 deletions templates/tvos/PROJ.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@
"\"$(SRCROOT)/::APP_FILE::/lib/x86_64\"",
);
OTHER_LDFLAGS = (
"-lmbedtls_hxcpp",
::foreach ndlls:: "-l::name::",
::end::
::foreach linkedLibraries:: "-l::__current__::",
Expand Down Expand Up @@ -383,6 +384,7 @@
"\"$(SRCROOT)/::APP_FILE::/lib/x86_64\"",
);
OTHER_LDFLAGS = (
"-lmbedtls_hxcpp",
::foreach ndlls:: "-l::name::",
::end::
::foreach linkedLibraries:: "-l::__current__::",
Expand Down
15 changes: 15 additions & 0 deletions templates/tvos/PROJ/haxe/BuildHxcppMbedtls.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<xml>

<include name="${HXCPP}/project/thirdparty/mbedtls-files.xml" noerror="true" />
<set name="HAS_HXCPP_MBEDTLS_FILES" value="1" if="MBEDTLS_DIR" />
<include name="${HXCPP}/build-tool/BuildCommon.xml" unless="HAS_HXCPP_MBEDTLS_FILES" />
<include name="${HXCPP}/src/hx/libs/ssl/Build.xml" unless="HAS_HXCPP_MBEDTLS_FILES" />

<target id="default" output="libmbedtls_hxcpp${DBG}" tool="linker" toolid="static_link">

<files id="mbedtls" if="HAS_HXCPP_MBEDTLS_FILES" />
<files id="hxcpp_ssl" unless="HAS_HXCPP_MBEDTLS_FILES" />

</target>

</xml>
Loading

0 comments on commit 9f9a5b9

Please sign in to comment.