update qmake file
This commit is contained in:
29
Chronos.pro
29
Chronos.pro
@@ -1,17 +1,36 @@
|
||||
QT += core gui
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
greaterThan(QT_MAJOR_VERSION, 5): QT += widgets
|
||||
|
||||
CONFIG += c++17
|
||||
|
||||
# remove possible other optimization flags
|
||||
QMAKE_CXXFLAGS_RELEASE -= -O
|
||||
QMAKE_CXXFLAGS_RELEASE -= -O1
|
||||
QMAKE_CXXFLAGS_RELEASE *= -O2
|
||||
win32 {
|
||||
message("Build for Windows")
|
||||
QMAKE_CXXFLAGS_RELEASE -= -O
|
||||
QMAKE_CXXFLAGS_RELEASE -= -O1
|
||||
QMAKE_CXXFLAGS_RELEASE *= -O2
|
||||
|
||||
RC_ICONS = icon.ico
|
||||
}
|
||||
|
||||
macx {
|
||||
message("Build for macOS")
|
||||
ICON = icon.icns
|
||||
QMAKE_INFO_PLIST = Info.plist
|
||||
QMAKE_CXXFLAGS_RELEASE -= -O
|
||||
QMAKE_CXXFLAGS_RELEASE -= -O1
|
||||
QMAKE_CXXFLAGS_RELEASE -= -O2
|
||||
QMAKE_CXXFLAGS_RELEASE *= -O3
|
||||
equals(QMAKE_APPLE_DEVICE_ARCHS, arm64) {
|
||||
message("CPU Architecture : aarch64")
|
||||
QMAKE_CXXFLAGS_RELEASE += -mcpu=apple-a14
|
||||
}
|
||||
}
|
||||
|
||||
# add the desired -O3 if not present, MinGW only
|
||||
# QMAKE_CXXFLAGS_RELEASE *= -O3
|
||||
|
||||
RC_ICONS = icon.ico
|
||||
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any Qt feature that has been marked deprecated (the exact warnings
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 5.0.2, 2021-10-18T18:56:11. -->
|
||||
<!-- Written by QtCreator 5.0.2, 2021-10-19T22:43:22. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
@@ -144,7 +144,9 @@
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis">
|
||||
<value type="QString">arm-darwin-generic-mach_o-64bit</value>
|
||||
</valuelist>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
@@ -244,7 +246,7 @@
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/Volumes/Macintosh SSD/sources/Qt/build-Chronos-Qt_6_2_0_for_macOS-Debug/Chronos.app/Contents/MacOS</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/Volumes/Macintosh SSD/sources/Qt/build-Chronos-Qt_6_2_0_for_macOS-Release/Chronos.app/Contents/MacOS</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
|
||||
24
Info.plist
Normal file
24
Info.plist
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Chronos</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.aureliedelhaie.Chronos</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.14</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||
<true/>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>icon.icns</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -11,6 +11,8 @@ AboutBox::AboutBox(QWidget *parent) :
|
||||
xmin = ui->frame->x();
|
||||
ymax = ui->frame->x() + ui->frame->height();
|
||||
ymin = ui->frame->y();
|
||||
ui->systemLabel->setText(QString("Built on %1 (%2-%3)").arg(QSysInfo::prettyProductName(), QSysInfo::kernelVersion(), QSysInfo::buildCpuArchitecture()));
|
||||
ui->versionLabel->setText(QString("Version: %1").arg(VERSION));
|
||||
}
|
||||
|
||||
AboutBox::~AboutBox()
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
#ifndef ABOUTBOX_H
|
||||
#define ABOUTBOX_H
|
||||
|
||||
#define VERSION "2.0.0"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QMouseEvent>
|
||||
#include <iostream>
|
||||
#include <QSysInfo>
|
||||
|
||||
namespace Ui {
|
||||
class AboutBox;
|
||||
|
||||
@@ -104,6 +104,10 @@ void MainWindow::open_save() {
|
||||
delete file;
|
||||
|
||||
QJsonObject obj = QJsonDocument::fromJson(json.toUtf8()).object();
|
||||
if (obj[KEY_SAVE_FILE_VERSION] != SAVE_FILE_VERSION) {
|
||||
panic_dialog("Your save file version does not match the supported version."
|
||||
" Please update this file and restart the application");
|
||||
}
|
||||
week_template = Week::from_json(obj[KEY_TEMPLATE].toObject());
|
||||
QJsonArray arr = obj[KEY_YEARS].toArray();
|
||||
foreach (QJsonValue val, arr) {
|
||||
|
||||
@@ -166,32 +166,22 @@ background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:1, y2:1, stop:0 rgb
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<widget class="QLabel" name="versionLabel">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-size: 12px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Version: 2.0.0</string>
|
||||
<string>Version: ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<widget class="QLabel" name="systemLabel">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-size: 12px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Made with Qt</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">font-size: 12px;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>Save Updater: Rust (<a href="https://github.com/mojitaurelie/chronos-save-updater"><span style=" text-decoration: underline; color:#0068da;">https://github.com/mojitaurelie/chronos-save-updater</span></a>)</p></body></html></string>
|
||||
<string><html><head/><body><p>...</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user