File tree Expand file tree Collapse file tree 4 files changed +71
-7
lines changed
packages/electron-builder/templates/nsis Expand file tree Collapse file tree 4 files changed +71
-7
lines changed Original file line number Diff line number Diff line change 31
31
"ajv" : " ^5.0.4-beta.0" ,
32
32
"ajv-keywords" : " ^2.0.1-beta.2" ,
33
33
"archiver" : " ^1.3.0" ,
34
- "aws-sdk" : " ^2.32 .0" ,
34
+ "aws-sdk" : " ^2.33 .0" ,
35
35
"bluebird-lst" : " ^1.0.2" ,
36
36
"chalk" : " ^1.1.3" ,
37
37
"chromium-pickle-js" : " ^0.2.0" ,
48
48
"mime" : " ^1.3.4" ,
49
49
"minimatch" : " ^3.0.3" ,
50
50
"node-emoji" : " ^1.5.1" ,
51
- "node-forge" : " ^0.7.0 " ,
51
+ "node-forge" : " ^0.7.1 " ,
52
52
"normalize-package-data" : " ^2.3.6" ,
53
53
"parse-color" : " ^1.0.0" ,
54
54
"plist" : " ^2.0.1" ,
63
63
"yargs" : " ^7.0.2"
64
64
},
65
65
"devDependencies" : {
66
- "@types/electron" : " ^1.4.34 " ,
66
+ "@types/electron" : " ^1.4.35 " ,
67
67
"@types/ini" : " ^1.3.29" ,
68
68
"@types/jest" : " ^19.2.2" ,
69
69
"@types/js-yaml" : " ^3.5.29" ,
89
89
"source-map-support" : " ^0.4.14" ,
90
90
"ts-babel" : " ^3.0.0" ,
91
91
"tslint" : " ^4.5.1" ,
92
- "typescript" : " ^2.2.1 " ,
92
+ "typescript" : " ^2.2.2 " ,
93
93
"typescript-json-schema" : " 0.10.0" ,
94
94
"whitespace" : " ^2.1.0" ,
95
95
"xml2js" : " ^0.4.17"
Original file line number Diff line number Diff line change 27
27
!endif
28
28
29
29
!ifdef allowToChangeInstallationDirectory
30
+ !include StrContains.nsh
31
+
30
32
!insertmacro MUI_PAGE_DIRECTORY
33
+
34
+ # pageDirectory leave doesn't work (it seems because $INSTDIR is set after custom leave function)
35
+ # so, we yse instfiles pre
36
+ !define MUI_PAGE_CUSTOMFUNCTION_PRE instFilesPre
37
+
38
+ # Sanitize the MUI_PAGE_DIRECTORY result to make sure it has a application name sub-folder
39
+ Function instFilesPre
40
+ ${If} ${FileExists} " $INSTDIR\*"
41
+ ${StrContains} $0 " ${APP_FILENAME}" $INSTDIR
42
+ ${If} $0 == " "
43
+ StrCpy $INSTDIR " $INSTDIR\${APP_FILENAME}"
44
+ ${endIf}
45
+ ${endIf}
46
+ FunctionEnd
31
47
!endif
32
48
!insertmacro MUI_PAGE_INSTFILES
33
49
!insertmacro MUI_PAGE_FINISH
49
65
# special return value for outer instance so it knows we did not have admin rights
50
66
SetErrorLevel 0x666666
51
67
Quit
52
- ${EndIf }
68
+ ${endIf }
53
69
54
70
!ifndef MULTIUSER_INIT_TEXT_ADMINREQUIRED
55
71
!define MULTIUSER_INIT_TEXT_ADMINREQUIRED " $(^Caption) requires administrator privileges."
Original file line number Diff line number Diff line change
1
+ ; StrContains
2
+ ; This function does a case sensitive searches for an occurrence of a substring in a string.
3
+ ; It returns the substring if it is found.
4
+ ; Otherwise it returns null("").
5
+ ; Written by kenglish_hi
6
+ ; Adapted from StrReplace written by dandaman32
7
+
8
+
9
+ Var STR_HAYSTACK
10
+ Var STR_NEEDLE
11
+ Var STR_CONTAINS_VAR_1
12
+ Var STR_CONTAINS_VAR_2
13
+ Var STR_CONTAINS_VAR_3
14
+ Var STR_CONTAINS_VAR_4
15
+ Var STR_RETURN_VAR
16
+
17
+ Function StrContains
18
+ Exch $STR_NEEDLE
19
+ Exch 1
20
+ Exch $STR_HAYSTACK
21
+ ; Uncomment to debug
22
+ ; MessageBox MB_OK 'STR_NEEDLE = $STR_NEEDLE STR_HAYSTACK = $STR_HAYSTACK '
23
+ StrCpy $STR_RETURN_VAR " "
24
+ StrCpy $STR_CONTAINS_VAR_1 -1
25
+ StrLen $STR_CONTAINS_VAR_2 $STR_NEEDLE
26
+ StrLen $STR_CONTAINS_VAR_4 $STR_HAYSTACK
27
+ loop:
28
+ IntOp $STR_CONTAINS_VAR_1 $STR_CONTAINS_VAR_1 + 1
29
+ StrCpy $STR_CONTAINS_VAR_3 $STR_HAYSTACK $STR_CONTAINS_VAR_2 $STR_CONTAINS_VAR_1
30
+ StrCmp $STR_CONTAINS_VAR_3 $STR_NEEDLE found
31
+ StrCmp $STR_CONTAINS_VAR_1 $STR_CONTAINS_VAR_4 done
32
+ Goto loop
33
+ found:
34
+ StrCpy $STR_RETURN_VAR $STR_NEEDLE
35
+ Goto done
36
+ done:
37
+ Pop $STR_NEEDLE ; Prevent "invalid opcode" errors and keep the
38
+ Exch $STR_RETURN_VAR
39
+ FunctionEnd
40
+
41
+ !macro _StrContainsConstructor OUT NEEDLE HAYSTACK
42
+ Push ` ${HAYSTACK}`
43
+ Push ` ${NEEDLE}`
44
+ Call StrContains
45
+ Pop ` ${OUT}`
46
+ !macroend
47
+
48
+ !define StrContains ' !insertmacro "_StrContainsConstructor"'
Original file line number Diff line number Diff line change @@ -3217,8 +3217,8 @@ typescript-json-schema@0.10.0:
3217
3217
yargs "^6.6.0"
3218
3218
3219
3219
typescript@^2.2.1 :
3220
- version "2.2.1 "
3221
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.2.1 .tgz#4862b662b988a4c8ff691cc7969622d24db76ae9 "
3220
+ version "2.2.2 "
3221
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.2.2 .tgz#606022508479b55ffa368b58fee963a03dfd7b0c "
3222
3222
3223
3223
typescript@~2.1.5 :
3224
3224
version "2.1.6"
You can’t perform that action at this time.
0 commit comments