mirror of
https://github.com/indig0fox/Arma3-AttendanceTracker.git/
synced 2025-12-08 01:41:49 -06:00
working version
This commit is contained in:
8
.gitignore
vendored
8
.gitignore
vendored
@@ -2,16 +2,10 @@
|
||||
*.bak
|
||||
*.pbo
|
||||
*.dll
|
||||
config.json
|
||||
**/AttendanceTracker_x64.h
|
||||
**/AttendanceTracker.h
|
||||
/extension/@AttendanceTracker/
|
||||
|
||||
\@AttendanceTracker.7z
|
||||
*.so
|
||||
*.pbo
|
||||
.hemttout
|
||||
hemtt
|
||||
hemtt.exe
|
||||
*.biprivatekey
|
||||
|
||||
*.bk
|
||||
|
||||
2
README
2
README
@@ -226,6 +226,8 @@ docker run --rm -it -v ${PWD}:/app -e GOOS=linux -e GOARCH=386 -e CGO_ENABLED=1
|
||||
|
||||
### Compile Addon
|
||||
|
||||
First, move the compiled dlls from extension/AttendanceTracker/dist to the project root.
|
||||
|
||||
To prepare the addon, you'll need to download the [HEMTT](https://brettmayson.github.io/HEMTT/commands/build.html) binary, place it in the project root, and run the following command:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "..\script_mod.hpp"
|
||||
|
||||
params [
|
||||
["_message", "", [""]],
|
||||
["_level", "INFO", [""]],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#define MAJOR 0
|
||||
#define MINOR 2
|
||||
#define PATCH 0
|
||||
#define BUILD 20230919
|
||||
#define BUILD 20231003
|
||||
|
||||
#define VERSION 0.2
|
||||
#define VERSION_STR MAJOR##.##MINOR##.##PATCH##.##BUILD
|
||||
|
||||
@@ -92,6 +92,8 @@ func init() {
|
||||
logger.Log.Info().Msgf(result)
|
||||
}
|
||||
|
||||
logger.RotateLogs()
|
||||
|
||||
logger.ArmaOnly.Info().Msgf(`%s v%s started`, EXTENSION_NAME, "0.0.0")
|
||||
logger.ArmaOnly.Info().Msgf(`Log path: %s`, logger.ActiveOptions.Path)
|
||||
|
||||
@@ -107,6 +109,14 @@ func init() {
|
||||
logger.Log.Error().Err(err).Msgf(`Error connecting to database`)
|
||||
return
|
||||
}
|
||||
|
||||
logger.Log.Info().
|
||||
Str("dialect", db.Client().Dialector.Name()).
|
||||
Str("database", db.Client().Migrator().CurrentDatabase()).
|
||||
Str("host", util.ConfigJSON.GetString("sqlConfig.mysqlHost")).
|
||||
Int("port", util.ConfigJSON.GetInt("sqlConfig.mysqlPort")).
|
||||
Msgf(`Connected to database`)
|
||||
|
||||
err = db.Client().Set("gorm:table_options", "ENGINE=InnoDB").AutoMigrate(
|
||||
&World{},
|
||||
&Mission{},
|
||||
@@ -119,7 +129,6 @@ func init() {
|
||||
startA3CallHandlers()
|
||||
|
||||
initSuccess = true
|
||||
logger.RotateLogs()
|
||||
a3interface.WriteArmaCallback(
|
||||
EXTENSION_NAME,
|
||||
":READY:",
|
||||
|
||||
@@ -22,7 +22,6 @@ require (
|
||||
github.com/mattn/go-isatty v0.0.19 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
||||
github.com/peterstace/simplefeatures v0.44.0 // indirect
|
||||
github.com/spf13/afero v1.9.5 // indirect
|
||||
github.com/spf13/cast v1.5.1 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,6 @@ package db
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/indig0fox/a3go/a3interface"
|
||||
"gorm.io/driver/mysql"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -55,8 +54,5 @@ func Connect() error {
|
||||
return err
|
||||
}
|
||||
|
||||
a3interface.WriteArmaCallback("connectDB", `["Database connected", "INFO"]`)
|
||||
a3interface.WriteArmaCallback("connectDB", `["SUCCESS", "INFO"]`)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -26,9 +26,9 @@ func LoadConfig(modulePathDir string) (string, error) {
|
||||
"mysqlDatabase": "a3attendance",
|
||||
})
|
||||
ConfigJSON.SetDefault("armaConfig", map[string]interface{}{
|
||||
"debug": true,
|
||||
"traceLogToFile": false,
|
||||
"dbUpdateIntervalS": 60,
|
||||
"debug": true,
|
||||
"traceLogToFile": false,
|
||||
"dbUpdateInterval": "90s",
|
||||
})
|
||||
|
||||
wd, err := os.Getwd()
|
||||
|
||||
Binary file not shown.
BIN
releases/attendancetracker-0.2.0.20231003-29228b.zip
Normal file
BIN
releases/attendancetracker-0.2.0.20231003-29228b.zip
Normal file
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user