我在这里遗漏了什么。我找到了Nsis7z并找到了这个例子。
File "ArchiveName.7z"
Nsis7z::Extract "ArchiveName.7z"
Delete "$OUTDIR\ArchiveName.7z"
所以我工具并创建:
Section
# Init temporary folder $PLUGINSDIR
InitPluginsDir
# Include 7-zip archive
SetOutPath "$PLUGINSDIR"
ReserveFile "F:\test.7z"
# Extract archive
Nsis7z::Extract "$PLUGINSDIR\test.7z"
Delete "$PLUGINSDIR\test.7z"
SectionEnd
我看到temp文件夹被创建了,但是除了nsis7z.dll之外什么都没有提取到临时文件夹。
我错过了什么。它看起来很基本。
答案 0 :(得分:2)
Section
# Init temporary folder $PLUGINSDIR
InitPluginsDir
# Include 7-zip archive
SetOutPath "$PLUGINSDIR"
ReserveFile D:\test.7z
File Test.7z
# Extract archive
Nsis7z::ExtractWithCallback "$PLUGINSDIR\test.7z"
Delete "$PLUGINSDIR\test.7z"
SectionEnd
您忘记添加文件Test.7z