Skip to content

Commit

Permalink
Merge remote-tracking branch 'openfl/develop' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
EliteMasterEric committed May 28, 2024
2 parents 228c1b5 + ecdabf3 commit a243284
Show file tree
Hide file tree
Showing 237 changed files with 9,561 additions and 1,438 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

github: [jgranick]
github: [jgranick, joshtynjala]
patreon: openfl
open_collective: openfl
ko_fi: # Replace with a single Ko-fi username
Expand Down
51 changes: 27 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
unit-test-neko-haxe3:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -28,7 +28,7 @@ jobs:
- name: Setup environment
run: |
haxelib dev openfl $GITHUB_WORKSPACE
haxelib dev openfl ${{ github.workspace }}
- name: Install command aliases
run: |
Expand All @@ -45,7 +45,7 @@ jobs:
haxe-version: [4.0.5, 4.1.5, 4.2.5, 4.3.1]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -67,7 +67,7 @@ jobs:
- name: Setup environment
run: |
haxelib dev openfl $GITHUB_WORKSPACE
haxelib dev openfl ${{ github.workspace }}
- name: Install command aliases
run: |
Expand All @@ -82,9 +82,11 @@ jobs:
strategy:
matrix:
haxe-version: [4.0.5, 4.1.5, 4.2.5, 4.3.1]
runs-on: macos-latest
# AL init fails on both windows and ubuntu
# macos-14 is arm64, which setup-haxe doesn't support yet
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -106,7 +108,7 @@ jobs:
- name: Setup environment
run: |
haxelib dev openfl $GITHUB_WORKSPACE
haxelib dev openfl ${{ github.workspace }}
- name: Install command aliases
run: |
Expand All @@ -120,10 +122,11 @@ jobs:
unit-test-air:
strategy:
matrix:
haxe-version: [3.4.7, 4.0.5, 4.1.5, 4.2.5, 4.3.1]
# until Lime 8.0.3 is release, we can't test Haxe 3.4.7 with AIR
haxe-version: [4.0.5, 4.1.5, 4.2.5, 4.3.1]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand Down Expand Up @@ -151,7 +154,7 @@ jobs:
- name: Setup environment
run: |
haxelib dev openfl $Env:GITHUB_WORKSPACE
haxelib dev openfl ${{ github.workspace }}
- name: Install command aliases
run: |
Expand All @@ -163,10 +166,10 @@ jobs:
haxelib run hxp test -Dtarget=air -Duse-lime-tools --install-hxp-alias
package-haxelib:
runs-on: macos-11
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -187,7 +190,7 @@ jobs:
run: |
haxe run.hxml
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: openfl-haxelib
path: |
Expand All @@ -199,10 +202,10 @@ jobs:
if-no-files-found: error

docs:
runs-on: macos-11
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -221,14 +224,14 @@ jobs:
haxelib install hxp --quiet
haxelib install lime --quiet
haxelib install dox --quiet
haxelib dev openfl $GITHUB_WORKSPACE
haxelib dev openfl ${{ github.workspace }}
- name: Build docs
working-directory: scripts
run: |
haxe docs.hxml
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: openfl-docs
path: docs
Expand Down Expand Up @@ -256,7 +259,7 @@ jobs:
haxelib install actuate --quiet
haxelib git openfl-samples https://github.com/openfl/openfl-samples --quiet
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: openfl-haxelib
path: openfl-haxelib
Expand Down Expand Up @@ -285,7 +288,7 @@ jobs:
html5-samples:
needs: package-haxelib
runs-on: macos-11
runs-on: windows-latest
steps:

- uses: krdlab/setup-haxe@v1
Expand All @@ -294,7 +297,7 @@ jobs:

- name: Set HAXEPATH
run: |
echo "HAXEPATH=$HAXE_STD_PATH/.." >> $GITHUB_ENV
echo "HAXEPATH=$Env:HAXE_STD_PATH\.." >> $Env:GITHUB_ENV
- name: Install Haxe dependencies
run: |
Expand All @@ -303,7 +306,7 @@ jobs:
haxelib install genes --quiet
haxelib git openfl-samples https://github.com/openfl/openfl-samples --quiet
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: openfl-haxelib
path: openfl-haxelib
Expand Down Expand Up @@ -340,7 +343,7 @@ jobs:
flash-samples:
needs: package-haxelib
runs-on: macos-11
runs-on: ubuntu-latest
steps:

