-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
139 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,9 @@ on: | |
# Match any new tag | ||
- "*" | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
# Necessary for most environments as build failure can occur due to OOM issues | ||
NODE_OPTIONS: "--max-old-space-size=4096" | ||
|
@@ -17,9 +20,6 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
build: | ||
- name: "Gahara" | ||
platform: "linux/amd64" | ||
os: "ubuntu-latest" | ||
- name: "Gahara" | ||
platform: "darwin/universal" | ||
os: "macos-latest" | ||
|
@@ -31,11 +31,16 @@ jobs: | |
with: | ||
submodules: recursive | ||
|
||
- name: Download FFmpeg for macOS | ||
if: matrix.build.platform == 'darwin/universal' | ||
run: | | ||
chmod +x hack/setup.sh | ||
./hack/setup.sh ${{matrix.build.platform}} | ||
- name: Build wails | ||
uses: dAppServer/[email protected] | ||
id: build | ||
with: | ||
build-name: ${{ matrix.build.name }} | ||
build-platform: ${{ matrix.build.platform }} | ||
package: false | ||
go-version: "1.22" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.PHONY: ffmpeg | ||
ffmpeg: | ||
@echo "Setting up FFmpeg..." | ||
@chmod +x ./hack/setup.sh | ||
@./hack/setup.sh darwin/universal | ||
|
||
|
||
.PHONY: cleanup | ||
cleanup: | ||
@echo "Teardown..." | ||
@rm -rf ./resources/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//go:build darwin | ||
|
||
package main | ||
|
||
import ( | ||
"embed" | ||
"os" | ||
"path/filepath" | ||
) | ||
|
||
//go:embed resources/darwin/ffmpeg | ||
var FFmpegBinary embed.FS | ||
|
||
func ExtractFFmpeg() (string, error) { | ||
data, err := FFmpegBinary.ReadFile("resources/darwin/ffmpeg") | ||
if err != nil { | ||
return "", err | ||
} | ||
|
||
tempDir, err := os.MkdirTemp("", "ffmpeg") | ||
if err != nil { | ||
return "", err | ||
} | ||
|
||
ffmpegPath := filepath.Join(tempDir, "ffmpeg") | ||
err = os.WriteFile(ffmpegPath, data, 0755) | ||
if err != nil { | ||
return "", err | ||
} | ||
return ffmpegPath, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
PLATFORM=$1 | ||
|
||
if [[ "$PLATFORM" == "darwin/universal" ]]; then | ||
echo "Setting up FFmpeg for macOS" | ||
curl -O https://evermeet.cx/ffmpeg/ffmpeg-115960-g3a5202d026.zip | ||
unzip ffmpeg-115960-g3a5202d026.zip | ||
mkdir -p resources/darwin/ | ||
mv ffmpeg resources/darwin/ffmpeg | ||
chmod +x resources/darwin/ffmpeg | ||
rm -rf ffmpeg-115960-g3a5202d026.zip | ||
elif [[ "$PLATFORM" == "linux/amd64" ]]; then | ||
echo "Setting up FFmpeg for Linux" | ||
elif [[ "$PLATFORM" == "windows" ]]; then | ||
echo "Setting up FFmpeg for Windows" | ||
else | ||
echo "Unsupported platform: $PLATFORM" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
//go:build linux | ||
|
||
package main | ||
|
||
import "fmt" | ||
|
||
func ExtractFFmpeg() (string, error) { | ||
return "", fmt.Errorf("unsupported platform") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.