File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,27 @@ if(Git_FOUND)
3434 OUTPUT_VARIABLE NGSCOPECLIENT_VERSION
3535 OUTPUT_STRIP_TRAILING_WHITESPACE )
3636 message ("Git reports scopehal-apps version ${NGSCOPECLIENT_VERSION} " )
37+
38+
39+ execute_process (
40+ COMMAND ${GIT_EXECUTABLE} describe --always --tags --long
41+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
42+ OUTPUT_VARIABLE NGSCOPECLIENT_VERSION_LONG
43+ OUTPUT_STRIP_TRAILING_WHITESPACE )
44+
45+ # Ugly string parsing to make windows build happy
46+ # First path: release candidate tags
47+ if (NGSCOPECLIENT_VERSION_LONG MATCHES "v([0-9]*).([0-9]*)-rc([0-9])-([0-9]*)" )
48+ set (MSI_VERSION "${CMAKE_MATCH_1} .${CMAKE_MATCH_2} .${CMAKE_MATCH_3} .${CMAKE_MATCH_4} " )
49+
50+ # Release tags
51+ elseif (NGSCOPECLIENT_VERSION_LONG MATCHES "v([0-9]*).([0-9]*)-([0-9]*)" )
52+ set (MSI_VERSION "${CMAKE_MATCH_1} .${CMAKE_MATCH_2} .0.${CMAKE_MATCH_3} " )
53+ endif ()
54+
3755else ()
3856 set (NGSCOPECLIENT_VERSION "unknown" )
57+ set (MSI_VERSION "0.1" )
3958 message ("Git not detected, scopehal-apps version unknown" )
4059endif ()
4160
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<?define Manufacturer = " Antikernel Labs" ?>
33<?define Product = " ngscopeclient" ?>
4- <?define Version = " 0.1 " ?>
4+ <?define Version = " @MSI_VERSION@ " ?>
55<?define RegKey = " ngscopeclient" ?>
66<?define DefaultInstallDir = " ngscopeclient" ?>
77<?define ShortcutTarget = " ngscopeclient.exe" ?>
1515 <Property Id =" ARPURLINFOABOUT" Value =" https://www.github.com/azonenberg/scopehal-apps" />
1616 <Property Id =" ARPURLUPDATEINFO" Value =" https://www.github.com/azonenberg/scopehal-apps" />
1717 <Property Id =" ARPNOMODIFY" Value =" 1" />
18- <Directory Id =" TARGETDIR" Name =" SourceDir" >
18+ <Directory Id =" TARGETDIR" Name =" SourceDir" >
1919 <Directory Id =" ProgramMenuFolder" >
2020 <Directory Id =" ProgramMenuDir" Name =" ngscopeclient" >
2121 <Component Id =" StartMenuShortcuts" Guid =" $(var.Uuid.StartMenuShortcuts)" >
4343 <UIRef Id =" WixUI_Custom" />
4444 <Property Id =" ALLUSERS" Value =" 1" />
4545 <Property Id =" WixAppFolder" Value =" WixPerMachineFolder" />
46- <Property Id =" WIXUI_INSTALLDIR" Value =" APPLICATIONFOLDER" />
46+ <Property Id =" WIXUI_INSTALLDIR" Value =" APPLICATIONFOLDER" />
4747 <UI Id =" WixUI_Custom" >
4848 <TextStyle Id =" WixUI_Font_Normal" FaceName =" Tahoma" Size =" 8" />
4949 <TextStyle Id =" WixUI_Font_Bigger" FaceName =" Tahoma" Size =" 12" />
You can’t perform that action at this time.
0 commit comments