Skip to content

Commit b447031

Browse files
MRK2009Raltyro
andauthored
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>
1 parent 17bea45 commit b447031

9 files changed

Lines changed: 37 additions & 52 deletions

File tree

.github/workflows/linux.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-24.04
1212
steps:
1313
- name: Pulling the new commit
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v6
1515
- name: Setting up Haxe
1616
uses: krdlab/setup-haxe@v2
1717
with:
@@ -38,12 +38,12 @@ jobs:
3838
# - name: Tar files
3939
# run: tar -zcvf CodenameEngine.tar.gz -C export/release/linux/bin .
4040
- name: Uploading artifact (executable)
41-
uses: actions/upload-artifact@v4
41+
uses: actions/upload-artifact@v7
4242
with:
4343
name: Codename Engine (Executable Only)
4444
path: export/release/linux/bin/CodenameEngine
4545
- name: Uploading artifact (entire build)
46-
uses: actions/upload-artifact@v4
46+
uses: actions/upload-artifact@v7
4747
with:
4848
name: Codename Engine
4949
path: export/release/linux/bin/
@@ -83,7 +83,7 @@ jobs:
8383
needs: build # since its low priority, it'll run after, so actions will concentrate first on normal builds
8484
steps:
8585
- name: Pulling the new commit
86-
uses: actions/checkout@v4
86+
uses: actions/checkout@v6
8787
- name: Setting up Haxe
8888
uses: krdlab/setup-haxe@v2
8989
with:
@@ -110,7 +110,7 @@ jobs:
110110
# - name: Tar files
111111
# run: tar -zcvf CodenameEngine.tar.gz -C export/debug/linux/bin .
112112
- name: Uploading artifact (entire build)
113-
uses: actions/upload-artifact@v4
113+
uses: actions/upload-artifact@v7
114114
with:
115115
name: Codename Engine Debug
116116
path: export/debug/linux/bin/
@@ -140,4 +140,4 @@ jobs:
140140
# key: cache-build-linux-debug
141141
# path: |
142142
# .haxelib/
143-
# export/debug/linux/obj/
143+
# export/debug/linux/obj/

.github/workflows/macos.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
build:
99
name: Mac OS Build
1010
permissions: write-all
11-
runs-on: macos-14
11+
runs-on: macos-26
1212
steps:
1313
- name: Pulling the new commit
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v6
1515
- name: Setting up Haxe
1616
uses: krdlab/setup-haxe@v2
1717
with:
@@ -31,16 +31,16 @@ jobs:
3131
haxe -cp commandline -D analyzer-optimize --run Main setup -s
3232
- name: Building the game
3333
run: |
34-
arch -x86_64 haxelib run lime build mac
34+
haxelib run lime build mac
3535
- name: Tar files
3636
run: tar -zcvf CodenameEngine.tar.gz -C export/release/macos/bin .
3737
- name: Uploading artifact (executable)
38-
uses: actions/upload-artifact@v4
38+
uses: actions/upload-artifact@v7
3939
with:
4040
name: Codename Engine (Executable Only)
4141
path: export/release/macos/bin/CodenameEngine.app/Contents/MacOS/CodenameEngine
4242
- name: Uploading artifact (entire build)
43-
uses: actions/upload-artifact@v4
43+
uses: actions/upload-artifact@v7
4444
with:
4545
name: Codename Engine
4646
path: CodenameEngine.tar.gz
@@ -76,11 +76,11 @@ jobs:
7676
debug_build:
7777
name: Mac OS Debug Build
7878
permissions: write-all
79-
runs-on: macos-14
79+
runs-on: macos-26
8080
needs: build # since its low priority, it'll run after, so actions will concentrate first on normal builds
8181
steps:
8282
- name: Pulling the new commit
83-
uses: actions/checkout@v4
83+
uses: actions/checkout@v6
8484
- name: Setting up Haxe
8585
uses: krdlab/setup-haxe@v2
8686
with:
@@ -100,11 +100,11 @@ jobs:
100100
haxe -cp commandline -D analyzer-optimize --run Main setup -s
101101
- name: Building the game
102102
run: |
103-
arch -x86_64 haxelib run lime build mac -debug
103+
haxelib run lime build mac -debug
104104
- name: Tar files
105105
run: tar -zcvf CodenameEngine.tar.gz -C export/debug/macos/bin .
106106
- name: Uploading artifact (entire build)
107-
uses: actions/upload-artifact@v4
107+
uses: actions/upload-artifact@v7
108108
with:
109109
name: Codename Engine Debug
110110
path: CodenameEngine.tar.gz
@@ -134,4 +134,4 @@ jobs:
134134
# key: cache-build-mac-debug
135135
# path: |
136136
# .haxelib/
137-
# export/debug/macos/obj/
137+
# export/debug/macos/obj/

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,50 +21,50 @@ jobs:
2121

