From 3c245b5287b2f4a8b383d240d8a57609c3174d94 Mon Sep 17 00:00:00 2001 From: player-03 Date: Fri, 18 Aug 2023 16:20:01 -0400 Subject: [PATCH 01/18] Make `replaceVariable()` account for properties. Some useful information is only available as a property, not a field. --- src/lime/tools/ProjectHelper.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lime/tools/ProjectHelper.hx b/src/lime/tools/ProjectHelper.hx index fa5ce214c1..8bedb9a109 100644 --- a/src/lime/tools/ProjectHelper.hx +++ b/src/lime/tools/ProjectHelper.hx @@ -172,7 +172,7 @@ class ProjectHelper var object:Dynamic = project; while (object != null && fields.length > 0) { - object = Reflect.field(object, fields.shift()); + object = Reflect.getProperty(object, fields.shift()); } if (object != null && object != project) From b284e56d4e814745d2cdc1a3faef5aae2a1fa233 Mon Sep 17 00:00:00 2001 From: player-03 Date: Fri, 18 Aug 2023 17:28:07 -0400 Subject: [PATCH 02/18] Clarify changelog and remove reference to private feature. The click count feature is only meant to be used internally until 9.0.0, so shouldn't be advertised. --- CHANGELOG.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 815525ba5b..ab7a2ee9be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,9 +14,8 @@ Changelog * Added `-terser` option to Lime tools for html5 builds to optionally use Terser minifier * Added `-npx` option to Lime tools to run minifiers, or Electron, using `npx` instead of the bundled versions * Updated the bundled version of Node.js to 18 LTS for the html5 target's HTTP server -* Modernized Android Gradle build options -* Exposed more information to _project.xml_, including `${project.platformType}` and `${config.android.target-sdk-version}` -* Added click count for mouse events, for use by OpenFL +* Exposed more information to _project.xml_, such as `${project.host}` and `${config.android.target-sdk-version}` +* Updated the Android Gradle plugin * Disabled pointer tagging on Android * Fixed issues in `emscripten` target and renamed it to `webassembly` * Fixed unpopulated `responseData` on `HTTPRequest` when server returns error status code From 843e7fc873153f7e391157d3223f94df01bcbce1 Mon Sep 17 00:00:00 2001 From: UncertainProd <83609901+UncertainProd@users.noreply.github.com> Date: Sat, 19 Aug 2023 22:02:19 +0530 Subject: [PATCH 03/18] Removed unused field `hello` in Float32Array.hx --- src/lime/utils/Float32Array.hx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lime/utils/Float32Array.hx b/src/lime/utils/Float32Array.hx index 4a29c45523..6f3876b657 100644 --- a/src/lime/utils/Float32Array.hx +++ b/src/lime/utils/Float32Array.hx @@ -93,7 +93,6 @@ import lime.utils.ArrayBufferView; abstract Float32Array(ArrayBufferView) from ArrayBufferView to ArrayBufferView { public inline static var BYTES_PER_ELEMENT:Int = 4; - public static var hello:Int; public var length(get, never):Int; From 0b87e1aa632af0b0b4bef40bb42899f9f87e7bf4 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Tue, 12 Sep 2023 07:46:08 -0700 Subject: [PATCH 04/18] fix invalid air extern --- externs/air/sys/FileSystem.hx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/externs/air/sys/FileSystem.hx b/externs/air/sys/FileSystem.hx index bd5e313029..e278a1d385 100644 --- a/externs/air/sys/FileSystem.hx +++ b/externs/air/sys/FileSystem.hx @@ -37,5 +37,8 @@ class FileSystem public static function deleteDirectory(path:String):Void {} - public static function readDirectory(path:String):Array {} + public static function readDirectory(path:String):Array + { + return null; + } } From 7979a99c7b5c062856aaa4d690ff4d8a3ee054b9 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Tue, 12 Sep 2023 08:02:40 -0700 Subject: [PATCH 05/18] fill in more of sys file externs for AIR --- externs/air/sys/FileSystem.hx | 38 ++++++++++++++++++++++++++--------- externs/air/sys/io/File.hx | 38 +++++++++++++++++++++++++++++++---- 2 files changed, 63 insertions(+), 13 deletions(-) diff --git a/externs/air/sys/FileSystem.hx b/externs/air/sys/FileSystem.hx index e278a1d385..6aa4a1de12 100644 --- a/externs/air/sys/FileSystem.hx +++ b/externs/air/sys/FileSystem.hx @@ -1,44 +1,64 @@ package sys; +import flash.filesystem.File in FlashFile; + @:dce @:coreApi class FileSystem { public static function exists(path:String):Bool { - return false; + return new FlashFile(path).exists; } - public static function rename(path:String, newPath:String):Void {} + public static function rename(path:String, newPath:String):Void + { + new FlashFile(path).moveTo(new FlashFile(newPath)); + } public static function stat(path:String):sys.FileStat { + openfl.Lib.notImplemented(); return null; } public static function fullPath(relPath:String):String { - return null; + var flashFile = new FlashFile(relPath); + flashFile.canonicalize(); + return flashFile.nativePath; } public static function absolutePath(relPath:String):String { - return null; + return new FlashFile(relPath).nativePath; } public static function isDirectory(path:String):Bool { - return false; + return new FlashFile(path).isDirectory; } - public static function createDirectory(path:String):Void {} + public static function createDirectory(path:String):Void + { + new FlashFile(path).createDirectory(); + } - public static function deleteFile(path:String):Void {} + public static function deleteFile(path:String):Void + { + new FlashFile(path).deleteFile(); + } - public static function deleteDirectory(path:String):Void {} + public static function deleteDirectory(path:String):Void + { + new FlashFile(path).deleteDirectory(false); + } public static function readDirectory(path:String):Array { - return null; + return new FlashFile(path).getDirectoryListing().map(function(f:FlashFile):String + { + return f.name; + }); } } diff --git a/externs/air/sys/io/File.hx b/externs/air/sys/io/File.hx index 55e659ffaa..64c9246228 100644 --- a/externs/air/sys/io/File.hx +++ b/externs/air/sys/io/File.hx @@ -1,5 +1,6 @@ package sys.io; +import openfl.utils.ByteArray; import flash.filesystem.File in FlashFile; import flash.filesystem.FileMode; import flash.filesystem.FileStream; @@ -18,34 +19,63 @@ class File return content; } - public static function saveContent(path:String, content:String):Void {} + public static function saveContent(path:String, content:String):Void + { + var file = new FlashFile(path); + var stream = new FileStream(); + stream.open(file, FileMode.WRITE); + stream.writeUTFBytes(content); + stream.close(); + } public static function getBytes(path:String):haxe.io.Bytes { - return null; + var file = new FlashFile(path); + var stream = new FileStream(); + stream.open(file, FileMode.READ); + var byteArray = new ByteArray(); + stream.readBytes(byteArray, 0, stream.bytesAvailable); + stream.close(); + var bytes:haxe.io.Bytes = byteArray; + return bytes; } - public static function saveBytes(path:String, bytes:haxe.io.Bytes):Void {} + public static function saveBytes(path:String, bytes:haxe.io.Bytes):Void + { + var byteArray:ByteArray = bytes; + var file = new FlashFile(path); + var stream = new FileStream(); + stream.open(file, FileMode.WRITE); + stream.writeBytes(byteArray); + stream.close(); + } public static function read(path:String, binary:Bool = true):FileInput { + openfl.Lib.notImplemented(); return null; } public static function write(path:String, binary:Bool = true):FileOutput { + openfl.Lib.notImplemented(); return null; } public static function append(path:String, binary:Bool = true):FileOutput { + openfl.Lib.notImplemented(); return null; } public static function update(path:String, binary:Bool = true):FileOutput { + openfl.Lib.notImplemented(); return null; } - public static function copy(srcPath:String, dstPath:String):Void {} + public static function copy(srcPath:String, dstPath:String):Void + { + new FlashFile(srcPath).copyTo(new FlashFile(dstPath)); + } } From 27c528ffbba27167ac9006a64487517a3ab760eb Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Tue, 12 Sep 2023 08:47:23 -0700 Subject: [PATCH 06/18] air externs: don't use openfl APIs in lime --- externs/air/sys/FileSystem.hx | 3 ++- externs/air/sys/io/File.hx | 17 +++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/externs/air/sys/FileSystem.hx b/externs/air/sys/FileSystem.hx index 6aa4a1de12..2502bf6cd2 100644 --- a/externs/air/sys/FileSystem.hx +++ b/externs/air/sys/FileSystem.hx @@ -1,6 +1,7 @@ package sys; import flash.filesystem.File in FlashFile; +import lime.utils.Log; @:dce @:coreApi @@ -18,7 +19,7 @@ class FileSystem public static function stat(path:String):sys.FileStat { - openfl.Lib.notImplemented(); + Log.warn("stat is not implemented"); return null; } diff --git a/externs/air/sys/io/File.hx b/externs/air/sys/io/File.hx index 64c9246228..11ffd701e7 100644 --- a/externs/air/sys/io/File.hx +++ b/externs/air/sys/io/File.hx @@ -1,9 +1,11 @@ package sys.io; -import openfl.utils.ByteArray; +import flash.utils.ByteArray; import flash.filesystem.File in FlashFile; import flash.filesystem.FileMode; import flash.filesystem.FileStream; +import lime.utils.Log; +import haxe.io.Bytes; @:dce @:coreApi @@ -36,13 +38,12 @@ class File var byteArray = new ByteArray(); stream.readBytes(byteArray, 0, stream.bytesAvailable); stream.close(); - var bytes:haxe.io.Bytes = byteArray; - return bytes; + return Bytes.ofData(byteArray); } public static function saveBytes(path:String, bytes:haxe.io.Bytes):Void { - var byteArray:ByteArray = bytes; + var byteArray:ByteArray = bytes.getData(); var file = new FlashFile(path); var stream = new FileStream(); stream.open(file, FileMode.WRITE); @@ -52,25 +53,25 @@ class File public static function read(path:String, binary:Bool = true):FileInput { - openfl.Lib.notImplemented(); + Log.warn("read is not implemented"); return null; } public static function write(path:String, binary:Bool = true):FileOutput { - openfl.Lib.notImplemented(); + Log.warn("write is not implemented"); return null; } public static function append(path:String, binary:Bool = true):FileOutput { - openfl.Lib.notImplemented(); + Log.warn("append is not implemented"); return null; } public static function update(path:String, binary:Bool = true):FileOutput { - openfl.Lib.notImplemented(); + Log.warn("update is not implemented"); return null; } From 667567f7bd5666f1d02719f8ffdef3efd8cc0539 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Fri, 29 Sep 2023 09:31:08 -0700 Subject: [PATCH 07/18] WebAudioContext: add missing resume() field for non-html5 platforms to fix doc gen --- src/lime/media/WebAudioContext.hx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lime/media/WebAudioContext.hx b/src/lime/media/WebAudioContext.hx index e03f9fac0e..89dac24a39 100644 --- a/src/lime/media/WebAudioContext.hx +++ b/src/lime/media/WebAudioContext.hx @@ -13,6 +13,13 @@ class WebAudioContext public function new() {} + #if (haxe_ver >= 4.2) + public function resume():Dynamic /*Promise*/ + { + return null; + } + #end + public function createAnalyser():Dynamic /*AnalyserNode*/ { return null; From 2b50fe5273278ee9e30dfb5ad2a723bad90c0b80 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Fri, 29 Sep 2023 11:13:05 -0700 Subject: [PATCH 08/18] actions: move some jobs from macos to ubuntu --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 014e5d4922..c9e80fc920 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -317,7 +317,7 @@ jobs: package-haxelib: needs: [linux-ndll, macos-ndll, windows-ndll, android-ndll, ios-ndll] - runs-on: macos-11 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -415,7 +415,7 @@ jobs: if-no-files-found: error docs: - runs-on: macos-11 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -511,7 +511,7 @@ jobs: flash-samples: needs: package-haxelib - runs-on: macos-11 + runs-on: ubuntu-latest steps: - uses: krdlab/setup-haxe@v1 @@ -637,7 +637,7 @@ jobs: html5-samples: needs: package-haxelib - runs-on: macos-11 + runs-on: ubuntu-latest steps: - uses: krdlab/setup-haxe@v1 From 6d36d6f8740a8215fd1e535016a076c28b893b37 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Mon, 16 Oct 2023 11:01:46 -0700 Subject: [PATCH 09/18] CHANGELOG and releasenote --- CHANGELOG.md | 2 +- haxelib.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab7a2ee9be..6aa16ec7df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ Changelog ========= -8.1.0 (??/??/2023) +8.1.0 (10/16/2023) ------------------ * Added `visible` property to `Window` to allow it to be shown and hidden diff --git a/haxelib.json b/haxelib.json index 184b35f5a4..47ebdb331c 100644 --- a/haxelib.json +++ b/haxelib.json @@ -5,7 +5,7 @@ "tags": [], "description": "A foundational Haxe framework for cross-platform development", "version": "8.1.0", - "releasenote": "Update HashLink, iOS and Android build fixes, and ongoing improvements", + "releasenote": "New Window properties, webassembly target, project.hxp, -eval and -terser options", "contributors": [ "singmajesty", "bowlerhat", From 51273fb25879f6a99542da52a2bde79404744f42 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Wed, 18 Oct 2023 10:24:56 -0700 Subject: [PATCH 10/18] FUNDING: add joshtynjala --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 5218c52f74..dd88831dd9 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -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 From 1a3a9bd5c54bfd52cd9a690296c243ccd044f940 Mon Sep 17 00:00:00 2001 From: player-03 Date: Thu, 19 Oct 2023 22:57:43 -0400 Subject: [PATCH 11/18] Avoid integer overflow for long sounds. Multiplying `dataLength * 8` produces a high number, which in the case of very long audio files can exceed the integer limit. Multiplying by 8.0 coerces to float, allowing much higher values. An alternate solution is to divide first and multiply by 8 second, thus keeping the number from getting too large at any point. However, the purpose of the 8 is to convert `dataLength` from bytes to bits, so it's clearer if those two are close together. --- src/lime/_internal/backend/native/NativeAudioSource.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lime/_internal/backend/native/NativeAudioSource.hx b/src/lime/_internal/backend/native/NativeAudioSource.hx index 37c04fb795..ab85e0e002 100644 --- a/src/lime/_internal/backend/native/NativeAudioSource.hx +++ b/src/lime/_internal/backend/native/NativeAudioSource.hx @@ -136,7 +136,7 @@ class NativeAudioSource } } - samples = Std.int((dataLength * 8) / (parent.buffer.channels * parent.buffer.bitsPerSample)); + samples = Std.int((dataLength * 8.0) / (parent.buffer.channels * parent.buffer.bitsPerSample)); } public function play():Void From d931869dcf2a3c5017b93dd4234a3dd63491d9cd Mon Sep 17 00:00:00 2001 From: Joseph Cloutier Date: Tue, 24 Oct 2023 01:13:32 -0400 Subject: [PATCH 12/18] Only escape backslashes in Android paths. Neither .properties nor .gradle files require anything else to be escaped. And at least in .gradle files, escaping anything else is incorrect. --- tools/platforms/AndroidPlatform.hx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/platforms/AndroidPlatform.hx b/tools/platforms/AndroidPlatform.hx index 47bb6aac0a..9372437ee2 100644 --- a/tools/platforms/AndroidPlatform.hx +++ b/tools/platforms/AndroidPlatform.hx @@ -490,9 +490,8 @@ class AndroidPlatform extends PlatformTarget context.ANDROID_BUILD_TOOLS_VERSION = AndroidHelper.getBuildToolsVersion(project); } - var escaped = ~/([ #!=\\:])/g; - context.ANDROID_SDK_ESCAPED = escaped.replace(context.ENV_ANDROID_SDK, "\\$1"); - context.ANDROID_NDK_ROOT_ESCAPED = escaped.replace(context.ENV_ANDROID_NDK_ROOT, "\\$1"); + context.ANDROID_SDK_ESCAPED = StringTools.replace(context.ENV_ANDROID_SDK, "\\", "\\\\"); + context.ANDROID_NDK_ROOT_ESCAPED = StringTools.replace(context.ENV_ANDROID_NDK_ROOT, "\\", "\\\\"); if (Reflect.hasField(context, "KEY_STORE")) context.KEY_STORE = StringTools.replace(context.KEY_STORE, "\\", "\\\\"); if (Reflect.hasField(context, "KEY_STORE_ALIAS")) context.KEY_STORE_ALIAS = StringTools.replace(context.KEY_STORE_ALIAS, "\\", "\\\\"); From d05f10b15fecd6c39294da7eb5eef56e5f0ff898 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Wed, 8 Nov 2023 09:26:20 -0800 Subject: [PATCH 13/18] prepare for Lime 8.1.1 --- CHANGELOG.md | 6 ++++++ haxelib.json | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6aa16ec7df..ab7304112e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Changelog ========= +8.1.1 (11/08/2023) +------------------ + +* Fixed subset of characters escaped in file paths to fix Android builds on Windows. +* Fixed playback of very long sounds by changing arithmetic to avoid integer overflow. + 8.1.0 (10/16/2023) ------------------ diff --git a/haxelib.json b/haxelib.json index 47ebdb331c..a58beb3d5f 100644 --- a/haxelib.json +++ b/haxelib.json @@ -4,8 +4,8 @@ "license": "MIT", "tags": [], "description": "A foundational Haxe framework for cross-platform development", - "version": "8.1.0", - "releasenote": "New Window properties, webassembly target, project.hxp, -eval and -terser options", + "version": "8.1.1", + "releasenote": "Various bug fixes", "contributors": [ "singmajesty", "bowlerhat", From b330249a887a1543cbdedd1108bc6ececa0a725f Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Mon, 27 Nov 2023 09:20:40 -0800 Subject: [PATCH 14/18] actions: build svg.n --- .github/workflows/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c9e80fc920..6097ed7fea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -337,6 +337,7 @@ jobs: haxelib install hxcpp 4.2.1 --quiet haxelib install format --quiet haxelib install hxp --quiet + haxelib install svg --quiet - name: Enable HXCPP compile cache run: | @@ -348,6 +349,7 @@ jobs: haxelib run lime rebuild tools -nocolor -verbose -nocffi haxelib run lime setup -alias -y -nocffi cp project/lib/hashlink/other/osx/entitlements.xml templates/bin/hl/entitlements.xml + - uses: actions/download-artifact@v3 with: name: Android-NDLL @@ -403,6 +405,11 @@ jobs: name: Linux64-Hashlink path: templates/bin/hl/Linux64 + - name: Rebuild Lime svg.n + working-directory: tools + run: | + haxe svg.hxml + - uses: actions/upload-artifact@v3 with: name: lime-haxelib From d68bce1a873e15dda05c5cab85d0cc3a5468ca3d Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Mon, 27 Nov 2023 10:14:36 -0800 Subject: [PATCH 15/18] actions: svg.n needs openfl --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6097ed7fea..09a0df57cd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -338,6 +338,7 @@ jobs: haxelib install format --quiet haxelib install hxp --quiet haxelib install svg --quiet + haxelib install openfl --quiet - name: Enable HXCPP compile cache run: | From c40ec312fc9b7002a48ec4a233bbe1668af75f3c Mon Sep 17 00:00:00 2001 From: andrew-git Date: Fri, 1 Dec 2023 20:09:34 +0100 Subject: [PATCH 16/18] Joystick: add try/catch around navigator.getGamepads() because it might throw a JS SecurityError if we don't have permission to call it (#1728) Fixes the following exception when we don't have permissions: > Failed to execute 'getGamepads' on 'Navigator': Access to the feature "gamepad" is disallowed by permissions policy. By catching the exception, it should now behave the same as older browsers, where navigator.getGamepads() doesn't exist at all. In the future, it might make sense to set a flag if navigator.getGamepads() throws, and skip calling it more than once. However, we may want to listen for some kind of browser event that indicates that permission was granted later, and clear the flag when appropriate. Perhaps the gamepadconnected event? --------- Co-authored-by: Josh Tynjala --- src/lime/ui/Joystick.hx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/lime/ui/Joystick.hx b/src/lime/ui/Joystick.hx index 55bf70cf9c..502eee7c1d 100644 --- a/src/lime/ui/Joystick.hx +++ b/src/lime/ui/Joystick.hx @@ -55,8 +55,19 @@ class Joystick #if (js && html5) @:noCompletion private static function __getDeviceData():Array { - return - (untyped navigator.getGamepads) ? untyped navigator.getGamepads() : (untyped navigator.webkitGetGamepads) ? untyped navigator.webkitGetGamepads() : null; + var res:Dynamic = null; + + try + { + res = (untyped navigator.getGamepads) ? untyped navigator.getGamepads() : (untyped navigator.webkitGetGamepads) ? untyped navigator.webkitGetGamepads() : null; + } + catch (err:Dynamic) + { + // if something went wrong, treat it the same as when navigator.getGamepads doesn't exist + // we probably don't have permission to use this feature + } + + return res; } #end From e6205bf3aaace23c7e2458841da4435ff9879eaf Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Fri, 8 Dec 2023 09:45:57 -0800 Subject: [PATCH 17/18] PlatformSetup: openfl alias setup on Linux was missing try/catch, but lime alias setup and other platforms had it --- tools/utils/PlatformSetup.hx | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/tools/utils/PlatformSetup.hx b/tools/utils/PlatformSetup.hx index 8f7c6be916..071e7ae224 100644 --- a/tools/utils/PlatformSetup.hx +++ b/tools/utils/PlatformSetup.hx @@ -1113,21 +1113,25 @@ class PlatformSetup } else { - System.runCommand("", "sudo", [ - "cp", - "-f", - Haxelib.getPath(new Haxelib("lime")) + "/templates/bin/lime.sh", - "/usr/local/bin/lime" - ], false); - System.runCommand("", "sudo", ["chmod", "755", "/usr/local/bin/lime"], false); - System.runCommand("", "sudo", [ - "cp", - "-f", - System.findTemplate(project.templatePaths, "bin/openfl.sh"), - "/usr/local/bin/openfl" - ], false); - System.runCommand("", "sudo", ["chmod", "755", "/usr/local/bin/openfl"], false); - installedCommand = true; + try + { + System.runCommand("", "sudo", [ + "cp", + "-f", + Haxelib.getPath(new Haxelib("lime")) + "/templates/bin/lime.sh", + "/usr/local/bin/lime" + ], false); + System.runCommand("", "sudo", ["chmod", "755", "/usr/local/bin/lime"], false); + System.runCommand("", "sudo", [ + "cp", + "-f", + System.findTemplate(project.templatePaths, "bin/openfl.sh"), + "/usr/local/bin/openfl" + ], false); + System.runCommand("", "sudo", ["chmod", "755", "/usr/local/bin/openfl"], false); + installedCommand = true; + } + catch (e:Dynamic) {} } } From a48898849e34ec9e81147d374b62e4091dd2bc77 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Wed, 10 Jan 2024 10:11:11 -0800 Subject: [PATCH 18/18] actions: use github.workspace instead of platform specific environment variables syntax --- .github/workflows/main.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 09a0df57cd..2052c66a9e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,7 +36,7 @@ jobs: - name: Rebuild Lime tools run: | - haxelib dev lime $GITHUB_WORKSPACE + haxelib dev lime ${{ github.workspace }} haxelib run lime rebuild tools -nocolor -verbose -nocffi haxelib run lime setup -alias -y -nocffi @@ -105,7 +105,7 @@ jobs: - name: Rebuild Lime tools run: | - haxelib dev lime $GITHUB_WORKSPACE + haxelib dev lime ${{ github.workspace }} haxelib run lime rebuild tools -nocolor -verbose -nocffi haxelib run lime setup -alias -y -nocffi @@ -157,7 +157,7 @@ jobs: - name: Rebuild Lime tools run: | - haxelib dev lime $Env:GITHUB_WORKSPACE + haxelib dev lime ${{ github.workspace }} haxelib run lime rebuild tools -nocolor -verbose -nocffi haxelib run lime setup -alias -y -nocffi @@ -236,7 +236,7 @@ jobs: - name: Rebuild Lime tools run: | - haxelib dev lime $GITHUB_WORKSPACE + haxelib dev lime ${{ github.workspace }} haxelib run lime rebuild tools -nocolor -verbose -nocffi haxelib run lime setup -alias -y -nocffi @@ -294,7 +294,7 @@ jobs: - name: Rebuild Lime tools run: | - haxelib dev lime $GITHUB_WORKSPACE + haxelib dev lime ${{ github.workspace }} haxelib run lime rebuild tools -nocolor -verbose -nocffi haxelib run lime setup -alias -y -nocffi @@ -346,7 +346,7 @@ jobs: - name: Rebuild Lime tools run: | - haxelib dev lime $GITHUB_WORKSPACE + haxelib dev lime ${{ github.workspace }} haxelib run lime rebuild tools -nocolor -verbose -nocffi haxelib run lime setup -alias -y -nocffi cp project/lib/hashlink/other/osx/entitlements.xml templates/bin/hl/entitlements.xml @@ -439,7 +439,7 @@ jobs: - name: Install Haxe dependencies run: | haxelib install dox --quiet - haxelib dev lime $GITHUB_WORKSPACE + haxelib dev lime ${{ github.workspace }} - name: Build docs working-directory: docs