You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(191) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(238) |
Dec
(68) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(104) |
Feb
(518) |
Mar
(302) |
Apr
(211) |
May
(311) |
Jun
(55) |
Jul
(6) |
Aug
(35) |
Sep
(76) |
Oct
(50) |
Nov
(37) |
Dec
(340) |
2007 |
Jan
(23) |
Feb
(107) |
Mar
(98) |
Apr
(60) |
May
(136) |
Jun
(371) |
Jul
(175) |
Aug
(74) |
Sep
(3) |
Oct
(2) |
Nov
(53) |
Dec
(129) |
2008 |
Jan
(337) |
Feb
(23) |
Mar
(18) |
Apr
(4) |
May
(3) |
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
(33) |
Nov
|
Dec
(26) |
2009 |
Jan
(4) |
Feb
(1) |
Mar
(15) |
Apr
|
May
(35) |
Jun
(11) |
Jul
|
Aug
|
Sep
(19) |
Oct
(26) |
Nov
(11) |
Dec
(11) |
2010 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
(8) |
Dec
(7) |
2011 |
Jan
|
Feb
|
Mar
(4) |
Apr
(8) |
May
(5) |
Jun
(8) |
Jul
(1) |
Aug
|
Sep
|
Oct
(5) |
Nov
(13) |
Dec
|
From: John L. <jr...@us...> - 2006-01-19 04:49:19
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12285/bindings Modified Files: genwxbind.lua Log Message: allow using the cached data type files for other bindings Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** genwxbind.lua 10 Jan 2006 04:58:06 -0000 1.16 --- genwxbind.lua 19 Jan 2006 04:49:11 -0000 1.17 *************** *** 3453,3457 **** table.insert(fileData, "// ---------------------------------------------------------\n") ! table.insert(fileData, "// "..hook_namespace..".h\n") table.insert(fileData, "// headers and tag for wxLua binding\n") table.insert(fileData, "// \n") --- 3453,3457 ---- table.insert(fileData, "// ---------------------------------------------------------\n") ! table.insert(fileData, "// "..hook_cpp_namespace..".h\n") table.insert(fileData, "// headers and tag for wxLua binding\n") table.insert(fileData, "// \n") *************** *** 3462,3467 **** table.insert(fileData, "// ---------------------------------------------------------\n") table.insert(fileData, "\n\n\n") ! table.insert(fileData, "#ifndef __HOOK_WXLUA_"..hook_namespace.."_H__\n") ! table.insert(fileData, "#define __HOOK_WXLUA_"..hook_namespace.."_H__\n\n") table.insert(fileData, "#include \"wxlua/include/internal.h\"\n\n") --- 3462,3467 ---- table.insert(fileData, "// ---------------------------------------------------------\n") table.insert(fileData, "\n\n\n") ! table.insert(fileData, "#ifndef __HOOK_WXLUA_"..hook_cpp_namespace.."_H__\n") ! table.insert(fileData, "#define __HOOK_WXLUA_"..hook_cpp_namespace.."_H__\n\n") table.insert(fileData, "#include \"wxlua/include/internal.h\"\n\n") *************** *** 3485,3495 **** table.insert(fileData, "\n\n") ! table.insert(fileData, "// binds "..hook_namespace.." to wxLua\n") ! table.insert(fileData, "bool bind_"..hook_namespace.."(lua_State* L);\n") table.insert(fileData, "\n\n") if hook_bind_condition then table.insert(fileData, "#else\n\n") ! table.insert(fileData, "#define bind_"..hook_namespace.."(L)\n\n") table.insert(fileData, "#endif // "..hook_bind_condition.."\n\n") end --- 3485,3495 ---- table.insert(fileData, "\n\n") ! table.insert(fileData, "// binds "..hook_cpp_namespace.." to wxLua\n") ! table.insert(fileData, "bool bind_"..hook_cpp_namespace.."(lua_State* L);\n") table.insert(fileData, "\n\n") if hook_bind_condition then table.insert(fileData, "#else\n\n") ! table.insert(fileData, "#define bind_"..hook_cpp_namespace.."(L)\n\n") table.insert(fileData, "#endif // "..hook_bind_condition.."\n\n") end *************** *** 3592,3596 **** table.insert(fileData, "\n\n") ! table.insert(fileData, "#endif // __HOOK_WXLUA_"..hook_namespace.."_H__\n\n") return fileData --- 3592,3596 ---- table.insert(fileData, "\n\n") ! table.insert(fileData, "#endif // __HOOK_WXLUA_"..hook_cpp_namespace.."_H__\n\n") return fileData *************** *** 3649,3653 **** table.insert(fileData, ""..hook_binding_class.."::"..hook_binding_class.."() : wxLuaBinding()\n") table.insert(fileData, "{\n") ! table.insert(fileData, " nameSpace = wxT(\""..hook_namespace.."\");\n") table.insert(fileData, " pfGetClassList = "..hook_class_fn..";\n") table.insert(fileData, " pfGetDefineList = "..hook_define_fn..";\n") --- 3649,3653 ---- table.insert(fileData, ""..hook_binding_class.."::"..hook_binding_class.."() : wxLuaBinding()\n") table.insert(fileData, "{\n") ! table.insert(fileData, " nameSpace = wxT(\""..hook_lua_namespace.."\");\n") table.insert(fileData, " pfGetClassList = "..hook_class_fn..";\n") table.insert(fileData, " pfGetDefineList = "..hook_define_fn..";\n") *************** *** 3671,3676 **** table.insert(fileData, "\n") ! table.insert(fileData, "// bind "..hook_namespace.." functions to lua interpreter\n") ! table.insert(fileData, "bool bind_"..hook_namespace.."(lua_State* L)\n") table.insert(fileData, "{\n") table.insert(fileData, " wxLuaState wxlState(L);\n") --- 3671,3676 ---- table.insert(fileData, "\n") ! table.insert(fileData, "// bind "..hook_cpp_namespace.." functions to lua interpreter\n") ! table.insert(fileData, "bool bind_"..hook_cpp_namespace.."(lua_State* L)\n") table.insert(fileData, "{\n") table.insert(fileData, " wxLuaState wxlState(L);\n") *************** *** 3678,3685 **** table.insert(fileData, "\n") table.insert(fileData, " wxASSERT(!wxlState.GetLuaStateRefData()->m_typesRegistered);\n") ! table.insert(fileData, " wxASSERT(!wxlState.GetLuaBinding(wxT(\""..hook_namespace.."\")));\n") table.insert(fileData, "\n") ! table.insert(fileData, " // ignore binding request when we already have "..hook_namespace.." registered\n") ! table.insert(fileData, " if (wxlState.GetLuaBinding(wxT(\""..hook_namespace.."\")))\n") table.insert(fileData, " return false;\n") table.insert(fileData, "\n") --- 3678,3685 ---- table.insert(fileData, "\n") table.insert(fileData, " wxASSERT(!wxlState.GetLuaStateRefData()->m_typesRegistered);\n") ! table.insert(fileData, " wxASSERT(!wxlState.GetLuaBinding(wxT(\""..hook_cpp_namespace.."\")));\n") table.insert(fileData, "\n") ! table.insert(fileData, " // ignore binding request when we already have "..hook_cpp_namespace.." registered\n") ! table.insert(fileData, " if (wxlState.GetLuaBinding(wxT(\""..hook_cpp_namespace.."\")))\n") table.insert(fileData, " return false;\n") table.insert(fileData, "\n") *************** *** 4339,4343 **** outfile:write("-- typeDefs\n") outfile:write("-- ---------------------------------------------------------\n") ! outfile:write("typeDefs =\n") Serialize(typeDefs) --- 4339,4343 ---- outfile:write("-- typeDefs\n") outfile:write("-- ---------------------------------------------------------\n") ! outfile:write(hook_cpp_namespace.."typeDefs =\n") Serialize(typeDefs) *************** *** 4346,4350 **** outfile:write("-- dataTypes\n") outfile:write("-- ---------------------------------------------------------\n") ! outfile:write("dataTypes =\n") Serialize(dataTypes) --- 4346,4350 ---- outfile:write("-- dataTypes\n") outfile:write("-- ---------------------------------------------------------\n") ! outfile:write(hook_cpp_namespace.."dataTypes =\n") Serialize(dataTypes) *************** *** 4353,4359 **** outfile:write("-- conditions\n") outfile:write("-- ---------------------------------------------------------\n") ! outfile:write("conditions =\n") Serialize(conditions) outfile:write() outfile:flush() --- 4353,4373 ---- outfile:write("-- conditions\n") outfile:write("-- ---------------------------------------------------------\n") ! outfile:write(hook_cpp_namespace.."conditions =\n") Serialize(conditions) + outfile:write("\n\n\n") + outfile:write("-- ---------------------------------------------------------\n") + outfile:write("-- Cache the dataTypes\n") + outfile:write("-- ---------------------------------------------------------\n") + outfile:write(" for k, v in "..hook_cpp_namespace.."typeDefs do\n") + outfile:write(" typeDefs[k] = v\n") + outfile:write(" end\n") + outfile:write(" for k, v in "..hook_cpp_namespace.."dataTypes do\n") + outfile:write(" dataTypes[k] = v\n") + outfile:write(" end\n") + outfile:write(" for k, v in "..hook_cpp_namespace.."conditions do\n") + outfile:write(" conditions[k] = v\n") + outfile:write(" end\n") + outfile:write() outfile:flush() *************** *** 4426,4435 **** end ! -- load ! local dataTypeCacheFilename = "DataTypes.Cache.lua" ! if FileExists(dataTypeCacheFilename) then ! local cache = loadfile(dataTypeCacheFilename) ! cache() ! print("loaded cache: "..dataTypeCacheFilename) end --- 4440,4454 ---- end ! -- load any cached settings from other wrappers ! if dataTypeCacheFilenames then ! for key, filename in dataTypeCacheFilenames do ! if FileExists(filename) then ! local cache = loadfile(filename) ! cache() -- run loaded file ! print("loaded cache: "..filename) ! else ! print("unable to load cache: "..filename) ! end ! end end |
From: John L. <jr...@us...> - 2006-01-19 03:49:49
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26461/wxlua/src Modified Files: wxlstate.cpp Log Message: remove #if WXWIN_COMPATIBILITY_24 and just use !wxCHECK_VERSION(2, 5, 0) since it's not defined for some people? Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxlstate.cpp 9 Jan 2006 15:26:12 -0000 1.19 --- wxlstate.cpp 19 Jan 2006 03:49:37 -0000 1.20 *************** *** 312,316 **** bool painting = false; ! #if WXWIN_COMPATIBILITY_24 || !wxCHECK_VERSION(2, 5, 0) wxNode* node; #else --- 312,316 ---- bool painting = false; ! #if !wxCHECK_VERSION(2, 5, 0) wxNode* node; #else |
From: John L. <jr...@us...> - 2006-01-10 04:58:16
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20923/wxLua/bindings Modified Files: genwxbind.lua Log Message: remove trailing ; use wxModule for "static" initialization of the bindings to avoid library linking problems Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** genwxbind.lua 30 Dec 2005 04:35:59 -0000 1.15 --- genwxbind.lua 10 Jan 2006 04:58:06 -0000 1.16 *************** *** 3087,3091 **** end ! table.insert(codeList, " "..memberTypeWithAttrib.."returns;\n"); end --- 3087,3091 ---- end ! table.insert(codeList, " "..memberTypeWithAttrib.."returns;\n") end *************** *** 3167,3171 **** table.insert(codeList, "\n return 1;\n") ! table.insert(codeList, "}\n\n"); else -- how we call c-function --- 3167,3171 ---- table.insert(codeList, "\n return 1;\n") ! table.insert(codeList, "}\n\n") else -- how we call c-function *************** *** 3207,3211 **** table.insert(codeList, " "..functor..";\n") table.insert(codeList, "\n return 0;\n") ! table.insert(codeList, "}\n\n"); else -- call function, get return value --- 3207,3211 ---- table.insert(codeList, " "..functor..";\n") table.insert(codeList, "\n return 0;\n") ! table.insert(codeList, "}\n\n") else -- call function, get return value *************** *** 3261,3265 **** table.insert(codeList, "\n return 1;\n") ! table.insert(codeList, "}\n\n"); end end --- 3261,3265 ---- table.insert(codeList, "\n return 1;\n") ! table.insert(codeList, "}\n\n") end end *************** *** 3670,3689 **** table.insert(fileData, "\n") table.insert(fileData, "\n") table.insert(fileData, "// bind "..hook_namespace.." functions to lua interpreter\n") table.insert(fileData, "bool bind_"..hook_namespace.."(lua_State* L)\n") table.insert(fileData, "{\n") ! table.insert(fileData, " wxLuaState wxlState(L);\n"); ! table.insert(fileData, " wxCHECK_MSG(wxlState.Ok(), false, wxT(\"Invalid wxLuaState\"));\n"); ! table.insert(fileData, "\n"); ! table.insert(fileData, " wxASSERT(!wxlState.GetLuaStateRefData()->m_typesRegistered);\n"); ! table.insert(fileData, " wxASSERT(!wxlState.GetLuaBinding(wxT(\""..hook_namespace.."\")));\n"); ! table.insert(fileData, "\n"); ! table.insert(fileData, " // ignore binding request when we already have "..hook_namespace.." registered\n"); ! table.insert(fileData, " if (wxlState.GetLuaBinding(wxT(\""..hook_namespace.."\")))\n"); ! table.insert(fileData, " return false;\n"); ! table.insert(fileData, "\n"); ! table.insert(fileData, " wxlState.GetLuaStateRefData()->m_bindings.Append(new "..hook_binding_class.."());\n"); ! table.insert(fileData, "\n"); ! table.insert(fileData, " return true;\n"); table.insert(fileData, "}\n") --- 3670,3690 ---- table.insert(fileData, "\n") table.insert(fileData, "\n") + table.insert(fileData, "// bind "..hook_namespace.." functions to lua interpreter\n") table.insert(fileData, "bool bind_"..hook_namespace.."(lua_State* L)\n") table.insert(fileData, "{\n") ! table.insert(fileData, " wxLuaState wxlState(L);\n") ! table.insert(fileData, " wxCHECK_MSG(wxlState.Ok(), false, wxT(\"Invalid wxLuaState\"));\n") ! table.insert(fileData, "\n") ! table.insert(fileData, " wxASSERT(!wxlState.GetLuaStateRefData()->m_typesRegistered);\n") ! table.insert(fileData, " wxASSERT(!wxlState.GetLuaBinding(wxT(\""..hook_namespace.."\")));\n") ! table.insert(fileData, "\n") ! table.insert(fileData, " // ignore binding request when we already have "..hook_namespace.." registered\n") ! table.insert(fileData, " if (wxlState.GetLuaBinding(wxT(\""..hook_namespace.."\")))\n") ! table.insert(fileData, " return false;\n") ! table.insert(fileData, "\n") ! table.insert(fileData, " wxlState.GetLuaStateRefData()->m_bindings.Append(new "..hook_binding_class.."());\n") ! table.insert(fileData, "\n") ! table.insert(fileData, " return true;\n") table.insert(fileData, "}\n") *************** *** 3749,3763 **** -- create a instance of the hook binding class to initialize it table.insert(fileData, "\n\n") ! ! table.insert(fileData, "class "..hook_binding_class.."Init\n") table.insert(fileData, "{\n") table.insert(fileData, "public:\n") ! table.insert(fileData, " "..hook_binding_class.."Init()\n") table.insert(fileData, " {\n") ! table.insert(fileData, " m_binding.GetBindingList()->Append(&m_binding);\n") table.insert(fileData, " }\n") table.insert(fileData, " "..hook_binding_class.." m_binding;\n") table.insert(fileData, "};\n\n") ! table.insert(fileData, hook_binding_class.."Init s_"..hook_binding_class.."Init;\n\n") return fileData --- 3750,3767 ---- -- create a instance of the hook binding class to initialize it table.insert(fileData, "\n\n") ! table.insert(fileData, "class "..hook_binding_class.."Init : public wxModule\n") table.insert(fileData, "{\n") table.insert(fileData, "public:\n") ! table.insert(fileData, " "..hook_binding_class.."Init() {}\n") ! table.insert(fileData, " bool OnInit()\n") table.insert(fileData, " {\n") ! table.insert(fileData, " wxLuaBinding::GetBindingList()->Append(&m_binding);\n") ! table.insert(fileData, " return true;\n") table.insert(fileData, " }\n") + table.insert(fileData, " void OnExit() {}\n") table.insert(fileData, " "..hook_binding_class.." m_binding;\n") + table.insert(fileData, " DECLARE_DYNAMIC_CLASS("..hook_binding_class.."Init);\n") table.insert(fileData, "};\n\n") ! table.insert(fileData, "IMPLEMENT_DYNAMIC_CLASS("..hook_binding_class.."Init, wxModule);\n") return fileData *************** *** 4405,4409 **** io.write(tostring(o)) else ! error("cannot serialize a "..type(o)); end end --- 4409,4413 ---- io.write(tostring(o)) else ! error("cannot serialize a "..type(o)) end end |
From: John L. <jr...@us...> - 2006-01-09 15:26:22
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21295/wxLua/modules/wxlua/src Modified Files: wxlstate.cpp Log Message: check for lua_isnone in wxLuaState::tinsert (Chris Marrin) Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxlstate.cpp 30 Dec 2005 04:35:59 -0000 1.18 --- wxlstate.cpp 9 Jan 2006 15:26:12 -0000 1.19 *************** *** 1374,1377 **** --- 1374,1382 ---- lua_State* L = M_WXLSTATEDATA->m_lua_State; + if (lua_isnone(L, iParam)) + { + return LUA_REFNIL; + } + if (lua_isnil(L, iParam)) { |
From: John L. <jr...@us...> - 2005-12-30 04:36:08
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11092/wxLua/bindings/wxwidgets Modified Files: override.hpp Log Message: use wxLuaState in addToTrackedMemory, now called wxLua_addToTrackedMemory better docs in wxlstate header rem out wxPrintf debug code fix error recreating wxLuaState, need to Destroy before calling UnRef Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** override.hpp 30 Nov 2005 04:46:16 -0000 1.6 --- override.hpp 30 Dec 2005 04:35:59 -0000 1.7 *************** *** 947,951 **** returns = new wxLuaObject(wxlState, 1); // add to tracked memory list ! addToTrackedMemoryList(L, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxLuaObject, returns); --- 947,951 ---- returns = new wxLuaObject(wxlState, 1); // add to tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxLuaObject, returns); *************** *** 1155,1159 **** returns = new wxGenericValidator(boolPtr->GetBoolPtr()); // add to tracked memory list ! addToTrackedMemoryList(L, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxGenericValidator, returns); --- 1155,1159 ---- returns = new wxGenericValidator(boolPtr->GetBoolPtr()); // add to tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxGenericValidator, returns); *************** *** 1174,1178 **** returns = new wxGenericValidator(valPtr->GetStringPtr()); // add to tracked memory list ! addToTrackedMemoryList(L, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxGenericValidator, returns); --- 1174,1178 ---- returns = new wxGenericValidator(valPtr->GetStringPtr()); // add to tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxGenericValidator, returns); *************** *** 1193,1197 **** returns = new wxGenericValidator(valPtr->GetIntPtr()); // add to tracked memory list ! addToTrackedMemoryList(L, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxGenericValidator, returns); --- 1193,1197 ---- returns = new wxGenericValidator(valPtr->GetIntPtr()); // add to tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxGenericValidator, returns); *************** *** 1212,1216 **** returns = new wxGenericValidator(valPtr->GetArrayPtr()); // add to tracked memory list ! addToTrackedMemoryList(L, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxGenericValidator, returns); --- 1212,1216 ---- returns = new wxGenericValidator(valPtr->GetArrayPtr()); // add to tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxGenericValidator, returns); *************** *** 1436,1440 **** returns = new wxBitmap(data, type, width, height, depth); // add to tracked memory list ! addToTrackedMemoryList(L, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxBitmap, returns); --- 1436,1440 ---- returns = new wxBitmap(data, type, width, height, depth); // add to tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxBitmap, returns); *************** *** 1464,1468 **** returns = new wxImage(width, height, data, static_data); // add to tracked memory list ! addToTrackedMemoryList(L, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxImage, returns); --- 1464,1468 ---- returns = new wxImage(width, height, data, static_data); // add to tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxImage, returns); *************** *** 1484,1488 **** returns = new wxImage(bitmap->ConvertToImage()); // add to tracked memory list ! addToTrackedMemoryList(L, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxImage, returns); --- 1484,1488 ---- returns = new wxImage(bitmap->ConvertToImage()); // add to tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxImage, returns); *************** *** 1772,1776 **** returns = new wxTreeItemId(self->GetFirstChild(*item, cookie)); // add the new object to the tracked memory list ! addToTrackedMemoryList(L, returns); // push the result datatype wxlState.pushuserdatatype(s_wxluatag_wxTreeItemId, returns); --- 1772,1776 ---- returns = new wxTreeItemId(self->GetFirstChild(*item, cookie)); // add the new object to the tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, returns); // push the result datatype wxlState.pushuserdatatype(s_wxluatag_wxTreeItemId, returns); *************** *** 1807,1811 **** returns = new wxTreeItemId(self->GetNextChild(*item, cookie)); // add the new object to the tracked memory list ! addToTrackedMemoryList(L, returns); // push the result datatype wxlState.pushuserdatatype(s_wxluatag_wxTreeItemId, returns); --- 1807,1811 ---- returns = new wxTreeItemId(self->GetNextChild(*item, cookie)); // add the new object to the tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, returns); // push the result datatype wxlState.pushuserdatatype(s_wxluatag_wxTreeItemId, returns); *************** *** 1837,1841 **** returns = new wxTreeItemId(self->HitTest(*point, flags)); // add the new object to the tracked memory list ! addToTrackedMemoryList(L, returns); // push the result datatype --- 1837,1841 ---- returns = new wxTreeItemId(self->HitTest(*point, flags)); // add the new object to the tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, returns); // push the result datatype *************** *** 2276,2280 **** if (returns != NULL) { ! addToTrackedMemoryList(L, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxAcceleratorTable, returns); --- 2276,2280 ---- if (returns != NULL) { ! wxLua_addToTrackedMemoryList(wxlState, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxAcceleratorTable, returns); *************** *** 2855,2859 **** *returns = *self; // add to tracked memory list ! addToTrackedMemoryList(L, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxPrintData, returns); --- 2855,2859 ---- *returns = *self; // add to tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxPrintData, returns); *************** *** 2873,2877 **** *returns = *self; // add to tracked memory list ! addToTrackedMemoryList(L, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxPageSetupDialogData, returns); --- 2873,2877 ---- *returns = *self; // add to tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxPageSetupDialogData, returns); *************** *** 3203,3207 **** self->GetPaneProperties(*returns, alignment); // ! addToTrackedMemoryList(L, returns); wxlState.pushuserdatatype(s_cbLuaCommonPaneProperties, returns); // return the number of parameters --- 3203,3207 ---- self->GetPaneProperties(*returns, alignment); // ! wxLua_addToTrackedMemoryList(wxlState, returns); wxlState.pushuserdatatype(s_cbLuaCommonPaneProperties, returns); // return the number of parameters *************** *** 3393,3397 **** self->GetPreferredDim(*givenDim, *prefDim); // return the number of parameters ! addToTrackedMemoryList(L, prefDim); wxlState.pushuserdatatype(s_wxluatag_wxSize, prefDim); return 1; --- 3393,3397 ---- self->GetPreferredDim(*givenDim, *prefDim); // return the number of parameters ! wxLua_addToTrackedMemoryList(wxlState, prefDim); wxlState.pushuserdatatype(s_wxluatag_wxSize, prefDim); return 1; *************** *** 3618,3622 **** returns = new wxBitmap(sizeArray); // add to tracked memory list ! addToTrackedMemoryList(L, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxBitmap, returns); --- 3618,3622 ---- returns = new wxBitmap(sizeArray); // add to tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, returns); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxBitmap, returns); *************** *** 3869,3881 **** returns = self->GetTimes(dtAccess, dtMod, dtCreate); // add to tracked memory list ! addToTrackedMemoryList(L, dtAccess); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxDateTime, dtAccess); // add to tracked memory list ! addToTrackedMemoryList(L, dtMod); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxDateTime, dtMod); // add to tracked memory list ! addToTrackedMemoryList(L, dtCreate); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxDateTime, dtCreate); --- 3869,3881 ---- returns = self->GetTimes(dtAccess, dtMod, dtCreate); // add to tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, dtAccess); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxDateTime, dtAccess); // add to tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, dtMod); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxDateTime, dtMod); // add to tracked memory list ! wxLua_addToTrackedMemoryList(wxlState, dtCreate); // push the constructed class pointer wxlState.pushuserdatatype(s_wxluatag_wxDateTime, dtCreate); |
From: John L. <jr...@us...> - 2005-12-30 04:36:08
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11092/wxLua/bindings Modified Files: genwxbind.lua Log Message: use wxLuaState in addToTrackedMemory, now called wxLua_addToTrackedMemory better docs in wxlstate header rem out wxPrintf debug code fix error recreating wxLuaState, need to Destroy before calling UnRef Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** genwxbind.lua 29 Dec 2005 20:03:47 -0000 1.14 --- genwxbind.lua 30 Dec 2005 04:35:59 -0000 1.15 *************** *** 3154,3158 **** end ! table.insert(codeList, " addToTrackedMemoryList(L, ("..returnCast..")returns);\n") elseif parseObject.HasClassInfo then if (comment) then table.insert(codeList, " // add to tracked window list\n") end --- 3154,3158 ---- end ! table.insert(codeList, " wxLua_addToTrackedMemoryList(wxlState, ("..returnCast..")returns);\n") elseif parseObject.HasClassInfo then if (comment) then table.insert(codeList, " // add to tracked window list\n") end *************** *** 3225,3229 **** end ! table.insert(codeList, " addToTrackedMemoryList(L, ("..returnCast..")returns);\n") elseif memberPtr == "&" and memberType ~= "wxString" then table.insert(codeList, " returns = &"..functor..";\n") --- 3225,3229 ---- end ! table.insert(codeList, " wxLua_addToTrackedMemoryList(wxlState, ("..returnCast..")returns);\n") elseif memberPtr == "&" and memberType ~= "wxString" then table.insert(codeList, " returns = &"..functor..";\n") |
From: John L. <jr...@us...> - 2005-12-30 04:36:08
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11092/wxLua/modules/wxlua/include Modified Files: internal.h wxlintrp.h wxlstate.h Log Message: use wxLuaState in addToTrackedMemory, now called wxLua_addToTrackedMemory better docs in wxlstate header rem out wxPrintf debug code fix error recreating wxLuaState, need to Destroy before calling UnRef Index: wxlintrp.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlintrp.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wxlintrp.h 22 Dec 2005 18:42:35 -0000 1.5 --- wxlintrp.h 30 Dec 2005 04:35:59 -0000 1.6 *************** *** 34,52 **** //----------------------------------------------------------------------------- // wxLuaInterpreter - // - // notes : create instance, call RunString("some lua code") - // Events are sent to the evthander if !null with the given id # //----------------------------------------------------------------------------- ! typedef class wxLuaState wxLuaInterpreter; ! ! ! /* ! ! ! // ----------------------------------------------------------------------- ! // implementation ! ! */ //----------------------------------------------------------------------------- --- 34,40 ---- //----------------------------------------------------------------------------- // wxLuaInterpreter //----------------------------------------------------------------------------- ! typedef class wxLuaState wxLuaInterpreter; // depricated - use wxLuaState instead //----------------------------------------------------------------------------- Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** wxlstate.h 22 Dec 2005 19:52:50 -0000 1.13 --- wxlstate.h 30 Dec 2005 04:35:59 -0000 1.14 *************** *** 120,124 **** // destroy and cleanup the lua_State, returns success ! // if 'force' then make sure all wxWindows are destroyed. bool CloseLuaState(bool force); // Free up the tracked resources list. --- 120,124 ---- // destroy and cleanup the lua_State, returns success ! // if 'force' = true then make sure all wxWindows are destroyed. bool CloseLuaState(bool force); // Free up the tracked resources list. *************** *** 129,136 **** void UnRegisterBindings(); ! lua_State *m_lua_State; ! bool m_lua_State_static; ! wxLuaBindingList m_bindings; // A list of generated lua bindings bool m_typesRegistered; // Is the binding registered --- 129,138 ---- void UnRegisterBindings(); ! // ------------------------------------------------------------------------ ! lua_State *m_lua_State; // the lua_State that "is" lua ! bool m_lua_State_static; // lua_close the lua_State if !static ! ! wxLuaBindingList m_bindings; // A wxList of generated lua bindings bool m_typesRegistered; // Is the binding registered *************** *** 162,169 **** int m_lua_debug_hook; ! wxEvtHandler *m_evtHandler; // event handler to send events to wxWindowID m_id; // event id to send the events with static wxLuaStateRefData* GetLuaStateRefData(lua_State* L); static wxHashMapLuaStateRefData s_wxHashMapLuaStateRefData; --- 164,174 ---- int m_lua_debug_hook; ! wxEvtHandler *m_evtHandler; // event handler to send wxLuaEvents to wxWindowID m_id; // event id to send the events with + // Get the wxLuaStateRefData from the corresponding lua_State + // returns NULL if none found static wxLuaStateRefData* GetLuaStateRefData(lua_State* L); + // A mapping between hashmap[lua_State* L] = *wxLuaStateRefData static wxHashMapLuaStateRefData s_wxHashMapLuaStateRefData; *************** *** 190,198 **** --- 195,211 ---- { public: + // Default constructor or if create=true then create a new lua_State + // and add all the bindings wxLuaState(bool create = false) : wxObject() { if (create) Create(); } + // Create a new lua_State, add the bindings, and set the event handler + // and wxWindowID to send the wxLuaEvents to wxLuaState(wxEvtHandler *handler, wxWindowID id = wxID_ANY) : wxObject() { Create(handler, id); } + // Create a wxLuaState from an existing lua_State wxLuaState(lua_State* L, wxLuaState_Type type = WXLUASTATE_ATTACH) { Create(L, type); } + // Copy constructor, refs existing wxLuaState wxLuaState(const wxLuaState& wxlState) { Create(wxlState); } + // ALWAYS destroy lua_State before calling UnRef, else circular + // destruction since ref count goes to 0 before actually destroying the lua_State virtual ~wxLuaState() { Destroy(); } *************** *** 215,219 **** void Destroy(); // Close the lua_State and if 'force' close all attached wxWindows ! // if not force then popup dialog to ask if windows should be destroyed. bool CloseLuaState(bool force); --- 228,232 ---- void Destroy(); // Close the lua_State and if 'force' close all attached wxWindows ! // if !force then popup a dialog to ask if windows should be destroyed. bool CloseLuaState(bool force); *************** *** 223,245 **** wxLuaStateRefData* GetLuaStateRefData() const { return (wxLuaStateRefData*)GetRefData(); } ! // Get the wxEventType currently wxEventType GetInEventType() const; // ----------------------------------------------------------------------- ! // Set the event handler that the events will be sent to, can be null void SetEventHandler(wxEvtHandler *evtHandler); wxEvtHandler *GetEventHandler() const; ! ! // Get/Set the id that the events will be sent with void SetId(wxWindowID id); ! wxWindowID GetId() const; ! ! // generic function to generate a wxEVT_LUA_ERROR with the string message ! void DisplayError( const wxString &errorMsg ); ! ! // checks return val of 'lua_load' and `lua_pcall', if error send wxEVT_LUA_ERROR ! bool CheckRunError(int rc); void SendEvent( wxLuaEvent &event ) const; --- 236,259 ---- wxLuaStateRefData* GetLuaStateRefData() const { return (wxLuaStateRefData*)GetRefData(); } ! // Get the wxEventType that lua may currently be in, wxEVT_NULL if not in an ! // event handler. Be careful about destroying lua when in an event handler. wxEventType GetInEventType() const; // ----------------------------------------------------------------------- ! // Set the event handler that the events from this will be sent to, can be null void SetEventHandler(wxEvtHandler *evtHandler); wxEvtHandler *GetEventHandler() const; ! // Get/Set the wxWindowID that the events will be sent with void SetId(wxWindowID id); ! wxWindowID GetId() const; + // generic function to generate and send a wxEVT_LUA_ERROR with the string message + void SendErrorEvent( const wxString &errorMsg ); + // checks return val of 'lua_load' and `lua_pcall', using CheckRunError and + // if error send wxEVT_LUA_ERROR returns false if there was an error + bool CheckAndSendRunErrorEvent(int rc); + // Sends an event, after checking that this is valid, to the set + // wxEventHandler (see SetEventHandler) which may be NULL. void SendEvent( wxLuaEvent &event ) const; *************** *** 248,268 **** // Run a lua file int RunFile(const wxString &fileName); ! // Run a string that contains lua code int RunString(const wxString &script, const wxString& name = wxEmptyString); ! // Run a char array #include(d) from bin2c compilation int RunBuffer(const unsigned char buf[], size_t size, const wxString &name = wxT("= lua")); ! // Is a program running now bool IsRunning() const; ! // Break a currently running lua program ! void DebugHookBreak(const wxString &message = wxT("Interpreter stopped")); ! wxDEPRECATED( void Break(const wxString &message = wxT("Interpreter stopped")) { DebugHookBreak(message); } ); ! // has Break() been called bool GetDebugHookBreak() const; wxString GetDebugHookBreakMessage() const; - unsigned long GetLastLuaDebugHookTime() const; - void SetLastLuaDebugHookTime(unsigned long t); - // ----------------------------------------------------------------------- --- 262,282 ---- // Run a lua file int RunFile(const wxString &fileName); ! // Run a string that contains lua code using lua_dostring int RunString(const wxString &script, const wxString& name = wxEmptyString); ! // Run a char array #included from bin2c compilation int RunBuffer(const unsigned char buf[], size_t size, const wxString &name = wxT("= lua")); ! // Is a program running now, running state is set for Run/File/String/Buffer bool IsRunning() const; ! ! // Break a currently running lua program by setting the lua debug hook to ! // be called for anything and breaking as soon as possible ! void DebugHookBreak(const wxString &message = wxT("Lua interpreter stopped")); ! wxDEPRECATED( void Break(const wxString &message = wxT("Lua interpreter stopped")) { DebugHookBreak(message); } ); ! // has DebugHookBreak() been called and we're waiting for the hook call bool GetDebugHookBreak() const; + // Get the message that will be sent when from a DebugHookBreak call wxString GetDebugHookBreakMessage() const; // ----------------------------------------------------------------------- *************** *** 282,289 **** int GetLuaDebugHook() const; // ----------------------------------------------------------------------- // Binding functions ! // registers a new function for Lua void RegisterFunction(lua_CFunction func, const wxString &funcName); --- 296,309 ---- int GetLuaDebugHook() const; + // Internally updated time that the debug hook was last called when running + // lua code and SetLuaDebugHook is turned on + unsigned long GetLastLuaDebugHookTime() const; + // Set to an arbitrary time to control debug timing + void SetLastLuaDebugHookTime(unsigned long t); + // ----------------------------------------------------------------------- // Binding functions ! // registers a new function for Lua, see usage in wxlstate.cpp void RegisterFunction(lua_CFunction func, const wxString &funcName); *************** *** 293,305 **** wxLuaBinding* GetLuaBinding(const wxString& nameSpace) const; ! const WXLUACLASS * GetLuaClass(int iClassTag); ! const WXLUACLASS * GetLuaClass(const char* className); ! const WXLUACLASS * GetBaseLuaClass(int iClassTag); bool IsDerivedClass(int iClassTag, int iBaseClassTag); ! const WXLUAEVENT * GetLuaEvent(wxEvent *pEvent); void GarbageCollectWindows(bool closeWindows); // Get the binding list used to initialize this class wxLuaBindingList* GetLuaBindingList() const; bool GetTypesRegistered() const; // Is the binding registered --- 313,326 ---- wxLuaBinding* GetLuaBinding(const wxString& nameSpace) const; ! const WXLUACLASS* GetLuaClass(int iClassTag); ! const WXLUACLASS* GetLuaClass(const char* className); ! const WXLUACLASS* GetBaseLuaClass(int iClassTag); bool IsDerivedClass(int iClassTag, int iBaseClassTag); ! const WXLUAEVENT* GetLuaEvent(wxEvent *pEvent); void GarbageCollectWindows(bool closeWindows); // Get the binding list used to initialize this class + // you may add or remove bindings before creation wxLuaBindingList* GetLuaBindingList() const; bool GetTypesRegistered() const; // Is the binding registered *************** *** 312,315 **** --- 333,337 ---- void addToTrackedMemoryList(wxObject *pObject); + void addToTrackedMemoryList(int obj_ptr, wxObject *pObject); bool removeTrackedMemory(void *pObject, bool fDelete = true); *************** *** 628,632 **** { if ( (*this) != wxlState ) ! Ref(wxlState); return *this; } --- 650,654 ---- { if ( (*this) != wxlState ) ! Create(wxlState); return *this; } Index: internal.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/internal.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** internal.h 18 Dec 2005 18:04:38 -0000 1.16 --- internal.h 30 Dec 2005 04:35:59 -0000 1.17 *************** *** 85,94 **** #define wxLUA_DECLARE_ENCAPSULATION(theObject) \ class theObject; \ ! void LUACALL addToTrackedMemoryList(lua_State *, theObject *); \ ! class theObject##Object : public wxObject \ { \ public: \ ! theObject##Object(theObject *p_##theObject); \ ! ~theObject##Object(); \ private: \ theObject *m_p##theObject; \ --- 85,94 ---- #define wxLUA_DECLARE_ENCAPSULATION(theObject) \ class theObject; \ ! void LUACALL wxLua_addToTrackedMemoryList(wxLuaState& wxlState, theObject *); \ ! class theObject##wxLuaObject : public wxObject \ { \ public: \ ! theObject##wxLuaObject(theObject *p_##theObject); \ ! ~theObject##wxLuaObject(); \ private: \ theObject *m_p##theObject; \ *************** *** 96,120 **** #define wxLUA_IMPLEMENT_ENCAPSULATION(theObject) \ ! theObject##Object::theObject##Object(theObject *p##theObject) : \ m_p##theObject(p##theObject) \ { \ } \ ! theObject##Object::~theObject##Object() \ { \ if (m_p##theObject != NULL) \ delete m_p##theObject; \ } \ ! void LUACALL addToTrackedMemoryList(lua_State *L, theObject *p##theObject) \ { \ ! wxLuaState wxlState(L); \ ! wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); \ ! wxlState.GetLuaStateRefData()->m_pTrackedList->Put((int)p##theObject, new theObject##Object(p##theObject)); \ } // Add a wxWidgets object to the list of tracked objects for // garbage collection purposes. ! void LUACALL addToTrackedMemoryList(lua_State *L, wxObject *); ! wxDEPRECATED( bool LUACALL removeTrackedMemory(lua_State *L, void *pObject, bool fDelete = true) ); ! wxDEPRECATED( void LUACALL addToTrackedWindowList(lua_State *L, wxWindow *) ); // ---------------------------------------------------------------------------- --- 96,116 ---- #define wxLUA_IMPLEMENT_ENCAPSULATION(theObject) \ ! theObject##wxLuaObject::theObject##wxLuaObject(theObject *p##theObject) : \ m_p##theObject(p##theObject) \ { \ } \ ! theObject##wxLuaObject::~theObject##wxLuaObject() \ { \ if (m_p##theObject != NULL) \ delete m_p##theObject; \ } \ ! void LUACALL wxLua_addToTrackedMemoryList(wxLuaState& wxlState, theObject *p##theObject) \ { \ ! wxlState.addToTrackedMemoryList((int)p##theObject, new theObject##wxLuaObject(p##theObject)); \ } // Add a wxWidgets object to the list of tracked objects for // garbage collection purposes. ! void LUACALL wxLua_addToTrackedMemoryList(wxLuaState& wxlState, wxObject *); // ---------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2005-12-30 04:36:08
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11092/wxLua/docs Modified Files: readme.txt Log Message: use wxLuaState in addToTrackedMemory, now called wxLua_addToTrackedMemory better docs in wxlstate header rem out wxPrintf debug code fix error recreating wxLuaState, need to Destroy before calling UnRef Index: readme.txt =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/readme.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** readme.txt 22 Dec 2005 18:42:34 -0000 1.1 --- readme.txt 30 Dec 2005 04:35:59 -0000 1.2 *************** *** 20,29 **** and tables. Perhaps the most powerful feature of the lua language is that the tables can be used as either arrays or as hashtables that can contain numbers, ! strings, and or subtables. wxLua adds to this small and elegant language the power of the wxWidgets cross-platform GUI library. This incudes the ability to create complex user interface dialogs, image manipulation, file manipulation, sockets, displaying ! HTML, and printing. ------------------------------------------------------------------------------- --- 20,29 ---- and tables. Perhaps the most powerful feature of the lua language is that the tables can be used as either arrays or as hashtables that can contain numbers, ! strings, and/or subtables. wxLua adds to this small and elegant language the power of the wxWidgets cross-platform GUI library. This incudes the ability to create complex user interface dialogs, image manipulation, file manipulation, sockets, displaying ! HTML, and printing to name a few. ------------------------------------------------------------------------------- *************** *** 32,39 **** The core of wxLua is based upon a ref counted class called wxLuaState derived from the wxWidget's wxObject class. The wxLuaState class contains as a member ! the 'C' lua_State which is the heart of lua. Since the class is ref counted, ! it should be passed as const wxLuaState& and can be used in much the same way ! as a wxBitmap, wxPen, or any of the other wxObject derived classes that make ! use of it's ref counting. The wxLuaState contains all of the lua 'C' functions, such as --- 32,42 ---- The core of wxLua is based upon a ref counted class called wxLuaState derived from the wxWidget's wxObject class. The wxLuaState class contains as a member ! of it's ref data the 'C' lua_State which is the heart of lua. Since the class ! is ref counted, it should be passed as const wxLuaState& and can be used in ! much the same way as a wxBitmap, wxPen, or any of the other wxObject derived ! classes that make use of it's ref counting. What this means for wxLua is that ! instead of keeping pointers to the lua_State you have instances of the ! wxLuaState. When the lua_State is closed, all the wxLuaStates sharing the ref ! data will now know about it and segfaults from dangling pointers are avoided. The wxLuaState contains all of the lua 'C' functions, such as *************** *** 44,46 **** --- 47,62 ---- it's ref data and the lua_State is created. + It is instructive to follow the creation of the wxLuaState by looking at + bool wxLuaState::Create(wxEvtHandler *handler, wxWindowID id) in + wxLua/modules/wxlua/src/wxlstate.cpp. The lua_State is created using lua_open() + and then the lua libraries are loaded, base, table, string, math, and so on. + Pushed into the lua_State is a light user data of of the wxLuaStateRefData with + the name "__wxLuaStateRefData". This is to allow us to then find the + wxLuaStateRefData "owner" of the lua_State when lua calls a 'C' function, see + wxLuaStateRefData::GetLuaStateRefData. We register print, alert, and traceback + functions to get the output of lua print() statements and send error messages + as wxLuaEvents, see wxEVT_LUA_ERROR. + + After the initial setup, the bindings are registered. + TODO |
From: John L. <jr...@us...> - 2005-12-30 04:36:08
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11092/wxLua/modules/wxlua/src Modified Files: internal.cpp wxlbind.cpp wxlstate.cpp Log Message: use wxLuaState in addToTrackedMemory, now called wxLua_addToTrackedMemory better docs in wxlstate header rem out wxPrintf debug code fix error recreating wxLuaState, need to Destroy before calling UnRef Index: internal.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/internal.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** internal.cpp 29 Dec 2005 20:06:47 -0000 1.23 --- internal.cpp 30 Dec 2005 04:35:59 -0000 1.24 *************** *** 630,657 **** } ! // The following functions support memory allocated for objects in ! // the Lua system. ! ! bool LUACALL removeTrackedMemory(lua_State *L, void *pObject, bool fDelete) ! { ! wxLuaState wxlState(L); ! wxCHECK_MSG(wxlState.Ok(), false, wxT("Invalid wxLuaState")); ! return wxlState.removeTrackedMemory(pObject, fDelete); ! } ! ! void LUACALL addToTrackedMemoryList(lua_State *L, wxObject *pObject) { - wxLuaState wxlState(L); - wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); wxlState.addToTrackedMemoryList(pObject); } - void LUACALL addToTrackedWindowList(lua_State *L, wxWindow *pWindow) - { - wxLuaState wxlState(L); - wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); - wxlState.addToTrackedWindowList(pWindow); - } - // Return a pointer to the object that corresponds to the specified stack // index and tag --- 630,638 ---- } ! void LUACALL wxLua_addToTrackedMemoryList(wxLuaState& wxlState, wxObject *pObject) { wxlState.addToTrackedMemoryList(pObject); } // Return a pointer to the object that corresponds to the specified stack // index and tag *************** *** 1269,1273 **** wxLuaState wxlState(L); if (wxlState.Ok()) ! wxlState.DisplayError(errorMsg); lua_settop(L, top); status = 0; --- 1250,1254 ---- wxLuaState wxlState(L); if (wxlState.Ok()) ! wxlState.SendErrorEvent(errorMsg); lua_settop(L, top); status = 0; Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wxlstate.cpp 29 Dec 2005 20:10:19 -0000 1.17 --- wxlstate.cpp 30 Dec 2005 04:35:59 -0000 1.18 *************** *** 42,46 **** #include "wxlua/include/wxlstate.h" #include "wxlua/include/wxlcallb.h" - //#include "wxbind/include/wxbind.h" #include "wxlua/include/wxlintrp.h" #include "wxlua/include/internal.h" --- 42,45 ---- *************** *** 116,120 **** // ---------------------------------------------------------------------------- - int LuaPrint( lua_State *L ) { --- 115,118 ---- *************** *** 283,287 **** wxlState.GetLuaDebugHook()); ! terror(L, wx2lua(wxlState.GetDebugHookBreakMessage())); return; } --- 281,285 ---- wxlState.GetLuaDebugHook()); ! wxlState.terror(wx2lua(wxlState.GetDebugHookBreakMessage())); return; } *************** *** 297,301 **** wxlState.SendEvent( event ); if (event.m_stop_interpreter) ! terror(L, "Interpreter stopped"); } --- 295,299 ---- wxlState.SendEvent( event ); if (event.m_stop_interpreter) ! wxlState.terror("Interpreter stopped"); } *************** *** 535,539 **** m_windowList.DeleteContents(false); ! m_bindings.DeleteContents(true); // we add new copies of the bindings wxLuaBindingList::Node *node; --- 533,537 ---- m_windowList.DeleteContents(false); ! m_bindings.DeleteContents(true); // we add "new" copies of the bindings wxLuaBindingList::Node *node; *************** *** 541,545 **** { wxLuaBinding* binding = node->GetData(); ! m_bindings.Append(binding->Clone()); } } --- 539,543 ---- { wxLuaBinding* binding = node->GetData(); ! m_bindings.Append(binding->Clone()); // append the "new" binding } } *************** *** 560,563 **** --- 558,563 ---- wxLuaStateRefData::~wxLuaStateRefData() { + wxCHECK_RET(m_lua_State == NULL, wxT("You must ALWAYS call wxLuaState::Destroy and not wxObject::UnRef")); + // no events here, the handler may already be gone m_evtHandler = NULL; *************** *** 626,630 **** ClearCallbacks(); ! if (closeLua) { UnRegisterBindings(); --- 626,630 ---- ClearCallbacks(); ! if (closeLua && (m_lua_State != NULL)) { UnRegisterBindings(); *************** *** 724,727 **** --- 724,728 ---- void wxLuaState::Create( const wxLuaState& wxlState ) { + Destroy(); Ref(wxlState); } *************** *** 777,781 **** { wxCHECK_MSG(L != NULL, false, wxT("Invalid lua_State")); ! if (GetRefData() != NULL) Destroy(); if (type == WXLUASTATE_ATTACH) --- 778,782 ---- { wxCHECK_MSG(L != NULL, false, wxT("Invalid lua_State")); ! Destroy(); if (type == WXLUASTATE_ATTACH) *************** *** 823,827 **** void wxLuaState::Destroy() { ! if (!GetRefData()) return; // we don't want recursion in UnRef and wxLua_lua_garbageCollect --- 824,828 ---- void wxLuaState::Destroy() { ! if (m_refData == NULL) return; // we don't want recursion in UnRef and wxLua_lua_garbageCollect *************** *** 872,876 **** } ! void wxLuaState::DisplayError( const wxString &errorMsg ) { wxLuaEvent event(wxEVT_LUA_ERROR, GetId(), *this); --- 873,877 ---- } ! void wxLuaState::SendErrorEvent( const wxString &errorMsg ) { wxLuaEvent event(wxEVT_LUA_ERROR, GetId(), *this); *************** *** 879,883 **** } ! bool wxLuaState::CheckRunError(int rc) { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); --- 880,884 ---- } ! bool wxLuaState::CheckAndSendRunErrorEvent(int rc) { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); *************** *** 898,901 **** --- 899,903 ---- { wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); + if (GetEventHandler()) { *************** *** 918,922 **** M_WXLSTATEDATA->m_is_running = false; if (!M_WXLSTATEDATA->m_debug_hook_break) ! (void)CheckRunError(ret_val); M_WXLSTATEDATA->m_debug_hook_break = false; --- 920,924 ---- M_WXLSTATEDATA->m_is_running = false; if (!M_WXLSTATEDATA->m_debug_hook_break) ! CheckAndSendRunErrorEvent(ret_val); M_WXLSTATEDATA->m_debug_hook_break = false; *************** *** 937,941 **** // if it's been stopped then don't send this error message, already sent stopped one if (!M_WXLSTATEDATA->m_debug_hook_break) ! (void)CheckRunError(ret_val); M_WXLSTATEDATA->m_debug_hook_break = false; --- 939,943 ---- // if it's been stopped then don't send this error message, already sent stopped one if (!M_WXLSTATEDATA->m_debug_hook_break) ! CheckAndSendRunErrorEvent(ret_val); M_WXLSTATEDATA->m_debug_hook_break = false; *************** *** 955,959 **** if (!M_WXLSTATEDATA->m_debug_hook_break) ! (void)CheckRunError(ret_val); M_WXLSTATEDATA->m_debug_hook_break = false; --- 957,961 ---- if (!M_WXLSTATEDATA->m_debug_hook_break) ! CheckAndSendRunErrorEvent(ret_val); M_WXLSTATEDATA->m_debug_hook_break = false; *************** *** 1273,1276 **** --- 1275,1284 ---- } + void wxLuaState::addToTrackedMemoryList(int obj_ptr, wxObject *pObject) + { + wxCHECK_RET(Ok() && pObject, wxT("Invalid wxLuaState or wxObject to track")); + M_WXLSTATEDATA->m_pTrackedList->Put(obj_ptr, pObject); + } + bool wxLuaState::removeTrackedMemory(void *pObject, bool fDelete) { *************** *** 1546,1555 **** lua_State* L = M_WXLSTATEDATA->m_lua_State; ! wxPrintf(wxT("wxLuaState::ttag %d"), index); int tag = TLUA_NOTAG; if (lua_getmetatable(L, index) != 0) { ! wxPrintf(wxT(" has metatable")); lua_pushliteral(L, "tag"); lua_rawget(L, -2); --- 1554,1563 ---- lua_State* L = M_WXLSTATEDATA->m_lua_State; ! //wxPrintf(wxT("wxLuaState::ttag %d"), index); int tag = TLUA_NOTAG; if (lua_getmetatable(L, index) != 0) { ! //wxPrintf(wxT(" has metatable")); lua_pushliteral(L, "tag"); lua_rawget(L, -2); *************** *** 1557,1565 **** { tag = (int) lua_tonumber(L, -1); ! wxPrintf(wxT(" and is number %d"), tag); } lua_pop(L, 2); } ! wxPrintf(wxT("\n")); return tag; } --- 1565,1573 ---- { tag = (int) lua_tonumber(L, -1); ! //wxPrintf(wxT(" and is number %d"), tag); } lua_pop(L, 2); } ! //wxPrintf(wxT("\n")); return tag; } *************** *** 2171,2177 **** errorMsg += wxT("\n"); ! DisplayError(errorMsg); lua_settop(L, top); ! status = 0; } --- 2179,2185 ---- errorMsg += wxT("\n"); ! SendErrorEvent(errorMsg); lua_settop(L, top); ! status = 0; // FIXME - does this make sense to zero it here? } Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** wxlbind.cpp 29 Dec 2005 20:07:58 -0000 1.11 --- wxlbind.cpp 30 Dec 2005 04:35:59 -0000 1.12 *************** *** 132,137 **** } ! wxPrintf(wxT("wxLua_lua_getTableFunc '%s' pClass %d, userdata %d, lightuserdata %d, ttag %d, class_tag %d lua_State %d wxLuaStateRefData %d\n"), ! lua2wx(cpIndex).c_str(), (long)pClass, init_isuserdata, init_islightuserdata, init_ttag, init_class_tag, (long)L, (long)wxlState.GetRefData()); if (!fFound) --- 132,137 ---- } ! // wxPrintf(wxT("wxLua_lua_getTableFunc '%s' pClass %d, userdata %d, lightuserdata %d, ttag %d, class_tag %d lua_State %d wxLuaStateRefData %d\n"), ! // lua2wx(cpIndex).c_str(), (long)pClass, init_isuserdata, init_islightuserdata, init_ttag, init_class_tag, (long)L, (long)wxlState.GetRefData()); if (!fFound) |
From: John L. <jr...@us...> - 2005-12-29 20:11:19
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20721 Modified Files: wxlbind.h Log Message: add virtual wxLuaBind::Clone function to get a "new" instance of a binding Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wxlbind.h 22 Dec 2005 18:42:34 -0000 1.8 --- wxlbind.h 29 Dec 2005 20:11:11 -0000 1.9 *************** *** 123,126 **** --- 123,129 ---- virtual ~wxLuaBinding() {} + // override this to generate a "new" version of subclassed bindings + virtual wxLuaBinding* Clone() const { return new wxLuaBinding; } + // lua namespace e.g. "wx" wxString nameSpace; |
From: John L. <jr...@us...> - 2005-12-29 20:10:28
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20494 Modified Files: wxlstate.cpp Log Message: add "new" instances on bindings for each wxLuaState since the binding members are per lua_State Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxlstate.cpp 22 Dec 2005 19:52:50 -0000 1.16 --- wxlstate.cpp 29 Dec 2005 20:10:19 -0000 1.17 *************** *** 49,54 **** extern int wxLuaClassListCompareByTag(const void *p1, const void *p2); // wxlbind.cpp ! extern const char* wxLuaNull; ! extern int s_wxluatag_wxWindow; --- 49,53 ---- extern int wxLuaClassListCompareByTag(const void *p1, const void *p2); // wxlbind.cpp ! const char wxLuaNull_[] = "wxNull"; // FIXME gcc can't link to this even if extern extern int s_wxluatag_wxWindow; *************** *** 88,95 **** // Stick us into the lua_State - push key, value ! lua_pushstring( L1, "__wxLuaStateRefData" ); ! lua_pushlightuserdata( L1, (void*)wxlState.GetRefData() ); // set the value ! lua_settable( L1, LUA_REGISTRYINDEX ); } --- 87,94 ---- // Stick us into the lua_State - push key, value ! //lua_pushstring( L1, "__wxLuaStateRefData" ); ! //lua_pushlightuserdata( L1, (void*)wxlState.GetRefData() ); // set the value ! //lua_settable( L1, LUA_REGISTRYINDEX ); } *************** *** 536,540 **** m_windowList.DeleteContents(false); ! m_bindings.DeleteContents(false); wxLuaBindingList::Node *node; --- 535,539 ---- m_windowList.DeleteContents(false); ! m_bindings.DeleteContents(true); // we add new copies of the bindings wxLuaBindingList::Node *node; *************** *** 542,546 **** { wxLuaBinding* binding = node->GetData(); ! m_bindings.Append(binding); } } --- 541,545 ---- { wxLuaBinding* binding = node->GetData(); ! m_bindings.Append(binding->Clone()); } } *************** *** 568,571 **** --- 567,578 ---- delete m_pDerivedList; delete m_pTrackedList; + + wxLuaBindingList::Node *node = m_bindings.GetFirst(); + while (node) + { + wxLuaBindingList::Node* next_node = node->GetNext(); + m_bindings.DeleteNode(node); // see m_bindings.DeleteContents(true) + node = next_node; + } } *************** *** 2017,2021 **** if (nTag == M_WXLSTATEDATA->m_wxLuaNull) ! return wxLuaNull; if (nTag == M_WXLSTATEDATA->m_functionTag) return "wxLuaFunction"; --- 2024,2028 ---- if (nTag == M_WXLSTATEDATA->m_wxLuaNull) ! return wxLuaNull_; if (nTag == M_WXLSTATEDATA->m_functionTag) return "wxLuaFunction"; |
From: John L. <jr...@us...> - 2005-12-29 20:08:10
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20238 Modified Files: wxlbind.cpp Log Message: push wxLuaReferences into the bindings Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** wxlbind.cpp 22 Dec 2005 18:42:35 -0000 1.10 --- wxlbind.cpp 29 Dec 2005 20:07:58 -0000 1.11 *************** *** 267,273 **** // create references table in registry ! // tpushwxLuaReferences(L); ! // lua_newtable(L); ! // lua_rawset(L, LUA_REGISTRYINDEX); // create a tag for the wxLua table --- 267,273 ---- // create references table in registry ! tpushwxLuaReferences(L); ! lua_newtable(L); ! lua_rawset(L, LUA_REGISTRYINDEX); // create a tag for the wxLua table |
From: John L. <jr...@us...> - 2005-12-29 20:06:58
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19947 Modified Files: internal.cpp Log Message: fix wxLuaReferences so that it links in gcc, weird problem Index: internal.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/internal.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** internal.cpp 22 Dec 2005 18:42:35 -0000 1.22 --- internal.cpp 29 Dec 2005 20:06:47 -0000 1.23 *************** *** 50,55 **** // lua registry table ! const char* wxLuaReferences = "wxLuaReferences"; ! const char* wxLuaNull = "wxNull"; wxString GetSourceLine(lua_State *L) --- 50,55 ---- // lua registry table ! const char wxLuaReferences[] = "wxLuaReferences"; ! const char wxLuaNull[] = "wxNull"; wxString GetSourceLine(lua_State *L) *************** *** 242,251 **** void LUACALL tpushwxLuaReferences(lua_State *L) { ! lua_pushstring(L, wxLuaReferences); //, strlen(wxLuaReferences)-1); // FIXME this used to be #define tpushliteralstring(str, sizeof(str)-1) } void LUACALL tpushwxLuaNull(lua_State *L) { ! lua_pushstring(L, wxLuaNull); //, strlen(wxLuaNull)-1); } --- 242,253 ---- void LUACALL tpushwxLuaReferences(lua_State *L) { ! lua_pushlstring(L, wxLuaReferences, sizeof(wxLuaReferences)-1); ! //lua_pushstring(L, wxLuaReferences); //, strlen(wxLuaReferences)-1); // FIXME this used to be #define tpushliteralstring(str, sizeof(str)-1) } void LUACALL tpushwxLuaNull(lua_State *L) { ! lua_pushlstring(L, wxLuaNull, sizeof(wxLuaNull)-1); ! //lua_pushstring(L, wxLuaNull); //, strlen(wxLuaNull)-1); } |
From: John L. <jr...@us...> - 2005-12-29 20:04:00
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19395/bindings Modified Files: genwxbind.lua Log Message: XXX_DYNAMIC_CLASS, not ambiguous XXX_CLASS return new instance of the class in virtual wxLuaBinding::Clone function Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** genwxbind.lua 12 Dec 2005 05:16:31 -0000 1.13 --- genwxbind.lua 29 Dec 2005 20:03:47 -0000 1.14 *************** *** 3476,3484 **** table.insert(fileData, "public:\n") table.insert(fileData, " "..hook_binding_class.."();\n") table.insert(fileData, "\n") table.insert(fileData, "protected:\n") table.insert(fileData, " virtual void OnRegister(const wxLuaState& wxlState, bool registerTypes, int luaTable);\n") table.insert(fileData, "\n") ! table.insert(fileData, " DECLARE_CLASS("..hook_binding_class..")\n") table.insert(fileData, "};\n") table.insert(fileData, "\n\n") --- 3476,3485 ---- table.insert(fileData, "public:\n") table.insert(fileData, " "..hook_binding_class.."();\n") + table.insert(fileData, " virtual wxLuaBinding* Clone() const { return new "..hook_binding_class.."; }\n") table.insert(fileData, "\n") table.insert(fileData, "protected:\n") table.insert(fileData, " virtual void OnRegister(const wxLuaState& wxlState, bool registerTypes, int luaTable);\n") table.insert(fileData, "\n") ! table.insert(fileData, " DECLARE_DYNAMIC_CLASS("..hook_binding_class..")\n") table.insert(fileData, "};\n") table.insert(fileData, "\n\n") *************** *** 3644,3648 **** table.insert(fileData, "extern WXLUAMETHOD *"..hook_builtin_fn.."(size_t &count);\n") table.insert(fileData, "\n\n") ! table.insert(fileData, "IMPLEMENT_CLASS("..hook_binding_class..", wxLuaBinding)\n") table.insert(fileData, "\n") table.insert(fileData, ""..hook_binding_class.."::"..hook_binding_class.."() : wxLuaBinding()\n") --- 3645,3649 ---- table.insert(fileData, "extern WXLUAMETHOD *"..hook_builtin_fn.."(size_t &count);\n") table.insert(fileData, "\n\n") ! table.insert(fileData, "IMPLEMENT_DYNAMIC_CLASS("..hook_binding_class..", wxLuaBinding)\n") table.insert(fileData, "\n") table.insert(fileData, ""..hook_binding_class.."::"..hook_binding_class.."() : wxLuaBinding()\n") |
From: John L. <jr...@us...> - 2005-12-28 23:02:57
|
Update of /cvsroot/wxlua/wxLua/apps/build/msw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20579/wxLua/apps/build/msw Modified Files: apps_app_wxlua.dsp apps_app_wxluaedit.dsp makefile.vc Log Message: use /nodefaultlib:"MSVCRT.lib" for msvc to make the apps not crash at startup Index: makefile.vc =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/build/msw/makefile.vc,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** makefile.vc 30 Nov 2005 23:52:30 -0000 1.11 --- makefile.vc 28 Dec 2005 23:02:49 -0000 1.12 *************** *** 189,193 **** !if "$(USE_WXLUAAPP)" == "1" ..\..\..\bin\wxlua.exe: $(APP_WXLUA_OBJECTS) msvc$(WXLIBPOSTFIX)\app_wxlua_wxlua.res ! link /NOLOGO /OUT:$@ $(LDFLAGS) /LIBPATH:$(WX_DIR)$(__WXLIBPATH_FILENAMES) $(__DEBUGINFO_0) /LIBPATH:..\..\..\$(__WXLUA_OUTPUT_FOLDER_FILENAMES) /SUBSYSTEM:WINDOWS @<< $(APP_WXLUA_OBJECTS) wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_stc.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_xrc.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_html.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_media.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_adv.lib wxbase$(WX_VERSION)$(WXLIBPOSTFIX)_net.lib wxbase$(WX_VERSION)$(WXLIBPOSTFIX)_xml.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_core.lib wxbase$(WX_VERSION)$(WXLIBPOSTFIX).lib wxtiff$(WX3RDPARTYLIBPOSTFIX).lib wxjpeg$(WX3RDPARTYLIBPOSTFIX).lib wxpng$(WX3RDPARTYLIBPOSTFIX).lib wxzlib$(WX3RDPARTYLIBPOSTFIX).lib wxregex$(WXLIBPOSTFIX).lib wxexpat$(WX3RDPARTYLIBPOSTFIX).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib << --- 189,193 ---- !if "$(USE_WXLUAAPP)" == "1" ..\..\..\bin\wxlua.exe: $(APP_WXLUA_OBJECTS) msvc$(WXLIBPOSTFIX)\app_wxlua_wxlua.res ! link /NOLOGO /OUT:$@ $(LDFLAGS) /LIBPATH:$(WX_DIR)$(__WXLIBPATH_FILENAMES) $(__DEBUGINFO_0) /LIBPATH:..\..\..\$(__WXLUA_OUTPUT_FOLDER_FILENAMES) /SUBSYSTEM:WINDOWS /nodefaultlib:"MSVCRT.lib" @<< $(APP_WXLUA_OBJECTS) wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_stc.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_xrc.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_html.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_media.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_adv.lib wxbase$(WX_VERSION)$(WXLIBPOSTFIX)_net.lib wxbase$(WX_VERSION)$(WXLIBPOSTFIX)_xml.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_core.lib wxbase$(WX_VERSION)$(WXLIBPOSTFIX).lib wxtiff$(WX3RDPARTYLIBPOSTFIX).lib wxjpeg$(WX3RDPARTYLIBPOSTFIX).lib wxpng$(WX3RDPARTYLIBPOSTFIX).lib wxzlib$(WX3RDPARTYLIBPOSTFIX).lib wxregex$(WXLIBPOSTFIX).lib wxexpat$(WX3RDPARTYLIBPOSTFIX).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib << *************** *** 196,200 **** !if "$(USE_WXLUAEDITAPP)" == "1" ..\..\..\bin\wxluaedit.exe: $(APP_WXLUAEDIT_OBJECTS) msvc$(WXLIBPOSTFIX)\app_wxluaedit_wxluaedit.res ! link /NOLOGO /OUT:$@ $(LDFLAGS) /LIBPATH:$(WX_DIR)$(__WXLIBPATH_FILENAMES) $(__DEBUGINFO_0) /LIBPATH:..\..\..\$(__WXLUA_OUTPUT_FOLDER_FILENAMES) /SUBSYSTEM:WINDOWS @<< $(APP_WXLUAEDIT_OBJECTS) wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_stedit.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_stc.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_xrc.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_html.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_media.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_adv.lib wxbase$(WX_VERSION)$(WXLIBPOSTFIX)_net.lib wxbase$(WX_VERSION)$(WXLIBPOSTFIX)_xml.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_core.lib wxbase$(WX_VERSION)$(WXLIBPOSTFIX).lib wxtiff$(WX3RDPARTYLIBPOSTFIX).lib wxjpeg$(WX3RDPARTYLIBPOSTFIX).lib wxpng$(WX3RDPARTYLIBPOSTFIX).lib wxzlib$(WX3RDPARTYLIBPOSTFIX).lib wxregex$(WXLIBPOSTFIX).lib wxexpat$(WX3RDPARTYLIBPOSTFIX).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib << --- 196,200 ---- !if "$(USE_WXLUAEDITAPP)" == "1" ..\..\..\bin\wxluaedit.exe: $(APP_WXLUAEDIT_OBJECTS) msvc$(WXLIBPOSTFIX)\app_wxluaedit_wxluaedit.res ! link /NOLOGO /OUT:$@ $(LDFLAGS) /LIBPATH:$(WX_DIR)$(__WXLIBPATH_FILENAMES) $(__DEBUGINFO_0) /LIBPATH:..\..\..\$(__WXLUA_OUTPUT_FOLDER_FILENAMES) /SUBSYSTEM:WINDOWS /nodefaultlib:"MSVCRT.lib" @<< $(APP_WXLUAEDIT_OBJECTS) wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_stedit.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_stc.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_xrc.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_html.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_media.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_adv.lib wxbase$(WX_VERSION)$(WXLIBPOSTFIX)_net.lib wxbase$(WX_VERSION)$(WXLIBPOSTFIX)_xml.lib wxmsw$(WX_VERSION)$(WXLIBPOSTFIX)_core.lib wxbase$(WX_VERSION)$(WXLIBPOSTFIX).lib wxtiff$(WX3RDPARTYLIBPOSTFIX).lib wxjpeg$(WX3RDPARTYLIBPOSTFIX).lib wxpng$(WX3RDPARTYLIBPOSTFIX).lib wxzlib$(WX3RDPARTYLIBPOSTFIX).lib wxregex$(WXLIBPOSTFIX).lib wxexpat$(WX3RDPARTYLIBPOSTFIX).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib << Index: apps_app_wxluaedit.dsp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/build/msw/apps_app_wxluaedit.dsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** apps_app_wxluaedit.dsp 30 Nov 2005 23:52:30 -0000 1.3 --- apps_app_wxluaedit.dsp 28 Dec 2005 23:02:49 -0000 1.4 *************** *** 58,63 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stedit.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stedit.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug !ELSEIF "$(CFG)" == "app_wxluaedit - Win32 DLL Unicode Release" --- 58,63 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stedit.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stedit.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" !ELSEIF "$(CFG)" == "app_wxluaedit - Win32 DLL Unicode Release" *************** *** 83,88 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stedit.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stedit.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows !ELSEIF "$(CFG)" == "app_wxluaedit - Win32 DLL Debug" --- 83,88 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stedit.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stedit.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /nodefaultlib:"MSVCRT.lib" !ELSEIF "$(CFG)" == "app_wxluaedit - Win32 DLL Debug" *************** *** 108,113 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stedit.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stedit.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug !ELSEIF "$(CFG)" == "app_wxluaedit - Win32 DLL Release" --- 108,113 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stedit.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stedit.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" !ELSEIF "$(CFG)" == "app_wxluaedit - Win32 DLL Release" *************** *** 133,138 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stedit.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stedit.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows !ELSEIF "$(CFG)" == "app_wxluaedit - Win32 Unicode Debug" --- 133,138 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stedit.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stedit.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /nodefaultlib:"MSVCRT.lib" !ELSEIF "$(CFG)" == "app_wxluaedit - Win32 Unicode Debug" *************** *** 158,163 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stedit.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stedit.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug !ELSEIF "$(CFG)" == "app_wxluaedit - Win32 Unicode Release" --- 158,163 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stedit.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stedit.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" !ELSEIF "$(CFG)" == "app_wxluaedit - Win32 Unicode Release" *************** *** 183,188 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stedit.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stedit.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows !ELSEIF "$(CFG)" == "app_wxluaedit - Win32 Debug" --- 183,188 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stedit.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stedit.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /nodefaultlib:"MSVCRT.lib" !ELSEIF "$(CFG)" == "app_wxluaedit - Win32 Debug" *************** *** 208,213 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stedit.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stedit.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug !ELSEIF "$(CFG)" == "app_wxluaedit - Win32 Release" --- 208,213 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stedit.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stedit.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" !ELSEIF "$(CFG)" == "app_wxluaedit - Win32 Release" *************** *** 233,238 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stedit.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stedit.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows !ENDIF --- 233,238 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stedit.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stedit.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxluaedit.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /nodefaultlib:"MSVCRT.lib" !ENDIF Index: apps_app_wxlua.dsp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/build/msw/apps_app_wxlua.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** apps_app_wxlua.dsp 29 Nov 2005 23:52:11 -0000 1.2 --- apps_app_wxlua.dsp 28 Dec 2005 23:02:49 -0000 1.3 *************** *** 58,63 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug !ELSEIF "$(CFG)" == "app_wxlua - Win32 DLL Unicode Release" --- 58,63 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" !ELSEIF "$(CFG)" == "app_wxlua - Win32 DLL Unicode Release" *************** *** 83,88 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows !ELSEIF "$(CFG)" == "app_wxlua - Win32 DLL Debug" --- 83,88 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /nodefaultlib:"MSVCRT.lib" !ELSEIF "$(CFG)" == "app_wxlua - Win32 DLL Debug" *************** *** 108,113 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug !ELSEIF "$(CFG)" == "app_wxlua - Win32 DLL Release" --- 108,113 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" !ELSEIF "$(CFG)" == "app_wxlua - Win32 DLL Release" *************** *** 133,138 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows !ELSEIF "$(CFG)" == "app_wxlua - Win32 Unicode Debug" --- 133,138 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_dll" /libpath:"..\..\..\lib\vc_dll" /subsystem:windows /nodefaultlib:"MSVCRT.lib" !ELSEIF "$(CFG)" == "app_wxlua - Win32 Unicode Debug" *************** *** 158,163 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug !ELSEIF "$(CFG)" == "app_wxlua - Win32 Unicode Release" --- 158,163 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26ud_stc.lib wxmsw26ud_xrc.lib wxmsw26ud_html.lib wxmsw26ud_media.lib wxmsw26ud_adv.lib wxbase26ud_net.lib wxbase26ud_xml.lib wxmsw26ud_core.lib wxbase26ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" !ELSEIF "$(CFG)" == "app_wxlua - Win32 Unicode Release" *************** *** 183,188 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows !ELSEIF "$(CFG)" == "app_wxlua - Win32 Debug" --- 183,188 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26u_stc.lib wxmsw26u_xrc.lib wxmsw26u_html.lib wxmsw26u_media.lib wxmsw26u_adv.lib wxbase26u_net.lib wxbase26u_xml.lib wxmsw26u_core.lib wxbase26u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /nodefaultlib:"MSVCRT.lib" !ELSEIF "$(CFG)" == "app_wxlua - Win32 Debug" *************** *** 208,213 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug !ELSEIF "$(CFG)" == "app_wxlua - Win32 Release" --- 208,213 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26d_stc.lib wxmsw26d_xrc.lib wxmsw26d_html.lib wxmsw26d_media.lib wxmsw26d_adv.lib wxbase26d_net.lib wxbase26d_xml.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /debug /nodefaultlib:"MSVCRT.lib" !ELSEIF "$(CFG)" == "app_wxlua - Win32 Release" *************** *** 233,238 **** # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows !ENDIF --- 233,238 ---- # ADD BSC32 /nologo LINK32=link.exe ! # ADD BASE LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /nodefaultlib:"MSVCRT.lib" ! # ADD LINK32 wxluasocket.lib wxluadebug.lib wxbind.lib wxlua.lib lua.lib wxmsw26_stc.lib wxmsw26_xrc.lib wxmsw26_html.lib wxmsw26_media.lib wxmsw26_adv.lib wxbase26_net.lib wxbase26_xml.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib oleacc.lib /nologo /machine:i386 /out:"..\..\..\bin\wxlua.exe" /libpath:"$(WXWIN)\lib\vc_lib" /libpath:"..\..\..\lib\vc_lib" /subsystem:windows /nodefaultlib:"MSVCRT.lib" !ENDIF |
From: John L. <jr...@us...> - 2005-12-28 23:02:56
|
Update of /cvsroot/wxlua/wxLua/apps/build/bakefiles In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20579/wxLua/apps/build/bakefiles Modified Files: apps.bkl Log Message: use /nodefaultlib:"MSVCRT.lib" for msvc to make the apps not crash at startup Index: apps.bkl =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/build/bakefiles/apps.bkl,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** apps.bkl 30 Nov 2005 23:52:30 -0000 1.12 --- apps.bkl 28 Dec 2005 23:02:49 -0000 1.13 *************** *** 65,68 **** --- 65,72 ---- <win32-res>wxlua/src/wxlua.rc</win32-res> + <if cond="FORMAT=='msvc6prj' or FORMAT=='msvc'"> + <ldflags>/nodefaultlib:"MSVCRT.lib"</ldflags> + </if> + <!-- Libraries must be put in the reverse order they'll be loaded --> <wxlua-lib>wxluasocket</wxlua-lib> *************** *** 107,110 **** --- 111,118 ---- <if cond="TARGETING_WIN32=='1'"><include>$(WX_DIR)$(DIRSEP)contrib$(DIRSEP)include</include></if> + <if cond="FORMAT=='msvc6prj' or FORMAT=='msvc'"> + <ldflags>/nodefaultlib:"MSVCRT.lib"</ldflags> + </if> + <!-- Libraries must be put in the reverse order they'll be loaded --> <wxlua-lib>wxluasocket</wxlua-lib> |
From: John L. <jr...@us...> - 2005-12-28 23:02:56
|
Update of /cvsroot/wxlua/wxLua/apps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20579/wxLua/apps Modified Files: Makefile.in Log Message: use /nodefaultlib:"MSVCRT.lib" for msvc to make the apps not crash at startup Index: Makefile.in =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/Makefile.in,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Makefile.in 29 Nov 2005 23:52:11 -0000 1.11 --- Makefile.in 28 Dec 2005 23:02:48 -0000 1.12 *************** *** 80,84 **** @COND_USE_WXLUAAPP_1@../bin/wxlua$(EXEEXT): $(APP_WXLUA_OBJECTS) $(__app_wxlua___win32rc) ! @COND_USE_WXLUAAPP_1@ $(CXX) -o $@ $(APP_WXLUA_OBJECTS) $(LDFLAGS) -L../lib $(LDFLAGS_GUI) -lwxluasocket -lwxluadebug -lwxbind -lwxlua -llua $(WX_LIBS) @COND_USE_WXLUAAPP_1@ @COND_USE_WXLUAAPP_1@ $(__app_wxlua___mac_setfilecmd) --- 80,84 ---- @COND_USE_WXLUAAPP_1@../bin/wxlua$(EXEEXT): $(APP_WXLUA_OBJECTS) $(__app_wxlua___win32rc) ! @COND_USE_WXLUAAPP_1@ $(CXX) -o $@ $(APP_WXLUA_OBJECTS) $(LDFLAGS) -L../lib $(LDFLAGS_GUI) $(WX_LIBS) -lwxluasocket -lwxluadebug -lwxbind -lwxlua -llua @COND_USE_WXLUAAPP_1@ @COND_USE_WXLUAAPP_1@ $(__app_wxlua___mac_setfilecmd) *************** *** 86,90 **** @COND_USE_WXLUAEDITAPP_1@../bin/wxluaedit$(EXEEXT): $(APP_WXLUAEDIT_OBJECTS) $(__app_wxluaedit___win32rc) ! @COND_USE_WXLUAEDITAPP_1@ $(CXX) -o $@ $(APP_WXLUAEDIT_OBJECTS) $(LDFLAGS) -L../lib $(LDFLAGS_GUI) -lwxluasocket -lwxluadebug -lwxbind -lwxlua -llua $(WX_LIBS) @COND_USE_WXLUAEDITAPP_1@ @COND_USE_WXLUAEDITAPP_1@ $(__app_wxluaedit___mac_setfilecmd) --- 86,90 ---- @COND_USE_WXLUAEDITAPP_1@../bin/wxluaedit$(EXEEXT): $(APP_WXLUAEDIT_OBJECTS) $(__app_wxluaedit___win32rc) ! @COND_USE_WXLUAEDITAPP_1@ $(CXX) -o $@ $(APP_WXLUAEDIT_OBJECTS) $(LDFLAGS) -L../lib $(LDFLAGS_GUI) $(WX_LIBS) -lwxluasocket -lwxluadebug -lwxbind -lwxlua -llua @COND_USE_WXLUAEDITAPP_1@ @COND_USE_WXLUAEDITAPP_1@ $(__app_wxluaedit___mac_setfilecmd) |
From: John L. <jr...@us...> - 2005-12-22 19:53:02
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6452/wxLua/modules/wxlua/src Modified Files: wxlstate.cpp Log Message: fix MSVC warnings Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxlstate.cpp 22 Dec 2005 18:42:35 -0000 1.15 --- wxlstate.cpp 22 Dec 2005 19:52:50 -0000 1.16 *************** *** 867,871 **** void wxLuaState::DisplayError( const wxString &errorMsg ) { ! wxLuaEvent event(wxEVT_LUA_ERROR, GetId(), this); event.SetString(errorMsg); SendEvent( event ); --- 867,871 ---- void wxLuaState::DisplayError( const wxString &errorMsg ) { ! wxLuaEvent event(wxEVT_LUA_ERROR, GetId(), *this); event.SetString(errorMsg); SendEvent( event ); *************** *** 879,883 **** if (!CheckRunError(rc, &msg)) { ! wxLuaEvent event(wxEVT_LUA_ERROR, GetId(), this); event.SetString(msg); event.SetInt(-1); // don't know what line the error occured --- 879,883 ---- if (!CheckRunError(rc, &msg)) { ! wxLuaEvent event(wxEVT_LUA_ERROR, GetId(), *this); event.SetString(msg); event.SetInt(-1); // don't know what line the error occured *************** *** 2304,2323 **** { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return lua_isnumber(M_WXLSTATEDATA->m_lua_State, index); } bool wxLuaState::lua_IsString(int index) { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return lua_isstring(M_WXLSTATEDATA->m_lua_State, index); } bool wxLuaState::lua_IsCFunction(int index) { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return lua_iscfunction(M_WXLSTATEDATA->m_lua_State, index); } bool wxLuaState::lua_IsUserData(int index) { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return lua_isuserdata(M_WXLSTATEDATA->m_lua_State, index); } int wxLuaState::lua_Type(int index) --- 2304,2323 ---- { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return lua_isnumber(M_WXLSTATEDATA->m_lua_State, index) != 0; } bool wxLuaState::lua_IsString(int index) { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return lua_isstring(M_WXLSTATEDATA->m_lua_State, index) != 0; } bool wxLuaState::lua_IsCFunction(int index) { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return lua_iscfunction(M_WXLSTATEDATA->m_lua_State, index) != 0; } bool wxLuaState::lua_IsUserData(int index) { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return lua_isuserdata(M_WXLSTATEDATA->m_lua_State, index) != 0; } int wxLuaState::lua_Type(int index) *************** *** 2519,2523 **** return lua_load(M_WXLSTATEDATA->m_lua_State, reader, dt, chunkname); } ! int wxLuaState::lua_Dump(lua_State *L, lua_Chunkwriter writer, void *data) { wxCHECK_MSG(Ok(), 0, wxT("Invalid wxLuaState")); --- 2519,2523 ---- return lua_load(M_WXLSTATEDATA->m_lua_State, reader, dt, chunkname); } ! int wxLuaState::lua_Dump(lua_Chunkwriter writer, void *data) { wxCHECK_MSG(Ok(), 0, wxT("Invalid wxLuaState")); |
From: John L. <jr...@us...> - 2005-12-22 19:53:02
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6452/wxLua/modules/wxlua/include Modified Files: wxlstate.h Log Message: fix MSVC warnings Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wxlstate.h 22 Dec 2005 18:42:35 -0000 1.12 --- wxlstate.h 22 Dec 2005 19:52:50 -0000 1.13 *************** *** 505,509 **** wxLUA_UNUSED_NOTUNICODE(int lua_Load(lua_Chunkreader reader, void *dt, const wxString& chunkname) { return lua_Load(reader, dt, wx2lua(chunkname)); }) ! int lua_Dump (lua_State *L, lua_Chunkwriter writer, void *data); // ----------------------------------------------------------------------- --- 505,509 ---- wxLUA_UNUSED_NOTUNICODE(int lua_Load(lua_Chunkreader reader, void *dt, const wxString& chunkname) { return lua_Load(reader, dt, wx2lua(chunkname)); }) ! int lua_Dump(lua_Chunkwriter writer, void *data); // ----------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2005-12-22 18:42:50
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19516/wxLua/modules/wxlua/src Modified Files: internal.cpp wxlbind.cpp wxlintrp.cpp wxlstate.cpp Log Message: Removed the wxLuaInterpreter - all functions transferred to the wxLuaState wxLuaInterpreter is typedefed to wxLuaState temporarily Index: internal.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/internal.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** internal.cpp 12 Dec 2005 05:16:31 -0000 1.21 --- internal.cpp 22 Dec 2005 18:42:35 -0000 1.22 *************** *** 46,51 **** //#endif - extern wxLuaInterpreter *wxFindLuaInterpreter(lua_State *L); - extern int s_wxluatag_wxBitmap; extern int s_wxluatag_wxEvtHandler; --- 46,49 ---- *************** *** 1243,1255 **** } - #if 1 // defined(LUA_EMBEDDED) // FIXME - who gets the error message? - #define LUAERROR_OUTPUT(msg) \ - wxLuaInterpreter *luaInterpreter = wxFindLuaInterpreter(L); \ - luaInterpreter->DisplayError(msg); - #else - #define LUAERROR_OUTPUT(msg) \ - wxLuaHandler::GetHandler().DisplayError(msg); - #endif - int LUACALL LuaError(lua_State *L, int status, int top) { --- 1241,1244 ---- *************** *** 1276,1280 **** errorMsg += wxT("\n"); ! LUAERROR_OUTPUT(errorMsg) lua_settop(L, top); status = 0; --- 1265,1271 ---- errorMsg += wxT("\n"); ! wxLuaState wxlState(L); ! if (wxlState.Ok()) ! wxlState.DisplayError(errorMsg); lua_settop(L, top); status = 0; Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** wxlstate.cpp 16 Dec 2005 05:12:26 -0000 1.14 --- wxlstate.cpp 22 Dec 2005 18:42:35 -0000 1.15 *************** *** 56,62 **** --- 56,343 ---- // ---------------------------------------------------------------------------- + // WXLUA_THREAD_INTERCEPTION - make sure that coroutines lua_State's are tracked + // ---------------------------------------------------------------------------- + + // add lua_States created from lua's coroutines + #define WXLUA_THREAD_INTERCEPTION + + extern "C" + { + #include "lua/include/lua.h" + #include "lua/include/lauxlib.h" + #include "lua/include/lualib.h" + + #ifdef WXLUA_THREAD_INTERCEPTION + // See lua/src/lstate.c for added hook into luaE_newthread() + #include "lua/include/luathread.h" + #endif //WXLUA_THREAD_INTERCEPTION + } + + #ifdef WXLUA_THREAD_INTERCEPTION + + // Hook into function calls to luaE_newthread (calls from coroutine.create/wrap) + // and add the new lua_State as a child sharing it's wxLuaStateVariables + void wxLuaState_newthread_handler(lua_State *L, lua_State *L1) + { + // L is the original lua_State, L1 new child thread + wxLuaState wxlState(L); + wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); + + // put into the hashmap + wxLuaStateRefData::s_wxHashMapLuaStateRefData[L1] = wxlState.GetLuaStateRefData(); + + // Stick us into the lua_State - push key, value + lua_pushstring( L1, "__wxLuaStateRefData" ); + lua_pushlightuserdata( L1, (void*)wxlState.GetRefData() ); + // set the value + lua_settable( L1, LUA_REGISTRYINDEX ); + } + + // Hook into function calls to luaE_freethread (calls from coroutine.create/wrap) + // and remove the child lua_State + void wxLuaState_freethread_handler(lua_State *WXUNUSED(L), lua_State *L1) + { + // L is the original lua_State, L1 child thread, don't remove L + //wxPrintf(wxT("wxLuaInterpreter_freethread_handler lua_State from a thread L=%ld L1=%ld\n"), (long)L, (long)L1); fflush(stdout); + wxLuaStateRefData::s_wxHashMapLuaStateRefData.erase(L1); + } + + static void wxLuaState_SetupThreadHandlers() + { + if (luaX_getnewthreadhandler() == NULL) + luaX_setnewthreadhandler( wxLuaState_newthread_handler ); + if (luaX_getfreethreadhandler() == NULL) + luaX_setfreethreadhandler( wxLuaState_freethread_handler ); + } + + #endif //WXLUA_THREAD_INTERCEPTION + + // ---------------------------------------------------------------------------- // C functions for lua used in wxLuaState // ---------------------------------------------------------------------------- + + int LuaPrint( lua_State *L ) + { + wxString msg; + int i, n = lua_gettop(L); + + // figure out the types here in c++ land + lua_getglobal(L, "tostring"); + for (i = 1; i <= n; i++) + { + if (i > 1) msg.Append(wxT(", ")); + + if (lua_isstring(L, i)) + msg += lua2wx(lua_tostring(L, i)); + else if (lua_isnumber(L, i)) + msg += wxString::Format(wxT("%lf"), lua_tonumber(L, i)); + else if (lua_iscfunction(L, i)) + msg += wxString::Format(wxT("C function %ld"), (long int)lua_tocfunction(L, i)); + else if (lua_isuserdata(L, i)) + msg += wxString::Format(wxT("User data %ld"), (long int)lua_touserdata(L, i)); + else if (lua_isboolean(L, i)) + msg += lua_toboolean(L,i) ? wxT("true") : wxT("false"); + else if (lua_isnil(L,i)) + msg += wxT("nil"); + else if (lua_isnone(L,i)) + msg += wxT("unknown"); + else + msg += wxString::Format(wxT("%s:%p"), lua_typename(L,lua_type(L,i)), lua_topointer(L,i)); + } + + if (!msg.IsEmpty()) + { + wxLuaState wxlState(L); + + if (wxlState.Ok()) + { + wxLuaEvent event(wxEVT_LUA_CONSOLE, wxlState.GetId(), wxlState); + event.SetString(msg); + wxlState.SendEvent( event ); + } + } + + return 0; // no items put onto stack + } + + // copied from the Lua 5.0.1 debug library + #define LEVELS1 12 /* size of the first part of the stack */ + #define LEVELS2 10 /* size of the second part of the stack */ + + // copied from the Lua 5.0.1 debug library + int LuaTraceback(lua_State *L) + { + int level = 1; // skip level 0 (it's this function) + int firstpart = 1; // still before eventual `...' + lua_Debug ar; + if (lua_gettop(L) == 0) + lua_pushliteral(L, ""); + else if (!lua_isstring(L, 1)) // no string message + return 1; + else + lua_pushliteral(L, "\n"); + + lua_pushliteral(L, "stack traceback:"); + while (lua_getstack(L, level++, &ar)) + { + if (level > LEVELS1 && firstpart) + { + // no more than `LEVELS2' more levels? + if (!lua_getstack(L, level+LEVELS2, &ar)) + level--; // keep going + else + { + lua_pushliteral(L, "\n\t..."); // too many levels + while (lua_getstack(L, level+LEVELS2, &ar)) // find last levels + level++; + } + firstpart = 0; + continue; + } + lua_pushliteral(L, "\n\t"); + lua_getinfo(L, "Snl", &ar); + lua_pushfstring(L, "%s:", ar.short_src); + if (ar.currentline > 0) + lua_pushfstring(L, "%d:", ar.currentline); + switch (*ar.namewhat) + { + case 'g': // global + case 'l': // local + case 'f': // field + case 'm': // method + lua_pushfstring(L, " in function `%s'", ar.name); + break; + default: { + if (*ar.what == 'm') // main? + lua_pushfstring(L, " in main chunk"); + else if (*ar.what == 'C' || *ar.what == 't') + lua_pushliteral(L, " ?"); // C function or tail call + else + lua_pushfstring(L, " in function <%s:%d>", + ar.short_src, ar.linedefined); + } + } + lua_concat(L, lua_gettop(L)); + } + lua_concat(L, lua_gettop(L)); + return 1; + } + + int LuaAlert( lua_State *L ) + { + wxLuaState wxlState(L); + + if (wxlState.Ok()) + { + wxString msg = lua2wx(lua_tostring(L, 1)); + + wxLuaEvent event(wxEVT_LUA_ERROR, wxlState.GetId(), wxlState); + event.SetString(msg); + + long line = -1; + wxString lineStr = msg; + + // Why can't I fill a lua_Debug here? Try to get the line number + // by parsing the error message that looks like this, 1 is linenumber + // [string "a = 1("]:1: unexpected symbol near `<eof>' + while(!lineStr.IsEmpty()) + { + lineStr = lineStr.AfterFirst(wxT(']')); + if ((lineStr.Length() > 0) && (lineStr.GetChar(0) == wxT(':'))) + { + lineStr = lineStr.AfterFirst(wxT(':')); + if (lineStr.IsEmpty() || lineStr.BeforeFirst(wxT(':')).ToLong(&line)) + break; + } + } + + event.SetInt((int)line); + wxlState.SendEvent( event ); + } + + return 0; + } + + void LuaDebugHook(lua_State *L, lua_Debug *LDebug) + { + wxLuaState wxlState(L); + + // during program shutdown this can be called - ignore it + if (!wxlState.Ok()) + return; + + // FIXME - for select event types we don't want to do anything + wxEventType evtType = wxlState.GetInEventType(); + if ((evtType != wxEVT_NULL)) + //(evtType == wxEVT_IDLE) && (evtType == wxEVT_PAINT) && + //(evtType == wxEVT_DESTROY) && (evtType == wxEVT_CLOSE_WINDOW)) + return; + + // they want to break the program, restore old debug hook, then error out + if (wxlState.GetDebugHookBreak()) + { + // restore hook to previous state see wxLuaInterpreter::Break() + wxlState.SetLuaDebugHook(wxlState.GetLuaDebugHookCount(), + wxlState.GetLuaDebugHookYield(), + wxlState.GetLuaDebugHookSendEvt(), + wxlState.GetLuaDebugHook()); + + terror(L, wx2lua(wxlState.GetDebugHookBreakMessage())); + return; + } + + if (wxlState.GetLuaDebugHookSendEvt()) + { + int ret = 0; + ret = lua_getinfo(L, "l", LDebug); // line (ldebug.currentline) + + wxLuaEvent event(wxEVT_LUA_DEBUG_HOOK, wxlState.GetId(), wxlState); + event.m_lua_Debug = LDebug; + event.SetInt(LDebug->currentline); + wxlState.SendEvent( event ); + if (event.m_stop_interpreter) + terror(L, "Interpreter stopped"); + } + + // Try to yield *after* sending event to allow C++ gui update + if (wxlState.GetLuaDebugHookYield() > 0) + { + // yield based on number of ms passed NOT every hook event + unsigned long last_time = wxlState.GetLastLuaDebugHookTime(); + unsigned long cur_time = wxGetLocalTimeMillis().GetLo(); + + if ((cur_time > last_time + wxlState.GetLuaDebugHookYield()) || + (cur_time < last_time)) // wrapped + { + wxlState.SetLastLuaDebugHookTime( cur_time ); + + bool painting = false; + + #if WXWIN_COMPATIBILITY_24 || !wxCHECK_VERSION(2, 5, 0) + wxNode* node; + #else + wxHashTable::Node* node; + #endif + + // FIXME - wxGTK crashes if wxYield[IfNeeded] is called within a paint handler? I think + wxlState.GetLuaStateRefData()->m_pTrackedList->BeginFind(); + node = wxlState.GetLuaStateRefData()->m_pTrackedList->Next(); + while (node) + { + if (wxDynamicCast(node->GetData(), wxPaintDC)) + { + painting = true; + break; + } + node = wxlState.GetLuaStateRefData()->m_pTrackedList->Next(); + } + + if (!painting) + wxYieldIfNeeded(); + } + } + } + // A function object needs to be deleted because the object is being // garbage collected. *************** *** 231,234 **** --- 512,528 ---- m_pTrackedList = new wxHashTable(wxKEY_INTEGER); + m_is_running = false; + m_debug_hook_break = false; + m_debug_hook_break_msg = wxT("Break"); + + m_last_debug_hook_time = wxGetLocalTimeMillis().GetLo(); + m_lua_debug_hook_count = 100; + m_lua_debug_hook_yield = 50; + m_lua_debug_hook_send_evt = false; + m_lua_debug_hook = 0; + + m_evtHandler = NULL; + m_id = wxID_ANY; + // let the list delete these items m_pDerivedList->DeleteContents(true); *************** *** 254,257 **** --- 548,555 ---- wxLuaStateRefData::wxLuaStateRefData() { + #ifdef WXLUA_THREAD_INTERCEPTION + wxLuaState_SetupThreadHandlers(); + #endif //WXLUA_THREAD_INTERCEPTION + Init(); } *************** *** 263,266 **** --- 561,567 ---- wxLuaStateRefData::~wxLuaStateRefData() { + // no events here, the handler may already be gone + m_evtHandler = NULL; + CloseLuaState(true); *************** *** 338,342 **** wxLuaCallback *pCallback = (wxLuaCallback *) node->GetData(); wxCHECK_RET(pCallback, wxT("Invalid wxLuaCallback")); ! pCallback->ClearLuaState(); node = node->GetNext(); --- 639,644 ---- wxLuaCallback *pCallback = (wxLuaCallback *) node->GetData(); wxCHECK_RET(pCallback, wxT("Invalid wxLuaCallback")); ! if (pCallback->GetwxLuaState().GetRefData() != this) ! pCallback->ClearLuaState(); node = node->GetNext(); *************** *** 348,352 **** wxLuaDestroyCallback *pCallback = (wxLuaDestroyCallback *) node->GetData(); wxCHECK_RET(pCallback, wxT("Invalid wxLuaCallback")); ! pCallback->ClearLuaState(); node = node->GetNext(); --- 650,655 ---- wxLuaDestroyCallback *pCallback = (wxLuaDestroyCallback *) node->GetData(); wxCHECK_RET(pCallback, wxT("Invalid wxLuaCallback")); ! if (pCallback->GetwxLuaState().GetRefData() != this) ! pCallback->ClearLuaState(); node = node->GetNext(); *************** *** 417,425 **** } ! bool wxLuaState::Create() { ! UnRef(); m_refData = new wxLuaStateRefData(); lua_State* L = lua_open(); M_WXLSTATEDATA->m_lua_State = L; --- 720,731 ---- } ! bool wxLuaState::Create(wxEvtHandler *handler, wxWindowID id) { ! Destroy(); m_refData = new wxLuaStateRefData(); + M_WXLSTATEDATA->m_evtHandler = handler; + M_WXLSTATEDATA->m_id = id; + lua_State* L = lua_open(); M_WXLSTATEDATA->m_lua_State = L; *************** *** 443,448 **** lua_settable( L, LUA_REGISTRYINDEX ); ! /* ! // register handlers to send events FIXME if (!M_WXLSTATEDATA->m_lua_State_static) { --- 749,753 ---- lua_settable( L, LUA_REGISTRYINDEX ); ! // register handlers to send events if (!M_WXLSTATEDATA->m_lua_State_static) { *************** *** 451,458 **** RegisterFunction(LuaTraceback, wxT("_TRACEBACK")); } - */ // now register bindings RegisterBindings(true); return true; } --- 756,767 ---- RegisterFunction(LuaTraceback, wxT("_TRACEBACK")); } // now register bindings RegisterBindings(true); + + // alert people that we've been created so they can finish setting us up + wxLuaEvent event(wxEVT_LUA_CREATION, GetId(), *this); + SendEvent( event ); + return true; } *************** *** 461,465 **** { wxCHECK_MSG(L != NULL, false, wxT("Invalid lua_State")); ! if (GetRefData() != NULL) UnRef(); if (type == WXLUASTATE_ATTACH) --- 770,774 ---- { wxCHECK_MSG(L != NULL, false, wxT("Invalid lua_State")); ! if (GetRefData() != NULL) Destroy(); if (type == WXLUASTATE_ATTACH) *************** *** 485,489 **** // delete reference to old data ! UnRef(); // reference new data --- 794,798 ---- // delete reference to old data ! Destroy(); // reference new data *************** *** 505,508 **** --- 814,828 ---- } + void wxLuaState::Destroy() + { + if (!GetRefData()) return; + + // we don't want recursion in UnRef and wxLua_lua_garbageCollect + if (GetRefData()->GetRefCount() == 1) + M_WXLSTATEDATA->CloseLuaState(true); + + UnRef(); + } + bool wxLuaState::CloseLuaState(bool force) { *************** *** 523,526 **** --- 843,1050 ---- } + void wxLuaState::SetEventHandler(wxEvtHandler *evtHandler) + { + wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); + M_WXLSTATEDATA->m_evtHandler = evtHandler; + } + wxEvtHandler *wxLuaState::GetEventHandler() const + { + wxCHECK_MSG(Ok(), NULL, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_evtHandler; + } + + void wxLuaState::SetId(wxWindowID id) + { + wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); + M_WXLSTATEDATA->m_id = id; + } + wxWindowID wxLuaState::GetId() const + { + wxCHECK_MSG(Ok(), wxID_ANY, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_id; + } + + void wxLuaState::DisplayError( const wxString &errorMsg ) + { + wxLuaEvent event(wxEVT_LUA_ERROR, GetId(), this); + event.SetString(errorMsg); + SendEvent( event ); + } + + bool wxLuaState::CheckRunError(int rc) + { + wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); + + wxString msg; + if (!CheckRunError(rc, &msg)) + { + wxLuaEvent event(wxEVT_LUA_ERROR, GetId(), this); + event.SetString(msg); + event.SetInt(-1); // don't know what line the error occured + SendEvent( event ); + return false; + } + return true; + } + + void wxLuaState::SendEvent( wxLuaEvent &event ) const + { + wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); + if (GetEventHandler()) + { + event.SetEventObject( (wxObject*)this ); + GetEventHandler()->ProcessEvent(event); + } + } + + // ---------------------------------------------------------------------------- + + int wxLuaState::RunFile(const wxString &filename) + { + wxCHECK_MSG(Ok(), -1, wxT("lua interpreter not created")); + wxCHECK_MSG(!M_WXLSTATEDATA->m_is_running, -1, wxT("lua interpreter is already running")); + M_WXLSTATEDATA->m_debug_hook_break = false; + + M_WXLSTATEDATA->m_is_running = true; + // int ret_val = lua_dofile(m_lua_State, wx2lua(filename)); + int ret_val = LuaDoFile(filename); // FIXME use LuaDoFile in RunFile ? + M_WXLSTATEDATA->m_is_running = false; + if (!M_WXLSTATEDATA->m_debug_hook_break) + (void)CheckRunError(ret_val); + + M_WXLSTATEDATA->m_debug_hook_break = false; + return ret_val; + } + + int wxLuaState::RunString(const wxString &script, const wxString& WXUNUSED(name)) + { + wxCHECK_MSG(Ok(), -1, wxT("Invalid wxLuaState")); + wxCHECK_MSG(!M_WXLSTATEDATA->m_is_running, -1, wxT("lua interpreter is already running")); + M_WXLSTATEDATA->m_debug_hook_break = false; + + M_WXLSTATEDATA->m_is_running = true; + //int ret_val = luaL_loadbuffer(m_lua_State, wx2lua(script), script.Len(), wx2lua(name)); + int ret_val = lua_dostring(GetLuaState(), wx2lua(script)); + M_WXLSTATEDATA->m_is_running = false; + + // if it's been stopped then don't send this error message, already sent stopped one + if (!M_WXLSTATEDATA->m_debug_hook_break) + (void)CheckRunError(ret_val); + + M_WXLSTATEDATA->m_debug_hook_break = false; + return ret_val; + } + + int wxLuaState::RunBuffer(const unsigned char buf[], size_t size, const wxString &name) + { + wxCHECK_MSG(Ok(), -1, wxT("Invalid wxLuaState")); + wxCHECK_MSG(!M_WXLSTATEDATA->m_is_running, -1, wxT("lua interpreter is already running")); + M_WXLSTATEDATA->m_debug_hook_break = false; + + M_WXLSTATEDATA->m_is_running = true; + //int ret_val = luaL_loadbuffer(m_lua_State, (const char*)buf, size, wx2lua(name)); + int ret_val = lua_dobuffer(GetLuaState(), (const char*)buf, size, wx2lua(name)); + M_WXLSTATEDATA->m_is_running = false; + + if (!M_WXLSTATEDATA->m_debug_hook_break) + (void)CheckRunError(ret_val); + + M_WXLSTATEDATA->m_debug_hook_break = false; + return ret_val; + } + + bool wxLuaState::IsRunning() const + { + wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_is_running; + } + + void wxLuaState::DebugHookBreak(const wxString &msg) + { + wxCHECK_RET(Ok(), wxT("Inval")); + wxCHECK_RET(M_WXLSTATEDATA->m_is_running, wxT("lua interpreter not running")); + + // Lua likes to be stopped within the debug hook, you get funny wxYield + // recursion asserts if you call terror() within another wxYield, ie. from a gui button + + M_WXLSTATEDATA->m_debug_hook_break_msg = msg; + M_WXLSTATEDATA->m_debug_hook_break = true; + SetLuaDebugHook(1, -1, false); + M_WXLSTATEDATA->m_is_running = false; + } + + bool wxLuaState::GetDebugHookBreak() const + { + wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_debug_hook_break; + } + wxString wxLuaState::GetDebugHookBreakMessage() const + { + wxCHECK_MSG(Ok(), wxEmptyString, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_debug_hook_break_msg; + } + + // ---------------------------------------------------------------------------- + + void wxLuaState::SetLuaDebugHook(int count, int yield, bool send_debug_evt, int hook) + { + wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); + + M_WXLSTATEDATA->m_lua_debug_hook_count = count; + M_WXLSTATEDATA->m_lua_debug_hook_yield = yield; + M_WXLSTATEDATA->m_lua_debug_hook_send_evt = send_debug_evt; + M_WXLSTATEDATA->m_lua_debug_hook = hook; + + if (count > 0) + { + // These are the various hooks you can install + //LUA_MASKCALL, LUA_MASKRET, LUA_MASKLINE, and LUA_MASKCOUNT + //lua_sethook(m_lua_State, LuaDebugHook, LUA_MASKCALL | LUA_MASKLINE | LUA_MASKRET, 0); + lua_sethook(GetLuaState(), LuaDebugHook, hook, count); + } + else + lua_sethook(GetLuaState(), LuaDebugHook, 0, 0); // disable hook + } + + int wxLuaState::GetLuaDebugHookCount() const + { + wxCHECK_MSG(Ok(), 0, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_lua_debug_hook_count; + } + int wxLuaState::GetLuaDebugHookYield() const + { + wxCHECK_MSG(Ok(), 0, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_lua_debug_hook_yield; + } + bool wxLuaState::GetLuaDebugHookSendEvt() const + { + wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_lua_debug_hook_send_evt; + } + int wxLuaState::GetLuaDebugHook() const + { + wxCHECK_MSG(Ok(), 0, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_lua_debug_hook; + } + + unsigned long wxLuaState::GetLastLuaDebugHookTime() const + { + wxCHECK_MSG(Ok(), 0, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_last_debug_hook_time; + } + void wxLuaState::SetLastLuaDebugHookTime(unsigned long t) + { + wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); + M_WXLSTATEDATA->m_last_debug_hook_time = t; + } + + // ---------------------------------------------------------------------------- + + void wxLuaState::RegisterFunction(lua_CFunction func, const wxString &funcName) + { + wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); + lua_register( GetLuaState(), wx2lua(funcName), func ); + } + void wxLuaState::RegisterBindings(bool registerTypes) { *************** *** 1613,1625 **** } - #if 1 // defined(LUA_EMBEDDED) // FIXME - who gets the error message? - #define LUAERROR_OUTPUT(msg) \ - wxLuaInterpreter *luaInterpreter = wxFindLuaInterpreter(L); \ - luaInterpreter->DisplayError(msg); - #else - #define LUAERROR_OUTPUT(msg) \ - wxLuaHandler::GetHandler().DisplayError(msg); - #endif - int wxLuaState::LuaError(int status, int top) { --- 2137,2140 ---- *************** *** 1649,1653 **** errorMsg += wxT("\n"); ! LUAERROR_OUTPUT(errorMsg) lua_settop(L, top); status = 0; --- 2164,2168 ---- errorMsg += wxT("\n"); ! DisplayError(errorMsg); lua_settop(L, top); status = 0; Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** wxlbind.cpp 16 Dec 2005 05:12:26 -0000 1.9 --- wxlbind.cpp 22 Dec 2005 18:42:35 -0000 1.10 *************** *** 251,257 **** } ! void wxLuaBinding::UnRegisterBinding(const wxLuaState& wxlState) { - lua_State *L = wxlState.GetLuaState(); lua_pushstring(L, wx2lua(nameSpace)); lua_pushnil(L); --- 251,256 ---- } ! void wxLuaBinding::UnRegisterBinding(lua_State* L) { lua_pushstring(L, wx2lua(nameSpace)); lua_pushnil(L); Index: wxlintrp.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlintrp.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** wxlintrp.cpp 18 Dec 2005 18:04:38 -0000 1.10 --- wxlintrp.cpp 22 Dec 2005 18:42:35 -0000 1.11 *************** *** 30,356 **** #include "wxlua/include/internal.h" - extern bool wxLuaCleanupWindows(wxList *list, bool only_check); // in wxlstate.cpp - - wxHashMapLuaInterpreter s_wxHashMapLuaInterpreter; - - // add lua_States created from lua's coroutines - #define WXLUA_THREAD_INTERCEPTION - - extern "C" - { - #include "lua/include/lua.h" - #include "lua/include/lauxlib.h" - #include "lua/include/lualib.h" - - #ifdef WXLUA_THREAD_INTERCEPTION - // See lua/src/lstate.c for added hook into luaE_newthread() - #include "lua/include/luathread.h" - #endif //WXLUA_THREAD_INTERCEPTION - } - - #ifdef WXLUA_THREAD_INTERCEPTION - - // Hook into function calls to luaE_newthread (calls from coroutine.create/wrap) - // and add the new lua_State as a child sharing it's wxLuaStateVariables - void wxLuaInterpreter_newthread_handler(lua_State *L, lua_State *L1) - { - // L is the original lua_State, L1 new child thread - wxLuaState wxlState(L); - wxCHECK_RET(wxlState.Ok(), wxT("Invalid wxLuaState")); - - // put into the hashmap - wxLuaStateRefData::s_wxHashMapLuaStateRefData[L1] = wxlState.GetLuaStateRefData(); - - // Stick us into the lua_State - push key, value - lua_pushstring( L1, "__wxLuaStateRefData" ); - lua_pushlightuserdata( L1, (void*)wxlState.GetRefData() ); - // set the value - lua_settable( L1, LUA_REGISTRYINDEX ); - - wxLuaInterpreter *L_interp = wxFindLuaInterpreter(L); - wxPrintf(wxT("wxLuaInterpreter_newthread_handler new lua_State from a thread L=%ld L1=%ld\n"), (long)L, (long)L1); - - if (L_interp != NULL) - { - s_wxHashMapLuaInterpreter[L1] = L_interp; - - // Stick us into the lua interpreter - push key, value - lua_pushstring( L1, "__wxLuaInterpreter" ); - lua_pushlightuserdata( L1, L_interp); - // set the value - lua_settable( L1, LUA_REGISTRYINDEX ); - } - } - - // Hook into function calls to luaE_freethread (calls from coroutine.create/wrap) - // and remove the child lua_State - void wxLuaInterpreter_freethread_handler(lua_State *WXUNUSED(L), lua_State *L1) - { - // L is the original lua_State, L1 child thread, don't remove L - //wxPrintf(wxT("wxLuaInterpreter_freethread_handler lua_State from a thread L=%ld L1=%ld\n"), (long)L, (long)L1); fflush(stdout); - wxLuaStateRefData::s_wxHashMapLuaStateRefData.erase(L1); - s_wxHashMapLuaInterpreter.erase(L1); - } - - static void setupthreadhandlers() - { - if (luaX_getnewthreadhandler() == NULL) - luaX_setnewthreadhandler( wxLuaInterpreter_newthread_handler ); - if (luaX_getfreethreadhandler() == NULL) - luaX_setfreethreadhandler( wxLuaInterpreter_freethread_handler ); - } - - #endif //WXLUA_THREAD_INTERCEPTION - - // ---------------------------------------------------------------------------- - // Extra wxLua helpers that use the lua_State to find owner wxLuaInterpreter - // ---------------------------------------------------------------------------- - - wxLuaInterpreter *wxFindLuaInterpreter(lua_State *L) - { - int top = lua_gettop( L ); - - // try to get the state - lua_pushstring( L, "__wxLuaInterpreter" ); - lua_gettable( L, LUA_REGISTRYINDEX ); - - // if nothing was returned or it wasn't a ptr, abort - if ( top == lua_gettop(L) || !lua_islightuserdata(L, -1) ) - { - lua_settop( L, top ); - return NULL; - } - // get the pointer, clean the stack, return - wxLuaInterpreter* lI = (wxLuaInterpreter*)lua_touserdata( L, -1 ); - lua_settop( L, top ); - return lI; - } - // ---------------------------------------------------------------------------- // lua hooks and function replacements for embedding into wxWidgets // ---------------------------------------------------------------------------- - int LuaPrint( lua_State *L ) - { - wxString msg; - int i, n = lua_gettop(L); - - // figure out the types here in c++ land - lua_getglobal(L, "tostring"); - for (i = 1; i <= n; i++) - { - if (i > 1) msg.Append(wxT(", ")); - - if (lua_isstring(L, i)) - msg += lua2wx(lua_tostring(L, i)); - else if (lua_isnumber(L, i)) - msg += wxString::Format(wxT("%lf"), lua_tonumber(L, i)); - else if (lua_iscfunction(L, i)) - msg += wxString::Format(wxT("C function %ld"), (long int)lua_tocfunction(L, i)); - else if (lua_isuserdata(L, i)) - msg += wxString::Format(wxT("User data %ld"), (long int)lua_touserdata(L, i)); - else if (lua_isboolean(L, i)) - msg += lua_toboolean(L,i) ? wxT("true") : wxT("false"); - else if (lua_isnil(L,i)) - msg += wxT("nil"); - else if (lua_isnone(L,i)) - msg += wxT("unknown"); - else - msg += wxString::Format(wxT("%s:%p"), lua_typename(L,lua_type(L,i)), lua_topointer(L,i)); - } - - if (!msg.IsEmpty()) - { - wxLuaInterpreter *luaInterpreter = wxFindLuaInterpreter(L); - - if (luaInterpreter) - { - wxLuaEvent event(wxEVT_LUA_CONSOLE, luaInterpreter->GetId(), luaInterpreter); - event.SetString(msg); - luaInterpreter->SendEvent( event ); - } - } - - return 0; // no items put onto stack - } - - // copied from the Lua 5.0.1 debug library - #define LEVELS1 12 /* size of the first part of the stack */ - #define LEVELS2 10 /* size of the second part of the stack */ - - // copied from the Lua 5.0.1 debug library - int LuaTraceback(lua_State *L) - { - int level = 1; // skip level 0 (it's this function) - int firstpart = 1; // still before eventual `...' - lua_Debug ar; - if (lua_gettop(L) == 0) - lua_pushliteral(L, ""); - else if (!lua_isstring(L, 1)) // no string message - return 1; - else - lua_pushliteral(L, "\n"); - - lua_pushliteral(L, "stack traceback:"); - while (lua_getstack(L, level++, &ar)) - { - if (level > LEVELS1 && firstpart) - { - // no more than `LEVELS2' more levels? - if (!lua_getstack(L, level+LEVELS2, &ar)) - level--; // keep going - else - { - lua_pushliteral(L, "\n\t..."); // too many levels - while (lua_getstack(L, level+LEVELS2, &ar)) // find last levels - level++; - } - firstpart = 0; - continue; - } - lua_pushliteral(L, "\n\t"); - lua_getinfo(L, "Snl", &ar); - lua_pushfstring(L, "%s:", ar.short_src); - if (ar.currentline > 0) - lua_pushfstring(L, "%d:", ar.currentline); - switch (*ar.namewhat) - { - case 'g': // global - case 'l': // local - case 'f': // field - case 'm': // method - lua_pushfstring(L, " in function `%s'", ar.name); - break; - default: { - if (*ar.what == 'm') // main? - lua_pushfstring(L, " in main chunk"); - else if (*ar.what == 'C' || *ar.what == 't') - lua_pushliteral(L, " ?"); // C function or tail call - else - lua_pushfstring(L, " in function <%s:%d>", - ar.short_src, ar.linedefined); - } - } - lua_concat(L, lua_gettop(L)); - } - lua_concat(L, lua_gettop(L)); - return 1; - } - - int LuaAlert( lua_State *L ) - { - wxLuaInterpreter *luaInterpreter = wxFindLuaInterpreter(L); - - if (luaInterpreter) - { - wxString msg = lua2wx(lua_tostring(L, 1)); - - wxLuaEvent event(wxEVT_LUA_ERROR, luaInterpreter->GetId(), luaInterpreter); - event.SetString(msg); - - long line = -1; - wxString lineStr = msg; - - // Why can't I fill a lua_Debug here? Try to get the line number - // by parsing the error message that looks like this, 1 is linenumber - // [string "a = 1("]:1: unexpected symbol near `<eof>' - while(!lineStr.IsEmpty()) - { - lineStr = lineStr.AfterFirst(wxT(']')); - if ((lineStr.Length() > 0) && (lineStr.GetChar(0) == wxT(':'))) - { - lineStr = lineStr.AfterFirst(wxT(':')); - if (lineStr.IsEmpty() || lineStr.BeforeFirst(wxT(':')).ToLong(&line)) - break; - } - } - - event.SetInt((int)line); - luaInterpreter->SendEvent( event ); - } - - return 0; - } - - void LuaDebugHook(lua_State *L, lua_Debug *LDebug) - { - wxLuaInterpreter *luaInterpreter = wxFindLuaInterpreter(L); - - // during program shutdown this can be called - ignore it - if (luaInterpreter == NULL) - return; - - // FIXME - for select event types we don't want to do anything - wxEventType evtType = luaInterpreter->GetwxLuaState().GetInEventType(); - if ((evtType != wxEVT_NULL)) - //(evtType == wxEVT_IDLE) && (evtType == wxEVT_PAINT) && - //(evtType == wxEVT_DESTROY) && (evtType == wxEVT_CLOSE_WINDOW)) - return; - - // they want to break the program, restore old debug hook, then error out - if (luaInterpreter->GetBreak()) - { - // restore hook to previous state see wxLuaInterpreter::Break() - luaInterpreter->SetLuaDebugHook(luaInterpreter->GetLuaDebugHookCount(), - luaInterpreter->GetLuaDebugHookYield(), - luaInterpreter->GetLuaDebugHookSendEvt(), - luaInterpreter->GetLuaDebugHook()); - - terror(L, wx2lua(luaInterpreter->GetBreakMessage())); - return; - } - - if (luaInterpreter->GetLuaDebugHookSendEvt()) - { - int ret = 0; - ret = lua_getinfo(L, "l", LDebug); // line (ldebug.currentline) - - wxLuaEvent event(wxEVT_LUA_DEBUG_HOOK, luaInterpreter->GetId(), luaInterpreter); - event.m_lua_Debug = LDebug; - event.SetInt(LDebug->currentline); - luaInterpreter->SendEvent( event ); - if (event.m_stop_interpreter) - terror(L, "Interpreter stopped"); - } - - // Try to yield *after* sending event to allow C++ gui update - if (luaInterpreter->GetLuaDebugHookYield() > 0) - { - // yield based on number of ms passed NOT every hook event - unsigned long last_time = luaInterpreter->GetLastLuaDebugHookTime(); - unsigned long cur_time = wxGetLocalTimeMillis().GetLo(); - - if ((cur_time > last_time + luaInterpreter->GetLuaDebugHookYield()) || - (cur_time < last_time)) // wrapped - { - luaInterpreter->SetLastLuaDebugHookTime( cur_time ); - - bool painting = false; - - #if WXWIN_COMPATIBILITY_24 || !wxCHECK_VERSION(2, 5, 0) - wxNode* node; - #else - wxHashTable::Node* node; - #endif - - // FIXME - wxGTK crashes if wxYield[IfNeeded] is called within a paint handler? I think - luaInterpreter->GetwxLuaState().GetLuaStateRefData()->m_pTrackedList->BeginFind(); - node = luaInterpreter->GetwxLuaState().GetLuaStateRefData()->m_pTrackedList->Next(); - while (node) - { - if (wxDynamicCast(node->GetData(), wxPaintDC)) - { - painting = true; - break; - } - node = luaInterpreter->GetwxLuaState().GetLuaStateRefData()->m_pTrackedList->Next(); - } - - if (!painting) - wxYieldIfNeeded(); - } - } - } - //----------------------------------------------------------------------------- // wxLuaEvent --- 30,37 ---- *************** *** 366,630 **** DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_SHUTDOWN) ! wxLuaEvent::wxLuaEvent(wxEventType commandType, wxWindowID id, wxLuaInterpreter *interpreter) : wxNotifyEvent(commandType, id) { ! m_luaInterpreter = interpreter; m_lua_Debug = NULL; m_stop_interpreter = false; } - - //----------------------------------------------------------------------------- - // wxLuaInterpreter - //----------------------------------------------------------------------------- - IMPLEMENT_ABSTRACT_CLASS(wxLuaInterpreter, wxObject) - - wxLuaInterpreter::wxLuaInterpreter() : wxObject() - { - Init(); - } - wxLuaInterpreter::wxLuaInterpreter(wxEvtHandler *handler, wxWindowID id) : wxObject() - { - Init(); - Create(handler, id); - } - - void wxLuaInterpreter::Init() - { - #ifdef WXLUA_THREAD_INTERCEPTION - setupthreadhandlers(); - #endif //WXLUA_THREAD_INTERCEPTION - - m_is_running = false; - m_user_break = false; - - m_last_debug_hook_time = wxGetLocalTimeMillis().GetLo(); - - m_id = wxID_ANY; - m_evtHandler = NULL; - - m_lua_debug_hook_count = 100; - m_lua_debug_hook_yield = 50; - m_lua_debug_hook_send_evt = false; - m_lua_debug_hook = 0; - } - - bool wxLuaInterpreter::Create(lua_State *inL, wxEvtHandler *handler, wxWindowID id) - { - if (Ok() && !Destroy(true)) - return false; - - m_evtHandler = handler; - m_id = id; - - // create a lua instance - if (inL != NULL) - { - m_wxlState = wxLuaState(inL, WXLUASTATE_SETSTATE); - } - else - { - m_wxlState = wxLuaState(true); - } - - s_wxHashMapLuaInterpreter[m_wxlState.GetLuaState()] = this; - - // Stick us into the lua interpreter - push key, value - lua_pushstring( m_wxlState.GetLuaState(), "__wxLuaInterpreter" ); - lua_pushlightuserdata( m_wxlState.GetLuaState(), (void*)this ); - // set the value - lua_settable( m_wxlState.GetLuaState(), LUA_REGISTRYINDEX ); - - // register handlers to send events - if (inL == NULL) - { - RegisterFunction(LuaPrint, wxT("print")); - RegisterFunction(LuaAlert, wxT("_ALERT")); - RegisterFunction(LuaTraceback, wxT("_TRACEBACK")); - } - - // alert people that we've been created so they can finish setting us up - wxLuaEvent event(wxEVT_LUA_CREATION, GetId(), this); - SendEvent( event ); - - return true; - } - - wxLuaInterpreter::~wxLuaInterpreter() - { - if (Ok()) - { - m_evtHandler = NULL; // no events here, the handler may already be gone - Destroy(true); - } - } - - void wxLuaInterpreter::GarbageCollectWindows(bool closeWindows) - { - // remove deleted windows - if (Ok()) m_wxlState.GarbageCollectWindows(closeWindows); - } - - bool wxLuaInterpreter::Destroy(bool force) - { - wxCHECK_MSG(Ok(), false, wxT("Interpreter not created")); - wxCHECK_MSG(!m_is_running, false, wxT("Interpreter still running, can't destroy")); - - // remember pointer value, even though CloseLuaState actually frees it - lua_State* L = m_wxlState.GetLuaState(); - - if (!m_wxlState.CloseLuaState(force)) - return false; - - s_wxHashMapLuaInterpreter.erase(L); - m_evtHandler = NULL; - - return true; - } - - bool wxLuaInterpreter::Ok() const - { - return m_wxlState.Ok(); - } - - void wxLuaInterpreter::SetEventHandler(wxEvtHandler *evtHandler) - { - m_evtHandler = evtHandler; - } - - int wxLuaInterpreter::RunFile(const wxString &filename) - { - wxCHECK_MSG(Ok(), -1, wxT("lua interpreter not created")); - wxCHECK_MSG(!m_is_running, -1, wxT("lua interpreter is already running")); - m_user_break = false; - - m_is_running = true; - // int ret_val = lua_dofile(m_lua_State, wx2lua(filename)); - int ret_val = LuaDoFile(m_wxlState.GetLuaState(), filename); // FIXME use LuaDoFile in RunFile ? - m_is_running = false; - if (!m_user_break) - (void)CheckRunError(ret_val); - - m_user_break = false; - return ret_val; - } - - int wxLuaInterpreter::RunString(const wxString &script, const wxString& WXUNUSED(name)) - { - wxCHECK_MSG(Ok(), -1, wxT("lua interpreter not created")); - wxCHECK_MSG(!m_is_running, -1, wxT("lua interpreter is already running")); - m_user_break = false; - - m_is_running = true; - //int ret_val = luaL_loadbuffer(m_lua_State, wx2lua(script), script.Len(), wx2lua(name)); - int ret_val = lua_dostring(m_wxlState.GetLuaState(), wx2lua(script)); - m_is_running = false; - - // if it's been stopped then don't send this error message, already sent stopped one - if (!m_user_break) - (void)CheckRunError(ret_val); - - m_user_break = false; - return ret_val; - } - - int wxLuaInterpreter::RunBuffer(const unsigned char buf[], size_t size, const wxString &name) - { - wxCHECK_MSG(Ok(), -1, wxT("lua interpreter not created")); - wxCHECK_MSG(!m_is_running, -1, wxT("lua interpreter is already running")); - m_user_break = false; - - m_is_running = true; - //int ret_val = luaL_loadbuffer(m_lua_State, (const char*)buf, size, wx2lua(name)); - int ret_val = lua_dobuffer(GetLuaState(), (const char*)buf, size, wx2lua(name)); - m_is_running = false; - - if (!m_user_break) - (void)CheckRunError(ret_val); - - m_user_break = false; - return ret_val; - } - - void wxLuaInterpreter::Break(const wxString &msg) - { - wxCHECK_RET(Ok(), wxT("lua interpreter not created")); - wxCHECK_RET(m_is_running, wxT("lua interpreter not running")); - - // Lua likes to be stopped within the debug hook, you get funny wxYield - // recursion asserts if you call terror() within another wxYield, ie. from a gui button - - m_break_msg = msg; - m_user_break = true; - SetLuaDebugHook(1, -1, false); - m_is_running = false; - } - - void wxLuaInterpreter::SetLuaDebugHook(int count, int yield, bool send_debug_evt, int hook) - { - wxCHECK_RET(Ok(), wxT("lua interpreter not created")); - - m_lua_debug_hook_count = count; - m_lua_debug_hook_yield = yield; - m_lua_debug_hook_send_evt = send_debug_evt; - m_lua_debug_hook = hook; - - if (count > 0) - { - // These are the various hooks you can install - //LUA_MASKCALL, LUA_MASKRET, LUA_MASKLINE, and LUA_MASKCOUNT - //lua_sethook(m_lua_State, LuaDebugHook, LUA_MASKCALL | LUA_MASKLINE | LUA_MASKRET, 0); - lua_sethook(m_wxlState.GetLuaState(), LuaDebugHook, hook, count); - } - else - lua_sethook(GetLuaState(), LuaDebugHook, 0, 0); // disable hook - } - - unsigned long wxLuaInterpreter::GetLastLuaDebugHookTime() const - { - return m_last_debug_hook_time; - } - void wxLuaInterpreter::SetLastLuaDebugHookTime(unsigned long t) - { - m_last_debug_hook_time = t; - } - - lua_State *wxLuaInterpreter::GetLuaState() const - { - return m_wxlState.GetLuaState(); - } - - void wxLuaInterpreter::RegisterFunction(lua_CFunction func, const wxString &funcName) - { - wxCHECK_RET(Ok(), wxT("lua interpreter not created")); - lua_register( GetLuaState(), wx2lua(funcName), func ); - } - - void wxLuaInterpreter::DisplayError( const wxString &errorMsg ) - { - wxLuaEvent event(wxEVT_LUA_ERROR, GetId(), this); - event.SetString(errorMsg); - SendEvent( event ); - } - - bool wxLuaInterpreter::CheckRunError(int rc) - { - wxString msg; - if (!wxLuaState::CheckRunError(rc, &msg)) - { - wxLuaEvent event(wxEVT_LUA_ERROR, GetId(), this); - event.SetString(msg); - event.SetInt(-1); // don't know what line the error occured - SendEvent( event ); - return false; - } - return true; - } - - void wxLuaInterpreter::SendEvent( wxLuaEvent &event ) const - { - if (GetEventHandler()) - { - event.SetEventObject( (wxObject*)this ); - GetEventHandler()->ProcessEvent(event); - } - } --- 47,55 ---- DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_SHUTDOWN) ! wxLuaEvent::wxLuaEvent(wxEventType commandType, wxWindowID id, const wxLuaState& wxlState) : wxNotifyEvent(commandType, id) { ! m_wxlState = wxlState; m_lua_Debug = NULL; m_stop_interpreter = false; } |
From: John L. <jr...@us...> - 2005-12-22 18:42:47
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19516/wxLua/docs Added Files: readme.txt Log Message: Removed the wxLuaInterpreter - all functions transferred to the wxLuaState wxLuaInterpreter is typedefed to wxLuaState temporarily --- NEW FILE: readme.txt --- wxLua readme.txt ------------------------------------------------------------------------------- wxLua is a lua scripting language wrapper around the wxWidgets cross-platform GUI library. It consists of an executable for running standalone wxLua scripts and a library for extending C++ programs with a fast, small, fully embeddable scripting language. References: http://wxlua.sourceforge.net http://www.lua.org http://www.wxwidgets.org ------------------------------------------------------------------------------- The wxLua "big picture" Lua is an ANSI C compatible scripting language that can load and run interpreted scripts as either files or strings. The language itself is very dynamic and contains a limited number of data types, mainly numbers, strings, and tables. Perhaps the most powerful feature of the lua language is that the tables can be used as either arrays or as hashtables that can contain numbers, strings, and or subtables. wxLua adds to this small and elegant language the power of the wxWidgets cross-platform GUI library. This incudes the ability to create complex user interface dialogs, image manipulation, file manipulation, sockets, displaying HTML, and printing. ------------------------------------------------------------------------------- Brief description of the wxLua internals The core of wxLua is based upon a ref counted class called wxLuaState derived from the wxWidget's wxObject class. The wxLuaState class contains as a member the 'C' lua_State which is the heart of lua. Since the class is ref counted, it should be passed as const wxLuaState& and can be used in much the same way as a wxBitmap, wxPen, or any of the other wxObject derived classes that make use of it's ref counting. The wxLuaState contains all of the lua 'C' functions, such as lua_gettop(lua_State* L), but as member functions named lua_GetTop() which use the internal lua_State and check for it's validity before use when compiled in debug mode. The functions are capitalized to make them easier to find in an editor. When the wxLuaState is Ok(), it means that the wxLuaState has it's ref data and the lua_State is created. |
From: John L. <jr...@us...> - 2005-12-22 18:42:45
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19516/wxLua/modules/wxlua/include Modified Files: wxlbind.h wxldefs.h wxlintrp.h wxlstate.h Log Message: Removed the wxLuaInterpreter - all functions transferred to the wxLuaState wxLuaInterpreter is typedefed to wxLuaState temporarily Index: wxlintrp.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlintrp.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxlintrp.h 28 Nov 2005 01:28:54 -0000 1.4 --- wxlintrp.h 22 Dec 2005 18:42:35 -0000 1.5 *************** *** 30,46 **** class WXDLLEXPORT wxEvtHandler; - class WXDLLIMPEXP_WXLUA wxLuaEvent; - class WXDLLIMPEXP_WXLUA wxLuaInterpreter; - - #include "wx/hashmap.h" - WX_DECLARE_VOIDPTR_HASH_MAP( wxLuaInterpreter *, wxHashMapLuaInterpreter ); - extern wxHashMapLuaInterpreter s_wxHashMapLuaInterpreter; - - //----------------------------------------------------------------------------- - // Extra wxLua helpers that use the lua_State to find owner wxLuaInterpreter - //----------------------------------------------------------------------------- - - extern wxLuaInterpreter *wxFindLuaInterpreter(lua_State *L); //----------------------------------------------------------------------------- --- 30,34 ---- *************** *** 51,165 **** //----------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUA wxLuaInterpreter : public wxObject ! { ! public: ! // default constructor - must call Create in order to use ! wxLuaInterpreter(); ! // Create a wxLua instance, handler and id can be null/wxID_ANY for don't care ! wxLuaInterpreter(wxEvtHandler *handler, wxWindowID id = wxID_ANY); ! wxLuaInterpreter(lua_State *L, wxEvtHandler *handler, wxWindowID id = wxID_ANY); ! ! virtual ~wxLuaInterpreter(); ! ! // (re)Create a new wxLua instance, handler and id can be null/wxID_ANY for don't care ! // don't forget to ShutDown the last one first (if you want to) ! bool Create(lua_State *L, wxEvtHandler *handler=NULL, wxWindowID id = wxID_ANY); ! bool Create(wxEvtHandler *handler=NULL, wxWindowID id = wxID_ANY) ! { return Create(NULL, handler, id); } ! // destroy and cleanup the interpreter, returns sucess ! // if 'force' then make sure all wxWindows are destroyed. ! bool Destroy(bool force = true); ! ! // cleanup window list ! void GarbageCollectWindows(bool closeWindows = false); ! ! // has the interpreter been sucessfully created ! bool Ok() const; ! ! // Set the event handler that the events will be sent to, can be null ! void SetEventHandler(wxEvtHandler *evtHandler); ! wxEvtHandler *GetEventHandler() const { return m_evtHandler; } ! ! // Get/Set the id that the events will be sent with ! void SetId(int id) { m_id = id; } ! int GetId() const { return m_id; } ! ! // Run a lua file ! int RunFile(const wxString &fileName); ! // Run a string that contains lua code ! int RunString(const wxString &script, const wxString& name = wxEmptyString); ! // Run a char array #include(d) from bin2c compilation ! int RunBuffer(const unsigned char buf[], size_t size, const wxString &name = wxT("= lua")); - // Is a program running now - bool IsRunning() const { return m_is_running; } - // Break a currently running lua program - void Break(const wxString &message = wxT("Interpreter stopped")); - // has Break() been called - bool GetBreak() const { return m_user_break; } - wxString GetBreakMessage() const { return m_break_msg; } ! // Have lua run an internal hook function with this mask ! // hook = LUA_MASKCALL | LUA_MASKRET | LUA_MASKLINE | LUA_MASKCOUNT ! // Every count hook mask a wxEVT_LUA_DEBUG_HOOK event is sent if send_debug_evt ! // if yield > 0 then wxYield is called every yield milliseconds ! // I don't know what resonable values are ! // turn the hook off with count < 1 ! void SetLuaDebugHook(int count = 1000, ! int yield = 50, ! bool send_debug_evt = false, ! int hook = LUA_MASKCOUNT); ! int GetLuaDebugHookCount() const { return m_lua_debug_hook_count; } ! int GetLuaDebugHookYield() const { return m_lua_debug_hook_yield; } ! bool GetLuaDebugHookSendEvt() const { return m_lua_debug_hook_send_evt; } ! int GetLuaDebugHook() const { return m_lua_debug_hook; } ! ! // registers a new function for Lua ! void RegisterFunction(lua_CFunction func, const wxString &funcName); - // Get a pointer to the lua_State that "is" lua - lua_State *GetLuaState() const; - wxLuaState GetwxLuaState() const { return m_wxlState; } // ----------------------------------------------------------------------- // implementation ! // generic function to generate a wxEVT_LUA_ERROR with the string message ! void DisplayError( const wxString &errorMsg ); ! ! // checks return val of 'lua_load' and `lua_pcall', if error send wxEVT_LUA_ERROR ! bool CheckRunError(int rc); ! ! // internally used so debug hook events are sent no more often than yield time ! unsigned long GetLastLuaDebugHookTime() const; ! void SetLastLuaDebugHookTime(unsigned long t); ! ! void SendEvent( wxLuaEvent &event ) const; ! ! // operators ! operator lua_State*() { return GetLuaState(); } ! ! protected: ! bool m_is_running; ! ! unsigned long m_last_debug_hook_time; ! ! bool m_user_break; ! wxString m_break_msg; ! ! wxLuaState m_wxlState; ! ! int m_lua_debug_hook_count; ! int m_lua_debug_hook_yield; ! bool m_lua_debug_hook_send_evt; ! int m_lua_debug_hook; ! ! wxEvtHandler *m_evtHandler; ! int m_id; ! ! private : ! void Init(); ! DECLARE_ABSTRACT_CLASS(wxLuaInterpreter) ! }; //----------------------------------------------------------------------------- --- 39,52 ---- //----------------------------------------------------------------------------- ! typedef class wxLuaState wxLuaInterpreter; ! /* // ----------------------------------------------------------------------- // implementation ! */ //----------------------------------------------------------------------------- *************** *** 171,180 **** public: wxLuaEvent(wxEventType commandType = wxEVT_NULL, wxWindowID id = wxID_ANY, ! wxLuaInterpreter *intrepreter=NULL); wxLuaEvent( const wxLuaEvent &event ) : wxNotifyEvent(event) { m_stop_interpreter = event.m_stop_interpreter; ! m_luaInterpreter = event.m_luaInterpreter; m_lua_Debug = event.m_lua_Debug; } --- 58,67 ---- public: wxLuaEvent(wxEventType commandType = wxEVT_NULL, wxWindowID id = wxID_ANY, ! const wxLuaState& wxlState = wxNullLuaState); wxLuaEvent( const wxLuaEvent &event ) : wxNotifyEvent(event) { m_stop_interpreter = event.m_stop_interpreter; ! m_wxlState = event.m_wxlState; m_lua_Debug = event.m_lua_Debug; } *************** *** 187,194 **** int GetLineNum() const { return m_commandInt; } ! wxLuaInterpreter *GetLuaInterpreter() const { return m_luaInterpreter; } ! void SetLuaInterpreter(wxLuaInterpreter *interp) { m_luaInterpreter = interp; } ! lua_State *GetLuaState() const { return m_luaInterpreter ? m_luaInterpreter->GetLuaState() : NULL; } // non null only for EVT_LUA_DEBUG_HOOK lua_Debug *GetLuaDebug() const { return m_lua_Debug; } --- 74,81 ---- int GetLineNum() const { return m_commandInt; } ! wxLuaState GetwxLuaState() const { return m_wxlState; } ! void SetwxLuaState(const wxLuaState& wxlState) { m_wxlState = wxlState; } ! lua_State *GetLuaState() const { return m_wxlState.GetLuaState(); } // non null only for EVT_LUA_DEBUG_HOOK lua_Debug *GetLuaDebug() const { return m_lua_Debug; } *************** *** 198,202 **** bool m_stop_interpreter; ! wxLuaInterpreter *m_luaInterpreter; lua_Debug *m_lua_Debug; }; --- 85,89 ---- bool m_stop_interpreter; ! wxLuaState m_wxlState; lua_Debug *m_lua_Debug; }; Index: wxldefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxldefs.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxldefs.h 26 Nov 2005 08:46:57 -0000 1.2 --- wxldefs.h 22 Dec 2005 18:42:34 -0000 1.3 *************** *** 50,54 **** // ---------------------------------------------------------------------------- - class WXDLLIMPEXP_WXLUA wxLuaInterpreter; class WXDLLIMPEXP_WXLUA wxLuaState; --- 50,53 ---- Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wxlbind.h 12 Dec 2005 05:16:31 -0000 1.7 --- wxlbind.h 22 Dec 2005 18:42:34 -0000 1.8 *************** *** 136,140 **** virtual void RegisterBinding(const wxLuaState& wxlState, bool registerTypes); // Unbinds C Functions/Defines/Object/Events by clearing Lua Table ! virtual void UnRegisterBinding(const wxLuaState& wxlState); size_t GetLuaClassCount() const { return m_classCount; } --- 136,140 ---- virtual void RegisterBinding(const wxLuaState& wxlState, bool registerTypes); // Unbinds C Functions/Defines/Object/Events by clearing Lua Table ! virtual void UnRegisterBinding(lua_State* L); size_t GetLuaClassCount() const { return m_classCount; } Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** wxlstate.h 12 Dec 2005 05:16:31 -0000 1.11 --- wxlstate.h 22 Dec 2005 18:42:35 -0000 1.12 *************** *** 46,49 **** --- 46,50 ---- #include "wxlua/include/wxlbind.h" + class WXDLLIMPEXP_WXLUA wxLuaEvent; class WXDLLIMPEXP_WXLUA wxLuaState; class WXDLLIMPEXP_WXLUA wxLuaStateRefData; *************** *** 148,152 **** // shutting down the interpreter, else they dangle // used in destructor ! wxArrayInt m_usedIndexes; static wxLuaStateRefData* GetLuaStateRefData(lua_State* L); --- 149,167 ---- // shutting down the interpreter, else they dangle // used in destructor ! wxArrayInt m_usedIndexes; // array of the lua tags ! ! bool m_is_running; // is the lua_State running a script ! ! bool m_debug_hook_break; // should the lua_State break for next debug_hook ! wxString m_debug_hook_break_msg; // message when the breaking in the debug_hook ! ! unsigned long m_last_debug_hook_time; // last time the debug hook was called ! int m_lua_debug_hook_count; ! int m_lua_debug_hook_yield; ! bool m_lua_debug_hook_send_evt; ! int m_lua_debug_hook; ! ! wxEvtHandler *m_evtHandler; // event handler to send events to ! wxWindowID m_id; // event id to send the events with static wxLuaStateRefData* GetLuaStateRefData(lua_State* L); *************** *** 176,188 **** public: wxLuaState(bool create = false) : wxObject() { if (create) Create(); } wxLuaState(lua_State* L, wxLuaState_Type type = WXLUASTATE_ATTACH) { Create(L, type); } wxLuaState(const wxLuaState& wxlState) { Create(wxlState); } ! virtual ~wxLuaState() {} // Ref the given wxLuaState void Create(const wxLuaState& wxlState); // Create a new lua_State ! bool Create(); // Create a new lua_State if L = NULL or just attach to the // input lua_State --- 191,206 ---- public: wxLuaState(bool create = false) : wxObject() { if (create) Create(); } + wxLuaState(wxEvtHandler *handler, wxWindowID id = wxID_ANY) : wxObject() { Create(handler, id); } wxLuaState(lua_State* L, wxLuaState_Type type = WXLUASTATE_ATTACH) { Create(L, type); } wxLuaState(const wxLuaState& wxlState) { Create(wxlState); } ! virtual ~wxLuaState() { Destroy(); } // Ref the given wxLuaState void Create(const wxLuaState& wxlState); // Create a new lua_State ! bool Create() { return Create(NULL, wxID_ANY); } ! // Create a new lua_State and send events to this handler ! bool Create(wxEvtHandler *handler, wxWindowID id = wxID_ANY); // Create a new lua_State if L = NULL or just attach to the // input lua_State *************** *** 195,199 **** // Destroy the refed data ! void Destroy() { UnRef(); } // Close the lua_State and if 'force' close all attached wxWindows // if not force then popup dialog to ask if windows should be destroyed. --- 213,217 ---- // Destroy the refed data ! void Destroy(); // Close the lua_State and if 'force' close all attached wxWindows // if not force then popup dialog to ask if windows should be destroyed. *************** *** 209,214 **** --- 227,291 ---- // ----------------------------------------------------------------------- + + // Set the event handler that the events will be sent to, can be null + void SetEventHandler(wxEvtHandler *evtHandler); + wxEvtHandler *GetEventHandler() const; + + // Get/Set the id that the events will be sent with + void SetId(wxWindowID id); + wxWindowID GetId() const; + + // generic function to generate a wxEVT_LUA_ERROR with the string message + void DisplayError( const wxString &errorMsg ); + + // checks return val of 'lua_load' and `lua_pcall', if error send wxEVT_LUA_ERROR + bool CheckRunError(int rc); + + void SendEvent( wxLuaEvent &event ) const; + + // ----------------------------------------------------------------------- + + // Run a lua file + int RunFile(const wxString &fileName); + // Run a string that contains lua code + int RunString(const wxString &script, const wxString& name = wxEmptyString); + // Run a char array #include(d) from bin2c compilation + int RunBuffer(const unsigned char buf[], size_t size, const wxString &name = wxT("= lua")); + + // Is a program running now + bool IsRunning() const; + // Break a currently running lua program + void DebugHookBreak(const wxString &message = wxT("Interpreter stopped")); + wxDEPRECATED( void Break(const wxString &message = wxT("Interpreter stopped")) { DebugHookBreak(message); } ); + // has Break() been called + bool GetDebugHookBreak() const; + wxString GetDebugHookBreakMessage() const; + + unsigned long GetLastLuaDebugHookTime() const; + void SetLastLuaDebugHookTime(unsigned long t); + + // ----------------------------------------------------------------------- + + // Have lua run an internal hook function with this mask + // hook = LUA_MASKCALL | LUA_MASKRET | LUA_MASKLINE | LUA_MASKCOUNT + // Every count hook mask a wxEVT_LUA_DEBUG_HOOK event is sent if send_debug_evt + // if yield > 0 then wxYield is called every yield milliseconds + // I don't know what resonable values are + // turn the hook off with count < 1 + void SetLuaDebugHook(int count = 1000, + int yield = 50, + bool send_debug_evt = false, + int hook = LUA_MASKCOUNT); + int GetLuaDebugHookCount() const; + int GetLuaDebugHookYield() const; + bool GetLuaDebugHookSendEvt() const; + int GetLuaDebugHook() const; + + // ----------------------------------------------------------------------- // Binding functions + // registers a new function for Lua + void RegisterFunction(lua_CFunction func, const wxString &funcName); + void RegisterBindings(bool registerTypes); |
From: John L. <jr...@us...> - 2005-12-22 18:42:45
|
Update of /cvsroot/wxlua/wxLua/apps/wxluaedit/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19516/wxLua/apps/wxluaedit/src Modified Files: wxledit.cpp wxledit.h wxluaedit.cpp Log Message: Removed the wxLuaInterpreter - all functions transferred to the wxLuaState wxLuaInterpreter is typedefed to wxLuaState temporarily Index: wxledit.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxledit.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxledit.h 30 Nov 2005 23:52:30 -0000 1.2 --- wxledit.h 22 Dec 2005 18:42:34 -0000 1.3 *************** *** 16,19 **** --- 16,21 ---- #endif + #include "wxlua/include/wxldefs.h" + class WXDLLEXPORT wxMenu; class WXDLLEXPORT wxKeyEvent; *************** *** 21,26 **** class WXDLLEXPORT wxSplitterWindow; class WXDLLEXPORT wxToolBar; ! class WXDLLEXPORT wxLuaInterpreter; ! class WXDLLEXPORT wxLuaEvent; #include "wx/stedit/stedit.h" --- 23,28 ---- class WXDLLEXPORT wxSplitterWindow; class WXDLLEXPORT wxToolBar; ! class WXDLLIMPEXP_WXLUA wxLuaState; ! class WXDLLIMPEXP_WXLUA wxLuaEvent; #include "wx/stedit/stedit.h" *************** *** 79,97 **** // Get the interpreter this shell uses ! wxLuaInterpreter *GetLuaInterpreter() const { return m_luaInterpreter; } // Set this shell to use another interpreter, will delete it if !is_static // note shell has built in function ! virtual void SetLuaInterpreter(wxLuaInterpreter *interp, bool is_static); // Used to create/recreate local interpreter ! // Can be subclassed to use your own interpreter derived from a wxLuaInterpreter // or a new interpreter can be set in by catching the wxEVT_LUASHELL_wxLUA_CREATION // wxLuaEvent that's sent with this control's id and *this as the GetEventObject // the preferred window ID is in event.GetExtraLong() ! // if you call event.SetLuaInterpreter(new wxLuaInterpreter(...)) // and event.SetInt(1 for static interpreter or 0 for not static) // then SetLuaIntpreter(event.GetLuaInterpreter(), event.GetInt() == 1) // is called. You'll probably want to set the lua interpreter's eventhandler // to this as well as it's win id ! virtual bool RecreateLuaInterpreter(wxEvtHandler *evtHandler, int win_id); // Run a string, append the string if append_text --- 81,99 ---- // Get the interpreter this shell uses ! wxLuaState GetwxLuaState() const { return m_wxlState; } // Set this shell to use another interpreter, will delete it if !is_static // note shell has built in function ! virtual void SetwxLuaState(const wxLuaState& wxlState, bool is_static); // Used to create/recreate local interpreter ! // Can be subclassed to use your own interpreter derived from a wxLuaState // or a new interpreter can be set in by catching the wxEVT_LUASHELL_wxLUA_CREATION // wxLuaEvent that's sent with this control's id and *this as the GetEventObject // the preferred window ID is in event.GetExtraLong() ! // if you call event.SetwxLuaState(wxLuaState(...)) // and event.SetInt(1 for static interpreter or 0 for not static) // then SetLuaIntpreter(event.GetLuaInterpreter(), event.GetInt() == 1) // is called. You'll probably want to set the lua interpreter's eventhandler // to this as well as it's win id ! virtual bool RecreatewxLuaState(wxEvtHandler *evtHandler, int win_id); // Run a string, append the string if append_text *************** *** 103,108 **** protected: ! wxLuaInterpreter *m_luaInterpreter; ! bool m_luaInterpreter_static; private: --- 105,110 ---- protected: ! wxLuaState m_wxlState; ! bool m_wxlstate_static; private: *************** *** 189,207 **** // Get the interpreter this shell uses ! wxLuaInterpreter *GetLuaInterpreter() const { return m_luaInterpreter; } // Set this shell to use another interpreter, will delete it if !is_static // note shell has built in function ! virtual void SetLuaInterpreter(wxLuaInterpreter *interp, bool is_static); // Used to create/recreate local interpreter ! // Can be subclassed to use your own interpreter derived from a wxLuaInterpreter // or a new interpreter can be set in by catching the wxEVT_LUASHELL_wxLUA_CREATION // wxLuaEvent that's sent with this control's id and *this as the GetEventObject // the preferred window ID is in event.GetExtraLong() ! // if you call event.SetLuaInterpreter(new wxLuaInterpreter(...)) // and event.SetInt(1 for static interpreter or 0 for not static) // then SetLuaIntpreter(event.GetLuaInterpreter(), event.GetInt() == 1) // is called. You'll probably want to set the lua interpreter's eventhandler // to this as well as it's win id ! virtual bool RecreateLuaInterpreter(wxEvtHandler *evtHandler, int win_id); virtual void OutputLuaEvent(wxLuaEvent &event, wxLuaShell *outputWin); --- 191,209 ---- // Get the interpreter this shell uses ! wxLuaState GetwxLuaState() const { return m_wxlState; } // Set this shell to use another interpreter, will delete it if !is_static // note shell has built in function ! void SetwxLuaState(const wxLuaState& wxlState, bool is_static); // Used to create/recreate local interpreter ! // Can be subclassed to use your own interpreter derived from a wxLuaState // or a new interpreter can be set in by catching the wxEVT_LUASHELL_wxLUA_CREATION // wxLuaEvent that's sent with this control's id and *this as the GetEventObject // the preferred window ID is in event.GetExtraLong() ! // if you call event.SetLuaInterpreter(wxLuaState(...)) // and event.SetInt(1 for static interpreter or 0 for not static) // then SetLuaIntpreter(event.GetLuaInterpreter(), event.GetInt() == 1) // is called. You'll probably want to set the lua interpreter's eventhandler // to this as well as it's win id ! virtual bool RecreatewxLuaState(wxEvtHandler *evtHandler, int win_id); virtual void OutputLuaEvent(wxLuaEvent &event, wxLuaShell *outputWin); *************** *** 234,239 **** int sizeFlags = wxSIZE_AUTO); ! wxLuaInterpreter *m_luaInterpreter; ! bool m_luaInterpreter_static; wxSplitterWindow *m_splitter; --- 236,241 ---- int sizeFlags = wxSIZE_AUTO); ! wxLuaState m_wxlState; ! bool m_wxlstate_static; wxSplitterWindow *m_splitter; Index: wxluaedit.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxluaedit.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxluaedit.cpp 24 Nov 2005 06:38:17 -0000 1.1 --- wxluaedit.cpp 22 Dec 2005 18:42:34 -0000 1.2 *************** *** 1,5 **** ///////////////////////////////////////////////////////////////////////////// // Name: wxluaedit.cpp ! // Purpose: wxLuaEditor app // Author: John Labenski // Modified by: --- 1,5 ---- ///////////////////////////////////////////////////////////////////////////// // Name: wxluaedit.cpp ! // Purpose: wxLuaEditor app // Author: John Labenski // Modified by: *************** *** 62,66 **** virtual bool HandleMenuEvent( wxCommandEvent &event ); void OnAbout(wxCommandEvent& event); ! wxLuaConsole *m_luaConsole; --- 62,66 ---- virtual bool HandleMenuEvent( wxCommandEvent &event ); void OnAbout(wxCommandEvent& event); ! wxLuaConsole *m_luaConsole; *************** *** 99,104 **** frame->m_luaConsole->PopulateToolBar(frame->GetToolBar(), LUACON_TB_LUA); frame->m_luaConsole->SetToolBar(frame->GetToolBar()); ! frame->m_luaConsole->SetMenuBar(frame->GetMenuBar()); ! // The size of the frame isn't set when the splitter is created, resize it wxSplitterWindow *splitWin = frame->m_luaConsole->GetSplitterWin(); --- 99,104 ---- frame->m_luaConsole->PopulateToolBar(frame->GetToolBar(), LUACON_TB_LUA); frame->m_luaConsole->SetToolBar(frame->GetToolBar()); ! frame->m_luaConsole->SetMenuBar(frame->GetMenuBar()); ! // The size of the frame isn't set when the splitter is created, resize it wxSplitterWindow *splitWin = frame->m_luaConsole->GetSplitterWin(); *************** *** 120,124 **** bool wxLuaEditorFrame::Create(const wxString& title, const wxPoint& pos, const wxSize& size, long frame_style) ! { m_luaConsole = NULL; --- 120,124 ---- bool wxLuaEditorFrame::Create(const wxString& title, const wxPoint& pos, const wxSize& size, long frame_style) ! { m_luaConsole = NULL; *************** *** 129,133 **** m_sideSplitter->SetMinimumPaneSize(10); m_sideNotebook = new wxNotebook(m_sideSplitter, wxID_ANY); ! m_fileListBox = new wxListBox(m_sideNotebook, ID_STF_FILELISTBOX, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE ); m_sideNotebook->AddPage(m_fileListBox, wxT("Files")); --- 129,133 ---- m_sideSplitter->SetMinimumPaneSize(10); m_sideNotebook = new wxNotebook(m_sideSplitter, wxID_ANY); ! m_fileListBox = new wxListBox(m_sideNotebook, ID_STF_FILELISTBOX, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE ); m_sideNotebook->AddPage(m_fileListBox, wxT("Files")); *************** *** 137,141 **** m_editorNotebook = m_luaConsole->GetEditorNotebook(); m_sideSplitterWin2 = m_luaConsole; ! return true; } --- 137,141 ---- m_editorNotebook = m_luaConsole->GetEditorNotebook(); m_sideSplitterWin2 = m_luaConsole; ! return true; } *************** *** 147,153 **** switch (event.GetId()) { ! case wxID_ABOUT : { ! OnAbout(event); return true; } --- 147,153 ---- switch (event.GetId()) { ! case wxID_ABOUT : { ! OnAbout(event); return true; } *************** *** 160,164 **** if (focusWin == m_luaConsole->GetLuaOutputWin()) return m_luaConsole->GetLuaOutputWin()->HandleMenuEvent(event); ! if (focusWin == m_luaConsole->GetLuaShellWin()) return m_luaConsole->GetLuaShellWin()->HandleMenuEvent(event); --- 160,164 ---- if (focusWin == m_luaConsole->GetLuaOutputWin()) return m_luaConsole->GetLuaOutputWin()->HandleMenuEvent(event); ! if (focusWin == m_luaConsole->GetLuaShellWin()) return m_luaConsole->GetLuaShellWin()->HandleMenuEvent(event); *************** *** 171,175 **** if (!wxSTEditorFrame::HandleMenuEvent(event)) m_luaConsole->OnMenu(event); ! return true; } --- 171,175 ---- if (!wxSTEditorFrame::HandleMenuEvent(event)) m_luaConsole->OnMenu(event); ! return true; } *************** *** 178,182 **** { // since the dialog is modal, it's ok that the interpreter is created on the stack ! wxLuaInterpreter interpreter(NULL, -1); // Create a script to run --- 178,182 ---- { // since the dialog is modal, it's ok that the interpreter is created on the stack ! wxLuaState wxlState(NULL, -1); // Create a script to run *************** *** 190,194 **** script += wxT("wx.wxMessageBox(msg, \"About wxLua Embedded\", wx.wxOK + wx.wxICON_INFORMATION)"); ! interpreter.RunString(script); // Equivalent code --- 190,194 ---- script += wxT("wx.wxMessageBox(msg, \"About wxLua Embedded\", wx.wxOK + wx.wxICON_INFORMATION)"); ! wxlState.RunString(script); // Equivalent code Index: wxledit.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxledit.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxledit.cpp 5 Dec 2005 06:11:14 -0000 1.4 --- wxledit.cpp 22 Dec 2005 18:42:34 -0000 1.5 *************** *** 57,62 **** void wxLuaShell::Init() { ! m_luaInterpreter = NULL; ! m_luaInterpreter_static = false; } --- 57,61 ---- void wxLuaShell::Init() { ! m_wxlstate_static = false; } *************** *** 75,99 **** wxLuaShell::~wxLuaShell() { ! if (m_luaInterpreter && !m_luaInterpreter_static) ! delete m_luaInterpreter; } ! void wxLuaShell::SetLuaInterpreter(wxLuaInterpreter *interp, bool is_static) { ! if (m_luaInterpreter && !m_luaInterpreter_static) { ! if (m_luaInterpreter->Ok() && m_luaInterpreter->IsRunning()) ! m_luaInterpreter->Break(); ! delete m_luaInterpreter; } ! m_luaInterpreter = interp; ! m_luaInterpreter_static = is_static; } ! bool wxLuaShell::RecreateLuaInterpreter(wxEvtHandler *evtHandler, int win_id) { ! wxLuaEvent event(wxEVT_LUASHELL_wxLUA_CREATION, GetId(), NULL); event.SetEventObject(this); event.SetInt(0); --- 74,98 ---- wxLuaShell::~wxLuaShell() { ! if (m_wxlState.Ok() && !m_wxlstate_static) ! m_wxlState.Destroy(); } ! void wxLuaShell::SetwxLuaState(const wxLuaState& wxlState, bool is_static) { ! if (m_wxlState.Ok() && !m_wxlstate_static) { ! if (m_wxlState.IsRunning()) ! m_wxlState.DebugHookBreak(); ! m_wxlState.Destroy(); } ! m_wxlState = wxlState; ! m_wxlstate_static = is_static; } ! bool wxLuaShell::RecreatewxLuaState(wxEvtHandler *evtHandler, int win_id) { ! wxLuaEvent event(wxEVT_LUASHELL_wxLUA_CREATION, GetId(), wxNullLuaState); event.SetEventObject(this); event.SetInt(0); *************** *** 101,113 **** GetEventHandler()->ProcessEvent( event ); ! if (event.GetLuaInterpreter() != NULL) { ! SetLuaInterpreter(event.GetLuaInterpreter(), event.GetInt() == 1); return true; } ! wxLuaInterpreter *interp = new wxLuaInterpreter(evtHandler, win_id); ! interp->SetLuaDebugHook( 1000, 50, false, LUA_MASKCOUNT ); ! SetLuaInterpreter(interp, false); return true; --- 100,112 ---- GetEventHandler()->ProcessEvent( event ); ! if (event.GetwxLuaState().Ok()) { ! SetwxLuaState(event.GetwxLuaState(), event.GetInt() == 1); return true; } ! wxLuaState wxlState = wxLuaState(evtHandler, win_id); ! wxlState.SetLuaDebugHook( 1000, 50, false, LUA_MASKCOUNT ); ! SetwxLuaState(wxlState, false); return true; *************** *** 134,138 **** if (string == wxT("reset")) { ! if (m_luaInterpreter_static) { AppendText(wxT("Unable to reset lua, interpreter locked by another process.\n")); --- 133,137 ---- if (string == wxT("reset")) { ! if (m_wxlstate_static) { AppendText(wxT("Unable to reset lua, interpreter locked by another process.\n")); *************** *** 140,144 **** else { ! if (RecreateLuaInterpreter(GetEventHandler(), GetId())) { AppendText(wxT("Sucessfully reset interpreter.\n")); --- 139,143 ---- else { ! if (RecreatewxLuaState(GetEventHandler(), GetId())) { AppendText(wxT("Sucessfully reset interpreter.\n")); *************** *** 149,154 **** } } ! else if (m_luaInterpreter) ! ret = m_luaInterpreter->RunString(string) == 0; else AppendText(wxT("The lua interpreter is not available - try running 'reset'.\n")); --- 148,153 ---- } } ! else if (m_wxlState.Ok()) ! ret = m_wxlState.RunString(string) == 0; else AppendText(wxT("The lua interpreter is not available - try running 'reset'.\n")); *************** *** 298,303 **** void wxLuaConsole::Init() { ! m_luaInterpreter = NULL; ! m_luaInterpreter_static = false; m_splitter = NULL; --- 297,301 ---- void wxLuaConsole::Init() { ! m_wxlstate_static = false; m_splitter = NULL; *************** *** 366,370 **** m_luaShell->CreateOptions(m_shellOptions); m_luaShell->SetWrapMode(wxSTC_WRAP_WORD); ! m_luaShell->RecreateLuaInterpreter(m_luaShell->GetEventHandler(), m_luaShell->GetId()); m_luaShell->CheckPrompt(true); splitter->Initialize(m_luaShell); --- 364,368 ---- m_luaShell->CreateOptions(m_shellOptions); m_luaShell->SetWrapMode(wxSTC_WRAP_WORD); ! m_luaShell->RecreatewxLuaState(m_luaShell->GetEventHandler(), m_luaShell->GetId()); m_luaShell->CheckPrompt(true); splitter->Initialize(m_luaShell); *************** *** 379,383 **** splitter->Initialize(m_luaOutput); m_luaOutput->MarkerDeleteAll(wxLuaShell::markerPrompt); ! m_luaOutput->SetLuaInterpreter(m_luaInterpreter, true); m_luaOutput->SetWrapMode(wxSTC_WRAP_NONE); m_luaOutput->SetFileName(wxT("Output")); --- 377,381 ---- splitter->Initialize(m_luaOutput); m_luaOutput->MarkerDeleteAll(wxLuaShell::markerPrompt); ! m_luaOutput->SetwxLuaState(m_wxlState, true); m_luaOutput->SetWrapMode(wxSTC_WRAP_NONE); m_luaOutput->SetFileName(wxT("Output")); *************** *** 395,399 **** wxLuaConsole::~wxLuaConsole() { ! delete m_luaInterpreter; } --- 393,397 ---- wxLuaConsole::~wxLuaConsole() { ! m_wxlState.Destroy(); } *************** *** 411,415 **** m_toolBar = toolBar; ! if (!m_luaInterpreter || !m_luaInterpreter->IsRunning()) EnableTool(ID_LUACON_BREAK_LUA, false); } --- 409,413 ---- m_toolBar = toolBar; ! if (!m_wxlState.Ok() || !m_wxlState.IsRunning()) EnableTool(ID_LUACON_BREAK_LUA, false); } *************** *** 442,462 **** } ! void wxLuaConsole::SetLuaInterpreter(wxLuaInterpreter *interp, bool is_static) { ! if (m_luaInterpreter && !m_luaInterpreter_static) { ! if (m_luaInterpreter->Ok() && m_luaInterpreter->IsRunning()) ! m_luaInterpreter->Break(); ! delete m_luaInterpreter; } ! m_luaInterpreter = interp; ! m_luaInterpreter_static = is_static; } ! bool wxLuaConsole::RecreateLuaInterpreter(wxEvtHandler *evtHandler, int win_id) { ! wxLuaEvent event(wxEVT_LUACONSOLE_wxLUA_CREATION, GetId(), NULL); event.SetEventObject(this); event.SetInt(0); --- 440,460 ---- } ! void wxLuaConsole::SetwxLuaState(const wxLuaState& wxlState, bool is_static) { ! if (m_wxlState.Ok() && !m_wxlstate_static) { ! if (m_wxlState.IsRunning()) ! m_wxlState.DebugHookBreak(); ! m_wxlState.Destroy(); } ! m_wxlState = wxlState; ! m_wxlstate_static = is_static; } ! bool wxLuaConsole::RecreatewxLuaState(wxEvtHandler *evtHandler, int win_id) { ! wxLuaEvent event(wxEVT_LUACONSOLE_wxLUA_CREATION, GetId(), wxNullLuaState); event.SetEventObject(this); event.SetInt(0); *************** *** 464,476 **** GetEventHandler()->ProcessEvent( event ); ! if (event.GetLuaInterpreter() != NULL) { ! SetLuaInterpreter(event.GetLuaInterpreter(), event.GetInt() == 1); return true; } ! wxLuaInterpreter *interp = new wxLuaInterpreter(evtHandler, win_id); ! interp->SetLuaDebugHook( 1000, 50, false, LUA_MASKCOUNT ); ! SetLuaInterpreter(interp, false); return true; } --- 462,474 ---- GetEventHandler()->ProcessEvent( event ); ! if (event.GetwxLuaState().Ok()) { ! SetwxLuaState(event.GetwxLuaState(), event.GetInt() == 1); return true; } ! wxLuaState wxlState = wxLuaState(evtHandler, win_id); ! wxlState.SetLuaDebugHook( 1000, 50, false, LUA_MASKCOUNT ); ! SetwxLuaState(wxlState, false); return true; } *************** *** 550,560 **** if (program.IsEmpty()) break; ! if (m_luaInterpreter) { ! wxCHECK_RET(m_luaInterpreter->Destroy(false), wxT("Can't destroy lua interpreter")); } // Fresh start! ! wxCHECK_RET(RecreateLuaInterpreter(GetEventHandler(), editor->GetId()), wxT("Can't recreate lua interpreter")); EnableTool(ID_LUACON_RUN_LUA, false); --- 548,559 ---- if (program.IsEmpty()) break; ! if (m_wxlState.Ok()) { ! m_wxlState.Destroy(); // FIXME ! //wxCHECK_RET(m_wxlState.Destroy(), wxT("Can't destroy lua interpreter")); } // Fresh start! ! wxCHECK_RET(RecreatewxLuaState(GetEventHandler(), editor->GetId()), wxT("Can't recreate lua interpreter")); EnableTool(ID_LUACON_RUN_LUA, false); *************** *** 573,586 **** wxSafeYield(); // allow tools to adjust (sometimes necessary?) ! m_luaOutput->SetLuaInterpreter(m_luaInterpreter, true); if (editor->HasBreakpoint(-1)) ! m_luaInterpreter->SetLuaDebugHook(1, 50, true, LUA_MASKLINE); else ! m_luaInterpreter->SetLuaDebugHook(100, 50, false); m_luaOutput->SetReadOnly(true); editor->SetReadOnly(true); ! m_luaInterpreter->RunString(program); editor->SetReadOnly(false); m_luaOutput->SetReadOnly(false); --- 572,585 ---- wxSafeYield(); // allow tools to adjust (sometimes necessary?) ! m_luaOutput->SetwxLuaState(m_wxlState, true); if (editor->HasBreakpoint(-1)) ! m_wxlState.SetLuaDebugHook(1, 50, true, LUA_MASKLINE); else ! m_wxlState.SetLuaDebugHook(100, 50, false); m_luaOutput->SetReadOnly(true); editor->SetReadOnly(true); ! m_wxlState.RunString(program); editor->SetReadOnly(false); m_luaOutput->SetReadOnly(false); *************** *** 595,612 **** EnableTool(ID_LUACON_SHOW_STACK, true); - // don't delete it since it may "exist" as a frame or something - // also allows for showing stack frame - //if (m_luaInterpreter) { delete m_luaInterpreter; m_luaInterpreter = NULL; } break; } case ID_LUACON_BREAK_LUA : { ! if (m_luaInterpreter && m_luaInterpreter->IsRunning()) { ! m_luaInterpreter->Break(wxT("Interpreter stopped")); } ! else if (m_luaShell->GetLuaInterpreter() && m_luaShell->GetLuaInterpreter()->IsRunning()) { ! m_luaShell->GetLuaInterpreter()->Break(wxT("Interpreter stopped")); } --- 594,608 ---- EnableTool(ID_LUACON_SHOW_STACK, true); break; } case ID_LUACON_BREAK_LUA : { ! if (m_wxlState.Ok() && m_wxlState.IsRunning()) { ! m_wxlState.Break(wxT("Interpreter stopped")); } ! else if (m_luaShell->GetwxLuaState().Ok() && m_luaShell->GetwxLuaState().IsRunning()) { ! m_luaShell->GetwxLuaState().Break(wxT("Interpreter stopped")); } *************** *** 619,646 **** bool err = true; ! wxLuaInterpreter *luaInterp = NULL; ! wxLuaShell *luaShell = NULL; if (m_msgNotebook->GetSelection() == 0) { ! luaInterp = m_luaShell ? m_luaShell->GetLuaInterpreter() : NULL; luaShell = m_luaShell; } else { ! luaInterp = m_luaInterpreter; ! luaShell = m_luaOutput; } ! if (luaShell && luaInterp) { ! int hook_count = luaInterp->GetLuaDebugHookCount(); ! int hook_yield = luaInterp->GetLuaDebugHookYield(); ! bool hook_send = luaInterp->GetLuaDebugHookSendEvt(); ! int hook_mask = luaInterp->GetLuaDebugHook(); ! luaInterp->SetLuaDebugHook(1, -1, true); ! luaInterp->RunString(wxT("print(\"Showing stack\")")); ! luaInterp->SetLuaDebugHook(hook_count, hook_yield, hook_send, hook_mask); luaShell->CheckPrompt(true); err = false; --- 615,642 ---- bool err = true; ! wxLuaState wxlState; ! wxLuaShell *luaShell = NULL; if (m_msgNotebook->GetSelection() == 0) { ! wxlState = m_luaShell ? m_luaShell->GetwxLuaState() : wxNullLuaState; luaShell = m_luaShell; } else { ! wxlState = m_wxlState; ! luaShell = m_luaOutput; } ! if (luaShell && wxlState.Ok()) { ! int hook_count = wxlState.GetLuaDebugHookCount(); ! int hook_yield = wxlState.GetLuaDebugHookYield(); ! bool hook_send = wxlState.GetLuaDebugHookSendEvt(); ! int hook_mask = wxlState.GetLuaDebugHook(); ! wxlState.SetLuaDebugHook(1, -1, true); ! wxlState.RunString(wxT("print(\"Showing stack\")")); ! wxlState.SetLuaDebugHook(hook_count, hook_yield, hook_send, hook_mask); luaShell->CheckPrompt(true); err = false; *************** *** 661,667 **** wxLuaShell *outEditor = NULL; ! if (event.GetLuaInterpreter() == m_luaInterpreter) outEditor = m_luaOutput; ! else if (event.GetLuaInterpreter() == m_luaShell->GetLuaInterpreter()) outEditor = m_luaShell; --- 657,663 ---- wxLuaShell *outEditor = NULL; ! if (event.GetwxLuaState() == m_wxlState) outEditor = m_luaOutput; ! else if (event.GetwxLuaState() == m_luaShell->GetwxLuaState()) outEditor = m_luaShell; *************** *** 688,692 **** m_show_stack = false; } ! else if (event.GetEventObject() == m_luaInterpreter) { wxLuaEditor *editor = wxDynamicCast(m_editorNotebook->FindWindow(event.GetId()), wxLuaEditor); --- 684,688 ---- m_show_stack = false; } ! else if (event.GetwxLuaState() == m_wxlState) { wxLuaEditor *editor = wxDynamicCast(m_editorNotebook->FindWindow(event.GetId()), wxLuaEditor); *************** *** 696,700 **** int line = event.GetLineNum(); if (editor->HasBreakpoint(line-1)) ! m_luaInterpreter->Break(wxString::Format(wxT("Stopped at breakpoint, line: %d"), line)); } } --- 692,696 ---- int line = event.GetLineNum(); if (editor->HasBreakpoint(line-1)) ! m_wxlState.Break(wxString::Format(wxT("Stopped at breakpoint, line: %d"), line)); } } *************** *** 715,719 **** // Put a marker where the error occurred ! if ((line >= 0) && (event.GetEventObject() == m_luaInterpreter)) { wxLuaEditor *editor = wxDynamicCast(m_editorNotebook->FindWindow(event.GetId()), wxLuaEditor); --- 711,715 ---- // Put a marker where the error occurred ! if ((line >= 0) && (event.GetwxLuaState() == m_wxlState)) { wxLuaEditor *editor = wxDynamicCast(m_editorNotebook->FindWindow(event.GetId()), wxLuaEditor); |
From: John L. <jr...@us...> - 2005-12-22 18:42:42
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19516/wxLua/apps/wxlua/src Modified Files: wxlua.cpp wxlua.h Log Message: Removed the wxLuaInterpreter - all functions transferred to the wxLuaState wxLuaInterpreter is typedefed to wxLuaState temporarily Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** wxlua.cpp 12 Dec 2005 05:16:31 -0000 1.11 --- wxlua.cpp 22 Dec 2005 18:42:33 -0000 1.12 *************** *** 124,132 **** // Initialize lua ! m_luaInterpreter = new wxLuaInterpreter(this, -1); ! m_luaState = m_luaInterpreter->GetLuaState(); m_luaHandler = new LuaHandler(this); ! if (m_luaInterpreter->Ok()) { RegisterClasses(m_luaState); --- 124,132 ---- // Initialize lua ! m_wxlState = wxLuaState(this, -1); ! m_luaState = m_wxlState.GetLuaState(); m_luaHandler = new LuaHandler(this); ! if (m_wxlState.Ok()) { RegisterClasses(m_luaState); *************** *** 218,222 **** { CreateSimpleArgs(); ! if (m_luaInterpreter->RunFile(argv[1]) == 0) fOk = TRUE; } --- 218,222 ---- { CreateSimpleArgs(); ! if (m_wxlState.RunFile(argv[1]) == 0) fOk = TRUE; } *************** *** 255,259 **** lua_setglobal(m_luaState, "args"); ! if (m_luaInterpreter->RunFile(fileName) == 0) fOk = TRUE; --- 255,259 ---- lua_setglobal(m_luaState, "args"); ! if (m_wxlState.RunFile(fileName) == 0) fOk = TRUE; *************** *** 284,288 **** { CreateSimpleArgs(); ! if (m_luaInterpreter->RunFile(argv[idx]) == 0) fOk = TRUE; } --- 284,288 ---- { CreateSimpleArgs(); ! if (m_wxlState.RunFile(argv[idx]) == 0) fOk = TRUE; } *************** *** 311,315 **** wxMemoryFSHandler::RemoveFile(wxT("wxLua")); ! delete m_luaInterpreter; delete m_luaHandler; m_luaState = NULL; --- 311,315 ---- wxMemoryFSHandler::RemoveFile(wxT("wxLua")); ! m_wxlState.Destroy(); delete m_luaHandler; m_luaState = NULL; *************** *** 383,387 **** lua_setglobal(m_luaState, "standaloneLoadBitmaps"); */ ! return m_luaInterpreter->RunBuffer(wxLuaEditor, wxLuaEditor_len, g_strProgramName); } --- 383,387 ---- lua_setglobal(m_luaState, "standaloneLoadBitmaps"); */ ! return m_wxlState.RunBuffer(wxLuaEditor, wxLuaEditor_len, g_strProgramName); } Index: wxlua.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wxlua.h 1 Dec 2005 04:17:28 -0000 1.8 --- wxlua.h 22 Dec 2005 18:42:33 -0000 1.9 *************** *** 68,72 **** wxLuaStackFrame *m_pStackFrame; LuaHandler *m_luaHandler; ! wxLuaInterpreter *m_luaInterpreter; lua_State *m_luaState; #ifdef __WXMSW__ --- 68,72 ---- wxLuaStackFrame *m_pStackFrame; LuaHandler *m_luaHandler; ! wxLuaState m_wxlState; lua_State *m_luaState; #ifdef __WXMSW__ |
From: John L. <jr...@us...> - 2005-12-18 18:04:47
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7980/wxLua/modules/wxlua/src Modified Files: wxlcallb.cpp wxlintrp.cpp Log Message: added doxygen config file, fixed int <-> wxWindowId Index: wxlintrp.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlintrp.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** wxlintrp.cpp 16 Dec 2005 05:12:26 -0000 1.9 --- wxlintrp.cpp 18 Dec 2005 18:04:38 -0000 1.10 *************** *** 366,370 **** DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_SHUTDOWN) ! wxLuaEvent::wxLuaEvent(wxEventType commandType, int id, wxLuaInterpreter *interpreter) : wxNotifyEvent(commandType, id) { --- 366,370 ---- DEFINE_LOCAL_EVENT_TYPE(wxEVT_LUA_SHUTDOWN) ! wxLuaEvent::wxLuaEvent(wxEventType commandType, wxWindowID id, wxLuaInterpreter *interpreter) : wxNotifyEvent(commandType, id) { *************** *** 383,387 **** Init(); } ! wxLuaInterpreter::wxLuaInterpreter(wxEvtHandler *handler, int id) : wxObject() { Init(); --- 383,387 ---- Init(); } ! wxLuaInterpreter::wxLuaInterpreter(wxEvtHandler *handler, wxWindowID id) : wxObject() { Init(); *************** *** 409,413 **** } ! bool wxLuaInterpreter::Create(lua_State *inL, wxEvtHandler *handler, int id) { if (Ok() && !Destroy(true)) --- 409,413 ---- } ! bool wxLuaInterpreter::Create(lua_State *inL, wxEvtHandler *handler, wxWindowID id) { if (Ok() && !Destroy(true)) Index: wxlcallb.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlcallb.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** wxlcallb.cpp 12 Dec 2005 05:16:32 -0000 1.9 --- wxlcallb.cpp 18 Dec 2005 18:04:38 -0000 1.10 *************** *** 36,40 **** wxLuaCallback::wxLuaCallback( const wxLuaState& state, int theRoutine, ! int id, wxEventType eventType, wxEvtHandler *pEvtHandler ) --- 36,40 ---- wxLuaCallback::wxLuaCallback( const wxLuaState& state, int theRoutine, ! wxWindowID id, wxEventType eventType, wxEvtHandler *pEvtHandler ) *************** *** 159,164 **** IMPLEMENT_ABSTRACT_CLASS(wxLuaDestroyCallback, wxEvtHandler) ! wxLuaDestroyCallback::wxLuaDestroyCallback(const wxLuaState& state, int id, ! wxEvtHandler *pHandler, int iTag) : m_wxlState(state), m_pHandler(pHandler), m_id(id) { --- 159,166 ---- IMPLEMENT_ABSTRACT_CLASS(wxLuaDestroyCallback, wxEvtHandler) ! wxLuaDestroyCallback::wxLuaDestroyCallback(const wxLuaState& state, ! wxWindowID id, ! wxEvtHandler *pHandler, ! int iTag) : m_wxlState(state), m_pHandler(pHandler), m_id(id) { |