- uses: krdlab/setup-haxe@v1
Expand All @@ -357,7 +360,7 @@ jobs:
haxelib install actuate --quiet
haxelib git openfl-samples https://github.com/openfl/openfl-samples --quiet
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: openfl-haxelib
path: openfl-haxelib
Expand Down Expand Up @@ -403,7 +406,7 @@ jobs:
haxelib install actuate --quiet
haxelib git openfl-samples https://github.com/openfl/openfl-samples --quiet
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: openfl-haxelib
path: openfl-haxelib
Expand Down
117 changes: 117 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,120 @@
9.3.3 (03/13/2024)
------------------

* Disabled `useWeakReference` support for `addEventListener()` on cpp target due to incompatibilities (but it is still enabled on html5 target)
* Fixed possibility of setting `scrollH` and `scrollV` outside of allowed range
* Fixed vector graphics rendering incorrectly when `scale9Grid` is set, and added `openfl_force_gl_cacheasbitmap_for_scale9grid` define to re-enable the old behavior
* Fixed socket connect timeout being ignored in some situations
* Fixed `DeviceRotation` and `Geolocation` classes not found when targeting AIR
* Fixed crash when using compressed texture with `Tilemap`
* Fixed crash when highlighting text with ligatures
* Fixed exception on URL encoding when non-string value passed to `URLVariables`
* Fixed missing separator between directory and file in result of `File.getDirectoryListingAsync()`
* Fixed certain classes being exposed to flash target, when they should be available in the air target only
* Fixed `--macro include("openfl")` when targeting flash or air
* Fixed compilation of `FileReference` on non-sys desktop targets
* Fixed `ByteArray` incompatibility with `haxe.io.Bytes`

9.3.2 (11/08/2023)
------------------

* Fixed playback of very long sounds by changing arithmetic to avoid integer overflow
* Fixed exception when calling `draw()` on `BitmapData` when `readable` is `false`
* Fixed `Sound` not playing when calling `play()` immediately after `load()`, but before `Event.COMPLETE`
* Fixed `Sound` incorrectly throwing exception about valid `SampleDataEvent` range when listener generates zero samples
* Fixed `Sound` incorrectly throwing exception about valid `SampleDataEvent` range when `play()` is called between `load()` and `Event.COMPLETE`
* Fixed `Sound` incorrectly continuing to dispatch `SampleDataEvent.SAMPLE_DATA` after a previous dispatch generated zero samples
* Fixed `SoundChannel` ignoring `stop()` when generating audio with `SampleDataEvent.SAMPLE_DATA`
* Fixed `SoundChannel` failing to dispatch `Event.SOUND_COMPLETE` when `SampleDataEvent.SAMPLE_DATA` listener generates zero samples or is stopped
* Fixed `FileReferenceList` not dispatching `Event.CANCEL` when zero files are selected on html5 target, to better match `FileReference`
* Improved error message when calling `Sound.fromFile()` when file cannot be loaded

9.3.1 (10/17/2023)
------------------

* Compatibility fixes for Haxe 3 and Haxe 4.0.x and the npm release

9.3.0 (10/16/2023)
------------------

