我正在尝试做一个简单的安装程序,我想将一个 zip 文件复制到我的安装目录,并在那里解压缩它的内容,但现在它只复制我的 zip,而不是解压缩它。
这是我的代码
;--------------------------------
;Include Modern UI
!include "MUI2.nsh"
;--------------------------------
;General
Name "App" ; Name of the app to install
OutFile "setup.exe" ; Name of the app installer
InstallDir "c:\app\" ; App install directory (default C:)
InstallDirRegKey HKCU "Software\App" "" ; Get installation folder from registry if available
RequestExecutionLevel user ;Request application privileges for Windows Vista
Caption "App"
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
;--------------------------------
;Language Selection Dialog Settings
;Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\App"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Language"
;--------------------------------
;Pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "License.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
;!insertmacro MUI_UNPAGE_WELCOME
;!insertmacro MUI_UNPAGE_CONFIRM
;!insertmacro MUI_UNPAGE_INSTFILES
;!insertmacro MUI_UNPAGE_FINISH
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English" ; Default English
!insertmacro MUI_LANGUAGE "Spanish" ; Spanish
;--------------------------------
; ZIP Handling
!include "ZipDLL.nsh"
;--------------------------------
;Installer Sections
Section "XAMPP" App
SetOutPath "$INSTDIR"
File App.zip
WriteRegStr HKCU "Software\App" "" $INSTDIR ; Store installation folder
; WriteUninstaller "$INSTDIR\Uninstall.exe" ; Create uninstaller
; !insertmacro ZIPDLL_EXTRACT "$INSTDIR\App.zip" "$INSTDIR" "<ALL>"
!insertmacro ZIPDLL_EXTRACT "C:\App\App.zip" "c:\App\" "<ALL>"
SectionEnd
;--------------------------------
;Descriptions
;Language strings
LangString DESC_App ${LANG_ENGLISH} "The server modules necesary to install app."
LangString DESC_App ${LANG_SPANISH} "Los modulos del servidor necesarios para instalar app"
;Assign language strings to sections
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${App} $(DESC_App)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
;--------------------------------
;Uninstaller Sections
;Section "Uninstall"
; ;ADD YOUR OWN FILES HERE...
; Delete "$INSTDIR\Uninstall.exe"
; RMDir "$INSTDIR"
; DeleteRegKey /ifempty HKCU "Software\App"
;SectionEnd
;--------------------------------
;Installer Functions
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
;--------------------------------
;Uninstaller Functions
; Function un.onInit
; !insertmacro MUI_UNGETLANGUAGE
; FunctionEnd
;--------------------------------
有什么建议么?