Changeset 2236 for code/branches/buildsystem/src/tolua/lua
- Timestamp:
- Nov 20, 2008, 8:51:44 PM (16 years ago)
- Location:
- code/branches/buildsystem/src/tolua/lua
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem/src/tolua/lua/doit.lua
r2229 r2236 39 39 parse_extra() 40 40 41 -- get potential working directory 42 if not flags.w then 43 flags.w = '' 44 end 45 41 46 -- do this after setting the package name 42 if flags['L'] then 43 dofile(flags['L']) 47 if flags.L then 48 if string.sub(flags.L, 1, 1) == '/' or string.sub(flags.L, 1, 1) == '\\' then 49 dofile(flags.L) 50 else 51 dofile(flags.w..'/'..flags.L) 52 end 44 53 end 45 54 46 55 -- add cppstring 47 if not flags ['S']then56 if not flags.S then 48 57 _basic['string'] = 'cppstring' 49 58 _basic['std::string'] = 'cppstring' … … 52 61 53 62 -- proccess package 54 local p = Package(flags.n,flags.f) 63 local file 64 if flags.f then 65 if string.sub(flags.f, 1, 1) == '/' or string.sub(flags.f, 1, 1) == '\\' then 66 file = flags.f 67 else 68 file = flags.w..'/'..flags.f 69 end 70 else 71 file = flags.f 72 end 73 local p = Package(flags.n, file) 55 74 56 75 if flags.p then … … 59 78 60 79 if flags.o then 61 local st,msg = writeto(flags.o) 80 local file 81 if string.sub(flags.o, 1, 1) == '/' or string.sub(flags.o, 1, 1) == '\\' then 82 file = flags.o 83 else 84 file = flags.w..'/'..flags.o 85 end 86 local st,msg = writeto(file) 62 87 if not st then 63 88 error('#'..msg) … … 84 109 if not flags.P then 85 110 if flags.H then 86 local st,msg = writeto(flags.H) 111 local file 112 if string.sub(flags.H, 1, 1) == '/' or string.sub(flags.H, 1, 1) == '\\' then 113 file = flags.H 114 else 115 file = flags.w..'/'..flags.H 116 end 117 local st,msg = writeto(file) 87 118 if not st then 88 119 error('#'..msg) -
code/branches/buildsystem/src/tolua/lua/package.lua
r2234 r2236 124 124 output('#endif\n') 125 125 output('#include "string.h"\n\n') 126 output('#include "tolua/tolua++.h"\n\n') 127 128 if not flags.h then 129 -- local temp = string.reverse(flags.H) 130 -- local start1, end1 = string.find(temp, '/') 131 -- local start2, end2 = string.find(temp, '\\') 132 -- local res 133 -- if not start1 == nil then 134 -- if not start2 == nil then 135 -- if start1 > start2 then 136 -- res = string.sub(temp, 1, start2) 137 -- else 138 -- res = string.sub(temp, 1, start1) 139 -- end 140 -- else 141 -- res = string.sub(temp, 1, start1) 142 -- end 143 -- elseif not start2 == nil then 144 -- res = string.sub(temp, 1, start2) 145 -- end 146 -- res = string.reverse(res) 147 output('#include "tolua_bind.h"') 148 output('\n') 126 output('#include "tolua++.h"\n\n') 127 128 if flags.H then 129 local header = gsub(flags.H, '^.-([%w_]*%.[%w_]*)$', '%1') 130 output('#include "'..header..'"\n') 149 131 end 150 132 … … 220 202 output('*/\n\n') 221 203 222 if not flags.hthen204 if flags.H then 223 205 output('#include "'..self.name..'Prereqs.h"\n') 224 206 output('/* Exported function */') 225 output('_'..self.name..'Export int tolua_'..self.name..'_open (lua_State* tolua_S);') 207 output('_'..self.name..'Export') 208 output('int tolua_'..self.name..'_open (lua_State* tolua_S);') 226 209 output('\n') 227 210 end
Note: See TracChangeset
for help on using the changeset viewer.