forked from winpython/winpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlauncher_basic.nsi
More file actions
44 lines (41 loc) · 1.13 KB
/
launcher_basic.nsi
File metadata and controls
44 lines (41 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/* WinPython launcher template script
Copyright © 2012 Pierre Raybaut
Licensed under the terms of the MIT License
(see winpython/__init__.py for details)
*/
;================================================================
; These lines are automatically filled when winpython/make.py creates launchers:
!addincludedir ""
!define COMMAND ""
!define PARAMETERS ""
!define WORKDIR ""
Icon ""
OutFile ""
;================================================================
# Standard NSIS plugins
!include "WordFunc.nsh"
!include "FileFunc.nsh"
SilentInstall silent
AutoCloseWindow true
ShowInstDetails nevershow
RequestExecutionLevel user
Section ""
Call Execute
SectionEnd
Function Execute
;Set working Directory ===========================
StrCmp ${WORKDIR} "" 0 workdir
System::Call "kernel32::GetCurrentDirectory(i ${NSIS_MAX_STRLEN}, t .r0)"
SetOutPath $0
Goto end_workdir
workdir:
SetOutPath "${WORKDIR}"
end_workdir:
;Get Command line parameters =====================
${GetParameters} $R1
StrCmp "${PARAMETERS}" "" end_param 0
StrCpy $R1 "${PARAMETERS} $R1"
end_param:
;===== Execution =================================
Exec '"${COMMAND}" $R1'
FunctionEnd