Skip to content

Commit

Permalink
Version 7.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Mar 31, 2019
2 parents aeebdaf + 5fd4a21 commit ff54df8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,16 @@ endif()

project(Grabber)
if((NOT DEFINED VERSION) OR ((DEFINED NIGHTLY) AND (NIGHTLY MATCHES "1")))
set(VERSION "7.0.0")
set(VERSION "7.0.1")
else()
string(REGEX REPLACE "^v" "" VERSION VERSION)
string(REGEX REPLACE "^v" "" VERSION "${VERSION}")
endif()
if(NOT DEFINED VERSION_PLATFORM)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "[aA][mM][dD]64")
set(VERSION_PLATFORM "x64")
else()
set(VERSION_PLATFORM "x86")
endif()
endif()
set(USE_SSL 1)

Expand All @@ -39,8 +46,10 @@ set(ANDROID_APP_VERSION_CODE 1)
set(ANDROID_APP_PACKAGE_NAME "com.bionus.grabber")

message(STATUS "Configuring for version '${VERSION}'")
message(STATUS "Configuring for platform '${VERSION_PLATFORM}' (${CMAKE_SYSTEM_PROCESSOR})")

add_definitions(-DVERSION="${VERSION}")
add_definitions(-DVERSION_PLATFORM="${VERSION_PLATFORM}")
add_definitions(-DPROJECT_WEBSITE_URL="https://bionus.github.io/imgbrd-grabber")
add_definitions(-DPROJECT_GITHUB_URL="https://github.com/Bionus/imgbrd-grabber")
add_definitions(-DSOURCE_ISSUES_URL="https://raw.githubusercontent.com/wiki/Bionus/imgbrd-grabber/SourceIssues.md")
Expand Down
1 change: 1 addition & 0 deletions gui/src/about-window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ AboutWindow::AboutWindow(const QString &version, QWidget *parent)
labelVersion += " - nightly";
}
#endif
labelVersion += QString(" (%1)").arg(VERSION_PLATFORM);
ui->labelCurrent->setText(labelVersion);

ui->labelCreator->setText(ui->labelCreator->text().replace("{website}", PROJECT_WEBSITE_URL));
Expand Down
14 changes: 13 additions & 1 deletion lib/src/updater/program-updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,19 @@ void ProgramUpdater::downloadUpdate()
{
QJsonDocument json = QJsonDocument::fromJson(m_source);
QJsonObject lastRelease = json.object();
QJsonObject lastAsset = lastRelease["assets"].toArray().first().toObject();
QJsonArray lastAssets = lastRelease["assets"].toArray();
QJsonObject lastAsset;
for (int i = 0; i < lastAssets.size(); ++i) {
const QJsonObject obj = lastAssets[i].toObject();
const QString name = obj["name"].toString();
if (name.endsWith(".exe") && name.contains(VERSION_PLATFORM)) {
lastAsset = obj;
}
}
if (lastAsset.isEmpty()) {
log("No proper release asset found for updatind", Logger::Error);
return;
}

QUrl url(lastAsset["browser_download_url"].toString());
m_updateFilename = url.fileName();
Expand Down
2 changes: 1 addition & 1 deletion releases/setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#endif

#ifndef MyAppVersion
# define MyAppVersion "7.0.0"
# define MyAppVersion "7.0.1"
#endif

#ifndef QtApngDll
Expand Down

0 comments on commit ff54df8

Please sign in to comment.