Skip to content

Commit

Permalink
Merge branch 'release/RSL-2.16'
Browse files Browse the repository at this point in the history
  • Loading branch information
SytheZN committed Nov 5, 2022
1 parent 22ecbee commit 67a9089
Show file tree
Hide file tree
Showing 16 changed files with 582 additions and 550 deletions.
2 changes: 1 addition & 1 deletion App.config
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<setting name="SpoofGames" serializeAs="String">
<value>False</value>
</setting>
<setting name="BandwithLimit" serializeAs="String">
<setting name="BandwidthLimit" serializeAs="String">
<value/>
</setting>
<setting name="BigFontStyle" serializeAs="String">
Expand Down
15 changes: 14 additions & 1 deletion ChangelogHistory.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
RSL 2.14
RSL 2.15

- Massive UI Changes:
- Rounded buttons
- Added version Number at Bottom Left
- Changed fonts to some extend
- Added background pattern to category buttons and MainForm background
- Added an animation when opening/closing category
- Overall darker theme
- New splash

~Chax

RSL 2.14

- Added upload config for easier config management
- Improved upload logic to handle failures better
Expand Down
425 changes: 245 additions & 180 deletions MainForm.Designer.cs

Large diffs are not rendered by default.

84 changes: 35 additions & 49 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
using System.Threading.Tasks;
using System.Windows.Forms;
using AndroidSideloader.Models;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Drawing.Drawing2D;

namespace AndroidSideloader
{
Expand Down Expand Up @@ -57,7 +54,7 @@ public partial class MainForm : Form
public static bool isOffline = false;
public static bool hasPublicConfig = false;
public static PublicConfig PublicConfigFile;
public static string PublicMirrorExtraArgs = " --tpslimit 1.0 --tpslimit-burst 1";
public static string PublicMirrorExtraArgs = " --tpslimit 1.0 --tpslimit-burst 3";
public MainForm()
{
// check for offline mode
Expand Down Expand Up @@ -228,26 +225,16 @@ private async void Form1_Load(object sender, EventArgs e)
{
if (File.Exists($"{Environment.CurrentDirectory}\\crashlog.txt") && File.Exists($"{Environment.CurrentDirectory}\\nouns\\nouns.txt"))
{
Random r = new Random();
int x = r.Next(6806);
int y = r.Next(6806);

string[] lines = File.ReadAllLines($"{Environment.CurrentDirectory}\\nouns\\nouns.txt");
string randomnoun = lines[new Random(x).Next(lines.Length)];
string randomnoun2 = lines[new Random(y).Next(lines.Length)];
string combined = randomnoun + "-" + randomnoun2;

System.IO.File.Move("crashlog.txt", $"{Environment.CurrentDirectory}\\{combined}.txt");
Properties.Settings.Default.CurrentCrashPath = $"{Environment.CurrentDirectory}\\{combined}.txt";
Properties.Settings.Default.CurrentCrashName = combined;
string UUID = SideloaderUtilities.UUID();
System.IO.File.Move("crashlog.txt", $"{Environment.CurrentDirectory}\\{UUID}.log");
Properties.Settings.Default.CurrentCrashPath = $"{Environment.CurrentDirectory}\\{UUID}.log";
Properties.Settings.Default.CurrentCrashName = UUID;
Properties.Settings.Default.Save();

Clipboard.SetText(combined);
RCLONE.runRcloneCommand_DownloadConfig($"copy \"{Properties.Settings.Default.CurrentCrashPath}\" VRP-debuglogs:CrashLogs");
FlexibleMessageBox.Show($"Your CrashLog has been copied to the server. Please mention your CrashLogID ({Properties.Settings.Default.CurrentCrashName}) to the Mods (it has been automatically copied to your clipboard).");
Clipboard.SetText(UUID);
RCLONE.runRcloneCommand_UploadConfig($"copy \"{Properties.Settings.Default.CurrentCrashPath}\" RSL-gameuploads:CrashLogs");
FlexibleMessageBox.Show($"Your CrashLog has been copied to the server.\nPlease mention your CrashLogID ({Properties.Settings.Default.CurrentCrashName}) to the Mods.\nIt has been automatically copied to your clipboard.");
Clipboard.SetText(Properties.Settings.Default.CurrentCrashName);


}
}
else
Expand Down Expand Up @@ -1691,7 +1678,7 @@ public static async void DoUpload()
ADB.RunCommandToString(cmd, path);
Directory.Delete($"{Properties.Settings.Default.MainDir}\\{game.Pckgcommand}", true);
Program.form.ChangeTitle("Uploading to drive, you may continue to use Rookie while it uploads.");
RCLONE.runRcloneCommand_UploadConfig(game.Uploadcommand);
RCLONE.runRcloneCommand_UploadConfig($"copy \"{Properties.Settings.Default.MainDir}\\{gameZipName}\" RSL-gameuploads:");
if (game.isUpdate)
{
Properties.Settings.Default.SubmittedUpdates += game.Pckgcommand + ("\n");
Expand Down Expand Up @@ -1777,7 +1764,6 @@ public async Task extractAndPrepareGameToUploadAsync(string GameName, string pac
game.Pckgcommand = packagename;
game.Uploadgamename = GameName;
game.Uploadversion = installedVersionInt;
game.Uploadcommand = $"copy \"{Properties.Settings.Default.MainDir}\\{game.Uploadgamename} v{game.Uploadversion} {game.Pckgcommand}.zip\" RSL-gameuploads:";
gamesToUpload.Add(game);
}
private void initMirrors(bool random)
Expand Down Expand Up @@ -2158,7 +2144,7 @@ public async void downloadInstallGameButton_Click(object sender, EventArgs e)
{
var rclonecommand =
$"copy \":http:/{gameNameHash}/\" \"{Environment.CurrentDirectory}\\{gameNameHash}\" --progress --rc";
gameDownloadOutput = RCLONE.runRcloneCommand_PublicConfig(rclonecommand, Properties.Settings.Default.BandwithLimit);
gameDownloadOutput = RCLONE.runRcloneCommand_PublicConfig(rclonecommand, Properties.Settings.Default.BandwidthLimit);
});
}
else
Expand All @@ -2172,7 +2158,7 @@ public async void downloadInstallGameButton_Click(object sender, EventArgs e)
Logger.Log($"rclone copy \"{currentRemote}:{SideloaderRCLONE.RcloneGamesFolder}/{gameName}\"");
t1 = new Thread(() =>
{
gameDownloadOutput = RCLONE.runRcloneCommand_DownloadConfig($"copy \"{currentRemote}:{SideloaderRCLONE.RcloneGamesFolder}/{gameName}\" \"{Environment.CurrentDirectory}\\{gameName}\" --progress --rc", Properties.Settings.Default.BandwithLimit);
gameDownloadOutput = RCLONE.runRcloneCommand_DownloadConfig($"copy \"{currentRemote}:{SideloaderRCLONE.RcloneGamesFolder}/{gameName}\" \"{Environment.CurrentDirectory}\\{gameName}\" --progress --rc", Properties.Settings.Default.BandwidthLimit);
});
}