* Added `SampleDataEvent.SAMPLE_DATA` to `Sound` class
* Added `openfl.net.SecureSocket` class implementation
* Added `openfl.display.NativeWindow` class implementation
* Added partial `openfl.desktop.NativeApplication` implementation, including `applicationID`, `exit()`, `Event.ACTIVATE`, `Event.DEACTIVATE`, `InvokeEvent.INVOKE` for launch command line arguments, and properties to test if features are supported
* Added `openfl.display.Screen` class implementation
* Added `openfl.net.FileReferenceList` class implementation for html5 target
* Added `upload()` implementation to `FileReference` for sys targets
* Added `updateAfterEvent()` to `MouseEvent`, `KeyboardEvent`, `TouchEvent`, and `TimerEvent`
* Added `separator` and `lineEncoding` properties to `File` class
* Added `localPort`, `localAddress`, `remotePort`, and `remoteAddress` to `Socket` class on sys targets
* Added `useWeakReference` support to `addEventListener()` on html5 and cpp targets
* Added support for referencing environment variables, like `%PROGRAMFILES%` in `File` path values on Windows
* Added various enum, event, and error types to improve parity with types available in Adobe AIR
* Added basic implementation of `flash.text.StageText` that falls back to `TextField`, similar to AIR desktop
* Replaced `String` with `EventType` in `FileListEvent`, `DatagramSocketEvent`, and `ServerSocketConnectEvent` for better compile-time checks
* Fixed Flash/AIR compatibility for `DatagramSocketEvent`, and `ServerSocketConnectEvent` classes
* Fixed wrong type on `size` for `FileReference` and `File` to make it `Float` instead of `Int` (Some code may need to use `Std.int()` after this change)
* Fixed missing `controlKey` property on `MouseEvent`
* Fixed missing `Event.OPEN` dispatch from `download()` on `FileReference`
* Fixed corrupted binary files from `download()` on `FileReference`
* Fixed cut and copy not being blocked by `TextField` when `displayAsPassword` is true
* Fixed missing `Event.OPEN`, `HTTPStatusEvent.HTTP_STATUS`, `HTTPStatusEvent.HTTP_RESPONSE_STATUS`, and `DataEvent.UPLOAD_COMPLETE` events from `upload()` on `FileReference`
* Fixed `responseHeaders` on `URLLoader` that should have defaulted to an empty array instead of null
* Fixed `HTTPStatusEvent.HTTP_STATUS` on `URLLoader`, which should not have included `responseURL` and `responseHeaders`
* Fixed missing `HTTPStatusEvent.HTTP_RESPONSE_STATUS` on `URLLoader`, which is where `responseURL` and `responseHeaders` should have been
* Fixed runtime exception when using hardware-only texture with `beginBitmapFill()` by drawing black rectangle instead
* Fixed `BackgroundWorker` deprecation warning when using `File` and `FileStream` after `ThreadPool` is introduced in Lime
* Fixed events being dispatched from wrong thread when using asynchronous `File` APIs
* Fixed dragging to scroll in `TextField` when scaled, by switching to `getBounds()`
* Fixed empty `data` value on `URLLoader` when dispatching `IOErrorEvent.IO_ERROR` and server returned a response
* Fixed `Vector.ofArray()` on flash/air targets
* Fixed wrong signature on `Socket` constructor, which should not have had default values
* Fixed incorrect "Lime Application" window title when targeting Adobe AIR on desktop
* Fixed missing cleanup code when closing windows and shutting down application that could lead to memory leaks
* Fixed event listener issue in `TextField` by comparing stage values to avoid issues with multiple windows or null stage
* Fixed typo in name of `Context3DAlphaMaskShader` class
* Fixed `FlashGraphics` being included in other targets under some circumstances by adding `#if flash` conditional
* Fixed `openfl.globalization`, `Namespace`, and `QName` issues in npm version
* Fixed incorrect condition that caused issues in `ShapeCache`
* Fixed `Socket` incorrectly dispatching `Event.CONNECT` for unconnected sockets on Windows
* Fixed wrong caps/joints in line style returned by `readGraphicsData()`
* Added `openfl_hack_fix_chrome_text` define to workaround a bug in Chrome that garbles text
* Added `openfl_disable_text_measurement_cache` define to allow the `TextField` shape measurement cache to be optionally disabled

9.2.2 (05/31/2023)
------------------

* Updated flash target externs for Haxe 4.3 compatibility
* Resolve new `@:enum abstract` warnings for Haxe 4.3 by replacing with `enum abstract`, if current Haxe version supports it
* Fixed `TextField` keyboard shortcut support to account for AltGr key
* Fixed double timer in `TextField` that would cause caret to keep blinking on focus out
* Fixed exception in `TextField` rendered by Cairo when the text contains ligatures
* Fixed `null` exception in `FileReference.browse()` when no files are selected on html5 target
* Fixed incorrect `accept` attribute on html5 input element if type filter is used once, but not second time
* Fixed `Context3D` scissor rectangle (again), with better fix for both classic display list and Stage 3D
* Fixed text for AM and PM returned by `DateTimeFormatter` on html5 target
* Fixed default locale on html5 for `DateTimeFormatter` and `LocaleID`
* Fixed drawing display object with `visible == false` to `BitmapData`, which should have made it temporarily visible
* Fixed default fallback `QName.uri` value to match flash target
* Fixed bounds calculation of `Graphics.cubicCurveTo()`
* Fixed "Select error 22" exception when creating many `Socket` objects at once
* Fixed uncaught exception when creating a `Socket`
* Fixed invalid `null` value passed to `Vector` constructor on flash target
* Fixed possible incorrect detection of current stage on `TextField` mouse up
* Fixed `Transform.matrix3D` setter vertical scale value
* Fixed default `blendMode` used by `ShaderFilter`
* Fixed setting `topExtension`, `rightExtension`, `bottomExtension`, and `leftExtension` in `ShaderFilter`
* Fixed compilation of `RenderEvent` for flash target
* Fixed issue where setting `width` and `height` of `Video` was sometimes ignored
* Fixed missing `System.totalMemory` and `System.gc()` on HashLink
* Fixed `Graphics.lineGradientStyle()` to allow `null` values for `alphas` and `ratios` parameters, similar to `beginGradientFill()`
* Fixed default fallback value for `ratios` parameter in `Graphics.lineGradientStyle()` and `beginGradientFill()`
* Fixed `Graphics` (and text) jitter on HiDPI screens when using hardware acceleration by snapping to nearest device pixel instead of nearest stage pixel
* Added missing parameters to `Context3D.drawToBitmapData()` in flash target externs
* Added new `openfl_disable_graphics_pixel_snapping` define to optionally disable pixel snapping on `Graphics` tx/ty transformation
* Translate environment variables that appear in `File` path on Windows
* When using flash target with Haxe 4.3, Lime 8.0.2 is required

