Compare commits

..

No commits in common. "v1.0.3" and "master" have entirely different histories.

24 changed files with 150 additions and 2 deletions

0
.gitignore vendored Normal file → Executable file
View File

Binary file not shown.

13
README.md Normal file → Executable file
View File

@ -3,7 +3,18 @@
</p>
# Pastors Sermon Pro 📖✨
**Version 1.0.3**
**Version 1.1.7**
## ✨ What's New in V1.1.7
- **Dynamic Theming Engine**: Complete support for Light and Dark modes across all components (Bible Reader, Sermon Builder, Search, etc.).
- **Integrated Model Downloader**: Background downloading of AI models from HuggingFace with status bar progress tracking.
- **Enhanced Bug Reporting**: Added screenshot capture and automated debug.log attachment for faster troubleshooting.
- **Hardware-Aware AI**: Smart recommendations for AI models based on your system's RAM and GPU specs.
## ✨ What's New in V1.0.7
- **Audio Optimization:** Reduced default video volume to 40% to prevent distortion and speaker crackling on some systems.
- **Improved Multimedia:** Finalized FFmpeg dependency bundling for stable video playback.
- **Enhanced Settings:** Added version tracking and manual update controls.
## ✨ What's New in V1.0.3
- **Smart Updates:** The app now correctly compares version numbers to only notify you of truly newer updates.

0
ai.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 2.9 MiB

0
f8e67864-3723-48a6-9878-4169b409eb3c.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

0
library.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.1 MiB

After

Width:  |  Height:  |  Size: 3.1 MiB

BIN
resources/ai.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

0
resources/bible.ico Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 202 KiB

After

Width:  |  Height:  |  Size: 202 KiB

BIN
resources/bible.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

BIN
resources/installer_splash.bmp Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 151 KiB

BIN
resources/library.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

16
resources/resources.qrc Executable file
View File

@ -0,0 +1,16 @@
<RCC>
<qresource prefix="/">
<file alias="splash.png">../splash.png</file>
<file>bible.png</file>
<file>search.png</file>
<file>sermon.png</file>
<file>ai.png</file>
<file>library.png</file>
<file>setting.png</file>
<file alias="help.html">../src/help.html</file>
<file>welcome/welcome_1.png</file>
<file>welcome/welcome_2.png</file>
<file>welcome/welcome_3.png</file>
<file>welcome/welcome_4.png</file>
</qresource>
</RCC>

BIN
resources/search.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

BIN
resources/sermon.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
resources/setting.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

BIN
resources/settings.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

BIN
resources/welcome/welcome_1.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 KiB

BIN
resources/welcome/welcome_2.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
resources/welcome/welcome_3.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

BIN
resources/welcome/welcome_4.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

0
setting.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 3.0 MiB

0
splash.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 3.2 MiB

After

Width:  |  Height:  |  Size: 3.2 MiB

121
src/UpdateManager.cpp Executable file
View File

@ -0,0 +1,121 @@
#include "UpdateManager.h"
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QStandardPaths>
#include <QDir>
#include <QDesktopServices>
#include <QUrl>
#include <algorithm>
UpdateManager::UpdateManager(const QString& currentVersion, QObject *parent)
: QObject(parent), m_currentVersion(currentVersion), m_downloadFile(nullptr)
{
m_network = new QNetworkAccessManager(this);
}
void UpdateManager::checkForUpdates() {
emit checkStarted();
QUrl url;
if (m_isBeta) {
url = QUrl("https://git.linology.tech/michael/Pastors-Sermon-Pro-Bug-Reports/raw/branch/main/version.txt");
} else {
url = QUrl("https://git.linology.tech/michael/PastorsSermonPro/raw/branch/master/version.txt");
}
QNetworkRequest request;
request.setUrl(url);
QNetworkReply* reply = m_network->get(request);
connect(reply, &QNetworkReply::finished, this, &UpdateManager::onVersionFetched);
}
void UpdateManager::onVersionFetched() {
QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
if (!reply) return;
if (reply->error() == QNetworkReply::NoError) {
m_latestVersion = QString::fromUtf8(reply->readAll()).trimmed();
// Smart semantic version comparison
if (!m_latestVersion.isEmpty() && isNewer(m_currentVersion, m_latestVersion)) {
// Construct the download URL for the Windows installer
if (m_isBeta) {
m_downloadUrl = QString("https://git.linology.tech/michael/Pastors-Sermon-Pro-Bug-Reports/releases/download/v%1/PastorsSermonPro_Setup.exe").arg(m_latestVersion);
} else {
m_downloadUrl = QString("https://git.linology.tech/michael/PastorsSermonPro/releases/download/v%1/PastorsSermonPro_Setup.exe").arg(m_latestVersion);
}
emit updateAvailable(m_latestVersion, m_downloadUrl);
} else {
emit noUpdateFound();
}
} else {
emit errorOccurred("Could not reach update server: " + reply->errorString());
}
reply->deleteLater();
}
void UpdateManager::startDownload(const QString& url) {
m_downloadUrl = url;
QString tempPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
QString fileName = tempPath + "/PastorsSermonPro_Update.exe";
m_downloadFile = new QFile(fileName, this);
if (!m_downloadFile->open(QIODevice::WriteOnly)) {
emit errorOccurred("Could not create temporary file for download.");
delete m_downloadFile;
m_downloadFile = nullptr;
return;
}
QNetworkRequest request;
request.setUrl(QUrl(m_downloadUrl));
QNetworkReply* reply = m_network->get(request);
connect(reply, &QNetworkReply::downloadProgress, this, &UpdateManager::onDownloadProgress);
connect(reply, &QNetworkReply::finished, this, &UpdateManager::onDownloadFinished);
}
void UpdateManager::onDownloadProgress(qint64 bytesReceived, qint64 bytesTotal) {
if (bytesTotal > 0) {
int percentage = static_cast<int>((bytesReceived * 100) / bytesTotal);
emit progressUpdated(percentage);
}
}
void UpdateManager::onDownloadFinished() {
QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
if (!reply) return;
if (reply->error() == QNetworkReply::NoError) {
m_downloadFile->write(reply->readAll());
m_downloadFile->flush();
QString filePath = m_downloadFile->fileName();
m_downloadFile->close();
emit downloadFinished(filePath);
// Launch the installer
QProcess::startDetached(filePath);
} else {
emit errorOccurred("Download failed: " + reply->errorString());
m_downloadFile->close();
m_downloadFile->remove();
}
reply->deleteLater();
}
bool UpdateManager::isNewer(const QString& current, const QString& latest) {
QStringList curParts = current.split('.');
QStringList latParts = latest.split('.');
int maxLen = std::max(curParts.size(), latParts.size());
for (int i = 0; i < maxLen; ++i) {
int cur = (i < curParts.size()) ? curParts[i].toInt() : 0;
int lat = (i < latParts.size()) ? latParts[i].toInt() : 0;
if (lat > cur) return true;
if (lat < cur) return false;
}
return false;
}

2
version.txt Normal file → Executable file
View File

@ -1 +1 @@
1.0.3
1.1.8