update readme w sql, roll back dllpath, set moddir

This commit is contained in:
2023-05-02 09:56:52 -07:00
parent c8674f1f34
commit f8714b7012
4 changed files with 46 additions and 10 deletions

View File

@@ -15,7 +15,6 @@ import (
"fmt"
"log"
"os"
"path/filepath"
"strconv"
"strings"
"time"
@@ -28,7 +27,7 @@ var EXTENSION_VERSION string = "0.0.1"
var extensionCallbackFnc C.extensionCallback
// file paths
var ADDON_FOLDER string = getDir() + "\\@17thAttendanceTracker"
var ADDON_FOLDER string = getDir() + "\\@AttendanceTracker"
var LOG_FILE string = ADDON_FOLDER + "\\attendanceTracker.log"
var CONFIG_FILE string = ADDON_FOLDER + "\\config.json"
@@ -77,16 +76,16 @@ func loadConfig() {
functionName := "loadConfig"
// get location of this dll
dllPath, err := filepath.Abs(os.Args[0])
if err != nil {
writeLog(functionName, fmt.Sprintf(`["Error getting DLL path: %v", "ERROR"]`, err))
return
}
// dllPath, err := filepath.Abs(os.Args[0])
// if err != nil {
// writeLog(functionName, fmt.Sprintf(`["Error getting DLL path: %v", "ERROR"]`, err))
// return
// }
// set the addon directory to the parent directory of the dll
ADDON_FOLDER = filepath.Dir(dllPath)
LOG_FILE = ADDON_FOLDER + "\\attendanceTracker.log"
CONFIG_FILE = ADDON_FOLDER + "\\config.json"
// ADDON_FOLDER = filepath.Dir(dllPath)
// LOG_FILE = ADDON_FOLDER + "\\attendanceTracker.log"
// CONFIG_FILE = ADDON_FOLDER + "\\config.json"
file, err := os.Open(CONFIG_FILE)
if err != nil {