Browse Source

bug fixed on windowsxp

pull/103/head
lunny 11 years ago
parent
commit
511782dd77
  1. 9
      cmd/build.go
  2. 2
      gopm.go

9
cmd/build.go

@ -17,6 +17,7 @@ package cmd
import (
"os"
"path"
"path/filepath"
"github.com/Unknwon/com"
"github.com/codegangsta/cli"
@ -68,10 +69,12 @@ func buildBinary(ctx *cli.Context, args ...string) {
}
if isWindowsXP {
binName := pkgName + ".exe"
fName := path.Base(pkgName)
binName := fName + ".exe"
os.Remove(binName)
if com.IsFile(path.Join(doc.VENDOR, "src", pkgName, binName)) {
err = os.Rename(path.Join(doc.VENDOR, "src", pkgName, binName), binName)
exePath := filepath.Join(curPath, doc.VENDOR, "src", pkgName, binName)
if com.IsFile(exePath) {
err = os.Rename(exePath, filepath.Join(curPath, binName))
if err != nil {
log.Error("build", "fail to move binary:")
log.Fatal("", "\t"+err.Error())

2
gopm.go

@ -29,7 +29,7 @@ import (
// Test that go1.1 tag above is included in builds. main.go refers to this definition.
const go11tag = true
const APP_VER = "0.6.2.0115"
const APP_VER = "0.6.2.0125"
// //cmd.CmdSearch,
// cmdClean,

Loading…
Cancel
Save