diff options
author | Brad King <brad.king@kitware.com> | 2010-01-28 21:48:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-01-28 21:48:20 (GMT) |
commit | dc1d2189ae922be9d6e7f5fde698532db47e46aa (patch) | |
tree | 28ef61aac78f0bdc190a760d53b6cb89b24262cd /Source/QtDialog | |
parent | 612409e5b01a7e4823bb379ee9e002177793eb75 (diff) | |
download | CMake-dc1d2189ae922be9d6e7f5fde698532db47e46aa.zip CMake-dc1d2189ae922be9d6e7f5fde698532db47e46aa.tar.gz CMake-dc1d2189ae922be9d6e7f5fde698532db47e46aa.tar.bz2 |
CMake 2.8.1-rc1
Diffstat (limited to 'Source/QtDialog')
-rw-r--r-- | Source/QtDialog/CMake.desktop | 2 | ||||
-rw-r--r-- | Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake | 18 | ||||
-rw-r--r-- | Source/QtDialog/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetup.cxx | 5 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetup.qrc | 3 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetup128.png | bin | 0 -> 13269 bytes | |||
-rw-r--r-- | Source/QtDialog/CMakeSetup32.png (renamed from Source/QtDialog/CMakeSetup.png) | bin | 358 -> 358 bytes | |||
-rw-r--r-- | Source/QtDialog/QMacInstallDialog.cxx | 30 |
8 files changed, 36 insertions, 24 deletions
diff --git a/Source/QtDialog/CMake.desktop b/Source/QtDialog/CMake.desktop index d1d4fb2..645eb76 100644 --- a/Source/QtDialog/CMake.desktop +++ b/Source/QtDialog/CMake.desktop @@ -3,7 +3,7 @@ Version=1.0 Name=CMake Comment=Cross-platform buildsystem Exec=cmake-gui %f -Icon=CMakeSetup.png +Icon=CMakeSetup32.png Terminal=false X-MultipleArgs=false Type=Application diff --git a/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake b/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake index 37e4701..9f5cf00 100644 --- a/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake +++ b/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake @@ -210,7 +210,7 @@ macro(copy_library_into_bundle clib_bundle clib_libsrc clib_dstlibs clib_fixups) get_filename_component(fwdirname "${fw_srcdir}" NAME) string(REGEX REPLACE "^(.*)\\.framework$" "\\1" fwname "${fwdirname}") string(REGEX REPLACE "^.*/${fwname}\\.framework/(.*)$" "\\1" fwlibname "${clib_libsrc}") - set(fw_dstdir "${clib_bundle}/Contents/Frameworks/${fwdirname}") + set(fw_dstdir "${clib_bundle}/Contents/Frameworks") # message("") # message("fwdirname: '${fwdirname}'") @@ -240,17 +240,25 @@ macro(copy_library_into_bundle clib_bundle clib_libsrc clib_dstlibs clib_fixups) "${fw_src}" "${fw_dstdir}/${fwlibname}" ) + get_filename_component(fw_src_path "${fw_src}" PATH) + message("Checking ${fw_src_path}/Resources") + if(EXISTS "${fw_src_path}/Resources") + message("Copy: ${CMAKE_COMMAND} -E copy_directory \"${fw_src_path}/Resources/\" \"${fw_dstdir}/Resources/\"") + execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory + "${fw_src_path}/Resources/" "${fw_dstdir}/${fwdirname}/Resources/") + endif(EXISTS "${fw_src_path}/Resources") + execute_process(COMMAND install_name_tool - -id "@executable_path/../Frameworks/${fwdirname}/${fwlibname}" - "${clib_bundle}/Contents/Frameworks/${fwdirname}/${fwlibname}" + -id "@executable_path/../Frameworks/${fwlibname}" + "${clib_bundle}/Contents/Frameworks/${fwlibname}" ) set(${clib_dstlibs} ${${clib_dstlibs}} - "${clib_bundle}/Contents/Frameworks/${fwdirname}/${fwlibname}" + "${clib_bundle}/Contents/Frameworks/${fwlibname}" ) set(${clib_fixups} ${${clib_fixups}} "-change" "${clib_libsrc}" - "@executable_path/../Frameworks/${fwdirname}/${fwlibname}" + "@executable_path/../Frameworks/${fwlibname}" ) else("${clib_libsrc}" MATCHES ".framework/.*/.*/.*") if("${clib_libsrc}" MATCHES "/") diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 4e7e357..405c952 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -97,7 +97,7 @@ ELSE(NOT QT4_FOUND) # install a desktop file so CMake appears in the application start menu # with an icon INSTALL(FILES CMake.desktop DESTINATION share/applications ) - INSTALL(FILES CMakeSetup.png DESTINATION share/pixmaps ) + INSTALL(FILES CMakeSetup32.png DESTINATION share/pixmaps ) INSTALL(FILES cmakecache.xml DESTINATION share/mime/packages ) ENDIF(UNIX) diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index f19a36d..e613a78 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -134,7 +134,10 @@ int main(int argc, char** argv) // app setup app.setApplicationName("CMakeSetup"); app.setOrganizationName("Kitware"); - app.setWindowIcon(QIcon(":/Icons/CMakeSetup.png")); + QIcon appIcon; + appIcon.addFile(":/Icons/CMakeSetup32.png"); + appIcon.addFile(":/Icons/CMakeSetup128.png"); + app.setWindowIcon(appIcon); CMakeSetupDialog dialog; dialog.show(); diff --git a/Source/QtDialog/CMakeSetup.qrc b/Source/QtDialog/CMakeSetup.qrc index 5ceb1df..eaac192 100644 --- a/Source/QtDialog/CMakeSetup.qrc +++ b/Source/QtDialog/CMakeSetup.qrc @@ -1,6 +1,7 @@ <RCC> <qresource prefix="/Icons" > - <file>CMakeSetup.png</file> + <file>CMakeSetup128.png</file> + <file>CMakeSetup32.png</file> <file>Delete16.png</file> <file>Plus16.png</file> </qresource> diff --git a/Source/QtDialog/CMakeSetup128.png b/Source/QtDialog/CMakeSetup128.png Binary files differnew file mode 100644 index 0000000..12f1d9a --- /dev/null +++ b/Source/QtDialog/CMakeSetup128.png diff --git a/Source/QtDialog/CMakeSetup.png b/Source/QtDialog/CMakeSetup32.png Binary files differindex 7bbcee4..7bbcee4 100644 --- a/Source/QtDialog/CMakeSetup.png +++ b/Source/QtDialog/CMakeSetup32.png diff --git a/Source/QtDialog/QMacInstallDialog.cxx b/Source/QtDialog/QMacInstallDialog.cxx index fbeb10e..3aa509d 100644 --- a/Source/QtDialog/QMacInstallDialog.cxx +++ b/Source/QtDialog/QMacInstallDialog.cxx @@ -33,8 +33,8 @@ QMacInstallDialog::~QMacInstallDialog() void QMacInstallDialog::DoInstall() { QDir installDir(this->Internals->InstallPrefix->text()); - std::string installTo = installDir.path().toStdString(); - if(!cmSystemTools::FileExists(installTo.c_str())) + QString installTo = installDir.path(); + if(!cmSystemTools::FileExists(installTo.toAscii().data())) { QString message = tr("Build install does not exist, " "should I create it?") @@ -47,7 +47,7 @@ void QMacInstallDialog::DoInstall() QMessageBox::Yes | QMessageBox::No); if(btn == QMessageBox::Yes) { - cmSystemTools::MakeDirectory(installTo.c_str()); + cmSystemTools::MakeDirectory(installTo.toAscii().data()); } } QDir cmExecDir(QApplication::applicationDirPath()); @@ -56,24 +56,24 @@ void QMacInstallDialog::DoInstall() for (int i = 0; i < list.size(); ++i) { QFileInfo fileInfo = list.at(i); - std::string filename = fileInfo.fileName().toStdString(); + QString filename = fileInfo.fileName(); if(filename.size() && filename[0] == '.') { continue; } - std::string file = fileInfo.absoluteFilePath().toStdString(); - std::string newName = installTo; + QString file = fileInfo.absoluteFilePath(); + QString newName = installTo; newName += "/"; newName += filename; // Remove the old files - if(cmSystemTools::FileExists(newName.c_str())) + if(cmSystemTools::FileExists(newName.toAscii().data())) { - std::cout << "rm [" << newName << "]\n"; - if(!cmSystemTools::RemoveFile(newName.c_str())) + std::cout << "rm [" << newName.toAscii().data() << "]\n"; + if(!cmSystemTools::RemoveFile(newName.toAscii().data())) { QString message = tr("Failed to remove file " "installation may be incomplete: "); - message += newName.c_str(); + message += newName.toAscii().data(); QString title = tr("Error Removing file"); QMessageBox::StandardButton btn = QMessageBox::critical(this, title, message, @@ -84,14 +84,14 @@ void QMacInstallDialog::DoInstall() } } } - std::cout << "ln -s [" << file << "] ["; - std::cout << newName << "]\n"; - if(!cmSystemTools::CreateSymlink(file.c_str(), - newName.c_str())) + std::cout << "ln -s [" << file.toAscii().data() << "] ["; + std::cout << newName.toAscii().data() << "]\n"; + if(!cmSystemTools::CreateSymlink(file.toAscii().data(), + newName.toAscii().data())) { QString message = tr("Failed create symlink " "installation may be incomplete: "); - message += newName.c_str(); + message += newName.toAscii().data(); QString title = tr("Error Creating Symlink"); QMessageBox::StandardButton btn = QMessageBox::critical(this, title, message, |