Windows: Move .vbs files out of git\bin
.. To avoid that being in the PATH, which caused some weird breakage. (Thanks, divB)
This commit is contained in:
parent
059e914f3f
commit
a6fdc4b3bc
2 changed files with 23 additions and 16 deletions
|
@ -37,16 +37,15 @@ main = do
|
||||||
mustSucceed "ln" [File "dist/build/git-annex/git-annex.exe", File gitannex]
|
mustSucceed "ln" [File "dist/build/git-annex/git-annex.exe", File gitannex]
|
||||||
let license = tmpdir </> licensefile
|
let license = tmpdir </> licensefile
|
||||||
mustSucceed "sh" [Param "-c", Param $ "zcat standalone/licences.gz > '" ++ license ++ "'"]
|
mustSucceed "sh" [Param "-c", Param $ "zcat standalone/licences.gz > '" ++ license ++ "'"]
|
||||||
extrafiles <- forM (cygwinPrograms ++ cygwinDlls) $ \f -> do
|
extrabins <- forM (cygwinPrograms ++ cygwinDlls) $ \f -> do
|
||||||
p <- searchPath f
|
p <- searchPath f
|
||||||
when (isNothing p) $
|
when (isNothing p) $
|
||||||
print ("unable to find in PATH", f)
|
print ("unable to find in PATH", f)
|
||||||
return p
|
return p
|
||||||
let webappscript = tmpdir </> "git-annex-webapp.vbs"
|
|
||||||
webappscript <- vbsLauncher tmpdir "git-annex-webapp" "git-annex webapp"
|
webappscript <- vbsLauncher tmpdir "git-annex-webapp" "git-annex webapp"
|
||||||
autostartscript <- vbsLauncher tmpdir "git-annex-autostart" "git annex assistant --autostart"
|
autostartscript <- vbsLauncher tmpdir "git-annex-autostart" "git annex assistant --autostart"
|
||||||
writeFile nsifile $ makeInstaller gitannex license $
|
writeFile nsifile $ makeInstaller gitannex license
|
||||||
catMaybes extrafiles ++
|
(catMaybes extrabins)
|
||||||
[ webappscript, autostartscript ]
|
[ webappscript, autostartscript ]
|
||||||
mustSucceed "makensis" [File nsifile]
|
mustSucceed "makensis" [File nsifile]
|
||||||
removeFile nsifile -- left behind if makensis fails
|
removeFile nsifile -- left behind if makensis fails
|
||||||
|
@ -82,7 +81,7 @@ uninstaller :: FilePath
|
||||||
uninstaller = "git-annex-uninstall.exe"
|
uninstaller = "git-annex-uninstall.exe"
|
||||||
|
|
||||||
gitInstallDir :: Exp FilePath
|
gitInstallDir :: Exp FilePath
|
||||||
gitInstallDir = fromString "$PROGRAMFILES\\Git\\bin"
|
gitInstallDir = fromString "$PROGRAMFILES\\Git"
|
||||||
|
|
||||||
startMenuItem :: Exp FilePath
|
startMenuItem :: Exp FilePath
|
||||||
startMenuItem = "$SMPROGRAMS/git-annex.lnk"
|
startMenuItem = "$SMPROGRAMS/git-annex.lnk"
|
||||||
|
@ -99,8 +98,8 @@ needGit = strConcat
|
||||||
, fromString "You can install git from http:////git-scm.com//"
|
, fromString "You can install git from http:////git-scm.com//"
|
||||||
]
|
]
|
||||||
|
|
||||||
makeInstaller :: FilePath -> FilePath -> [FilePath] -> String
|
makeInstaller :: FilePath -> FilePath -> [FilePath] -> [FilePath] -> String
|
||||||
makeInstaller gitannex license extrafiles = nsis $ do
|
makeInstaller gitannex license extrabins launchers = nsis $ do
|
||||||
name "git-annex"
|
name "git-annex"
|
||||||
outFile $ str installer
|
outFile $ str installer
|
||||||
{- Installing into the same directory as git avoids needing to modify
|
{- Installing into the same directory as git avoids needing to modify
|
||||||
|
@ -122,7 +121,7 @@ makeInstaller gitannex license extrafiles = nsis $ do
|
||||||
[ Target "wscript.exe"
|
[ Target "wscript.exe"
|
||||||
, Parameters "\"$INSTDIR/git-annex-webapp.vbs\""
|
, Parameters "\"$INSTDIR/git-annex-webapp.vbs\""
|
||||||
, StartOptions "SW_SHOWNORMAL"
|
, StartOptions "SW_SHOWNORMAL"
|
||||||
, IconFile "$INSTDIR/git-annex.exe"
|
, IconFile "$INSTDIR/bin/git-annex.exe"
|
||||||
, IconIndex 2
|
, IconIndex 2
|
||||||
, KeyboardShortcut "ALT|CONTROL|a"
|
, KeyboardShortcut "ALT|CONTROL|a"
|
||||||
, Description "git-annex webapp"
|
, Description "git-annex webapp"
|
||||||
|
@ -131,27 +130,33 @@ makeInstaller gitannex license extrafiles = nsis $ do
|
||||||
[ Target "wscript.exe"
|
[ Target "wscript.exe"
|
||||||
, Parameters "\"$INSTDIR/git-annex-autostart.vbs\""
|
, Parameters "\"$INSTDIR/git-annex-autostart.vbs\""
|
||||||
, StartOptions "SW_SHOWNORMAL"
|
, StartOptions "SW_SHOWNORMAL"
|
||||||
, IconFile "$INSTDIR/git-annex.exe"
|
, IconFile "$INSTDIR/bin/git-annex.exe"
|
||||||
, IconIndex 2
|
, IconIndex 2
|
||||||
, Description "git-annex autostart"
|
, Description "git-annex autostart"
|
||||||
]
|
]
|
||||||
-- Groups of files to install
|
-- Groups of files to install
|
||||||
section "main" [] $ do
|
section "bins" [] $ do
|
||||||
setOutPath "$INSTDIR"
|
setOutPath "$INSTDIR\\bin"
|
||||||
addfile gitannex
|
addfile gitannex
|
||||||
|
mapM_ addfile extrabins
|
||||||
|
section "meta" [] $ do
|
||||||
|
setOutPath "$INSTDIR"
|
||||||
addfile license
|
addfile license
|
||||||
mapM_ addfile extrafiles
|
mapM_ addfile launchers
|
||||||
writeUninstaller $ str uninstaller
|
writeUninstaller $ str uninstaller
|
||||||
uninstall $ do
|
uninstall $ do
|
||||||
delete [RebootOK] $ startMenuItem
|
delete [RebootOK] $ startMenuItem
|
||||||
delete [RebootOK] $ autoStartItem
|
delete [RebootOK] $ autoStartItem
|
||||||
mapM_ (\f -> delete [RebootOK] $ fromString $ "$INSTDIR/" ++ f) $
|
removefilesFrom "$INSTDIR" $
|
||||||
[ gitannexprogram
|
[ license
|
||||||
, licensefile
|
|
||||||
, uninstaller
|
, uninstaller
|
||||||
] ++ cygwinPrograms ++ cygwinDlls ++ extrafiles
|
] ++ launchers
|
||||||
|
removefilesFrom "$INSTDIR/bin" $
|
||||||
|
[ gitannex
|
||||||
|
] ++ extrabins
|
||||||
where
|
where
|
||||||
addfile f = file [] (str f)
|
addfile f = file [] (str f)
|
||||||
|
removefilesFrom d = mapM_ (\f -> delete [RebootOK] $ fromString $ d ++ "/" ++ takeFileName f)
|
||||||
|
|
||||||
cygwinPrograms :: [FilePath]
|
cygwinPrograms :: [FilePath]
|
||||||
cygwinPrograms = map (\p -> p ++ ".exe") bundledPrograms
|
cygwinPrograms = map (\p -> p ++ ".exe") bundledPrograms
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -24,6 +24,8 @@ git-annex (5.20140710) UNRELEASED; urgency=medium
|
||||||
gcrypt-publish-participants.
|
gcrypt-publish-participants.
|
||||||
* Install nautilus hooks even when ~/.local/share/nautilus/ does not yet
|
* Install nautilus hooks even when ~/.local/share/nautilus/ does not yet
|
||||||
exist, since it is not automatically created for Gnome 3 users.
|
exist, since it is not automatically created for Gnome 3 users.
|
||||||
|
* Windows: Move .vbs files out of git\bin, to avoid that being in the
|
||||||
|
PATH, which caused some weird breakage. (Thanks, divB)
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Wed, 09 Jul 2014 23:29:21 -0400
|
-- Joey Hess <joeyh@debian.org> Wed, 09 Jul 2014 23:29:21 -0400
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue