Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8aff424ccc | ||
|
|
f50ebdd28c | ||
|
|
5608565275 | ||
|
|
9f783b3b1a | ||
|
|
02156985aa | ||
|
|
a81cb1e496 | ||
|
|
688bf0a274 |
16
ADB.cs
16
ADB.cs
@@ -379,13 +379,15 @@ namespace AndroidSideloader
|
||||
}
|
||||
ret += RunAdbCommandToString($"install -g -r \"{path}\"");
|
||||
}
|
||||
string gamenameforQU = Sideloader.PackageNametoGameName(packagename);
|
||||
if (File.Exists($"{Properties.Settings.Default.MainDir}\\Config.Json") && gamenameforQU.Contains("-QU") || path.Contains("-QU"))
|
||||
string gamenameforQU = Sideloader.PackageNametoGameName(packagename);
|
||||
if (Properties.Settings.Default.QUturnedon)
|
||||
{
|
||||
string gameName = packagename;
|
||||
packagename = Sideloader.gameNameToPackageName(gameName);
|
||||
if (gamenameforQU.Contains("-QU") || path.Contains("-QU"))
|
||||
{
|
||||
string gameName = packagename;
|
||||
packagename = Sideloader.gameNameToPackageName(gameName);
|
||||
|
||||
Program.form.ChangeTitle("Pushing Custom QU S3 Config.JSON.");
|
||||
Program.form.ChangeTitle("Pushing Custom QU S3 Config.JSON.");
|
||||
if (!Directory.Exists($"/sdcard/android/data/{packagename}"))
|
||||
RunAdbCommandToString($"shell mkdir /sdcard/android/data/{packagename}");
|
||||
if (!Directory.Exists($"/sdcard/android/data/{packagename}/private"))
|
||||
@@ -410,8 +412,10 @@ namespace AndroidSideloader
|
||||
File.WriteAllText($"{Properties.Settings.Default.MainDir}\\delete_settings", blank);
|
||||
ret += ADB.RunAdbCommandToString($"push \"{Properties.Settings.Default.MainDir}\\delete_settings\" /sdcard/android/data/{packagename}/private/delete_settings");
|
||||
ret += ADB.RunAdbCommandToString($"push \"{Properties.Settings.Default.MainDir}\\config.json\" /sdcard/android/data/{packagename}/private/config.json");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Program.form.ChangeTitle("");
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -143,6 +143,9 @@
|
||||
<setting name="CurrentCrashName" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="QUturnedon" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</AndroidSideloader.Properties.Settings>
|
||||
<AndroidADB.Sideloader.Properties.Settings>
|
||||
<setting name="checkForUpdates" serializeAs="String">
|
||||
|
||||
57
MainForm.cs
57
MainForm.cs
@@ -41,7 +41,35 @@ namespace AndroidSideloader
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if (!File.Exists(Properties.Settings.Default.CurrentLogPath))
|
||||
{
|
||||
|
||||
if (File.Exists($"{Environment.CurrentDirectory}\\notes\\nouns.txt"))
|
||||
{
|
||||
string[] lines = File.ReadAllLines($"{Environment.CurrentDirectory}\\notes\\nouns.txt");
|
||||
Random r = new Random();
|
||||
int x = r.Next(6806);
|
||||
int y = r.Next(6806);
|
||||
|
||||
|
||||
string randomnoun = lines[new Random(x).Next(lines.Length)];
|
||||
string randomnoun2 = lines[new Random(y).Next(lines.Length)];
|
||||
string combined = randomnoun + "-" + randomnoun2;
|
||||
Properties.Settings.Default.CurrentLogPath = Environment.CurrentDirectory + "\\" + combined + ".txt";
|
||||
Properties.Settings.Default.CurrentLogName = combined;
|
||||
Properties.Settings.Default.Save();
|
||||
if (File.Exists($"{Environment.CurrentDirectory}\\debuglog.txt"))
|
||||
System.IO.File.Move("debuglog.txt", combined + ".txt");
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Cannot generate debug log until RSL is done syncing with the server. Once RSL has fully loaded please reset your DebugLog in Settings.");
|
||||
Properties.Settings.Default.CurrentLogPath = $"{Environment.CurrentDirectory}\\debuglog.txt";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
System.Windows.Forms.Timer t = new System.Windows.Forms.Timer();
|
||||
t.Interval = 840000; // 14 mins between wakeup commands
|
||||
t.Tick += new EventHandler(timer_Tick);
|
||||
@@ -113,6 +141,7 @@ namespace AndroidSideloader
|
||||
Directory.CreateDirectory(BackupFolder);
|
||||
|
||||
if (Directory.Exists(Sideloader.TempFolder))
|
||||
|
||||
{
|
||||
Directory.Delete(Sideloader.TempFolder, true);
|
||||
Directory.CreateDirectory(Sideloader.TempFolder);
|
||||
@@ -181,6 +210,10 @@ namespace AndroidSideloader
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
File.Delete($"{Environment.CurrentDirectory}\\crashlog.txt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,29 +269,7 @@ namespace AndroidSideloader
|
||||
progressBar.Style = ProgressBarStyle.Continuous;
|
||||
isLoading = false;
|
||||
|
||||
if (!File.Exists(Properties.Settings.Default.CurrentLogPath))
|
||||
{
|
||||
|
||||
if (File.Exists($"{Environment.CurrentDirectory}\\notes\\nouns.txt"))
|
||||
{
|
||||
string[] lines = File.ReadAllLines($"{Environment.CurrentDirectory}\\notes\\nouns.txt");
|
||||
Random r = new Random();
|
||||
int x = r.Next(6806);
|
||||
int y = r.Next(6806);
|
||||
|
||||
|
||||
string randomnoun = lines[new Random(x).Next(lines.Length)];
|
||||
string randomnoun2 = lines[new Random(y).Next(lines.Length)];
|
||||
string combined = randomnoun + "-" + randomnoun2;
|
||||
Properties.Settings.Default.CurrentLogPath = Environment.CurrentDirectory + "\\" + combined + ".txt";
|
||||
Properties.Settings.Default.CurrentLogName = combined;
|
||||
Properties.Settings.Default.Save();
|
||||
if (File.Exists($"{Environment.CurrentDirectory}\\debuglog.txt"))
|
||||
System.IO.File.Move("debuglog.txt", combined + ".txt");
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
12
Properties/Settings.Designer.cs
generated
12
Properties/Settings.Designer.cs
generated
@@ -550,5 +550,17 @@ namespace AndroidSideloader.Properties {
|
||||
this["CurrentCrashName"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||
public bool QUturnedon {
|
||||
get {
|
||||
return ((bool)(this["QUturnedon"]));
|
||||
}
|
||||
set {
|
||||
this["QUturnedon"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,5 +134,8 @@
|
||||
<Setting Name="CurrentCrashName" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="QUturnedon" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
12
QuestForm.cs
12
QuestForm.cs
@@ -107,6 +107,7 @@ namespace AndroidSideloader
|
||||
FOVy.Text = Properties.Settings.Default.QUy;
|
||||
FOVx.Text = Properties.Settings.Default.QUx;
|
||||
QURfrRt.SelectedValue = Properties.Settings.Default.QUhz;
|
||||
Properties.Settings.Default.QUturnedon = true;
|
||||
}
|
||||
else if (!QUon.Checked)
|
||||
{
|
||||
@@ -124,9 +125,10 @@ namespace AndroidSideloader
|
||||
label9.Visible = false;
|
||||
label10.Visible = false;
|
||||
deleteButton.Visible = false;
|
||||
|
||||
Properties.Settings.Default.QUturnedon = false;
|
||||
MessageBox.Show("Ok, Deleted your custom settings file.\nIf you would like to re-enable return here and apply settings again");
|
||||
File.Delete($"{Properties.Settings.Default.MainDir}\\Config.Json");
|
||||
File.Delete($"{Environment.CurrentDirectory}\\Config.Json");
|
||||
File.Delete($"{Environment.CurrentDirectory}\\delete_settings");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -146,7 +148,7 @@ namespace AndroidSideloader
|
||||
MessageBox.Show("OK, any -QU packages installed will have these settings applied!\nTo delete settings: goto main app window, select a game with top menu, and click \"Remove QU Setting\"");
|
||||
if (QUon.Checked)
|
||||
{
|
||||
|
||||
Properties.Settings.Default.QUturnedon = true;
|
||||
Random r = new Random();
|
||||
|
||||
int x = r.Next(999999999);
|
||||
@@ -170,6 +172,10 @@ namespace AndroidSideloader
|
||||
string boff = Properties.Settings.Default.QUStringF + Properties.Settings.Default.QUString;
|
||||
File.WriteAllText($"{Properties.Settings.Default.MainDir}\\config.json", boff);
|
||||
}
|
||||
else
|
||||
{
|
||||
Properties.Settings.Default.QUturnedon = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
6801
Resources/nouns.txt
Normal file
6801
Resources/nouns.txt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,7 @@ namespace AndroidSideloader
|
||||
private static string RawGitHubUrl;
|
||||
private static string GitHubUrl;
|
||||
|
||||
static readonly public string LocalVersion = "2.4HF";
|
||||
static readonly public string LocalVersion = "2.4.2";
|
||||
public static string currentVersion = string.Empty;
|
||||
public static string changelog = string.Empty;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace AndroidSideloader
|
||||
string newline = "\n";
|
||||
if (text.Length > 40 && text.Contains("\n"))
|
||||
newline += "\n\n";
|
||||
try { File.AppendAllText(Properties.Settings.Default.CurrentLogPath, time + text + newline); } catch { }
|
||||
try {File.AppendAllText(Properties.Settings.Default.CurrentLogPath, time + text + newline); } catch { }
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user