├── .gitignore ├── CMakeLists.txt ├── LICENCE ├── Licence.rtf ├── README.md ├── resources └── resources.qrc ├── source ├── CMakeLists.txt ├── defines.h.cmake ├── main.cpp ├── main_window.cpp ├── main_window.h └── main_window.ui ├── tests ├── CMakeLists.txt ├── defines.h.cmake └── example_tests.cpp.example └── win ├── CMakeLists.txt ├── appicon.ico ├── installer.cmake.nsi ├── installer.cmake.wxs ├── qt.conf └── resources.rc /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.swp 3 | *.swo 4 | /build 5 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### 2 | # Copyright (c) 2009, Paul Gideon Dann 3 | # 4 | # Permission to use, copy, modify, and/or distribute this software for any 5 | # purpose with or without fee is hereby granted, provided that the above 6 | # copyright notice and this permission notice appear in all copies. 7 | # 8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 | ### 16 | 17 | cmake_minimum_required(VERSION 2.8.11) 18 | 19 | # Default configuration values. These must be before the project command or 20 | # they won't work in Windows. 21 | # If no build type is specified, default to "Release" 22 | if (NOT CMAKE_BUILD_TYPE) 23 | set(CMAKE_BUILD_TYPE Release CACHE STRING 24 | "None Debug Release RelWithDebInfo MinSizeRel" 25 | FORCE) 26 | endif() 27 | # Install to "dist" directory in Windows for testing and as a staging directory 28 | # for the installer. 29 | if (WIN32 AND NOT CMAKE_INSTALL_PREFIX) 30 | set(CMAKE_INSTALL_PREFIX dist CACHE STRING "Install path prefix.") 31 | endif() 32 | 33 | project(example) 34 | set(PROJECT_LONGNAME "Example") 35 | set(PROJECT_VERSION "1.0.0") 36 | 37 | # Global CMake options 38 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 39 | set(CMAKE_AUTOMOC ON) 40 | 41 | # Configure Qt 42 | find_package(Qt5Widgets REQUIRED) 43 | find_package(Qt5Test REQUIRED) 44 | 45 | if (NOT MSVC) 46 | # Enable the C++11 standard 47 | set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -std=c++11) 48 | endif() 49 | 50 | # Testing configuration 51 | enable_testing() 52 | set(TEST_LINK_LIBRARIES Qt5::Test) 53 | 54 | add_subdirectory(source) 55 | add_subdirectory(tests) 56 | 57 | if (WIN32) 58 | add_subdirectory(win) 59 | endif() 60 | -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009, The Author 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /Licence.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\deff4\adeflang1025 2 | {\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Times New Roman;}{\f4\froman\fprq0\fcharset1 Bitstream Vera Serif;}{\f5\fswiss\fprq0\fcharset1 Bitstream Vera Sans;}{\f6\fswiss\fprq2\fcharset1 Bitstream Vera Sans;}{\f7\fswiss\fprq0\fcharset1 Sans-serif{\*\falt Arial};}{\f8\fmodern\fprq0\fcharset1 Bitstream Vera Sans Mono;}{\f9\froman\fprq2\fcharset1 Cambria;}{\f10\fswiss\fprq2\fcharset1 Arial;}{\f11\fnil\fprq2\fcharset0 Bitstream Vera Sans;}{\f12\fnil\fprq2\fcharset0 Arial;}{\f13\fmodern\fprq1\fcharset0 Bitstream Vera Sans Mono;}{\f14\fswiss\fprq0\fcharset1 FreeSans;}{\f15\fnil\fprq0\fcharset1 FreeSans;}{\f16\fmodern\fprq0\fcharset1 FreeSans;}} 3 | {\colortbl;\red0\green0\blue0;\red128\green128\blue128;} 4 | {\stylesheet{\s0\snext0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\dbch\af12\langfe2052\dbch\af15\afs24\alang1081\cf0\kerning1\loch\f4\fs24\lang2057 Normal;} 5 | {\s15\sbasedon0\snext16\ql\nowidctlpar\sb240\sa120\keepn\ltrpar\dbch\af11\langfe2052\dbch\af15\afs28\alang1081\loch\f5\fs28\lang2057 Heading;} 6 | {\s16\sbasedon0\snext16\ql\nowidctlpar\sb0\sa120\ltrpar\dbch\af12\langfe2052\dbch\af15\afs24\alang1081\loch\f4\fs24\lang2057 Text Body;} 7 | {\s17\sbasedon16\snext17\ql\nowidctlpar\sb0\sa120\ltrpar\dbch\af12\langfe2052\dbch\af14\afs24\alang1081\loch\f4\fs24\lang2057 List;} 8 | {\s18\sbasedon0\snext18\ql\nowidctlpar\sb120\sa120\noline\ltrpar\i\dbch\af12\langfe2052\dbch\af14\afs24\alang1081\ai\loch\f4\fs24\lang2057 Caption;} 9 | {\s19\sbasedon0\snext19\ql\nowidctlpar\noline\ltrpar\dbch\af12\langfe2052\dbch\af14\afs24\alang1081\loch\f4\fs24\lang2057 Index;} 10 | {\s20\sbasedon0\snext20\ql\nowidctlpar\sb0\sa0\ltrpar\dbch\af13\langfe2052\dbch\af16\afs20\alang1081\loch\f8\fs20\lang2057 Preformatted Text;} 11 | }{\info{\creatim\yr0\mo0\dy0\hr0\min0}{\revtim\yr0\mo0\dy0\hr0\min0}{\printim\yr0\mo0\dy0\hr0\min0}{\comment LibreOffice}{\vern67174658}}\deftab709 12 | \viewscale90 13 | {\*\pgdsctbl 14 | {\pgdsc0\pgdscuse451\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\pgdscnxt0 Default Style;}} 15 | \formshade{\*\pgdscno0}\paperh16838\paperw11906\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\sectunlocked1\pgndec\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc 16 | \pgndec\pard\plain \s20\ql\nowidctlpar\sb0\sa0\ltrpar\dbch\af13\langfe2052\dbch\af16\afs20\alang1081\loch\f8\fs20\lang2057{\alang1025\rtlch \ltrch\loch\loch\f10 17 | Copyright (c) 2009, The Author} 18 | \par \pard\plain \s20\ql\nowidctlpar\sb0\sa0\ltrpar\dbch\af13\langfe2052\dbch\af16\afs20\alang1081\loch\f8\fs20\lang2057\alang1025\rtlch \ltrch\loch\loch\f10 19 | 20 | \par \pard\plain \s20\ql\nowidctlpar\sb0\sa0\ltrpar\dbch\af13\langfe2052\dbch\af16\afs20\alang1081\loch\f8\fs20\lang2057{\alang1025\rtlch \ltrch\loch\loch\f10 21 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.} 22 | \par \pard\plain \s20\ql\nowidctlpar\sb0\sa0\ltrpar\dbch\af13\langfe2052\dbch\af16\afs20\alang1081\loch\f8\fs20\lang2057\alang1025\rtlch \ltrch\loch\loch\f10 23 | 24 | \par \pard\plain \s20\ql\nowidctlpar\sb0\sa0\ltrpar\dbch\af13\langfe2052\dbch\af16\afs20\alang1081\loch\f8\fs20\lang2057{\alang1025\rtlch \ltrch\loch\loch\f10 25 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.} 26 | \par } 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DESCRIPTION 2 | ========== 3 | 4 | This is a template that I created to simplify the development of cross-platform 5 | tools written in Qt/C++. It uses CMake, and forms a nice, solid base on which to 6 | get started with a project, so that you don't need to worry about setting up the 7 | build system, installers, etc... 8 | 9 | Suggestions for improvement are very welcome. The licence for the template 10 | itself is ISC. Essentially, do what you like with it. I hope you find it useful. 11 | 12 | * A basic example application is included. 13 | 14 | * Just tweak your project name and version number in the top-level CMakeLists 15 | file and you're good to go. 16 | 17 | * A `defines.h` file is generated, containing your application name and version. 18 | You can easily add to this. 19 | 20 | * By default, no need to add each of your source files to a CMakeLists file, 21 | even if you organise them into subdirectories. The price you pay for this is 22 | needing to invoke `cmake` whenever you add a new source file. This may become 23 | a pain in teams, but it's trivial to change. 24 | 25 | * A Qt resources file is ready and waiting for you to add images or other 26 | resources to your project. It's already compiled-in by default. 27 | 28 | * The `test` directory is set up for you to make it easy for you to start 29 | writing unit tests right from the start. 30 | 31 | * An application icon file is added to your project in Windows, and you can 32 | easily overwrite the default one. 33 | 34 | * For Windows, supports both WinGW and Visual Studio compilers. 35 | 36 | * For Windows, there is a choice between NSIS and WiX-based installers. Both 37 | are automatically configured with your choice of project name from the 38 | top-level CMakeLists file. When you have chosen which you will use, it is 39 | straight-forward to remove everything relating to the other one: just edit 40 | `win/CMakeLists.txt`. 41 | 42 | BUILDING IN LINUX 43 | ================= 44 | 45 | As with any CMake project, create a `build` folder, enter the directory, and 46 | invoke cmake and make: 47 | 48 | mkdir build 49 | cd build 50 | cmake .. 51 | make -j 52 | 53 | Where `` is the number of jobs to run in parallel (usually the number 54 | of cores plus one). 55 | 56 | BUILDING IN WINDOWS 57 | =================== 58 | 59 | Dependencies 60 | ------------ 61 | 62 | ### The Qt Libraries 63 | http://qt-project.org/downloads 64 | 65 | You can use either the MinGW version, or one of the Visual Studio versions. 66 | 67 | ### CMake 68 | http://www.cmake.org/cmake/resources/software.html 69 | 70 | ### NSIS or WiX 71 | http://nsis.sourceforge.net 72 | http://wixtoolset.org 73 | 74 | Targets 75 | ------- 76 | 77 | In Windows, there are two additional "targets" defined in CMake configuration: 78 | * *install*: This target installs the application and the DLLs it depends 79 | on into the `dist` directory. This is to simplify testing and packaging the 80 | application. The list of files to install is in `win/CMakeLists.txt`. 81 | * *installer*: This target compiles the WiX installer, but will only be 82 | available if WiX was found in the PATH, or the `WIX_PATH` CMake variable is 83 | defined. 84 | 85 | Building 86 | -------- 87 | 88 | ### Using QtCreator (Visual Studio or MinGW) 89 | 90 | * Open QtCreator. 91 | * File -> Open File or Project 92 | * Open the top-level CMakeLists.txt file in the project folder. 93 | * Choose a build location. 94 | * Click "Run CMake". 95 | * Click "Finish". 96 | * If you want to enable the WiX installer: 97 | * On the left bar, click "Projects". 98 | * Next to "Edit build configuration", click "Add" -> "Clone Selected". 99 | * Name the configuration "installer". 100 | * Under "Build Steps", expand Details, and check "install" and "installer". 101 | * Click the Build button in the bottom-left-hand corner, shaped like a hammer. 102 | 103 | ### Using the command-line 104 | 105 | #### Visual Studio 2010 106 | 107 | * Create a `build` directory in the source directory. 108 | * Open a VS 2010 Command Prompt, and change into the build directory. 109 | * Ensure that the following are on the PATH: 110 | * CMake's cmake.exe 111 | * Qt's qmake.exe 112 | * WiX's candle.exe (if you want the WiX installer) 113 | * Enter the following commands: 114 | 115 | ``` 116 | cmake -G "NMake Makefiles" .. 117 | nmake install 118 | ``` 119 | 120 | * To build the WiX installer, also run: 121 | 122 | ``` 123 | nmake installer 124 | ``` 125 | 126 | #### MinGW 127 | 128 | * Create a `build` directory in the source directory. 129 | * Open a Qt MinGW Command Prompt, and change into the build directory. 130 | * Ensure that the following are on the PATH: 131 | * CMake's cmake.exe 132 | * Qt's qmake.exe 133 | * WiX's candle.exe (if you want the WiX installer) 134 | * Enter the following commands: 135 | 136 | ``` 137 | cmake -G "MinGW Makefiles" .. 138 | mingw32-make install 139 | ``` 140 | 141 | * To build the WiX installer, also run: 142 | 143 | ``` 144 | mingw32-make installer 145 | ``` 146 | 147 | ### WiX Installer 148 | 149 | The WiX Installer is more advanced, and better integrated into Windows. It is 150 | also more complex, and gaining a thorough understanding of how it works requires 151 | time and patience. It may be worth your while reading up on WiX and the Windows 152 | Installer framework in order to reach a deeper understanding. However, I've done 153 | the hard work for you, and unless you have very complex requirements, you should 154 | be able to simply modify this script without any ill effects. 155 | 156 | Before the installer will compile successfully, you must generate a fresh UUID 157 | (e.g. using `uuidgen` in Linux), and place this in the `win/installer.cmake.wxs` 158 | file in place of the `YOUR-GENERATED-UUID-HERE` placeholder. 159 | 160 | Note that the WiX source file by default expects that your project was built 161 | with Visual Studio 2010, and will attempt to package the Visual Studio 2010 162 | runtime DLLs. You'll need to modify it by hand if you use a different version 163 | of Visual Studio, or MinGW. This is very straight-forward. 164 | 165 | IMPORTANT: The `installer.cmake.wxs` file is processed by CMake before it is 166 | passed to WiX, and the processed file is placed in the build directory. If 167 | you wish to make any modifications to the installer, make sure that you edit 168 | `installer.cmake.wxs` in the source directory, and not `installer.wxs` in the 169 | build directory, which will be overwritten! 170 | 171 | ### NSIS Installer 172 | 173 | The NSIS installer is quite simple, and it's relatively easy to understand 174 | exactly what it's doing. However, you need to take greater care in ensuring 175 | that whatever is installed is also correctly uninstalled. Also, MSI installers 176 | (such as WiX) are increasingly becoming the norm, especially in corporate 177 | environments, because of their thorough integration with Windows. 178 | 179 | In the build directory, you will find an `installer.nsi` file. This is an NSIS 180 | script. Right-click, and click "Compile NSIS Script". By default, the script 181 | expects that your project was compiled with MinGW, and will attempt to package 182 | the MinGW runtime DLLs. It is straight-forward to change this. 183 | 184 | IMPORTANT: Never modify the `installer.nsi` file found in the build directory, 185 | because it will be overwritten whenever CMake is run. Always modify the 186 | `installer.nsi.cmake` file in the `win` directory instead. 187 | -------------------------------------------------------------------------------- /resources/resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /source/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### 2 | # Copyright (c) 2009, Paul Gideon Dann 3 | # 4 | # Permission to use, copy, modify, and/or distribute this software for any 5 | # purpose with or without fee is hereby granted, provided that the above 6 | # copyright notice and this permission notice appear in all copies. 7 | # 8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 | ### 16 | 17 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/defines.h.cmake 18 | ${CMAKE_CURRENT_BINARY_DIR}/defines.h) 19 | 20 | file(GLOB_RECURSE UI_FILES *.ui) 21 | file(GLOB_RECURSE CODE_FILES *.cpp) 22 | 23 | qt5_wrap_ui(UI_HEADERS ${UI_FILES}) 24 | qt5_add_resources(RESOURCE_FILES ../resources/resources.qrc) 25 | 26 | # Windows application icon 27 | if (WIN32) 28 | set(WINDOWS_RES_FILE ${CMAKE_CURRENT_BINARY_DIR}/resources.obj) 29 | if (MSVC) 30 | add_custom_command(OUTPUT ${WINDOWS_RES_FILE} 31 | COMMAND rc.exe /fo ${WINDOWS_RES_FILE} resources.rc 32 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/win 33 | ) 34 | else() 35 | add_custom_command(OUTPUT ${WINDOWS_RES_FILE} 36 | COMMAND windres.exe resources.rc ${WINDOWS_RES_FILE} 37 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/win 38 | ) 39 | endif() 40 | endif() 41 | 42 | add_executable(${CMAKE_PROJECT_NAME} WIN32 43 | ${UI_HEADERS} 44 | ${CODE_FILES} 45 | ${RESOURCE_FILES} 46 | ${WINDOWS_RES_FILE} 47 | ) 48 | target_link_libraries(${CMAKE_PROJECT_NAME} 49 | Qt5::Widgets 50 | ) 51 | 52 | if (UNIX) 53 | install(TARGETS ${CMAKE_PROJECT_NAME} 54 | RUNTIME DESTINATION bin) 55 | elseif (WIN32) 56 | install(TARGETS ${CMAKE_PROJECT_NAME} 57 | DESTINATION .) 58 | endif() 59 | -------------------------------------------------------------------------------- /source/defines.h.cmake: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Paul Gideon Dann 3 | * 4 | * Permission to use, copy, modify, and/or distribute this software for any 5 | * purpose with or without fee is hereby granted, provided that the above 6 | * copyright notice and this permission notice appear in all copies. 7 | * 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 | */ 16 | 17 | #ifndef GLOBAL_DEFINES_H 18 | #define GLOBAL_DEFINES_H 19 | 20 | // An anonymous namespace restricts these variables to the scope of the 21 | // compilation unit. 22 | namespace { 23 | const char* PROJECT_LONGNAME = "@PROJECT_LONGNAME@" 24 | const char* PROJECT_VERSION = "@PROJECT_VERSION@" 25 | } 26 | 27 | #endif 28 | // vim: ft=cpp 29 | -------------------------------------------------------------------------------- /source/main.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Paul Gideon Dann 3 | * 4 | * Permission to use, copy, modify, and/or distribute this software for any 5 | * purpose with or without fee is hereby granted, provided that the above 6 | * copyright notice and this permission notice appear in all copies. 7 | * 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 | */ 16 | #include 17 | #include "main_window.h" 18 | 19 | /** 20 | * Entry Point 21 | */ 22 | int main(int argc, char* argv[]) 23 | { 24 | QApplication app(argc, argv); 25 | MainWindow mainWindow; 26 | 27 | mainWindow.show(); 28 | 29 | return app.exec(); 30 | } 31 | -------------------------------------------------------------------------------- /source/main_window.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Paul Gideon Dann 3 | * 4 | * Permission to use, copy, modify, and/or distribute this software for any 5 | * purpose with or without fee is hereby granted, provided that the above 6 | * copyright notice and this permission notice appear in all copies. 7 | * 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 | */ 16 | #include "main_window.h" 17 | #include "moc_main_window.cpp" 18 | 19 | /** 20 | * Constructor 21 | */ 22 | MainWindow::MainWindow(QMainWindow* parent) 23 | : QMainWindow(parent) 24 | { 25 | this->ui.setupUi(this); 26 | } 27 | -------------------------------------------------------------------------------- /source/main_window.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2009, Paul Gideon Dann 3 | * 4 | * Permission to use, copy, modify, and/or distribute this software for any 5 | * purpose with or without fee is hereby granted, provided that the above 6 | * copyright notice and this permission notice appear in all copies. 7 | * 8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 | */ 16 | #ifndef MAIN_WINDOW_H 17 | #define MAIN_WINDOW_H 18 | 19 | #include 20 | #include "ui_main_window.h" 21 | 22 | /** 23 | * Main window class for the application 24 | */ 25 | class MainWindow : public QMainWindow 26 | { 27 | Q_OBJECT 28 | 29 | public: 30 | MainWindow(QMainWindow* parent = 0); 31 | 32 | private: 33 | Ui::MainWindow ui; 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /source/main_window.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 530 10 | 140 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 21 | Qt::Vertical 22 | 23 | 24 | 25 | 20 26 | 16 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 20 36 | 37 | 38 | 39 | This is an example application. 40 | 41 | 42 | 43 | 44 | 45 | 46 | Qt::Vertical 47 | 48 | 49 | 50 | 20 51 | 17 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | Exit 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 0 69 | 0 70 | 530 71 | 26 72 | 73 | 74 | 75 | 76 | &File 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | E&xit 86 | 87 | 88 | Ctrl+Q 89 | 90 | 91 | 92 | 93 | 94 | 95 | pushButton 96 | clicked() 97 | MainWindow 98 | close() 99 | 100 | 101 | 290 102 | 264 103 | 104 | 105 | 252 106 | 196 107 | 108 | 109 | 110 | 111 | actionE_xit 112 | triggered() 113 | MainWindow 114 | close() 115 | 116 | 117 | -1 118 | -1 119 | 120 | 121 | 394 122 | 152 123 | 124 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### 2 | # Copyright (c) 2009, Paul Gideon Dann 3 | # 4 | # Permission to use, copy, modify, and/or distribute this software for any 5 | # purpose with or without fee is hereby granted, provided that the above 6 | # copyright notice and this permission notice appear in all copies. 7 | # 8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 | ### 16 | 17 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/defines.h.cmake 18 | ${CMAKE_CURRENT_BINARY_DIR}/defines.h) 19 | 20 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../source) 21 | 22 | set(TEST_ROOT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) 23 | string(LENGTH ${TEST_ROOT_DIRECTORY} TEST_ROOT_DIRECTORY_LENGTH) 24 | math(EXPR TEST_ROOT_DIRECTORY_LENGTH "${TEST_ROOT_DIRECTORY_LENGTH} + 1") 25 | 26 | function(test_directory) 27 | include_directories(${CMAKE_CURRENT_BINARY_DIR}) 28 | 29 | file(GLOB TEST_FILES *_tests.cpp) 30 | foreach(TEST_FILE ${TEST_FILES}) 31 | # The name of the test should contain the directory, relative to the test 32 | # directory root 33 | string(SUBSTRING ${TEST_FILE} ${TEST_ROOT_DIRECTORY_LENGTH} -1 34 | TEST_FILE_RELATIVE) 35 | string(LENGTH ${TEST_FILE_RELATIVE} TEST_FILE_RELATIVE_LENGTH) 36 | math(EXPR TEST_NAME_LENGTH "${TEST_FILE_RELATIVE_LENGTH} - 4") 37 | string(SUBSTRING ${TEST_FILE_RELATIVE} 0 ${TEST_NAME_LENGTH} TEST_NAME) 38 | 39 | get_filename_component(TEST_TARGET ${TEST_FILE} NAME_WE) 40 | 41 | add_executable(${TEST_TARGET} ${TEST_FILE}) 42 | target_link_libraries(${TEST_TARGET} ${TEST_LINK_LIBRARIES}) 43 | add_test(${TEST_NAME} ${TEST_TARGET}) 44 | endforeach(TEST_FILE) 45 | 46 | # Descend into any subdirectories that have CMakeLists.txt files. Each of 47 | # those should generally simply include a call to test_directory(). 48 | file(GLOB SUBDIRECTORIES *) 49 | foreach (SUBDIRECTORY ${SUBDIRECTORIES}) 50 | if (IS_DIRECTORY ${SUBDIRECTORY}) 51 | if (EXISTS ${SUBDIRECTORY}/CMakeLists.txt) 52 | add_subdirectory(${SUBDIRECTORY}) 53 | endif() 54 | endif() 55 | endforeach(SUBDIRECTORY) 56 | endfunction(test_directory) 57 | 58 | test_directory() 59 | -------------------------------------------------------------------------------- /tests/defines.h.cmake: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011, Yotta DCL 3 | * All rights reserved. 4 | */ 5 | 6 | #ifndef TESTS_DEFINES_H 7 | #define TESTS_DEFINES_H 8 | 9 | // Define constants here that will be useful in your tests (e.g. fixture 10 | // directories). 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /tests/example_tests.cpp.example: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2011, Yotta DCL 3 | * All rights reserved. 4 | */ 5 | 6 | #include 7 | #include "defines.h" 8 | 9 | class ExampleTests : public QObject 10 | { 11 | Q_OBJECT 12 | 13 | private slots: 14 | void exampleOne(); 15 | }; 16 | 17 | /** 18 | * Example test 19 | */ 20 | void ExampleTests::exampleOne() 21 | { 22 | QVERIFY(1 == 1); 23 | } 24 | 25 | QTEST_MAIN(ExampleTests) 26 | #include "example_tests.moc" 27 | -------------------------------------------------------------------------------- /win/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ### 2 | # Copyright (c) 2009, Paul Gideon Dann 3 | # 4 | # Permission to use, copy, modify, and/or distribute this software for any 5 | # purpose with or without fee is hereby granted, provided that the above 6 | # copyright notice and this permission notice appear in all copies. 7 | # 8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 | ### 16 | 17 | # Ensure that WiX is in the path 18 | find_path(WIX_PATH candle.exe) 19 | if (NOT WIX_PATH) 20 | message(WARNING "Unable to find WiX in the PATH. The WiX installer will be disabled.") 21 | endif() 22 | 23 | # Configure the installer scripts 24 | configure_file(installer.cmake.nsi ${CMAKE_BINARY_DIR}/installer.nsi @ONLY) 25 | configure_file(installer.cmake.wxs installer.wxs @ONLY) 26 | 27 | # Compiler Runtime DLLs 28 | if (MSVC) 29 | # Visual Studio 30 | set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP true) 31 | include(InstallRequiredSystemLibraries) 32 | install(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION .) 33 | else() 34 | # MinGW 35 | get_filename_component(MINGW_DLL_DIR ${CMAKE_CXX_COMPILER} PATH) 36 | install(FILES 37 | ${MINGW_DLL_DIR}/libgcc_s_dw2-1.dll 38 | ${MINGW_DLL_DIR}/libstdc++-6.dll 39 | ${MINGW_DLL_DIR}/libwinpthread-1.dll 40 | DESTINATION . 41 | ) 42 | endif() 43 | 44 | # Qt Libraries 45 | get_target_property(QtCore_LOCATION Qt5::Core LOCATION) 46 | get_filename_component(QT_DLL_DIR ${QtCore_LOCATION} PATH) 47 | install(FILES 48 | ${QT_DLL_DIR}/icudt51.dll 49 | ${QT_DLL_DIR}/icuin51.dll 50 | ${QT_DLL_DIR}/icuuc51.dll 51 | ${QT_DLL_DIR}/Qt5Core.dll 52 | ${QT_DLL_DIR}/Qt5Gui.dll 53 | ${QT_DLL_DIR}/Qt5Widgets.dll 54 | ${CMAKE_SOURCE_DIR}/win/qt.conf 55 | DESTINATION . 56 | ) 57 | # Qt Platform Plugin 58 | install(FILES 59 | ${QT_DLL_DIR}/../plugins/platforms/qwindows.dll 60 | DESTINATION plugins/platforms 61 | ) 62 | 63 | # Custom target to build the WiX installer. Should be run after the install 64 | # target. 65 | if (WIX_PATH) 66 | add_custom_target(installer 67 | COMMAND ${WIX_PATH}/candle.exe ${CMAKE_CURRENT_BINARY_DIR}/installer.wxs 68 | COMMAND ${WIX_PATH}/light.exe -ext WixUIExtension -ext WixUtilExtension 69 | -b ${CMAKE_INSTALL_PREFIX} -b ${CMAKE_SOURCE_DIR}/win 70 | -out "${PROJECT_LONGNAME} ${PROJECT_VERSION}.msi" 71 | installer.wixobj 72 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 73 | VERBATIM 74 | ) 75 | endif() 76 | -------------------------------------------------------------------------------- /win/appicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giddie/qt-cmake-template/3f9c5f2aca27074c1b15d3520cc3cdb49c69bc01/win/appicon.ico -------------------------------------------------------------------------------- /win/installer.cmake.nsi: -------------------------------------------------------------------------------- 1 | ### 2 | # Copyright (c) 2009, Paul Gideon Dann 3 | # 4 | # Permission to use, copy, modify, and/or distribute this software for any 5 | # purpose with or without fee is hereby granted, provided that the above 6 | # copyright notice and this permission notice appear in all copies. 7 | # 8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 | ### 16 | 17 | !include "MUI.nsh" 18 | 19 | !define EXE_BUILD_NAME "@CMAKE_PROJECT_NAME@.exe" 20 | !define EXE_INSTALL_NAME "@PROJECT_LONGNAME@.exe" 21 | !define APP_LONGNAME "@PROJECT_LONGNAME@" 22 | !define APP_VERSION "@PROJECT_VERSION@" 23 | 24 | !define DIST_DIR "@CMAKE_INSTALL_PREFIX@" 25 | !define SOURCE_DIR "@CMAKE_SOURCE_DIR@" 26 | 27 | Name "${APP_LONGNAME}" 28 | OutFile "${APP_LONGNAME} ${APP_VERSION} Setup.exe" 29 | !define ORGANISATION_NAME "${APP_LONGNAME} Project" 30 | InstallDir "$PROGRAMFILES\${APP_LONGNAME}" 31 | !define APP_REGISTRY_KEY "Software\${APP_LONGNAME}" 32 | !define UNINSTALL_REGISTRY_KEY "${APP_LONGNAME}" 33 | InstallDirRegKey HKLM "${APP_REGISTRY_KEY}" "" 34 | SetCompressor /SOLID lzma 35 | 36 | # Request admin privileges 37 | RequestExecutionLevel admin 38 | 39 | # Variables 40 | Var StartMenuFolder 41 | 42 | # Interface Settings 43 | !define MUI_ABORTWARNING 44 | #!define MUI_ICON "${SOURCE_DIR}\win\installer-icon.ico" 45 | #!define MUI_HEADERIMAGE_BITMAP "${SOURCE_DIR}\win\installer-header.bmp" # Size: 150x57 46 | #!define MUI_WELCOMEFINISHPAGE_BITMAP "${SOURCE_DIR}\win\installer-welcome.bmp" # Size: 164x314 47 | #!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${SOURCE_DIR}\win\installer-welcome.bmp" 48 | 49 | !insertmacro MUI_PAGE_WELCOME 50 | !insertmacro MUI_PAGE_LICENSE "${SOURCE_DIR}\LICENCE" 51 | !insertmacro MUI_PAGE_DIRECTORY 52 | !define MUI_STARTMENUPAGE_DEFAULTFOLDER "${APP_LONGNAME}" 53 | !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM" 54 | !define MUI_STARTMENUPAGE_REGISTRY_KEY "${APP_REGISTRY_KEY}" 55 | !define START_MENU_REGISTRY_VALUE "Start Menu Folder" 56 | !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${START_MENU_REGISTRY_VALUE}" 57 | !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder 58 | !insertmacro MUI_PAGE_INSTFILES 59 | !define MUI_FINISHPAGE_RUN "$INSTDIR\${EXE_INSTALL_NAME}" 60 | !insertmacro MUI_PAGE_FINISH 61 | 62 | !insertmacro MUI_UNPAGE_WELCOME 63 | !insertmacro MUI_UNPAGE_CONFIRM 64 | !insertmacro MUI_UNPAGE_INSTFILES 65 | !insertmacro MUI_UNPAGE_FINISH 66 | 67 | # Languages 68 | !insertmacro MUI_LANGUAGE "English" 69 | 70 | #== 71 | # Installation 72 | #== 73 | Section Install 74 | SetOutPath "$INSTDIR" 75 | 76 | File "${SOURCE_DIR}\LICENCE" 77 | 78 | # App files 79 | File "/oname=${EXE_INSTALL_NAME}" "${DIST_DIR}\${EXE_BUILD_NAME}" 80 | 81 | # MinGW Runtimes 82 | File "${DIST_DIR}\libgcc_s_dw2-1.dll" 83 | File "${DIST_DIR}\libstdc++-6.dll" 84 | File "${DIST_DIR}\libwinpthread-1.dll" 85 | 86 | # ICU Unicode Libraries used by Qt 87 | File "${DIST_DIR}\icudt51.dll" 88 | File "${DIST_DIR}\icuin51.dll" 89 | File "${DIST_DIR}\icuuc51.dll" 90 | 91 | # Qt Libraries 92 | File "${DIST_DIR}\qt.conf" 93 | File "${DIST_DIR}\Qt5Core.dll" 94 | File "${DIST_DIR}\Qt5Gui.dll" 95 | File "${DIST_DIR}\Qt5Widgets.dll" 96 | 97 | # Qt Plugins 98 | SetOutPath "$INSTDIR\plugins\platforms" 99 | File "${DIST_DIR}\plugins\platforms\qwindows.dll" 100 | 101 | # Uninstaller 102 | WriteRegStr HKLM "${APP_REGISTRY_KEY}" "" $INSTDIR 103 | WriteUninstaller "$INSTDIR\Uninstall.exe" 104 | !define UNINSTALL_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_REGISTRY_KEY}" 105 | WriteRegStr HKLM "${UNINSTALL_KEY}" "DisplayName" "${APP_LONGNAME}" 106 | WriteRegStr HKLM "${UNINSTALL_KEY}" "UninstallString" "$INSTDIR\Uninstall.exe" 107 | WriteRegStr HKLM "${UNINSTALL_KEY}" "QuietUninstallString" "$INSTDIR\Uninstall.exe /S" 108 | WriteRegStr HKLM "${UNINSTALL_KEY}" "DisplayIcon" "$INSTDIR\${EXE_INSTALL_NAME}" 109 | WriteRegStr HKLM "${UNINSTALL_KEY}" "DisplayVersion" "${APP_VERSION}" 110 | WriteRegStr HKLM "${UNINSTALL_KEY}" "Publisher" "${ORGANISATION_NAME}" 111 | 112 | # Menu folder 113 | !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 114 | CreateDirectory "$SMPROGRAMS\$StartMenuFolder" 115 | CreateShortCut "$SMPROGRAMS\$StartMenuFolder\${APP_LONGNAME}.lnk" "$INSTDIR\${EXE_INSTALL_NAME}" 116 | CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe" 117 | !insertmacro MUI_STARTMENU_WRITE_END 118 | SectionEnd 119 | 120 | #== 121 | # Uninstallation 122 | #== 123 | Section Uninstall 124 | Delete "$INSTDIR\LICENCE" 125 | 126 | # App files 127 | Delete "$INSTDIR\${EXE_INSTALL_NAME}" 128 | 129 | # MinGW Runtimes 130 | Delete "$INSTDIR\libgcc_s_dw2-1.dll" 131 | Delete "$INSTDIR\libstdc++-6.dll" 132 | Delete "$INSTDIR\libwinpthread-1.dll" 133 | 134 | # ICU Unicode Libraries used by Qt 135 | Delete "$INSTDIR\icudt51.dll" 136 | Delete "$INSTDIR\icuin51.dll" 137 | Delete "$INSTDIR\icuuc51.dll" 138 | 139 | # Qt Libraries 140 | Delete "$INSTDIR\qt.conf" 141 | Delete "$INSTDIR\Qt5Core.dll" 142 | Delete "$INSTDIR\Qt5Gui.dll" 143 | Delete "$INSTDIR\Qt5Widgets.dll" 144 | 145 | # Qt Plugins 146 | Delete "$INSTDIR\plugins\platforms\qwindows.dll" 147 | RMDir "$INSTDIR\plugins\platforms" 148 | RMDir "$INSTDIR\plugins" 149 | 150 | # Menu folder 151 | !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder 152 | Delete "$SMPROGRAMS\$StartMenuFolder\${APP_LONGNAME}.lnk" 153 | Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" 154 | RMDir "$SMPROGRAMS\$StartMenuFolder" 155 | 156 | # Uninstaller 157 | Delete "$INSTDIR\Uninstall.exe" 158 | RMDir "$INSTDIR" 159 | DeleteRegKey /ifempty HKLM "${APP_REGISTRY_KEY}" 160 | DeleteRegKey /ifempty HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_REGISTRY_KEY}" 161 | SectionEnd 162 | 163 | # vim: ft=nsis 164 | -------------------------------------------------------------------------------- /win/installer.cmake.wxs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 107 | 108 | 109 | 110 | 111 | 113 | WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed 114 | 115 | 116 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /win/qt.conf: -------------------------------------------------------------------------------- 1 | [Paths] 2 | Plugins = plugins -------------------------------------------------------------------------------- /win/resources.rc: -------------------------------------------------------------------------------- 1 | IDI_ICON1 ICON DISCARDABLE "appicon.ico" 2 | --------------------------------------------------------------------------------