fix linux fyne install command & fix window env

try fix windows

try fix windows

fix again

add windows debug build

try ucrt

fix ucrt env

use different mpv build

aaaa

bbb

disable vlc for now

test

build mpv only

update vlc version for windows

add go.sum
This commit is contained in:
aynakeya
2025-07-27 04:01:00 +08:00
parent 82ced0b9a9
commit 6af984cfbb
7 changed files with 329 additions and 25 deletions

View File

@@ -14,8 +14,8 @@ jobs:
GOOS: windows
GOARCH: amd64
EXECUTABLE: AynaLivePlayer.exe
CGO_CFLAGS: "-I/mingw64/include"
CGO_LDFLAGS: "-L/mingw64/lib"
CGO_CFLAGS: "-I${{ github.workspace }}/libmpv/include -I${{ github.workspace }}/libvlc/VideoLAN.LibVLC.Windows.3.0.21/build/x64/include"
CGO_LDFLAGS: "-L${{ github.workspace }}/libmpv -L${{ github.workspace }}/libvlc/VideoLAN.LibVLC.Windows.3.0.21/build/x64"
steps:
- name: Checkout code
@@ -23,37 +23,58 @@ jobs:
with:
submodules: recursive
- name: Set up MSYS2 and install dependencies
uses: msys2/setup-msys2@v2
- name: Install 7-Zip
run: choco install 7zip
- name: Download libmpv
uses: robinraju/release-downloader@v1
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-vlc
mingw-w64-x86_64-mpv
repository: "shinchiro/mpv-winbuild-cmake"
latest: true
fileName: "mpv-dev-x86_64-[0-9]*.7z"
extract: false
out-file-path: "libmpv"
- name: Extract libmpv
run: |
7z x "libmpv/mpv-dev-x86_64-*.7z" -o"libmpv"
- name: Setup NuGet.exe
uses: nuget/setup-nuget@v2
with:
nuget-version: 'latest'
- name: Install VLC dependency
run: nuget install VideoLAN.LibVLC.Windows -OutputDirectory ${{ github.workspace }}/libvlc -Version 3.0.21
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Tidy go.mod
run: go mod tidy
- name: Install Go Dependencies
run: |
go mod tidy
go install fyne.io/tools/cmd/fyne@latest
- name: Bundle assets
run: |
go install fyne.io/tools/cmd/fyne@latest
fyne bundle --name resImageIcon --package resource ./assets/icon2.png > ./resource/bundle.go
- name: Build application
run: go build -o ./${{ env.EXECUTABLE }} -ldflags -H=windowsgui app/main.go
run: |
go build -tags=mpvOnly -v -o ./AynaLivePlayerMpv.exe -ldflags -H=windowsgui app/main.go
go build -tags=vlcOnly -v -o ./AynaLivePlayerVlc.exe -ldflags -H=windowsgui app/main.go
go build -v -o ./AynaLivePlayerAllPlayer.exe -ldflags -H=windowsgui app/main.go
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: windows-build
path: ./${{ env.EXECUTABLE }}
path: |
./AynaLivePlayerMpv.exe
./AynaLivePlayerVlc.exe
./AynaLivePlayerAllPlayer.exe
build-ubuntu:
runs-on: ubuntu-latest
@@ -80,12 +101,13 @@ jobs:
with:
go-version: '1.22'
- name: Tidy go.mod
run: go mod tidy
- name: Install Go Dependencies
run: |
go mod tidy
go install fyne.io/tools/cmd/fyne@latest
- name: Bundle assets
run: |
go install fyne.io/fyne/v2/cmd/fyne@latest
fyne bundle --name resImageIcon --package resource ./assets/icon.png > ./resource/bundle.go
- name: Build application