Skip to content

Commit

Permalink
Make Grabber platform-aware (issue #1608)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Mar 31, 2019
1 parent 4975133 commit 878e0b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ if((NOT DEFINED VERSION) OR ((DEFINED NIGHTLY) AND (NIGHTLY MATCHES "1")))
else()
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)

# Android settings
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

0 comments on commit 878e0b8

Please sign in to comment.