aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt44
-rw-r--r--src/main.cpp2
-rw-r--r--src/ui/CMakeLists.txt16
-rwxr-xr-xsrc/ui/SettingsDialog.cpp6
4 files changed, 38 insertions, 30 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 179af5c1..a6c7ba05 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,3 +1,5 @@
+set(ALL_SOURCE_FILE)
+
add_subdirectory(gpg)
add_subdirectory(ui)
@@ -10,34 +12,38 @@ set_property(SOURCE gpgfrontend.rc APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_SOURCE
file(GLOB_RECURSE GPGFRONTEND_HEADER_FILES RELACTIVE ${CMAKE_SOURCE_DIR}/include/*.h)
qt5_wrap_cpp(QT5_MOCS ${GPGFRONTEND_HEADER_FILES} TARGET gpgfrontend)
-# Set Binary Output Path
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/release)
-message(STATUS "CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+# Get ALL SOURCE FILES
+file(GLOB_RECURSE ALL_SOURCE_FILES RELACTIVE ${CMAKE_SOURCE_DIR}/src/*.cpp)
# Set Translation Files
-file(GLOB_RECURSE QT_TS_FILES RELACTIVE ${CMAKE_SOURCE_DIR}/resource/ts/*.ts)
-set(QT_QM_FILES_OUTPUT_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ts)
+set(QT_TS_FILES gpgfrontend_en_us.ts gpgfrontend_zh_chs.ts gpgfrontend_zh_cht.ts gpg_frontend_fr.ts gpg_frontend_ru.ts)
+list(TRANSFORM QT_TS_FILES PREPEND ${CMAKE_SOURCE_DIR}/resource/ts/)
+message(STATUS "QT_TS_FILES ${QT_TS_FILES}")
+set(QT_QM_FILES_OUTPUT_DIR ${CMAKE_BINARY_DIR}/src/ts)
set_source_files_properties(${QT_TS_FILES} PROPERTIES OUTPUT_LOCATION ${QT_QM_FILES_OUTPUT_DIR})
-QT5_create_translation(QON_QM_FILES ${BASE_SOURCE} ${QT_TS_FILES})
+QT5_create_translation(QON_QM_FILES ${CMAKE_SOURCE_DIR} ${QT_TS_FILES})
+message(STATUS "QON_QM_FILES ${QON_QM_FILES}")
add_custom_target(translations DEPENDS ${QON_QM_FILES})
# Set Build Information
configure_file(${CMAKE_SOURCE_DIR}/include/GpgFrontend.h.in ${CMAKE_SOURCE_DIR}/include/GpgFrontend.h @ONLY)
# Copy Resource Files
-file(COPY ${CMAKE_SOURCE_DIR}/resource/css DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN)
-file(COPY ${CMAKE_SOURCE_DIR}/resource/icons DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN)
-file(COPY ${CMAKE_SOURCE_DIR}/resource/help DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN)
-file(COPY ${CMAKE_SOURCE_DIR}/resource/conf DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN)
+file(COPY ${CMAKE_SOURCE_DIR}/resource/css DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN)
+file(COPY ${CMAKE_SOURCE_DIR}/resource/icons DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN)
+file(COPY ${CMAKE_SOURCE_DIR}/resource/help DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN)
+file(COPY ${CMAKE_SOURCE_DIR}/resource/conf DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN)
+
+# Copy Utils Files
if(MINGW)
message(STATUS "Copying Dependent DLL For Windows Runtime Env")
- file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/lib/ DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN)
- file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/gpgme/ DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN)
- file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/bearer DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN)
- file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/iconengines DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN)
- file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/imageformats DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN)
- file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/printsupport DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN)
- file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/platforms DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ FOLLOW_SYMLINK_CHAIN)
+ file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/lib/ DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN)
+ file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/gpgme/ DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN)
+ file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/bearer DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN)
+ file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/iconengines DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN)
+ file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/imageformats DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN)
+ file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/printsupport DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN)
+ file(COPY ${CMAKE_SOURCE_DIR}/resource/utils/platforms DESTINATION ${EXECUTABLE_OUTPUT_PATH}/ FOLLOW_SYMLINK_CHAIN)
endif()
set(RESOURCE_FILES ${CMAKE_SOURCE_DIR}/gpgfrontend.qrc ${APP_ICON_RESOURCE_WINDOWS} ${QON_QM_FILES})
@@ -53,14 +59,14 @@ endif()
IF (MINGW)
message(STATUS "Link Application Static Library For MINGW")
target_link_libraries(gpgfrontend
- qtui gpg
+ gpgfrontend-ui gpg
Qt5::Network Qt5::PrintSupport Qt5::Widgets Qt5::Test Qt5::Core)
else()
message(STATUS "Link Application Static Library For UNIX")
target_link_libraries(gpgfrontend
- qtui gpg
+ gpgfrontend-ui gpg
Qt5::Network Qt5::PrintSupport Qt5::Widgets Qt5::Test Qt5::Core)
endif()
diff --git a/src/main.cpp b/src/main.cpp
index e9e975d9..7d6a71a3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -72,7 +72,7 @@ int main(int argc, char *argv[]) {
lang = QLocale::system().name();
}
qDebug() << "Language set" << lang;
- translator.load( appPath + "/ts/" + "gpg4usb_" + lang);
+ translator.load( appPath + "/ts/" + "gpgfrontend_" + lang);
qDebug() << "Translator" << translator.filePath();
QApplication::installTranslator(&translator);
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt
index 2527da46..d92a63ed 100644
--- a/src/ui/CMakeLists.txt
+++ b/src/ui/CMakeLists.txt
@@ -1,9 +1,11 @@
-aux_source_directory(. QTUI_SOURCE)
-aux_source_directory(./keypair_details QTUI_SOURCE)
-aux_source_directory(./widgets QTUI_SOURCE)
-aux_source_directory(./keygen QTUI_SOURCE)
+aux_source_directory(. UI_SOURCE)
+aux_source_directory(./keypair_details UI_SOURCE)
+aux_source_directory(./widgets UI_SOURCE)
+aux_source_directory(./keygen UI_SOURCE)
-add_library(qtui STATIC ${QTUI_SOURCE} ${QTUI_KEYPAIR_DETAILS_SOURCE})
+add_library(gpgfrontend-ui STATIC ${UI_SOURCE})
-target_link_libraries(qtui
- Qt5::Network Qt5::PrintSupport Qt5::Widgets Qt5::Test Qt5::Core) \ No newline at end of file
+target_link_libraries(gpgfrontend-ui
+ Qt5::Network Qt5::PrintSupport Qt5::Widgets Qt5::Test Qt5::Core)
+
+message(STATUS "UI SOURCE ${UI_SOURCE}") \ No newline at end of file
diff --git a/src/ui/SettingsDialog.cpp b/src/ui/SettingsDialog.cpp
index 5501dedd..2c130497 100755
--- a/src/ui/SettingsDialog.cpp
+++ b/src/ui/SettingsDialog.cpp
@@ -99,7 +99,7 @@ QHash<QString, QString> SettingsDialog::listLanguages() {
QString appPath = qApp->applicationDirPath();
QDir qmDir = QDir(appPath + "/ts/");
QStringList fileNames =
- qmDir.entryList(QStringList("gpg4usb_*.qm"));
+ qmDir.entryList(QStringList("gpgfrontend_*.qm"));
for (int i = 0; i < fileNames.size(); ++i) {
QString locale = fileNames[i];
@@ -112,7 +112,7 @@ QHash<QString, QString> SettingsDialog::listLanguages() {
QString language = QLocale::languageToString(qloc.language()) +" (" + locale + ")"; //+ " (" + QLocale::languageToString(qloc.language()) + ")";
#else
QString language = qloc.nativeLanguageName() + " (" + locale +
- ")"; //+ " (" + QLocale::languageToString(qloc.language()) + ")";
+ ")";
#endif
languages.insert(locale, language);
}
@@ -167,7 +167,7 @@ GeneralTab::GeneralTab(GpgME::GpgContext *ctx, QWidget *parent)
langBoxLayout->addWidget(langSelectBox);
langBoxLayout->addWidget(
- new QLabel(tr("<b>NOTE: </b> Gpg4usb will restart automatically if you change the language!")));
+ new QLabel(tr("<b>NOTE: </b> GpgFrontend will restart automatically if you change the language!")));
langBox->setLayout(langBoxLayout);
connect(langSelectBox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotLanguageChanged()));