开发者

What is the best way to compress a text file from within an NSIS script?

Assuming that it is possible to compress a file from within an NSIS script, what is the best way to accomplish that and what would be the actual statement?

Is ther开发者_如何学编程e a built-in NSIS instruction for that?


Your question does not really make a lot of sense, are you asking how to install a file, or are you trying to use NSIS as some sort of general file compression utility?

Here is a basic script that "installs" a file:

Outfile test.exe
Requestexecutionlevel user
Setcompressor LZMA
Page instfiles

Section
;Not a good idea to hardcode the destination like this, 
;normally you would use a directory page so the user can choose
SetOutPath "c:\SaveToThisFolder"

;Take thefile.txt from the system you compile on and output it on the end users system 
;into the directory specified by the SetOutPath call
File "thefile.txt"
Sectionend

If you are writing an actual installer for some application, you really should take a look at some of the examples that ship with NSIS

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