Expand Down Expand Up @@ -2669,8 +2655,8 @@ private void CheckEnter(object sender, System.Windows.Forms.KeyPressEventArgs e)
}
searchTextBox.Visible = false;
label2.Visible = false;
label3.Visible = false;
label4.Visible = false;
lblSearchHelp.Visible = false;
lblShortcutsF2.Visible = false;

if (ADBcommandbox.Visible)
{
Expand All @@ -2679,20 +2665,20 @@ private void CheckEnter(object sender, System.Windows.Forms.KeyPressEventArgs e)
ChangeTitle(" \n\n");
}
ADBcommandbox.Visible = false;
label9.Visible = false;
label11.Visible = false;
lblAdbCommand.Visible = false;
lblShortcutCtrlR.Visible = false;
label2.Visible = false;

}
if (e.KeyChar == (char)Keys.Escape)
{
searchTextBox.Visible = false;
label2.Visible = false;
label3.Visible = false;
label4.Visible = false;
lblSearchHelp.Visible = false;
lblShortcutsF2.Visible = false;
ADBcommandbox.Visible = false;
label9.Visible = false;
label11.Visible = false;
lblAdbCommand.Visible = false;
lblShortcutCtrlR.Visible = false;
label2.Visible = false;
}
}
Expand All @@ -2704,8 +2690,8 @@ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
searchTextBox.Clear();
searchTextBox.Visible = true;
label2.Visible = true;
label3.Visible = true;
label4.Visible = true;
lblSearchHelp.Visible = true;
lblShortcutsF2.Visible = true;
searchTextBox.Focus();
}
if (keyData == (Keys.Control | Keys.L))
Expand Down Expand Up @@ -2736,8 +2722,8 @@ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
ADBcommandbox.Visible = true;
ADBcommandbox.Clear();
label9.Visible = true;
label11.Visible = true;
lblAdbCommand.Visible = true;
lblShortcutCtrlR.Visible = true;
label2.Visible = true;
ADBcommandbox.Focus();
}
Expand All @@ -2746,8 +2732,8 @@ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
searchTextBox.Clear();
searchTextBox.Visible = true;
label2.Visible = true;
label3.Visible = true;
label4.Visible = true;
lblSearchHelp.Visible = true;
lblShortcutsF2.Visible = true;
searchTextBox.Focus();
}
if (keyData == (Keys.Control | Keys.F4))
Expand Down Expand Up @@ -3008,8 +2994,8 @@ private void pictureBox2_Click(object sender, EventArgs e)
searchTextBox.Clear();
searchTextBox.Visible = true;
label2.Visible = true;
label3.Visible = true;
label4.Visible = true;
lblSearchHelp.Visible = true;
lblShortcutsF2.Visible = true;
searchTextBox.Focus();
}
private void EnterInstallBox1_CheckedChanged(object sender, EventArgs e)
Expand All @@ -3022,8 +3008,8 @@ private void searchTextBox_Leave(object sender, EventArgs e)
{
searchTextBox.Visible = false;
label2.Visible = false;
label3.Visible = false;
label4.Visible = false;
lblSearchHelp.Visible = false;
lblShortcutsF2.Visible = false;
}
else
gamesListView.Focus();
Expand Down Expand Up @@ -3064,17 +3050,17 @@ private void ADBcommandbox_KeyPress(object sender, KeyPressEventArgs e)
string output = ADB.RunAdbCommandToString(ADBcommandbox.Text).Output;
FlexibleMessageBox.Show($"Ran adb command: ADB {ADBcommandbox.Text}, Output: {output}");
ADBcommandbox.Visible = false;
label9.Visible = false;
label11.Visible = false;
lblAdbCommand.Visible = false;
lblShortcutCtrlR.Visible = false;
label2.Visible = false;
gamesListView.Focus();
Program.form.ChangeTitle("");
}
if (e.KeyChar == (char)Keys.Escape)
{
ADBcommandbox.Visible = false;
label11.Visible = false;
label9.Visible = false;
lblShortcutCtrlR.Visible = false;
lblAdbCommand.Visible = false;
label2.Visible = false;
gamesListView.Focus();
}
Expand All @@ -3085,8 +3071,8 @@ private void ADBcommandbox_Leave(object sender, EventArgs e)

