mirror of
https://github.com/monero-project/monero-gui
synced 2024-11-17 14:33:19 +01:00
version: use MONERO_VERSION_FULL const as monero core version
This commit is contained in:
parent
c137a6ea36
commit
36262f029a
7
build.sh
7
build.sh
@ -100,11 +100,8 @@ fi
|
|||||||
|
|
||||||
# force version update
|
# force version update
|
||||||
get_tag
|
get_tag
|
||||||
echo "var GUI_VERSION = \"$TAGNAME\"" > version.js
|
GUI_VERSION=$(echo "$TAGNAME" | sed 's/^v\([[:digit:]]\)/\1/')
|
||||||
pushd "$MONERO_DIR"
|
echo "var GUI_VERSION = \"$GUI_VERSION\"" > version.js
|
||||||
get_tag
|
|
||||||
popd
|
|
||||||
echo "var GUI_MONERO_VERSION = \"$TAGNAME\"" >> version.js
|
|
||||||
|
|
||||||
cd build
|
cd build
|
||||||
if ! QMAKE=$(find_command qmake qmake-qt5); then
|
if ! QMAKE=$(find_command qmake qmake-qt5); then
|
||||||
|
@ -26,24 +26,24 @@
|
|||||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
# 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.
|
# 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")
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/version.js.in" "${CMAKE_CURRENT_SOURCE_DIR}/version.js")
|
||||||
endfunction ()
|
endfunction ()
|
||||||
|
|
||||||
find_package(Git QUIET)
|
find_package(Git QUIET)
|
||||||
if ("$Format:$" STREQUAL "")
|
if ("$Format:$" STREQUAL "")
|
||||||
# We're in a tarball; use hard-coded variables.
|
# 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)
|
elseif (GIT_FOUND OR Git_FOUND)
|
||||||
message(STATUS "Found Git: ${GIT_EXECUTABLE}")
|
message(STATUS "Found Git: ${GIT_EXECUTABLE}")
|
||||||
|
|
||||||
include(GitGetVersionTag)
|
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} VERSION_TAG_GUI)
|
||||||
git_get_version_tag(${GIT_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/monero VERSION_TAG_CORE)
|
STRING(REGEX REPLACE "^v([0-9])" "\\1" VERSION_TAG_GUI ${VERSION_TAG_GUI})
|
||||||
write_static_version_header(${VERSION_TAG_GUI} ${VERSION_TAG_CORE})
|
write_static_version_header(${VERSION_TAG_GUI})
|
||||||
else()
|
else()
|
||||||
message(STATUS "WARNING: Git was not found!")
|
message(STATUS "WARNING: Git was not found!")
|
||||||
write_static_version_header("unknown" "unknown")
|
write_static_version_header("unknown")
|
||||||
endif ()
|
endif ()
|
||||||
add_custom_target(genversiongui ALL
|
add_custom_target(genversiongui ALL
|
||||||
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/version.js")
|
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/version.js")
|
||||||
|
@ -567,7 +567,7 @@ DISTFILES += \
|
|||||||
|
|
||||||
VERSION = $$cat('version.js', lines)
|
VERSION = $$cat('version.js', lines)
|
||||||
VERSION = $$find(VERSION, 'GUI_VERSION')
|
VERSION = $$find(VERSION, 'GUI_VERSION')
|
||||||
VERSION_LONG = $$replace(VERSION, '.*\"v(.*)\"', '\1')
|
VERSION_LONG = $$replace(VERSION, '.*\"(.*)\"', '\1')
|
||||||
VERSION = $$replace(VERSION, '.*(\d+\.\d+\.\d+\.\d+).*', '\1')
|
VERSION = $$replace(VERSION, '.*(\d+\.\d+\.\d+\.\d+).*', '\1')
|
||||||
|
|
||||||
# windows application icon
|
# windows application icon
|
||||||
|
@ -103,7 +103,7 @@ Rectangle {
|
|||||||
MoneroComponents.TextBlock {
|
MoneroComponents.TextBlock {
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
color: MoneroComponents.Style.dimmedFontColor
|
color: MoneroComponents.Style.dimmedFontColor
|
||||||
text: Version.GUI_MONERO_VERSION + translationManager.emptyString
|
text: moneroVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@ -390,7 +390,7 @@ Rectangle {
|
|||||||
onClicked: {
|
onClicked: {
|
||||||
var data = "";
|
var data = "";
|
||||||
data += "GUI version: " + Version.GUI_VERSION + " (Qt " + qtRuntimeVersion + ")";
|
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 path: " + walletLocation.walletPath;
|
||||||
|
|
||||||
data += "\nWallet creation height: ";
|
data += "\nWallet creation height: ";
|
||||||
|
@ -38,6 +38,9 @@
|
|||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
#include <QRegExp>
|
#include <QRegExp>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
|
|
||||||
|
#include <version.h>
|
||||||
|
|
||||||
#include "clipboardAdapter.h"
|
#include "clipboardAdapter.h"
|
||||||
#include "filter.h"
|
#include "filter.h"
|
||||||
#include "oscursor.h"
|
#include "oscursor.h"
|
||||||
@ -499,6 +502,8 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
|
|||||||
#endif
|
#endif
|
||||||
engine.rootContext()->setContextProperty("builtWithScanner", builtWithScanner);
|
engine.rootContext()->setContextProperty("builtWithScanner", builtWithScanner);
|
||||||
|
|
||||||
|
engine.rootContext()->setContextProperty("moneroVersion", MONERO_VERSION_FULL);
|
||||||
|
|
||||||
Network network;
|
Network network;
|
||||||
engine.rootContext()->setContextProperty("Network", &network);
|
engine.rootContext()->setContextProperty("Network", &network);
|
||||||
|
|
||||||
|
@ -1,2 +1 @@
|
|||||||
var GUI_VERSION = "@VERSION_TAG_GUI@";
|
var GUI_VERSION = "@VERSION_TAG_GUI@";
|
||||||
var GUI_MONERO_VERSION = "@VERSION_TAG_CORE@";
|
|
||||||
|
Loading…
Reference in New Issue
Block a user