mirror of
https://github.com/oneclickvirt/ecs.git
synced 2025-12-24 12:37:53 +08:00
fix:使用排除类型tag
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -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 构建成功"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build android && amd64
|
||||
//go:build !windows && !darwin && !linux && amd64
|
||||
|
||||
package embedding
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build android && arm
|
||||
//go:build !windows && !darwin && !linux && arm
|
||||
|
||||
package embedding
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build android && arm64
|
||||
//go:build !windows && !darwin && !linux && arm64
|
||||
|
||||
package embedding
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user