aboutsummaryrefslogtreecommitdiffstats
path: root/medley_new/installer/settings/functions.nsh
diff options
context:
space:
mode:
authorbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-10-14 18:02:35 +0000
committerbrunzelchen <brunzelchen@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-10-14 18:02:35 +0000
commit8782261d8fa6d2456d85b245b7d01824414b8d51 (patch)
tree0befc2a96e4dfea7d073f9beb83a310a9f6bdc9c /medley_new/installer/settings/functions.nsh
parentd165a085eecd9f0d2e9d603de269941d1d30c620 (diff)
downloadusdx-8782261d8fa6d2456d85b245b7d01824414b8d51.tar.gz
usdx-8782261d8fa6d2456d85b245b7d01824414b8d51.tar.xz
usdx-8782261d8fa6d2456d85b245b7d01824414b8d51.zip
new medley branch, based on the actual (1.1) trunk. the old one will be deleted soon
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@2666 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'medley_new/installer/settings/functions.nsh')
-rw-r--r--medley_new/installer/settings/functions.nsh50
1 files changed, 50 insertions, 0 deletions
diff --git a/medley_new/installer/settings/functions.nsh b/medley_new/installer/settings/functions.nsh
new file mode 100644
index 00000000..d437c9e1
--- /dev/null
+++ b/medley_new/installer/settings/functions.nsh
@@ -0,0 +1,50 @@
+; Creates Desktop Shortcut(s) if
+; checked on Finish Page
+
+Function CreateDesktopShortCuts
+SetOutPath "$INSTDIR"
+CreateShortcut "$Desktop\$(sm_shortcut).lnk" "$INSTDIR\ultrastardx.exe"
+FunctionEnd
+
+; Deletes only empty dirs which are
+; at the top of the stack.
+
+Function un.DeleteIfEmpty
+ FindFirst $R0 $R1 "$0\*.*"
+ strcmp $R1 "." 0 NoDelete
+ FindNext $R0 $R1
+ strcmp $R1 ".." 0 NoDelete
+ ClearErrors
+ FindNext $R0 $R1
+ IfErrors 0 NoDelete
+ FindClose $R0
+ Sleep 1000
+ RMDir "$0"
+ NoDelete:
+ FindClose $R0
+FunctionEnd
+
+; Finds UltraStar Deluxe process
+;
+
+!define nsProcess::FindProcess `!insertmacro nsProcess::FindProcess`
+
+!macro nsProcess::FindProcess _FILE _ERR
+ nsProcess::_FindProcess /NOUNLOAD `${_FILE}`
+ Pop ${_ERR}
+!macroend
+
+
+!define nsProcess::KillProcess `!insertmacro nsProcess::KillProcess`
+
+!macro nsProcess::KillProcess _FILE _ERR
+ nsProcess::_KillProcess /NOUNLOAD `${_FILE}`
+ Pop ${_ERR}
+!macroend
+
+
+!define nsProcess::Unload `!insertmacro nsProcess::Unload`
+
+!macro nsProcess::Unload
+ nsProcess::_Unload
+!macroend \ No newline at end of file