目前来看,除了 Notepad++,其他编辑器基本没法对 NSIS 脚本进行语法高亮

2016-03-13 15:53:31 +08:00
 wbsdty331

正常的高亮应该是这样的:

!insertmacro MUI_PAGE_WELCOME
 ;许可协议页面
!insertmacro MUI_PAGE_LICENSE "License.rtf"
; 安装目录选择页面
!define MUI_PAGE_CUSTOMFUNCTION_SHOW fnc_Sourcesdk_Show
; 显示自定义页面
!insertmacro MUI_PAGE_DIRECTORY
; 安装过程页面
!define MUI_PAGE_CUSTOMFUNCTION_SHOW hidebutton
!insertmacro MUI_PAGE_INSTFILES
; 安装完成页面
!insertmacro MUI_PAGE_FINISH
; 安装界面包含的语言设置
!insertmacro MUI_LANGUAGE "English"
; 安装预释放
ReserveFile '${NSISDIR}\Plugins\InstallOptions.dll'
ReserveFile '${NSISDIR}\Plugins\BASSMOD.dll'
; ------ MUI 现代界面定义结束 ------

; 安装程序相关的设置
var ssdir
Caption "Combine Prelude"
AllowRootDirInstall false
ReserveFile "${NSISDIR}\Plugins\system.dll"
ReserveFile "${NSISDIR}\Plugins\ButtonLinker.dll"
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "CPSetup.exe"
InstallDirRegKey HKCU "SOFTWARE\Valve\Steam" "SourceModInstallPath"
ShowInstDetails hide
BrandingText "wbsdty331 / CPMod Team"
;设置使用管理员权限运行
RequestExecutionLevel admin

测试报告


We currently don't plan add to NSIS highlighting to VSCode, but this could be easily added as an extension, e.g. using this text mate grammar: https://github.com/SublimeText/NSIS/blob/master/NSIS.tmLanguage
Check out https://code.visualstudio.com/docs/tools/yocode about how to create an extension.

1740 次点击
所在节点    程序员
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/263183

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX