Compare commits

...

26 Commits

Author SHA1 Message Date
Chax
49deba5771 Update Discord 2025-04-10 16:21:57 +02:00
Chax
56947d0648 Add favorite mechanism 2025-04-10 16:18:53 +02:00
Chax
f2c285c141 Show release notes with trailers enabled, this fixes #198 2025-03-22 13:15:51 +01:00
Chax
b4b2a42db5 Merge branch 'master' of https://github.com/VRPirates/rookie 2025-02-22 15:31:08 +01:00
Chax
3195116fdf Remove obsolete code 2025-02-22 15:31:00 +01:00
tastyratz
5df51cfcba Update AddDefenderExceptions.ps1
Pulled duplicate folder out
2025-02-22 15:29:59 +01:00
tastyratz
a6525bf885 Update AddDefenderExceptions.ps1
Tweaked for requested changes
2025-02-22 15:29:59 +01:00
tastyratz
516618bd5a Update AddDefenderExceptions.ps1
Added an auto elevate to admin section instead of admin check.

Replaced array of paths with psscriptroot for 2 reasons; 
1. This lets users exclude whatever folder they want regardless of install path
2. Defender excludes all subdirectories and files recursively making all those entries redundant https://support.microsoft.com/en-us/windows/add-an-exclusion-to-windows-security-811816c0-4dfd-af4a-47e4-c301afe13b26

Finally,
I added some sleeps and pauses for users to review messages and results/errors
2025-02-22 15:29:59 +01:00
Chax
098c0a07a3 Bump ver 2025-02-22 15:29:32 +01:00
Chax
74fcf91572 Lower ADB version to solve ADB outputting pushes to stderr 2025-02-22 15:25:37 +01:00
Chax
1fb77054d1 Allow users to cancel backup 2025-02-22 15:25:25 +01:00
Chax
c53db4bfc3 Revert 2c513ac7, too buggy. 2025-02-22 15:15:42 +01:00
Maxine
19909a82cb Merge pull request #171 from VRPirates/beta/RSL-2.32
RSL 2.32
2024-12-29 02:23:48 +01:00
fenopy
46196d128b feat: switch to offline mode when unable to connect (dont kill) 2024-12-27 09:27:50 -06:00
fenopy
f32bd15d98 feat: allow switching between pub and priv configs 2024-12-27 09:00:32 -06:00
fenopy
ce4cd9ad46 chore: add defender exceptions ps 2024-12-27 07:16:45 -06:00
fenopy
d91c41b19c version bump 2024-12-27 06:48:39 -06:00
fenopy
b38b8d1771 fix: move labels to avoid covering queues (#169) 2024-12-27 06:47:36 -06:00
fenopy
51941f2b73 fix: changes to mirror init to fix vip issues 2024-12-27 06:43:30 -06:00
Chax
5907e48018 Remove unneeded flush call 2024-12-21 14:59:47 +01:00
Chax
8d4d2c9711 This fixes #167 2024-12-21 14:59:09 +01:00
Chax
2c513ac7a8 Add saving the ColumnWidths, Window Sizes/Position 2024-12-14 14:02:40 +01:00
Chax
9a17dd70c1 Use Environment.CurrentDirectory instead 2024-12-14 12:57:57 +01:00
fenopy
72d2db3fcc Merge branch 'beta/RSL-2.32' of github.com:VRPirates/rookie into beta/RSL-2.32 2024-12-09 10:59:10 -06:00
fenopy
05cff37dd5 bump 7z to 24.09 2024-12-09 10:59:04 -06:00
fenopy
094d996249 bump adb aapt deps 2024-12-09 10:46:45 -06:00
17 changed files with 493 additions and 260 deletions

BIN
7z.dll

Binary file not shown.

BIN
7z.exe

Binary file not shown.

BIN
7z64.dll

Binary file not shown.

BIN
7z64.exe

Binary file not shown.

72
AddDefenderExceptions.ps1 Normal file
View File

@@ -0,0 +1,72 @@
# Run this script as Administrator
# powershell -ExecutionPolicy Bypass -File "C:\RSL\Rookie\AddDefenderExceptions.ps1"
################################################################
## Auto Elevate to Admin if not running as admin
################################################################
# Get the ID and security principal of the current user account
$WindowsID = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$WindowsPrincipal = New-Object System.Security.Principal.WindowsPrincipal ($WindowsID)
# Get the security principal for the Administrator role
$AdminRole = [System.Security.Principal.WindowsBuiltInRole]::Administrator
# Check to see if we are currently running "as Administrator"
if ($WindowsPrincipal.IsInRole($AdminRole)) {
# We are running "as Administrator" - so change the title and background color to indicate this
$Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + " (Elevated)"
$Host.UI.RawUI.BackgroundColor = "DarkBlue"
Clear-Host
} else {
# We are not running "as Administrator" - so relaunch as administrator
# Create a new process object that starts PowerShell
$NewProcess = New-Object System.Diagnostics.ProcessStartInfo "PowerShell";
# Specify the current script path and name as a parameter
$NewProcess.Arguments = $myInvocation.MyCommand.Definition;
# Indicate that the process should be elevated
$NewProcess.Verb = "runas";
# Start the new process
[System.Diagnostics.Process]::Start($NewProcess);
# Exit from the current unelevated process
exit
}
write-host "Run this script from the directory root with which Rookie will be run"
start-sleep -s 5
$paths = @(
"$PSScriptRoot", # Replaces 'C:\RSL' with the script's root directory
"$PSScriptRoot\rclone",
"$PSScriptRoot\Sideloader Launcher.exe",
"$PSScriptRoot\AndroidSideloader*.exe",
"$PSScriptRoot\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
Start-Sleep -s 5
Pause
}
}
# Verify the exclusions
Write-Host "`nCurrent exclusions:" -ForegroundColor Cyan
$defenderPreferences = Get-MpPreference
$paths | ForEach-Object {
if ($defenderPreferences.ExclusionPath -contains $_) {
Write-Host "$_ is already excluded from Defender."
} else {
Write-Host "$_ is NOT excluded from Defender."
}
}
Pause
Start-Sleep -s 5

