diff --git a/libs.xml b/libs.xml index 838a9991..9f3f5ede 100644 --- a/libs.xml +++ b/libs.xml @@ -30,7 +30,7 @@ - Building Lime... + Rebuilding Lime... diff --git a/setup-dev-branch.xml b/setup-dev-branch.xml index 922804eb..ed3eb905 100644 --- a/setup-dev-branch.xml +++ b/setup-dev-branch.xml @@ -1,20 +1,30 @@ - Switching to branch... + Switching to branch 'time-fix'... + Done! Make sure to switch the branch on Codename Engine to 'time-fix' before compiling! - Switching to branch... + Switching to branch 'dev'... + Done! Make sure to switch the branch on Codename Engine to 'main' before compiling! + + Rebuilding Lime... + + + cd tools + haxe tools.hxml + cd ..s + diff --git a/source/funkin/backend/system/macros/BuildInfo.hx b/source/funkin/backend/system/macros/BuildInfo.hx index 9d936b44..f86d67e2 100644 --- a/source/funkin/backend/system/macros/BuildInfo.hx +++ b/source/funkin/backend/system/macros/BuildInfo.hx @@ -1,10 +1,32 @@ package funkin.backend.system.macros; +using StringTools; + #if macro class BuildInfo { public static function printBuildInfo() { + var haxeVersion = haxe.macro.Context.definedValue("haxe"); Sys.println('[ BUILD INFO ]'); - Sys.println('Haxe Version: ${haxe.macro.Context.definedValue("haxe")}'); + Sys.println('Haxe Version: ${haxeVersion}'); + try { + var lastBuiltWith:Null = null; + var compiling = #if final "final" #elseif debug "debug" #else "release" #end; + var target = #if windows "windows" #elseif mac "macos" #elseif linux "linux" #elseif android "android" #elseif ios "ios" #elseif html5 "html5" #else "" #end; + if(target == "") throw "Unknown target"; + var exportPath = Sys.getCwd() + "/export/" + compiling + "/" + target + "/"; + exportPath += "obj/Options.txt"; + + var options = sys.io.File.getContent(exportPath); + for(option in options.split("\n")) { + if(option.startsWith("haxe=")) { + lastBuiltWith = option.substr(5); + break; + } + } + + if(lastBuiltWith != null && lastBuiltWith != haxeVersion) + Sys.println('Last Built With Haxe: ${lastBuiltWith} [!!!! MAKE SURE IF YOU SWITCHED VERSIONS YOU DELETE EXPORT FOLDERS !!!!]'); + } catch(e) {} Sys.println('Target Platform: ${ #if windows "Windows" #elseif mac "Mac"