Skip to content

Commit

Permalink
refactoring (from yainstall to getaircrafts)
Browse files Browse the repository at this point in the history
  • Loading branch information
xquiet committed Apr 5, 2020
1 parent fcfb174 commit 4897546
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 31 deletions.
26 changes: 13 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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} )
Expand Down Expand Up @@ -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" )
Expand All @@ -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 )
2 changes: 1 addition & 1 deletion Installer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions Installer.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/**
Copyright (C) 2012-2016 Matteo Pasotti <[email protected]>
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.
Expand Down
12 changes: 7 additions & 5 deletions yainstall.pro → getaircrafts.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -62,6 +64,6 @@ HEADERS += mainwindow.h \
FORMS += mainwindow.ui

RESOURCES += \
yainstall.qrc
getaircrafts.qrc

INSTALLS += target
File renamed without changes.
6 changes: 3 additions & 3 deletions mainwindow.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/**
Copyright (C) 2012-2016 Matteo Pasotti <[email protected]>
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.
Expand Down
1 change: 1 addition & 0 deletions webservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions webservice.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/**
Copyright (C) 2012-2016 Matteo Pasotti <[email protected]>
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.
Expand Down
6 changes: 3 additions & 3 deletions xml2html.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/**
Copyright (C) 2012-2016 Matteo Pasotti <[email protected]>
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.
Expand Down

0 comments on commit 4897546

Please sign in to comment.