Installation NSIS Zipdl插件不工作
我正在尝试做一个简单的安装程序,我想复制一个zip文件到我的安装目录,并解压缩它的内容,但现在它只复制我的zip,而不解压缩它 这是我的密码Installation NSIS Zipdl插件不工作,installation,zip,nsis,Installation,Zip,Nsis,我正在尝试做一个简单的安装程序,我想复制一个zip文件到我的安装目录,并解压缩它的内容,但现在它只复制我的zip,而不解压缩它 这是我的密码 ;-------------------------------- ;Include Modern UI !include "MUI2.nsh" ;-------------------------------- ;General Name "App" ; Name of the app to install OutFil
;--------------------------------
;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
;--------------------------------
--------------------------------
;包括现代用户界面
!包括“MUI2.nsh”
;--------------------------------
;一般的
名称为“应用程序”;要安装的应用程序的名称
输出文件“setup.exe”;应用程序安装程序的名称
InstallDir“c:\app\”;应用程序安装目录(默认C:)
InstallDirRegKey HKCU“软件\应用程序”;从注册表获取安装文件夹(如果可用)
RequestExecutionLevel用户;请求Windows Vista的应用程序权限
标题“应用程序”
;--------------------------------
;接口设置
!定义MUI_ABORTWARNING
;--------------------------------
;语言选择对话框设置
;还记得安装程序的语言吗
!定义MUI_LANGDLL_注册表_根“HKCU”
!定义MUI\U LANGDLL\U注册表项“软件\应用程序”
!定义MUI_LANGDLL_注册表_VALUENAME“语言”
;--------------------------------
;页
!插入宏MUI\u页面\u欢迎
!insertmacro MUI_页面_许可证“LICENSE.txt”
!插入宏MUI_页面_组件
!insertmacro MUI_页面目录
!插入宏MUI_页面文件
!插入宏MUI\u页面\u完成
;!插入宏MUI_UNPAGE_欢迎
;!插入宏MUI_UNPAGE_确认
;!插入宏MUI_UNPAGE_INSTFILES
;!插入宏MUI_未分页_饰面
;--------------------------------
;语言文字
!插入宏梅语言“英语”;默认英语
!插入“西班牙语”;西班牙的
;--------------------------------
; 拉链处理
!包括“ZipDLL.nsh”
;--------------------------------
;安装程序部分
“XAMPP”应用程序部分
设置输出路径“$INSTDIR”
文件App.zip
WriteRegStr HKCU“Software\App”“”$INSTDIR;存储安装文件夹
; WriteUninstaller“$INSTDIR\Uninstall.exe”;创建卸载程序
; !insertmacro ZIPDLL_EXTRACT“$INSTDIR\App.zip”“$INSTDIR”“”
!insertmacro Zipdell\u解压缩“C:\App\App.zip”“C:\App\”
分段结束
;--------------------------------
;描述
;语言字符串
LangString DESC_App${LANG_ENGLISH}“安装App所需的服务器模块。”
LangString DESC_App${LANG_SPANISH}“不稳定应用程序所需的服务模块”
;为节指定语言字符串
!insertmacro MUI\u函数\u说明\u开始
!insertmacro MUI_DESCRIPTION_TEXT${App}$(DESC_App)
!插入宏MUI\u函数\u说明\u结束
;--------------------------------
;卸载程序部分
;“卸载”部分
; ;在这里添加您自己的文件。。。
; 删除“$INSTDIR\Uninstall.exe”
; RMDir“$INSTDIR”
; DeleteRegKey/ifempty HKCU“软件\应用程序”
;分段结束
;--------------------------------
;安装程序功能
函数。onInit
!插入宏MUI_LANGDLL_显示
功能端
;--------------------------------
;卸载程序功能
; 函数un.onInit
; !插入宏MUI_UNGETLANGUAGE
; 功能端
;--------------------------------
有什么建议吗?将RequestExecutionLevel设置为admin时也不起作用?假设您要安装到程序文件,您将不得不这样做(尽管它也不会将zip解压缩到该文件夹)。你确定文件已经准备好了吗?我正在使用NSIS的可移植版本来编译我的安装程序。然后我在我的电脑上安装了完整版本,同一个脚本现在可以完美地工作。文件已准备就绪,安装程序将其复制到安装目录(C:\App),但它不是unziping.hm,只是测试了您的脚本,效果很好,所以,也许问题不在你的代码中?我使用的是NSIS的可移植版本来编译我的安装程序。我在我的电脑上安装了NSIS,使用了完全相同的脚本,现在看来它正在工作。也许便携式NSIS应用程序有问题。哇,我为什么不早点做呢!