31
AddDefenderExceptions.ps1
Normal file
31
AddDefenderExceptions.ps1
Normal file
@@ -0,0 +1,31 @@
|
||||
# Run this script as Administrator
|
||||
# powershell -ExecutionPolicy Bypass -File "C:\RSL\Rookie\AddDefenderExceptions.ps1"
|
||||
|
||||
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
|
||||
Write-Warning "Please run this script as Administrator!"
|
||||
exit
|
||||
}
|
||||
|
||||
$paths = @(
|
||||
"C:\RSL",
|
||||
"C:\RSL\Rookie",
|
||||
"C:\RSL\Rookie\rclone",
|
||||
"C:\RSL\Rookie\Sideloader Launcher.exe",
|
||||
"C:\RSL\Rookie\AndroidSideloader*.exe",
|
||||
"C:\RSL\Rookie\rclone\rclone.exe"
|
||||
)
|
||||
|
||||
foreach ($path in $paths) {
|
||||
try {
|
||||
Add-MpPreference -ExclusionPath $path -ErrorAction Stop
|
||||
Write-Host "Successfully added exclusion for: $path" -ForegroundColor Green
|
||||
}
|
||||
catch {
|
||||
Write-Host "Failed to add exclusion for: $path" -ForegroundColor Red
|
||||
Write-Host "Error: $_" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
||||
# Verify the exclusions
|
||||
Write-Host "`nCurrent exclusions:" -ForegroundColor Cyan
|
||||
Get-MpPreference | Select-Object -ExpandProperty ExclusionPath | Where-Object { $_ -like "C:\RSL*" }
|
||||
@@ -314,6 +314,9 @@
|
||||
<None Include="CleanupInstall.cmd">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="AddDefenderExceptions.ps1">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="version" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,4 +1,24 @@
|
||||
RSL 2.30
|
||||
RSL 2.31.1
|
||||
|
||||
- Fix: Filtering when Adult Content is shown
|
||||
|
||||
RSL 2.31
|
||||
|
||||
- Feature: Preserve download.config during rclone update
|
||||
- Feature: Added toggle to hide Adult Content
|
||||
- Fix: Changed settings configuration to settings.json
|
||||
- Fix: Always create debuglog on first-launch
|
||||
- Fix: Fixed numeric sorting
|
||||
- Fix: Wrap ADB commands to prevent crash
|
||||
- Fix: Update CleanupInstall to use UserProfile instead of Username
|
||||
- Fix: Fix to OBB pushing when Dragging and Dropping
|
||||
- Fix: Do not show ShowPrcOutput messages when "Enable Message Boxes" is disabled
|
||||
- Fix: Add safeguard to prevent deletion of current directory
|
||||
- Fix: Case insensitive package matching
|
||||
- Chore: Add build batch
|
||||
- Chore: Bump rclone to 1.68.2 (from 1.67.0)
|
||||
|
||||
RSL 2.30
|
||||
|
||||
- Feature: Added Download Metrics
|
||||
-- Upon downloading a game, Rookie will attempt to log the download count with our server
|
||||
|
||||
69
MainForm.Designer.cs
generated
69
MainForm.Designer.cs
generated
@@ -125,10 +125,10 @@ namespace AndroidSideloader
|
||||
this.leftNavContainer = new System.Windows.Forms.Panel();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.webView21 = new Microsoft.Web.WebView2.WinForms.WebView2();
|
||||
this.adbCmd_btnSend = new AndroidSideloader.RoundButton();
|
||||
this.adbCmd_btnToggleUpdates = new AndroidSideloader.RoundButton();
|
||||
this.MountButton = new AndroidSideloader.RoundButton();
|
||||
this.btnNoDevice = new AndroidSideloader.RoundButton();
|
||||
this.adbCmd_btnSend = new AndroidSideloader.RoundButton();
|
||||
((System.ComponentModel.ISupportInitialize)(this.gamesPictureBox)).BeginInit();
|
||||
this.progressDLbtnContainer.SuspendLayout();
|
||||
this.bottomContainer.SuspendLayout();
|
||||
@@ -266,10 +266,10 @@ namespace AndroidSideloader
|
||||
this.remotesList.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.remotesList.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.remotesList.FormattingEnabled = true;
|
||||
this.remotesList.Location = new System.Drawing.Point(545, 40);
|
||||
this.remotesList.Location = new System.Drawing.Point(531, 40);
|
||||
this.remotesList.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.remotesList.Name = "remotesList";
|
||||
this.remotesList.Size = new System.Drawing.Size(53, 26);
|
||||
this.remotesList.Size = new System.Drawing.Size(67, 26);
|
||||
this.remotesList.TabIndex = 3;
|
||||
this.remotesList.SelectedIndexChanged += new System.EventHandler(this.remotesList_SelectedIndexChanged);
|
||||
//
|
||||
@@ -372,7 +372,7 @@ namespace AndroidSideloader
|
||||
this.gamesQueueLabel.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.gamesQueueLabel.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.gamesQueueLabel.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.gamesQueueLabel.Location = new System.Drawing.Point(599, 603);
|
||||
this.gamesQueueLabel.Location = new System.Drawing.Point(971, 603);
|
||||
this.gamesQueueLabel.Name = "gamesQueueLabel";
|
||||
this.gamesQueueLabel.Size = new System.Drawing.Size(123, 18);
|
||||
this.gamesQueueLabel.TabIndex = 86;
|
||||
@@ -432,7 +432,7 @@ namespace AndroidSideloader
|
||||
this.lblNotes.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.lblNotes.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
|
||||
this.lblNotes.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.lblNotes.Location = new System.Drawing.Point(597, 689);
|
||||
this.lblNotes.Location = new System.Drawing.Point(988, 689);
|
||||
this.lblNotes.Name = "lblNotes";
|
||||
this.lblNotes.Size = new System.Drawing.Size(106, 18);
|
||||
this.lblNotes.TabIndex = 86;
|
||||
@@ -489,9 +489,9 @@ namespace AndroidSideloader
|
||||
this.lblMirror.ForeColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.lblMirror.Location = new System.Drawing.Point(475, 44);
|
||||
this.lblMirror.Name = "lblMirror";
|
||||
this.lblMirror.Size = new System.Drawing.Size(65, 17);
|
||||
this.lblMirror.Size = new System.Drawing.Size(51, 17);
|
||||
this.lblMirror.TabIndex = 90;
|
||||
this.lblMirror.Text = "Mirror #";
|
||||
this.lblMirror.Text = "Mirror";
|
||||
this.lblMirror.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// adbCmd_CommandBox
|
||||
@@ -1330,6 +1330,7 @@ namespace AndroidSideloader
|
||||
// webView21
|
||||
//
|
||||
this.webView21.AllowExternalDrop = true;
|
||||
this.webView21.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.webView21.CreationProperties = null;
|
||||
this.webView21.DefaultBackgroundColor = System.Drawing.Color.White;
|
||||
this.webView21.Location = new System.Drawing.Point(224, 493);
|
||||
@@ -1338,6 +1339,33 @@ namespace AndroidSideloader
|
||||
this.webView21.TabIndex = 98;
|
||||
this.webView21.ZoomFactor = 1D;
|
||||
//
|
||||
// adbCmd_btnSend
|
||||
//
|
||||
this.adbCmd_btnSend.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.adbCmd_btnSend.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.adbCmd_btnSend.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.adbCmd_btnSend.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||
this.adbCmd_btnSend.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.adbCmd_btnSend.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.adbCmd_btnSend.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.adbCmd_btnSend.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.adbCmd_btnSend.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.adbCmd_btnSend.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.adbCmd_btnSend.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.adbCmd_btnSend.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.adbCmd_btnSend.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.adbCmd_btnSend.Location = new System.Drawing.Point(478, 262);
|
||||
this.adbCmd_btnSend.Name = "adbCmd_btnSend";
|
||||
this.adbCmd_btnSend.Radius = 5;
|
||||
this.adbCmd_btnSend.Size = new System.Drawing.Size(126, 28);
|
||||
this.adbCmd_btnSend.Stroke = true;
|
||||
this.adbCmd_btnSend.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.adbCmd_btnSend.TabIndex = 100;
|
||||
this.adbCmd_btnSend.Text = "Send Command";
|
||||
this.adbCmd_btnSend.Transparency = false;
|
||||
this.adbCmd_btnSend.Visible = false;
|
||||
this.adbCmd_btnSend.Click += new System.EventHandler(this.adbCmd_btnSend_Click);
|
||||
//
|
||||
// adbCmd_btnToggleUpdates
|
||||
//
|
||||
this.adbCmd_btnToggleUpdates.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
@@ -1418,33 +1446,6 @@ namespace AndroidSideloader
|
||||
this.btnNoDevice.Transparency = false;
|
||||
this.btnNoDevice.Click += new System.EventHandler(this.btnNoDevice_Click);
|
||||
//
|
||||
// adbCmd_btnSend
|
||||
//
|
||||
this.adbCmd_btnSend.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.adbCmd_btnSend.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
|
||||
this.adbCmd_btnSend.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.adbCmd_btnSend.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||
this.adbCmd_btnSend.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
this.adbCmd_btnSend.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.adbCmd_btnSend.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.adbCmd_btnSend.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
||||
this.adbCmd_btnSend.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.adbCmd_btnSend.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
|
||||
this.adbCmd_btnSend.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
|
||||
this.adbCmd_btnSend.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.adbCmd_btnSend.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
|
||||
this.adbCmd_btnSend.Location = new System.Drawing.Point(478, 262);
|
||||
this.adbCmd_btnSend.Name = "adbCmd_btnSend";
|
||||
this.adbCmd_btnSend.Radius = 5;
|
||||
this.adbCmd_btnSend.Size = new System.Drawing.Size(126, 28);
|
||||
this.adbCmd_btnSend.Stroke = true;
|
||||
this.adbCmd_btnSend.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
|
||||
this.adbCmd_btnSend.TabIndex = 100;
|
||||
this.adbCmd_btnSend.Text = "Send Command";
|
||||
this.adbCmd_btnSend.Transparency = false;
|
||||
this.adbCmd_btnSend.Visible = false;
|
||||
this.adbCmd_btnSend.Click += new System.EventHandler(this.adbCmd_btnSend_Click);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AllowDrop = true;
|
||||
|
||||
284
MainForm.cs
284
MainForm.cs
@@ -60,6 +60,7 @@ namespace AndroidSideloader
|
||||
public static bool noRcloneUpdating;
|
||||
public static bool noAppCheck = false;
|
||||
public static bool hasPublicConfig = false;
|
||||
public static bool UsingPublicConfig = false;
|
||||
public static bool enviromentCreated = false;
|
||||
public static PublicConfig PublicConfigFile;
|
||||
public static string PublicMirrorExtraArgs = " --tpslimit 1.0 --tpslimit-burst 3";
|
||||
@@ -218,6 +219,17 @@ namespace AndroidSideloader
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadListViewColumnWidths(System.Windows.Forms.ListView listView, string listViewName)
|
||||
{
|
||||
if (settings.ListViewColumnWidths.TryGetValue(listViewName, out var columnWidths))
|
||||
{
|
||||
for (int i = 0; i < columnWidths.Length && i < listView.Columns.Count; i++)
|
||||
{
|
||||
listView.Columns[i].Width = columnWidths[i]; // Apply saved width
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static string donorApps = String.Empty;
|
||||
private string oldTitle = String.Empty;
|
||||
public static bool updatesNotified = false;
|
||||
@@ -274,6 +286,19 @@ namespace AndroidSideloader
|
||||
speedLabel.Text = String.Empty;
|
||||
diskLabel.Text = String.Empty;
|
||||
verLabel.Text = Updater.LocalVersion;
|
||||
LoadListViewColumnWidths(gamesListView, "gamesListView");
|
||||
if (settings.MainWindowLocationX == 0 && settings.MainWindowLocationY == 0)
|
||||
{
|
||||
this.StartPosition = FormStartPosition.CenterScreen;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.StartPosition = FormStartPosition.Manual;
|
||||
this.Left = settings.MainWindowLocationX;
|
||||
this.Top = settings.MainWindowLocationY;
|
||||
}
|
||||
this.Width = settings.MainWindowSizeWidth;
|
||||
this.Height = settings.MainWindowSizeHeight;
|
||||
if (File.Exists("crashlog.txt"))
|
||||
{
|
||||
if (File.Exists(settings.CurrentCrashPath))
|
||||
@@ -368,10 +393,10 @@ namespace AndroidSideloader
|
||||
}
|
||||
}
|
||||
|
||||
remotesList.Items.Clear();
|
||||
if (hasPublicConfig)
|
||||
{
|
||||
lblMirror.Text = " Public Mirror";
|
||||
remotesList.Size = System.Drawing.Size.Empty;
|
||||
UsingPublicConfig = true;
|
||||
_ = Logger.Log($"Using Public Mirror");
|
||||
}
|
||||
if (isOffline)
|
||||
@@ -388,73 +413,39 @@ namespace AndroidSideloader
|
||||
SplashScreen.Close();
|
||||
|
||||
progressBar.Style = ProgressBarStyle.Marquee;
|
||||
Thread t1 = new Thread(async () =>
|
||||
|
||||
if (!debugMode && settings.CheckForUpdates && !isOffline)
|
||||
{
|
||||
if (!debugMode && settings.CheckForUpdates)
|
||||
{
|
||||
Updater.AppName = "AndroidSideloader";
|
||||
Updater.Repository = "VRPirates/rookie";
|
||||
await Updater.Update();
|
||||
}
|
||||
progressBar.Invoke(() => { progressBar.Style = ProgressBarStyle.Marquee; });
|
||||
|
||||
progressBar.Style = ProgressBarStyle.Marquee;
|
||||
if (!isOffline)
|
||||
{
|
||||
changeTitle("Getting Upload Config...");
|
||||
SideloaderRCLONE.updateUploadConfig();
|
||||
}
|
||||
|
||||
});
|
||||
t1.SetApartmentState(ApartmentState.STA);
|
||||
t1.IsBackground = true;
|
||||
Updater.AppName = "AndroidSideloader";
|
||||
Updater.Repository = "VRPirates/rookie";
|
||||
await Updater.Update();
|
||||
}
|
||||
|
||||
if (!isOffline)
|
||||
{
|
||||
t1.Start();
|
||||
}
|
||||
while (t1.IsAlive)
|
||||
{
|
||||
await Task.Delay(100);
|
||||
}
|
||||
changeTitle("Getting Upload Config...");
|
||||
SideloaderRCLONE.updateUploadConfig();
|
||||
|
||||
_ = Logger.Log("Initializing Servers");
|
||||
changeTitle("Initializing Servers...");
|
||||
|
||||
Thread t6 = new Thread(async () =>
|
||||
{
|
||||
if (!isOffline)
|
||||
// Wait for mirrors to initialize
|
||||
await initMirrors();
|
||||
|
||||
if (!UsingPublicConfig)
|
||||
{
|
||||
_ = Logger.Log("Initializing Servers");
|
||||
changeTitle("Initializing Servers...");
|
||||
await initMirrors();
|
||||
|
||||
if (!hasPublicConfig)
|
||||
{
|
||||
changeTitle("Grabbing the Games List...");
|
||||
SideloaderRCLONE.initGames(currentRemote);
|
||||
}
|
||||
changeTitle("Grabbing the Games List...");
|
||||
SideloaderRCLONE.initGames(currentRemote);
|
||||
}
|
||||
else
|
||||
{
|
||||
changeTitle("Offline mode enabled, no Rclone");
|
||||
}
|
||||
|
||||
});
|
||||
t6.SetApartmentState(ApartmentState.STA);
|
||||
t6.IsBackground = false;
|
||||
|
||||
if (!isOffline)
|
||||
{
|
||||
t6.Start();
|
||||
}
|
||||
while (t6.IsAlive)
|
||||
else
|
||||
{
|
||||
await Task.Delay(100);
|
||||
changeTitle("Offline mode enabled, no Rclone");
|
||||
}
|
||||
|
||||
|
||||
Thread t5 = new Thread(() =>
|
||||
changeTitle("Connecting to your Quest...");
|
||||
await Task.Run(() =>
|
||||
{
|
||||
changeTitle("Connecting to your Quest...");
|
||||
if (!string.IsNullOrEmpty(settings.IPAddress))
|
||||
{
|
||||
string path = Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "RSL", "platform-tools", "adb.exe");
|
||||
@@ -496,56 +487,29 @@ namespace AndroidSideloader
|
||||
settings.IPAddress = "";
|
||||
settings.Save();
|
||||
}
|
||||
})
|
||||
{
|
||||
IsBackground = true
|
||||
};
|
||||
t5.Start();
|
||||
while (t5.IsAlive)
|
||||
{
|
||||
await Task.Delay(100);
|
||||
}
|
||||
});
|
||||
|
||||
if (hasPublicConfig)
|
||||
if (UsingPublicConfig)
|
||||
{
|
||||
Thread t2 = new Thread(() =>
|
||||
await Task.Run(() =>
|
||||
{
|
||||
changeTitle("Updating Metadata...");
|
||||
SideloaderRCLONE.UpdateMetadataFromPublic();
|
||||
|
||||
changeTitle("Processing Metadata...");
|
||||
SideloaderRCLONE.ProcessMetadataFromPublic();
|
||||
})
|
||||
{
|
||||
IsBackground = true
|
||||
};
|
||||
if (!isOffline)
|
||||
{
|
||||
t2.Start();
|
||||
}
|
||||
|
||||
while (t2.IsAlive)
|
||||
{
|
||||
await Task.Delay(50);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
else if (!isOffline)
|
||||
{
|
||||
|
||||
Thread t2 = new Thread(() =>
|
||||
await Task.Run(() =>
|
||||
{
|
||||
changeTitle("Updating Game Notes...");
|
||||
SideloaderRCLONE.UpdateGameNotes(currentRemote);
|
||||
});
|
||||
|
||||
Thread t3 = new Thread(() =>
|
||||
{
|
||||
changeTitle("Updating Game Thumbnails (This may take a minute or two)...");
|
||||
SideloaderRCLONE.UpdateGamePhotos(currentRemote);
|
||||
});
|
||||
|
||||
Thread t4 = new Thread(() =>
|
||||
{
|
||||
SideloaderRCLONE.UpdateNouns(currentRemote);
|
||||
if (!Directory.Exists(SideloaderRCLONE.ThumbnailsFolder) ||
|
||||
!Directory.Exists(SideloaderRCLONE.NotesFolder))
|
||||
@@ -554,43 +518,9 @@ namespace AndroidSideloader
|
||||
"It seems you are missing the thumbnails and/or notes database, the first start of the sideloader takes a bit more time, so dont worry if it looks stuck!");
|
||||
}
|
||||
});
|
||||
t2.IsBackground = true;
|
||||
t3.IsBackground = true;
|
||||
t4.IsBackground = true;
|
||||
|
||||
if (!isOffline)
|
||||
{
|
||||
t2.Start();
|
||||
}
|
||||
|
||||
while (t2.IsAlive)
|
||||
{
|
||||
await Task.Delay(50);
|
||||
}
|
||||
|
||||
if (!isOffline)
|
||||
{
|
||||
t3.Start();
|
||||
}
|
||||
|
||||
while (t3.IsAlive)
|
||||
{
|
||||
await Task.Delay(50);
|
||||
}
|
||||
|
||||
if (!isOffline)
|
||||
{
|
||||
t4.Start();
|
||||
}
|
||||
|
||||
while (t4.IsAlive)
|
||||
{
|
||||
await Task.Delay(50);
|
||||
}
|
||||
}
|
||||
|
||||
progressBar.Style = ProgressBarStyle.Marquee;
|
||||
|
||||
changeTitle("Populating Game Update List, Almost There!");
|
||||
|
||||
_ = await CheckForDevice();
|
||||
@@ -598,11 +528,13 @@ namespace AndroidSideloader
|
||||
{
|
||||
nodeviceonstart = true;
|
||||
}
|
||||
|
||||
listAppsBtn();
|
||||
showAvailableSpace();
|
||||
downloadInstallGameButton.Enabled = true;
|
||||
isLoading = false;
|
||||
initListView();
|
||||
|
||||
string[] files = Directory.GetFiles(Environment.CurrentDirectory);
|
||||
foreach (string file in files)
|
||||
{
|
||||
@@ -619,7 +551,15 @@ namespace AndroidSideloader
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
searchTextBox.Enabled = true;
|
||||
|
||||
if (isOffline)
|
||||
{
|
||||
lblMirror.Text = " Offline Mode";
|
||||
remotesList.Size = System.Drawing.Size.Empty;
|
||||
_ = Logger.Log($"Using Offline Mode");
|
||||
}
|
||||
}
|
||||
|
||||
private void timer_Tick(object sender, EventArgs e)
|
||||
@@ -1967,7 +1907,9 @@ namespace AndroidSideloader
|
||||
else if (!isOffline)
|
||||
{
|
||||
SwitchMirrors();
|
||||
initListView();
|
||||
if (!isOffline){
|
||||
initListView();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2364,6 +2306,12 @@ namespace AndroidSideloader
|
||||
|
||||
_ = Logger.Log("Loaded following mirrors: ");
|
||||
int itemsCount = 0;
|
||||
if (hasPublicConfig)
|
||||
{
|
||||
_ = remotesList.Items.Add("Public");
|
||||
itemsCount++;
|
||||
}
|
||||
|
||||
foreach (string mirror in mirrors)
|
||||
{
|
||||
if (mirror.Contains("mirror"))
|
||||
@@ -2382,7 +2330,14 @@ namespace AndroidSideloader
|
||||
await Task.Run(() => remotesList.Invoke(() =>
|
||||
{
|
||||
remotesList.SelectedIndex = 0; // Set mirror to first item in array.
|
||||
currentRemote = "VRP-mirror" + remotesList.SelectedItem.ToString();
|
||||
string selectedRemote = remotesList.SelectedItem.ToString();
|
||||
currentRemote = "";
|
||||
|
||||
if (selectedRemote != "Public")
|
||||
{
|
||||
currentRemote = "VRP-mirror";
|
||||
}
|
||||
currentRemote = string.Concat(currentRemote, selectedRemote);
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -2509,12 +2464,9 @@ namespace AndroidSideloader
|
||||
|
||||
private async void listApkButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
changeTitle("Refreshing connected devices, installed apps and update list...");
|
||||
if (isLoading)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string titleMessage = "Refreshing connected devices, installed apps and update list...";
|
||||
changeTitle(titleMessage);
|
||||
if (isLoading) { return; }
|
||||
isLoading = true;
|
||||
|
||||
progressBar.Style = ProgressBarStyle.Marquee;
|
||||
@@ -2522,9 +2474,19 @@ namespace AndroidSideloader
|
||||
|
||||
await initMirrors();
|
||||
|
||||
isLoading = false;
|
||||
await refreshCurrentMirror(titleMessage);
|
||||
}
|
||||
private async Task refreshCurrentMirror(string titleMessage)
|
||||
{
|
||||
changeTitle(titleMessage);
|
||||
if (isLoading) { return; }
|
||||
isLoading = true;
|
||||
progressBar.Style = ProgressBarStyle.Marquee;
|
||||
|
||||
Thread t1 = new Thread(() =>
|
||||
{
|
||||
if (!hasPublicConfig)
|
||||
if (!UsingPublicConfig)
|
||||
{
|
||||
SideloaderRCLONE.initGames(currentRemote);
|
||||
}
|
||||
@@ -2556,12 +2518,13 @@ namespace AndroidSideloader
|
||||
public static bool skiponceafterremove = false;
|
||||
|
||||
|
||||
public void SwitchMirrors()
|
||||
public bool SwitchMirrors()
|
||||
{
|
||||
bool success = true;
|
||||
try
|
||||
{
|
||||
quotaTries++;
|
||||
remotesList.Invoke(() =>
|
||||
remotesList.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
if (quotaTries > remotesList.Items.Count)
|
||||
{
|
||||
@@ -2569,10 +2532,13 @@ namespace AndroidSideloader
|
||||
|
||||
if (System.Windows.Forms.Application.MessageLoop)
|
||||
{
|
||||
Process.GetCurrentProcess().Kill();
|
||||
// Process.GetCurrentProcess().Kill();
|
||||
isOffline = true;
|
||||
success = false;
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (remotesList.SelectedIndex + 1 == remotesList.Items.Count)
|
||||
{
|
||||
reset = true;
|
||||
@@ -2592,7 +2558,12 @@ namespace AndroidSideloader
|
||||
}
|
||||
});
|
||||
}
|
||||
catch { }
|
||||
catch
|
||||
{
|
||||
success = false;
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
private static void ShowError_QuotaExceeded()
|
||||
@@ -2735,7 +2706,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
{
|
||||
bandwidthLimit = $"--bwlimit={settings.BandwidthLimit}M";
|
||||
}
|
||||
if (hasPublicConfig)
|
||||
if (UsingPublicConfig)
|
||||
{
|
||||
bool doDownload = true;
|
||||
bool skipRedownload = false;
|
||||
@@ -2896,7 +2867,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
if (res == DialogResult.Yes)
|
||||
{
|
||||
changeTitle("Deleting game files", false);
|
||||
if (hasPublicConfig)
|
||||
if (UsingPublicConfig)
|
||||
{
|
||||
if (Directory.Exists($"{settings.DownloadDir}\\{gameNameHash}"))
|
||||
{
|
||||
@@ -2951,7 +2922,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
}
|
||||
}
|
||||
|
||||
if (hasPublicConfig && otherError == false && gameDownloadOutput.Output != "Download skipped.")
|
||||
if (UsingPublicConfig && otherError == false && gameDownloadOutput.Output != "Download skipped.")
|
||||
{
|
||||
|
||||
Thread extractionThread = new Thread(() =>
|
||||
@@ -3359,6 +3330,17 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveListViewColumnWidths(System.Windows.Forms.ListView listView, string listViewName)
|
||||
{
|
||||
var columnWidths = new int[listView.Columns.Count];
|
||||
for (int i = 0; i < listView.Columns.Count; i++)
|
||||
{
|
||||
columnWidths[i] = listView.Columns[i].Width; // Get current width
|
||||
}
|
||||
|
||||
settings.ListViewColumnWidths[listViewName] = columnWidths;
|
||||
settings.Save(); // Save to settings file
|
||||
}
|
||||
|
||||
private async void Form1_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
@@ -3399,7 +3381,12 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
RCLONE.killRclone();
|
||||
_ = ADB.RunAdbCommandToString("kill-server");
|
||||
}
|
||||
|
||||
SaveListViewColumnWidths(gamesListView, "gamesListView");
|
||||
settings.MainWindowLocationX = this.Left;
|
||||
settings.MainWindowLocationY = this.Top;
|
||||
settings.MainWindowSizeHeight = this.Height;
|
||||
settings.MainWindowSizeWidth = this.Width;
|
||||
settings.Save();
|
||||
}
|
||||
|
||||
private async void ADBWirelessDisable_Click(object sender, EventArgs e)
|
||||
@@ -3459,11 +3446,22 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
|
||||
showAvailableSpace();
|
||||
}
|
||||
|
||||
private void remotesList_SelectedIndexChanged(object sender, EventArgs e)
|
||||
private async void remotesList_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (remotesList.SelectedItem != null)
|
||||
{
|
||||
remotesList.Invoke(() => { currentRemote = "VRP-mirror" + remotesList.SelectedItem.ToString(); });
|
||||
string selectedRemote = remotesList.SelectedItem.ToString();
|
||||
if (selectedRemote == "Public")
|
||||
{
|
||||
UsingPublicConfig = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
UsingPublicConfig = false;
|
||||
remotesList.Invoke(() => { currentRemote = "VRP-mirror" + selectedRemote; });
|
||||
}
|
||||
|
||||
await refreshCurrentMirror("Refreshing App List...");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
10
RCLONE.cs
10
RCLONE.cs
@@ -113,7 +113,6 @@ namespace AndroidSideloader
|
||||
rclone.StartInfo.UseShellExecute = false;
|
||||
_ = rclone.Start();
|
||||
rclone.StandardInput.WriteLine(command);
|
||||
rclone.StandardInput.Flush();
|
||||
rclone.StandardInput.Close();
|
||||
|
||||
string output = rclone.StandardOutput.ReadToEnd();
|
||||
@@ -136,16 +135,19 @@ namespace AndroidSideloader
|
||||
if (error.Contains("400 Bad Request") || error.Contains("cannot fetch token") || error.Contains("authError") || error.Contains("quota") || error.Contains("exceeded") || error.Contains("directory not found") || error.Contains("Failed to"))
|
||||
{
|
||||
string oldRemote = MainForm.currentRemote;
|
||||
bool retSM = false;
|
||||
try
|
||||
{
|
||||
Program.form.SwitchMirrors();
|
||||
|
||||
retSM = Program.form.SwitchMirrors();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new ProcessOutput("All mirrors are on quota or down...", "All mirrors are on quota or down...");
|
||||
}
|
||||
prcoutput = runRcloneCommand_DownloadConfig(originalCommand.Replace(oldRemote, MainForm.currentRemote));
|
||||
if (retSM)
|
||||
{
|
||||
prcoutput = runRcloneCommand_DownloadConfig(originalCommand.Replace(oldRemote, MainForm.currentRemote));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -94,6 +94,14 @@ namespace AndroidSideloader
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/CleanupInstall.cmd", "CleanupInstall.cmd");
|
||||
_ = Logger.Log($"'CleanupInstall.cmd' download successful");
|
||||
}
|
||||
|
||||
if (!File.Exists("AddDefenderExceptions.ps1"))
|
||||
{
|
||||
currentAccessedWebsite = "github";
|
||||
_ = Logger.Log($"Missing 'AddDefenderExceptions.ps1'. Attempting to download from {currentAccessedWebsite}");
|
||||
client.DownloadFile("https://github.com/VRPirates/rookie/raw/master/AddDefenderExceptions.ps1", "AddDefenderExceptions.ps1");
|
||||
_ = Logger.Log($"'AddDefenderExceptions.ps1' download successful");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -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.31.2";
|
||||
public static readonly string LocalVersion = "2.32.0";
|
||||
public static string currentVersion = string.Empty;
|
||||
public static string changelog = string.Empty;
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AndroidSideloader.Utilities
|
||||
{
|
||||
@@ -11,7 +13,7 @@ namespace AndroidSideloader.Utilities
|
||||
{
|
||||
private static readonly Lazy<SettingsManager> _instance = new Lazy<SettingsManager>(() => new SettingsManager());
|
||||
private static readonly string settingsFilePath = Path.Combine(
|
||||
AppDomain.CurrentDomain.BaseDirectory,
|
||||
Environment.CurrentDirectory,
|
||||
"settings.json");
|
||||
|
||||
// Custom converters for special types
|
||||
@@ -132,6 +134,11 @@ namespace AndroidSideloader.Utilities
|
||||
public bool UseDownloadedFiles { get; set; } = false;
|
||||
public float BandwidthLimit { get; set; } = 0f;
|
||||
public bool HideAdultContent { get; set; } = false;
|
||||
public Dictionary<string, int[]> ListViewColumnWidths { get; set; } = new Dictionary<string, int[]>();
|
||||
public int MainWindowLocationX { get; set; } = 0;
|
||||
public int MainWindowLocationY { get; set; } = 0;
|
||||
public int MainWindowSizeWidth { get; set; } = 0;
|
||||
public int MainWindowSizeHeight { get; set; } = 0;
|
||||
|
||||
private SettingsManager()
|
||||
{
|
||||
@@ -253,6 +260,14 @@ namespace AndroidSideloader.Utilities
|
||||
UseDownloadedFiles = false;
|
||||
BandwidthLimit = 0f;
|
||||
HideAdultContent = false;
|
||||
ListViewColumnWidths = new Dictionary<string, int[]>
|
||||
{
|
||||
{ "gamesListView", new[] { 158, 244, 87, 75, 145, 66, 80 } }
|
||||
};
|
||||
MainWindowLocationX = 0;
|
||||
MainWindowLocationY = 0;
|
||||
MainWindowSizeWidth = 1120;
|
||||
MainWindowSizeHeight = 786;
|
||||
|
||||
Save();
|
||||
Debug.WriteLine("Default settings created.");
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
RSL 2.31
|
||||
RSL 2.32
|
||||
|
||||
- Feature: Preserve download.config during rclone update
|
||||
- Feature: Added toggle to hide Adult Content
|
||||
- Fix: Changed settings configuration to settings.json
|
||||
- Fix: Always create debuglog on first-launch
|
||||
- Fix: Fixed numeric sorting
|
||||
- Fix: Wrap ADB commands to prevent crash
|
||||
- Fix: Update CleanupInstall to use UserProfile instead of Username
|
||||
- Fix: Fix to OBB pushing when Dragging and Dropping
|
||||
- Fix: Do not show ShowPrcOutput messages when "Enable Message Boxes" is disabled
|
||||
- Fix: Add safeguard to prevent deletion of current directory
|
||||
- Fix: Case insensitive package matching
|
||||
- Chore: Add build batch
|
||||
- Chore: Bump rclone to 1.68.2 (from 1.67.0)
|
||||
|
||||
RSL 2.31.1
|
||||
|
||||
- Fix: Filtering when Adult Content is shown
|
||||
- Feature: Allow switching between Public and Private configs
|
||||
- Feature: Switch to Offline Mode when unable to connect
|
||||
- Feature: Save window position and column sizes
|
||||
- Fix: An issue that caused the VIP mirror to fail
|
||||
- Fix: Make video window flexible
|
||||
- Fix: Issue when saving Settings file
|
||||
- Fix: Change Label position to avoid overlapping Queue/Notes windows
|
||||
- Chore: Bump aapt/aapt2/adb to latest
|
||||
- Chore: Bump 7z to 24.09
|
||||
- Chore: Add AddDefenderExceptions.ps1
|
||||
|
||||
BIN
dependencies.7z
BIN
dependencies.7z
Binary file not shown.
Reference in New Issue
Block a user