Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
RestartFU committed Nov 3, 2024
1 parent e09f7e7 commit f5ca1a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
install:
mkdir -p bin
go build -o bin/bin .
sudo cp bin/bin /usr/bin/portmypack
build:
go build -ldflags "-s -w -H=windowsgui"
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"os"
"os/exec"
"strings"
"syscall"
"unsafe"

"github.com/restartfu/portmypack/portmypack"
Expand All @@ -27,7 +28,9 @@ func main() {
out := fmt.Sprintf("%s\\portmypack-%d.mcpack", os.TempDir(), rand.Int63())
portmypack.PortJavaEditionPack(javapack, out)

err = exec.Command("cmd.exe", "/c", out).Run()
cmd := exec.Command("cmd", "/c", out)
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
err = cmd.Run()
if err != nil {
log.Fatalln(err)
}
Expand Down

0 comments on commit f5ca1a9

Please sign in to comment.