View File

@@ -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>

View File

@@ -1,4 +1,37 @@
RSL 2.30
RSL 2.32
- 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
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

199
MainForm.Designer.cs generated
View File

@@ -105,7 +105,6 @@ 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();
@@ -125,10 +124,14 @@ 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.favoriteGame = new System.Windows.Forms.ContextMenuStrip(this.components);
this.favoriteButton = new System.Windows.Forms.ToolStripMenuItem();
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();
this.adbCmd_btnSend = new AndroidSideloader.RoundButton();
((System.ComponentModel.ISupportInitialize)(this.gamesPictureBox)).BeginInit();
this.progressDLbtnContainer.SuspendLayout();
this.bottomContainer.SuspendLayout();
@@ -141,6 +144,7 @@ namespace AndroidSideloader
this.leftNavContainer.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.webView21)).BeginInit();
this.favoriteGame.SuspendLayout();
this.SuspendLayout();
//
// m_combo
@@ -166,7 +170,7 @@ namespace AndroidSideloader
this.progressBar.Location = new System.Drawing.Point(2, 0);
this.progressBar.MinimumSize = new System.Drawing.Size(200, 13);
this.progressBar.Name = "progressBar";
this.progressBar.Size = new System.Drawing.Size(482, 13);
this.progressBar.Size = new System.Drawing.Size(553, 13);
this.progressBar.TabIndex = 7;
//
// speedLabel
@@ -193,7 +197,7 @@ namespace AndroidSideloader
this.etaLabel.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.etaLabel.Font = global::AndroidSideloader.Properties.Settings.Default.FontStyle;
this.etaLabel.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
this.etaLabel.Location = new System.Drawing.Point(288, 14);
this.etaLabel.Location = new System.Drawing.Point(359, 14);
this.etaLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.etaLabel.Name = "etaLabel";
this.etaLabel.Size = new System.Drawing.Size(196, 18);
@@ -234,7 +238,7 @@ namespace AndroidSideloader
this.gamesQueListBox.Location = new System.Drawing.Point(601, 493);
this.gamesQueListBox.Margin = new System.Windows.Forms.Padding(2);
this.gamesQueListBox.Name = "gamesQueListBox";
this.gamesQueListBox.Size = new System.Drawing.Size(485, 128);
this.gamesQueListBox.Size = new System.Drawing.Size(556, 128);
this.gamesQueListBox.TabIndex = 9;
this.gamesQueListBox.MouseClick += new System.Windows.Forms.MouseEventHandler(this.gamesQueListBox_MouseClick);
this.gamesQueListBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
@@ -266,10 +270,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);
//
@@ -295,7 +299,7 @@ namespace AndroidSideloader
this.gamesListView.Location = new System.Drawing.Point(224, 98);
this.gamesListView.Name = "gamesListView";
this.gamesListView.ShowGroups = false;
this.gamesListView.Size = new System.Drawing.Size(862, 350);
this.gamesListView.Size = new System.Drawing.Size(933, 350);
this.gamesListView.TabIndex = 6;
this.gamesListView.UseCompatibleStateImageBehavior = false;
this.gamesListView.View = System.Windows.Forms.View.Details;
@@ -303,6 +307,7 @@ namespace AndroidSideloader
this.gamesListView.SelectedIndexChanged += new System.EventHandler(this.gamesListView_SelectedIndexChanged);
this.gamesListView.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
this.gamesListView.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter);
this.gamesListView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.gamesListView_MouseClick);
this.gamesListView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.gamesListView_MouseDoubleClick);
//
// GameNameIndex
@@ -356,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(862, 24);
this.searchTextBox.Size = new System.Drawing.Size(933, 26);
this.searchTextBox.TabIndex = 5;
this.searchTextBox.Text = "Search";
this.searchTextBox.Click += new System.EventHandler(this.searchTextBox_Click);
@@ -372,7 +377,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;
@@ -404,7 +409,7 @@ namespace AndroidSideloader
this.notesRichTextBox.ReadOnly = true;
this.notesRichTextBox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical;
this.notesRichTextBox.ShowSelectionMargin = true;
this.notesRichTextBox.Size = new System.Drawing.Size(485, 81);
this.notesRichTextBox.Size = new System.Drawing.Size(556, 81);
this.notesRichTextBox.TabIndex = 10;
this.notesRichTextBox.Text = "\n\n\n TIP: PRESS F1 TO SEE A LIST OF SHORTCUTS";
//
@@ -432,7 +437,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 +494,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
@@ -982,37 +987,9 @@ namespace AndroidSideloader
this.progressDLbtnContainer.Location = new System.Drawing.Point(224, 454);
this.progressDLbtnContainer.MinimumSize = new System.Drawing.Size(600, 34);
this.progressDLbtnContainer.Name = "progressDLbtnContainer";
this.progressDLbtnContainer.Size = new System.Drawing.Size(862, 34);
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(498, 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;
@@ -1274,7 +1251,7 @@ namespace AndroidSideloader
this.verLabel.BackColor = System.Drawing.Color.Transparent;
this.verLabel.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Bold);
this.verLabel.ForeColor = System.Drawing.SystemColors.Control;
this.verLabel.Location = new System.Drawing.Point(1030, 721);
this.verLabel.Location = new System.Drawing.Point(1101, 721);
this.verLabel.Name = "verLabel";
this.verLabel.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.verLabel.Size = new System.Drawing.Size(68, 20);
@@ -1316,7 +1293,7 @@ namespace AndroidSideloader
this.tableLayoutPanel1.Controls.Add(this.lblUpToDate, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.lblUpdateAvailable, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.lblNeedsDonate, 0, 2);
this.tableLayoutPanel1.Location = new System.Drawing.Point(860, 2);
this.tableLayoutPanel1.Location = new System.Drawing.Point(931, 2);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.tableLayoutPanel1.RowCount = 3;
@@ -1330,6 +1307,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 +1316,75 @@ namespace AndroidSideloader
this.webView21.TabIndex = 98;
this.webView21.ZoomFactor = 1D;
//
// favoriteGame
//
this.favoriteGame.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.favoriteButton});
this.favoriteGame.Name = "favoriteGame";
this.favoriteGame.Size = new System.Drawing.Size(117, 26);
//
// favoriteButton
//
this.favoriteButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.favoriteButton.ForeColor = System.Drawing.Color.White;
this.favoriteButton.Name = "favoriteButton";
this.favoriteButton.Size = new System.Drawing.Size(116, 22);
this.favoriteButton.Text = "Favorite";
this.favoriteButton.Click += new System.EventHandler(this.favoriteButton_Click);
//
// favoriteSwitcher
//
this.favoriteSwitcher.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.favoriteSwitcher.Active2 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.favoriteSwitcher.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.favoriteSwitcher.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.favoriteSwitcher.Cursor = System.Windows.Forms.Cursors.Default;
this.favoriteSwitcher.DataBindings.Add(new System.Windows.Forms.Binding("BackColor", global::AndroidSideloader.Properties.Settings.Default, "SubButtonColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.favoriteSwitcher.DataBindings.Add(new System.Windows.Forms.Binding("ForeColor", global::AndroidSideloader.Properties.Settings.Default, "FontColor", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.favoriteSwitcher.DataBindings.Add(new System.Windows.Forms.Binding("Font", global::AndroidSideloader.Properties.Settings.Default, "FontStyle", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
this.favoriteSwitcher.DialogResult = System.Windows.Forms.DialogResult.OK;
this.favoriteSwitcher.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F);
this.favoriteSwitcher.ForeColor = global::AndroidSideloader.Properties.Settings.Default.FontColor;
this.favoriteSwitcher.Inactive1 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.favoriteSwitcher.Inactive2 = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.favoriteSwitcher.Location = new System.Drawing.Point(786, 34);
this.favoriteSwitcher.Name = "favoriteSwitcher";
this.favoriteSwitcher.Radius = 5;
this.favoriteSwitcher.Size = new System.Drawing.Size(168, 28);
this.favoriteSwitcher.Stroke = true;
this.favoriteSwitcher.StrokeColor = System.Drawing.Color.FromArgb(((int)(((byte)(74)))), ((int)(((byte)(74)))), ((int)(((byte)(74)))));
this.favoriteSwitcher.TabIndex = 101;
this.favoriteSwitcher.Text = "Games List";
this.favoriteSwitcher.Transparency = false;
this.favoriteSwitcher.Click += new System.EventHandler(this.favoriteSwitcher_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);
//
// adbCmd_btnToggleUpdates
//
this.adbCmd_btnToggleUpdates.Active1 = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
@@ -1365,6 +1412,34 @@ 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)))));
@@ -1418,33 +1493,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;
@@ -1452,7 +1500,8 @@ namespace AndroidSideloader
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = global::AndroidSideloader.Properties.Settings.Default.BackColor;
this.BackgroundImage = global::AndroidSideloader.Properties.Resources.pattern_cubes;
this.ClientSize = new System.Drawing.Size(1104, 747);
this.ClientSize = new System.Drawing.Size(1175, 747);
this.Controls.Add(this.favoriteSwitcher);
this.Controls.Add(this.adbCmd_btnSend);
this.Controls.Add(this.adbCmd_btnToggleUpdates);
this.Controls.Add(this.ULLabel);
@@ -1508,6 +1557,7 @@ namespace AndroidSideloader
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.webView21)).EndInit();
this.favoriteGame.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -1609,5 +1659,8 @@ namespace AndroidSideloader
private RoundButton btnNoDevice;
private RoundButton adbCmd_btnToggleUpdates;
private RoundButton adbCmd_btnSend;
private ContextMenuStrip favoriteGame;
private ToolStripMenuItem favoriteButton;
private RoundButton favoriteSwitcher;
}
}

