Compare commits

...

8 Commits

Author SHA1 Message Date
pmow
bfe6c15a4f 2.10.4 Start at mirror 02 2021-11-05 00:37:58 -04:00
pmow
fb1a16b861 changelog update 2021-10-28 00:24:15 -04:00
pmow
311b9bd4da changelog 2021-10-28 00:21:23 -04:00
pmow
58e1b1d5d2 2.10.3 2021-10-28 00:19:47 -04:00
pmow
9d6eef85f1 Merge pull request #93 from asphalt123/master
Add offline mode to install games locally when no mirrors with the --offline switch
2021-10-26 20:49:09 -04:00
=
275344d421 Add offline mode to install games locally when no mirrors 2021-10-24 15:13:28 +02:00
nerdunit
e911970c8d Update README.md 2021-10-07 12:35:22 -07:00
William Swartwood
eb5df74dc5 RSL 2.10.2
= Fixed issue where same new apps were being
asked for before 72 hr window if not marked as
free.
= Changed 7zip compression level to Store for
faster zipping for donations (since apks are
already compressed the file size only changes
1-2MB at most, so upload time will be virtually
the same).

HFP
2021-10-05 03:30:25 -04:00
12 changed files with 137 additions and 36 deletions

View File

@@ -191,6 +191,9 @@
<setting name="BackColor" serializeAs="String">
<value>50, 50, 50</value>
</setting>
<setting name="AppPackages" serializeAs="String">
<value />
</setting>
</AndroidSideloader.Properties.Settings>
<AndroidADB.Sideloader.Properties.Settings>
<setting name="checkForUpdates" serializeAs="String">

View File

@@ -1,4 +1,50 @@
-----BEGIN PGP SIGNED MESSAGE-----
RSL 2.10.4
Made mirror ID start at first again.
~pmow
RSL 2.10.3
Added offline mode merge.
~pmow
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
RSL 2.10.2
= Fixed issue where same new apps were being
asked for before 72 hr window if not marked as
free..
= Changed 7zip compression level to Store for
faster zipping for donations (since apks are
already compressed the file size only changes
1-2MB at most, so upload time will be virtually
the same).
HFP
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEKjgtlwMyrpVu4TGfx/Rql1VoczcFAmFb+0gACgkQx/Rql1Vo
czedmBAAloms6WvjP1glyASuzm4wzyFtrf/yhDGpgXIeVJMoZ9tbp9SncvB+C4j5
uL9D/3lnZjhqulTHjxocccuKdp4iawHTlROFX6zWMOK2eGHY3rcDl0ZISxXNHvkw
YqoaDqXxk0Ib6+FY7RoINKKHGOnRLRuWivpWjhVDBpMt6A9PSmGpFAghrFmpgNqI
5+dGvXEgQiuK5INhA9pipM5d++X7EKQ3NyW9RKkeUduYyEKJ9nH6JbmTNm3VbvAP
l718n5MObvVGbRYgd/CCvAF8oIUoj5mBig/yFqJOHCeEZPEfRP4NHuxwpprtaotM
I6D3nBAvUldDy4B8tCJnlg0P6BAqg5AffcJyn5zoCPsgINcGMQfm5dFfcGN6Ckwv
cZ4G1eGxRgI+hkWmMVjZb3+r4T2lCWgdGWpE4EsdKRg6Q0ZaXZa8Hwm/YcM2N8lm
n5+Li2qXO9uRalCZZEMArFx6BpmvG6nT1bT5hLOFfN2XUsQ5ZK2vlxBPeT7sKWU5
L7l/WaLRmFlb4fKo/5kv0eYZMCa9TmpXo8MFIwH7V01InrWhB0p6cZA5j4DhVm/x
2zBVEoEYRVPnyfHYCc79xXFkF9v5Xq0GHeGC7DHqveMqx0VTj/kBlL18fYsHjXkL
YrvgSQ2gDv9IA02J+BuQq8dWFl7pWSCXULdb2y0yJA0lXe3mk7Y=
=qetN
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
RSL 2.10.1

View File

