Permalink
Browse files

修改迁移cmake工程的一些路径问题

  • Loading branch information...
zhanlangsir committed Aug 4, 2012
1 parent f71ba44 commit 2a10d34f6129bf2d0a9a318530f1ae4e695a1df7
View

This file was deleted.

Oops, something went wrong.
View
@@ -21,19 +21,21 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release") set(CMAKE_BUILD_TYPE "Release")
endif() endif()
set(package ${PROJECT_NAME})
if ( CMAKE_BUILD_TYPE MATCHES "Debug" ) if ( CMAKE_BUILD_TYPE MATCHES "Debug" )
set(DEBUG_MODE 1)
set(prefix ${PROJECT_SOURCE_DIR}) set(prefix ${PROJECT_SOURCE_DIR})
set(pkgdatadir ${prefix}/data) set(pkgdatadir ${prefix}/data)
else () else ()
set(prefix ${CMAKE_INSTALL_PREFIX}) set(prefix ${CMAKE_INSTALL_PREFIX})
set(pkgdatadir ${prefix}/share/${package}) set(pkgdatadir ${prefix}/share/${package})
endif () endif ()
set(package Qtqq)
set(bindir ${prefix}/bin) set(bindir ${prefix}/bin)
set(libdir ${prefix}/lib) set(libdir ${prefix}/lib)
set(includedir ${prefix}/include) set(includedir ${prefix}/include)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin) set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/lib) set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/lib)
@@ -3,19 +3,24 @@ if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}") string(REGEX REPLACE "\n" ";" files "${files}")
foreach (file ${files}) foreach (file ${files})
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if (EXISTS "$ENV{DESTDIR}${file}" OR IS_SYMLINK "$ENV{DESTDIR}${file}") if (EXISTS "$ENV{DESTDIR}${file}" OR IS_SYMLINK "$ENV{DESTDIR}${file}")
execute_process( execute_process(
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}" COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
OUTPUT_VARIABLE rm_out OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval RESULT_VARIABLE rm_retval
) )
if(NOT ${rm_retval} EQUAL 0) if(NOT ${rm_retval} EQUAL 0)
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
endif (NOT ${rm_retval} EQUAL 0) endif (NOT ${rm_retval} EQUAL 0)
else (EXISTS "$ENV{DESTDIR}${file}" OR IS_SYMLINK "$ENV{DESTDIR}${file}") else (EXISTS "$ENV{DESTDIR}${file}" OR IS_SYMLINK "$ENV{DESTDIR}${file}")
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
endif (EXISTS "$ENV{DESTDIR}${file}" OR IS_SYMLINK "$ENV{DESTDIR}${file}") endif (EXISTS "$ENV{DESTDIR}${file}" OR IS_SYMLINK "$ENV{DESTDIR}${file}")
endforeach(file) endforeach(file)
View
@@ -1,3 +1,9 @@
add_subdirectory(resources) install(FILES qtqq.desktop DESTINATION ${prefix}/share/applications)
add_subdirectory(skins)
add_subdirectory(misc) set(data_folds
misc
resources
skins
)
install(DIRECTORY ${data_folds} DESTINATION ${pkgdatadir})
View

This file was deleted.

Oops, something went wrong.
View
@@ -1,10 +1,5 @@
log4j.rootLogger=DEBUG, STDOUT, R log4j.rootLogger=DEBUG, STDOUT
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
log4j.appender.STDOUT.layout.ConversionPattern=[%c] [%p] %d{yyyy MMM dd HH:mm:ss} - %m %n%n log4j.appender.STDOUT.layout.ConversionPattern=[%c] [%p] %d{yyyy MMM dd HH:mm:ss} - %m %n%n
log4j.appender.R=org.apache.log4j.FileAppender
log4j.appender.R.File=~/.config/Qtqq/log.log
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=[%c] [%p] %d{yyyy MMM dd HH:mm:ss} - %m %n%n
View
@@ -0,0 +1,19 @@
[Desktop Entry]
Categories=GNOME;KDE;Qt;Network;Chat;
Comment[zh_CN]=基于webqq协议的linuxqq!
Comment=A linuxqq base on webqq protocol!
Exec=qtqq
GenericName[zh_CN]=Qtqq
GenericName=Qtqq
Icon=/usr/share/Qtqq/resources/WebQQ.ico
Name=Qtqq
Name[zh_CN]=Qtqq
Name[en_UK]=Qtqq
Name[en_US]=Qtqq
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
Version=4.0.4
X-KDE-SubstituteUID=false

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -16,7 +16,7 @@ AccountManager::AccountManager() :
void AccountManager::readAccounts() void AccountManager::readAccounts()
{ {
std::ifstream is; std::ifstream is;
is.open("users.json", std::ios::in); is.open(QString(QQSettings::configDir() + "/users.json").toLatin1(), std::ios::in);
if (!is.is_open()) if (!is.is_open())
return; return;
View
@@ -6,6 +6,9 @@
#include "log4qt/logger.h" #include "log4qt/logger.h"
#include "log4qt/propertyconfigurator.h" #include "log4qt/propertyconfigurator.h"
#include "log4qt/logmanager.h" #include "log4qt/logmanager.h"
#include "log4qt/appender.h"
#include "log4qt/fileappender.h"
#include "log4qt/ttcclayout.h"
#include "qtqq.h" #include "qtqq.h"
#include "qqglobal.h" #include "qqglobal.h"
@@ -31,6 +34,16 @@ int main(int argc, char *argv[])
Log4Qt::LogManager::setHandleQtMessages(true); Log4Qt::LogManager::setHandleQtMessages(true);
Log4Qt::PropertyConfigurator::configure(QQGlobal::dataPath() + "/misc/log4qt.conf"); Log4Qt::PropertyConfigurator::configure(QQGlobal::dataPath() + "/misc/log4qt.conf");
//set up file logger, log file in ~/.Qtqq/log.log
Log4Qt::Logger *logger = Log4Qt::Logger::rootLogger();
Log4Qt::FileAppender *file_appender = new Log4Qt::FileAppender();
file_appender->setName("FileAppender");
file_appender->setFile(QQGlobal::configPath() + "/log.log");
Log4Qt::TTCCLayout *filelayout = new Log4Qt::TTCCLayout(Log4Qt::TTCCLayout::ISO8601);
file_appender->setLayout(filelayout);
file_appender->activateOptions();
logger->addAppender(file_appender);
Qtqq qtqq; Qtqq qtqq;
qtqq.start(); qtqq.start();

0 comments on commit 2a10d34

Please sign in to comment.