-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enh(nsis) Update defines pattern #3417
Conversation
Defines can include `!`-characters, as seen in this example: https://nsis.sourceforge.io/Check_if_a_file_exists_at_compile_time
I see a lot of |
This is the relevant line: !define !defineifexist "!insertmacro !defineifexist" It's basically a shortcut that assigns the # Default !insertmacro syntax
!insertmacro !defineexists [params]
# Shortcut for !insertmacro
${!defineexist} [params] PS: Unlike variables, defines can begin with any allowed characters – including |
Since I think the syntax in the linked example is kind of terrible, here's a version that only uses !macro DefineIfExist _VAR_NAME _FILE_NAME
# macro code omitted for brevity
!macroend
!define !defineifexist "!insertmacro DefineIfExist" In NSIS, all compile-time commands begin with a |
CHANGES.md
Outdated
@@ -16,6 +16,7 @@ Grammars: | |||
- enh(clojure) Add `regex` mode to regex literal | |||
- fix(clojure) Remove inconsistent/broken highlighting for metadata | |||
- enh(clojure) Add `punctuation` mode for commas. | |||
- enh(nsis) Update defines pattern to allow `!` (#3417) [idleberg][] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add your name around line ~30 also. Each version needs the name repeated, even if you've contributed in the past.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs name attribution for changelog.
Updates pattern for NSIS defines to allow
!
-characters. This example from the NSIS wiki has an example that uses this.Changes
Allow
!
in defines regex patternChecklist
CHANGES.md