@@ -48,9 +48,20 @@ namespace AndroidSideloader
#endif
private bool isLoading = true;
public static bool isOffline = false;
public MainForm()
{
// check for offline mode
string[] args = Environment.GetCommandLineArgs();
foreach (var arg in args)
{
if (arg == "--offline")
{
isOffline = true;
FlexibleMessageBox.Show("Offline mode activated. You can't download games in this mode, only do local stuff.");
}
}
InitializeComponent();
//Time between asking for new apps if user clicks No. 96,0,0 DEFAULT
TimeSpan newDayReference = new TimeSpan(96, 0, 0);
@@ -70,6 +81,7 @@ namespace AndroidSideloader
{
Properties.Settings.Default.ListUpped = false;
Properties.Settings.Default.NonAppPackages = "";
Properties.Settings.Default.AppPackages = "";
Properties.Settings.Default.LastLaunch = DateTime.Now;
Properties.Settings.Default.Save();
}
@@ -161,8 +173,10 @@ namespace AndroidSideloader
if (length > 5000000)
File.Delete($"{Properties.Settings.Default.CurrentLogPath}");
}
RCLONE.Init();
if (!isOffline)
{
RCLONE.Init();
}
try { Spoofer.spoofer.Init(); } catch { }
if (Properties.Settings.Default.CallUpgrade)
@@ -238,15 +252,22 @@ namespace AndroidSideloader
progressBar.Invoke(() => { progressBar.Style = ProgressBarStyle.Marquee; });
progressBar.Style = ProgressBarStyle.Marquee;
ChangeTitle("Initializing Mirrors");
initMirrors(true);
ChangeTitle("Checking if config is updated and updating config");
SideloaderRCLONE.updateConfig(currentRemote);
ChangeTitle("Initializing Games");
SideloaderRCLONE.initGames(currentRemote);
//ChangeTitle("Syncing Game Photos");
//ChangeTitle("Updating list of needed clean apps...");
//ChangeTitle("Checking for Updates on server...");
if (!isOffline)
{
ChangeTitle("Initializing Mirrors");
initMirrors(true);
ChangeTitle("Checking if config is updated and updating config");
SideloaderRCLONE.updateConfig(currentRemote);
ChangeTitle("Initializing Games");
SideloaderRCLONE.initGames(currentRemote);
//ChangeTitle("Syncing Game Photos");
//ChangeTitle("Updating list of needed clean apps...");
//ChangeTitle("Checking for Updates on server...");
}
else
{
ChangeTitle("Offline mode enabled, no Rclone");
}
});
t1.SetApartmentState(ApartmentState.STA);
@@ -872,7 +893,7 @@ namespace AndroidSideloader
File.WriteAllText($"{Properties.Settings.Default.MainDir}\\{packageName}\\HWID.txt", HWID);
File.WriteAllText($"{Properties.Settings.Default.MainDir}\\{packageName}\\uploadMethod.txt", "manual");
ChangeTitle("Zipping extracted application...");
string cmd = $"7z a \"{GameName} v{VersionInt} {packageName}.zip\" .\\{packageName}\\*";
string cmd = $"7z a -mx1 \"{GameName} v{VersionInt} {packageName}.zip\" .\\{packageName}\\*";
string path = $"{Properties.Settings.Default.MainDir}\\7z.exe";
progressBar.Style = ProgressBarStyle.Continuous;
Thread t4 = new Thread(() =>
@@ -1420,14 +1441,14 @@ namespace AndroidSideloader
while (t1.IsAlive)
await Task.Delay(100);
}
else
else if(!isOffline)
{
SwitchMirrors();
initListView();
}
if (blacklistItems.Count == 0 && GameList.Count == 0 && !Properties.Settings.Default.nodevicemode)
if (blacklistItems.Count == 0 && GameList.Count == 0 && !Properties.Settings.Default.nodevicemode && !isOffline)
{
//This means either the user does not have headset connected or the blacklist
//did not load, so we are just going to skip everything
@@ -1518,7 +1539,7 @@ namespace AndroidSideloader
foreach (string newGamesToUpload in newGamesList)
{
bool onapplist = false;
string NewApp = Properties.Settings.Default.NonAppPackages;
string NewApp = Properties.Settings.Default.NonAppPackages + "\n" + Properties.Settings.Default.AppPackages;
if (NewApp.Contains(newGamesToUpload))
onapplist = true;
string RlsName = Sideloader.PackageNametoGameName(newGamesToUpload);
@@ -1600,7 +1621,7 @@ namespace AndroidSideloader
if (File.Exists($"{Properties.Settings.Default.MainDir}\\{game.Uploadgamename} v{game.Uploadversion}.zip"))
File.Delete($"{Properties.Settings.Default.MainDir}\\{game.Uploadgamename} v{game.Uploadversion}.zip");
string path = $"{Properties.Settings.Default.MainDir}\\7z.exe";
string cmd = $"7z a \"{Properties.Settings.Default.MainDir}\\{game.Uploadgamename} v{game.Uploadversion} {game.Pckgcommand}.zip\" .\\{game.Pckgcommand}\\*";
string cmd = $"7z a -mx1 \"{Properties.Settings.Default.MainDir}\\{game.Uploadgamename} v{game.Uploadversion} {game.Pckgcommand}.zip\" .\\{game.Pckgcommand}\\*";
Program.form.ChangeTitle("Zipping extracted application...");
ADB.RunCommandToString(cmd, path);
Directory.Delete($"{Properties.Settings.Default.MainDir}\\{game.Pckgcommand}", true);
@@ -1718,15 +1739,26 @@ namespace AndroidSideloader
if (itemsCount > 0)
{
var rand = new Random();
if (random == true && index < itemsCount)
index = rand.Next(0, itemsCount);
// Code that implements a randomized mirror. The rotation logic (the rotation) is reported as being bugged so I just disabled as a workaround ~pmow
// if (random == true && index < itemsCount)
// index = rand.Next(0, itemsCount);
// remotesList.Invoke(() =>
// {
// remotesList.SelectedIndex = index;
// remotesList.SelectedIndex = 0;
// currentRemote = "VRP-mirror" + remotesList.SelectedItem.ToString();
// });
remotesList.Invoke(() =>
{
remotesList.SelectedIndex = index;
{
remotesList.SelectedIndex = 0; //set mirror to first
currentRemote = "VRP-mirror" + remotesList.SelectedItem.ToString();
});
}
});
};
}
public static string processError = string.Empty;
@@ -1861,7 +1893,7 @@ without him none of this would be possible
{
if (quotaTries > remotesList.Items.Count)
{
FlexibleMessageBox.Show("Quota reached for all mirrors exiting program...");
FlexibleMessageBox.Show("Quota reached for all mirrors ,exiting Application. Try the offline mode instead...");
Application.Exit();
}
if (remotesList.SelectedIndex + 1 == remotesList.Items.Count)
@@ -2033,7 +2065,7 @@ without him none of this would be possible
//Quota Errors
bool isinstalltxt = false;
bool quotaError = false;
if (gameDownloadOutput.Error.Length > 0)
if (gameDownloadOutput.Error.Length > 0 && !isOffline)
{
string err = gameDownloadOutput.Error.ToLower();
err += gameDownloadOutput.Output.ToLower();
@@ -2041,7 +2073,6 @@ without him none of this would be possible
{
quotaError = true;
SwitchMirrors();
gamesQueueList.RemoveAt(0);
@@ -2891,7 +2922,7 @@ without him none of this would be possible
File.Delete($"{Properties.Settings.Default.MainDir}\\{GameName} v{VersionInt} {packageName}.zip");
string path = $"{Properties.Settings.Default.MainDir}\\7z.exe";
string cmd = $"7z a \"{Properties.Settings.Default.MainDir}\\{GameName} v{VersionInt} {packageName}.zip\" .\\{packageName}\\*";
string cmd = $"7z a -mx1 \"{Properties.Settings.Default.MainDir}\\{GameName} v{VersionInt} {packageName}.zip\" .\\{packageName}\\*";
Program.form.ChangeTitle("Zipping extracted application...");
Thread t3 = new Thread(() =>
{

View File

@@ -52,6 +52,11 @@ namespace AndroidSideloader
Properties.Settings.Default.NonAppPackages += listItem.SubItems[Donors.PackageNameIndex].Text + ";" + HWID + "\n";
Properties.Settings.Default.Save();
}
else
{
Properties.Settings.Default.AppPackages += listItem.SubItems[Donors.PackageNameIndex].Text + "\n";
Properties.Settings.Default.Save();
}
}
MainForm.newpackageupload();
this.Close();

View File

@@ -14,6 +14,7 @@ namespace AndroidSideloader
[SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.ControlAppDomain)]
static void Main()
{
AppDomain currentDomain = AppDomain.CurrentDomain;
currentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler);
Application.EnableVisualStyles();

View File

@@ -741,5 +741,17 @@ namespace AndroidSideloader.Properties {
this["BackColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string AppPackages {
get {
return ((string)(this["AppPackages"]));
}
set {
this["AppPackages"] = value;
}
}
}
}

View File

@@ -182,5 +182,8 @@
<Setting Name="BackColor" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">50, 50, 50</Value>
</Setting>
<Setting Name="AppPackages" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>

View File

@@ -36,7 +36,7 @@ namespace AndroidSideloader
//Run rclone command
public static ProcessOutput runRcloneCommand(string command, string bandwithLimit = "")
{
if (!MainForm.HasInternet) return new ProcessOutput("", "No internet");
if (!MainForm.HasInternet || MainForm.isOffline) return new ProcessOutput("", "No internet");
ProcessOutput prcoutput = new ProcessOutput();
//Rclone output is unicode, else it will show garbage instead of unicode characters

View File

@@ -5,7 +5,9 @@
![Issues](https://img.shields.io/github/issues/nerdunit/androidsideloader)
## !IMPORTANT!
This app may be buggy and have problems, I will recode it from scratch when MAUI will be released (This september) and a linux port will be available, making RSL cross-platform.
This app may be buggy and have problems, I will recode it from scratch ~~when MAUI will be released (This september) and a linux port will be available, making RSL cross-platform.~~
Since microsoft delayed MAUI and they don't support linux, I decided to try to rewrite it in go, a language that I started learning recently, so there is no ETA for that.
### This app might get detected as malware, however both the sideloader and the sideloader launcher are open source

View File

@@ -17,7 +17,7 @@ namespace AndroidSideloader
private static string RawGitHubUrl;
private static string GitHubUrl;
static readonly public string LocalVersion = "2.10.1";
static readonly public string LocalVersion = "2.10.4";
public static string currentVersion = string.Empty;
public static string changelog = string.Empty;

View File

@@ -1,7 +1,5 @@
RSL 2.10.1
RSL 2.10.4
= Fixed sort by Size (MB).
= Fixed issue where game list column headers
were appearing as a game in the games list.
Made mirror ID start at first again.
HFP
~pmow

View File

@@ -1 +1 @@
2.10.1
2.10.4