Codebase list peg-e / 8ce4f14
Update upstream source from tag 'upstream/1.2.7' Update to upstream version '1.2.7' with Debian dir a4bf1cd2c6831a9c5886b61b5ca449ffe6e5ee15 Markus Koschany 4 years ago
11 changed file(s) with 67 addition(s) and 51 deletion(s). Raw diff Collapse all Expand all
3636
3737 Spanish:
3838 * Edgar Carballo
39 * Francisco Zamorano
3940
4041 Turkish:
4142 * Cüneyt Oktay
0 1.2.7
1 -----
2 * FIXED: Was not loading KDE icon theme.
3 * FIXED: Window icon didn't work in Wayland.
4 * Improved loading locales.
5 * Improved Windows deployment.
6 * Replaced deprecated code.
7
08 1.2.6
19 -----
210 * FIXED: Automatic high DPI support.
+0
-1
icons/icon.rc less more
0 IDI_ICON1 ICON DISCARDABLE "peg-e.ico"
9393 </content_rating>
9494
9595 <releases>
96 <release version="1.2.7" date="2019-08-07">
97 <description>
98 <ul>
99 <li>FIXED: Was not loading KDE icon theme</li>
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>
96107 <release version="1.2.6" date="2018-07-20">
97108 <description>
98109 <ul>
11
22 APP='Peg-E'
33 BUNDLE="$APP.app"
4 VERSION='1.2.6'
4 VERSION='1.2.7'
55
66 # Remove any previous disk folder or DMG
77 echo -n 'Preparing... '
00 lessThan(QT_MAJOR_VERSION, 5) {
1 error("Peg-E requires Qt 5.2 or greater")
1 error("Peg-E requires Qt 5.9 or greater")
22 }
3 equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 2) {
4 error("Peg-E requires Qt 5.2 or greater")
3 equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 9) {
4 error("Peg-E requires Qt 5.9 or greater")
55 }
66
77 TEMPLATE = app
1111 CONFIG(debug, debug|release) {
1212 CONFIG += warn_on
1313 DEFINES += QT_DEPRECATED_WARNINGS
14 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x051100
14 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x051300
1515 DEFINES += QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
1616 }
1717
2323 }
2424
2525 # Set program version
26 VERSION = 1.2.6
26 VERSION = 1.2.7
2727 DEFINES += VERSIONSTR=\\\"$${VERSION}\\\"
2828
2929 # Set program name
6969
7070 QMAKE_BUNDLE_DATA += ICONS
7171 } else:win32 {
72 RC_FILE = icons/icon.rc
72 RC_ICONS = icons/peg-e.ico
73 QMAKE_TARGET_DESCRIPTION = "Peg elimination game"
74 QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2019 Graeme Gott"
7375 } else:unix {
7476 RESOURCES = icons/icon.qrc
7577
00 /***********************************************************************
11 *
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>
33 *
44 * This program is free software: you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
9797
9898 // Find current locale
9999 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);
106120 }
107121 }
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());
133122 }
134123
135124 //-----------------------------------------------------------------------------
136125
137126 QString LocaleDialog::languageName(const QString& language)
138127 {
139 QString lang_code = language.left(5);
140 QLocale locale(lang_code);
141128 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) {
144132 name = locale.nativeLanguageName() + " (" + locale.nativeCountryName() + ")";
145133 } else {
146134 name = locale.nativeLanguageName() + " (" + language + ")";
00 /***********************************************************************
11 *
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>
33 *
44 * This program is free software: you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
3030 */
3131 int main(int argc, char** argv)
3232 {
33 #if !defined(Q_OS_MAC) && (QT_VERSION >= QT_VERSION_CHECK(5,6,0))
33 #if !defined(Q_OS_MAC)
3434 if (!qEnvironmentVariableIsSet("QT_DEVICE_PIXEL_RATIO")
3535 && !qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR")
3636 && !qEnvironmentVariableIsSet("QT_SCALE_FACTOR")
4646 app.setOrganizationName("GottCode");
4747 #if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
4848 app.setWindowIcon(QIcon::fromTheme("peg-e", QIcon(":/peg-e.png")));
49 app.setDesktopFileName("peg-e");
4950 #endif
5051 app.setAttribute(Qt::AA_DontShowIconsInMenus, true);
5152 app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
7071 }
7172
7273 // Set up icons
74 #if defined(Q_OS_MAC) || defined(Q_OS_WIN)
75 QIcon::setThemeName("hicolor");
76 #elif (QT_VERSION >= QT_VERSION_CHECK(5,12,0))
77 QIcon::setFallbackThemeName("hicolor");
78 #else
7379 if (QIcon::themeName().isEmpty()) {
7480 QIcon::setThemeName("hicolor");
7581 }
82 #endif
7683
7784 Window window;
7885 window.show();
00 /***********************************************************************
11 *
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>
33 *
44 * This program is free software: you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
232232 "<p align='center'>%6<br/><small>%7</small></p>")
233233 .arg(tr("Peg-E"), QCoreApplication::applicationVersion(),
234234 tr("Peg elimination game"),
235 tr("Copyright &copy; 2009-%1 Graeme Gott").arg("2018"),
235 tr("Copyright &copy; 2009-%1 Graeme Gott").arg("2019"),
236236 tr("Released under the <a href=%1>GPL 3</a> license").arg("\"http://www.gnu.org/licenses/gpl.html\""),
237237 tr("Uses icons from the <a href=%1>Oxygen</a> icon theme").arg("\"http://www.oxygen-icons.org/\""),
238238 tr("Used under the <a href=%1>LGPL 3</a> license").arg("\"http://www.gnu.org/licenses/lgpl.html\""))
33 !define APPNAME "Peg-E"
44 !define VERSIONMAJOR 1
55 !define VERSIONMINOR 2
6 !define VERSIONPATCH 6
6 !define VERSIONPATCH 7
77 !define APPVERSION "${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONPATCH}"
88 !define ABOUTURL "https://gottcode.org/peg-e/"
99
2525 OutFile "${APPNAME}_${APPVERSION}.exe"
2626
2727 ;Default installation folder
28 InstallDir "$PROGRAMFILES\${APPNAME}"
28 InstallDir "$PROGRAMFILES64\${APPNAME}"
2929 InstallDirRegKey HKLM "Software\${APPNAME}" ""
3030
3131 ;Request application privileges for Windows Vista
22 @ECHO OFF
33
44 SET APP=Peg-E
5 SET VERSION=1.2.6
5 SET VERSION=1.2.7
66
77 ECHO Copying executable
88 MKDIR %APP%