From 4897546b2fe93eaf24f525210b01ffc9431cb987 Mon Sep 17 00:00:00 2001 From: xquiet Date: Sun, 5 Apr 2020 17:58:21 +0200 Subject: [PATCH] refactoring (from yainstall to getaircrafts) --- CMakeLists.txt | 26 +++++++++++++------------- Installer.cpp | 2 +- Installer.h | 6 +++--- yainstall.pro => getaircrafts.pro | 12 +++++++----- yainstall.qrc => getaircrafts.qrc | 0 mainwindow.h | 6 +++--- webservice.cpp | 1 + webservice.h | 6 +++--- xml2html.h | 6 +++--- 9 files changed, 34 insertions(+), 31 deletions(-) rename yainstall.pro => getaircrafts.pro (82%) rename yainstall.qrc => getaircrafts.qrc (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index f61aa28..2efd20f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${GIT_SHA1_VERSI cmake_minimum_required(VERSION 2.8.11) -project(yainstall) +project(getaircrafts) set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ) message( STATUS ${CMAKE_MODULE_PATH} ) @@ -95,15 +95,15 @@ qt5_add_resources(RC_ADDED ${YI_RESOURCES}) qt5_add_translation( QM_FILES ${TS_FILES} ) -add_executable(yainstall ${YI_SOURCES} ${UIS_HDRS} ${RC_ADDED} ${QM_FILES}) +add_executable(getaircrafts ${YI_SOURCES} ${UIS_HDRS} ${RC_ADDED} ${QM_FILES}) -qt5_use_modules( yainstall Widgets LinguistTools Network WebKitWidgets) +qt5_use_modules( getaircrafts Widgets LinguistTools Network WebKitWidgets) -target_link_libraries( yainstall ${LIBZIP_LIBRARY} ) +target_link_libraries( getaircrafts ${LIBZIP_LIBRARY} ) if(UNIX) # NOTE: using qt5_use_modules target_link_libraries can refer just to the other libraries - # target_link_libraries(yainstall yalib Qt5::Widgets Qt5::Network Qt5::WebKitWidgets z) + # target_link_libraries(getaircrafts yalib Qt5::Widgets Qt5::Network Qt5::WebKitWidgets z) if(MACOSX) include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../yalib-build/src") message( STATUS "Including ${CMAKE_CURRENT_SOURCE_DIR}/../yalib-build/src" ) @@ -115,25 +115,25 @@ if(UNIX) ) if(YALIB_LIBRARY) message(STATUS "Found YaLib library at: ${YALIB_LIBRARY}") - target_link_libraries(yainstall ${YALIB_LIBRARY} z) + target_link_libraries(getaircrafts ${YALIB_LIBRARY} z) else(YALIB_LIBRARY) message( STATUS "YaLib Not Found") endif(YALIB_LIBRARY) else(MACOSX) - target_link_libraries(yainstall yalib z) + target_link_libraries(getaircrafts yalib z) endif() elseif(WIN32) if(YALIB_LIBRARIES) - target_link_libraries(yainstall ${YALIB_LIBRARIES} z) + target_link_libraries(getaircrafts ${YALIB_LIBRARIES} z) else(YALIB_LIBRARIES) message( FATAL_ERROR "YaLib Not Found") endif(YALIB_LIBRARIES) endif() # setup version and soversion -set_target_properties( yainstall PROPERTIES VERSION ${VERSION}) +set_target_properties( getaircrafts PROPERTIES VERSION ${VERSION}) -install( TARGETS yainstall DESTINATION bin ) -install( FILES ${QM_FILES} DESTINATION share/yainstall/languages ) -install( FILES ${CSS_FILES} DESTINATION share/yainstall/css ) -install( FILES ${JS_FILES} DESTINATION share/yainstall/js ) +install( TARGETS getaircrafts DESTINATION bin ) +install( FILES ${QM_FILES} DESTINATION share/getaircrafts/languages ) +install( FILES ${CSS_FILES} DESTINATION share/getaircrafts/css ) +install( FILES ${JS_FILES} DESTINATION share/getaircrafts/js ) diff --git a/Installer.cpp b/Installer.cpp index 8cf4139..dce9b1b 100644 --- a/Installer.cpp +++ b/Installer.cpp @@ -24,7 +24,7 @@ bool Installer::uninstall(QString model) } else { - qDebug("The directory %s do not exists or you require more privileges\nTry running yainstall as administrator", + qDebug("The directory %s do not exists or you require more privileges\nTry running getaircrafts as administrator", QString(destinationPath+model).toStdString().data()); } return false; diff --git a/Installer.h b/Installer.h index d973f49..4cea738 100644 --- a/Installer.h +++ b/Installer.h @@ -1,14 +1,14 @@ /** Copyright (C) 2012-2016 Matteo Pasotti - This file is part of yainstall - Yet Another flightgear Aircraft Installer + This file is part of getaircrafts - Yet Another flightgear Aircraft Installer - yainstall is free software: you can redistribute it and/or modify + getaircrafts is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - yainstall is distributed in the hope that it will be useful, + getaircrafts is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/yainstall.pro b/getaircrafts.pro similarity index 82% rename from yainstall.pro rename to getaircrafts.pro index 30e5e9e..e28e18c 100644 --- a/yainstall.pro +++ b/getaircrafts.pro @@ -19,9 +19,11 @@ DEFINES += MIN_VERSION=$$MIN_VERSION DEFINES += PATCH_VERSION=$$PATCH_VERSION DEFINES += STRVERSION=\\\"$${MAX_VERSION}.$${MIN_VERSION}.$${PATCH_VERSION}\\\" -TARGET = yainstall +TARGET = getaircrafts TEMPLATE = app +VERSION = $${MAX_VERSION}.$${MIN_VERSION}.$${PATCH_VERSION} + unix:!macx { LIBS += -lzip -lz target.path = /usr/bin @@ -32,9 +34,9 @@ macx { } win32 { CONFIG += windows - INCLUDEPATH += C:\Users\matteo\workspace\libzip\include - INCLUDEPATH += C:\Users\Matteo\workspace\libzip\lib\libzip\include - LIBS += -LC:\Users\matteo\workspace\libzip\lib -lz -lzip + INCLUDEPATH += C:\Users\Matteo\workspace\libzip-win-build\lib + INCLUDEPATH += C:\Users\Matteo\workspace\libzip-win-build\win32 + LIBS += -LC:\Users\Matteo\workspace\libzip-win-build\build-VS2019\Release -lz -lzip } # for development environment @@ -62,6 +64,6 @@ HEADERS += mainwindow.h \ FORMS += mainwindow.ui RESOURCES += \ - yainstall.qrc + getaircrafts.qrc INSTALLS += target diff --git a/yainstall.qrc b/getaircrafts.qrc similarity index 100% rename from yainstall.qrc rename to getaircrafts.qrc diff --git a/mainwindow.h b/mainwindow.h index e517f4e..65634f8 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -1,14 +1,14 @@ /** Copyright (C) 2012-2016 Matteo Pasotti - This file is part of yainstall - Yet Another flightgear Aircraft Installer + This file is part of getaircrafts - Yet Another flightgear Aircraft Installer - yainstall is free software: you can redistribute it and/or modify + getaircrafts is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - yainstall is distributed in the hope that it will be useful, + getaircrafts is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/webservice.cpp b/webservice.cpp index 8538d80..6a05aa8 100644 --- a/webservice.cpp +++ b/webservice.cpp @@ -3,6 +3,7 @@ webservice::webservice() { userAgent = "Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0"; + // new ref http://mirrors.ibiblio.org/flightgear/ftp/Aircraft-trunk/catalog.xml hostRef = "http://yaflight.grysol.com"; // initializing currentDownload = NULL; diff --git a/webservice.h b/webservice.h index 8b67418..acd686a 100644 --- a/webservice.h +++ b/webservice.h @@ -1,14 +1,14 @@ /** Copyright (C) 2012-2016 Matteo Pasotti - This file is part of yainstall - Yet Another flightgear Aircraft Installer + This file is part of getaircrafts - Yet Another flightgear Aircraft Installer - yainstall is free software: you can redistribute it and/or modify + getaircrafts is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - yainstall is distributed in the hope that it will be useful, + getaircrafts is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/xml2html.h b/xml2html.h index a81c4a1..cbbb689 100644 --- a/xml2html.h +++ b/xml2html.h @@ -1,14 +1,14 @@ /** Copyright (C) 2012-2016 Matteo Pasotti - This file is part of yainstall - Yet Another flightgear Aircraft Installer + This file is part of getaircrafts - Yet Another flightgear Aircraft Installer - yainstall is free software: you can redistribute it and/or modify + getaircrafts is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - yainstall is distributed in the hope that it will be useful, + getaircrafts is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.