2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v6
2525

2626
- name: Download Windows Full Build
27-
uses: dawidd6/action-download-artifact@v6
27+
uses: dawidd6/action-download-artifact@v8
2828
with:
2929
workflow: windows.yml
3030
name: Codename Engine
3131
path: artifacts/windows/full_build
3232
allow_forks: false
3333

3434
- name: Download Windows Executable
35-
uses: dawidd6/action-download-artifact@v6
35+
uses: dawidd6/action-download-artifact@v8
3636
with:
3737
workflow: windows.yml
3838
name: Codename Engine (Executable Only)
3939
path: artifacts/windows/executable
4040
allow_forks: false
4141

4242
- name: Download Mac OS Full Build
43-
uses: dawidd6/action-download-artifact@v6
43+
uses: dawidd6/action-download-artifact@v8
4444
with:
4545
workflow: macos.yml
4646
name: Codename Engine
4747
path: artifacts/macos/full_build
4848
allow_forks: false
4949

5050
- name: Download Mac OS Executable
51-
uses: dawidd6/action-download-artifact@v6
51+
uses: dawidd6/action-download-artifact@v8
5252
with:
5353
workflow: macos.yml
5454
name: Codename Engine (Executable Only)
5555
path: artifacts/macos/executable
5656
allow_forks: false
5757

5858
- name: Download Linux Full Build
59-
uses: dawidd6/action-download-artifact@v6
59+
uses: dawidd6/action-download-artifact@v8
6060
with:
6161
workflow: linux.yml
6262
name: Codename Engine
6363
path: artifacts/linux/full_build
6464
allow_forks: false
6565

6666
- name: Download Linux Executable
67-
uses: dawidd6/action-download-artifact@v6
67+
uses: dawidd6/action-download-artifact@v8
6868
with:
6969
workflow: linux.yml
7070
name: Codename Engine (Executable Only)

.github/workflows/windows.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: windows-latest
1212
steps:
1313
- name: Pulling the new commit
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v6
1515
- name: Setting up Haxe
1616
uses: krdlab/setup-haxe@v2
1717
with:
@@ -33,14 +33,14 @@ jobs:
3333
run: |
3434
haxelib run lime build windows
3535
- name: Uploading artifact (executable)
36-
uses: actions/upload-artifact@v4
36+
uses: actions/upload-artifact@v7
3737
with:
3838
name: Codename Engine (Executable Only)
3939
path: |
4040
export/release/windows/bin/CodenameEngine.exe
4141
export/release/windows/bin/lime.ndll
4242
- name: Uploading artifact (entire build)
43-
uses: actions/upload-artifact@v4
43+
uses: actions/upload-artifact@v7
4444
with:
4545
name: Codename Engine
4646
path: export/release/windows/bin
@@ -80,7 +80,7 @@ jobs:
8080
needs: build # since its low priority, it'll run after, so actions will concentrate first on normal builds
8181
steps:
8282
- name: Pulling the new commit
83-
uses: actions/checkout@v4
83+
uses: actions/checkout@v6
8484
- name: Setting up Haxe
8585
uses: krdlab/setup-haxe@v2
8686
with:
@@ -103,7 +103,7 @@ jobs:
103103
run: |
104104
haxelib run lime build windows -debug
105105
- name: Uploading artifact (entire build)
106-
uses: actions/upload-artifact@v4
106+
uses: actions/upload-artifact@v7
107107
with:
108108
name: Codename Engine Debug
109109
path: export/debug/windows/bin
@@ -133,4 +133,4 @@ jobs:
133133
# key: cache-build-windows-debug
134134
# path: |
135135
# .haxelib/
136-
# export/debug/windows/obj/
136+
# export/debug/windows/obj/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ The engine uses [HaxeFlixel](https://haxeflixel.com/) and it mainly features:
4747
---
4848

