bool LoadXAR() { XLUE_AddXARSearchPath(GetXARPath()); if(XLUE_LoadXAR("BoltFox") != 0) { ::MessageBox(0, L"Load XAR failed!", 0 , 0); return false; } return true; }
bool LoadMainXAR() { long result = 0; //设置XAR的搜索路径 result = XLUE_AddXARSearchPath(GetResDir()); //加载主XAR,此时会执行该XAR的启动脚本onload.lua result = XLUE_LoadXAR("TreeView"); if(result != 0) { return false; } return true; }
// 加载主xar bool LoadXAR() { wchar_t szPath[MAX_PATH]; ::GetModuleFileName(_Module.GetModuleInstance(), szPath, MAX_PATH); ::PathCombine(szPath, szPath, L"..\\..\\samples\\Wizard\\xar\\"); XLUE_AddXARSearchPath(szPath); if(XLUE_LoadXAR("wizard") != 0) { ::MessageBox(0, L"Load XAR failed!", 0 , 0); return false; } return true; }