Skip to content

Instantly share code, notes, and snippets.

@sredna
sredna / FontInstall.nsi
Last active October 13, 2022 22:57
NSIS FontInstall
; FontInstall.nsh >8 >8 >8 >8 >8 >8 >8 >8
!include LogicLib.nsh
!include WinMessages.nsh
!macro FontInstallHelper FontFileSrc FontFileDst FontInternalName Resource RegSuffix RegRoot
ClearErrors
${IfNot} ${FileExists} "${FontFileDst}"
File "/oname=${FontFileDst}" "${FontFileSrc}"
${EndIf}
${IfNot} ${Errors}
@sredna
sredna / DbgCheckRegisters.nsh
Created May 21, 2023 18:42
NSIS DbgCheckRegisters.nsh
/*
** DbgCheckRegisters.nsh
** =====================
** A header for validating that functions have not touched the registers.
*/
!macro _DbgRegisters_For pre pos list
!if "${list}" == ""
!define /ReDef list "$0$1$2$3$4$5$6$7$8$9$R0$R1$R2$R3$R4$R5$R6$R7$R8$R9"
!endif