fixed the processing of the command-line argument setting Main_appDir/Main_dataDir

This commit is contained in:
joten 2012-12-05 13:50:30 +01:00
parent ea41d7ae00
commit c3e342a7de
2 changed files with 4 additions and 5 deletions

View file

@ -4,3 +4,4 @@ src/log.txt
syntax: regexp syntax: regexp
.*[cC]onfig.*\.ini .*[cC]onfig.*\.ini
.+\.\w{3}~ .+\.\w{3}~
src/data/_.*.ini

View file

@ -33,9 +33,7 @@ SetWinDelay, 10
;; Pseudo main function ;; Pseudo main function
If 0 = 1 If 0 = 1
Main_dataDir = %1% Main_appDir = %1%
Else
Main_dataDir = %A_ScriptDir%
Main_setup() Main_setup()
@ -153,7 +151,6 @@ Main_makeDir(dirName) {
Main_setup() { Main_setup() {
Local winAppDir Local winAppDir
Main_appDir := ""
Main_logFile := "" Main_logFile := ""
Main_dataDir := "" Main_dataDir := ""
Main_autoLayout := "" Main_autoLayout := ""
@ -161,7 +158,8 @@ Main_setup() {
EnvGet, winAppDir, APPDATA EnvGet, winAppDir, APPDATA
Main_appDir := winAppDir . "\bug.n" If Main_appDir = ""
Main_appDir := winAppDir . "\bug.n"
Main_logFile := Main_appDir . "\bugn_log.txt" Main_logFile := Main_appDir . "\bugn_log.txt"
Main_dataDir := Main_appDir . "\data" Main_dataDir := Main_appDir . "\data"
Main_autoLayout := Main_dataDir . "\_Layout.ini" Main_autoLayout := Main_dataDir . "\_Layout.ini"