New upstream release
Jonathan Carter
4 years ago
0 | 1.2.10 | |
1 | ------ | |
2 | * FIXED: Window icon didn't work in Wayland. | |
3 | * Improved loading locales. | |
4 | * Improved Windows deployment. | |
5 | * Replaced deprecated code. | |
6 | ||
0 | 7 | 1.2.9 |
1 | 8 | ----- |
2 | 9 | * FIXED: Automatic high DPI support. |
0 | 0 | lessThan(QT_MAJOR_VERSION, 5) { |
1 | error("Connectagram requires Qt 5.2 or greater") | |
1 | error("Connectagram requires Qt 5.9 or greater") | |
2 | 2 | } |
3 | equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 2) { | |
4 | error("Connectagram requires Qt 5.2 or greater") | |
3 | equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 9) { | |
4 | error("Connectagram requires Qt 5.9 or greater") | |
5 | 5 | } |
6 | 6 | |
7 | 7 | TEMPLATE = app |
11 | 11 | CONFIG(debug, debug|release) { |
12 | 12 | CONFIG += warn_on |
13 | 13 | DEFINES += QT_DEPRECATED_WARNINGS |
14 | DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x051100 | |
14 | DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x051300 | |
15 | 15 | DEFINES += QT_NO_NARROWING_CONVERSIONS_IN_CONNECT |
16 | 16 | } |
17 | 17 | |
23 | 23 | } |
24 | 24 | |
25 | 25 | # Set program version |
26 | VERSION = 1.2.9 | |
26 | VERSION = 1.2.10 | |
27 | 27 | DEFINES += VERSIONSTR=\\\"$${VERSION}\\\" |
28 | 28 | |
29 | 29 | # Set program name |
84 | 84 | |
85 | 85 | QMAKE_BUNDLE_DATA += GAME_DATA |
86 | 86 | } else:win32 { |
87 | RC_FILE = icons/icon.rc | |
87 | RC_ICONS = icons/connectagram.ico | |
88 | QMAKE_TARGET_DESCRIPTION = "Anagram game" | |
89 | QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2019 Graeme Gott" | |
88 | 90 | } else:unix { |
89 | 91 | RESOURCES += icons/icon.qrc |
90 | 92 |
0 | connectagram (1.2.10-1) unstable; urgency=medium | |
1 | ||
2 | * New upstream release | |
3 | ||
4 | -- Jonathan Carter <jcc@debian.org> Sat, 10 Aug 2019 18:33:38 +0200 | |
5 | ||
0 | 6 | connectagram (1.2.9-6) unstable; urgency=medium |
1 | 7 | |
2 | 8 | * Upgrade to standards version 4.4.0 |
94 | 94 | </content_rating> |
95 | 95 | |
96 | 96 | <releases> |
97 | <release version="1.2.10" date="2019-08-07"> | |
98 | <description> | |
99 | <ul> | |
100 | <li>FIXED: Window icon didn't work in Wayland</li> | |
101 | <li>Improved loading locales</li> | |
102 | <li>Improved Windows deployment</li> | |
103 | <li>Replaced deprecated code</li> | |
104 | </ul> | |
105 | </description> | |
106 | </release> | |
97 | 107 | <release version="1.2.9" date="2018-07-20"> |
98 | 108 | <description> |
99 | 109 | <ul> |
1 | 1 | |
2 | 2 | APP='Connectagram' |
3 | 3 | BUNDLE="$APP.app" |
4 | VERSION='1.2.9' | |
4 | VERSION='1.2.10' | |
5 | 5 | |
6 | 6 | # Remove any previous disk folder or DMG |
7 | 7 | echo -n 'Preparing... ' |
0 | 0 | /*********************************************************************** |
1 | 1 | * |
2 | * Copyright (C) 2010, 2011, 2012, 2014, 2015, 2016, 2018 Graeme Gott <graeme@gottcode.org> | |
2 | * Copyright (C) 2010, 2011, 2012, 2014, 2015, 2016, 2018, 2019 Graeme Gott <graeme@gottcode.org> | |
3 | 3 | * |
4 | 4 | * This program is free software: you can redistribute it and/or modify |
5 | 5 | * it under the terms of the GNU General Public License as published by |
97 | 97 | |
98 | 98 | // Find current locale |
99 | 99 | m_current = QSettings().value("Locale/Language").toString(); |
100 | QString current = !m_current.isEmpty() ? m_current : QLocale::system().name(); | |
101 | QStringList translations = findTranslations(); | |
102 | if (!translations.contains(m_appname + current)) { | |
103 | current = current.left(2); | |
104 | if (!translations.contains(m_appname + current)) { | |
105 | current.clear(); | |
100 | if (!m_current.isEmpty()) { | |
101 | QLocale::setDefault(m_current); | |
102 | } | |
103 | const QLocale locale; | |
104 | ||
105 | // Load translators | |
106 | static QTranslator translator; | |
107 | if (translator.load(locale, m_appname, "", m_path)) { | |
108 | QCoreApplication::installTranslator(&translator); | |
109 | ||
110 | const QString path = QLibraryInfo::location(QLibraryInfo::TranslationsPath); | |
111 | ||
112 | static QTranslator qtbase_translator; | |
113 | if (qtbase_translator.load(locale, "qtbase", "_", m_path) || qtbase_translator.load(locale, "qtbase", "_", path)) { | |
114 | QCoreApplication::installTranslator(&qtbase_translator); | |
115 | } | |
116 | ||
117 | static QTranslator qt_translator; | |
118 | if (qt_translator.load(locale, "qt", "_", m_path) || qt_translator.load(locale, "qt", "_", path)) { | |
119 | QCoreApplication::installTranslator(&qt_translator); | |
106 | 120 | } |
107 | 121 | } |
108 | if (!current.isEmpty()) { | |
109 | QLocale::setDefault(current); | |
110 | } else { | |
111 | current = "en"; | |
112 | } | |
113 | ||
114 | // Load translators | |
115 | static QTranslator qt_translator; | |
116 | qt_translator.load("qt_" + current, QLibraryInfo::location(QLibraryInfo::TranslationsPath)); | |
117 | QCoreApplication::installTranslator(&qt_translator); | |
118 | ||
119 | static QTranslator qtbase_translator; | |
120 | if (translations.contains("qtbase_" + current) || translations.contains("qtbase_" + current.left(2))) { | |
121 | qtbase_translator.load("qtbase_" + current, m_path); | |
122 | } else { | |
123 | qtbase_translator.load("qtbase_" + current, QLibraryInfo::location(QLibraryInfo::TranslationsPath)); | |
124 | } | |
125 | QCoreApplication::installTranslator(&qtbase_translator); | |
126 | ||
127 | static QTranslator translator; | |
128 | translator.load(m_appname + current, m_path); | |
129 | QCoreApplication::installTranslator(&translator); | |
130 | ||
131 | // Work around bug in Qt 5 where text direction is not loaded | |
132 | QGuiApplication::setLayoutDirection(QLocale(current).textDirection()); | |
133 | 122 | } |
134 | 123 | |
135 | 124 | //----------------------------------------------------------------------------- |
136 | 125 | |
137 | 126 | QString LocaleDialog::languageName(const QString& language) |
138 | 127 | { |
139 | QString lang_code = language.left(5); | |
140 | QLocale locale(lang_code); | |
141 | 128 | QString name; |
142 | if (lang_code.length() > 2) { | |
143 | if (locale.name() == lang_code) { | |
129 | const QLocale locale(language); | |
130 | if (language.contains('_')) { | |
131 | if (locale.name() == language) { | |
144 | 132 | name = locale.nativeLanguageName() + " (" + locale.nativeCountryName() + ")"; |
145 | 133 | } else { |
146 | 134 | name = locale.nativeLanguageName() + " (" + language + ")"; |
0 | 0 | /*********************************************************************** |
1 | 1 | * |
2 | * Copyright (C) 2009, 2012, 2013, 2014, 2015, 2018 Graeme Gott <graeme@gottcode.org> | |
2 | * Copyright (C) 2009, 2012, 2013, 2014, 2015, 2018, 2019 Graeme Gott <graeme@gottcode.org> | |
3 | 3 | * |
4 | 4 | * This program is free software: you can redistribute it and/or modify |
5 | 5 | * it under the terms of the GNU General Public License as published by |
23 | 23 | #include <QDir> |
24 | 24 | |
25 | 25 | int main(int argc, char** argv) { |
26 | #if !defined(Q_OS_MAC) && (QT_VERSION >= QT_VERSION_CHECK(5,6,0)) | |
26 | #if !defined(Q_OS_MAC) | |
27 | 27 | if (!qEnvironmentVariableIsSet("QT_DEVICE_PIXEL_RATIO") |
28 | 28 | && !qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR") |
29 | 29 | && !qEnvironmentVariableIsSet("QT_SCALE_FACTOR") |
39 | 39 | app.setOrganizationName("GottCode"); |
40 | 40 | #if !defined(Q_OS_WIN) && !defined(Q_OS_MAC) |
41 | 41 | app.setWindowIcon(QIcon::fromTheme("connectagram", QIcon(":/connectagram.png"))); |
42 | app.setDesktopFileName("connectagram"); | |
42 | 43 | #endif |
43 | 44 | app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); |
44 | 45 |
0 | 0 | /*********************************************************************** |
1 | 1 | * |
2 | * Copyright (C) 2009, 2013, 2014, 2015 Graeme Gott <graeme@gottcode.org> | |
2 | * Copyright (C) 2009, 2013, 2014, 2015, 2019 Graeme Gott <graeme@gottcode.org> | |
3 | 3 | * |
4 | 4 | * This program is free software: you can redistribute it and/or modify |
5 | 5 | * it under the terms of the GNU General Public License as published by |
94 | 94 | contents_layout->addRow(tr("Word Length:"), m_word_length_box); |
95 | 95 | |
96 | 96 | QVBoxLayout* layout = new QVBoxLayout(this); |
97 | const int margin = layout->contentsMargins().top(); | |
97 | 98 | layout->addLayout(contents_layout); |
98 | layout->addSpacing(layout->margin()); | |
99 | layout->addSpacing(margin); | |
99 | 100 | layout->addWidget(patterns); |
100 | layout->addSpacing(layout->margin()); | |
101 | layout->addSpacing(margin); | |
101 | 102 | layout->addWidget(buttons); |
102 | 103 | |
103 | 104 | // Load settings |
0 | 0 | /*********************************************************************** |
1 | 1 | * |
2 | * Copyright (C) 2009, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Graeme Gott <graeme@gottcode.org> | |
2 | * Copyright (C) 2009, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Graeme Gott <graeme@gottcode.org> | |
3 | 3 | * |
4 | 4 | * This program is free software: you can redistribute it and/or modify |
5 | 5 | * it under the terms of the GNU General Public License as published by |
137 | 137 | connect(m_board, &Board::loading, m_clock, &Clock::setLoading); |
138 | 138 | |
139 | 139 | QHBoxLayout* overlay_layout = new QHBoxLayout(overlay); |
140 | overlay_layout->setMargin(0); | |
140 | overlay_layout->setContentsMargins(0, 0, 0, 0); | |
141 | 141 | overlay_layout->setSpacing(0); |
142 | 142 | overlay_layout->addSpacing(10); |
143 | 143 | overlay_layout->addWidget(m_definitions_button); |
149 | 149 | |
150 | 150 | // Lay out board |
151 | 151 | QGridLayout* layout = new QGridLayout(contents); |
152 | layout->setMargin(0); | |
152 | layout->setContentsMargins(0, 0, 0, 0); | |
153 | 153 | layout->setSpacing(0); |
154 | 154 | layout->addWidget(view, 0, 0); |
155 | 155 | layout->addWidget(m_success, 0, 0, Qt::AlignCenter); |
261 | 261 | QMessageBox::about(this, tr("About"), QString("<p><center><big><b>%1 %2</b></big><br/>%3<br/><small>%4<br/>%5</small></center></p><p><center>%6</center></p>") |
262 | 262 | .arg(tr("Connectagram"), QCoreApplication::applicationVersion(), |
263 | 263 | tr("A word unscrambling game"), |
264 | tr("Copyright © 2009-%1 by Graeme Gott").arg("2018"), | |
264 | tr("Copyright © 2009-%1 by Graeme Gott").arg("2019"), | |
265 | 265 | tr("Released under the <a href=\"http://www.gnu.org/licenses/gpl.html\">GPL 3</a> license"), |
266 | 266 | tr("Definitions are from <a href=\"http://wiktionary.org/\">Wiktionary</a>")) |
267 | 267 | ); |
3 | 3 | !define APPNAME "Connectagram" |
4 | 4 | !define VERSIONMAJOR 1 |
5 | 5 | !define VERSIONMINOR 2 |
6 | !define VERSIONPATCH 9 | |
6 | !define VERSIONPATCH 10 | |
7 | 7 | !define APPVERSION "${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONPATCH}" |
8 | 8 | !define ABOUTURL "https://gottcode.org/connectagram/" |
9 | 9 | |
25 | 25 | OutFile "${APPNAME}_${APPVERSION}.exe" |
26 | 26 | |
27 | 27 | ;Default installation folder |
28 | InstallDir "$PROGRAMFILES\${APPNAME}" | |
28 | InstallDir "$PROGRAMFILES64\${APPNAME}" | |
29 | 29 | InstallDirRegKey HKLM "Software\${APPNAME}" "" |
30 | 30 | |
31 | 31 | ;Request application privileges for Windows Vista |