From 77837b803475b997d17e3bc5884a0c4ccfdf968a Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Wed, 15 Dec 2010 14:47:13 +0000 Subject: [PATCH] Make sure a few more directories exist when needed. Most package builders (including cmake/cpack) do not install the empty directories in the shared data, and so the paths need to be created at runtime. Also set up cmake/cpack to create prebuilt binary packages and source packages. Also change the vertex shader dump file name in the gfx debugger to something that makes more sense. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6587 8ced0084-cf51-0410-be5f-012b33b47a6e --- CMakeLists.txt | 5 +++++ Source/Core/DiscIO/Src/NANDContentLoader.cpp | 5 +++++ Source/Core/VideoCommon/Src/Debugger.cpp | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 60224a3b1a..59e2f5bb14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -379,6 +379,11 @@ endif() # TODO: CPACK_NSIS_* # TODO: Use CPack components for DSPSpy, etc => cpack_add_component +set(CPACK_SET_DESTDIR ON) +set(CPACK_SOURCE_GENERATOR "TGZ;TBZ2;ZIP") +set(CPACK_SOURCE_IGNORE_FILES "\\\\.#;/#;.*~;\\\\.swp;/\\\\.svn") +list(APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_BINARY_DIR}") + # CPack must be included after the CPACK_* variables are set in order for those # variables to take effect. include(CPack) diff --git a/Source/Core/DiscIO/Src/NANDContentLoader.cpp b/Source/Core/DiscIO/Src/NANDContentLoader.cpp index 854d607ca6..9d0f2e432c 100644 --- a/Source/Core/DiscIO/Src/NANDContentLoader.cpp +++ b/Source/Core/DiscIO/Src/NANDContentLoader.cpp @@ -83,6 +83,8 @@ std::string CSharedContent::AddSharedContent(u8* _pHash) memcpy(Element.FileName, c_ID, 8); memcpy(Element.SHA1Hash, _pHash, 20); m_Elements.push_back(Element); + + File::CreateFullPath(contentMap); FILE* pFile = fopen(contentMap, "ab"); if (pFile) { @@ -403,6 +405,7 @@ cUIDsys::cUIDsys() *(u64*)&(Element.titleID) = Common::swap64(TITLEID_SYSMENU); *(u32*)&(Element.UID) = Common::swap32(lastUID++); + File::CreateFullPath(uidSys); FILE* pFile = fopen(uidSys, "wb"); if (pFile) { @@ -438,6 +441,8 @@ bool cUIDsys::AddTitle(u64 _TitleID) *(u64*)&(Element.titleID) = Common::swap64(_TitleID); *(u32*)&(Element.UID) = Common::swap32(lastUID++); m_Elements.push_back(Element); + + File::CreateFullPath(uidSys); FILE* pFile = fopen(uidSys, "ab"); if (pFile) { diff --git a/Source/Core/VideoCommon/Src/Debugger.cpp b/Source/Core/VideoCommon/Src/Debugger.cpp index 0b8e487307..94531e46f0 100644 --- a/Source/Core/VideoCommon/Src/Debugger.cpp +++ b/Source/Core/VideoCommon/Src/Debugger.cpp @@ -126,7 +126,7 @@ void GFXDebuggerBase::DumpPixelShader(const char* path) void GFXDebuggerBase::DumpVertexShader(const char* path) { char filename[MAX_PATH]; - sprintf(filename, "%sdump_vs_consts.txt", path); + sprintf(filename, "%sdump_vs.txt", path); File::CreateEmptyFile(filename); File::WriteStringToFile(true, GenerateVertexShaderCode(g_nativeVertexFmt->m_components, g_ActiveConfig.backend_info.APIType), filename);