Enable Mac OS Universal support, update hxvlc & actions dependencies, fix VIDEO_CUTSCENES (#931)
* Update hxvlc to 2.2.6 * Remove `arch -x86_64` as no longer needed Since `cne-lime` got rebased with FunkinCrew's, which includes Apple Silicon (ARM64) support. * Wtf * Rename **Mac OS x64** to **Mac OS Universal** in the ReadME Reason: **x64** is only powered by Intel/AMD, not ARM, so it will make the macOS users to think macOS builds still uses Intel. * Enable videos for iOS Since hxvlc 2.0.0 or newer, it fixed the video playback for iOS. * Fixed the extension-androidtools import, when using extension-androidtools 2.2.X. * Replace `start` with `wait` in `VideoCutscene.hx` * Revert * Nvm I think I found out why I guess * Will this fix some actions deprecations? * Oops * F#CK * I'm gonna lose it * I forgot again I'm going to scream into the pillow, If I keep forgetting to update those. * Update macOS version to 26 in the macOS workflow * Remove old hxvlc apis from the `VideoCutscene.hx` class, since hxvlc got updated to the latest * Fix the f#cking conflicts * Now it works --------- Co-authored-by: Ralty <78720179+Raltyro@users.noreply.github.com>
This commit is contained in:
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Pulling the new commit
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Setting up Haxe
|
||||
uses: krdlab/setup-haxe@v2
|
||||
with:
|
||||
@@ -38,12 +38,12 @@ jobs:
|
||||
# - name: Tar files
|
||||
# run: tar -zcvf CodenameEngine.tar.gz -C export/release/linux/bin .
|
||||
- name: Uploading artifact (executable)
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Codename Engine (Executable Only)
|
||||
path: export/release/linux/bin/CodenameEngine
|
||||
- name: Uploading artifact (entire build)
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Codename Engine
|
||||
path: export/release/linux/bin/
|
||||
@@ -83,7 +83,7 @@ jobs:
|
||||
needs: build # since its low priority, it'll run after, so actions will concentrate first on normal builds
|
||||
steps:
|
||||
- name: Pulling the new commit
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Setting up Haxe
|
||||
uses: krdlab/setup-haxe@v2
|
||||
with:
|
||||
@@ -110,7 +110,7 @@ jobs:
|
||||
# - name: Tar files
|
||||
# run: tar -zcvf CodenameEngine.tar.gz -C export/debug/linux/bin .
|
||||
- name: Uploading artifact (entire build)
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Codename Engine Debug
|
||||
path: export/debug/linux/bin/
|
||||
@@ -140,4 +140,4 @@ jobs:
|
||||
# key: cache-build-linux-debug
|
||||
# path: |
|
||||
# .haxelib/
|
||||
# export/debug/linux/obj/
|
||||
# export/debug/linux/obj/
|
||||
|
||||
+10
-10
@@ -8,10 +8,10 @@ jobs:
|
||||
build:
|
||||
name: Mac OS Build
|
||||
permissions: write-all
|
||||
runs-on: macos-14
|
||||
runs-on: macos-26
|
||||
steps:
|
||||
- name: Pulling the new commit
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Setting up Haxe
|
||||
uses: krdlab/setup-haxe@v2
|
||||
with:
|
||||
@@ -31,16 +31,16 @@ jobs:
|
||||
haxe -cp commandline -D analyzer-optimize --run Main setup -s
|
||||
- name: Building the game
|
||||
run: |
|
||||
arch -x86_64 haxelib run lime build mac
|
||||
haxelib run lime build mac
|
||||
- name: Tar files
|
||||
run: tar -zcvf CodenameEngine.tar.gz -C export/release/macos/bin .
|
||||
- name: Uploading artifact (executable)
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Codename Engine (Executable Only)
|
||||
path: export/release/macos/bin/CodenameEngine.app/Contents/MacOS/CodenameEngine
|
||||
- name: Uploading artifact (entire build)
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Codename Engine
|
||||
path: CodenameEngine.tar.gz
|
||||
@@ -76,11 +76,11 @@ jobs:
|
||||
debug_build:
|
||||
name: Mac OS Debug Build
|
||||
permissions: write-all
|
||||
runs-on: macos-14
|
||||
runs-on: macos-26
|
||||
needs: build # since its low priority, it'll run after, so actions will concentrate first on normal builds
|
||||
steps:
|
||||
- name: Pulling the new commit
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Setting up Haxe
|
||||
uses: krdlab/setup-haxe@v2
|
||||
with:
|
||||
@@ -100,11 +100,11 @@ jobs:
|
||||
haxe -cp commandline -D analyzer-optimize --run Main setup -s
|
||||
- name: Building the game
|
||||
run: |
|
||||
arch -x86_64 haxelib run lime build mac -debug
|
||||
haxelib run lime build mac -debug
|
||||
- name: Tar files
|
||||
run: tar -zcvf CodenameEngine.tar.gz -C export/debug/macos/bin .
|
||||
- name: Uploading artifact (entire build)
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Codename Engine Debug
|
||||
path: CodenameEngine.tar.gz
|
||||
@@ -134,4 +134,4 @@ jobs:
|
||||
# key: cache-build-mac-debug
|
||||
# path: |
|
||||
# .haxelib/
|
||||
# export/debug/macos/obj/
|
||||
# export/debug/macos/obj/
|
||||
|
||||
@@ -21,10 +21,10 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Download Windows Full Build
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
uses: dawidd6/action-download-artifact@v8
|
||||
with:
|
||||
workflow: windows.yml
|
||||
name: Codename Engine
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
allow_forks: false
|
||||
|
||||
- name: Download Windows Executable
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
uses: dawidd6/action-download-artifact@v8
|
||||
with:
|
||||
workflow: windows.yml
|
||||
name: Codename Engine (Executable Only)
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
allow_forks: false
|
||||
|
||||
- name: Download Mac OS Full Build
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
uses: dawidd6/action-download-artifact@v8
|
||||
with:
|
||||
workflow: macos.yml
|
||||
name: Codename Engine
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
allow_forks: false
|
||||
|
||||
- name: Download Mac OS Executable
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
uses: dawidd6/action-download-artifact@v8
|
||||
with:
|
||||
workflow: macos.yml
|
||||
name: Codename Engine (Executable Only)
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
allow_forks: false
|
||||
|
||||
- name: Download Linux Full Build
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
uses: dawidd6/action-download-artifact@v8
|
||||
with:
|
||||
workflow: linux.yml
|
||||
name: Codename Engine
|
||||
@@ -64,7 +64,7 @@ jobs:
|
||||
allow_forks: false
|
||||
|
||||
- name: Download Linux Executable
|
||||
uses: dawidd6/action-download-artifact@v6
|
||||
uses: dawidd6/action-download-artifact@v8
|
||||
with:
|
||||
workflow: linux.yml
|
||||
name: Codename Engine (Executable Only)
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Pulling the new commit
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Setting up Haxe
|
||||
uses: krdlab/setup-haxe@v2
|
||||
with:
|
||||
@@ -33,14 +33,14 @@ jobs:
|
||||
run: |
|
||||
haxelib run lime build windows
|
||||
- name: Uploading artifact (executable)
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Codename Engine (Executable Only)
|
||||
path: |
|
||||
export/release/windows/bin/CodenameEngine.exe
|
||||
export/release/windows/bin/lime.ndll
|
||||
- name: Uploading artifact (entire build)
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Codename Engine
|
||||
path: export/release/windows/bin
|
||||
@@ -80,7 +80,7 @@ jobs:
|
||||
needs: build # since its low priority, it'll run after, so actions will concentrate first on normal builds
|
||||
steps:
|
||||
- name: Pulling the new commit
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v6
|
||||
- name: Setting up Haxe
|
||||
uses: krdlab/setup-haxe@v2
|
||||
with:
|
||||
@@ -103,7 +103,7 @@ jobs:
|
||||
run: |
|
||||
haxelib run lime build windows -debug
|
||||
- name: Uploading artifact (entire build)
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: Codename Engine Debug
|
||||
path: export/debug/windows/bin
|
||||
@@ -133,4 +133,4 @@ jobs:
|
||||
# key: cache-build-windows-debug
|
||||
# path: |
|
||||
# .haxelib/
|
||||
# export/debug/windows/obj/
|
||||
# export/debug/windows/obj/
|
||||
|
||||
@@ -47,7 +47,7 @@ The engine uses [HaxeFlixel](https://haxeflixel.com/) and it mainly features:
|
||||
---
|
||||
|
||||
> [!NOTE]
|
||||
> Codename Engine as for now supports **Windows x64**, **Mac OS x64** and **Linux x64**.<br>
|
||||
> Codename Engine as for now supports **Windows x64**, **Mac OS Universal** and **Linux x64**.<br>
|
||||
> More platforms will soon come, stay tuned!<br>
|
||||
> - [ ] **Web (HTML5) Support**
|
||||
> - [ ] **Mobile Support**
|
||||
|
||||
+2
-2
@@ -13,13 +13,13 @@
|
||||
<git name="flixel-addons" url="https://github.com/CodenameCrew/cne-flixel-addons" ref="dev" skipDeps="true"/>
|
||||
|
||||
<!-- CNE Core Libraries -->
|
||||
<git name="flixel-animate" url="https://github.com/CodenameCrew/cne-flixel-animate/" skipDeps="true"/>
|
||||
<git name="flixel-animate" url="https://github.com/CodenameCrew/cne-flixel-animate" skipDeps="true"/>
|
||||
<git name="hscript-improved" url="https://github.com/CodenameCrew/hscript-improved" ref="codename-dev"/>
|
||||
<git name="away3d" url="https://github.com/CodenameCrew/away3d" skipDeps="true"/>
|
||||
|
||||
<!-- Other Libraries -->
|
||||
<git name="hxdiscord_rpc" url="https://github.com/CodenameCrew/cne-hxdiscord_rpc" skipDeps="true"/>
|
||||
<lib name="funkin-modchart" version="1.2.4" skipDeps="true"/>
|
||||
<lib name="funkin-modchart" skipDeps="true"/>
|
||||
<lib name="hxvlc" skipDeps="true"/>
|
||||
<lib name="hxcpp-debug-server"/>
|
||||
<lib name="format"/>
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
<!-- <define name="DISCORD_RPC" if="desktop"/> -->
|
||||
|
||||
<!-- Compile with video support (hxvlc) -->
|
||||
<define name="VIDEO_CUTSCENES" if="desktop || android"/>
|
||||
<define name="VIDEO_CUTSCENES" if="desktop || mobile"/>
|
||||
</section>
|
||||
|
||||
<!-- Uncomment this to achive faster compile times, will strip extraneous and commonly unused features. -->
|
||||
|
||||
@@ -24,8 +24,8 @@ import openfl.utils.AssetLibrary;
|
||||
import sys.FileSystem;
|
||||
import sys.io.File;
|
||||
#if android
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import extension.androidtools.content.Context;
|
||||
import extension.androidtools.os.Build;
|
||||
#end
|
||||
|
||||
class Main extends Sprite
|
||||
|
||||
@@ -60,15 +60,12 @@ class VideoCutscene extends Cutscene {
|
||||
|
||||
add(video = new FlxVideoSprite());
|
||||
video.antialiasing = true;
|
||||
#if (hxvlc < version("2.0.0"))
|
||||
video.autoPause = false; // Imma handle it better inside this class, mainly because of the pause menu - Nex
|
||||
#end
|
||||
video.bitmap.onEndReached.add(close);
|
||||
video.bitmap.onFormatSetup.add(function() if (video.bitmap != null && video.bitmap.bitmapData != null) {
|
||||
final width = video.bitmap.bitmapData.width;
|
||||
final height = video.bitmap.bitmapData.height;
|
||||
final scale:Float = Math.min(FlxG.width / width, FlxG.height / height);
|
||||
video.setGraphicSize(Std.int(width * scale), Std.int(height * scale));
|
||||
video.setGraphicSize(width * scale, height * scale);
|
||||
video.updateHitbox();
|
||||
video.screenCenter();
|
||||
});
|
||||
@@ -103,7 +100,7 @@ class VideoCutscene extends Cutscene {
|
||||
FlxTween.tween(loadingBackdrop, {alpha: 1}, 0.5, {ease: FlxEase.sineInOut});
|
||||
|
||||
Main.execAsync(function() {
|
||||
if (video.load(localPath)) new FlxTimer().start(0.001, function(_) {
|
||||
if (video.load(localPath)) FlxTimer.wait(0.001, function() {
|
||||
mutex.acquire(); onReady(); mutex.release();
|
||||
});
|
||||
else { mutex.acquire(); close(); mutex.release(); }
|
||||
@@ -203,18 +200,6 @@ class VideoCutscene extends Cutscene {
|
||||
}
|
||||
}
|
||||
|
||||
#if (hxvlc < version("2.0.0"))
|
||||
@:dox(hide) override public function onFocus() {
|
||||
if(FlxG.autoPause && !paused) video.resume();
|
||||
super.onFocus();
|
||||
}
|
||||
|
||||
@:dox(hide) override public function onFocusLost() {
|
||||
if(FlxG.autoPause && !paused) video.pause();
|
||||
super.onFocusLost();
|
||||
}
|
||||
#end
|
||||
|
||||
public override function pauseCutscene() {
|
||||
video.pause();
|
||||
super.pauseCutscene();
|
||||
|
||||
Reference in New Issue
Block a user