From 38af44112af5044a2496bb83a6db29316e2d9d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=8D=9A=7ENex?= <87421482+NexIsDumb@users.noreply.github.com> Date: Wed, 31 Jul 2024 18:38:57 +0200 Subject: [PATCH 1/8] fixing a thingie when rebuilding lime --- libs.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs.xml b/libs.xml index f19a5739..eeecc9e0 100644 --- a/libs.xml +++ b/libs.xml @@ -20,12 +20,11 @@ - - - + + From ad52d5ac00918fea416c2add1ccffad389e22e85 Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Fri, 2 Aug 2024 13:31:18 +0200 Subject: [PATCH 2/8] Added hxcpp fork --- libs.xml | 13 +++++++++++++ setup-dev.xml | 12 ++++++++++++ 2 files changed, 25 insertions(+) diff --git a/libs.xml b/libs.xml index eeecc9e0..a7ad3aef 100644 --- a/libs.xml +++ b/libs.xml @@ -25,6 +25,19 @@ + + + + + + + + + + Rebuilding Hxcpp... + + + diff --git a/setup-dev.xml b/setup-dev.xml index be2eedb2..c3de04d2 100644 --- a/setup-dev.xml +++ b/setup-dev.xml @@ -82,5 +82,17 @@ + + + cd dev-libs + git clone https://github.com/NeeEoo/hxcpp hxcpp + cd .. + haxelib dev hxcpp dev-libs/hxcpp + + + + + + Setup for dev libs complete! From 763e47813bdfa1442d40f0f80046332fb8023271 Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Fri, 2 Aug 2024 13:59:11 +0200 Subject: [PATCH 3/8] Aaaaaa --- commandline/commands/Update.hx | 14 +++++++++----- libs.xml | 4 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/commandline/commands/Update.hx b/commandline/commands/Update.hx index 4e3fb3b1..60c60574 100644 --- a/commandline/commands/Update.hx +++ b/commandline/commands/Update.hx @@ -46,6 +46,7 @@ class Update { type: libNode.name }; if (libNode.has.global) lib.global = libNode.att.global; + if (libNode.has.skipDeps) lib.skipDeps = libNode.att.skipDeps; switch (lib.type) { case "lib": if (libNode.has.version) lib.version = libNode.att.version; @@ -120,21 +121,22 @@ class Update { } var commandSuffix = " --always"; - if (SILENT) commandSuffix += " --silent"; + if (SILENT) commandSuffix += " --quiet"; for(event in events) { switch(event.type) { case INSTALL: var lib:Library = event.data; - var globalism:Null = lib.global == "true" ? "--global" : null; - var globalSuffix = globalism != null ? ' $globalism' : ''; + var globalSuffix:Null = lib.global == "true" ? " --global" : ""; + var skipDeps = lib.skipDeps == "true" ? " --skip-dependencies" : ""; + var commandPrefix = commandSuffix + globalSuffix + skipDeps;// + " --no-timeout"; switch(lib.type) { case "lib": prettyPrint((lib.global == "true" ? "Globally installing" : "Locally installing") + ' "${lib.name}"...'); - Sys.command('haxelib install ${lib.name} ${lib.version != null ? " " + lib.version : " "}$globalSuffix$commandSuffix'); + Sys.command('haxelib$commandPrefix install ${lib.name} ${lib.version != null ? " " + lib.version : " "}'); case "git": prettyPrint((lib.global == "true" ? "Globally installing" : "Locally installing") + ' "${lib.name}" from git url "${lib.url}"'); - Sys.command('haxelib git ${lib.name} ${lib.url}${lib.ref != null ? ' ${lib.ref}' : ''}$globalSuffix$commandSuffix'); + Sys.command('haxelib$commandPrefix git ${lib.name} ${lib.url}${lib.ref != null ? ' ${lib.ref}' : ''}'); default: prettyPrint('Cannot resolve library of type "${lib.type}"'); } @@ -264,6 +266,8 @@ typedef Library = { var name:String; var type:String; var ?global:String; + var ?skipDeps:String; + var ?recursive:String; var ?version:String; var ?ref:String; var ?url:String; diff --git a/libs.xml b/libs.xml index a7ad3aef..0f9139d8 100644 --- a/libs.xml +++ b/libs.xml @@ -14,8 +14,8 @@ - - + + From da20261490c88320b24bc4f3dde07ad4a82e1869 Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Fri, 2 Aug 2024 14:11:59 +0200 Subject: [PATCH 4/8] Fix issues --- commandline/commands/Update.hx | 19 +++++++++++++++---- setup-dev.xml | 24 ++++++++++++------------ 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/commandline/commands/Update.hx b/commandline/commands/Update.hx index 60c60574..0d39d27c 100644 --- a/commandline/commands/Update.hx +++ b/commandline/commands/Update.hx @@ -7,8 +7,19 @@ import sys.io.Process; import sys.FileSystem; class Update { + private static function recursiveDelete(path:String) { + for(file in FileSystem.readDirectory(path)) { + var p = '$path/$file'; + if(FileSystem.isDirectory(p)) + recursiveDelete(p); + else + FileSystem.deleteFile(p); + } + FileSystem.deleteDirectory(path); + } + public static function main(args:Array) { - var args = ArgParser.parse(args, ["S" => "silent-progress", "silent" => "silent-progress"]); + var args = ArgParser.parse(args, ["s" => "silent-progress", "S" => "silent-progress", "silent" => "silent-progress"]); var CHECK_VSTUDIO = !args.existsOption("no-vscheck"); var REINSTALL_ALL = args.existsOption("reinstall"); var SILENT = args.existsOption("silent-progress"); @@ -18,7 +29,7 @@ class Update { FileSystem.createDirectory('.haxelib'); if (REINSTALL_ALL) { - FileSystem.deleteDirectory('.haxelib'); + recursiveDelete('.haxelib'); FileSystem.createDirectory('.haxelib'); } @@ -102,9 +113,9 @@ class Update { if(args.args.length == 0) defines.push("all"); function parse(libNode:Access) { - if(libNode.name == "if") { + if(libNode.name == "if" || libNode.name == "unless") { var cond = libNode.att.cond; - if(!Utils.evaluateArgsCondition(cond, defines)) { + if(Utils.evaluateArgsCondition(cond, defines) != (libNode.name == "if")) { return; } diff --git a/setup-dev.xml b/setup-dev.xml index c3de04d2..ba79d790 100644 --- a/setup-dev.xml +++ b/setup-dev.xml @@ -6,6 +6,18 @@ mkdir dev-libs + + + cd dev-libs + git clone https://github.com/NeeEoo/hxcpp hxcpp + cd .. + haxelib dev hxcpp dev-libs/hxcpp + + + + + + cd dev-libs @@ -82,17 +94,5 @@ - - - cd dev-libs - git clone https://github.com/NeeEoo/hxcpp hxcpp - cd .. - haxelib dev hxcpp dev-libs/hxcpp - - - - - - Setup for dev libs complete! From 8cb833a38d6e255820960ea186c99d1877280aaf Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Fri, 2 Aug 2024 14:24:50 +0200 Subject: [PATCH 5/8] Fix compiling issues --- source/funkin/backend/chart/Chart.hx | 1 + source/funkin/backend/chart/ChartData.hx | 1 + source/funkin/backend/chart/FNFLegacyParser.hx | 1 + source/funkin/editors/charter/Charter.hx | 2 +- source/funkin/game/PlayState.hx | 2 +- 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/source/funkin/backend/chart/Chart.hx b/source/funkin/backend/chart/Chart.hx index 9eabd626..87302b71 100644 --- a/source/funkin/backend/chart/Chart.hx +++ b/source/funkin/backend/chart/Chart.hx @@ -56,6 +56,7 @@ class Chart { data.setFieldDefault("name", songName); data.setFieldDefault("beatsPerMeasure", 4); data.setFieldDefault("stepsPerBeat", 4); + data.setFieldDefault("needsVoices", true); data.setFieldDefault("icon", "face"); data.setFieldDefault("difficulties", []); data.setFieldDefault("coopAllowed", false); diff --git a/source/funkin/backend/chart/ChartData.hx b/source/funkin/backend/chart/ChartData.hx index 7e6ad795..3f8f3302 100644 --- a/source/funkin/backend/chart/ChartData.hx +++ b/source/funkin/backend/chart/ChartData.hx @@ -26,6 +26,7 @@ typedef ChartMetaData = { public var ?coopAllowed:Bool; public var ?opponentModeAllowed:Bool; public var ?customValues:Dynamic; + public var ?needsVoices:Bool; // NOT TO BE EXPORTED public var ?parsedColor:FlxColor; diff --git a/source/funkin/backend/chart/FNFLegacyParser.hx b/source/funkin/backend/chart/FNFLegacyParser.hx index 3bd0dfad..6eb26188 100644 --- a/source/funkin/backend/chart/FNFLegacyParser.hx +++ b/source/funkin/backend/chart/FNFLegacyParser.hx @@ -41,6 +41,7 @@ class FNFLegacyParser { } result.meta.bpm = data.bpm; + result.meta.needsVoices = data.needsVoices.getDefault(true); var camFocusedBF:Bool = false; var altAnims:Bool = false; diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 7135b90e..dc862cc4 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -526,7 +526,7 @@ class Charter extends UIState { noteTypes = PlayState.SONG.noteTypes; FlxG.sound.setMusic(FlxG.sound.load(Paths.inst(__song, __diff))); - if (Assets.exists(Paths.voices(__song, __diff))) // null or true + if (PlayState.SONG.meta.needsVoices != false && Assets.exists(Paths.voices(__song, __diff))) // null or true vocals = FlxG.sound.load(Paths.voices(__song, __diff)); else vocals = new FlxSound(); diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 31fa37c7..20e3ce7b 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -1000,7 +1000,7 @@ class PlayState extends MusicBeatState curSong = songData.meta.name.toLowerCase(); inst = FlxG.sound.load(Paths.inst(SONG.meta.name, difficulty)); - if (Assets.exists(Paths.voices(SONG.meta.name, difficulty))) // null or true + if (SONG.meta.needsVoices != false && Assets.exists(Paths.voices(SONG.meta.name, difficulty))) // null or true vocals = FlxG.sound.load(Paths.voices(SONG.meta.name, difficulty)); else vocals = new FlxSound(); From 1a4c2cac21b42523b1b4e04e2edabf5cfb8ebf92 Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Fri, 2 Aug 2024 14:48:19 +0200 Subject: [PATCH 6/8] Oops --- source/funkin/backend/chart/FNFLegacyParser.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/funkin/backend/chart/FNFLegacyParser.hx b/source/funkin/backend/chart/FNFLegacyParser.hx index 6eb26188..0e5f55df 100644 --- a/source/funkin/backend/chart/FNFLegacyParser.hx +++ b/source/funkin/backend/chart/FNFLegacyParser.hx @@ -146,6 +146,7 @@ class FNFLegacyParser { notes: null, bpm: chart.meta.bpm, speed: chart.scrollSpeed, + needsVoices: chart.meta.needsVoices, player1: null, player2: null, @@ -209,6 +210,7 @@ typedef SwagSong = var ?stage:String; var ?noteTypes:Array; var ?events:Array; + var ?needsVoices:Bool; var player1:String; var player2:String; From 2e1fd5897adc9944591a1ccc802cd78d5d912e4b Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Fri, 2 Aug 2024 15:04:53 +0200 Subject: [PATCH 7/8] Remove SQLITE and MYSQL --- source/funkin/backend/system/macros/Macros.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/funkin/backend/system/macros/Macros.hx b/source/funkin/backend/system/macros/Macros.hx index 9183e4a4..0711c612 100644 --- a/source/funkin/backend/system/macros/Macros.hx +++ b/source/funkin/backend/system/macros/Macros.hx @@ -31,10 +31,10 @@ class Macros { if(Context.defined("sys")) { for(inc in ["sys", "openfl.net", "funkin.backend.system.net"]) { if(!isHl) - Compiler.include(inc); + Compiler.include(inc, ["sys.db.Sqlite", "sys.db.Mysql"]); else { // TODO: Hashlink - //Compiler.include(inc, ["sys.net.UdpSocket", "openfl.net.DatagramSocket"]); // fixes FATAL ERROR : Failed to load function std@socket_set_broadcast + //Compiler.include(inc, ["sys.net.UdpSocket", "openfl.net.DatagramSocket", "sys.db.Sqlite", "sys.db.Mysql"]); // fixes FATAL ERROR : Failed to load function std@socket_set_broadcast } } } From 04ab53ee385dc3c66fc326d6c403642f1b4e73db Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Fri, 2 Aug 2024 15:24:21 +0200 Subject: [PATCH 8/8] Some more stuffs --- source/funkin/backend/system/macros/Macros.hx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source/funkin/backend/system/macros/Macros.hx b/source/funkin/backend/system/macros/Macros.hx index 0711c612..d40855b3 100644 --- a/source/funkin/backend/system/macros/Macros.hx +++ b/source/funkin/backend/system/macros/Macros.hx @@ -28,13 +28,21 @@ class Macros { var isHl = Context.defined("hl"); + var compathx4 = [ + "sys.db.Sqlite", + "sys.db.Mysql", + "sys.db.Connection", + "sys.db.ResultSet", + "haxe.remoting.Proxy", + ]; + if(Context.defined("sys")) { for(inc in ["sys", "openfl.net", "funkin.backend.system.net"]) { if(!isHl) - Compiler.include(inc, ["sys.db.Sqlite", "sys.db.Mysql"]); + Compiler.include(inc, compathx4); else { // TODO: Hashlink - //Compiler.include(inc, ["sys.net.UdpSocket", "openfl.net.DatagramSocket", "sys.db.Sqlite", "sys.db.Mysql"]); // fixes FATAL ERROR : Failed to load function std@socket_set_broadcast + //Compiler.include(inc, compathx4.concat(["sys.net.UdpSocket", "openfl.net.DatagramSocket"]); // fixes FATAL ERROR : Failed to load function std@socket_set_broadcast } } }