-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installer support #22
Conversation
Various changes for the MSI installer: - resource def file added; - sample DSN no longer added by driver; this is done now by the installer. - driver file name changed to fit in 8 chars. - the license is renamed to .rtf extention.
'clean' uses MSBuild to invoke cleaning target, so it needs the environment set up.
- ..helpful with troubleshooting. - remove old and unused "copying" "function".
- conversion to UTF8 requires WC_ERR_INVALID_CHARS flag (as per documentation). On some CRT versions, failure to use it would result in function failure, but with no detailed error reporting (GetLastError() == 0).
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of my comments are about the possibility of replacing magic numbers in the resource file with symbols defined in windows.h
.
LICENSE.rtf
Outdated
@@ -1,223 +1,228 @@ | |||
ELASTIC LICENSE AGREEMENT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the repo should still contain the text version of the license as well as the RTF version. The text version doesn't need to be touched by the build system, but should exist for consistency with the other Elastic repos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the .txt version back (chose to install it as well for readability convenience, hope that's not too redundant).
driver/driver.rc.cmake
Outdated
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0 | ||
FILEFLAGSMASK 0x3fL | ||
#ifdef _DEBUG | ||
FILEFLAGS 0x1L |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use VS_FF_DEBUG
instead of 0x1L
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, that's a good idea.
I've used VS's delegating editor, removed the unnecessary parts and modified the relevant ones. The editor uses the defines, but generated .rc uses the values directly (since it doesn't include windows.h originally).
driver/driver.rc.cmake
Outdated
#else | ||
FILEFLAGS 0x0L | ||
#endif | ||
FILEOS 0x40004L |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use VOS_NT_WINDOWS32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
driver/driver.rc.cmake
Outdated
FILEFLAGS 0x0L | ||
#endif | ||
FILEOS 0x40004L | ||
FILETYPE 0x2L |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use VFT_DLL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
driver/driver.rc.cmake
Outdated
VALUE "FileDescription", "ODBC @ENCODING_VERBOSE@ driver for Elasticsearch" | ||
VALUE "FileVersion", "@DRV_VERSION@" | ||
VALUE "InternalName", "@DRV_NAME@@CMAKE_SHARED_LIBRARY_SUFFIX@" | ||
VALUE "LegalCopyright", "Copyright (C) perpetual, Elasticsearch B.V." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this should have the word "perpetual" in it. In other places we don't give a specific year we just say "Copyright (C) Elasticsearch B.V.".
Maybe check with @legalastic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed it to the suggested wording, I suppose that got their blessing.
driver/driver.rc.cmake
Outdated
VS_VERSION_INFO VERSIONINFO | ||
FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0 | ||
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0 | ||
FILEFLAGSMASK 0x3fL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can use VS_FFI_FILEFLAGSMASK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
- also reference it in the README.md
Indeed, you're correct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
closes #21 . |
This PR implements some changes needed by the MSI installer:
It also contains some remotely related fixes:
setup
argument beforeclean
/proper
, since these two need to make use ofMSBuild
.HOMEPAGE_URL
cmake
variable has been a late addition, so not supported by all our CI hosts (some running 3.10 versions vs. latest 3.12).