diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2018-04-10 14:07:25 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2018-04-10 14:07:25 +0300 |
commit | d317dcc9a673c6928ca61efc8e34fe2618b90215 (patch) | |
tree | 4169c0ff17e2bca09fd2c0278d2525d7be19edde | |
parent | f7598533f7629330cb0c8a3e85da02e590badfc0 (diff) |
Some fixes
-rw-r--r-- | Clovershell/ClovershellConnection.cs | 5 | ||||
-rw-r--r-- | MainForm.cs | 2 | ||||
-rw-r--r-- | Program.cs | 6 | ||||
-rw-r--r-- | Properties/AssemblyInfo.cs | 4 | ||||
-rw-r--r-- | WorkerForm.cs | 4 | ||||
-rw-r--r-- | hakchi_gui.csproj | 25 |
6 files changed, 22 insertions, 24 deletions
diff --git a/Clovershell/ClovershellConnection.cs b/Clovershell/ClovershellConnection.cs index ec136b95..aafe3a37 100644 --- a/Clovershell/ClovershellConnection.cs +++ b/Clovershell/ClovershellConnection.cs @@ -636,7 +636,10 @@ namespace com.clusterrr.clovershell var stdOut = new MemoryStream();
Execute(command, null, stdOut, null, timeout, throwOnNonZero);
var buff = stdOut.ToArray();
- return Encoding.UTF8.GetString(buff).Trim();
+#if VERY_DEBUG
+ Debug.WriteLine($"Output for {command}: {Encoding.UTF8.GetString(buff)}");
+#endif
+ return Encoding.UTF8.GetString(buff).Trim(new char[] { ' ', '\t', '\r', '\n' });
}
public int Execute(string command, Stream stdin = null, Stream stdout = null, Stream stderr = null, int timeout = 0, bool throwOnNonZero = false)
diff --git a/MainForm.cs b/MainForm.cs index 0ebe2275..65eb5503 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -1158,7 +1158,7 @@ namespace com.clusterrr.hakchi_gui {
if (Uninstall())
{
- if (ConfigIni.CustomFlashed && MessageBox.Show(Resources.UninstallQ2, Resources.AreYouSure, MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
+ if (/*ConfigIni.CustomFlashed &&*/ MessageBox.Show(Resources.UninstallQ2, Resources.AreYouSure, MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
== System.Windows.Forms.DialogResult.Yes)
{
if (FlashOriginalKernel())
@@ -79,7 +79,6 @@ namespace com.clusterrr.hakchi_gui if (createdNew)
{
BaseDirectoryInternal = Path.GetDirectoryName(Application.ExecutablePath);
-#if CLICKONCE
if (ApplicationDeployment.IsNetworkDeployed)
{
// This is not correct way for Windows 7+...
@@ -97,7 +96,6 @@ namespace com.clusterrr.hakchi_gui }
}
else
-#endif
BaseDirectoryExternal = BaseDirectoryInternal;
Debug.WriteLine("Base directory: " + BaseDirectoryExternal);
ConfigIni.Load();
@@ -110,7 +108,6 @@ namespace com.clusterrr.hakchi_gui // There are some folders which should be accessed by user
// Moving them to "My documents"
-#if CLICKONCE
if (ApplicationDeployment.IsNetworkDeployed && ApplicationDeployment.CurrentDeployment.IsFirstRun)
{
var externalDirs = new string[]
@@ -120,7 +117,6 @@ namespace com.clusterrr.hakchi_gui foreach (var dir in externalDirs)
DirectoryCopy(Path.Combine(BaseDirectoryInternal, dir), Path.Combine(BaseDirectoryExternal, dir), true);
}
-#endif
string languagesDirectory = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "languages");
const string langFileNames = "hakchi.resources.dll";
@@ -132,7 +128,6 @@ namespace com.clusterrr.hakchi_gui {
var dir = Path.GetDirectoryName(d);
Debug.WriteLine("Removing old directory: " + dir);
-#if CLICKONCE
if (ApplicationDeployment.IsNetworkDeployed)
{
var targetDir = Path.Combine(languagesDirectory, Path.GetFileName(dir));
@@ -143,7 +138,6 @@ namespace com.clusterrr.hakchi_gui File.Move(Path.Combine(dir, langFileNames), targetFile);
}
else
-#endif
Directory.Delete(dir, true);
}
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 1fa29091..aa71f7de 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -33,6 +33,6 @@ using System.Resources; // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.30.16")]
-[assembly: AssemblyFileVersion("2.0.30.16")]
+[assembly: AssemblyVersion("2.0.30.18")]
+[assembly: AssemblyFileVersion("2.0.30.18")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
diff --git a/WorkerForm.cs b/WorkerForm.cs index 8b80a3d2..d55d0368 100644 --- a/WorkerForm.cs +++ b/WorkerForm.cs @@ -814,10 +814,10 @@ namespace com.clusterrr.hakchi_gui var storageDevice = clovershell.ExecuteSimple($"df {gameSyncStorage} | sed -n '2p' | awk '{{print $1}}'", 3000, true);
var storageStats = clovershell.ExecuteSimple($"df {storageDevice} | tail -n 1 | awk '{{ print $2 \" | \" $3 \" | \" $4 }}'", 3000, true).Split('|');
- ExternalSaves = clovershell.ExecuteSimple("mount | grep /var/lib/clover").Trim().Length > 0;
+ ExternalSaves = clovershell.ExecuteSimple("mount | grep /var/lib/clover").Length > 0;
var writedGamesSizeAll = long.Parse(clovershell.ExecuteSimple($"mkdir -p {rootFsPath}{originalGamesPath} && du -s {rootFsPath}{originalGamesPath} | awk '{{ print $1 }}'", 3000, true)) * 1024;
if (gameSyncStorage != $"{rootFsPath}{originalGamesPath}")
- writedGamesSizeAll += long.Parse(clovershell.ExecuteSimple($"mkdir -p {gameSyncStorage}/{SubConsoleDirectory}/ && du -s {gameSyncStorage}/{SubConsoleDirectory}/ | awk '{{ print $1 }}'", 3000, true)) * 1024;
+ writedGamesSizeAll += long.Parse(clovershell.ExecuteSimple($"mkdir -p {gameSyncStorage}/{SubConsoleDirectory} && du -s {gameSyncStorage}/{SubConsoleDirectory} | awk '{{ print $1 }}'", 3000, true)) * 1024;
WritedGamesSize = writedGamesSizeAll;
SaveStatesSize = long.Parse(clovershell.ExecuteSimple("mkdir -p /var/lib/clover/profiles/0/ && du -s /var/lib/clover/profiles/0/ | awk '{ print $1 }'", 3000, true)) * 1024;
NandCTotal = long.Parse(storageStats[0]) * 1024;
diff --git a/hakchi_gui.csproj b/hakchi_gui.csproj index 0abcb1e8..10c1ba0c 100644 --- a/hakchi_gui.csproj +++ b/hakchi_gui.csproj @@ -31,8 +31,8 @@ <PublisherName>Alexey %27Cluster%27 Avdyukhin</PublisherName>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>index.html</WebPage>
- <ApplicationRevision>16</ApplicationRevision>
- <ApplicationVersion>2.0.30.16</ApplicationVersion>
+ <ApplicationRevision>18</ApplicationRevision>
+ <ApplicationVersion>2.0.30.18</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
@@ -99,11 +99,12 @@ <PropertyGroup>
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release ClickOnce|AnyCPU'">
- <OutputPath>bin\Release ClickOnce\</OutputPath>
- <DefineConstants>TRACE;LIBUSBDOTNET WINDOWS_TESTING CLICKONCE</DefineConstants>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug Extra|AnyCPU'">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\Debug Extra\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;LIBUSBDOTNET WINDOWS_TESTING VERY_DEBUG</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Optimize>true</Optimize>
+ <DebugType>Full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
@@ -2921,32 +2922,32 @@ <ItemGroup>
<PublishFile Include="data\GameGenieDB.xml">
<Visible>False</Visible>
- <PublishState>Include</PublishState>
- <IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
+ <PublishState>Include</PublishState>
+ <IncludeHash>True</IncludeHash>
<FileType>File</FileType>
</PublishFile>
<PublishFile Include="data\nescarts.xml">
<Visible>False</Visible>
- <PublishState>Include</PublishState>
- <IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
+ <PublishState>Include</PublishState>
+ <IncludeHash>True</IncludeHash>
<FileType>File</FileType>
</PublishFile>
<PublishFile Include="data\snescarts.xml">
<Visible>False</Visible>
- <PublishState>Include</PublishState>
- <IncludeHash>True</IncludeHash>
<Group>
</Group>
<TargetPath>
</TargetPath>
+ <PublishState>Include</PublishState>
+ <IncludeHash>True</IncludeHash>
<FileType>File</FileType>
</PublishFile>
</ItemGroup>
|