Skip to content

Commit c1b5338

Browse files
committed
Windows build (MSYS2) fixed
1 parent 6d7cf23 commit c1b5338

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,19 @@ jobs:
4747
env:
4848
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4949
run: |
50-
gh release delete 1.0.1 --cleanup-tag --yes || echo "No release or tag found for 1.0.1"
50+
gh release delete 1.0.2 --cleanup-tag --yes || echo "No release or tag found for 1.0.2"
5151
5252
- name: Create Release
5353
id: create_release
5454
uses: actions/create-release@v1
5555
env:
5656
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5757
with:
58-
tag_name: 1.0.1
59-
release_name: EPIC 1.0.1
58+
tag_name: 1.0.2
59+
release_name: EPIC 1.0.2
6060
body: |
61-
- Wrong `pic-link` CLI output information fixed.
61+
- Windows build (MSYS2) support fixed.
62+
- Better error message when required command is not found.
6263
draft: false
6364
prerelease: false
6465

utils/shell.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ func MingwLd(params ...string) string {
5555
ld = "x86_64-w64-mingw32-ld"
5656

5757
if IsWindows() {
58-
ld += ".exe"
58+
ld = "ld.exe"
5959
}
6060
}
6161

6262
if !IsProgramAvailable(ld) {
63-
cli.LogErrf("Mingw-w64 ld linker not found: %s\n", ld)
63+
cli.LogErrf("Mingw-w64 ld linker not found: %s", ld)
64+
cli.LogErrf("Specify path to Mingw-w64 ld: `--mingw-w64-ld <path>`")
6465
os.Exit(1)
6566
}
6667

@@ -75,12 +76,13 @@ func MingwGcc(params ...string) string {
7576
gcc = "x86_64-w64-mingw32-gcc"
7677

7778
if IsWindows() {
78-
gcc += ".exe"
79+
gcc = "gcc.exe"
7980
}
8081
}
8182

8283
if !IsProgramAvailable(gcc) {
8384
cli.LogErrf("Mingw-w64 GCC compiler not found: %s", gcc)
85+
cli.LogErrf("Specify path to Mingw-w64 GCC: `--mingw-w64-gcc <path>`")
8486
os.Exit(1)
8587
}
8688

@@ -95,12 +97,13 @@ func MingwObjcopy(params ...string) string {
9597
objcopy = "x86_64-w64-mingw32-objcopy"
9698

9799
if IsWindows() {
98-
objcopy += ".exe"
100+
objcopy = "objcopy.exe"
99101
}
100102
}
101103

102104
if !IsProgramAvailable(objcopy) {
103-
cli.LogErrf("Mingw-w64 objcopy tool not found: %s\n", objcopy)
105+
cli.LogErrf("Mingw-w64 objcopy tool not found: %s", objcopy)
106+
cli.LogErrf("Specify path to Mingw-w64 objcopy: `--mingw-w64-objcopy <path>`")
104107
os.Exit(1)
105108
}
106109

0 commit comments

Comments
 (0)