From 43db2798951d945abd463574b42dfcffdcf3f448 Mon Sep 17 00:00:00 2001 From: zontreck Date: Mon, 6 Jan 2025 02:44:33 -0700 Subject: [PATCH] Add a timestamp generator helper utility --- compile.bat | 19 ++++++++++--------- compile.sh | 1 + dart/bin/timestamp.dart | 8 ++++++++ dart/lib/constants.dart | 3 +++ dart/pubspec.yaml | 2 +- installscript.sh | 4 +++- 6 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 dart/bin/timestamp.dart diff --git a/compile.bat b/compile.bat index 61097a0..345257c 100644 --- a/compile.bat +++ b/compile.bat @@ -13,14 +13,15 @@ cd dart mkdir out call dart pub get -call dart compile exe -o out\\gch.exe bin\\ch.dart -call dart compile exe -o out\\dbikc.exe bin\\dbikc.dart -call dart compile exe -o out\\uuidgen.exe bin\\uuidgen.dart -call dart compile exe -o out\\mkfsreport.exe bin\\mkfsreport.dart -call dart compile exe -o out\\nbt2snbt.exe bin\\nbt2snbt.dart -call dart compile exe -o out\\snbt2nbt.exe bin\\snbt2nbt.dart -call dart compile exe -o out\\pause.exe bin\\pause.dart -call dart compile exe -o out\\sleep.exe bin\\sleep.dart -call dart compile exe -o out\\regedit.exe bin\\regedit.dart +call dart compile exe -o out\gch.exe bin\ch.dart +call dart compile exe -o out\dbikc.exe bin\dbikc.dart +call dart compile exe -o out\uuidgen.exe bin\uuidgen.dart +call dart compile exe -o out\mkfsreport.exe bin\mkfsreport.dart +call dart compile exe -o out\nbt2snbt.exe bin\nbt2snbt.dart +call dart compile exe -o out\snbt2nbt.exe bin\snbt2nbt.dart +call dart compile exe -o out\pause.exe bin\pause.dart +call dart compile exe -o out\sleep.exe bin\sleep.dart +call dart compile exe -o out\regedit.exe bin\regedit.dart +call dart compile exe -o out\timestamp.exe bin\timestamp.dart cd .. diff --git a/compile.sh b/compile.sh index 9d3361a..0108954 100755 --- a/compile.sh +++ b/compile.sh @@ -20,6 +20,7 @@ dart compile exe -o out/uuidgen-linux-x64 bin/uuidgen.dart dart compile exe -o out/pause-linux-x64 bin/pause.dart dart compile exe -o out/sleep-linux-x64 bin/sleep.dart dart compile exe -o out/regedit-linux-x64 bin/regedit.dart +dart compile exe -o out/timestamp-linux-x64 bin/timestamp.dart cd .. diff --git a/dart/bin/timestamp.dart b/dart/bin/timestamp.dart new file mode 100644 index 0000000..9324c2d --- /dev/null +++ b/dart/bin/timestamp.dart @@ -0,0 +1,8 @@ +import 'package:libac_dart/utils/TimeUtils.dart'; +import 'package:simplehelpertools/constants.dart'; + +void main() { + print( + "Timestamp\nVersion: ${HelperConsts.TIMESTAMP_VERSION}\nLibAC Version: ${HelperConsts.LIBAC_VERSION}\n\n"); + print("Current unix timestamp is: ${TimeUtils.getUnixTimestamp()}"); +} diff --git a/dart/lib/constants.dart b/dart/lib/constants.dart index cecace4..680ecca 100644 --- a/dart/lib/constants.dart +++ b/dart/lib/constants.dart @@ -8,4 +8,7 @@ class HelperConsts { static const CH_VERSION = "1.0.112724+1534"; static String get LIBAC_VERSION => Constants.VERSION; + + static const AES_VERSION = "1.0.010625+0238"; + static const TIMESTAMP_VERSION = "1.0.010625+0238"; } diff --git a/dart/pubspec.yaml b/dart/pubspec.yaml index 6236322..77d8ea0 100644 --- a/dart/pubspec.yaml +++ b/dart/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: args: ^2.4.2 libac_dart: hosted: https://git.zontreck.com/api/packages/AriasCreations/pub/ - version: 1.2.82924+1846 + version: 1.3.010625+0228 dev_dependencies: lints: ^4.0.0 diff --git a/installscript.sh b/installscript.sh index 300d18b..3a072ae 100644 --- a/installscript.sh +++ b/installscript.sh @@ -73,9 +73,11 @@ download_with_retry "https://ci.zontreck.com/job/Projects/job/Dart/job/SimpleHel download_with_retry "https://ci.zontreck.com/job/Projects/job/Dart/job/AWSParser/job/main/lastSuccessfulBuild/artifact/out/awsparser" "/usr/bin/awsparser" +download_with_retry "https://ci.zontreck.com/job/Projects/job/Dart/job/SimpleHelperTools/job/main/lastSuccessfulBuild/artifact/dart/out/timestamp-linux-x64" "/usr/bin/timestamp" + # Set executable permissions -eval "$SUDO_CMD chmod +x /usr/bin/{nbt2snbt,snbt2nbt,pause,mkfsreport,dbikc,vsleep,uuidgen,regedit,awsparser}" +eval "$SUDO_CMD chmod +x /usr/bin/{nbt2snbt,snbt2nbt,pause,mkfsreport,dbikc,vsleep,uuidgen,regedit,awsparser,timestamp}" echo "Installation Completed" vsleep 5