Changeset: b5ede3e15e31 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b5ede3e15e31
Modified Files:
clients/odbc/winsetup/CMakeLists.txt
clients/odbc/winsetup/setup.c
common/utils/GenerateVersionHeader.cmake
common/utils/monetdb_hgversion.h.in
Branch: Aug2024
Log Message:
Point help button to documentation in the correct branch.
The GIT version of the code still needs to be figured out.
diffs (82 lines):
diff --git a/clients/odbc/winsetup/CMakeLists.txt
b/clients/odbc/winsetup/CMakeLists.txt
--- a/clients/odbc/winsetup/CMakeLists.txt
+++ b/clients/odbc/winsetup/CMakeLists.txt
@@ -23,7 +23,8 @@ target_sources(MonetODBCs
target_include_directories(MonetODBCs
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/monetdb>)
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/monetdb>
+ ${CMAKE_CURRENT_BINARY_DIR}/../../../common/utils)
target_compile_definitions(MonetODBCs
PRIVATE
diff --git a/clients/odbc/winsetup/setup.c b/clients/odbc/winsetup/setup.c
--- a/clients/odbc/winsetup/setup.c
+++ b/clients/odbc/winsetup/setup.c
@@ -16,6 +16,7 @@
#endif
#include "monetdb_config.h"
+#include "monetdb_hgversion.h"
#include <windows.h>
#include <shellapi.h>
/* indicate to sqltypes.h that windows.h has already been included and
@@ -29,6 +30,12 @@
static char *DriverName = "MonetDB ODBC Driver";
static HINSTANCE instance;
+#ifdef MERCURIAL_BRANCH
+#define DOCUMENTATION "documentation-" MERCURIAL_BRANCH
+#else
+#define DOCUMENTATION "documentation"
+#endif
+
static void
ODBCLOG(const char *fmt, ...)
{
@@ -422,7 +429,7 @@ DialogProc(HWND hwndDlg, UINT uMsg, WPAR
case IDC_BUTTON_HELP:
// invoke webbrowser with url to webpage decribing this
setup dialog.
ShellExecute(hwndDlg, NULL,
-
"https://www.monetdb.org/documentation/user-guide/client-interfaces/libraries-drivers/odbc-driver/windows-data-source-setup/",
+ "https://www.monetdb.org/"
DOCUMENTATION
"/user-guide/client-interfaces/libraries-drivers/odbc-driver/windows-data-source-setup/",
NULL, NULL, SW_SHOWNORMAL);
return TRUE;
}
diff --git a/common/utils/GenerateVersionHeader.cmake
b/common/utils/GenerateVersionHeader.cmake
--- a/common/utils/GenerateVersionHeader.cmake
+++ b/common/utils/GenerateVersionHeader.cmake
@@ -10,6 +10,10 @@ if(EXISTS "${DIR}/.hg_archival.txt")
else()
set(MERCURIAL_ID "${HG_NODE}")
endif()
+ if(HG_ARCHIVAL MATCHES ".*branch:.*")
+ string(REGEX REPLACE ".*branch: (.*)" "\\1" HG_BRANCH "${HG_ARCHIVAL}")
+ set(MERCURIAL_BRANCH "${HG_BRANCH}")
+ endif()
else()
message(WARNING "Failed to find mercurial ID")
set(MERCURIAL_ID "Unknown")
@@ -26,6 +30,13 @@ elseif(EXISTS "${DIR}/.hg")
message(WARNING "Failed to find mercurial ID")
set(MERCURIAL_ID "Unknown")
endif()
+ execute_process(COMMAND "${HG_EXECUTABLE}" "id" "-b" WORKING_DIRECTORY
"${DIR}" RESULT_VARIABLE HG_RETURN_CODE2
+ OUTPUT_VARIABLE HG_OUPUT_RES2 OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(HG_RETURN_CODE2 EQUAL 0 AND HG_OUPUT_RES2)
+ set(MERCURIAL_BRANCH "${HG_OUPUT_RES2}")
+ else()
+ message(WARNING "Failed to find mercurial branch")
+ endif()
else()
message(WARNING "Failed to find mercurial")
set(MERCURIAL_ID "Unknown")
diff --git a/common/utils/monetdb_hgversion.h.in
b/common/utils/monetdb_hgversion.h.in
--- a/common/utils/monetdb_hgversion.h.in
+++ b/common/utils/monetdb_hgversion.h.in
@@ -11,3 +11,4 @@
*/
#cmakedefine MERCURIAL_ID "@MERCURIAL_ID@"
+#cmakedefine MERCURIAL_BRANCH "@MERCURIAL_BRANCH@"
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]