diff --git a/linux.sh b/linux.sh new file mode 100755 index 0000000..9415c5a --- /dev/null +++ b/linux.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# For patching discord_rpc and hxCodec to work properly on Linux. +# Please only run this after you have done "hmm install" +# Make sure you have dos2unix installed, I'm using it because when I tried to apply patch +# the patch command got annoyed by differing line endings +# +# The patch for discord_rpc is to fix an issue with the rapidjson library that makes it refuse to compile +# The patch for hxCodec is to fix a crash that happens apon loading a video due to some kind of lua clash (?) +# Apologies, I'm not too versed in VLC, I just know nuking VLCs lua capabilities fixes the crash. +# I also have to correct a broken symlink that prevents vlc from being linked properly, hence the symlink commands. + +dos2unix .haxelib/discord_rpc/git/lib/rapidjson/include/rapidjson/document.h +dos2unix .haxelib/hxCodec/2,6,1/hxcodec/vlc/VLCBitmap.hx # Annoying +patch .haxelib/discord_rpc/git/lib/rapidjson/include/rapidjson/document.h < ./patch4linux/document.h.patch +patch .haxelib/hxCodec/2,6,1/hxcodec/vlc/VLCBitmap.hx < ./patch4linux/VLCBitmap.hx.patch +ln -sf ./libvlc.so.5.6.0 .haxelib/hxCodec/2,6,1/lib/vlc/lib/Linux/libvlc.so.5 +ln -sf ./libvlccore.so.9.0.0 .haxelib/hxCodec/2,6,1/lib/vlc/lib/Linux/libvlccore.so.9 + +echo Game should workie now!!!!!!! Try "Lime test Linux" \ No newline at end of file diff --git a/patch4linux/VLCBitmap.hx.patch b/patch4linux/VLCBitmap.hx.patch new file mode 100644 index 0000000..f414619 --- /dev/null +++ b/patch4linux/VLCBitmap.hx.patch @@ -0,0 +1,32 @@ +--- /Repositorys/fnf-ourpleV3-public/.haxelib/hxCodec/2,6,1/hxcodec/vlc/VLCBitmap.hx 2026-02-28 14:01:35.304894746 -0500 ++++ /Repositorys/.haxelib/hxCodec/2,6,1/hxcodec/vlc/VLCBitmap.hx 2026-02-28 01:03:42.000000000 -0500 +@@ -16,6 +16,9 @@ + import openfl.events.Event; + import openfl.utils.ByteArray; + import hxcodec.vlc.LibVLC; ++import cpp.RawPointer; ++import cpp.RawConstPointer; ++import cpp.ConstCharStar; + + /** + * ... +@@ -154,7 +157,19 @@ + for (event in 0...7) + flags[event] = false; + ++ #if linux ++ instance = untyped __cpp__(' ++ []() { ++ const char* const args[] = { ++ "--no-lua", ++ "--quiet" ++ }; ++ return libvlc_new(2, args); ++ }() ++ '); ++ #else + instance = LibVLC.init(0, null); ++ #end + audioOutput = LibVLC.audio_output_list_get(instance); + + if (stage != null) diff --git a/patch4linux/document.h.patch b/patch4linux/document.h.patch new file mode 100644 index 0000000..6082bbc --- /dev/null +++ b/patch4linux/document.h.patch @@ -0,0 +1,11 @@ +--- /Repositorys/fnf-ourpleV3-public/.haxelib/discord_rpc/git/lib/rapidjson/include/rapidjson/document.h 2026-02-28 14:01:09.262632679 -0500 ++++ /Repositorys/.haxelib/discord_rpc/git/lib/rapidjson/include/rapidjson/document.h 2026-02-28 00:48:56.000000000 -0500 +@@ -316,7 +316,7 @@ + + GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {} + +- GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; } ++ //GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; } + + //! implicit conversion to plain CharType pointer + operator const Ch *() const { return s; }