From bab8c63bb50f378670648993eaf79eeaeb894356 Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Mon, 3 Oct 2016 03:31:57 +0700 Subject: [PATCH] remove swf version check. add projects to common solution --- Assembly-CSharp-Editor.csproj | 3 + FTSources/FTSources.sln | 184 ++++++++++++++++++ FTSources/FTSources.userprefs | 2 +- .../Sources/SwfTypes/SwfShortHeader.cs | 18 +- FTSources/SwfTools/SwfTools.csproj | 31 ++- unityflash.userprefs | 6 +- 6 files changed, 212 insertions(+), 32 deletions(-) diff --git a/Assembly-CSharp-Editor.csproj b/Assembly-CSharp-Editor.csproj index 492576e..b4ee70e 100644 --- a/Assembly-CSharp-Editor.csproj +++ b/Assembly-CSharp-Editor.csproj @@ -109,6 +109,9 @@ /Applications/Unity/PlaybackEngines/MacStandaloneSupport/UnityEditor.OSXStandalone.Extensions.dll + + /Users/matov/Programming/Projects/unityflash/Assets/FlashTools/Plugins/Editor/SwfTools_Debug.dll + /Applications/Unity/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Xcode.dll diff --git a/FTSources/FTSources.sln b/FTSources/FTSources.sln index f822b9e..7f45aa7 100644 --- a/FTSources/FTSources.sln +++ b/FTSources/FTSources.sln @@ -3,6 +3,10 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SwfTools", "SwfTools\SwfTools.csproj", "{4EB8756F-398B-4356-90FB-0ED056B3E6E9}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "..\Assembly-CSharp.csproj", "{ED48043C-7BE9-40F3-EC3C-3D4369E54740}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor", "..\Assembly-CSharp-Editor.csproj", "{7FF03E09-4B14-EFF9-4F08-36E102F327D3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 @@ -13,5 +17,185 @@ Global {4EB8756F-398B-4356-90FB-0ED056B3E6E9}.Debug|x86.Build.0 = Debug|x86 {4EB8756F-398B-4356-90FB-0ED056B3E6E9}.Release|x86.ActiveCfg = Release|x86 {4EB8756F-398B-4356-90FB-0ED056B3E6E9}.Release|x86.Build.0 = Release|x86 + {7FF03E09-4B14-EFF9-4F08-36E102F327D3}.Debug|x86.ActiveCfg = Debug|Any CPU + {7FF03E09-4B14-EFF9-4F08-36E102F327D3}.Debug|x86.Build.0 = Debug|Any CPU + {7FF03E09-4B14-EFF9-4F08-36E102F327D3}.Release|x86.ActiveCfg = Release|Any CPU + {7FF03E09-4B14-EFF9-4F08-36E102F327D3}.Release|x86.Build.0 = Release|Any CPU + {ED48043C-7BE9-40F3-EC3C-3D4369E54740}.Debug|x86.ActiveCfg = Debug|Any CPU + {ED48043C-7BE9-40F3-EC3C-3D4369E54740}.Debug|x86.Build.0 = Debug|Any CPU + {ED48043C-7BE9-40F3-EC3C-3D4369E54740}.Release|x86.ActiveCfg = Release|Any CPU + {ED48043C-7BE9-40F3-EC3C-3D4369E54740}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + Policies = $0 + $0.DotNetNamingPolicy = $1 + $1.DirectoryNamespaceAssociation = None + $1.ResourceNamePolicy = FileFormatDefault + $0.TextStylePolicy = $2 + $2.inheritsSet = null + $2.scope = text/x-csharp + $0.CSharpFormattingPolicy = $3 + $3.NamespaceBraceStyle = EndOfLine + $3.ClassBraceStyle = EndOfLine + $3.InterfaceBraceStyle = EndOfLine + $3.StructBraceStyle = EndOfLine + $3.EnumBraceStyle = EndOfLine + $3.MethodBraceStyle = EndOfLine + $3.ConstructorBraceStyle = EndOfLine + $3.DestructorBraceStyle = EndOfLine + $3.BeforeMethodDeclarationParentheses = False + $3.BeforeMethodCallParentheses = False + $3.BeforeConstructorDeclarationParentheses = False + $3.BeforeIndexerDeclarationBracket = False + $3.BeforeDelegateDeclarationParentheses = False + $3.AfterDelegateDeclarationParameterComma = True + $3.NewParentheses = False + $3.WithinIfParentheses = True + $3.WithinWhileParentheses = True + $3.WithinForParentheses = True + $3.WithinForEachParentheses = True + $3.WithinCatchParentheses = True + $3.WithinSwitchParentheses = True + $3.WithinLockParentheses = True + $3.WithinUsingParentheses = True + $3.SpacesBeforeBrackets = False + $3.inheritsSet = Mono + $3.inheritsScope = text/x-csharp + $3.scope = text/x-csharp + $0.TextStylePolicy = $4 + $4.FileWidth = 120 + $4.TabsToSpaces = False + $4.inheritsSet = VisualStudio + $4.inheritsScope = text/plain + $4.scope = text/plain + $0.StandardHeader = $5 + $5.Text = + $5.IncludeInNewFiles = True + $0.NameConventionPolicy = $6 + $6.Rules = $7 + $7.NamingRule = $8 + $8.Name = Namespaces + $8.AffectedEntity = Namespace + $8.VisibilityMask = VisibilityMask + $8.NamingStyle = PascalCase + $8.IncludeInstanceMembers = True + $8.IncludeStaticEntities = True + $7.NamingRule = $9 + $9.Name = Types + $9.AffectedEntity = Class, Struct, Enum, Delegate + $9.VisibilityMask = Public + $9.NamingStyle = PascalCase + $9.IncludeInstanceMembers = True + $9.IncludeStaticEntities = True + $7.NamingRule = $10 + $10.Name = Interfaces + $10.RequiredPrefixes = $11 + $11.String = I + $10.AffectedEntity = Interface + $10.VisibilityMask = Public + $10.NamingStyle = PascalCase + $10.IncludeInstanceMembers = True + $10.IncludeStaticEntities = True + $7.NamingRule = $12 + $12.Name = Attributes + $12.RequiredSuffixes = $13 + $13.String = Attribute + $12.AffectedEntity = CustomAttributes + $12.VisibilityMask = Public + $12.NamingStyle = PascalCase + $12.IncludeInstanceMembers = True + $12.IncludeStaticEntities = True + $7.NamingRule = $14 + $14.Name = Event Arguments + $14.RequiredSuffixes = $15 + $15.String = EventArgs + $14.AffectedEntity = CustomEventArgs + $14.VisibilityMask = Public + $14.NamingStyle = PascalCase + $14.IncludeInstanceMembers = True + $14.IncludeStaticEntities = True + $7.NamingRule = $16 + $16.Name = Exceptions + $16.RequiredSuffixes = $17 + $17.String = Exception + $16.AffectedEntity = CustomExceptions + $16.VisibilityMask = VisibilityMask + $16.NamingStyle = PascalCase + $16.IncludeInstanceMembers = True + $16.IncludeStaticEntities = True + $7.NamingRule = $18 + $18.Name = Methods + $18.AffectedEntity = Methods + $18.VisibilityMask = Protected, Public + $18.NamingStyle = PascalCase + $18.IncludeInstanceMembers = True + $18.IncludeStaticEntities = True + $7.NamingRule = $19 + $19.Name = Static Readonly Fields + $19.AffectedEntity = ReadonlyField + $19.VisibilityMask = Protected, Public + $19.NamingStyle = PascalCase + $19.IncludeInstanceMembers = False + $19.IncludeStaticEntities = True + $7.NamingRule = $20 + $20.Name = Fields + $20.AffectedEntity = Field + $20.VisibilityMask = Protected, Public + $20.NamingStyle = PascalCase + $20.IncludeInstanceMembers = True + $20.IncludeStaticEntities = True + $7.NamingRule = $21 + $21.Name = ReadOnly Fields + $21.AffectedEntity = ReadonlyField + $21.VisibilityMask = Protected, Public + $21.NamingStyle = PascalCase + $21.IncludeInstanceMembers = True + $21.IncludeStaticEntities = False + $7.NamingRule = $22 + $22.Name = Constant Fields + $22.AffectedEntity = ConstantField + $22.VisibilityMask = Protected, Public + $22.NamingStyle = PascalCase + $22.IncludeInstanceMembers = True + $22.IncludeStaticEntities = True + $7.NamingRule = $23 + $23.Name = Properties + $23.AffectedEntity = Property + $23.VisibilityMask = Protected, Public + $23.NamingStyle = PascalCase + $23.IncludeInstanceMembers = True + $23.IncludeStaticEntities = True + $7.NamingRule = $24 + $24.Name = Events + $24.AffectedEntity = Event + $24.VisibilityMask = Protected, Public + $24.NamingStyle = PascalCase + $24.IncludeInstanceMembers = True + $24.IncludeStaticEntities = True + $7.NamingRule = $25 + $25.Name = Enum Members + $25.AffectedEntity = EnumMember + $25.VisibilityMask = VisibilityMask + $25.NamingStyle = PascalCase + $25.IncludeInstanceMembers = True + $25.IncludeStaticEntities = True + $7.NamingRule = $26 + $26.Name = Parameters + $26.AffectedEntity = Parameter + $26.VisibilityMask = VisibilityMask + $26.NamingStyle = CamelCase + $26.IncludeInstanceMembers = True + $26.IncludeStaticEntities = True + $7.NamingRule = $27 + $27.Name = Type Parameters + $27.RequiredPrefixes = $28 + $28.String = T + $27.AffectedEntity = TypeParameter + $27.VisibilityMask = VisibilityMask + $27.NamingStyle = PascalCase + $27.IncludeInstanceMembers = True + $27.IncludeStaticEntities = True + version = 0.5 + outputpath = ..\Assets\FlashTools\Plugins EndGlobalSection EndGlobal diff --git a/FTSources/FTSources.userprefs b/FTSources/FTSources.userprefs index 69bc906..4a3bfd5 100644 --- a/FTSources/FTSources.userprefs +++ b/FTSources/FTSources.userprefs @@ -1,5 +1,5 @@  - + diff --git a/FTSources/SwfTools/Sources/SwfTypes/SwfShortHeader.cs b/FTSources/SwfTools/Sources/SwfTypes/SwfShortHeader.cs index 9f630bf..645cd75 100644 --- a/FTSources/SwfTools/Sources/SwfTypes/SwfShortHeader.cs +++ b/FTSources/SwfTools/Sources/SwfTypes/SwfShortHeader.cs @@ -7,14 +7,13 @@ namespace SwfTools.SwfTypes { public uint FileLength; public static SwfShortHeader Read(SwfStreamReader reader) { - return CheckHeader(new SwfShortHeader{ + return new SwfShortHeader{ Format = new string(reader.ReadChars(3)), Version = reader.ReadByte(), - FileLength = reader.ReadUInt32()}); + FileLength = reader.ReadUInt32()}; } public static void Write(SwfShortHeader header, Stream stream) { - CheckHeader(header); stream.WriteByte((byte)header.Format[0]); stream.WriteByte((byte)header.Format[1]); stream.WriteByte((byte)header.Format[2]); @@ -31,18 +30,5 @@ namespace SwfTools.SwfTypes { "Format: {0}, Version: {1}, FileLength: {2}", Format, Version, FileLength); } - - static SwfShortHeader CheckHeader(SwfShortHeader header) { - if ( string.IsNullOrEmpty(header.Format) || (header.Format != "FWS" && header.Format != "CWS") ) { - throw new System.Exception(string.Format( - "Incorrect swf header format: {0}", - header.Format)); - } else if ( header.Version != 28 ) { - throw new System.Exception(string.Format( - "Incorrect swf header version: {0}", - header.Version)); - } - return header; - } } } \ No newline at end of file diff --git a/FTSources/SwfTools/SwfTools.csproj b/FTSources/SwfTools/SwfTools.csproj index a1e53ef..fcf07ed 100644 --- a/FTSources/SwfTools/SwfTools.csproj +++ b/FTSources/SwfTools/SwfTools.csproj @@ -6,36 +6,33 @@ {4EB8756F-398B-4356-90FB-0ED056B3E6E9} Library FlashTools - SwfTools v3.5 + 0.5 true full false - ..\..\Assets\FlashTools\Plugins\Editor\Debug + ..\..\Assets\FlashTools\Plugins\Editor DEBUG; prompt 4 false x86 + true + SwfTools_Debug true - ..\..\Assets\FlashTools\Plugins\Editor\Release + ..\..\Assets\FlashTools\Plugins\Editor prompt 4 false x86 + true + SwfTools_Release - - - - ..\..\Assets\FlashTools\Plugins\Editor\Ionic.Zip.Unity.dll - False - - @@ -89,4 +86,18 @@ + + + ..\..\..\..\..\..\..\Applications\Unity\Unity.app\Contents\Frameworks\Mono\lib\mono\unity\mscorlib.dll + False + + + ..\..\Assets\FlashTools\Plugins\Editor\Ionic.Zip.Unity.dll + False + + + ..\..\..\..\..\..\..\Applications\Unity\Unity.app\Contents\Frameworks\Mono\lib\mono\unity\System.dll + False + + \ No newline at end of file diff --git a/unityflash.userprefs b/unityflash.userprefs index 46249eb..cd99120 100644 --- a/unityflash.userprefs +++ b/unityflash.userprefs @@ -2,11 +2,7 @@ - - - - - +