(module install-launchers mzscheme
(require (lib "launcher.ss" "launcher")
(lib "etc.ss")
(lib "contract.ss")
(lib "runtime-path.ss"))
(provide/contract [install-launchers
(case->
(path-string? . -> . any)
(-> any))])
(define-runtime-path generate-stags-path "generate-stags.ss")
(define (default-install-directory)
(let ([exec (path->complete-path
(find-executable-path (find-system-path 'exec-file))
(find-system-path 'orig-dir))])
(let-values ([(base name dir?) (split-path exec)])
base)))
(define install-launchers
(case-lambda
[(dest-dir)
(local
((define target-bin (build-path dest-dir "generate-stags")))
(make-mzscheme-launcher (list "-qmvt-" (path->string generate-stags-path))
target-bin))]
[()
(install-launchers (default-install-directory))])))