4949
> [!NOTE]
50-
> Codename Engine as for now supports **Windows x64**, **Mac OS x64** and **Linux x64**.<br>
50+
> Codename Engine as for now supports **Windows x64**, **Mac OS Universal** and **Linux x64**.<br>
5151
> More platforms will soon come, stay tuned!<br>
5252
> - [ ] **Web (HTML5) Support**
5353
> - [ ] **Mobile Support**

building/libs.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
<git name="flixel-addons" url="https://github.com/CodenameCrew/cne-flixel-addons" ref="dev" skipDeps="true"/>
1414

1515
<!-- CNE Core Libraries -->
16-
<git name="flixel-animate" url="https://github.com/CodenameCrew/cne-flixel-animate/" skipDeps="true"/>
16+
<git name="flixel-animate" url="https://github.com/CodenameCrew/cne-flixel-animate" skipDeps="true"/>
1717
<git name="hscript-improved" url="https://github.com/CodenameCrew/hscript-improved" ref="codename-dev"/>
1818
<git name="away3d" url="https://github.com/CodenameCrew/away3d" skipDeps="true"/>
1919

2020
<!-- Other Libraries -->
2121
<git name="hxdiscord_rpc" url="https://github.com/CodenameCrew/cne-hxdiscord_rpc" skipDeps="true"/>
22-
<lib name="funkin-modchart" version="1.2.4" skipDeps="true"/>
22+
<lib name="funkin-modchart" skipDeps="true"/>
2323
<lib name="hxvlc" skipDeps="true"/>
2424
<lib name="hxcpp-debug-server"/>
2525
<lib name="format"/>

project.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<!-- <define name="DISCORD_RPC" if="desktop"/> -->
2525

2626
<!-- Compile with video support (hxvlc) -->
27-
<define name="VIDEO_CUTSCENES" if="desktop || android"/>
27+
<define name="VIDEO_CUTSCENES" if="desktop || mobile"/>
2828
</section>
2929

3030
<!-- Uncomment this to achive faster compile times, will strip extraneous and commonly unused features. -->

source/funkin/backend/system/Main.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import openfl.utils.AssetLibrary;
2424
import sys.FileSystem;
2525
import sys.io.File;
2626
#if android
27-
import android.content.Context;
28-
import android.os.Build;
27+
import extension.androidtools.content.Context;
28+
import extension.androidtools.os.Build;
2929
#end
3030

3131
class Main extends Sprite

source/funkin/game/cutscenes/VideoCutscene.hx

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,12 @@ class VideoCutscene extends Cutscene {
6060

6161
add(video = new FlxVideoSprite());
6262
video.antialiasing = true;
63-
#if (hxvlc < version("2.0.0"))
64-
video.autoPause = false; // Imma handle it better inside this class, mainly because of the pause menu - Nex
65-
#end
6663
video.bitmap.onEndReached.add(close);
6764
video.bitmap.onFormatSetup.add(function() if (video.bitmap != null && video.bitmap.bitmapData != null) {
6865
final width = video.bitmap.bitmapData.width;
6966
final height = video.bitmap.bitmapData.height;
7067
final scale:Float = Math.min(FlxG.width / width, FlxG.height / height);
71-
video.setGraphicSize(Std.int(width * scale), Std.int(height * scale));
68+
video.setGraphicSize(width * scale, height * scale);
7269
video.updateHitbox();
7370
video.screenCenter();
7471
});
@@ -103,7 +100,7 @@ class VideoCutscene extends Cutscene {
103100
FlxTween.tween(loadingBackdrop, {alpha: 1}, 0.5, {ease: FlxEase.sineInOut});
104101

105102
Main.execAsync(function() {
106-
if (video.load(localPath)) new FlxTimer().start(0.001, function(_) {
103+
if (video.load(localPath)) FlxTimer.wait(0.001, function() {
107104
mutex.acquire(); onReady(); mutex.release();
108105
});
109106
else { mutex.acquire(); close(); mutex.release(); }
@@ -203,18 +200,6 @@ class VideoCutscene extends Cutscene {
203200
}
204201
}
205202

206-
#if (hxvlc < version("2.0.0"))
207-
@:dox(hide) override public function onFocus() {
208-
if(FlxG.autoPause && !paused) video.resume();
209-
super.onFocus();
210-
}
211-
212-
@:dox(hide) override public function onFocusLost() {
213-
if(FlxG.autoPause && !paused) video.pause();
214-
super.onFocusLost();
215-
}
216-
#end
217-
218203
public override function pauseCutscene() {
219204
video.pause();
220205
super.pauseCutscene();

0 commit comments

Comments
 (0)