mirror of
https://gitlab.com/vyla-entertainment/go.git
synced 2026-11-14 15:37:23 -05:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f7a969698 | ||
|
|
fd738eeba5 | ||
|
|
a28239cf60 | ||
|
|
966115c456 | ||
| 2c0cc5c933 | |||
| 0e385aae9e | |||
|
cd18f09142
|
BIN
assets/logos/white_logo.png
Normal file
BIN
assets/logos/white_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vyla-go",
|
"name": "vyla-go",
|
||||||
"version": "1.0.7",
|
"version": "1.0.10",
|
||||||
"description": "Vyla Go Mobile Launcher",
|
"description": "Vyla Go Mobile Launcher",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
"@tauri-apps/plugin-opener": "^2.0.0",
|
"@tauri-apps/plugin-opener": "^2.0.0",
|
||||||
"@tauri-apps/plugin-process": "^2.0.0",
|
"@tauri-apps/plugin-process": "^2.0.0",
|
||||||
"@tauri-apps/plugin-shell": "^2.0.0",
|
"@tauri-apps/plugin-shell": "^2.0.0",
|
||||||
"@vyla-entertainment/sdk": "^1.11.0",
|
"@vyla-entertainment/sdk": "^1.18.0",
|
||||||
"adm-zip": "^0.6.0",
|
"adm-zip": "^0.6.0",
|
||||||
"express": "^4.19.2"
|
"express": "^4.19.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -13,6 +13,14 @@ val tauriProperties = Properties().apply {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configurations.all {
|
||||||
|
resolutionStrategy {
|
||||||
|
force("com.fasterxml.jackson.core:jackson-databind:2.13.5")
|
||||||
|
force("com.fasterxml.jackson.core:jackson-core:2.13.5")
|
||||||
|
force("com.fasterxml.jackson.core:jackson-annotations:2.13.5")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdk = 36
|
compileSdk = 36
|
||||||
namespace = "com.vyla.go"
|
namespace = "com.vyla.go"
|
||||||
@@ -23,6 +31,9 @@ android {
|
|||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
|
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
|
||||||
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
|
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
|
||||||
|
ndk {
|
||||||
|
abiFilters.addAll(listOf("arm64-v8a", "armeabi-v7a", "x86_64"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
create("release") {
|
create("release") {
|
||||||
@@ -59,6 +70,11 @@ android {
|
|||||||
useLegacyPackaging = true
|
useLegacyPackaging = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
isCoreLibraryDesugaringEnabled = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rust {
|
rust {
|
||||||
@@ -74,6 +90,7 @@ dependencies {
|
|||||||
testImplementation("junit:junit:4.13.2")
|
testImplementation("junit:junit:4.13.2")
|
||||||
androidTestImplementation("androidx.test.ext:junit:1.1.4")
|
androidTestImplementation("androidx.test.ext:junit:1.1.4")
|
||||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
|
||||||
|
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
|
||||||
}
|
}
|
||||||
|
|
||||||
apply(from = "tauri.build.gradle.kts")
|
apply(from = "tauri.build.gradle.kts")
|
||||||
@@ -2,15 +2,19 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
|
||||||
|
<uses-feature android:name="android.software.leanback" android:required="false" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
|
android:banner="@drawable/tv_banner"
|
||||||
android:usesCleartextTraffic="true"
|
android:usesCleartextTraffic="true"
|
||||||
android:networkSecurityConfig="@xml/network_security_config"
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
android:largeHeap="true"
|
android:largeHeap="true"
|
||||||
android:extractNativeLibs="true"
|
android:extractNativeLibs="true"
|
||||||
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.vyla_go">
|
android:theme="@style/Theme.vyla_go">
|
||||||
<activity
|
<activity
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
|
||||||
@@ -22,6 +26,10 @@
|
|||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
||||||
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
</application>
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
BIN
src-tauri/gen/android/app/src/main/res/drawable/tv_banner.png
Normal file
BIN
src-tauri/gen/android/app/src/main/res/drawable/tv_banner.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
2875
src-tauri/gen/schemas/desktop-schema.json
Normal file
2875
src-tauri/gen/schemas/desktop-schema.json
Normal file
File diff suppressed because it is too large
Load Diff
2875
src-tauri/gen/schemas/windows-schema.json
Normal file
2875
src-tauri/gen/schemas/windows-schema.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -25,6 +25,113 @@ const RUNTIME_INTERCEPT_SCRIPT: &str = r#"
|
|||||||
})();
|
})();
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
|
const NODE_PRELOAD_SCRIPT: &str = r#"
|
||||||
|
const Module = require('module');
|
||||||
|
const origLoad = Module._load;
|
||||||
|
|
||||||
|
const stub = new Proxy(function () {}, {
|
||||||
|
get: (t, k) => (typeof k === 'symbol' || k === 'then' ? undefined : stub),
|
||||||
|
apply: () => stub,
|
||||||
|
construct: () => stub,
|
||||||
|
});
|
||||||
|
|
||||||
|
function buildTlsShim() {
|
||||||
|
class Session {
|
||||||
|
constructor(opts) {
|
||||||
|
this.opts = opts || {};
|
||||||
|
this.headers = this.opts.headers || {};
|
||||||
|
}
|
||||||
|
async request(method, url, options) {
|
||||||
|
options = options || {};
|
||||||
|
const headers = Object.assign({}, this.headers, options.headers || {});
|
||||||
|
const init = {
|
||||||
|
method,
|
||||||
|
headers,
|
||||||
|
redirect: options.followRedirects === false ? 'manual' : 'follow',
|
||||||
|
};
|
||||||
|
let body = options.body !== undefined ? options.body : options.data;
|
||||||
|
if (options.json !== undefined) {
|
||||||
|
body = JSON.stringify(options.json);
|
||||||
|
if (!headers['content-type'] && !headers['Content-Type']) {
|
||||||
|
headers['content-type'] = 'application/json';
|
||||||
|
}
|
||||||
|
} else if (body !== undefined && body !== null && typeof body === 'object' && !Buffer.isBuffer(body) && !(body instanceof URLSearchParams)) {
|
||||||
|
body = new URLSearchParams(body).toString();
|
||||||
|
if (!headers['content-type'] && !headers['Content-Type']) {
|
||||||
|
headers['content-type'] = 'application/x-www-form-urlencoded';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (body !== undefined && body !== null && method !== 'GET' && method !== 'HEAD') {
|
||||||
|
init.body = body;
|
||||||
|
}
|
||||||
|
let ms = Number(options.timeout || this.opts.timeout || 30000);
|
||||||
|
if (ms < 1000) ms = ms * 1000;
|
||||||
|
init.signal = AbortSignal.timeout(ms);
|
||||||
|
const res = await fetch(url, init);
|
||||||
|
const text = await res.text();
|
||||||
|
const outHeaders = {};
|
||||||
|
res.headers.forEach((v, k) => { outHeaders[k] = v; });
|
||||||
|
return {
|
||||||
|
id: String(Date.now()),
|
||||||
|
status: res.status,
|
||||||
|
ok: res.ok,
|
||||||
|
success: res.ok,
|
||||||
|
url: res.url,
|
||||||
|
target: res.url,
|
||||||
|
headers: outHeaders,
|
||||||
|
cookies: {},
|
||||||
|
body: text,
|
||||||
|
text: async () => text,
|
||||||
|
json: async () => JSON.parse(text),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
get(url, o) { return this.request('GET', url, o); }
|
||||||
|
post(url, o) { return this.request('POST', url, o); }
|
||||||
|
put(url, o) { return this.request('PUT', url, o); }
|
||||||
|
patch(url, o) { return this.request('PATCH', url, o); }
|
||||||
|
delete(url, o) { return this.request('DELETE', url, o); }
|
||||||
|
head(url, o) { return this.request('HEAD', url, o); }
|
||||||
|
options(url, o) { return this.request('OPTIONS', url, o); }
|
||||||
|
async close() {}
|
||||||
|
async free() {}
|
||||||
|
}
|
||||||
|
const ClientIdentifier = new Proxy({}, { get: (t, k) => (typeof k === 'symbol' ? undefined : String(k)) });
|
||||||
|
const mod = {
|
||||||
|
Session,
|
||||||
|
ClientIdentifier,
|
||||||
|
initTLS: async () => {},
|
||||||
|
destroyTLS: async () => {},
|
||||||
|
};
|
||||||
|
mod.default = mod;
|
||||||
|
return mod;
|
||||||
|
}
|
||||||
|
|
||||||
|
let tlsShim = null;
|
||||||
|
|
||||||
|
Module._load = function (request) {
|
||||||
|
if (request === 'node-tls-client') {
|
||||||
|
if (!tlsShim) {
|
||||||
|
tlsShim = buildTlsShim();
|
||||||
|
console.error('node-tls-client replaced with fetch shim');
|
||||||
|
}
|
||||||
|
return tlsShim;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return origLoad.apply(this, arguments);
|
||||||
|
} catch (e) {
|
||||||
|
const msg = String(e && e.message);
|
||||||
|
if (/koffi/i.test(request) || /koffi/i.test(msg)) {
|
||||||
|
console.error('stubbed native module: ' + request + ' (' + msg + ')');
|
||||||
|
return stub;
|
||||||
|
}
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
process.on('uncaughtException', (e) => console.error('uncaughtException', e && e.stack || e));
|
||||||
|
process.on('unhandledRejection', (e) => console.error('unhandledRejection', e && e.stack || e));
|
||||||
|
"#;
|
||||||
|
|
||||||
fn android_log(msg: &str) {
|
fn android_log(msg: &str) {
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
{
|
{
|
||||||
@@ -135,6 +242,13 @@ fn spawn_service_manager(base_dir: &std::path::Path) {
|
|||||||
.map(|d| d.to_string_lossy().to_string())
|
.map(|d| d.to_string_lossy().to_string())
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
|
let tmp_dir = base_dir.join("tmp");
|
||||||
|
let _ = std::fs::create_dir_all(&tmp_dir);
|
||||||
|
std::env::set_var("HOME", base_dir.to_string_lossy().to_string());
|
||||||
|
std::env::set_var("TMPDIR", tmp_dir.to_string_lossy().to_string());
|
||||||
|
let preload_path = base_dir.join("preload.js");
|
||||||
|
let _ = std::fs::write(&preload_path, NODE_PRELOAD_SCRIPT);
|
||||||
|
let preload_str = preload_path.to_string_lossy().to_string();
|
||||||
std::env::set_var("PORT", "3000");
|
std::env::set_var("PORT", "3000");
|
||||||
std::env::set_var("NODE_ENV", "production");
|
std::env::set_var("NODE_ENV", "production");
|
||||||
std::env::set_var("TMDB_API_KEY", "3f6703f3e2a0b2b40fe4fbb3e1546244");
|
std::env::set_var("TMDB_API_KEY", "3f6703f3e2a0b2b40fe4fbb3e1546244");
|
||||||
@@ -150,26 +264,33 @@ fn spawn_service_manager(base_dir: &std::path::Path) {
|
|||||||
let server_js = server_script.to_string_lossy().to_string();
|
let server_js = server_script.to_string_lossy().to_string();
|
||||||
let player_dir_str = player_dir.to_string_lossy().to_string();
|
let player_dir_str = player_dir.to_string_lossy().to_string();
|
||||||
|
|
||||||
std::thread::spawn(move || {
|
let _ = std::thread::Builder::new().stack_size(16 * 1024 * 1024).spawn(move || {
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
{
|
{
|
||||||
let _ = std::env::set_current_dir(&player_dir_str);
|
let _ = std::env::set_current_dir(&player_dir_str);
|
||||||
|
|
||||||
let arg0 = std::ffi::CString::new("node").unwrap();
|
let parts: [&str; 4] = ["node", "--require", preload_str.as_str(), server_js.as_str()];
|
||||||
let arg1 = std::ffi::CString::new(server_js.as_str()).unwrap();
|
let mut buf: Vec<u8> = Vec::new();
|
||||||
|
let mut offsets: Vec<usize> = Vec::new();
|
||||||
|
for p in parts.iter() {
|
||||||
|
offsets.push(buf.len());
|
||||||
|
buf.extend_from_slice(p.as_bytes());
|
||||||
|
buf.push(0);
|
||||||
|
}
|
||||||
|
buf.shrink_to_fit();
|
||||||
|
|
||||||
let mut argv: Vec<*mut std::os::raw::c_char> = vec![
|
let base = buf.as_mut_ptr() as *mut std::os::raw::c_char;
|
||||||
arg0.as_ptr() as *mut _,
|
let mut argv: Vec<*mut std::os::raw::c_char> = offsets
|
||||||
arg1.as_ptr() as *mut _,
|
.iter()
|
||||||
std::ptr::null_mut(),
|
.map(|o| unsafe { base.add(*o) })
|
||||||
];
|
.collect();
|
||||||
|
argv.push(std::ptr::null_mut());
|
||||||
|
|
||||||
|
std::mem::forget(buf);
|
||||||
|
|
||||||
android_log("calling node::Start via FFI");
|
android_log("calling node::Start via FFI");
|
||||||
let ret = unsafe { node_ffi::_ZN4node5StartEiPPc(2, argv.as_mut_ptr()) };
|
let ret = unsafe { node_ffi::_ZN4node5StartEiPPc(4, argv.as_mut_ptr()) };
|
||||||
android_log(&format!("node::Start returned: {}", ret));
|
android_log(&format!("node::Start returned: {}", ret));
|
||||||
|
|
||||||
drop(arg0);
|
|
||||||
drop(arg1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(target_os = "android"))]
|
#[cfg(not(target_os = "android"))]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "Vyla Go",
|
"productName": "Vyla Go",
|
||||||
"version": "1.0.7",
|
"version": "1.0.10",
|
||||||
"identifier": "com.vyla.go",
|
"identifier": "com.vyla.go",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "",
|
"beforeDevCommand": "",
|
||||||
|
|||||||
@@ -122,7 +122,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="center-brand">
|
<div class="center-brand">
|
||||||
<img src="https://gitlab.com/vyla-entertainment/home-frontend/-/raw/main/assets/images/logo.png" alt="Logo" />
|
<img src="https://gitlab.com/vyla-entertainment/go/-/raw/main/assets/logos/white_logo.png" alt="Logo" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bottom-dock">
|
<div class="bottom-dock">
|
||||||
|
|||||||
Reference in New Issue
Block a user