9.2.1 (02/21/2023)
------------------

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MIT License
===========

Copyright (c) 2013-2023 Joshua Granick and other OpenFL contributors
Copyright (c) 2013-2024 Joshua Granick and other OpenFL contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ Code Editors
Plugins have been written for many [code editors](http://haxe.org/documentation/introduction/editors-and-ides.html), but the most popular editors used for Haxe and OpenFL development are:

* [Visual Studio Code](https://code.visualstudio.com/) (with [plugin](https://marketplace.visualstudio.com/items?itemName=openfl.lime-vscode-extension))
* [HaxeDevelop](http://haxedevelop.org/)
* [Sublime Text](http://www.sublimetext.com) (with [plugin](https://github.com/clemos/haxe-sublime-bundle))
* [IntelliJ IDEA](http://www.jetbrains.com/idea/) (with [plugin](http://plugins.jetbrains.com/plugin/6873?pr=))

* [HaxeDevelop](https://github.com/HaxeFoundation/haxedevelop.org) ([development builds](https://flashdevelop.org/downloads/builds/))
* [Sublime Text](https://www.sublimetext.com) (with [plugin](https://github.com/clemos/haxe-sublime-bundle))
* [IntelliJ IDEA](https://www.jetbrains.com/idea/) (with [plugin](https://plugins.jetbrains.com/plugin/6873-haxe-toolkit-support))
* [Moonshine IDE](https://moonshine-ide.com/)

Easy Deployment
===============
Expand Down
4 changes: 3 additions & 1 deletion assets/templates/haxe/ApplicationMain.hx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ class ApplicationMain

app.createWindow(attributes);
::end::
#elseif !air
#elseif air
app.window.title = "::meta.title::";
#else
app.window.context.attributes.background = ::WIN_BACKGROUND::;
app.window.frameRate = ::WIN_FPS::;
#end
Expand Down
4 changes: 2 additions & 2 deletions haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"license": "MIT",
"tags": [],
"description": "The \"Open Flash Library\" for fast 2D development",
"version": "9.2.2",
"releasenote": "Haxe 4.3 compatibility, Various bug fixes",
"version": "9.3.3",
"releasenote": "Various bug fixes",
"contributors": [
"singmajesty",
"bowlerhat",
Expand Down
9 changes: 8 additions & 1 deletion include.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@

</section>

<section if="${lime < 7.6.0} || ${lime >= 8.1.0}" unless="setup || create || disable-version-check || display">
<section if="${haxe_ver >= 4.3} ${lime < 8.0.2} flash" unless="setup || create || disable-version-check || display">

<!-- Haxe 4.3 made Flash externs more strict -->
<log error="Lime version ${lime} is not compatible with OpenFL ${openfl} when targeting flash or air with Haxe 4.3+ (expected Lime version 8.0.2+)" />

</section>

<section if="${lime < 7.6.0} || ${lime >= 8.2.0}" unless="setup || create || disable-version-check || display">

<log warn="Lime version ${lime} may not be compatible with OpenFL ${openfl} (expected version ${expect-lime-version})" />
<log info='Use &lt;lime version="" /&gt; before &lt;haxelib name="openfl" /&gt; to include a specific version' />
Expand Down
Loading

0 comments on commit a243284

Please sign in to comment.