mirror of
https://gitlab.com/vyla-entertainment/go.git
synced 2026-11-14 07:27:23 -05:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a0de7b4bca | |||
| 119b0ad28f | |||
| 6d38d9c335 |
@@ -1,3 +1,6 @@
|
||||
|
||||
## Development & Build
|
||||
|
||||
Install dependencies:
|
||||
```bash
|
||||
npm install
|
||||
@@ -13,11 +16,18 @@ Compile and assemble the release APK:
|
||||
npm run build:apk
|
||||
```
|
||||
|
||||
Release to GitLab:
|
||||
```bash
|
||||
## Release
|
||||
|
||||
Set credentials once per session, then run release:
|
||||
```powershell
|
||||
$env:ANDROID_HOME = "$env:LOCALAPPDATA\Android\Sdk"
|
||||
$env:NDK_HOME = "$env:LOCALAPPDATA\Android\Sdk\ndk\29.0.13846066"
|
||||
$env:GITLAB_TOKEN = "your-token-here"
|
||||
npm run release
|
||||
```
|
||||
|
||||
This builds the payload, compiles the APK for arm64 and x86_64, commits and tags the version, uploads all artifacts, and creates the GitLab release automatically.
|
||||
|
||||
## Logs
|
||||
|
||||
Stream live device logs:
|
||||
@@ -35,7 +45,7 @@ Dump logs to file:
|
||||
& "$env:LOCALAPPDATA\Android\Sdk\platform-tools\adb.exe" logcat -d -s VylaGo > vyla-go.log
|
||||
```
|
||||
|
||||
Show all crash/fatal logs:
|
||||
Show all crash and fatal logs:
|
||||
```powershell
|
||||
& "$env:LOCALAPPDATA\Android\Sdk\platform-tools\adb.exe" logcat -d | Select-String "VylaGo|AndroidRuntime|FATAL"
|
||||
```
|
||||
|
||||
20
README.md
20
README.md
@@ -3,31 +3,17 @@
|
||||
Vyla Go is the native Android mobile launcher for the Vyla media ecosystem.
|
||||
|
||||
## Features
|
||||
|
||||
- **Native Android APK Architecture**: Built on Tauri v2 with native hardware acceleration.
|
||||
- **Automated Resource Management**: Downloads, unpacks, and updates core services directly from official releases.
|
||||
- **Hardware Shader Interface**: Real-time WebGL shader lighting and glassmorphism elements.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Node.js 20+
|
||||
- Rust & Cargo
|
||||
- Android Studio with Android SDK & NDK 29+
|
||||
- Toolchain targets:
|
||||
```bash
|
||||
rustup target add aarch64-linux-android
|
||||
```
|
||||
|
||||
## Development & Build
|
||||
Install dependencies:
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
Compile and assemble the release APK:
|
||||
```bash
|
||||
npm run build:apk
|
||||
```
|
||||
|
||||
Release packages to GitLab:
|
||||
```bash
|
||||
npm run release
|
||||
rustup target add aarch64-linux-android x86_64-linux-android
|
||||
```
|
||||
1
frontend
Submodule
1
frontend
Submodule
Submodule frontend added at e23979cbe0
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vyla-go",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"description": "Vyla Go Mobile Launcher",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
||||
15
release.js
15
release.js
@@ -137,11 +137,22 @@ async function main() {
|
||||
const version = `v${rawVersion}`;
|
||||
console.log(`Releasing ${version}...`);
|
||||
|
||||
const androidHome = process.env.ANDROID_HOME || `${process.env.LOCALAPPDATA}\\Android\\Sdk`;
|
||||
const ndkHome = process.env.NDK_HOME || `${androidHome}\\ndk\\29.0.13846066`;
|
||||
|
||||
const buildEnv = {
|
||||
...process.env,
|
||||
ANDROID_HOME: androidHome,
|
||||
NDK_HOME: ndkHome,
|
||||
GITLAB_TOKEN: TOKEN,
|
||||
VYLA_GITLAB_TOKEN: TOKEN,
|
||||
};
|
||||
|
||||
console.log('Building payload...');
|
||||
execSync('npm run build:payload', { stdio: 'inherit' });
|
||||
execSync('npm run build:payload', { stdio: 'inherit', env: buildEnv });
|
||||
|
||||
console.log('Building APK...');
|
||||
execSync('npm run build:apk', { stdio: 'inherit' });
|
||||
execSync('npm run build:apk', { stdio: 'inherit', env: buildEnv });
|
||||
|
||||
const apkSearchDirs = [
|
||||
path.join(__dirname, 'src-tauri', 'gen', 'android', 'app', 'build', 'outputs', 'apk', 'universal', 'release'),
|
||||
|
||||
@@ -1,9 +1,36 @@
|
||||
package com.vyla.go
|
||||
|
||||
import android.graphics.Bitmap
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.webkit.WebChromeClient
|
||||
import android.webkit.WebView
|
||||
|
||||
class MainActivity : TauriActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
val root = findViewById<ViewGroup>(android.R.id.content)
|
||||
root.viewTreeObserver.addOnGlobalLayoutListener {
|
||||
findAndHookWebView(root)
|
||||
}
|
||||
}
|
||||
|
||||
private fun findAndHookWebView(view: View) {
|
||||
if (view is WebView) {
|
||||
view.webChromeClient = object : WebChromeClient() {
|
||||
override fun getDefaultVideoPoster(): Bitmap {
|
||||
return Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if (view is ViewGroup) {
|
||||
for (i in 0 until view.childCount) {
|
||||
findAndHookWebView(view.getChildAt(i))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -323,6 +323,45 @@ async fn download_and_extract_payload(app: tauri::AppHandle, window: WebviewWind
|
||||
Ok(base_dir)
|
||||
}
|
||||
|
||||
const ANDROID_VIDEO_FIX_SCRIPT: &str = r#"
|
||||
(function() {
|
||||
function suppressNativeOverlay() {
|
||||
const styleId = '__vyla_native_video_fix';
|
||||
if (!document.getElementById(styleId)) {
|
||||
const s = document.createElement('style');
|
||||
s.id = styleId;
|
||||
s.textContent = `
|
||||
video::-webkit-media-controls,
|
||||
video::-webkit-media-controls-enclosure,
|
||||
video::-webkit-media-controls-panel,
|
||||
video::-webkit-media-controls-overlay-play-button,
|
||||
video::-webkit-media-controls-start-playback-button {
|
||||
display: none !important;
|
||||
-webkit-appearance: none !important;
|
||||
opacity: 0 !important;
|
||||
pointer-events: none !important;
|
||||
}
|
||||
`;
|
||||
(document.head || document.documentElement).appendChild(s);
|
||||
}
|
||||
|
||||
document.querySelectorAll('video').forEach(v => {
|
||||
v.setAttribute('playsinline', '');
|
||||
v.setAttribute('webkit-playsinline', '');
|
||||
v.removeAttribute('poster');
|
||||
});
|
||||
}
|
||||
|
||||
suppressNativeOverlay();
|
||||
new MutationObserver(suppressNativeOverlay).observe(document.documentElement, {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
attributes: true,
|
||||
attributeFilter: ['poster']
|
||||
});
|
||||
})();
|
||||
"#;
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
@@ -389,6 +428,10 @@ pub fn run() {
|
||||
.setup(|app| {
|
||||
let handle = app.handle().clone();
|
||||
|
||||
if let Some(window) = handle.get_webview_window("main") {
|
||||
let _ = window.eval(ANDROID_VIDEO_FIX_SCRIPT);
|
||||
}
|
||||
|
||||
tauri::async_runtime::spawn(async move {
|
||||
std::thread::sleep(std::time::Duration::from_millis(400));
|
||||
|
||||
@@ -398,7 +441,10 @@ pub fn run() {
|
||||
match download_and_extract_payload(handle.clone(), window.clone()).await {
|
||||
Ok(_) => {
|
||||
std::thread::sleep(std::time::Duration::from_millis(400));
|
||||
let _ = window.eval("window.location.replace('http://vyla.localhost/frontend/index.html');");
|
||||
let _ = window.eval(&format!(
|
||||
"{}; window.location.replace('http://vyla.localhost/frontend/index.html');",
|
||||
ANDROID_VIDEO_FIX_SCRIPT
|
||||
));
|
||||
}
|
||||
Err(err) => {
|
||||
update_ui(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "Vyla Go",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"identifier": "com.vyla.go",
|
||||
"build": {
|
||||
"beforeDevCommand": "",
|
||||
|
||||
Reference in New Issue
Block a user