最新消息:

UltraEdit 绿色便携版DIY

nsis 永恒心锁 1373浏览 0评论
##########################
; UltraEdit 绿色便携版DIY
##########################


SetCompressor /SOLID lzma ;;请使用最新的NSIS2.09进行编译……

!include "DirSetting.nsh"
/***
DirSetting.nsh这个文件首次使用请自己创建。
内容为:
!define "APPDATA" "你当前系统用户的程序数据目录"
***/
!include "MUI.nsh"
!define MUI_ICON "NSISUE.ico"

OutFile "..\UltraEdit.exe"
XPStyle on
Caption "UltraEdit"
CRCCheck off
SilentInstall silent
!insertmacro MUI_LANGUAGE "simpchinese"

VIProductVersion "11.1.2.2"

VIAddVersionKey /LANG=2052 "ProductName" "UltraEdit 绿色便携版"
VIAddVersionKey /LANG=2052 "Comments" "让你通过一个可执行程序方便操作实现所有功能。"
VIAddVersionKey /LANG=2052 "CompanyName" "Hesung Studio"
VIAddVersionKey /LANG=2052 "LegalTrademarks" "IDM Computer Solutions Inc"
VIAddVersionKey /LANG=2052 "LegalCopyright" "Copyright 1994-2005"
VIAddVersionKey /LANG=2052 "FileDescription" "Green Soft"
VIAddVersionKey /LANG=2052 "FileVersion" "11.1.2.2"
VIAddVersionKey /LANG=2052 "ProductVersion" "UltraEdit"
VIAddVersionKey /LANG=2052 "InternalName" "Hsultraedit.exe"


Function .OnInit

IfFileExists "$EXEDIR\MoreSet.ini" 0 Setup

ReadINIStr $0 $EXEDIR\MoreSet.ini Install Command
Rename $EXEDIR\MoreSet.ini $EXEDIR\已经使用_MoreSet.ini
StrCmp $0 "shortcut" Shortcut
StrCmp $0 "Restore" Pass
StrCmp $0 "Clear" DelDir

Shortcut:
CreateShortCut "$DESKTOP\UeditEdit.lnk" \
"C:\Program Files\CatTools\UltraEdit\Uedit32.exe" "" "" ""SW_SHOWMAXIMIZED "" \
"UltraEdit 十六进制专业文本编辑器。"


Setup:
IfFileExists "C:\Program Files\CatTools\UltraEdit\Uedit32.exe" 0 Pass
IfFileExists "C:\Program Files\CatTools\UltraEdit\uedit32.reg" 0 Pass
IfFileExists "C:\Program Files\CatTools\UltraEdit\ue32ctmn.dll" 0 Pass
IfFileExists "C:\Program Files\CatTools\UltraEdit\ueres.dll" 0 Pass
IfFileExists "C:\Program Files\CatTools\UltraEdit\SftpDLL.dll" 0 Pass
IfFileExists "C:\Program Files\CatTools\UltraEdit\ArmAccess.dll" 0 Pass
IfFileExists "C:\Program Files\CatTools\UltraEdit\dbghelp.dll" 0 Pass
IfFileExists "C:\Program Files\CatTools\UltraEdit\tidylib.dll" 0 Pass
IfFileExists "$APPDATA\IDMComp\UltraEdit\Uedit32.*" Exec Cfg


DelDir:
ClearErrors
FileOpen $0 "C:\Program Files\CatTools\UltraEdit\ueres.dll" w
IfErrors 0 +6
FileClose $0
MessageBox MB_ICONINFORMATION|MB_OK "请求删除的 UltraEdit 还处于活动进程状态,请先完全中止其进程。 "
ClearErrors
Rename $EXEDIR\已经使用_MoreSet.ini $EXEDIR\MoreSet.ini
Quit

FileClose $0
Sleep 100
Delete "$DESKTOP\UeditEdit.lnk"
RMDIR /r "C:\Program Files\CatTools\UltraEdit"
Delete /REBOOTOK "C:\Program Files\CatTools\UltraEdit\*.*"
RMDIR /r "${APPDATA}\IDMComp\UltraEdit"
Delete "$EXEDIR\已经使用_MoreSet.ini"
Quit


Pass:
SetOutPath "C:\Program Files\CatTools"
File /r "..\UltraEdit"
advsplash::show 1000 600 400 -1 "C:\Program Files\CatTools\UltraEdit\GNU\Splash"

Cfg:
FileOpen $0 "C:\Program Files\CatTools\UltraEdit\DirSetting.nsh" w
FileWrite $0 "!define $\"APPDATA$\" $\"$APPDATA$\""
FileClose $0


SetOutPath "$APPDATA\IDMComp"
File /r "${APPDATA}\IDMComp\UltraEdit"

Exec:
Exec "C:\Program Files\CatTools\UltraEdit\Uedit32.exe"

ClearErrors
Quit

FunctionEnd

Section "-post"
SectionEnd
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » UltraEdit 绿色便携版DIY

您必须 登录 才能发表评论!