aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh7
-rw-r--r--cmake/VersionGui.cmake10
-rw-r--r--monero-wallet-gui.pro2
-rw-r--r--pages/settings/SettingsInfo.qml4
-rw-r--r--src/main/main.cpp5
-rw-r--r--src/version.js.in1
6 files changed, 15 insertions, 14 deletions
diff --git a/build.sh b/build.sh
index 81e2dff8..d2c6f313 100755
--- a/build.sh
+++ b/build.sh
@@ -100,11 +100,8 @@ fi
# force version update
get_tag
-echo "var GUI_VERSION = \"$TAGNAME\"" > version.js
-pushd "$MONERO_DIR"
-get_tag
-popd
-echo "var GUI_MONERO_VERSION = \"$TAGNAME\"" >> version.js
+GUI_VERSION=$(echo "$TAGNAME" | sed 's/^v\([[:digit:]]\)/\1/')
+echo "var GUI_VERSION = \"$GUI_VERSION\"" > version.js
cd build
if ! QMAKE=$(find_command qmake qmake-qt5); then
diff --git a/cmake/VersionGui.cmake b/cmake/VersionGui.cmake
index fd0eddae..960c3f4e 100644
--- a/cmake/VersionGui.cmake
+++ b/cmake/VersionGui.cmake
@@ -26,24 +26,24 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-function (write_static_version_header VERSION_TAG_GUI VERSION_TAG_CORE)
+function (write_static_version_header VERSION_TAG_GUI)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/version.js.in" "${CMAKE_CURRENT_SOURCE_DIR}/version.js")
endfunction ()
find_package(Git QUIET)
if ("$Format:$" STREQUAL "")
# We're in a tarball; use hard-coded variables.
- write_static_version_header("release" "release")
+ write_static_version_header("release")
elseif (GIT_FOUND OR Git_FOUND)
message(STATUS "Found Git: ${GIT_EXECUTABLE}")
include(GitGetVersionTag)
git_get_version_tag(${GIT_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR} VERSION_TAG_GUI)
- git_get_version_tag(${GIT_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/monero VERSION_TAG_CORE)
- write_static_version_header(${VERSION_TAG_GUI} ${VERSION_TAG_CORE})
+ STRING(REGEX REPLACE "^v([0-9])" "\\1" VERSION_TAG_GUI ${VERSION_TAG_GUI})
+ write_static_version_header(${VERSION_TAG_GUI})
else()
message(STATUS "WARNING: Git was not found!")
- write_static_version_header("unknown" "unknown")
+ write_static_version_header("unknown")
endif ()
add_custom_target(genversiongui ALL
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/version.js")
diff --git a/monero-wallet-gui.pro b/monero-wallet-gui.pro
index 092c6645..c0285f60 100644
--- a/monero-wallet-gui.pro
+++ b/monero-wallet-gui.pro
@@ -567,7 +567,7 @@ DISTFILES += \
VERSION = $$cat('version.js', lines)
VERSION = $$find(VERSION, 'GUI_VERSION')
-VERSION_LONG = $$replace(VERSION, '.*\"v(.*)\"', '\1')
+VERSION_LONG = $$replace(VERSION, '.*\"(.*)\"', '\1')
VERSION = $$replace(VERSION, '.*(\d+\.\d+\.\d+\.\d+).*', '\1')
# windows application icon
diff --git a/pages/settings/SettingsInfo.qml b/pages/settings/SettingsInfo.qml
index 703e4b6b..6faf582a 100644
--- a/pages/settings/SettingsInfo.qml
+++ b/pages/settings/SettingsInfo.qml
@@ -103,7 +103,7 @@ Rectangle {
MoneroComponents.TextBlock {
font.pixelSize: 14
color: MoneroComponents.Style.dimmedFontColor
- text: Version.GUI_MONERO_VERSION + translationManager.emptyString
+ text: moneroVersion
}
Rectangle {
@@ -390,7 +390,7 @@ Rectangle {
onClicked: {
var data = "";
data += "GUI version: " + Version.GUI_VERSION + " (Qt " + qtRuntimeVersion + ")";
- data += "\nEmbedded Monero version: " + Version.GUI_MONERO_VERSION;
+ data += "\nEmbedded Monero version: " + moneroVersion;
data += "\nWallet path: " + walletLocation.walletPath;
data += "\nWallet creation height: ";
diff --git a/src/main/main.cpp b/src/main/main.cpp
index 41b41faa..6b01dfc9 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -38,6 +38,9 @@
#include <QScreen>
#include <QRegExp>
#include <QThread>
+
+#include <version.h>
+
#include "clipboardAdapter.h"
#include "filter.h"
#include "oscursor.h"
@@ -499,6 +502,8 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
#endif
engine.rootContext()->setContextProperty("builtWithScanner", builtWithScanner);
+ engine.rootContext()->setContextProperty("moneroVersion", MONERO_VERSION_FULL);
+
Network network;
engine.rootContext()->setContextProperty("Network", &network);
diff --git a/src/version.js.in b/src/version.js.in
index 66f92852..dab4a07e 100644
--- a/src/version.js.in
+++ b/src/version.js.in
@@ -1,2 +1 @@
var GUI_VERSION = "@VERSION_TAG_GUI@";
-var GUI_MONERO_VERSION = "@VERSION_TAG_CORE@";