2023-08-28 19:03:29 +00:00
|
|
|
package source; // Yeah, I know...
|
|
|
|
|
2024-03-03 04:49:27 +00:00
|
|
|
import sys.io.File;
|
|
|
|
|
2024-03-17 02:20:22 +00:00
|
|
|
/**
|
|
|
|
* A script which executes before the game is built.
|
|
|
|
*/
|
2023-08-28 19:03:29 +00:00
|
|
|
class Prebuild
|
|
|
|
{
|
2024-03-17 02:20:22 +00:00
|
|
|
static inline final BUILD_TIME_FILE:String = '.build_time';
|
2024-03-03 04:49:27 +00:00
|
|
|
|
2024-03-17 02:20:22 +00:00
|
|
|
static function main():Void
|
2023-08-28 19:03:29 +00:00
|
|
|
{
|
2024-03-03 04:49:27 +00:00
|
|
|
saveBuildTime();
|
|
|
|
trace('Building...');
|
|
|
|
}
|
|
|
|
|
2024-03-17 02:20:22 +00:00
|
|
|
static function saveBuildTime():Void
|
2024-03-03 04:49:27 +00:00
|
|
|
{
|
2024-03-17 02:20:22 +00:00
|
|
|
var fo:sys.io.FileOutput = File.write(BUILD_TIME_FILE);
|
|
|
|
var now:Float = Sys.time();
|
2024-03-03 04:49:27 +00:00
|
|
|
fo.writeDouble(now);
|
|
|
|
fo.close();
|
2023-08-28 19:03:29 +00:00
|
|
|
}
|
|
|
|
}
|