label2.Visible = false;
ADBcommandbox.Visible = false;
label9.Visible = false;
label11.Visible = false;
lblAdbCommand.Visible = false;
lblShortcutCtrlR.Visible = false;
}

private void gamesQueListBox_MouseDown(object sender, MouseEventArgs e)
Expand Down
63 changes: 63 additions & 0 deletions MainForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,67 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="startsideloadbutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="devicesbutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>197, 95</value>
</metadata>
<metadata name="obbcopybutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="backupbutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1454, 56</value>
</metadata>
<metadata name="restorebutton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1284, 56</value>
</metadata>
<metadata name="getApkButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1113, 56</value>
</metadata>
<metadata name="uninstallAppButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>913, 56</value>
</metadata>
<metadata name="pullAppToDesktopBtn_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>698, 56</value>
</metadata>
<metadata name="copyBulkObbButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>493, 56</value>
</metadata>
<metadata name="aboutBtn_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>369, 95</value>
</metadata>
<metadata name="settingsButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>319, 56</value>
</metadata>
<metadata name="InstallQUset_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="removeQUSetting_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1365, 17</value>
</metadata>
<metadata name="QuestOptionsButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1158, 17</value>
</metadata>
<metadata name="ADBWirelessDisable_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>954, 17</value>
</metadata>
<metadata name="ADBWirelessEnable_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>754, 17</value>
</metadata>
<metadata name="UpdateGamesButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>545, 17</value>
</metadata>
<metadata name="listApkButton_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>376, 17</value>
</metadata>
<metadata name="speedLabel_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>219, 17</value>
</metadata>
<metadata name="etaLabel_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>178, 56</value>
</metadata>
<metadata name="EnterInstallBox_Tooltip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>514, 95</value>
</metadata>
</root>
6 changes: 3 additions & 3 deletions Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<Setting Name="SpoofGames" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="BandwithLimit" Type="System.String" Scope="User">
<Setting Name="BandwidthLimit" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="BigFontStyle" Type="System.Drawing.Font" Scope="User">
Expand Down
Loading

0 comments on commit 67a9089

Please sign in to comment.