mirror of
https://github.com/H-uru/korman.git
synced 2025-07-14 02:27:36 -04:00
Fetch the Blender install from MSI registry
Somewhere around Blender 2.75, the SCONS build system was removed and CMake reigned supreme. The installer was of course changed to a Windows Installer generated by CPack. Unfortunately for us, the registry keys changed. Windows Installer's registry stuff sucks, but this is the easiest way for us to get at it.
This commit is contained in:
91
installer/RegGuid.nsh
Normal file
91
installer/RegGuid.nsh
Normal file
@ -0,0 +1,91 @@
|
||||
!macro StrAppendChar src_str src_idx dst_str
|
||||
Push $R0
|
||||
StrCpy $R0 ${src_str} 1 ${src_idx}
|
||||
StrCpy ${dst_str} ${dst_str}$R0
|
||||
Pop $R0
|
||||
!macroend
|
||||
!define StrAppendChar `!insertmacro StrAppendChar`
|
||||
|
||||
; Takes a Guid string and returns the mangled form found in Windows Installer registry values
|
||||
; Input MUST contain dashes but no brackets enclosing the guid
|
||||
!macro MangleGuidForRegistry src dst
|
||||
StrCpy ${dst} ""
|
||||
${StrAppendChar} ${src} 7 ${dst}
|
||||
${StrAppendChar} ${src} 6 ${dst}
|
||||
${StrAppendChar} ${src} 5 ${dst}
|
||||
${StrAppendChar} ${src} 4 ${dst}
|
||||
${StrAppendChar} ${src} 3 ${dst}
|
||||
${StrAppendChar} ${src} 2 ${dst}
|
||||
${StrAppendChar} ${src} 1 ${dst}
|
||||
${StrAppendChar} ${src} 0 ${dst}
|
||||
; Dash
|
||||
${StrAppendChar} ${src} 12 ${dst}
|
||||
${StrAppendChar} ${src} 11 ${dst}
|
||||
${StrAppendChar} ${src} 10 ${dst}
|
||||
${StrAppendChar} ${src} 9 ${dst}
|
||||
; Dash
|
||||
${StrAppendChar} ${src} 17 ${dst}
|
||||
${StrAppendChar} ${src} 16 ${dst}
|
||||
${StrAppendChar} ${src} 15 ${dst}
|
||||
${StrAppendChar} ${src} 14 ${dst}
|
||||
; Dash
|
||||
${StrAppendChar} ${src} 20 ${dst}
|
||||
${StrAppendChar} ${src} 19 ${dst}
|
||||
${StrAppendChar} ${src} 22 ${dst}
|
||||
${StrAppendChar} ${src} 21 ${dst}
|
||||
; Dash
|
||||
${StrAppendChar} ${src} 25 ${dst}
|
||||
${StrAppendChar} ${src} 24 ${dst}
|
||||
${StrAppendChar} ${src} 27 ${dst}
|
||||
${StrAppendChar} ${src} 26 ${dst}
|
||||
${StrAppendChar} ${src} 29 ${dst}
|
||||
${StrAppendChar} ${src} 28 ${dst}
|
||||
${StrAppendChar} ${src} 31 ${dst}
|
||||
${StrAppendChar} ${src} 30 ${dst}
|
||||
${StrAppendChar} ${src} 33 ${dst}
|
||||
${StrAppendChar} ${src} 32 ${dst}
|
||||
${StrAppendChar} ${src} 35 ${dst}
|
||||
${StrAppendChar} ${src} 34 ${dst}
|
||||
!macroend
|
||||
!define MangleGuidForRegistry `!insertmacro MangleGuidForRegistry`
|
||||
|
||||
!macro UnmangleGuidFromRegistry src dst
|
||||
StrCpy ${dst} ""
|
||||
${StrAppendChar} ${src} 7 ${dst}
|
||||
${StrAppendChar} ${src} 6 ${dst}
|
||||
${StrAppendChar} ${src} 5 ${dst}
|
||||
${StrAppendChar} ${src} 4 ${dst}
|
||||
${StrAppendChar} ${src} 3 ${dst}
|
||||
${StrAppendChar} ${src} 2 ${dst}
|
||||
${StrAppendChar} ${src} 1 ${dst}
|
||||
${StrAppendChar} ${src} 0 ${dst}
|
||||
${StrAppendChar} "-" 0 ${dst}
|
||||
${StrAppendChar} ${src} 11 ${dst}
|
||||
${StrAppendChar} ${src} 10 ${dst}
|
||||
${StrAppendChar} ${src} 9 ${dst}
|
||||
${StrAppendChar} ${src} 8 ${dst}
|
||||
${StrAppendChar} "-" 0 ${dst}
|
||||
${StrAppendChar} ${src} 15 ${dst}
|
||||
${StrAppendChar} ${src} 14 ${dst}
|
||||
${StrAppendChar} ${src} 13 ${dst}
|
||||
${StrAppendChar} ${src} 12 ${dst}
|
||||
${StrAppendChar} "-" 0 ${dst}
|
||||
${StrAppendChar} ${src} 17 ${dst}
|
||||
${StrAppendChar} ${src} 16 ${dst}
|
||||
${StrAppendChar} ${src} 19 ${dst}
|
||||
${StrAppendChar} ${src} 18 ${dst}
|
||||
${StrAppendChar} "-" 0 ${dst}
|
||||
${StrAppendChar} ${src} 21 ${dst}
|
||||
${StrAppendChar} ${src} 20 ${dst}
|
||||
${StrAppendChar} ${src} 23 ${dst}
|
||||
${StrAppendChar} ${src} 22 ${dst}
|
||||
${StrAppendChar} ${src} 25 ${dst}
|
||||
${StrAppendChar} ${src} 24 ${dst}
|
||||
${StrAppendChar} ${src} 27 ${dst}
|
||||
${StrAppendChar} ${src} 26 ${dst}
|
||||
${StrAppendChar} ${src} 29 ${dst}
|
||||
${StrAppendChar} ${src} 28 ${dst}
|
||||
${StrAppendChar} ${src} 31 ${dst}
|
||||
${StrAppendChar} ${src} 30 ${dst}
|
||||
!macroend
|
||||
!define UnmangleGuidFromRegistry `!insertmacro UnmangleGuidFromRegistry`
|
Reference in New Issue
Block a user