1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-08-30 10:25:00 +00:00
Funkin/source/Prebuild.hx

33 lines
758 B
Haxe
Raw Permalink Normal View History

package source; // Yeah, I know...
import sys.io.File;
2024-03-17 02:20:22 +00:00
/**
* A script which executes before the game is built.
*/
class Prebuild
{
2024-03-17 02:20:22 +00:00
static inline final BUILD_TIME_FILE:String = '.build_time';
2024-03-17 02:20:22 +00:00
static function main():Void
{
var start:Float = Sys.time();
2025-08-11 19:49:54 +00:00
// Sys.println('[INFO] Performing pre-build tasks...');
saveBuildTime();
var end:Float = Sys.time();
var duration:Float = end - start;
2025-08-11 19:49:54 +00:00
// Sys.println('[INFO] Finished pre-build tasks in $duration seconds.');
}
2024-03-17 02:20:22 +00:00
static function saveBuildTime():Void
{
// PostBuild.hx reads this file and computes the total build duration.
2024-03-17 02:20:22 +00:00
var fo:sys.io.FileOutput = File.write(BUILD_TIME_FILE);
var now:Float = Sys.time();
fo.writeDouble(now);
fo.close();
}
}