Games-Axmud
view release on metacpan or search on metacpan
nsis/axmud_install.nsi view on Meta::CPAN
# mklink make mingw32-make.exe
# exit
#
# - Open the mingw64 terminal again (C:\foobar\msys64\mingw64.exe), and type
# these commands
#
# cd axmud
# perl Makefile.PL
# make
# make install
#
# - If you like you can now remove these files/folders:
#
# C:\foobar\msys64\home\YOURNAME\axmud\blib
# C:\foobar\msys64\home\YOURNAME\axmud\.cpanm
# C:\foobar\msys64\home\YOURNAME\axmud\.cpan-w64
#
# - In the folder C:\foobar\msys64\home\YOURNAME\axmud\nsis, find the
# following files, and MOVE them into the folder above (i.e. into
# C:\foobar\msys64\home\YOURNAME\axmud)
#
# axmud_mswin.sh
# baxmud_mswin.sh
# blindaxmud.bat
# runaxmud.bat
#
# - Now COPY all of the remaining files (not folders) from
# C:\foobar\msys64\home\YOURNAME\axmud\nsis to C:\foobar
# - Right-click C:\foobar\axmud_install.nsi, and select 'Compile NSIS script'
# - After a few minutes, the .exe installer appears in the same folder
# Header files
# -------------------------------
!include "MUI2.nsh"
!include "Sections.nsh"
!include "x64.nsh"
# General
# -------------------------------
;Name and file
Name "Axmud"
OutFile "install-axmud-2.0.0.exe"
;Default installation folder
InstallDir "$LOCALAPPDATA\Axmud"
;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\Axmud" ""
;Request application privileges for Windows Vista
RequestExecutionLevel user
; Extra stuff here
BrandingText " "
# Variables
# -------------------------------
# Var StartMenuFolder
# Interface settings
# -------------------------------
!define MUI_ABORTWARNING
!define MUI_ICON "axmud_icon.ico"
!define MUI_UNICON "axmud_icon.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "axmud_header.bmp"
!define MUI_HEADERIMAGE_UNBITMAP "axmud_header.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP "axmud_wizard.bmp"
# Pages
# -------------------------------
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "license.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Axmud"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Startmenu"
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Axmud MUD Client"
!insertmacro MUI_PAGE_INSTFILES
# 'Run Axmud' option commented out as it doesn't work (for no obvious reason)
# !define MUI_FINISHPAGE_RUN "$INSTDIR\msys64\home\user\axmud\runaxmud.bat"
# !define MUI_FINISHPAGE_RUN_TEXT "Run Axmud"
# !define MUI_FINISHPAGE_RUN_NOTCHECKED
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\msys64\home\user\axmud\share\docs\quick\quick.html"
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Read quick help"
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!define MUI_FINISHPAGE_LINK "Visit the Axmud website for the latest news \
and support"
!define MUI_FINISHPAGE_LINK_LOCATION "http://axmud.sourceforge.io/"
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
# Languages
# -------------------------------
!insertmacro MUI_LANGUAGE "English"
# Installer sections
# -------------------------------
Section "Axmud" SecClient
SectionIn RO
SetOutPath "$INSTDIR"
File "axmud_icon.ico"
File /r msys64
SetOutPath "$INSTDIR\msys64\home\user\axmud"
# Start Menu
CreateDirectory "$SMPROGRAMS\Axmud"
CreateShortCut "$SMPROGRAMS\Axmud\Axmud (all users).lnk" \
"$INSTDIR\msys64\home\user\axmud\runaxmud.bat" "" "$INSTDIR\axmud_icon.ico"
CreateShortCut "$SMPROGRAMS\Axmud\Axmud (visually-impaired users).lnk" \
"$INSTDIR\msys64\home\user\axmud\blindaxmud.bat" "" "$INSTDIR\axmud_icon.ico"
# Desktop icon
CreateShortcut "$DESKTOP\Axmud.lnk" "$INSTDIR\msys64\home\user\axmud\runaxmud.bat" "" \
"$INSTDIR\axmud_icon.ico"
# Store installation folder
WriteRegStr HKCU "Software\Axmud" "" $INSTDIR
# Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
Section "Festival" SecFestival
SetOutPath "C:"
File /r festival
SectionEnd
Section "espeak-ng" SecSpeakNG
SetOutPath "$TEMP"
${If} ${RunningX64}
File "espeak-ng-X64.msi"
ExecWait 'msiexec /i "$TEMP\espeak-ng-X64.msi"'
${Else}
File "espeak-ng-X86.msi"
ExecWait 'msiexec /i "$TEMP\espeak-ng-X86.msi"'
${EndIf}
SectionEnd
Section "eSpeak" SecSpeak
SetOutPath "$TEMP"
File "setup_espeak.exe"
ExecWait "$TEMP\setup_espeak.exe"
SectionEnd
# Descriptions
# -------------------------------
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecClient} "The Axmud client itself"
!insertmacro MUI_DESCRIPTION_TEXT ${SecFestival} \
"Install the Festival text-to-speech engine"
!insertmacro MUI_DESCRIPTION_TEXT ${SecSpeakNG} \
"Install the espeak-ng text-to-speech engine"
!insertmacro MUI_DESCRIPTION_TEXT ${SecSpeak} \
( run in 0.711 second using v1.01-cache-2.11-cpan-39bf76dae61 )