程序:生成差别文件

优质
小牛编辑
119浏览
2023-12-01

引用 生成差别文件.nsi的内容:

SetCompressor /SOLID lzma
SetCompress force
OutFile "生成差别文件.EXE"
Name "生成差别文件"
ShowInstDetails show
Page Custom ShowCustom LeaveCustom
Page instfiles
var INI
Function .onInit
InitPluginsDir
GetTempFileName $INI $TEMP
File /oname=$INI "生成差别文件.ini"
FunctionEnd
Function ShowCustom
InstallOptions::initDialog /NOUNLOAD "$INI"
InstallOptions::show
FunctionEnd
Function LeaveCustom
ReadINIStr $R1 $INI "Field 1" "State"
ReadINIStr $R2 $INI "Field 2" "State"
ReadINIStr $R3 $INI "Field 3" "State"
FunctionEnd
Section
File /oname=$PLUGINSDIR\GenPat.exe GenPat.exe
DetailPrint 'GENPAT -V -R "$R1" "$R2" "$R3"'
nsExec::ExecToLog 'GENPAT -V "$R1" "$R2" "$R3"'

SectionEnd

引用 生成差别文件.ini 的内容:

; Ini file generated by the HM NIS Edit IO designer.
[Settings]
NumFields=6
BackEnabled=0
NextButtonText=生成

[Field 1]
Type=FileRequest
Left=5
Right=-5
Top=17
Bottom=30

[Field 2]
Type=FileRequest
Left=5
Right=-5
Top=52
Bottom=64

[Field 3]
Type=FileRequest
Flags=REQ_SAVE|WARN_IF_EXIST
Filter=差别文件(*.Pat)|*.Pat|所有文件(*.*)|*.*||
Left=5
Right=-5
Top=92
Bottom=105

[Field 4]
Type=Label
Text=没有更改的文件:
Left=5
Right=91
Top=1
Bottom=11

[Field 5]
Type=Label
Text=已经更改的文件:
Left=5
Right=101
Top=33
Bottom=44

[Field 6]
Type=Label
Text=差别文件输出位置:
Left=5
Right=117
Top=76
Bottom=86

资源文件点击另存