Issue #59 new

Generation failure when working directory is not glLoadGen directory

David Ziman
created an issue

e:\Projects\ZGame\ZGame>..\lua\lua52.exe ..\glLoadGen\LoadGen.lua core_4_4 -style=pointer_c -spec=wgl -profile=core -stdext=wgl_common.txt ..\lua\lua52.exe: cannot open ..\glLoadGen\data/l_specloaderfunc.lua: No such file or directory stack traceback: [C]: in function 'dofile' ..\glLoadGen\data/wgl_specloaderfunc.lua:2: in main chunk [C]: in function 'dofile' ..\glLoadGen\modules/Specs.lua:140: in function 'GetLoaderFunc' ..\glLoadGen\modules/PointerC_Style.lua:242: in function '?' ..\glLoadGen\modules/Structure.lua:135: in function 'CallFunction' ..\glLoadGen\modules/Structure.lua:376: in function 'PreProcess' ..\glLoadGen\modules/Structure.lua:43: in function 'Process' ..\glLoadGen\modules/Structure.lua:64: in function 'ProcessChildren' ..\glLoadGen\modules/Structure.lua:47: in function 'Process' ..\glLoadGen\modules/Structure.lua:749: in function 'Proc' ..\glLoadGen\LoadGen.lua:63: in main chunk [C]: in ?

I propose the following change as it resolved my issue:

Change wgl_specloaderfunc.lua to:

local util = require "util" return assert(dofile(util.GetDataFilePath() .. "gl_specloaderfunc.lua"))

Change glx_specloaderfunc.lua to:

local util = require "util" return assert(dofile(util.GetDataFilePath() .. "gl_specloaderfunc.lua"))

Comments (1)

  1. David Ziman reporter

    This change also enables the output to occur in the current working directory. In this case, the output directory would be e:\Projects\ZGame\ZGame. Previously, I would have to execute inside the glLoadGen directory then move the files to the e:\Projects\ZGame\ZGame

  2. Log in to comment