Compare commits
9 Commits
master-old
...
beta/RSL-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dbaeea4e8b | ||
|
|
b120d18014 | ||
|
|
85804ee69c | ||
|
|
5dc8c947c9 | ||
|
|
413113e732 | ||
|
|
26f7044053 | ||
|
|
5a7c4971df | ||
|
|
a397a1a985 | ||
|
|
44e8bdef7b |
2
ADB.cs
2
ADB.cs
@@ -11,7 +11,7 @@ namespace AndroidSideloader
|
||||
{
|
||||
private static readonly SettingsManager settings = SettingsManager.Instance;
|
||||
private static readonly Process adb = new Process();
|
||||
public static string adbFolderPath = Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools");
|
||||
public static string adbFolderPath = Path.Combine(Environment.CurrentDirectory, "platform-tools");
|
||||
public static string adbFilePath = Path.Combine(adbFolderPath, "adb.exe");
|
||||
public static string DeviceID = "";
|
||||
public static string package = "";
|
||||
|
||||
@@ -15,12 +15,20 @@ namespace AndroidSideloader
|
||||
{
|
||||
InitializeComponent();
|
||||
Donors.initDonorGames();
|
||||
List<ListViewItem> DGameList = new List<ListViewItem>();
|
||||
|
||||
var seen = new HashSet<string>();
|
||||
var DGameList = new List<ListViewItem>();
|
||||
|
||||
foreach (string[] release in Donors.donorGames)
|
||||
{
|
||||
ListViewItem DGame = new ListViewItem(release);
|
||||
DGameList.Add(DGame);
|
||||
if (release.Length == 0) continue;
|
||||
string key = release[0];
|
||||
if (seen.Add(key))
|
||||
{
|
||||
DGameList.Add(new ListViewItem(release));
|
||||
}
|
||||
}
|
||||
|
||||
ListViewItem[] arr = DGameList.ToArray();
|
||||
DonorsListView.BeginUpdate();
|
||||
DonorsListView.Items.Clear();
|
||||
|
||||
60
MainForm.Designer.cs
generated
60
MainForm.Designer.cs
generated
@@ -105,6 +105,7 @@ namespace AndroidSideloader
|
||||
this.speedLabel_Tooltip = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.etaLabel_Tooltip = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.progressDLbtnContainer = new System.Windows.Forms.Panel();
|
||||
this.downloadInstallGameButton = new AndroidSideloader.RoundButton();
|
||||
this.diskLabel = new System.Windows.Forms.Label();
|
||||
this.bottomContainer = new System.Windows.Forms.Panel();
|
||||
this.deviceDrop = new System.Windows.Forms.Button();
|
||||
@@ -129,7 +130,6 @@ namespace AndroidSideloader
|
||||
this.favoriteSwitcher = new AndroidSideloader.RoundButton();
|
||||
this.adbCmd_btnSend = new AndroidSideloader.RoundButton();
|
||||
this.adbCmd_btnToggleUpdates = new AndroidSideloader.RoundButton();
|
||||
this.downloadInstallGameButton = new AndroidSideloader.RoundButton();
|
||||
this.MountButton = new AndroidSideloader.RoundButton();
|
||||
this.btnNoDevice = new AndroidSideloader.RoundButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gamesPictureBox)).BeginInit();
|
||||
@@ -361,7 +361,7 @@ namespace AndroidSideloader
|
||||
this.searchTextBox.Location = new System.Drawing.Point(224, 70);
|
||||
this.searchTextBox.MinimumSize = new System.Drawing.Size(231, 26);
|
||||
this.searchTextBox.Name = "searchTextBox";
|
||||
this.searchTextBox.Size = new System.Drawing.Size(933, 26);
|
||||
this.searchTextBox.Size = new System.Drawing.Size(933, 24);
|
||||
this.searchTextBox.TabIndex = 5;
|
||||
this.searchTextBox.Text = "Search";
|
||||
this.searchTextBox.Click += new System.EventHandler(this.searchTextBox_Click);
|
||||
@@ -990,6 +990,34 @@ namespace AndroidSideloader
|
||||
this.progressDLbtnContainer.Size = new System.Drawing.Size(933, 34);
|
||||
this.progressDLbtnContainer.TabIndex = 96;
|
||||
//
|
||||
// downloadInstallGameButton
|
||||
//
|
||||
this.downloadInstallGameButton.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.downloadInstallGameButton.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.downloadInstallGameButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.downloadInstallGameButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.downloadInstallGameButton.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.downloadInstallGameButton.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.downloadInstallGameButton.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.downloadInstallGameButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.downloadInstallGameButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.downloadInstallGameButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.downloadInstallGameButton.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.downloadInstallGameButton.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.downloadInstallGameButton.Location = new System.Drawing.Point(569, 0);
|
||||
this.downloadInstallGameButton.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.downloadInstallGameButton.Name = "downloadInstallGameButton";
|
||||
this.downloadInstallGameButton.Radius = 5;
|
||||
this.downloadInstallGameButton.Size = new System.Drawing.Size(364, 34);
|
||||
this.downloadInstallGameButton.Stroke = true;
|
||||
this.downloadInstallGameButton.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.downloadInstallGameButton.TabIndex = 94;
|
||||
this.downloadInstallGameButton.Text = "Download and Install Game/Add To Queue ⮩ ";
|
||||
this.downloadInstallGameButton.Transparency = false;
|
||||
this.downloadInstallGameButton.Click += new System.EventHandler(this.downloadInstallGameButton_Click);
|
||||
this.downloadInstallGameButton.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
|
||||
this.downloadInstallGameButton.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter);
|
||||
//
|
||||
// diskLabel
|
||||
//
|
||||
this.diskLabel.AutoSize = true;
|
||||
@@ -1412,34 +1440,6 @@ namespace AndroidSideloader
|
||||
this.adbCmd_btnToggleUpdates.Visible = false;
|
||||
this.adbCmd_btnToggleUpdates.Click += new System.EventHandler(this.adbCmd_btnToggleUpdates_Click);
|
||||
//
|
||||
// downloadInstallGameButton
|
||||
//
|
||||
this.downloadInstallGameButton.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.downloadInstallGameButton.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.downloadInstallGameButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.downloadInstallGameButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.downloadInstallGameButton.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.downloadInstallGameButton.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.downloadInstallGameButton.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.downloadInstallGameButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.downloadInstallGameButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.downloadInstallGameButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.downloadInstallGameButton.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.downloadInstallGameButton.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.downloadInstallGameButton.Location = new System.Drawing.Point(569, 0);
|
||||
this.downloadInstallGameButton.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.downloadInstallGameButton.Name = "downloadInstallGameButton";
|
||||
this.downloadInstallGameButton.Radius = 5;
|
||||
this.downloadInstallGameButton.Size = new System.Drawing.Size(364, 34);
|
||||
this.downloadInstallGameButton.Stroke = true;
|
||||
this.downloadInstallGameButton.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.downloadInstallGameButton.TabIndex = 94;
|
||||
this.downloadInstallGameButton.Text = "Download and Install Game/Add To Queue ⮩ ";
|
||||
this.downloadInstallGameButton.Transparency = false;
|
||||
this.downloadInstallGameButton.Click += new System.EventHandler(this.downloadInstallGameButton_Click);
|
||||
this.downloadInstallGameButton.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
|
||||
this.downloadInstallGameButton.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter);
|
||||
//
|
||||
// MountButton
|
||||
//
|
||||
this.MountButton.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
|
||||
277
MainForm.cs
Normal file → Executable file
277
MainForm.cs
Normal file → Executable file
@@ -65,12 +65,16 @@ namespace AndroidSideloader
|
||||
public static PublicConfig PublicConfigFile;
|
||||
public static string PublicMirrorExtraArgs = " --tpslimit 1.0 --tpslimit-burst 3";
|
||||
public static Splash SplashScreen;
|
||||
public static string storedIpPath;
|
||||
public static string aaptPath;
|
||||
private bool manualIP;
|
||||
private System.Windows.Forms.Timer _debounceTimer;
|
||||
private CancellationTokenSource _cts;
|
||||
private List<ListViewItem> _allItems;
|
||||
public MainForm()
|
||||
{
|
||||
storedIpPath = Path.Combine(Environment.CurrentDirectory, "platform-tools", "StoredIP.txt");
|
||||
aaptPath = Path.Combine(Environment.CurrentDirectory, "platform-tools", "aapt.exe");
|
||||
InitializeComponent();
|
||||
Logger.Initialize();
|
||||
InitializeTimeReferences();
|
||||
@@ -306,7 +310,7 @@ namespace AndroidSideloader
|
||||
}
|
||||
|
||||
_ = Logger.Log("Attempting to Initalize ADB Server");
|
||||
if (File.Exists(Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools", "adb.exe")))
|
||||
if (File.Exists(Path.Combine(Environment.CurrentDirectory, "platform-tools", "adb.exe")))
|
||||
{
|
||||
_ = ADB.RunAdbCommandToString("kill-server");
|
||||
_ = ADB.RunAdbCommandToString("start-server");
|
||||
@@ -424,8 +428,8 @@ namespace AndroidSideloader
|
||||
{
|
||||
if (!string.IsNullOrEmpty(settings.IPAddress))
|
||||
{
|
||||
string path = Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools", "adb.exe");
|
||||
ProcessOutput wakeywakey = ADB.RunCommandToString($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\adb.exe shell input keyevent KEYCODE_WAKEUP", path);
|
||||
string path = Path.Combine(Environment.CurrentDirectory, "platform-tools", "adb.exe");
|
||||
ProcessOutput wakeywakey = ADB.RunCommandToString($"\"{path}\" shell input keyevent KEYCODE_WAKEUP", path);
|
||||
if (wakeywakey.Output.Contains("more than one"))
|
||||
{
|
||||
settings.Wired = true;
|
||||
@@ -438,9 +442,9 @@ namespace AndroidSideloader
|
||||
}
|
||||
}
|
||||
|
||||
if (File.Exists(Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools", "StoredIP.txt")) && !settings.Wired)
|
||||
if (File.Exists(storedIpPath) && !settings.Wired)
|
||||
{
|
||||
string IPcmndfromtxt = File.ReadAllText(Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools", "StoredIP.txt"));
|
||||
string IPcmndfromtxt = File.ReadAllText(storedIpPath);
|
||||
settings.IPAddress = IPcmndfromtxt;
|
||||
settings.Save();
|
||||
ProcessOutput IPoutput = ADB.RunAdbCommandToString(IPcmndfromtxt);
|
||||
@@ -449,7 +453,7 @@ namespace AndroidSideloader
|
||||
_ = FlexibleMessageBox.Show(Program.form, "Attempt to connect to saved IP has failed. This is usually due to rebooting the device or not having a STATIC IP set in your router.\nYou must enable Wireless ADB again!");
|
||||
settings.IPAddress = "";
|
||||
settings.Save();
|
||||
try { File.Delete(Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools", "StoredIP.txt")); }
|
||||
try { File.Delete(storedIpPath); }
|
||||
catch (Exception ex) { Logger.Log($"Unable to delete StoredIP.txt due to {ex.Message}", LogLevel.ERROR); }
|
||||
}
|
||||
else
|
||||
@@ -458,7 +462,7 @@ namespace AndroidSideloader
|
||||
_ = ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_enabled 1");
|
||||
}
|
||||
}
|
||||
else if (!File.Exists(Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools", "StoredIP.txt")))
|
||||
else if (!File.Exists(storedIpPath))
|
||||
{
|
||||
settings.IPAddress = "";
|
||||
settings.Save();
|
||||
@@ -1037,41 +1041,45 @@ namespace AndroidSideloader
|
||||
{
|
||||
m_combo.Invoke(() => { m_combo.Items.Clear(); });
|
||||
|
||||
string[] line = listApps().Split('\n');
|
||||
string[] packages = listApps()
|
||||
.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries)
|
||||
.Select(p => p.StartsWith("package:") ? p.Substring(8).Trim() : p.Trim())
|
||||
.ToArray();
|
||||
|
||||
string forsettings = string.Join(String.Empty, line);
|
||||
settings.InstalledApps = forsettings;
|
||||
// Save the full string for settings
|
||||
settings.InstalledApps = string.Join("\n", packages);
|
||||
settings.Save();
|
||||
|
||||
for (int i = 0; i < line.Length; i++)
|
||||
List<string> displayNames = new List<string>();
|
||||
|
||||
foreach (string pkg in packages)
|
||||
{
|
||||
if (line[i].Length > 9)
|
||||
string name = pkg;
|
||||
|
||||
foreach (string[] game in SideloaderRCLONE.games)
|
||||
{
|
||||
line[i] = line[i].Remove(0, 8);
|
||||
line[i] = line[i].Remove(line[i].Length - 1);
|
||||
foreach (string[] game in SideloaderRCLONE.games)
|
||||
if (game.Length > 2 && game[2].Equals(pkg, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (line[i].Length > 0 && game[2].Contains(line[i]))
|
||||
{
|
||||
line[i] = game[0];
|
||||
}
|
||||
name = game[0]; // Friendly game name
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
displayNames.Add(name);
|
||||
}
|
||||
|
||||
|
||||
Array.Sort(line);
|
||||
|
||||
foreach (string game in line)
|
||||
// Sort and populate combo
|
||||
foreach (string name in displayNames.OrderBy(n => n))
|
||||
{
|
||||
if (game.Length > 0)
|
||||
if (!string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
m_combo.Invoke(() => { _ = m_combo.Items.Add(game); });
|
||||
m_combo.Invoke(() => { _ = m_combo.Items.Add(name); });
|
||||
}
|
||||
}
|
||||
|
||||
m_combo.Invoke(() => { m_combo.MatchingMethod = StringMatchingMethod.NoWildcards; });
|
||||
}
|
||||
|
||||
public static bool isuploading = false;
|
||||
public static bool isworking = false;
|
||||
private async void getApkButton_Click(object sender, EventArgs e)
|
||||
@@ -1391,7 +1399,8 @@ namespace AndroidSideloader
|
||||
string pathname = Path.GetDirectoryName(file2);
|
||||
string filename = file2.Replace($"{pathname}\\", String.Empty);
|
||||
|
||||
string cmd = $"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\aapt.exe\" dump badging \"{file2}\" | findstr -i \"package: name\"";
|
||||
string cmd = $"\"{aaptPath}\" dump badging \"{file2}\" | findstr -i \"package: name\"";
|
||||
|
||||
_ = Logger.Log($"Running adb command-{cmd}");
|
||||
string cmdout = ADB.RunCommandToString(cmd, file2).Output;
|
||||
cmdout = Utilities.StringUtilities.RemoveEverythingBeforeFirst(cmdout, "=");
|
||||
@@ -1542,7 +1551,7 @@ namespace AndroidSideloader
|
||||
{
|
||||
string pathname = Path.GetDirectoryName(data);
|
||||
string dataname = data.Replace($"{pathname}\\", "");
|
||||
string cmd = $"\"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\aapt.exe\" dump badging \"{data}\" | findstr -i \"package: name\"";
|
||||
string cmd = $"\"{aaptPath}\" dump badging \"{data}\" | findstr -i \"package: name\"";
|
||||
_ = Logger.Log($"Running adb command-{cmd}");
|
||||
string cmdout = ADB.RunCommandToString(cmd, data).Output;
|
||||
cmdout = Utilities.StringUtilities.RemoveEverythingBeforeFirst(cmdout, "=");
|
||||
@@ -1737,13 +1746,8 @@ namespace AndroidSideloader
|
||||
int newerThanListCount = 0;
|
||||
rookienamelist = String.Empty;
|
||||
loaded = false;
|
||||
string lines = settings.InstalledApps;
|
||||
string pattern = "package:";
|
||||
string replacement = String.Empty;
|
||||
Regex rgx = new Regex(pattern);
|
||||
string result = rgx.Replace(lines, replacement);
|
||||
char[] delims = new[] { '\r', '\n' };
|
||||
string[] packageList = result.Split(delims, StringSplitOptions.RemoveEmptyEntries);
|
||||
string installedApps = settings.InstalledApps;
|
||||
string[] packageList = installedApps.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] blacklist = new string[] { };
|
||||
string[] whitelist = new string[] { };
|
||||
if (File.Exists($"{settings.MainDir}\\nouns\\blacklist.txt"))
|
||||
@@ -1867,29 +1871,12 @@ namespace AndroidSideloader
|
||||
{
|
||||
if (settings.FavoritedGames.Contains(Game.SubItems[1].Text))
|
||||
{
|
||||
if (settings.HideAdultContent == true && !Game.SubItems[1].Text.Contains("(18+)"))
|
||||
{
|
||||
GameList.Add(Game);
|
||||
}
|
||||
else if (!settings.HideAdultContent)
|
||||
{
|
||||
GameList.Add(Game);
|
||||
}
|
||||
GameList.Add(Game);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (settings.HideAdultContent == true)
|
||||
{
|
||||
if (!Game.SubItems[1].Text.Contains("(18+)"))
|
||||
{
|
||||
GameList.Add(Game);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GameList.Add(Game);
|
||||
}
|
||||
GameList.Add(Game);
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -2004,6 +1991,7 @@ namespace AndroidSideloader
|
||||
}
|
||||
}*/
|
||||
//This is for games that are not blacklisted and we dont have on rookie
|
||||
string baseApkPath = Path.Combine(Environment.CurrentDirectory, "platform-tools", "base.apk");
|
||||
if (blacklistItems.Count > 100 && rookieList.Count > 100 && !noAppCheck)
|
||||
{
|
||||
foreach (string newGamesToUpload in newGamesList)
|
||||
@@ -2031,23 +2019,22 @@ namespace AndroidSideloader
|
||||
Logger.Log($"ADB command 'pm path' executed. Path: {apppath}", LogLevel.INFO);
|
||||
apppath = Utilities.StringUtilities.RemoveEverythingBeforeFirst(apppath, "/");
|
||||
apppath = Utilities.StringUtilities.RemoveEverythingAfterFirst(apppath, "\r\n");
|
||||
if (File.Exists(Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools", "base.apk")))
|
||||
if (File.Exists(baseApkPath))
|
||||
{
|
||||
File.Delete(Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools", "base.apk"));
|
||||
File.Delete(baseApkPath);
|
||||
Logger.Log("Old base.apk file deleted.", LogLevel.INFO);
|
||||
}
|
||||
|
||||
Logger.Log($"Pulling APK from path: {apppath}", LogLevel.INFO);
|
||||
_ = ADB.RunAdbCommandToString($"pull \"{apppath}\"");
|
||||
string cmd = $"\"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\aapt.exe\" dump badging \"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\base.apk\" | findstr -i \"application-label\"";
|
||||
string workingpath = Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools", "aapt.exe");
|
||||
string cmd = $"\"{aaptPath}\" dump badging \"{baseApkPath}\" | findstr -i \"application-label\"";
|
||||
Logger.Log($"Running AAPT command: {cmd}", LogLevel.INFO);
|
||||
string ReleaseName = ADB.RunCommandToString(cmd, workingpath).Output;
|
||||
string ReleaseName = ADB.RunCommandToString(cmd, aaptPath).Output;
|
||||
Logger.Log($"AAPT command output: {ReleaseName}", LogLevel.INFO);
|
||||
ReleaseName = Utilities.StringUtilities.RemoveEverythingBeforeFirst(ReleaseName, "'");
|
||||
ReleaseName = Utilities.StringUtilities.RemoveEverythingAfterFirst(ReleaseName, "\r\n");
|
||||
ReleaseName = ReleaseName.Replace("'", "");
|
||||
File.Delete(Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools", "base.apk"));
|
||||
File.Delete(baseApkPath);
|
||||
Logger.Log("Base.apk deleted after extracting release name.", LogLevel.INFO);
|
||||
if (ReleaseName.Contains("Microsoft Windows"))
|
||||
{
|
||||
@@ -2446,7 +2433,7 @@ namespace AndroidSideloader
|
||||
settings.Save();
|
||||
try
|
||||
{
|
||||
File.WriteAllText(Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools", "StoredIP.txt"), IPcmnd);
|
||||
File.WriteAllText(storedIpPath, IPcmnd);
|
||||
}
|
||||
catch (Exception ex) { Logger.Log($"Unable to write to StoredIP.txt due to {ex.Message}", LogLevel.ERROR); }
|
||||
ADB.wirelessadbON = true;
|
||||
@@ -3396,9 +3383,9 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
_ = Program.form.GetDeviceID();
|
||||
Program.form.changeTitlebarToDevice();
|
||||
_ = FlexibleMessageBox.Show(Program.form, "Relaunch Rookie to complete the process and switch back to USB adb.");
|
||||
if (File.Exists(Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools", "StoredIP.txt")))
|
||||
if (File.Exists(storedIpPath))
|
||||
{
|
||||
File.Delete(Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools", "StoredIP.txt"));
|
||||
File.Delete(storedIpPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3663,17 +3650,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
gamesListView.Items.Clear();
|
||||
foreach (var match in matches)
|
||||
{
|
||||
if (settings.HideAdultContent == true)
|
||||
{
|
||||
if (!match.SubItems[1].Text.Contains("(18+)"))
|
||||
{
|
||||
gamesListView.Items.Add(match);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
gamesListView.Items.Add(match);
|
||||
}
|
||||
gamesListView.Items.Add(match);
|
||||
}
|
||||
|
||||
gamesListView.EndUpdate(); // End the update to refresh the UI
|
||||
@@ -3733,6 +3710,22 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
|
||||
private async Task CreateEnvironment()
|
||||
{
|
||||
webView21.CoreWebView2InitializationCompleted += (sender, e) => {
|
||||
webView21.CoreWebView2.ContainsFullScreenElementChanged += (obj, args) =>
|
||||
{
|
||||
this.FullScreen = webView21.CoreWebView2.ContainsFullScreenElement;
|
||||
};
|
||||
|
||||
webView21.CoreWebView2.NavigationCompleted += (obj, args) =>
|
||||
{
|
||||
if (!args.IsSuccess)
|
||||
{
|
||||
CoreWebView2 wv2 = (CoreWebView2)obj;
|
||||
Logger.Log($"Failed to navigate to '{wv2.Source}': {args.WebErrorStatus}");
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
string appDataLocation = Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL");
|
||||
var webView2Environment = await CoreWebView2Environment.CreateAsync(userDataFolder: appDataLocation);
|
||||
await webView21.EnsureCoreWebView2Async(webView2Environment);
|
||||
@@ -3744,10 +3737,6 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
{
|
||||
// Load the video URL in the web browser control
|
||||
webView21.CoreWebView2.Navigate(videoUrl);
|
||||
webView21.CoreWebView2.ContainsFullScreenElementChanged += (obj, args) =>
|
||||
{
|
||||
this.FullScreen = webView21.CoreWebView2.ContainsFullScreenElement;
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -3755,6 +3744,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
}
|
||||
}
|
||||
|
||||
private static CancellationTokenSource VideoDownloadTokenSource { get; set; }
|
||||
public async void gamesListView_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (gamesListView.SelectedItems.Count < 1)
|
||||
@@ -3831,22 +3821,27 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
|
||||
try
|
||||
{
|
||||
string query = $"{CurrentGameName} VR trailer"; // Create the search query by appending " VR trailer" to the current game name
|
||||
string encodedQuery = WebUtility.UrlEncode(query);
|
||||
string url = $"https://www.youtube.com/results?search_query={encodedQuery}";
|
||||
if (VideoDownloadTokenSource != null)
|
||||
{
|
||||
Debug.WriteLine("Cancelling and/or disposing trailer download request.");
|
||||
|
||||
string videoUrl;
|
||||
using (var client = new WebClient()) // Create a WebClient to download the search results page HTML
|
||||
{
|
||||
videoUrl = ExtractVideoUrl(client.DownloadString(url)); // Download the HTML and extract the first video URL
|
||||
}
|
||||
if (videoUrl == "")
|
||||
{
|
||||
MessageBox.Show("No video URL found in search results.");
|
||||
return;
|
||||
// Just race condition protection
|
||||
VideoDownloadTokenSource?.Cancel();
|
||||
VideoDownloadTokenSource?.Dispose();
|
||||
VideoDownloadTokenSource = null;
|
||||
}
|
||||
|
||||
await WebView_CoreWebView2ReadyAsync(videoUrl);
|
||||
VideoDownloadTokenSource = new CancellationTokenSource();
|
||||
using (VideoDownloadTokenSource)
|
||||
{
|
||||
Debug.WriteLine("Creating trailer download request.");
|
||||
|
||||
CancellationToken token = VideoDownloadTokenSource.Token;
|
||||
if (!await FetchAndDisplayVideoUrl(token))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -3854,9 +3849,46 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
Logger.Log("Error Loading Trailer");
|
||||
Logger.Log(ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
VideoDownloadTokenSource = null;
|
||||
}
|
||||
}
|
||||
|
||||
string NotePath = $"{SideloaderRCLONE.NotesFolder}\\{CurrentReleaseName}.txt";
|
||||
notesRichTextBox.Text = File.Exists(NotePath) ? File.ReadAllText(NotePath) : "";
|
||||
|
||||
async Task<bool> FetchAndDisplayVideoUrl(CancellationToken token)
|
||||
{
|
||||
string query = $"{CurrentGameName} VR trailer"; // Create the search query by appending " VR trailer" to the current game name
|
||||
string encodedQuery = WebUtility.UrlEncode(query);
|
||||
string url = $"https://www.youtube.com/results?search_query={encodedQuery}";
|
||||
|
||||
var response = await client.GetAsync(url, token);
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
Logger.Log($"Failed to download HTML document {response.StatusCode}, {response.ReasonPhrase}", LogLevel.ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
string htmlDocument = await response.Content.ReadAsStringAsync();
|
||||
|
||||
if (string.IsNullOrWhiteSpace(htmlDocument))
|
||||
{
|
||||
Logger.Log($"Fetched search document was empty, but fetch request returned {response.StatusCode}", LogLevel.ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
string videoUrl = ExtractVideoUrl(htmlDocument);
|
||||
if (string.IsNullOrWhiteSpace(videoUrl))
|
||||
{
|
||||
Logger.Log($"No trailer search results found for '{CurrentGameName}'.");
|
||||
return false;
|
||||
}
|
||||
|
||||
await WebView_CoreWebView2ReadyAsync(videoUrl);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateGamesButton_Click(object sender, EventArgs e)
|
||||
@@ -3936,13 +3968,8 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
updateAvailableClicked = true;
|
||||
rookienamelist = String.Empty;
|
||||
loaded = false;
|
||||
string lines = settings.InstalledApps;
|
||||
string pattern = "package:";
|
||||
string replacement = String.Empty;
|
||||
Regex rgx = new Regex(pattern);
|
||||
string result = rgx.Replace(lines, replacement);
|
||||
char[] delims = new[] { '\r', '\n' };
|
||||
string[] packageList = result.Split(delims, StringSplitOptions.RemoveEmptyEntries);
|
||||
string installedApps = settings.InstalledApps;
|
||||
string[] packageList = installedApps.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] blacklist = new string[] { };
|
||||
string[] whitelist = new string[] { };
|
||||
if (File.Exists($"{settings.MainDir}\\nouns\\blacklist.txt"))
|
||||
@@ -4004,17 +4031,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
if (installedVersionInt < cloudVersionInt)
|
||||
{
|
||||
Game.ForeColor = colorFont_updateAvailable;
|
||||
if (settings.HideAdultContent == true)
|
||||
{
|
||||
if (!Game.SubItems[1].Text.Contains("(18+)"))
|
||||
{
|
||||
GameList.Add(Game);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GameList.Add(Game);
|
||||
}
|
||||
GameList.Add(Game);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4092,7 +4109,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
Program.form.showAvailableSpace();
|
||||
settings.IPAddress = IPcmnd;
|
||||
settings.Save();
|
||||
try { File.WriteAllText(Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools", "StoredIP.txt"), IPcmnd); }
|
||||
try { File.WriteAllText(storedIpPath, IPcmnd); }
|
||||
catch (Exception ex) { Logger.Log($"Unable to write to StoredIP.txt due to {ex.Message}", LogLevel.ERROR); }
|
||||
ADB.wirelessadbON = true;
|
||||
_ = ADB.RunAdbCommandToString("shell settings put global wifi_wakeup_available 1");
|
||||
@@ -4277,13 +4294,8 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
upToDate_Clicked = true;
|
||||
rookienamelist = String.Empty;
|
||||
loaded = false;
|
||||
string lines = settings.InstalledApps;
|
||||
string pattern = "package:";
|
||||
string replacement = String.Empty;
|
||||
Regex rgx = new Regex(pattern);
|
||||
string result = rgx.Replace(lines, replacement);
|
||||
char[] delims = new[] { '\r', '\n' };
|
||||
string[] packageList = result.Split(delims, StringSplitOptions.RemoveEmptyEntries);
|
||||
string installedApps = settings.InstalledApps;
|
||||
string[] packageList = installedApps.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] blacklist = new string[] { };
|
||||
string[] whitelist = new string[] { };
|
||||
if (File.Exists($"{settings.MainDir}\\nouns\\blacklist.txt"))
|
||||
@@ -4345,17 +4357,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
if (installedVersionInt == cloudVersionInt)
|
||||
{
|
||||
Game.ForeColor = colorFont_installedGame;
|
||||
if (settings.HideAdultContent == true)
|
||||
{
|
||||
if (!Game.SubItems[1].Text.Contains("(18+)"))
|
||||
{
|
||||
GameList.Add(Game);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GameList.Add(Game);
|
||||
}
|
||||
GameList.Add(Game);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4419,13 +4421,8 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
NeedsDonation_Clicked = true;
|
||||
rookienamelist = String.Empty;
|
||||
loaded = false;
|
||||
string lines = settings.InstalledApps;
|
||||
string pattern = "package:";
|
||||
string replacement = String.Empty;
|
||||
Regex rgx = new Regex(pattern);
|
||||
string result = rgx.Replace(lines, replacement);
|
||||
char[] delims = new[] { '\r', '\n' };
|
||||
string[] packageList = result.Split(delims, StringSplitOptions.RemoveEmptyEntries);
|
||||
string installedApps = settings.InstalledApps;
|
||||
string[] packageList = installedApps.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
string[] blacklist = new string[] { };
|
||||
string[] whitelist = new string[] { };
|
||||
if (File.Exists($"{settings.MainDir}\\nouns\\blacklist.txt"))
|
||||
@@ -4495,17 +4492,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
if (!dontget)
|
||||
{
|
||||
Game.ForeColor = colorFont_donateGame;
|
||||
if (settings.HideAdultContent == true)
|
||||
{
|
||||
if (!Game.SubItems[1].Text.Contains("(18+)"))
|
||||
{
|
||||
GameList.Add(Game);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GameList.Add(Game);
|
||||
}
|
||||
GameList.Add(Game);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
43
SettingsForm.Designer.cs
generated
43
SettingsForm.Designer.cs
generated
@@ -57,7 +57,6 @@ namespace AndroidSideloader
|
||||
this.bandwidthLabel = new System.Windows.Forms.Label();
|
||||
this.bandwidthLimitTextBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.hideAdultContentCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// checkForUpdatesCheckBox
|
||||
@@ -228,7 +227,7 @@ namespace AndroidSideloader
|
||||
this.setBackupDirectory.ForeColor = System.Drawing.Color.White;
|
||||
this.setBackupDirectory.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.setBackupDirectory.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.setBackupDirectory.Location = new System.Drawing.Point(26, 628);
|
||||
this.setBackupDirectory.Location = new System.Drawing.Point(26, 598);
|
||||
this.setBackupDirectory.Name = "setBackupDirectory";
|
||||
this.setBackupDirectory.Radius = 5;
|
||||
this.setBackupDirectory.Size = new System.Drawing.Size(285, 31);
|
||||
@@ -249,7 +248,7 @@ namespace AndroidSideloader
|
||||
this.setDownloadDirectory.ForeColor = System.Drawing.Color.White;
|
||||
this.setDownloadDirectory.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.setDownloadDirectory.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.setDownloadDirectory.Location = new System.Drawing.Point(26, 591);
|
||||
this.setDownloadDirectory.Location = new System.Drawing.Point(26, 561);
|
||||
this.setDownloadDirectory.Name = "setDownloadDirectory";
|
||||
this.setDownloadDirectory.Radius = 5;
|
||||
this.setDownloadDirectory.Size = new System.Drawing.Size(285, 31);
|
||||
@@ -270,7 +269,7 @@ namespace AndroidSideloader
|
||||
this.btnOpenDebug.ForeColor = System.Drawing.Color.White;
|
||||
this.btnOpenDebug.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.btnOpenDebug.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.btnOpenDebug.Location = new System.Drawing.Point(25, 464);
|
||||
this.btnOpenDebug.Location = new System.Drawing.Point(25, 434);
|
||||
this.btnOpenDebug.Name = "btnOpenDebug";
|
||||
this.btnOpenDebug.Radius = 5;
|
||||
this.btnOpenDebug.Size = new System.Drawing.Size(285, 31);
|
||||
@@ -291,7 +290,7 @@ namespace AndroidSideloader
|
||||
this.btnResetDebug.ForeColor = System.Drawing.Color.White;
|
||||
this.btnResetDebug.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.btnResetDebug.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.btnResetDebug.Location = new System.Drawing.Point(25, 501);
|
||||
this.btnResetDebug.Location = new System.Drawing.Point(25, 471);
|
||||
this.btnResetDebug.Name = "btnResetDebug";
|
||||
this.btnResetDebug.Radius = 5;
|
||||
this.btnResetDebug.Size = new System.Drawing.Size(285, 31);
|
||||
@@ -312,7 +311,7 @@ namespace AndroidSideloader
|
||||
this.btnUploadDebug.ForeColor = System.Drawing.Color.White;
|
||||
this.btnUploadDebug.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.btnUploadDebug.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.btnUploadDebug.Location = new System.Drawing.Point(25, 538);
|
||||
this.btnUploadDebug.Location = new System.Drawing.Point(25, 508);
|
||||
this.btnUploadDebug.Name = "btnUploadDebug";
|
||||
this.btnUploadDebug.Radius = 5;
|
||||
this.btnUploadDebug.Size = new System.Drawing.Size(285, 31);
|
||||
@@ -333,7 +332,7 @@ namespace AndroidSideloader
|
||||
this.resetSettingsButton.ForeColor = System.Drawing.Color.White;
|
||||
this.resetSettingsButton.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.resetSettingsButton.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.resetSettingsButton.Location = new System.Drawing.Point(178, 411);
|
||||
this.resetSettingsButton.Location = new System.Drawing.Point(178, 381);
|
||||
this.resetSettingsButton.Name = "resetSettingsButton";
|
||||
this.resetSettingsButton.Radius = 5;
|
||||
this.resetSettingsButton.Size = new System.Drawing.Size(133, 31);
|
||||
@@ -357,7 +356,7 @@ namespace AndroidSideloader
|
||||
this.applyButton.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.applyButton.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.applyButton.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.applyButton.Location = new System.Drawing.Point(26, 411);
|
||||
this.applyButton.Location = new System.Drawing.Point(26, 381);
|
||||
this.applyButton.Name = "applyButton";
|
||||
this.applyButton.Radius = 5;
|
||||
this.applyButton.Size = new System.Drawing.Size(133, 31);
|
||||
@@ -392,7 +391,7 @@ namespace AndroidSideloader
|
||||
this.openBackupDirectory.ForeColor = System.Drawing.Color.White;
|
||||
this.openBackupDirectory.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.openBackupDirectory.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.openBackupDirectory.Location = new System.Drawing.Point(26, 702);
|
||||
this.openBackupDirectory.Location = new System.Drawing.Point(26, 672);
|
||||
this.openBackupDirectory.Name = "openBackupDirectory";
|
||||
this.openBackupDirectory.Radius = 5;
|
||||
this.openBackupDirectory.Size = new System.Drawing.Size(285, 31);
|
||||
@@ -413,7 +412,7 @@ namespace AndroidSideloader
|
||||
this.openDownloadDirectory.ForeColor = System.Drawing.Color.White;
|
||||
this.openDownloadDirectory.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.openDownloadDirectory.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25)))));
|
||||
this.openDownloadDirectory.Location = new System.Drawing.Point(26, 665);
|
||||
this.openDownloadDirectory.Location = new System.Drawing.Point(26, 635);
|
||||
this.openDownloadDirectory.Name = "openDownloadDirectory";
|
||||
this.openDownloadDirectory.Radius = 5;
|
||||
this.openDownloadDirectory.Size = new System.Drawing.Size(285, 31);
|
||||
@@ -443,7 +442,7 @@ namespace AndroidSideloader
|
||||
this.bandwidthLabel.AutoSize = true;
|
||||
this.bandwidthLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.bandwidthLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.bandwidthLabel.Location = new System.Drawing.Point(8, 370);
|
||||
this.bandwidthLabel.Location = new System.Drawing.Point(8, 340);
|
||||
this.bandwidthLabel.Name = "bandwidthLabel";
|
||||
this.bandwidthLabel.Size = new System.Drawing.Size(115, 18);
|
||||
this.bandwidthLabel.TabIndex = 30;
|
||||
@@ -456,7 +455,7 @@ namespace AndroidSideloader
|
||||
this.bandwidthLimitTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.bandwidthLimitTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.bandwidthLimitTextBox.ForeColor = System.Drawing.Color.White;
|
||||
this.bandwidthLimitTextBox.Location = new System.Drawing.Point(129, 368);
|
||||
this.bandwidthLimitTextBox.Location = new System.Drawing.Point(129, 338);
|
||||
this.bandwidthLimitTextBox.Name = "bandwidthLimitTextBox";
|
||||
this.bandwidthLimitTextBox.Size = new System.Drawing.Size(46, 21);
|
||||
this.bandwidthLimitTextBox.TabIndex = 31;
|
||||
@@ -468,34 +467,19 @@ namespace AndroidSideloader
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.label1.Location = new System.Drawing.Point(181, 370);
|
||||
this.label1.Location = new System.Drawing.Point(181, 340);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(43, 18);
|
||||
this.label1.TabIndex = 32;
|
||||
this.label1.Text = "MB/s";
|
||||
//
|
||||
// hideAdultContentCheckBox
|
||||
//
|
||||
this.hideAdultContentCheckBox.AutoSize = true;
|
||||
this.hideAdultContentCheckBox.BackColor = System.Drawing.Color.Transparent;
|
||||
this.hideAdultContentCheckBox.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.hideAdultContentCheckBox.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.hideAdultContentCheckBox.Location = new System.Drawing.Point(13, 336);
|
||||
this.hideAdultContentCheckBox.Name = "hideAdultContentCheckBox";
|
||||
this.hideAdultContentCheckBox.Size = new System.Drawing.Size(149, 22);
|
||||
this.hideAdultContentCheckBox.TabIndex = 33;
|
||||
this.hideAdultContentCheckBox.Text = "Hide Adult Content";
|
||||
this.hideAdultContentCheckBox.UseVisualStyleBackColor = true;
|
||||
this.hideAdultContentCheckBox.CheckedChanged += new System.EventHandler(this.hideAdultContentCheckBox_CheckedChanged);
|
||||
//
|
||||
// SettingsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
|
||||
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
|
||||
this.ClientSize = new System.Drawing.Size(339, 746);
|
||||
this.Controls.Add(this.hideAdultContentCheckBox);
|
||||
this.ClientSize = new System.Drawing.Size(339, 716);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.bandwidthLimitTextBox);
|
||||
this.Controls.Add(this.bandwidthLabel);
|
||||
@@ -567,6 +551,5 @@ namespace AndroidSideloader
|
||||
private System.Windows.Forms.Label bandwidthLabel;
|
||||
private System.Windows.Forms.TextBox bandwidthLimitTextBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.CheckBox hideAdultContentCheckBox;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@ namespace AndroidSideloader
|
||||
trailersOn.Checked = _settings.TrailersOn;
|
||||
chkSingleThread.Checked = _settings.SingleThreadMode;
|
||||
virtualFilesystemCompatibilityCheckbox.Checked = _settings.VirtualFilesystemCompatibility;
|
||||
hideAdultContentCheckBox.Checked = _settings.HideAdultContent;
|
||||
bandwidthLimitTextBox.Text = _settings.BandwidthLimit.ToString();
|
||||
if (nodevicemodeBox.Checked)
|
||||
{
|
||||
@@ -311,11 +310,5 @@ namespace AndroidSideloader
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void hideAdultContentCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
_settings.HideAdultContent = hideAdultContentCheckBox.Checked;
|
||||
_settings.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
4924
SettingsForm.resx
4924
SettingsForm.resx
File diff suppressed because it is too large
Load Diff
@@ -108,19 +108,22 @@ namespace AndroidSideloader
|
||||
_ = FlexibleMessageBox.Show($"You are unable to access raw.githubusercontent.com with the Exception:\n{ex.Message}\n\nSome files may be missing (Offline/Cleanup Script, Launcher)");
|
||||
}
|
||||
|
||||
string adbPath = Path.Combine(Environment.CurrentDirectory, "platform-tools", "adb.exe");
|
||||
string platformToolsDir = Path.Combine(Environment.CurrentDirectory, "platform-tools");
|
||||
|
||||
try
|
||||
{
|
||||
if (!File.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools\\adb.exe")) //if adb is not updated, download and auto extract
|
||||
if (!File.Exists(adbPath)) //if adb is not updated, download and auto extract
|
||||
{
|
||||
if (!Directory.Exists($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools"))
|
||||
if (!Directory.Exists(platformToolsDir))
|
||||
{
|
||||
_ = Directory.CreateDirectory($"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools");
|
||||
_ = Directory.CreateDirectory(platformToolsDir);
|
||||
}
|
||||
|
||||
currentAccessedWebsite = "github";
|
||||
_ = Logger.Log($"Missing adb within {Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools. Attempting to download from {currentAccessedWebsite}");
|
||||
_ = Logger.Log($"Missing adb within {platformToolsDir}. Attempting to download from {currentAccessedWebsite}");
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/dependencies.7z", "dependencies.7z");
|
||||
Utilities.Zip.ExtractFile(Path.Combine(Environment.CurrentDirectory, "dependencies.7z"), $"{Path.GetPathRoot(Environment.SystemDirectory)}RSL\\platform-tools");
|
||||
Utilities.Zip.ExtractFile(Path.Combine(Environment.CurrentDirectory, "dependencies.7z"), platformToolsDir);
|
||||
File.Delete("dependencies.7z");
|
||||
_ = Logger.Log($"adb download successful");
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace AndroidSideloader
|
||||
private static readonly string RawGitHubUrl = "https://raw.githubusercontent.com/VRPirates/rookie";
|
||||
private static readonly string GitHubUrl = "https://github.com/VRPirates/rookie";
|
||||
|
||||
public static readonly string LocalVersion = "2.34.1";
|
||||
public static readonly string LocalVersion = "2.35.0";
|
||||
public static string currentVersion = string.Empty;
|
||||
public static string changelog = string.Empty;
|
||||
|
||||
|
||||
@@ -132,7 +132,6 @@ namespace AndroidSideloader.Utilities
|
||||
public bool CreatePubMirrorFile { get; set; } = true;
|
||||
public bool UseDownloadedFiles { get; set; } = false;
|
||||
public float BandwidthLimit { get; set; } = 0f;
|
||||
public bool HideAdultContent { get; set; } = false;
|
||||
public string[] FavoritedGames { get; set; } = new string[0];
|
||||
|
||||
private SettingsManager()
|
||||
@@ -254,7 +253,6 @@ namespace AndroidSideloader.Utilities
|
||||
CreatePubMirrorFile = true;
|
||||
UseDownloadedFiles = false;
|
||||
BandwidthLimit = 0f;
|
||||
HideAdultContent = false;
|
||||
FavoritedGames = new string[0];
|
||||
|
||||
Save();
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
RSL 2.34.1
|
||||
RSL 2.35
|
||||
|
||||
- Fix: Rookie crashing with "Cannto add or insert the item"
|
||||
- Feature: Restructure and project file organization
|
||||
- Feature: Renamed 'ADB' to 'AdbManager'
|
||||
- Fix: Remove hideAdultContent toggle (no longer needed)
|
||||
- Fix: WebView2 "too many automatic redirections" error
|
||||
- Fix: Donor window only displays unique entries
|
||||
- Fix: Cleanup packages listing
|
||||
- Chore: Changed C:\RSL\platform-tools path to platform-tools in working dir
|
||||
- Chore: Minor Main file organization
|
||||
- Chore: Minor MainForm field cleanup
|
||||
Reference in New Issue
Block a user