diff --git a/Sources/Plasma/Apps/CMakeLists.txt b/Sources/Plasma/Apps/CMakeLists.txt index f0b8ccdc..9ab30b0b 100644 --- a/Sources/Plasma/Apps/CMakeLists.txt +++ b/Sources/Plasma/Apps/CMakeLists.txt @@ -7,4 +7,5 @@ add_subdirectory(plFileSecure) add_subdirectory(plFileEncrypt) add_subdirectory(plMD5) add_subdirectory(plPageInfo) +add_subdirectory(plPageOptimizer) add_subdirectory(plSHA) diff --git a/Sources/Plasma/Apps/plPageOptimizer/CMakeLists.txt b/Sources/Plasma/Apps/plPageOptimizer/CMakeLists.txt new file mode 100644 index 00000000..be7d78e8 --- /dev/null +++ b/Sources/Plasma/Apps/plPageOptimizer/CMakeLists.txt @@ -0,0 +1,31 @@ +include_directories("../../Apps") +include_directories("../../CoreLib") +include_directories("../../FeatureLib/inc") +include_directories("../../FeatureLib") +include_directories("../../NucleusLib/inc") +include_directories("../../NucleusLib") +include_directories("../../PubUtilLib/inc") +include_directories("../../PubUtilLib") + +set(plPageOptimizer_SOURCES + main.cpp + plAllCreatables.cpp + plPageOptimizer.cpp +) + +set(plPageOptimizer_HEADERS + plPageOptimizer.h +) + +add_executable(plPageOptimizer ${plPageOptimizer_SOURCES}) + +target_link_libraries(plPageOptimizer CoreLib) +target_link_libraries(plPageOptimizer plResMgr) +target_link_libraries(plPageOptimizer pnUUID) + +if(USE_VLD) + target_link_libraries(plPageOptimizer ${VLD_LIBRARY}) +endif() + +source_group("Source Files" FILES ${plPageOptimizer_SOURCES}) +source_group("Header Files" FILES ${plPageOptimizer_HEADERS}) diff --git a/Sources/Plasma/Apps/plPageOptimizer/main.cpp b/Sources/Plasma/Apps/plPageOptimizer/main.cpp index b120a02c..4b20250d 100644 --- a/Sources/Plasma/Apps/plPageOptimizer/main.cpp +++ b/Sources/Plasma/Apps/plPageOptimizer/main.cpp @@ -40,40 +40,29 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com *==LICENSE==*/ #include "plResMgr/plResManager.h" -#include "pfPython/plPythonFileMod.h" -#include "plGImage/plFontCache.h" -#include "plPhysX/plSimulationMgr.h" -#include "plAvatar/plAvatarMgr.h" #include "plPageOptimizer.h" #include "plFile/plFileUtils.h" +#include "pnNetCommon/plSynchedObject.h" int main(int argc, char* argv[]) { if (argc != 2) { - printf("plPageOptimizer: wrong number of arguments"); + printf("plPageOptimizer: wrong number of arguments\n"); return 1; } printf("Optimizing %s...", plFileUtils::GetFileName(argv[1])); - plFontCache* fontCache; #ifndef _DEBUG - try - { + try { #endif plResManager* resMgr = new plResManager; hsgResMgr::Init(resMgr); - - // Setup all the crap that needs to be around to load - plSimulationMgr::Init(); - fontCache = new plFontCache; - plPythonFileMod::SetAtConvertTime(); #ifndef _DEBUG - } catch (...) - { - printf(" ***crashed on init"); + } catch (...) { + printf(" ***crashed on init\n"); return 2; } #endif @@ -86,22 +75,15 @@ int main(int argc, char* argv[]) optimizer.Optimize(); } #ifndef _DEBUG - catch (...) - { - printf(" ***crashed on optimizing"); + catch (...) { + printf(" ***crashed on optimizing\n"); return 2; } #endif #ifndef _DEBUG - try - { + try { #endif - // Deinit the crap - fontCache->UnRegisterAs(kFontCache_KEY); - fontCache = nil; - plSimulationMgr::Shutdown(); - // Reading in objects may have generated dirty state which we're obviously // not sending out. Clear it so that we don't have leaked keys before the // ResMgr goes away. @@ -110,9 +92,8 @@ int main(int argc, char* argv[]) hsgResMgr::Shutdown(); #ifndef _DEBUG - } catch (...) - { - printf(" ***crashed on shutdown"); + } catch (...) { + printf(" ***crashed on shutdown\n"); return 2; } #endif diff --git a/Sources/Plasma/Apps/plPageOptimizer/pfAllCreatables.cpp b/Sources/Plasma/Apps/plPageOptimizer/plAllCreatables.cpp similarity index 71% rename from Sources/Plasma/Apps/plPageOptimizer/pfAllCreatables.cpp rename to Sources/Plasma/Apps/plPageOptimizer/plAllCreatables.cpp index f382a95c..2ad4a5c5 100644 --- a/Sources/Plasma/Apps/plPageOptimizer/pfAllCreatables.cpp +++ b/Sources/Plasma/Apps/plPageOptimizer/plAllCreatables.cpp @@ -39,16 +39,30 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com Mead, WA 99021 *==LICENSE==*/ -#include "pfCharacter/pfCharacterCreatable.h" -#include "pfCamera/pfCameraCreatable.h" -#include "pfAnimation/pfAnimationCreatable.h" -#include "pfConditional/plConditionalObjectCreatable.h" -//#include "pfConsole/pfConsoleCreatable.h" -#include "pfSurface/pfSurfaceCreatable.h" -#include "pfMessage/pfMessageCreatable.h" -#include "pfAudio/pfAudioCreatable.h" -#include "pfPython/pfPythonCreatable.h" -#include "pfGameGUIMgr/pfGameGUIMgrCreatable.h" -#include "pfCCR/plCCRCreatable.h" -#include "pfJournalBook/pfJournalBookCreatable.h" -#include "pfGameMgr/pfGameMgrCreatables.h" +#include "HeadSpin.h" + +#include "pnFactory/plCreator.h" + +#include "plAudible.h" +REGISTER_NONCREATABLE( plAudible ); + +#include "plDrawable.h" +REGISTER_NONCREATABLE( plDrawable ); + +#include "plPhysical.h" +REGISTER_NONCREATABLE( plPhysical ); + +#include "plgDispatch.h" +REGISTER_NONCREATABLE( plDispatchBase ); + +#include "pnDispatch/pnDispatchCreatable.h" +#include "pnKeyedObject/pnKeyedObjectCreatable.h" +#include "pnMessage/pnMessageCreatable.h" +#include "pnModifier/pnModifierCreatable.h" +#include "pnNetCommon/pnNetCommonCreatable.h" +#include "pnTimer/pnTimerCreatable.h" + +#include "plResMgr/plResMgrCreatable.h" + +#include "plMessage/plResMgrHelperMsg.h" +REGISTER_CREATABLE(plResMgrHelperMsg);