trying to git gha workflow to work

This commit is contained in:
izzy2lost
2025-12-08 03:05:45 -05:00
parent 6dd5081b43
commit 853d1d467e
7 changed files with 151 additions and 25 deletions
+9 -7
View File
@@ -97,7 +97,8 @@ echo ========================================
echo Checking Java version...
echo ========================================
java -version 2>&1 | findstr /i "version" >nul
REM Basic presence check without piping (avoid cmd redirection quirks)
java -version >nul 2>nul
if errorlevel 1 (
echo ERROR: Java not found in PATH
echo The build requires Java 21 or higher.
@@ -105,12 +106,13 @@ if errorlevel 1 (
exit /b 1
)
REM Check if Java 21 or higher
for /f "tokens=3" %%v in ('java -version 2>&1 ^| findstr /i "version"') do (
set JAVA_VERSION=%%v
set JAVA_VERSION=!JAVA_VERSION:"=!
for /f "tokens=1 delims=." %%a in ("!JAVA_VERSION!") do set JAVA_MAJOR=%%a
REM Parse major version from `java -version` output
set "JAVA_VERSION="
for /f "tokens=3" %%v in ('java -version 2^>^&1 ^| findstr /i "version"') do (
set "JAVA_VERSION=%%v"
)
set "JAVA_VERSION=!JAVA_VERSION:"=!"
for /f "tokens=1 delims=." %%a in ("!JAVA_VERSION!") do set "JAVA_MAJOR=%%a"
if !JAVA_MAJOR! LSS 21 (
echo WARNING: Java !JAVA_MAJOR! detected. Java 21 or higher is recommended.
@@ -127,7 +129,7 @@ if !JAVA_MAJOR! LSS 21 (
REM Set environment variable to use pre-installed vcpkg dependencies
set "VCPKG_ROOT=%CD%\dependencies\vcpkg"
set "ANDROID_NDK_HOME=C:\Android\ndk\28.2.13676358"
set "ANDROID_NDK_HOME=C:\Android\ndk\29.0.14206865"
echo VCPKG_ROOT set to: %VCPKG_ROOT%
echo ANDROID_NDK_HOME set to: %ANDROID_NDK_HOME%
+60
View File
@@ -0,0 +1,60 @@
========================================
Wee U Android Build Script
========================================
========================================
Processing translation files...
========================================
Processing ca...
Created src\android\app\src\main\assets\translations\ca\cemu.po
Processing de...
Created src\android\app\src\main\assets\translations\de\cemu.po
Processing es...
Created src\android\app\src\main\assets\translations\es\cemu.po
Processing fr...
Created src\android\app\src\main\assets\translations\fr\cemu.po
Processing he...
Created src\android\app\src\main\assets\translations\he\cemu.po
Processing hu...
Created src\android\app\src\main\assets\translations\hu\cemu.po
Processing it...
Created src\android\app\src\main\assets\translations\it\cemu.po
Processing ja...
Created src\android\app\src\main\assets\translations\ja\cemu.po
Processing ko...
Created src\android\app\src\main\assets\translations\ko\cemu.po
Processing nb...
Created src\android\app\src\main\assets\translations\nb\cemu.po
Processing nl...
Created src\android\app\src\main\assets\translations\nl\cemu.po
Processing pl...
Created src\android\app\src\main\assets\translations\pl\cemu.po
Processing pt...
Created src\android\app\src\main\assets\translations\pt\cemu.po
Processing ru...
Created src\android\app\src\main\assets\translations\ru\cemu.po
Processing sv...
Created src\android\app\src\main\assets\translations\sv\cemu.po
Processing tr...
Created src\android\app\src\main\assets\translations\tr\cemu.po
Processing uk...
Created src\android\app\src\main\assets\translations\uk\cemu.po
Processing zh...
Created src\android\app\src\main\assets\translations\zh\cemu.po
Translation processing complete.
========================================
Checking Java version...
========================================
Java 21 detected.
VCPKG_ROOT set to: C:\WeeU\dependencies\vcpkg
ANDROID_NDK_HOME set to: C:\Android\ndk\29.0.14206865
========================================
Building Android APK...
========================================
Clean previous builds? (y/N):
Building Release APK...
^C
+75
View File
@@ -0,0 +1,75 @@
@echo off
setlocal enabledelayedexpansion
echo ========================================
echo Wee U Android Build Script (Debug Mode)
echo ========================================
echo.
REM Set environment variables
set "VCPKG_ROOT=%CD%\dependencies\vcpkg"
set "ANDROID_NDK_HOME=C:\Android\ndk\29.0.14206865"
echo VCPKG_ROOT: %VCPKG_ROOT%
echo ANDROID_NDK_HOME: %ANDROID_NDK_HOME%
echo.
REM Check prerequisites
if not exist "src\android" (
echo ERROR: src\android directory not found!
pause
exit /b 1
)
if not exist "%ANDROID_NDK_HOME%" (
echo ERROR: Android NDK not found at %ANDROID_NDK_HOME%
pause
exit /b 1
)
if not exist "%VCPKG_ROOT%\installed\arm64-android" (
echo ERROR: vcpkg arm64-android dependencies not found
pause
exit /b 1
)
echo All prerequisites found.
echo.
echo ========================================
echo Building Android APK (Debug)...
echo ========================================
echo.
cd src\android
REM Build debug APK with detailed output
call gradlew.bat assembleDebug --stacktrace --info
if errorlevel 1 (
echo.
echo ========================================
echo BUILD FAILED!
echo ========================================
echo.
echo Check the output above for error details.
cd ..\..
pause
exit /b 1
)
cd ..\..
echo.
echo ========================================
echo BUILD SUCCESSFUL!
echo ========================================
echo.
echo Debug APK location:
echo src\android\app\build\outputs\apk\debug\app-debug.apk
echo.
if exist "src\android\app\build\outputs\apk\debug\*.apk" (
dir /b "src\android\app\build\outputs\apk\debug\*.apk"
)
pause
+2 -2
View File
@@ -468,6 +468,8 @@ add_library(CemuCafe
OS/libs/nsyshid/Whitelist.h
OS/libs/nsyshid/BackendEmulated.cpp
OS/libs/nsyshid/BackendEmulated.h
OS/libs/nsyshid/BackendLibusb.cpp
OS/libs/nsyshid/BackendLibusb.h
OS/libs/nsyshid/Dimensions.cpp
OS/libs/nsyshid/Dimensions.h
OS/libs/nsyshid/Infinity.cpp
@@ -592,8 +594,6 @@ if (ENABLE_WAYLAND)
# PUBLIC because wayland-client.h is included in VulkanAPI.h
target_link_libraries(CemuCafe PUBLIC Wayland::Client)
endif()
if (NOT ANDROID)
if (ENABLE_VCPKG)
if(WIN32)
set(PKG_CONFIG_EXECUTABLE "${VCPKG_INSTALLED_DIR}/x64-windows/tools/pkgconf/pkgconf.exe")
@@ -1,15 +1,12 @@
#include "nsyshid.h"
#include "Backend.h"
#include "BackendEmulated.h"
#ifndef __ANDROID__
#include "BackendLibusb.h"
#endif
namespace nsyshid::backend
{
void AttachDefaultBackends()
{
#ifndef __ANDROID__
// add libusb backend
{
auto backendLibusb = std::make_shared<backend::libusb::BackendLibusb>();
@@ -18,7 +15,6 @@ namespace nsyshid::backend
AttachBackend(backendLibusb);
}
}
#endif
// add emulated backend
{
auto backendEmulated = std::make_shared<backend::emulated::BackendEmulated>();
+3 -12
View File
@@ -2,7 +2,7 @@ import com.android.build.gradle.internal.tasks.factory.dependsOn
import java.io.IOException
import java.security.MessageDigest
import java.util.regex.Pattern
import java.util.HexFormat
import javax.xml.bind.DatatypeConverter
plugins {
alias(libs.plugins.android.application)
@@ -46,7 +46,7 @@ val cemuDataFilesFolder = "../../../bin"
android {
namespace = "com.izzy2lost.weeu"
compileSdk = 36
ndkVersion = "28.2.13676358"
ndkVersion = "29.0.14206865"
defaultConfig {
applicationId = "com.izzy2lost.weeu"
minSdk = 31
@@ -116,19 +116,10 @@ android {
defaultConfig {
externalNativeBuild {
cmake {
// project.rootDir is src/android, so go up 2 levels to get to WeeU root
val weeURoot = project.rootDir.parentFile.parentFile
val vcpkgInstalledDir = File(weeURoot, "dependencies/vcpkg/installed").absolutePath
arguments(
"-DANDROID_STL=c++_shared",
"-DENABLE_VCPKG=ON",
"-DVCPKG_TARGET_ANDROID=ON",
"-DVCPKG_INSTALLED_DIR=$vcpkgInstalledDir",
"-DVCPKG_MANIFEST_MODE=OFF",
"-DVCPKG_MANIFEST_INSTALL=OFF",
"-DX_VCPKG_APPLOCAL_DEPS_INSTALL=OFF",
"-DPKG_CONFIG_EXECUTABLE=",
"-DENABLE_SDL=OFF",
"-DENABLE_WXWIDGETS=OFF",
"-DENABLE_OPENGL=OFF",
@@ -207,7 +198,7 @@ abstract class ComputeCemuDataFilesHashTask : DefaultTask() {
md.reset()
fileHashes.forEach { md.update(it) }
hashFile.writeText(HexFormat.of().formatHex(md.digest()).uppercase())
hashFile.writeText(DatatypeConverter.printHexBinary(md.digest()))
}
}
+2
View File
@@ -0,0 +1,2 @@
'build_android.bat' is not recognized as an internal or external command,
operable program or batch file.