Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
215 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# | ||
# | ||
###################################### | ||
# | ||
# CPACK_NSIS_CREATE_ICONS_EXTRA | ||
# | ||
####################################### | ||
# | ||
# | ||
|
||
# | ||
# | ||
###################################### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# | ||
# | ||
###################################### | ||
# | ||
# CPACK_NSIS_DELETE_ICONS_EXTRA | ||
# | ||
####################################### | ||
# | ||
# | ||
|
||
# | ||
# | ||
###################################### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# | ||
# | ||
###################################### | ||
# | ||
# CPACK_NSIS_EXTRA_INSTALL_COMMANDS | ||
# | ||
####################################### | ||
# | ||
# | ||
|
||
; Install fonts | ||
|
||
StrCpy $FONT_DIR $FONTS | ||
|
||
; Libertine font | ||
!insertmacro InstallTTFFont "${PATH_FONT}\LinLibertine_Re.ttf" \ | ||
"Linux Libertine (TrueType)" | ||
!insertmacro InstallTTFFont "${PATH_FONT}\LinLibertine_Bd.ttf" \ | ||
"Linux Libertine Bold (TrueType)" | ||
!insertmacro InstallTTFFont "${PATH_FONT}\LinLibertine_It.ttf" \ | ||
"Linux Libertine Italic (TrueType)" | ||
!insertmacro InstallTTFFont "${PATH_FONT}\LinLibertine_BI.ttf" \ | ||
"Linux Libertine Bold Italic (TrueType)" | ||
|
||
; GNU Unifont - contains all unicode characters | ||
!insertmacro InstallTTFFont "${PATH_FONT}\unifont-5.1.20080907.ttf" \ | ||
"GNU Unifont (TrueType)" | ||
|
||
; FreeSans font | ||
!insertmacro InstallTTFFont "${PATH_FONT}\FreeSans.ttf" \ | ||
"Free Sans (TrueType)" | ||
!insertmacro InstallTTFFont "${PATH_FONT}\FreeSansBold.ttf" \ | ||
"Free Sans Bold (TrueType)" | ||
!insertmacro InstallTTFFont "${PATH_FONT}\FreeSansOblique.ttf" \ | ||
"Free Sans Oblique (TrueType)" | ||
!insertmacro InstallTTFFont "${PATH_FONT}\FreeSansBoldOblique.ttf" \ | ||
"Free Sans Bold Oblique (TrueType)" | ||
|
||
; FreeSerif font | ||
!insertmacro InstallTTFFont "${PATH_FONT}\FreeSerif.ttf" \ | ||
"Free Serif (TrueType)" | ||
!insertmacro InstallTTFFont "${PATH_FONT}\FreeSerifBold.ttf" \ | ||
"Free Serif Bold (TrueType)" | ||
!insertmacro InstallTTFFont "${PATH_FONT}\FreeSerifItalic.ttf" \ | ||
"Free Serif Italic (TrueType)" | ||
!insertmacro InstallTTFFont "${PATH_FONT}\FreeSerifBoldItalic.ttf" \ | ||
"Free Serif Bold Italic (TrueType)" | ||
|
||
; Notify Windows applications about new fonts | ||
SendMessage ${HWND_BROADCAST} ${WM_FONTCHANGE} 0 0 /TIMEOUT=5000 | ||
|
||
|
||
; Shared folder for Sword modules must exist | ||
SetShellVarContext all | ||
; Shared Sword Folder | ||
SetOutPath '$APPDATA\${INSTPATH_SWORD}' | ||
; set to default value | ||
SetShellVarContext current | ||
|
||
|
||
!define APP_BINARY_NAME "xiphos.exe" | ||
|
||
; Xiphos as default handler of url sword:// | ||
;WriteRegStr HKCR "sword" "" "URL:sword Protocol" | ||
;WriteRegStr HKCR "sword" "URL Protocol" "" | ||
;WriteRegStr HKCR "sword\DefaultIcon" "" \ | ||
;'"$INSTDIR\bin\${APP_BINARY_NAME}"' | ||
;WriteRegStr HKCR "sword\shell\open\command" "" \ | ||
;'"$INSTDIR\bin\${APP_BINARY_NAME}" "%1"' | ||
|
||
WriteRegStr ${SWURL_REG_ROOT} ${SWURL_REG_KEY} "" "URL:sword Protocol" | ||
WriteRegStr ${SWURL_REG_ROOT} ${SWURL_REG_KEY} "URL Protocol" "" | ||
WriteRegStr ${SWURL_REG_ROOT} ${SWURL_REG_KEY_ICON} "" \ | ||
'"$INSTDIR\bin\${APP_BINARY_NAME}"' | ||
WriteRegStr ${SWURL_REG_ROOT} ${SWURL_REG_KEY_COMMAND} "" \ | ||
'"$INSTDIR\bin\${APP_BINARY_NAME}" "%1"' | ||
|
||
# | ||
# | ||
###################################### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# | ||
# | ||
###################################### | ||
# | ||
# CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS | ||
# | ||
###################################### | ||
# | ||
# | ||
|
||
# | ||
# | ||
###################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# | ||
# | ||
###################################### | ||
# | ||
# CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS | ||
# | ||
####################################### | ||
# | ||
# | ||
|
||
; delete handler of url sword:// | ||
DeleteRegKey ${SWURL_REG_ROOT} ${SWURL_REG_KEY} | ||
|
||
# | ||
# | ||
###################################### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# | ||
# | ||
###################################### | ||
# | ||
# CPACK_NSIS_INSTALLER_MUI_ICON_CODE | ||
# | ||
####################################### | ||
# | ||
# | ||
|
||
; Re-create settings defined by the original code | ||
!define MUI_ICON "..\..\..\..\win32\nsis\pixmaps/icon-install.ico" | ||
!define MUI_UNICON "..\..\..\..\win32\nsis\pixmaps\icon-uninstall.ico" | ||
|
||
; Our own settings: | ||
|
||
; Add RTL header image | ||
!define MUI_UI_HEADERIMAGE_RTL "..\..\..\..\win32\nsis\pixmaps\header-r.bmp" | ||
|
||
; | ||
!define INSTPATH_SWORD "Sword" | ||
|
||
; REG keys to handle url sword:// by Xiphos | ||
!define SWURL_REG_ROOT "HKCR" # HKEY_CLASSES_ROOT | ||
!define SWURL_REG_KEY "sword" | ||
!define SWURL_REG_KEY_ICON "${SWURL_REG_KEY}\DefaultIcon" | ||
!define SWURL_REG_KEY_COMMAND "${SWURL_REG_KEY}\shell\open\command" | ||
|
||
|
||
; Include Macro for registering fonts | ||
!define INCL_DIR "..\..\..\..\win32\nsis\include" | ||
!define PATH_FONT "..\..\..\..\win32\fonts" | ||
!include "${INCL_DIR}\fontreg.nsh" | ||
|
||
# | ||
# | ||
###################################### | ||
|