Compare commits
3 Commits
7284b9d4b9
...
81d73e9b08
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81d73e9b08 | ||
|
|
36111ff781 | ||
|
|
3a1db4e80c |
@@ -12,6 +12,7 @@ jobs:
|
|||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.21'
|
go-version: '1.21'
|
||||||
|
cache: false
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ jobs:
|
|||||||
- name: Setup Go
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.21' # Adjust to your version
|
go-version: '1.21'
|
||||||
|
cache: false
|
||||||
|
|
||||||
- name: Setup MSYS2
|
- name: Setup MSYS2
|
||||||
uses: msys2/setup-msys2@v2
|
uses: msys2/setup-msys2@v2
|
||||||
@@ -34,9 +35,14 @@ jobs:
|
|||||||
# Ensure Go can find the C libraries via pkg-config
|
# Ensure Go can find the C libraries via pkg-config
|
||||||
export CGO_ENABLED=1
|
export CGO_ENABLED=1
|
||||||
go build -o dist/tui_windows.exe ./cmd/tui
|
go build -o dist/tui_windows.exe ./cmd/tui
|
||||||
|
# Copy necessary DLLs for portability
|
||||||
|
cp /mingw64/bin/libogg-0.dll dist/
|
||||||
|
cp /mingw64/bin/libopus-0.dll dist/
|
||||||
|
cp /mingw64/bin/libopusfile-0.dll dist/
|
||||||
|
cp /mingw64/bin/libportaudio-2.dll dist/ || true
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: tui-windows-binary
|
name: tui-windows-binary
|
||||||
path: dist/tui_windows.exe
|
path: dist/
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"syscall"
|
|
||||||
|
"golang.org/x/sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
func redirectStderr(f *os.File) {
|
func redirectStderr(f *os.File) {
|
||||||
@@ -12,12 +13,12 @@ func redirectStderr(f *os.File) {
|
|||||||
// Silence altogether if no debug file
|
// Silence altogether if no debug file
|
||||||
null, err := os.OpenFile(os.DevNull, os.O_WRONLY, 0)
|
null, err := os.OpenFile(os.DevNull, os.O_WRONLY, 0)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
syscall.Dup2(int(null.Fd()), int(os.Stderr.Fd()))
|
_ = unix.Dup2(int(null.Fd()), int(os.Stderr.Fd()))
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redirect fd 2 (stderr) to our debug file
|
// Redirect fd 2 (stderr) to our debug file
|
||||||
// This captures C-level library noise (ALSA, PortAudio) into the log
|
// This captures C-level library noise (ALSA, PortAudio) into the log
|
||||||
syscall.Dup2(int(f.Fd()), int(os.Stderr.Fd()))
|
_ = unix.Dup2(int(f.Fd()), int(os.Stderr.Fd()))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user