-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed: Double logging when cannot allocate a panel
Added: Dumping more state convars Updated: Picures in readme
- Loading branch information
1 parent
6af7434
commit 8ebf73e
Showing
19 changed files
with
184 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
set InpFile=tmp.lua | ||
set OutFile=trackassembly_init.lua | ||
set BasPath=%~dp0 | ||
set LuaPath=%1 | ||
set LogFile=%2 | ||
echo %BasPath%, %LuaPath%>%LogFile% | ||
copy %BasPath%..\..\lua\autorun\%OutFile% %BasPath%..\..\lua\autorun\%InpFile% | ||
call %LuaPath%lua.exe %BasPath%pre-commit.lua %BasPath%..\..\lua\autorun\ %OutFile% UNX E:\Desktop\tmp.txt | ||
del %BasPath%..\..\lua\autorun\tmp.lua | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,107 +1,108 @@ | ||
-- Test in CMD: | ||
-- ..\..\bin\lua.exe go.lua "E:\Documents\Lua-Projs\SVN\TrackAssemblyTool_GIT_master\lua\autorun\trackassembly_init.lua" "Rev." "UNX" | ||
-- Call in CMD: Script { LUA_PATH, LOG_FILE } | ||
-- Work: E:\Documents\Lua-Projs\SVN\TrackAssemblyTool_GIT_master\hooks\pre-commit.bat E:\Documents\Lua-Projs\Lua\Bin\ E:\Desktop\tmp.txt | ||
-- Home: | ||
|
||
local sLog = tostring(arg[4]) -- "test.lua" | ||
if((sLog == "nil") or (string.len(sLog) == 0)) then | ||
io.write("No output log file") | ||
else | ||
sLog = sLog:gsub("\\","/") | ||
fLog = io.open(sLog,"w+") | ||
if(fLog) then io.output(fLog) end | ||
end | ||
|
||
io.write("------------------ ARG ------------------\n") | ||
io.write("arg[1]<"..tostring(arg[1])..">\n") | ||
io.write("arg[2]<"..tostring(arg[2])..">\n") | ||
io.write("arg[3]<"..tostring(arg[3])..">\n") | ||
io.write("arg[4]<"..tostring(arg[4])..">\n") | ||
local sBase = tostring(arg[1]) | ||
sBase = sBase:gsub("\\","/") | ||
if((sBase == "nil") or (string.len(sBase) == 0)) then | ||
io.write("No file\n") | ||
return false | ||
end | ||
io.write("------------------ FILE ------------------\n") | ||
local sOut = tostring(arg[2]) -- "test.lua" | ||
if((sOut == "nil") or (string.len(sOut) == 0)) then | ||
io.write("No output file") | ||
return false | ||
end | ||
local sOut = sBase..sOut | ||
local sInp = sBase.."tmp.lua" | ||
io.write("<"..sOut..">\n<"..sInp..">\n") | ||
io.write("------------------ END ------------------\n") | ||
local sEnd = tostring(arg[3]) | ||
if((sEnd == "nil") or (string.len(sEnd) == 0)) then | ||
io.write("No end-line\n") | ||
return false | ||
end | ||
if(not (sEnd == "DOS" or sEnd == "UNX")) then | ||
io.write("Wrong end line mode: -"..sEnd.."-\n") | ||
return false | ||
end | ||
if(sEnd == "DOS") then sEnd = "\r\n" end | ||
if(sEnd == "UNX") then sEnd = "\n" end | ||
io.write("------------------ OPEN FILE ------------------\n") | ||
local fOut = io.open(sOut,"w+") | ||
local fInp = io.open(sInp,"r+") | ||
if(not fOut) then | ||
io.write("File "..sOut.." not found\n") | ||
return false | ||
end | ||
if(not fInp) then | ||
io.write("File "..sInp.." not found\n") | ||
return false | ||
end | ||
io.write("------------------ STORE ------------------\n") | ||
local sI = fInp:read() | ||
if(not sI) then | ||
io.write("File "..sInp.." reached EOF\n") | ||
return false | ||
end | ||
local sO, sCat = "", "" | ||
local sLog = "asmlib.SetLogControl(" | ||
local sVer = "asmlib.SetOpVar(\"TOOL_VERSION\",\"5." | ||
local nB, nE, nS, nL = 1, 1, 1, 1 | ||
while(sI) do | ||
nB, nE = sI:find(sLog,1,true) | ||
if(nB and nE) then | ||
sCat = "0,\"\")" | ||
io.write("["..tostring(nL).."]Disable logs[1]:<"..tostring(nB).."><"..tostring(nE).."><"..sCat..">\n") | ||
nB = sI:find(",",1,true) | ||
if(nB and tonumber(sI:sub(nE+1,nB-1))) then | ||
io.write("["..tostring(nL).."]Disable logs[2]:<"..tostring(nB).."><"..tostring(sI:sub(nE+1,nB-1)).."><"..tonumber(sI:sub(nE+1,nB-1))..">\n") | ||
sI = sLog..sCat | ||
end | ||
end | ||
nB, nE = sI:find(sVer,1,true) | ||
if(nB and nE) then | ||
sCat = "\")" | ||
io.write("["..tostring(nL).."]Increment the version[1]:<"..tostring(nB).."><"..tostring(nE).."><"..sCat..">\n") | ||
nB = sI:find(sCat,1,true) | ||
if(nB) then | ||
nS = tonumber(sI:sub(nE+1,nB-1)) | ||
io.write("["..tostring(nL).."]Increment the version[2]:<"..tostring(nS).."><"..tostring(sI:sub(nE+1,nB-1))..">\n") | ||
if(nS) then | ||
io.write("["..tostring(nL).."]Increment the version[3]:<"..tostring(nS+1)..">\n") | ||
sI = sVer..tostring(nS+1)..sCat | ||
end | ||
end | ||
end; nL = nL + 1 | ||
fOut:write(sI..sEnd) | ||
sI = fInp:read() | ||
end | ||
io.write("------------------ FINISH ------------------\n") | ||
fOut:flush() | ||
fOut:close() | ||
fInp:close() | ||
|
||
if(fLog) then | ||
fLog:flush() | ||
fLog:close() | ||
end | ||
|
||
|
||
-- Test in CMD: | ||
-- ..\..\bin\lua.exe go.lua "E:\Documents\Lua-Projs\SVN\TrackAssemblyTool_GIT_master\lua\autorun\trackassembly_init.lua" "Rev." "UNX" | ||
-- Call in CMD: Script { LUA_PATH, LOG_FILE } | ||
-- Work: E:\Documents\Lua-Projs\SVN\TrackAssemblyTool_GIT_master\hooks\pre-commit.bat E:\Documents\Lua-Projs\Lua\Bin\ E:\Desktop\tmp.txt | ||
-- Home: | ||
|
||
local sLog = tostring(arg[4]) -- "test.lua" | ||
if((sLog == "nil") or (string.len(sLog) == 0)) then | ||
io.write("No output log file") | ||
else | ||
sLog = sLog:gsub("\\","/") | ||
fLog = io.open(sLog,"a+") | ||
if(fLog) then io.output(fLog) end | ||
end | ||
|
||
io.write("------------------ ARG ------------------\n") | ||
io.write("arg[1]<"..tostring(arg[1])..">\n") | ||
io.write("arg[2]<"..tostring(arg[2])..">\n") | ||
io.write("arg[3]<"..tostring(arg[3])..">\n") | ||
io.write("arg[4]<"..tostring(arg[4])..">\n") | ||
local sBase = tostring(arg[1]) | ||
sBase = sBase:gsub("\\","/") | ||
if((sBase == "nil") or (string.len(sBase) == 0)) then | ||
io.write("No file\n") | ||
return false | ||
end | ||
io.write("------------------ FILE ------------------\n") | ||
local sOut = tostring(arg[2]) -- "test.lua" | ||
if((sOut == "nil") or (string.len(sOut) == 0)) then | ||
io.write("No output file") | ||
return false | ||
end | ||
local sOut = sBase..sOut | ||
local sInp = sBase.."tmp.lua" | ||
io.write("<"..sOut..">\n<"..sInp..">\n") | ||
io.write("------------------ END ------------------\n") | ||
local sEnd = tostring(arg[3]) | ||
if((sEnd == "nil") or (string.len(sEnd) == 0)) then | ||
io.write("No end-line\n") | ||
return false | ||
end | ||
if(not (sEnd == "DOS" or sEnd == "UNX")) then | ||
io.write("Wrong end line mode: -"..sEnd.."-\n") | ||
return false | ||
end | ||
if(sEnd == "DOS") then sEnd = "\r\n" end | ||
if(sEnd == "UNX") then sEnd = "\n" end | ||
io.write("------------------ OPEN FILE ------------------\n") | ||
local fOut = io.open(sOut,"w+") | ||
local fInp = io.open(sInp,"r+") | ||
if(not fOut) then | ||
io.write("File "..sOut.." not found\n") | ||
return false | ||
end | ||
if(not fInp) then | ||
io.write("File "..sInp.." not found\n") | ||
return false | ||
end | ||
io.write("------------------ STORE ------------------\n") | ||
local sI = fInp:read() | ||
if(not sI) then | ||
io.write("File "..sInp.." reached EOF\n") | ||
return false | ||
end | ||
local sO, sCat = "", "" | ||
local sLog = "asmlib.SetLogControl(" | ||
local sVer = "asmlib.SetOpVar(\"TOOL_VERSION\",\"5." | ||
local nB, nE, nS, nL, sL = 1, 1, 1, 1, "" | ||
while(sI) do | ||
sL = "["..tostring(nL).."]" | ||
nB, nE = sI:find(sLog,1,true) | ||
if(nB and nE) then | ||
sCat = "0,\"\")" | ||
io.write("Disable logs"..sL.."[1]:Found at <"..tostring(nB).."> to <"..tostring(nE).."> end <"..sCat..">\n") | ||
nB = sI:find(",",1,true) | ||
if(nB and tonumber(sI:sub(nE+1,nB-1))) then | ||
io.write("Disable logs"..sL.."[2]:Number at <"..tostring(nB).."> string <"..tostring(sI:sub(nE+1,nB-1)).."> to <"..tonumber(sI:sub(nE+1,nB-1)).."> Updated !\n") | ||
sI = sLog..sCat | ||
end | ||
end | ||
nB, nE = sI:find(sVer,1,true) | ||
if(nB and nE) then | ||
sCat = "\")" | ||
io.write("Increment the version"..sL.."[1]: Found at <"..tostring(nB).."> to <"..tostring(nE).."> end <"..sCat..">\n") | ||
nB = sI:find(sCat,1,true) | ||
if(nB) then | ||
nS = tonumber(sI:sub(nE+1,nB-1)) | ||
io.write("Increment the version"..sL.."[2]: String <"..tostring(sI:sub(nE+1,nB-1)).."> to <"..tostring(nS)..">\n") | ||
if(nS) then | ||
io.write("Increment the version"..sL.."[3]: Increment <"..tostring(nS+1).."> Updated !\n") | ||
sI = sVer..tostring(nS+1)..sCat | ||
end | ||
end | ||
end; nL = nL + 1 | ||
fOut:write(sI..sEnd) | ||
sI = fInp:read() | ||
end | ||
io.write("------------------ FINISH ------------------\n") | ||
fOut:flush() | ||
fOut:close() | ||
fInp:close() | ||
|
||
if(fLog) then | ||
fLog:flush() | ||
fLog:close() | ||
end | ||
|
||
|
File renamed without changes.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
V - Checked | ||
X - Fail | ||
D - Discontinued | ||
N - Not applicable | ||
? - Not yet tested |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
{ | ||
"title" : "Track Assembly Tool", | ||
"type" : "tool", | ||
"tags" : [ "fun", "build" ], | ||
"ignore" : | ||
[ | ||
"*.psd", | ||
"*.vcproj", | ||
"*.svn*", | ||
"*.git*", | ||
"*hooks*", | ||
"*data*", | ||
"license", | ||
"workshop_publish.bat", | ||
"addon.txt", | ||
"key.txt", | ||
"readme.md", | ||
"icon.jpg" | ||
] | ||
} | ||
{ | ||
"title" : "Track Assembly Tool", | ||
"type" : "tool", | ||
"tags" : [ "fun", "build" ], | ||
"ignore" : | ||
[ | ||
"*.psd", | ||
"*.vcproj", | ||
"*.svn*", | ||
"*.git*", | ||
"*hooks*", | ||
"*data*", | ||
"license", | ||
"workshop_publish.bat", | ||
"addon.txt", | ||
"key.txt", | ||
"readme.md", | ||
"icon.jpg" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
"AddonInfo" | ||
{ | ||
"name" "Track Assembly Tool" | ||
"author_name" "DVD" | ||
"info" "Assembles a track for vehicles to run on xD" | ||
} | ||
"AddonInfo" | ||
{ | ||
"name" "Track Assembly Tool" | ||
"author_name" "DVD" | ||
"info" "Assembles a track for vehicles to run on xD" | ||
} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.