Skip to content

Commit a0c7690

Browse files
committed
Added a first iteration of the Degate installer.
1 parent 6884aa6 commit a0c7690

32 files changed

+1199
-9
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
build/*
22
!build/.keepme
33
.idea/
4+
5+
etc/installer/packages/Degate/data/*
6+
!etc/installer/packages/Degate/data/.keepme
7+
etc/installer/Degate installer.exe

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ target_link_libraries(DegateCore ${LIBS})
102102
#
103103
# Link main (Degate)
104104
#
105-
add_executable(Degate "src/Main.cc" res/resources.qrc ${CMAKE_BINARY_DIR}/translations.qrc ${QM_FILES})
105+
add_executable(Degate "src/Main.cc" res/resources.qrc ${CMAKE_BINARY_DIR}/translations.qrc ${QM_FILES} "res/resource.rc")
106106
target_link_libraries(Degate ${LIBS} DegateCore)
107107

108108
#

README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Future functionalities remaining to implement (not limited) :
8181
For now only English and French are supported, but if you wish you can help easily. Degate use Qt Linguist for translation, you can learn more here : https://doc.qt.io/qt-5/linguist-translators.html.
8282
You can find .ts files (to use with Qt Linguist) in 'res/languages'.
8383

84-
Localization :
84+
Languages :
8585
- English (100%),
8686
- French (100%).
8787
- German (0%),
@@ -96,19 +96,33 @@ To add a new language opens a new issue.
9696

9797
## Dependencies
9898

99-
Only 2 dependencies : Boost and Qt5.
99+
Degate has only 2 dependencies : Boost and Qt5.
100100

101-
For Boost, you can specify to CMake a custom path with : -DBOOST_ROOT="custom_path_to_boost". Prebuilt versions for windows are available here : https://sourceforge.net/projects/boost/files/boost-binaries/.
101+
For Boost, you can specify to CMake a custom path with : -DBOOST_ROOT="custom_path_to_boost". Prebuilt versions for Windows are available here : https://sourceforge.net/projects/boost/files/boost-binaries/.
102102

103-
For Qt5, you can specify to CMake a custom path with : -DCMAKE_PREFIX_PATH="custom_path_to_qt". For example, on windows : Qt/VERSION/COMPILER/lib/cmake/Qt5. You can download Qt5 here : https://www.qt.io/download.
103+
For Qt5, you can specify to CMake a custom path with : -DCMAKE_PREFIX_PATH="custom_path_to_qt". For example, on Windows : Qt/VERSION/COMPILER/lib/cmake/Qt5. You can download Qt5 here : https://www.qt.io/download.
104104

105-
For linux, don't forget to install the Qt5 add-on module : ImageFormats (you just need to have the package installed, it will be embedded in the Qt5::Core module after). See https://doc.qt.io/qt-5/qtimageformats-index.html. For example, on debian, the package is : qt5-image-formats-plugins. Same problem with linguist tools, for example for debian you need the package : qttools5-dev.
105+
For Linux, don't forget to install the Qt5 add-on module : ImageFormats (you just need to have the package installed, it will be embedded in the Qt5::Core module after). See https://doc.qt.io/qt-5/qtimageformats-index.html. For example, on debian, the package is : qt5-image-formats-plugins. Same problem with linguist tools, for example for debian you need the package : qttools5-dev.
106106

107-
Keep your CMake installation up to date.
107+
For example, on debian like Linux distribution, you can install all dependencies with this command :
108+
109+
```console
110+
> sudo apt-get install cmake g++ qt5-default qt5-image-formats-plugins qttools5-dev libboost-all-dev
111+
```
112+
113+
## Dependencies version
114+
115+
- CMake 3.12.0 or newer,
116+
- Boost 1.70.0 or newer,
117+
- Qt 5.12.0 or newer.
108118

109119
## Build
110120

111-
After installing Boost and Qt5, build Degate with cmake : cmake [path_to_source] [optional:] -DBOOST_ROOT="custom_path_to_boost" [optional:] -DCMAKE_PREFIX_PATH="custom_path_to_qt"
121+
After installing Boost and Qt5, use cmake :
122+
123+
```console
124+
> cmake [path_to_source] [optional:] -DBOOST_ROOT="custom_path_to_boost" [optional:] -DCMAKE_PREFIX_PATH="custom_path_to_qt"
125+
```
112126

113127
# Test projects
114128

degate.desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Icon=degate
88
Terminal=false
99
Type=Application
1010
Categories=Development;Electronics;
11-
StartupNotify=true
11+
StartupNotify=true

etc/installer/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Degate installer
2+
3+
The Degate installer uses the Qt Installer Framework that you can download here : http://download.qt.io/official_releases/qt-installer-framework/.
4+
It works on Windows, Linux and Mac.
5+
6+
## Process
7+
8+
- Update the Degate version in the 'config/config.xml' file and in the 'packages/Degate/meta/package.xml' file (with the release date for the last one).
9+
- On Windows, run 'windeployqt.exe' to automatically get all Qt stuff near the executable.
10+
- On Linux, you can use https://github.com/probonopd/linuxdeployqt (the best is to use the oldest Ubuntu LTS to build Degate and use linuxdeployqt).
11+
- Copy all freshly built files to the 'packages/Degate/data' folder.
12+
- Run this command (in the 'installer' folder):
13+
- For Windows : "path_to_binarycreator.exe -c config\config.xml -p packages "Degate installer.exe""
14+
- Others : "path_to_binarycreator -c config/config.xml -p packages Degate"
15+
16+
## License
17+
18+
If the license change, copy the new license file to 'packages/Degate/meta/LICENSE.TXT'.
19+
20+
## Localization
21+
22+
See the 'packages/Degate/meta' folder for translations and the 'packages/Degate/meta/package.xml' file.
23+
24+
To update/add new languages run :
25+
"lupdate installscript.qs DesktopShortcutCheckBoxForm.ui ReadMeCheckBoxForm.ui StartMenuShortcutCheckBoxForm.ui -ts languages/<language>.ts"
26+
27+
To generate the translation file run (in the 'languages' directory) :
28+
"lrelease <language>.ts"
29+
30+
Replace <language> with the two letter lowercase code for the language you want to translate to.
31+
32+
Languages :
33+
34+
- English 'en' (100%),
35+
- French 'fr' (100%).
36+
- German 'de' (0%),
37+
- Russian 'ru' (0%),
38+
- Spanish 'es' (0%),
39+
- Italian 'it' (0%),
40+
- Korean 'ko' (0%).

etc/installer/config/Degate.ico

297 KB
Binary file not shown.

etc/installer/config/Degate.png

18.4 KB
Loading

etc/installer/config/config.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Installer>
3+
<Name>Degate</Name>
4+
<Version>2.0.0-alpha.1</Version>
5+
<Title>Degate installer</Title>
6+
<Publisher>Degate community</Publisher>
7+
<StartMenuDir>Degate</StartMenuDir>
8+
<TargetDir>@ApplicationsDir@/Degate</TargetDir>
9+
<InstallerWindowIcon>Degate.png</InstallerWindowIcon>
10+
<InstallerApplicationIcon>Degate</InstallerApplicationIcon>
11+
</Installer>

etc/installer/packages/Degate/data/.keepme

Whitespace-only changes.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>DesktopShortcutCheckBoxForm</class>
4+
<widget class="QWidget" name="DesktopShortcutCheckBoxForm">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>412</width>
10+
<height>179</height>
11+
</rect>
12+
</property>
13+
<layout class="QVBoxLayout" name="verticalLayout">
14+
<property name="margin">
15+
<number>0</number>
16+
</property>
17+
<item>
18+
<widget class="QCheckBox" name="desktopShortcutCheckBox">
19+
<property name="text">
20+
<string>Add desktop shortcut</string>
21+
</property>
22+
<property name="checked">
23+
<bool>false</bool>
24+
</property>
25+
<property name="tristate">
26+
<bool>false</bool>
27+
</property>
28+
</widget>
29+
</item>
30+
</layout>
31+
</widget>
32+
<resources/>
33+
<connections/>
34+
</ui>

0 commit comments

Comments
 (0)