From 76fb6dc6b175416ce4f62f496be702cbc7f558aa Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 2 Dec 2013 06:20:56 -0500 Subject: [PATCH] Added support for XP --- cmd/helper_windows.go | 10 ++++++++++ gopm.go | 2 ++ 2 files changed, 12 insertions(+) diff --git a/cmd/helper_windows.go b/cmd/helper_windows.go index 852299b93..20f9da6f1 100644 --- a/cmd/helper_windows.go +++ b/cmd/helper_windows.go @@ -2,9 +2,19 @@ package cmd import ( "os/exec" + "syscall" ) func makeLink(oldPath, newPath string) error { + // Check if Windows version is XP. + cmd := exec.Command("cmd", "/c", "mklink", "/j", newPath, oldPath) return cmd.Run() } + +func getWindowsVersion() int { + dll := syscall.MustLoadDLL("kernel32.dll") + p := dll.MustFindProc("GetVersion") + v, _, _ := p.Call() + return v +} diff --git a/gopm.go b/gopm.go index e9e14385c..ee4bb4fea 100644 --- a/gopm.go +++ b/gopm.go @@ -18,6 +18,7 @@ package main import ( "os" "runtime" + "time" "github.com/codegangsta/cli" @@ -60,5 +61,6 @@ func main() { cmd.CmdInstall, //cmd.CmdTest, } + app.Compiled = time.Now() app.Run(os.Args) }