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