fix:使用排除类型tag

This commit is contained in:
spiritlhl
2025-11-01 15:27:28 +08:00
parent eec14aec87
commit c4f710bbf3
6 changed files with 5 additions and 89 deletions

View File

@@ -141,7 +141,7 @@ jobs:
ANDROID_NDK_HOME: ${{ env.ANDROID_NDK_HOME }}
GOPRIVATE: github.com/oneclickvirt/security
run: |
fyne package --os android --app-id com.oneclickvirt.goecs --app-version "${{ needs.prepare.outputs.app_version }}" --tags fyne_mobile
fyne package --os android --app-id com.oneclickvirt.goecs --app-version "${{ needs.prepare.outputs.app_version }}"
if [ -f *.apk ]; then
mkdir -p .build
mv *.apk .build/goecs-gui-android-arm64-${{ needs.prepare.outputs.version }}.apk
@@ -156,7 +156,7 @@ jobs:
ANDROID_NDK_HOME: ${{ env.ANDROID_NDK_HOME }}
GOPRIVATE: github.com/oneclickvirt/security
run: |
fyne package --os android/amd64 --app-id com.oneclickvirt.goecs --app-version "${{ needs.prepare.outputs.app_version }}" --tags fyne_mobile
fyne package --os android/amd64 --app-id com.oneclickvirt.goecs --app-version "${{ needs.prepare.outputs.app_version }}"
if [ -f *.apk ]; then
mv *.apk .build/goecs-gui-android-x86_64-${{ needs.prepare.outputs.version }}.apk
echo "x86_64 APK 构建成功"

View File

@@ -1,4 +1,4 @@
//go:build android && amd64
//go:build !windows && !darwin && !linux && amd64
package embedding

View File

@@ -1,4 +1,4 @@
//go:build android && arm
//go:build !windows && !darwin && !linux && arm
package embedding

View File

@@ -1,4 +1,4 @@
//go:build android && arm64
//go:build !windows && !darwin && !linux && arm64
package embedding

View File

@@ -1,42 +0,0 @@
//go:build fyne_mobile && amd64
package embedding
import (
_ "embed"
"fmt"
"os"
"path/filepath"
)
//go:embed binaries/goecs-linux-amd64
var ecsBinary []byte
func getECSBinary() ([]byte, error) {
if len(ecsBinary) == 0 {
return nil, fmt.Errorf("Mobile AMD64 二进制文件未嵌入")
}
return ecsBinary, nil
}
func ExtractECSBinary() (string, error) {
binary, err := getECSBinary()
if err != nil {
return "", err
}
tmpDir := os.TempDir()
ecsPath := filepath.Join(tmpDir, "goecs")
if err := os.WriteFile(ecsPath, binary, 0755); err != nil {
return "", fmt.Errorf("写入二进制文件失败: %v", err)
}
return ecsPath, nil
}
func CleanupECSBinary(path string) {
if path != "" {
os.Remove(path)
}
}

View File

@@ -1,42 +0,0 @@
//go:build fyne_mobile && arm64
package embedding
import (
_ "embed"
"fmt"
"os"
"path/filepath"
)
//go:embed binaries/goecs-linux-arm64
var ecsBinary []byte
func getECSBinary() ([]byte, error) {
if len(ecsBinary) == 0 {
return nil, fmt.Errorf("Mobile ARM64 二进制文件未嵌入")
}
return ecsBinary, nil
}
func ExtractECSBinary() (string, error) {
binary, err := getECSBinary()
if err != nil {
return "", err
}
tmpDir := os.TempDir()
ecsPath := filepath.Join(tmpDir, "goecs")
if err := os.WriteFile(ecsPath, binary, 0755); err != nil {
return "", fmt.Errorf("写入二进制文件失败: %v", err)
}
return ecsPath, nil
}
func CleanupECSBinary(path string) {
if path != "" {
os.Remove(path)
}
}