From d7e08d4fd65e15fda305de292080c6d36442918b Mon Sep 17 00:00:00 2001 From: arcan1s Date: Sun, 27 Jul 2014 12:48:42 +0400 Subject: [PATCH] create project tree --- .gitignore | 8 +++++ AUTHORS | 2 ++ CHANGELOG | 64 ++++++++++++++++++++++++++++++++++++++ LICENSE => COPYING | 0 create_archive.sh | 17 ++++++++++ sources/CMakeLists.txt | 53 +++++++++++++++++++++++++++++++ sources/reportabug.desktop | 10 ++++++ sources/src/CMakeLists.txt | 43 +++++++++++++++++++++++++ sources/src/main.cpp | 32 +++++++++++++++++++ sources/version.h.in | 21 +++++++++++++ 10 files changed, 250 insertions(+) create mode 100644 AUTHORS create mode 100644 CHANGELOG rename LICENSE => COPYING (100%) create mode 100755 create_archive.sh create mode 100644 sources/CMakeLists.txt create mode 100644 sources/reportabug.desktop create mode 100644 sources/src/CMakeLists.txt create mode 100644 sources/src/main.cpp create mode 100644 sources/version.h.in diff --git a/.gitignore b/.gitignore index 623e5fe..989b8ec 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,11 @@ Makefile* # QtCreator *.autosave + +# build +build +usr + +# archives +*.tar.xz +*.tar.gz diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..f2361b3 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,2 @@ +Current developers: +Evgeniy Alekseev aka arcanis diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..e38907f --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,64 @@ +Ver.1.2.0: ++ [all] added icons ++ [all] added support of netctl-auto ++ [dataengine] added debug information (NETCTLGUI_DEBUG=yes) ++ [gui] added support of macvlan ++ [gui] added ability to remove profile ++ [gui] added support of hidden wifi network ++ [gui] added contextual menu to tables ++ [gui] added actions menu ++ [gui] added clear() function to profileTab ++ [gui] added about window ++ [gui] more command line options ++ [gui] added workaround for wireless-wep example ++ [gui] added shell completions ++ [lib] detached backend from frontend ++ [lib] added error checking ++ [lib] added doxygen documentation ++ [plasmoid] added dataengine configuration ++ [plasmoid] added about window ++ [plasmoid] added debug information (NETCTLGUI_DEBUG=yes) +- [gui] fix possible segfaults with null arrays (#5) +* [all] changes in the project architecture +* [all] refactoring +* [gui] more debug information +* [gui] changed lineEdit_profile to comboBox +* [gui] refactoring of configuration interface +* [gui] changed setting of the interface to profile tab +* [gui] rewrited ErrorWindow class +* [lib] more debug information +* [lib] rewrited getSettingsFromProfile() function +* [plasmoid] edited configuration interface +* [plasmoid] changed double click event to click event + +Ver.1.1.0 (netctl-1.7 update): ++ [gui] added frequency ++ [plasmoid] added menu title +* [dataengine] changed definition if profile is enabled +* [gui] changed definition if profile is enabled + +Ver.1.0.6: +* [gui] fix error checking + +Ver.1.0.5: ++ [plasmoid] added "Start WiFi menu" function +* [plasmoid] refactoring +* [plasmoid] edited icon + +Ver.1.0.4: ++ [gui] added Qt5 gui (by default) ++ [plasmoid] added notifications +* [plasmoid] fix run command with sudo from plasmoid + +Ver.1.0.3: ++ [plasmoid] edited russian translation +* [all] refactoring + +Ver.1.0.2: +* [plasmoid] fix layout margins + +Ver.1.0.1: +- [all] removed scripts + +Ver.1.0: +First release diff --git a/LICENSE b/COPYING similarity index 100% rename from LICENSE rename to COPYING diff --git a/create_archive.sh b/create_archive.sh new file mode 100755 index 0000000..1622fed --- /dev/null +++ b/create_archive.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +ARCHIVE="reportabug" +SRCDIR="sources" +FILES="AUTHORS CHANGELOG COPYING README.md" +IGNORELIST="build *.cppcheck" +VERSION=$(grep -m1 PROJECT_VERSION_MAJOR sources/CMakeLists.txt | awk '{print $3}' | cut -c 1).\ +$(grep -m1 PROJECT_VERSION_MINOR sources/CMakeLists.txt | awk '{print $3}' | cut -c 1).\ +$(grep -m1 PROJECT_VERSION_PATCH sources/CMakeLists.txt | awk '{print $3}' | cut -c 1) +# create archive +[[ -e ${ARCHIVE}-${VERSION}-src.tar.xz ]] && rm -f "${ARCHIVE}-${VERSION}-src.tar.xz" +[[ -d ${ARCHIVE} ]] && rm -rf "${ARCHIVE}" +cp -r "${SRCDIR}" "${ARCHIVE}" +for FILE in ${FILES[*]}; do cp -r "$FILE" "${ARCHIVE}"; done +for FILE in ${IGNORELIST[*]}; do find "${ARCHIVE}" -name "${FILE}" -exec rm -rf {} \;; done +tar cJf "${ARCHIVE}-${VERSION}-src.tar.xz" "${ARCHIVE}" +rm -rf "${ARCHIVE}" diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt new file mode 100644 index 0000000..3269b1a --- /dev/null +++ b/sources/CMakeLists.txt @@ -0,0 +1,53 @@ +cmake_minimum_required (VERSION 2.8) + +cmake_policy (SET CMP0003 OLD) +cmake_policy (SET CMP0002 OLD) +cmake_policy (SET CMP0011 NEW) +cmake_policy (SET CMP0015 NEW) + +project (reportabug) + +set (SUBPROJECT reportabug) +set (PROJECT_AUTHOR "Evgeniy Alekseev") +set (PROJECT_CONTACT "esalexeev@gmail.com") +set (PROJECT_LICENSE "GPLv3") +set (PROJECT_VERSION_MAJOR 1) +set (PROJECT_VERSION_MINOR 0) +set (PROJECT_VERSION_PATCH 0) +set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) +string (TIMESTAMP CURRENT_DATE "%Y-%m-%d %H:%M" UTC) +string (TIMESTAMP CURRENT_YEAR "%Y") + +message (STATUS "Subproject: ${SUBPROJECT}") +message (STATUS "Version: ${PROJECT_VERSION}") +message (STATUS "Build date: ${CURRENT_DATE}") + +# install options +option (USE_QT5 "Use Qt5 instead of Qt4" ON) + +# flags +if (CMAKE_COMPILER_IS_GNUCXX) + set (ADD_CXX_FLAGS "-Wall") + set (CMAKE_CXX_FLAGS "-O0 ${ADD_CXX_FLAGS}") + set (CMAKE_CXX_FLAGS_DEBUG "-g -O0") + set (CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG") +else () + message (STATUS "Unknown compiler") +endif () + +configure_file (${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h) + +# build +# set directories +set (SUBPROJECT_BINARY_DIR bin) +set (SUBPROJECT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src) +# executable path +set (EXECUTABLE_OUTPUT_PATH ${SUBPROJECT_BINARY_DIR}) + +# additional targets +set (TARGETS "") +set (HEADERS "") + +add_subdirectory (${SUBPROJECT_SOURCE_DIR}) + +install (FILES ${SUBPROJECT}.desktop DESTINATION share/applications/) diff --git a/sources/reportabug.desktop b/sources/reportabug.desktop new file mode 100644 index 0000000..07bd87a --- /dev/null +++ b/sources/reportabug.desktop @@ -0,0 +1,10 @@ +#!/usr/bin/env xdg-open +[Desktop Entry] +Name=Report a bug +Comment=A simple Qt application which allows users to create an issue for GitHub projects +Exec=reportabug +Icon=tools-report-bug +Terminal=false +Encoding=UTF-8 +Type=Application +Categories=system diff --git a/sources/src/CMakeLists.txt b/sources/src/CMakeLists.txt new file mode 100644 index 0000000..95d5625 --- /dev/null +++ b/sources/src/CMakeLists.txt @@ -0,0 +1,43 @@ +# set files +file (GLOB SOURCES *.cpp) +file (GLOB HEADERS *.h) +file (GLOB FORMS *.ui) + +# include_path +include_directories (${CMAKE_CURRENT_BINARY_DIR}/../ + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR}) + +if (USE_QT5) + find_package(Qt5Core REQUIRED) + find_package(Qt5Widgets REQUIRED) + add_definitions(${Qt5Core_DEFINITIONS}) + add_definitions(${Qt5Widgets_DEFINITIONS}) + add_definitions(${Qt5LinguistTools_DEFINITIONS}) + qt5_wrap_cpp (MOC_SOURCES ${HEADERS}) + qt5_wrap_ui (UI_HEADERS ${FORMS}) + + source_group ("Header Files" FILES ${HEADERS}) + source_group ("Source Files" FILES ${SOURCES}) + source_group ("Generated Files" FILES ${MOC_SOURCES}) + + include_directories (${Qt5Core_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS}) + add_executable (${SUBPROJECT} ${UI_HEADERS} ${HEADERS} ${SOURCES} ${MOC_SOURCES}) + target_link_libraries (${SUBPROJECT} ${Qt5Widgets_LIBRARIES} ${Qt5Core_LIBRARIES}) +else () + find_package (Qt4 REQUIRED) + include (${QT_USE_FILE}) + qt4_wrap_cpp (MOC_SOURCES ${HEADERS}) + qt4_wrap_ui (UI_HEADERS ${FORMS}) + + source_group ("Header Files" FILES ${HEADERS}) + source_group ("Source Files" FILES ${SOURCES}) + source_group ("Generated Files" FILES ${MOC_SOURCES}) + + add_executable (${SUBPROJECT} ${UI_HEADERS} ${HEADERS} ${SOURCES} ${MOC_SOURCES}) + target_link_libraries (${SUBPROJECT} ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY}) +endif() + +# install properties +install (TARGETS ${SUBPROJECT} DESTINATION bin) diff --git a/sources/src/main.cpp b/sources/src/main.cpp new file mode 100644 index 0000000..37891da --- /dev/null +++ b/sources/src/main.cpp @@ -0,0 +1,32 @@ +/*************************************************************************** + * This file is part of reportabug * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 3.0 of the License, or (at your option) any later version. * + * * + * This library 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 * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with this library. * + ***************************************************************************/ + + +#include + +#include "mainwindow.h" +#include "version.h" + + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + + MainWindow w; + w.show(); + return a.exec(); +} diff --git a/sources/version.h.in b/sources/version.h.in new file mode 100644 index 0000000..ce5a954 --- /dev/null +++ b/sources/version.h.in @@ -0,0 +1,21 @@ +#ifndef VERSION_H +#define VERSION_H + +#define NAME "Report a Bug" +#define VERSION "@PROJECT_VERSION@" +#define AUTHOR "@PROJECT_AUTHOR@" +#define EMAIL "@PROJECT_CONTACT@" +#define LICENSE "@PROJECT_LICENSE@" + +#define HOMEPAGE "https://github.com/arcan1s/reportabug" +#define REPOSITORY "https://github.com/arcan1s/reportabug" +#define BUGTRACKER "https://github.com/arcan1s/reportabug/issues" + +#define BUILD_DATE "@CURRENT_DATE@" +#define DATE "2014-@CURRENT_YEAR@" + +#define CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@" +#define CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@" +#define PROJECT_USE_QT5 "@USE_QT5@" + +#endif /* VERSION_H */