Font in Readme
How I can set font in readme-shower with equal letter-size. For example, "Courier".
Archive: Font in Readme
Font in Readme
How I can set font in readme-shower with equal letter-size. For example, "Courier".
Use a .rtf file instead of a .txt file: create the file with wordpad where you can set the font to whatever you like.
Originally posted by ecclesThis good idea.
Use a .rtf file instead of a .txt file: create the file with wordpad where you can set the font to whatever you like.
See the resource data for the control ID. However, using a RTF file is much easier.
This my code:
!define APPNAME "MyApp"
!define APPVERS "0.2.1"
!define FILEVERS "021"
!define APPNAMEANDVERSION "${APPNAME} ${APPVERS}"
!define MY_KEY "Software\MySoft\"
Name "${APPNAMEANDVERSION}"
InstallDir "$PROGRAMFILES\${APPNAME}"
InstallDirRegKey HKLM "${MY_KEY}${APPNAME}" "Install Path"
OutFile "${APPNAME}${FILEVERS}.exe"
SetCompressor /FINAL LZMA
!include "MUI.nsh"
MUI_STARTMENUPAGE_DEFAULTFOLDER "MyApp\${APPNAME}"
!define README_FILE "readme.txt"
!define C_S_C
ShowInstDetails nevershow
ShowUninstDetails nevershow
!include "WinMessages.nsh"
!macro NSIS_README_TEXT CONTROL
FindWindow $R4 "#32770" "" $HWNDPARENT
GetDlgItem $R4 $R4 ${CONTROL}
SendMessage $R4 ${WM_SETFONT} $R1 0
!macroEnd
!define MUI_HEADERIMAGE
->-<->-<Skip some defenition-<->-<->-
ShowInstDetails nevershow
ShowUninstDetails nevershow
!define MUI_ABORTWARNING
!insertmacro MUI_PAGE_WELCOME
!ifdef README_FILE
!define MUI_PAGE_HEADER_TEXT "Information"
!define MUI_PAGE_HEADER_SUBTEXT "Please, read the text before continue."
!define MUI_LICENSEPAGE_TEXT_TOP "For continue click Next."
!define MUI_LICENSEPAGE_TEXT_BOTTOM " "
!define MUI_LICENSEPAGE_BUTTON "Next >"
!insertmacro MUI_PAGE_LICENSE ${README_FILE}
!endif
!ifdef WHATSNEW_FILE
///Skip
!endif
!ifdef LICENSE_FILE
//Skip
!endif
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
Var STARTMENU_FOLDER
!insertmacro MUI_PAGE_STARTMENU StartMenu $STARTMENU_FOLDER
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
; Set languages (first is default language)
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_RESERVEFILE_LANGDLL
InstType "Compact"
InstType "Full"
Function CreateFonts
CreateFont $R0 "Courier New" "8" "0"
FunctionEnd
Function .onInit
call CreateFonts
!insertmacro NSIS_README_TEXT 1006
ReadRegStr $1 HKLM "${MY_KEY}${APPNAME}" "Install Path"
StrCmp $1 "" done 0
StrCpy $INSTDIR $1
!ifdef C_S_C
MessageBox MB_YESNO|MB_ICONQUESTION "Create ShortCut on Desktop?" 0 done
!define CREATE_DESKTOP_SHORTCUT
!endif
done:
FunctionEnd
You put the font in $R0 but send $R1.
Yes,
but this don't help me too.
Ok, I write readme in rtf format. :-(