TransmitMii 1.3

This commit is contained in:
Leathl 2010-04-18 19:12:08 +00:00
parent f48b9dd247
commit 817be367e8
11 changed files with 49 additions and 53 deletions

View File

@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C# Express 2008
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TransmitMii", "TransmitMii\TransmitMii.csproj", "{70517550-06FA-4743-B5D7-2CB7C153E35E}"
EndProject
Global

Binary file not shown.

View File

@ -49,5 +49,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyVersion("1.3.0.0")]
[assembly: AssemblyFileVersion("1.3.0.0")]

View File

@ -1,27 +1,10 @@
/* This file is part of TransmitMii
* Copyright (C) 2009 Leathl
*
* TransmitMii is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* TransmitMii is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:2.0.50727.4927
// This code was generated by a tool.
// Runtime Version:4.0.30128.1
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@ -30,13 +13,13 @@ namespace TransmitMii.Properties {
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@ -50,7 +33,7 @@ namespace TransmitMii.Properties {
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
@ -64,8 +47,8 @@ namespace TransmitMii.Properties {
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {

View File

@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:2.0.50727.4927
// This code was generated by a tool.
// Runtime Version:4.0.30128.1
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@ -12,7 +12,7 @@ namespace TransmitMii.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

View File

@ -9,6 +9,9 @@ TransmitMii is hosted on the CustomizeMii project page: http://customizemii.goog
-----------------------------------------------------------------------------------------
Changelog:
Version 1.3
- Fixed sending zip files
Version 1.2
- Improvement in startup speed (thanks shadow1643)
- Added ability to send ZIPs (to HBC)

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -12,8 +12,6 @@
<AssemblyName>TransmitMii</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkSubset>
</TargetFrameworkSubset>
<ApplicationIcon>Resources\TransmitMii Icon.ico</ApplicationIcon>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
@ -30,6 +28,10 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -41,6 +43,7 @@
<WarningLevel>4</WarningLevel>
<DocumentationFile>
</DocumentationFile>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -51,6 +54,7 @@
<WarningLevel>4</WarningLevel>
<DocumentationFile>
</DocumentationFile>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
@ -59,6 +63,7 @@
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\x86\Release\</OutputPath>
@ -67,6 +72,7 @@
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

View File

@ -1,4 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory>

View File

@ -27,7 +27,7 @@ namespace TransmitMii
{
public partial class TransmitMii_Main : Form
{
const string version = "1.2"; //Hint for myself: Never use a char in the Version (UpdateCheck)!
const string version = "1.3"; //Hint for myself: Never use a char in the Version (UpdateCheck)!
private bool IsRunning = false;
private string fileName;
private string statusText;
@ -182,7 +182,7 @@ namespace TransmitMii
bwTransmit.CancelAsync();
try { theStream.Close(); ; }
try { theStream.Close(); }
catch { }
try { theClient.Close(); }
catch { }

View File

@ -65,8 +65,9 @@ namespace TransmitMii
theClient = new TcpClient();
byte[] compFileData;
int Blocksize = 4 * 1024;
if (protocol != Protocol.JODI) Blocksize = 16 * 1024;
//int Blocksize = 4 * 1024;
int Blocksize = 64 * 1024; //Had problems with smaller values and bigger files...
if (protocol == Protocol.HAXX) Blocksize = 16 * 1024;
byte[] buffer = new byte[4];
string theIP = tbIP.Text;
@ -85,7 +86,7 @@ namespace TransmitMii
StatusUpdate("Magic Sent... Sending Version Info...");
buffer[0] = 0;
buffer[1] = protocol == Protocol.JODI ? (byte)5 : (byte)4;
buffer[1] = protocol != Protocol.HAXX ? (byte)5 : (byte)4;
buffer[2] = (byte)(((fileName.Length + 2) >> 8) & 0xff);
buffer[3] = (byte)((fileName.Length + 2) & 0xff);
@ -95,11 +96,11 @@ namespace TransmitMii
if (compress)
{
StatusUpdate("Version Info Sent... Compressing File...");
try { compFileData = zlib.Compress(fileData); }
try { byte[] temp = zlib.Compress(fileData); compFileData = temp; }
catch
{
//Compression failed, let's continue without compression
if (!Aborted) ErrorBox("a");
compress = false;
compFileData = fileData;
fileData = new byte[0];
}
@ -122,7 +123,7 @@ namespace TransmitMii
try { theStream.Write(buffer, 0, 4); }
catch (Exception ex) { if (!Aborted) ErrorBox("Error sending Filesize:\n" + ex.Message); theStream.Close(); theClient.Close(); return false; }
if (compress)
if (protocol != Protocol.HAXX)
{
buffer[0] = (byte)((fileData.Length >> 24) & 0xff);
buffer[1] = (byte)((fileData.Length >> 16) & 0xff);
@ -152,6 +153,8 @@ namespace TransmitMii
{
theStream.Write(compFileData, off, compFileData.Length - off);
}
//theStream.Write(compFileData, 0, compFileData.Length);
}
catch (Exception ex) { if (!Aborted) ErrorBox("Error sending File:\n" + ex.Message); theStream.Close(); theClient.Close(); return false; }

View File

@ -47,7 +47,7 @@ namespace TransmitMii
err = compress2(outFile, ref outLength, inFile, inFile.Length, 6);
if (err == ZLibError.Z_OK && outLength > -1)
if (err == ZLibError.Z_OK && (outLength > -1 && outLength < inFile.Length))
{
Array.Resize(ref outFile, outLength);
return outFile;