Skip to content

Commit 4736911

Browse files
ComputerEliteComputerElite
authored andcommitted
Fix modding of backups, fix qavs inject script to display stuff again
1 parent 171f6f0 commit 4736911

7 files changed

Lines changed: 11 additions & 22 deletions

File tree

QuestAppVersionSwitcher/Assets/html/qavs_inject.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@
6666
var errors = operations.filter(x => x.type == QAVSError);
6767

6868
var html = `
69-
${downloadingMods.length > 0 ? `<b>${downloadingMods.length}</b> mod(s) downloading<br>` : ``}
70-
${queuedMods.length > 0 ? `<b>${queuedMods.length}</b> mod(s) queued for install<br>` : ``}
71-
${installingMods.length > 0 ? `<b>${installingMods.length}</b> mod(s) installing<br>` : ``}
72-
${downloadingDependencies.length > 0 ? `<b>${downloadingDependencies.length}</b> dependencies downloading<br>` : ``}
73-
${errors.length > 0 ? `<div style="color: #EE0000;"><b>${errors.length}</b> error(s), more info in <a href="http://127.0.0.1:${qavsPort}?tab=mods">installed mods tab</a></div><br>` : ``}
69+
${downloadingMods.length > 0 ? `${downloadingMods.length} mod(s) downloading\n` : ``}
70+
${queuedMods.length > 0 ? `${queuedMods.length} mod(s) queued for install\n` : ``}
71+
${installingMods.length > 0 ? `${installingMods.length} mod(s) installing\n` : ``}
72+
${downloadingDependencies.length > 0 ? `${downloadingDependencies.length} dependencies downloading\n` : ``}
73+
${errors.length > 0 ? `${errors.length}</b> error(s), more info in <a href="http://127.0.0.1:${qavsPort}?tab=mods">installed mods tab</a>` : ``}
7474
`;
7575
if(html.trim()) {
7676
QAVSsomethingWasRunning = true
@@ -110,7 +110,7 @@
110110
}
111111

112112
// Modify sign in options on auth.meta.com
113-
if(location.host.contains("auth.meta.com")) {
113+
if(location.host.includes("auth.meta.com")) {
114114
console.log("auth.meta.com")
115115
if(location.href.startsWith("https://auth.meta.com/register/facebook/")) {
116116
// Registering with facebook shouldn't be happening on headset

QuestAppVersionSwitcher/Assets/html/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ function UpdatePatchingStatus() {
303303
return;
304304
}
305305
patchStatus.innerHTML = `Loading<br><br>${squareLoader}`
306-
var backupExtra = "?package=" + config.currentApp + "&backupName=" + backupToPatch
306+
var backupExtra = "?package=" + config.currentApp + "&backup=" + backupToPatch
307307
fetch("/api/patching/getmodstatus" + (backupToPatch ? backupExtra : "")).then(res => {
308308
res.json().then(res => {
309309
UpdateVersion(res.version)

QuestAppVersionSwitcher/FolderPermission.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ public static void Copy(string from, string to)
7979
}
8080
try
8181
{
82-
Logger.Log("Copying " + from + " to " + to);
8382
Stream file = GetOutputStream(to);
8483

8584
if (file.CanWrite)
@@ -101,7 +100,6 @@ public static void Copy(DocumentFile source, string to)
101100
{
102101
try
103102
{
104-
Logger.Log("Copying " + source.Name + " to " + to);
105103
Stream file = System.IO.File.OpenWrite(to);
106104

107105
if (file.CanWrite)
@@ -123,7 +121,6 @@ public static void Copy(string source, DocumentFile to)
123121
{
124122
try
125123
{
126-
Logger.Log("Copying " + source + " to " + to);
127124
Stream file = AndroidCore.context.ContentResolver.OpenOutputStream(to.Uri);
128125

129126
if (file.CanWrite)
@@ -273,36 +270,29 @@ public static void DirectoryCopy(string sourceDirName, string destDirName)
273270

274271
public static void InternalDirectoryCopy(string source, DocumentFile destDir)
275272
{
276-
Logger.Log("Starting directory copy: string, DocumentFile");
277273
if (destDir == null) return;
278-
Logger.Log(source + " -> " + destDir.Uri);
279274

280275
// Delete all files and directories in destination directory
281276
foreach (DocumentFile f in destDir.ListFiles())
282277
{
283278
f.Delete();
284279
}
285280

286-
Logger.Log("Cleared dest");
287281

288282
DirectoryInfo dir = new DirectoryInfo(source);
289-
Logger.Log("Got dir info");
290283

291284
// Get the files in the directory and copy them to the new location.
292285
foreach (FileInfo file in dir.GetFiles())
293286
{
294287
try
295288
{
296-
Logger.Log("Copying " + file.Name);
297289
Copy(file.FullName, destDir.CreateFile("application/octet-stream", file.Name));
298290
}
299291
catch (Exception e) { Logger.Log("Error copying " + file.Name + ": " + e.ToString(), LoggingType.Error); }
300292
}
301293

302-
Logger.Log("Copied all files");
303294
foreach (DirectoryInfo subdir in dir.GetDirectories())
304295
{
305-
Logger.Log("Continuing with subdir " + subdir.Name);
306296
InternalDirectoryCopy(subdir.FullName, destDir.CreateDirectory(subdir.Name));
307297
}
308298
}

QuestAppVersionSwitcher/OculusGraphQLApiLib/Folders/OculusFolder.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ public static string GetManifestPath(string oculusFolder, string canonicalName)
1919
{
2020
return oculusFolder + Path.DirectorySeparatorChar + "Manifests" + Path.DirectorySeparatorChar + canonicalName + ".json";
2121
}
22-
2322
}
2423
}

QuestAppVersionSwitcher/PatchingManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ public static PatchingStatus GetPatchingStatus(string app = null)
291291
public static PatchingStatus GetPatchingStatusOfBackup(string package, string backupName)
292292
{
293293
string backupDir = CoreService.coreVars.QAVSBackupDir + package + "/" + backupName + "/";
294-
ZipArchive apk = ZipFile.OpenRead(AndroidService.FindAPKLocation(backupDir + "app.apk"));
294+
ZipArchive apk = ZipFile.OpenRead(backupDir + "app.apk");
295295
PatchingStatus s = GetPatchingStatus(apk);
296296
apk.Dispose();
297297
return s;

QuestAppVersionSwitcher/Properties/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.13.20" package="com.ComputerElite.questappversionswitcher" android:installLocation="preferExternal" android:versionCode="109">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.13.30" package="com.ComputerElite.questappversionswitcher" android:installLocation="preferExternal" android:versionCode="110">
33
<uses-sdk android:minSdkVersion="28" android:targetSdkVersion="32" />
44
<uses-permission android:name="oculus.permission.handtracking" />
55
<uses-permission android:name="com.oculus.permission.HAND_TRACKING" />

QuestAppVersionSwitcher/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@
2222
// Minor Version
2323
// Build Number
2424
// Revision
25-
[assembly: AssemblyVersion("1.13.29.0")]
26-
[assembly: AssemblyFileVersion("1.13.20.0")]
25+
[assembly: AssemblyVersion("1.13.30.0")]
26+
[assembly: AssemblyFileVersion("1.13.30.0")]

0 commit comments

Comments
 (0)