View File

@@ -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";
@@ -368,10 +369,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 +389,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 +463,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 +494,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 +504,13 @@ namespace AndroidSideloader
{
nodeviceonstart = true;
}
listAppsBtn();
showAvailableSpace();
downloadInstallGameButton.Enabled = true;
isLoading = false;
initListView();
initListView(false);
string[] files = Directory.GetFiles(Environment.CurrentDirectory);
foreach (string file in files)
{
@@ -619,7 +527,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)
@@ -990,6 +906,11 @@ namespace AndroidSideloader
{
_ = Directory.CreateDirectory(backupFolder);
}
DialogResult dialogResult1 = FlexibleMessageBox.Show(Program.form, $"Do you want to backup to {backupFolder}?", "Backup?", MessageBoxButtons.YesNo);
if (dialogResult1 == DialogResult.No)
{
return;
}
ProcessOutput output = new ProcessOutput(String.Empty, String.Empty);
Thread t1 = new Thread(() =>
{
@@ -1405,7 +1326,7 @@ namespace AndroidSideloader
showAvailableSpace();
changeTitle("Device now detected... refreshing update list.");
listAppsBtn();
initListView();
initListView(false);
}
Program.form.changeTitle($"Processing dropped file. If Rookie freezes, please wait. Do not close Rookie!");
@@ -1809,7 +1730,7 @@ namespace AndroidSideloader
private bool _allItemsInitialized = false;
private async void initListView()
private async void initListView(bool favoriteView)
{
int upToDateCount = 0;
int updateAvailableCount = 0;
@@ -1949,6 +1870,13 @@ namespace AndroidSideloader
GameList.Add(Game);
}
}
if (favoriteView)
{
if (settings.FavoritedGames.Contains(Game.SubItems[1].Text))
{
GameList.Add(Game);
}
}
else
{
GameList.Add(Game);
@@ -1967,7 +1895,9 @@ namespace AndroidSideloader
else if (!isOffline)
{
SwitchMirrors();
initListView();
if (!isOffline){
initListView(false);
}
}
@@ -2364,6 +2294,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 +2318,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 +2452,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 +2462,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);
}
@@ -2539,7 +2489,7 @@ namespace AndroidSideloader
await Task.Delay(100);
}
initListView();
initListView(false);
isLoading = false;
changeTitle(" \n\n");
@@ -2556,12 +2506,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 +2520,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 +2546,12 @@ namespace AndroidSideloader
}
});
}
catch { }
catch
{
success = false;
}
return success;
}
private static void ShowError_QuotaExceeded()
@@ -2602,7 +2561,7 @@ $@"Unable to connect to Remote Server. Rookie is unable to connect to our Server
First time launching Rookie? Please relaunch and try again.
Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.gg/DcfEpwVa4a) for Troubleshooting steps!
Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.gg/tBKMZy7QDA) for Troubleshooting steps!
";
_ = FlexibleMessageBox.Show(Program.form, errorMessage, "Unable to connect to Remote Server");
@@ -2735,7 +2694,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 +2855,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 +2910,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(() =>
@@ -3135,7 +3094,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
listAppsBtn();
if (!updateAvailableClicked && !upToDate_Clicked && !NeedsDonation_Clicked && !settings.NodeviceMode && !gamesQueueList.Any())
{
initListView();
initListView(false);
}
if (settings.EnableMessageBoxes)
{
@@ -3255,7 +3214,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
if (!updateAvailableClicked && !upToDate_Clicked && !NeedsDonation_Clicked && !settings.NodeviceMode && !gamesQueueList.Any())
{
initListView();
initListView(false);
}
if (settings.EnableMessageBoxes)
{
@@ -3459,11 +3418,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...");
}
}
@@ -3627,7 +3597,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
_ = GetDeviceID();
_ = FlexibleMessageBox.Show(Program.form, "If your device is not Connected, hit reconnect first or it won't work!\nNOTE: THIS MAY TAKE UP TO 60 SECONDS.\nThere will be a Popup text window with all updates available when it is done!", "Is device connected?", MessageBoxButtons.OKCancel);
listAppsBtn();
initListView();
initListView(false);
}
bool dialogIsUp = false;
if (keyData == Keys.F1 && !dialogIsUp)
@@ -3705,7 +3675,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
}
else
{
initListView();
initListView(false);
}
}
@@ -3819,9 +3789,6 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
}
gamesPictureBox.BackgroundImage = File.Exists(ImagePath) ? Image.FromFile(ImagePath) : new Bitmap(367, 214);
string NotePath = $"{SideloaderRCLONE.NotesFolder}\\{CurrentReleaseName}.txt";
notesRichTextBox.Text = File.Exists(NotePath) ? File.ReadAllText(NotePath) : "";
}
else
{
@@ -3878,6 +3845,8 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
Logger.Log(ex.Message);
}
}
string NotePath = $"{SideloaderRCLONE.NotesFolder}\\{CurrentReleaseName}.txt";
notesRichTextBox.Text = File.Exists(NotePath) ? File.ReadAllText(NotePath) : "";
}
public void UpdateGamesButton_Click(object sender, EventArgs e)
@@ -3885,7 +3854,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
_ = GetDeviceID();
_ = FlexibleMessageBox.Show(Program.form, "If your device is not Connected, hit reconnect first or it won't work!\nNOTE: THIS MAY TAKE UP TO 60 SECONDS.\nThere will be a Popup text window with all updates available when it is done!", "Is device connected?", MessageBoxButtons.OKCancel);
listAppsBtn();
initListView();
initListView(false);
if (SideloaderRCLONE.games.Count < 1)
{
@@ -4074,7 +4043,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
else
{
updateAvailableClicked = false;
initListView();
initListView(false);
}
lblUpToDate.Click += lblUpToDate_Click;
lblUpdateAvailable.Click += updateAvailable_Click;
@@ -4415,7 +4384,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
else
{
upToDate_Clicked = false;
initListView();
initListView(false);
}
lblUpToDate.Click += lblUpToDate_Click;
lblUpdateAvailable.Click += updateAvailable_Click;
@@ -4566,7 +4535,7 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
else
{
NeedsDonation_Clicked = false;
initListView();
initListView(false);
}
lblUpToDate.Click += lblUpToDate_Click;
lblUpdateAvailable.Click += updateAvailable_Click;
@@ -4659,10 +4628,86 @@ Please visit our Telegram (https://t.me/VRPirates) or Discord (https://discord.g
KeyPressEventArgs enterKeyPressArgs = new KeyPressEventArgs((char)Keys.Enter);
ADBcommandbox_KeyPress(adbCmd_CommandBox, enterKeyPressArgs);
}
private ListViewItem _rightClickedItem;
private void gamesListView_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
_rightClickedItem = gamesListView.GetItemAt(e.X, e.Y);
gamesListView.SelectedItems.Clear();
if (_rightClickedItem != null)
{
_rightClickedItem.Selected = true;
}
// Get the name of the release of the right-clicked item
string packageName = _rightClickedItem.SubItems[1].Text;
// Check if the game is favorited and update the menu item text accordingly
ToolStripMenuItem favoriteMenuItem = favoriteGame.Items[0] as ToolStripMenuItem;
if (SettingsManager.Instance.FavoritedGames.Contains(packageName))
{
favoriteButton.Text = "Unfavorite"; // If it's already favorited, show "Unfavorite"
}
else
{
favoriteButton.Text = "Favorite"; // If it's not favorited, show "Favorite"
}
// Show the context menu at the mouse position
favoriteGame.Show(gamesListView, e.Location);
}
}
private void favoriteButton_Click(object sender, EventArgs e)
{
if (_rightClickedItem != null)
{
string packageName = _rightClickedItem.SubItems[1].Text;
// Check the menu item's text to decide whether to add or remove the game from favorites
if ((sender as ToolStripMenuItem).Text == "Favorite")
{
// Add to favorites
settings.AddFavoriteGame(packageName);
Console.WriteLine($"{packageName} has been added to favorites.");
}
else if ((sender as ToolStripMenuItem).Text == "Unfavorite")
{
// Remove from favorites
settings.RemoveFavoriteGame(packageName);
Console.WriteLine($"{packageName} has been removed from favorites.");
}
// After adding/removing, update the context menu text
ToolStripMenuItem favoriteMenuItem = sender as ToolStripMenuItem;
if (settings.FavoritedGames.Contains(packageName))
{
favoriteMenuItem.Text = "Unfavorite";
}
else
{
favoriteMenuItem.Text = "Favorite";
}
}
}
private void favoriteSwitcher_Click(object sender, EventArgs e)
{
if (favoriteSwitcher.Text == "Games List")
{
favoriteSwitcher.Text = "Favorited Games";
initListView(true);
}
else
{
favoriteSwitcher.Text = "Games List";
initListView(false);
}
}
}
public static class ControlExtensions
{
public static void Invoke(this Control control, Action action)

View File

@@ -180,4 +180,10 @@
<metadata name="listApkButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>955, 17</value>
</metadata>
<metadata name="favoriteGame.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>855, 95</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>161</value>
</metadata>
</root>

View File

@@ -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
{

View File

@@ -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)
{

View File

@@ -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.33.0";
public static string currentVersion = string.Empty;
public static string changelog = string.Empty;

View File

@@ -4,6 +4,7 @@ using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
namespace AndroidSideloader.Utilities
{
@@ -11,7 +12,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 +133,7 @@ namespace AndroidSideloader.Utilities
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()
{
@@ -253,11 +255,34 @@ namespace AndroidSideloader.Utilities
UseDownloadedFiles = false;
BandwidthLimit = 0f;
HideAdultContent = false;
FavoritedGames = new string[0];
Save();
Save();
Debug.WriteLine("Default settings created.");
}
public void AddFavoriteGame(string packageName)
{
if (!FavoritedGames.Contains(packageName))
{
var list = FavoritedGames.ToList();
list.Add(packageName);
FavoritedGames = list.ToArray();
Save();
}
}
public void RemoveFavoriteGame(string packageName)
{
if (FavoritedGames.Contains(packageName))
{
var list = FavoritedGames.ToList();
list.Remove(packageName);
FavoritedGames = list.ToArray();
Save();
}
}
public void Dispose()
{
FontStyle?.Dispose();

View File

@@ -1,19 +1,5 @@
RSL 2.31
RSL 2.33
- 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 users to cancel backups
- [QoL] Lower ADB Version
- [QoL] Revert Add saving the ColumnWidths, Window Sizes/Position

Binary file not shown.

View File

@@ -1 +1 @@
2.31.2
2.33.0