WimImage plug-in: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
(Created page with "{{PageAuthor|JasonFriday13}} == Links == Plugin package:<br> <attach>WimImage_plugin.zip</attach> [http://forums.winamp.com/showthread.php?t=377498 Forum thread] == Descri...") |
(Split the example script into two scripts to show the two step process.) |
||
(One intermediate revision by the same user not shown) | |||
Line 10: | Line 10: | ||
== Description == | == Description == | ||
This plugin is designed to remove the current 2GB limit in NSIS by creating and extracting images contained in .wim files that are separate to the installer. Thanks to the Wim API being unicode only, this plugin is unicode only. This plugin requires Admin privileges to run correctly (blame the API for that one too). Also requires Windows | This plugin is designed to remove the current 2GB limit in NSIS by creating and extracting images contained in .wim files that are separate to the installer. Thanks to the Wim API being unicode only, this plugin is unicode only. This plugin requires Admin privileges to run correctly (blame the API for that one too). Also requires Windows 7 or later. 32 bit and 64 bit plugins are included. | ||
Just extract the contents to your nsis directory (usually 'C:\Program Files\NSIS'). | Just extract the contents to your nsis directory (usually 'C:\Program Files\NSIS'). | ||
== Sample Usage == | == Sample Usage == | ||
Image creation script: | |||
<highlight-nsis> | <highlight-nsis> | ||
Name "Example" | Name "Example .wim Creation Script" | ||
OutFile " | OutFile "ExampleWimCreate.exe" | ||
;Required to use WimImage.dll | ;Required to use WimImage.dll | ||
Line 55: | Line 57: | ||
DetailPrint "" | DetailPrint "" | ||
SectionEnd | SectionEnd | ||
</highlight-nsis> | |||
Image extraction script (installer): | |||
<highlight-nsis> | |||
Name "Example .wim Extract Script" | |||
OutFile "ExampleWimExtract.exe" | |||
;Required to use WimImage.dll | |||
Unicode True | |||
RequestExecutionLevel Admin | |||
Page Components | |||
Page InstFiles | |||
ShowInstDetails Show | |||
Section "WimImage::Extract" | Section "WimImage::Extract" |
Latest revision as of 08:19, 4 June 2015
Author: JasonFriday13 (talk, contrib) |
Links
Plugin package:
WimImage_plugin.zip (44 KB)
Description
This plugin is designed to remove the current 2GB limit in NSIS by creating and extracting images contained in .wim files that are separate to the installer. Thanks to the Wim API being unicode only, this plugin is unicode only. This plugin requires Admin privileges to run correctly (blame the API for that one too). Also requires Windows 7 or later. 32 bit and 64 bit plugins are included.
Just extract the contents to your nsis directory (usually 'C:\Program Files\NSIS').
Sample Usage
Image creation script:
Name "Example .wim Creation Script" OutFile "ExampleWimCreate.exe" ;Required to use WimImage.dll Unicode True RequestExecutionLevel Admin Page Components Page InstFiles ShowInstDetails Show Section "WimImage::AddDir" DetailPrint "WimImage::AddDir, making .wim file" ;Use the defaults for this call (no compress, no verify, default temp dir. WimImage::AddDir /O "$EXEDIR\wimtest.wim" /S "$SMPROGRAMS" Pop $0 DetailPrint "AddDir returned=|$0|" DetailPrint "" SectionEnd Section "WimImage::AppendDir" DetailPrint "WimImage::AppendDir, making base .wim file" ;Use /C 1 (XPRESS compression) with /V (file verification). WimImage::AddDir /O "$EXEDIR\wimtest.wim" /S "$SMPROGRAMS" /C 1 /V Pop $0 DetailPrint "AddDir returned=|$0|" DetailPrint "" DetailPrint "WimImage::AppendDir, appending .wim file" ;Create a pluginsdir temporary directory. CreateDirectory "$PLUGINSDIR\temp" ;Use the temp dir with LZX compression and file verification. WimImage::AppendDir /O "$EXEDIR\wimtest.wim" /S "$DESKTOP" /T "$PLUGINSDIR\temp" /C 2 /V Pop $0 DetailPrint "AppendDir returned=|$0|" DetailPrint "" SectionEnd
Image extraction script (installer):
Name "Example .wim Extract Script" OutFile "ExampleWimExtract.exe" ;Required to use WimImage.dll Unicode True RequestExecutionLevel Admin Page Components Page InstFiles ShowInstDetails Show Section "WimImage::Extract" DetailPrint "WimImage::Extract, Extract .wim file" ;Create a pluginsdir temporary directory. CreateDirectory "$PLUGINSDIR\temp" SetOutPath "$EXEDIR\Folder1" ;Use the temp dir with file verification. WimImage::Extract /O "$EXEDIR\Folder1" /S "$EXEDIR\wimtest.wim" /T "$PLUGINSDIR\temp" /V Pop $0 DetailPrint "Extract returned=|$0|" DetailPrint "" DetailPrint "WimImage::Extract, Extract .wim file" SetOutPath "$EXEDIR\Folder2" ;Use the default temp dir with /I 2, /RS and /V file verification. WimImage::Extract /O "$EXEDIR\Folder2" /S "$EXEDIR\wimtest.wim" /I 2 /RS /V Pop $0 DetailPrint "Extract returned=|$0|" SectionEnd