Переглянути джерело

removed jurassic, version to 2.16.0

randoman 6 роки тому
батько
коміт
8837942335
22 змінених файлів з 303 додано та 172 видалено
  1. 3 1
      CHANGELOG.md
  2. 13 9
      README.md
  3. 1 1
      src/XUnity.AutoTranslator.Patcher/Patcher.cs
  4. 2 1
      src/XUnity.AutoTranslator.Plugin.BepIn/AutoTranslatorPlugin.cs
  5. 1 1
      src/XUnity.AutoTranslator.Plugin.BepIn/XUnity.AutoTranslator.Plugin.BepIn.csproj
  6. 43 14
      src/XUnity.AutoTranslator.Plugin.Core/AutoTranslationPlugin.cs
  7. 3 1
      src/XUnity.AutoTranslator.Plugin.Core/Configuration/Settings.cs
  8. 1 1
      src/XUnity.AutoTranslator.Plugin.Core/Constants/PluginData.cs
  9. 8 1
      src/XUnity.AutoTranslator.Plugin.Core/Extensions/HarmonyInstanceExtensions.cs
  10. 6 10
      src/XUnity.AutoTranslator.Plugin.Core/Extensions/ObjectExtensions.cs
  11. 109 24
      src/XUnity.AutoTranslator.Plugin.Core/Hooks/HooksSetup.cs
  12. 43 11
      src/XUnity.AutoTranslator.Plugin.Core/Hooks/IMGUIHooks.cs
  13. 16 17
      src/XUnity.AutoTranslator.Plugin.Core/Hooks/NGUIImageHooks.cs
  14. 38 27
      src/XUnity.AutoTranslator.Plugin.Core/Hooks/UGUIImageHooks.cs
  15. 12 40
      src/XUnity.AutoTranslator.Plugin.Core/Web/GoogleTranslateEndpoint.cs
  16. 0 1
      src/XUnity.AutoTranslator.Plugin.Core/Web/GoogleTranslateLegitimateEndpoint.cs
  17. 1 5
      src/XUnity.AutoTranslator.Plugin.Core/XUnity.AutoTranslator.Plugin.Core.csproj
  18. 1 1
      src/XUnity.AutoTranslator.Plugin.IPA/XUnity.AutoTranslator.Plugin.IPA.csproj
  19. 1 1
      src/XUnity.AutoTranslator.Plugin.UnityInjector/XUnity.AutoTranslator.Plugin.UnityInjector.csproj
  20. 0 1
      src/XUnity.AutoTranslator.Setup/Program.cs
  21. 0 3
      src/XUnity.AutoTranslator.Setup/Properties/Resources.resx
  22. 1 1
      src/XUnity.AutoTranslator.Setup/XUnity.AutoTranslator.Setup.csproj

+ 3 - 1
CHANGELOG.md

@@ -1,6 +1,8 @@
-### 3.0.0
+### 2.16.0
  * FEATURE - Support image dumping and loading (not automatic!). Disabled by default
  * BUG FIX - Fixed toggle translation which was broken in 2.15.4
+ * BUG FIX - Updated TKK retrieval logic
+ * MISC - Removed Jurassic dependency as it is no longer required
 
 ### 2.15.4
  * MISC - Added configuration option to apply 'UI resize behaviour' to all components regardless of them being translated: ForceUIResizing

+ 13 - 9
README.md

@@ -12,7 +12,7 @@
  * [Integrating with Auto Translator](#integrating-with-auto-translator)
 
 ## Notice
-The latest version (3.0.0) now also supports basic image loading/dumping. These are not automatically translated and the feature is disabled by default.
+The latest version (2.16.0+) now also supports basic image loading/dumping. These are not automatically translated and the feature is disabled by default.
 
 If you are going to make use of this feature, please make sure you read and understand the [Texture Translation](#texture-translation) section!
 
@@ -81,8 +81,9 @@ TextureDirectory=Translation\Texture ;Directory to dump textures to, and root of
 EnableTextureTranslation=False   ;Indicates whether the plugin will attempt to replace in-game images with those from the TextureDirectory directory
 EnableTextureDumping=False       ;Indicates whether the plugin will dump texture it is capapble of replacing to the TextureDirectory. Has significant performance impact
 EnableTextureToggling=False      ;Indicates whether or not toggle the translation with the ALT+T hotkey will also affect textures. Not guaranteed to work for all textures. Has significant performance impact
-EnableTextureScanOnSceneLoad=True ;Indicates whether or not the plugin should scan for textures on scene load. This enables the plugin to find and replace more texture
+EnableTextureScanOnSceneLoad=True ;Indicates whether or not the plugin should scan for textures on scene load. This enables the plugin to find and (possibly) replace more texture
 LoadUnmodifiedTextures=False     ;Indicates whether or not unmodified textures should be loaded. Modifications are determined based on the hash in the file name. Only enable this for debugging purposes as it is likely to cause oddities
+DeleteUnmodifiedTextures=False   ;Indicates whether or not unmodified texture files should be deleted. Useful for cleaninig up the TextureDirectory
 TextureHashGenerationStrategy=FromImageName ;Indicates how the mod identifies pictures through hashes. Can be ["FromImageName", "FromImageData", "FromImageNameThenData"]
 
 [Http]
@@ -198,7 +199,7 @@ The file structure should like like this
 Often other mods UI are implemented through IMGUI. As you can see above, this is disabled by default. By changing the "EnableIMGUI" value to "True", it will start translating IMGUI as well, which likely means that other mods UI will be translated.
 
 ## Texture Translation
-From version 3.0.0+ this mod provides basic capabilities to replace images. It is a feature that is disabled by default. There is no automatic translation of these images though.
+From version 2.16.0+ this mod provides basic capabilities to replace images. It is a feature that is disabled by default. There is no automatic translation of these images though.
 
 It is controlled by the following configuration:
 
@@ -210,6 +211,7 @@ EnableTextureDumping=False
 EnableTextureToggling=False
 EnableTextureScanOnSceneLoad=True
 LoadUnmodifiedTextures=False
+DeleteUnmodifiedTextures=False
 TextureHashGenerationStrategy=FromImageName
 ```
 
@@ -217,18 +219,20 @@ TextureHashGenerationStrategy=FromImageName
 
 `EnableTextureTranslation` enables texture translation. This basically means that textures will be loaded from the `TextureDirectory` and it's subsdirectories. These images will replace the in-game images used by the game.
 
-`EnableTextureDumping` enables texture dumping. This means that the mod will dump any images it has not already dumped to the `TextureDirectory`. **NEVER REDISTRIBUTE THIS MOD WITH THIS ENABLED.**
+`EnableTextureDumping` enables texture dumping. This means that the mod will dump any images it has not already dumped to the `TextureDirectory`. When dumping textures, it may also be worth enabling `EnableTextureScanOnSceneLoad` to more quickly find all textures that require translating. **NEVER REDISTRIBUTE THIS MOD WITH THIS ENABLED.**
 
 `EnableTextureScanOnSceneLoad` allows the plugin to scan for texture objects on the sceneLoad event. This enables the plugin to find more texture at a tiny performance cost. However, because of the way Unity works not all of these are guaranteed to be replacable. If you find an image that is dumped but cannot be translated, please report it. However, please recognize this mod is primarily intended for replacing UI textures, not textures for 3D meshes.
 
 `LoadUnmodifiedTextures` enables whether or not the plugin should load textures that has not been modified. This is only useful for debugging, and likely to cause various visual glitches, especially if `EnableTextureScanOnSceneLoad` is also enabled. **NEVER REDISTRIBUTE THIS MOD WITH THIS ENABLED.**
 
-`EnableTextureToggling` enables whether the ALT+T hotkey will also toggle textures. Also this by no means guaranteed to work, especially if `EnableTextureScanOnSceneLoad` is also enabled. **NEVER REDISTRIBUTE THIS MOD WITH THIS ENABLED.**
+`DeleteUnmodifiedTextures` enables whether or not the plugin should delete texture files that has not been modified. This is useful for cleaning up the `TextureDirectory` after image translation, such that no unmodified images are distributed. **NEVER REDISTRIBUTE THIS MOD WITH THIS ENABLED.**
+
+`EnableTextureToggling` enables whether the ALT+T hotkey will also toggle textures. This is by no means guaranteed to work, especially if `EnableTextureScanOnSceneLoad` is also enabled. **NEVER REDISTRIBUTE THIS MOD WITH THIS ENABLED.**
 
 `TextureHashGenerationStrategy` specifies how images are identified. When images are stored, the game will need some way of associating them with the image that it has to replace.
 This is done through a hash-value that is stored in square brackets in each image file name, like this: `file_name [0223B639-6E698E92].png`. This configuration specifies how these hash-values are generated:
  * `FromImageName` means that the hash is generated from the internal resource name that the game uses for the image, which may not exist for all images or even be unique. However, it is generally fairly reliable.
- * `FromImageData` means that the hash is generated from the data stored in the image, which is guaranteed to exist for all images. However, generating the hash comes at a performance cost.
+ * `FromImageData` means that the hash is generated from the data stored in the image, which is guaranteed to exist for all images. However, generating the hash comes at a performance cost, that will also be incurred by the end-users.
  * `FromImageNameThenData` means that it should use the name, if available, otherwise use the data.
 
 There's an important catch you need to be aware when dealing with these options and that is if ANY of these options exists: `EnableTextureDumping=True`, `EnableTextureToggling=True`, `TextureHashGenerationStrategy=FromImageData|FromImageNameThenData`, then the game will need to read the raw data from all images it finds in game in order to replace the image and this is an expensive operation.
@@ -240,12 +244,12 @@ If you redistribute this mod with translated images, it is recommended you delet
 You can also change the file name to whatever you desire, as long as you keep the hash appended to the end of the file name.
 
 If you take anything away from this section, it should be these two points:
- * **NEVER REDISTRIBUTE THIS MOD WITH `EnableTextureDumping=True`, `EnableTextureToggling=True` OR `LoadUnmodifiedTextures=True`**
- * **ONLY DISTRIBUTE THIS MOD WITH `TextureHashGenerationStrategy=FromImageData|FromImageNameThenData` ENABLED IF ABSOLUTELY REQUIRED BY THE GAME.**
+ * **NEVER REDISTRIBUTE THIS MOD WITH `EnableTextureDumping=True`, `EnableTextureToggling=True`, `LoadUnmodifiedTextures=True` OR `DeleteUnmodifiedTextures=True`**
+ * **ONLY REDISTRIBUTE THIS MOD WITH `TextureHashGenerationStrategy=FromImageData|FromImageNameThenData` ENABLED IF ABSOLUTELY REQUIRED BY THE GAME.**
 
 ### Technical details about Hash Generation in file names
 There are actually two hashes in the generated file name, separated by a dash (-):
- * The first hash is a SHA1 (only first 4 bytes) based on the `TextureHashGenerationStrategy` used. If `FromImageName` is specified, then it is based on the UTF8 representation.
+ * The first hash is a SHA1 (only first 4 bytes) based on the `TextureHashGenerationStrategy` used. If `FromImageName` is specified, then it is based on the UTF8 (without BOM) representation.
  * The second hash is a SHA1 (only first 4 bytes) based on the data in the image. This is used to determine whether or not the image has been modified, so images that has not been edited are not loaded. Unless `LoadUnmodifiedTextures` is specified.
 
 If `TextureHashGenerationStrategy=FromImageData` is specified, only a single hash will appear in each file name, as that single hash can be used both to identify the image and to determine whether or not it has been edited.

+ 1 - 1
src/XUnity.AutoTranslator.Patcher/Patcher.cs

@@ -29,7 +29,7 @@ namespace XUnity.AutoTranslator.Patcher
       {
          get
          {
-            return "3.0.0";
+            return "2.16.0";
          }
       }
 

+ 2 - 1
src/XUnity.AutoTranslator.Plugin.BepIn/AutoTranslatorPlugin.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.IO;
 using System.Linq;
 using System.Text;
+using BepInEx;
 using ExIni;
 using XUnity.AutoTranslator.Plugin.Core;
 using XUnity.AutoTranslator.Plugin.Core.Configuration;
@@ -21,7 +22,7 @@ namespace XUnity.AutoTranslator.Plugin.BepIn
       {
          _dataFolder = "BepInEx";
          _configPath = Path.Combine( _dataFolder, "AutoTranslatorConfig.ini" );
-         Logger.Current = new BepInLogger();
+         Core.Logger.Current = new BepInLogger();
       }
 
       public IniFile Preferences

+ 1 - 1
src/XUnity.AutoTranslator.Plugin.BepIn/XUnity.AutoTranslator.Plugin.BepIn.csproj

@@ -2,7 +2,7 @@
 
    <PropertyGroup>
       <TargetFramework>net35</TargetFramework>
-      <Version>3.0.0</Version>
+      <Version>2.16.0</Version>
    </PropertyGroup>
 
    <ItemGroup>

+ 43 - 14
src/XUnity.AutoTranslator.Plugin.Core/AutoTranslationPlugin.cs

@@ -148,7 +148,8 @@ namespace XUnity.AutoTranslator.Plugin.Core
 
          if( Settings.EnableConsole ) DebugConsole.Enable();
 
-         HooksSetup.InstallHooks();
+         HooksSetup.InstallTextHooks();
+         HooksSetup.InstallImageHooks();
 
          try
          {
@@ -288,7 +289,7 @@ namespace XUnity.AutoTranslator.Plugin.Core
          Logger.Current.Info( "SceneLoading..." );
          var startTime = Time.realtimeSinceStartup;
 
-         ManualHookForImages();
+         ManualHookForTextures();
 
          var endTime = Time.realtimeSinceStartup;
          Logger.Current.Info( $"SceneLoaded (took {Math.Round( endTime - startTime, 2 )} seconds)" );
@@ -357,15 +358,16 @@ namespace XUnity.AutoTranslator.Plugin.Core
             }
             else
             {
-               Logger.Current.Warn( $"Image not loaded (unknown key): {fullFileName}." );
+               Logger.Current.Warn( $"Image not loaded (unknown hash): {fullFileName}." );
                return;
             }
 
             var data = File.ReadAllBytes( fullFileName );
             var currentHash = HashHelper.Compute( data ).Substring( 0, 8 );
-
+            var isModified = StringComparer.InvariantCultureIgnoreCase.Compare( originalHash, currentHash ) != 0;
+            
             // only load images that someone has modified!
-            if( Settings.LoadUnmodifiedTextures || StringComparer.InvariantCultureIgnoreCase.Compare( originalHash, currentHash ) != 0 )
+            if( Settings.LoadUnmodifiedTextures || isModified )
             {
                RegisterTranslatedImage( key, data );
                Logger.Current.Debug( $"Image loaded: {fullFileName}." );
@@ -375,10 +377,23 @@ namespace XUnity.AutoTranslator.Plugin.Core
                RegisterUntranslatedImage( key );
                Logger.Current.Warn( $"Image not loaded (unmodified): {fullFileName}." );
             }
+
+            if( Settings.DeleteUnmodifiedTextures && !isModified )
+            {
+               try
+               {
+                  File.Delete( fullFileName );
+                  Logger.Current.Warn( $"Image deleted (unmodified): {fullFileName}." );
+               }
+               catch( Exception e )
+               {
+                  Logger.Current.Warn( e, $"An error occurred while trying to delete unmodified image: {fullFileName}." );
+               }
+            }
          }
          else
          {
-            Logger.Current.Warn( $"Image not loaded (no key): {fullFileName}." );
+            Logger.Current.Warn( $"Image not loaded (no hash): {fullFileName}." );
          }
       }
 
@@ -1315,11 +1330,11 @@ namespace XUnity.AutoTranslator.Plugin.Core
             text = text.TrimIfConfigured();
          }
 
-         //Logger.Current.Debug( ui.GetType().Name + ": " + text );
-
          // Ensure that we actually want to translate this text and its owning UI element. 
          if( !string.IsNullOrEmpty( text ) && IsTranslatable( text ) && ShouldTranslateTextComponent( ui, ignoreComponentState ) && !IsCurrentlySetting( info ) )
          {
+            //Logger.Current.Debug( "START: " + ui.GetType().Name + ": " + text );
+
             info?.Reset( originalText );
             var isSpammer = ui.IsSpammingComponent();
             var textKey = new TranslationKey( ui, text, isSpammer, context != null );
@@ -1567,6 +1582,8 @@ namespace XUnity.AutoTranslator.Plugin.Core
             yield return new WaitForSeconds( delay );
             var afterText = ui.GetText();
 
+            //Logger.Current.Debug( "WAITING: " + ui.GetType().Name + ": " + afterText );
+
             if( beforeText == afterText )
             {
                onTextStabilized( afterText );
@@ -1637,7 +1654,7 @@ namespace XUnity.AutoTranslator.Plugin.Core
          onContinue();
       }
 
-      public void Start()
+      public void Awake()
       {
          if( !_initialized )
          {
@@ -1655,6 +1672,18 @@ namespace XUnity.AutoTranslator.Plugin.Core
          }
       }
 
+      public void Start()
+      {
+         try
+         {
+            HooksSetup.InstallOverrideTextHooks();
+         }
+         catch( Exception e )
+         {
+            Logger.Current.Error( e, "An unexpected error occurred during plugin start." );
+         }
+      }
+
       public void Update()
       {
          try
@@ -2270,11 +2299,11 @@ namespace XUnity.AutoTranslator.Plugin.Core
 
       private void ManualHook()
       {
-         ManualHookForText();
-         ManualHookForImages();
+         ManualHookForComponents();
+         ManualHookForTextures();
       }
 
-      private void ManualHookForText()
+      private void ManualHookForComponents()
       {
          foreach( var root in GetAllRoots() )
          {
@@ -2282,7 +2311,7 @@ namespace XUnity.AutoTranslator.Plugin.Core
          }
       }
 
-      private void ManualHookForImages()
+      private void ManualHookForTextures()
       {
          if( Settings.EnableTextureScanOnSceneLoad && ( Settings.EnableTextureTranslation || Settings.EnableTextureDumping ) )
          {
@@ -2349,7 +2378,7 @@ namespace XUnity.AutoTranslator.Plugin.Core
                   Hook_TextChanged( component );
                }
 
-               if( Settings.EnableTextureTranslation )
+               if( Settings.EnableTextureTranslation || Settings.EnableTextureDumping )
                {
                   if( component.IsKnownImageType() )
                   {

+ 3 - 1
src/XUnity.AutoTranslator.Plugin.Core/Configuration/Settings.cs

@@ -85,6 +85,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Configuration
       public static bool EnableTextureToggling;
       public static bool EnableTextureScanOnSceneLoad;
       public static bool LoadUnmodifiedTextures;
+      public static bool DeleteUnmodifiedTextures;
       public static TextureHashGenerationStrategy TextureHashGenerationStrategy;
 
       public static bool CopyToClipboard;
@@ -144,8 +145,9 @@ namespace XUnity.AutoTranslator.Plugin.Core.Configuration
          EnableTextureTranslation = Config.Current.Preferences[ "Texture" ][ "EnableTextureTranslation" ].GetOrDefault( false );
          EnableTextureDumping = Config.Current.Preferences[ "Texture" ][ "EnableTextureDumping" ].GetOrDefault( false );
          EnableTextureToggling = Config.Current.Preferences[ "Texture" ][ "EnableTextureToggling" ].GetOrDefault( false );
-         EnableTextureScanOnSceneLoad = Config.Current.Preferences[ "Texture" ][ "EnableTextureScanOnSceneLoad" ].GetOrDefault( true );
+         EnableTextureScanOnSceneLoad = Config.Current.Preferences[ "Texture" ][ "EnableTextureScanOnSceneLoad" ].GetOrDefault( false );
          LoadUnmodifiedTextures = Config.Current.Preferences[ "Texture" ][ "LoadUnmodifiedTextures" ].GetOrDefault( false );
+         DeleteUnmodifiedTextures = Config.Current.Preferences[ "Texture" ][ "DeleteUnmodifiedTextures" ].GetOrDefault( false );
          TextureHashGenerationStrategy = Config.Current.Preferences[ "Texture" ][ "TextureHashGenerationStrategy" ].GetOrDefault( TextureHashGenerationStrategy.FromImageName );
 
          // special handling because of enum parsing

+ 1 - 1
src/XUnity.AutoTranslator.Plugin.Core/Constants/PluginData.cs

@@ -11,6 +11,6 @@ namespace XUnity.AutoTranslator.Plugin.Core.Constants
 
       public const string Name = "XUnity Auto Translator";
 
-      public const string Version = "3.0.0";
+      public const string Version = "2.16.0";
    }
 }

+ 8 - 1
src/XUnity.AutoTranslator.Plugin.Core/Extensions/HarmonyInstanceExtensions.cs

@@ -12,7 +12,14 @@ namespace XUnity.AutoTranslator.Plugin.Core.Extensions
       {
          foreach( var type in types )
          {
-            instance.PatchType( type );
+            try
+            {
+               instance.PatchType( type );
+            }
+            catch( Exception e )
+            {
+               Logger.Current.Warn( e, "An error occurred while patching a property/method on a class." );
+            }
          }
       }
 

+ 6 - 10
src/XUnity.AutoTranslator.Plugin.Core/Extensions/ObjectExtensions.cs

@@ -35,16 +35,12 @@ namespace XUnity.AutoTranslator.Plugin.Core.Extensions
       {
          var type = ui.GetType();
 
-         // Simplify this??
-
-         return ( Settings.EnableUGUI && ( ui is Material || ui is Image || ui is RawImage ) )
-            || ( Settings.EnableNGUI
-               && ( ( ClrTypes.UIWidget != null && type != ClrTypes.UILabel && ClrTypes.UIWidget.IsAssignableFrom( type ) )
-               || ( ClrTypes.UIAtlas != null && ClrTypes.UIAtlas.IsAssignableFrom( type ) )
-               || ( ClrTypes.UITexture != null && ClrTypes.UITexture.IsAssignableFrom( type ) )
-               //|| ( ClrTypes.UIFont != null && ClrTypes.UIFont.IsAssignableFrom( type ) )
-               || ( ClrTypes.UIPanel != null && ClrTypes.UIPanel.IsAssignableFrom( type ) ) )
-            );
+         return ( ui is Material || ui is Image || ui is RawImage )
+            || ( ClrTypes.UIWidget != null && type != ClrTypes.UILabel && ClrTypes.UIWidget.IsAssignableFrom( type ) )
+            || ( ClrTypes.UIAtlas != null && ClrTypes.UIAtlas.IsAssignableFrom( type ) )
+            || ( ClrTypes.UITexture != null && ClrTypes.UITexture.IsAssignableFrom( type ) )
+            //|| ( ClrTypes.UIFont != null && ClrTypes.UIFont.IsAssignableFrom( type ) )
+            || ( ClrTypes.UIPanel != null && ClrTypes.UIPanel.IsAssignableFrom( type ) );
       }
 
       public static bool SupportsStabilization( this object ui )

+ 109 - 24
src/XUnity.AutoTranslator.Plugin.Core/Hooks/HooksSetup.cs

@@ -19,20 +19,111 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
 
    public static class HooksSetup
    {
-      public static void InstallHooks()
+      private static HarmonyInstance _harmony;
+
+      static HooksSetup()
+      {
+         _harmony = HarmonyInstance.Create( "gravydevsupreme.xunity.autotranslator" );
+      }
+
+      public static void InstallOverrideTextHooks()
+      {
+         if( Settings.EnableUGUI || Settings.EnableUtage )
+         {
+            UGUIHooks.HooksOverriden = SetupHook( KnownEvents.OnUnableToTranslateUGUI, AutoTranslationPlugin.Current.ExternalHook_TextChanged_WithResult );
+         }
+         if( Settings.EnableTextMeshPro )
+         {
+            TextMeshProHooks.HooksOverriden = SetupHook( KnownEvents.OnUnableToTranslateTextMeshPro, AutoTranslationPlugin.Current.ExternalHook_TextChanged_WithResult );
+         }
+         if( Settings.EnableNGUI )
+         {
+            NGUIHooks.HooksOverriden = SetupHook( KnownEvents.OnUnableToTranslateNGUI, AutoTranslationPlugin.Current.ExternalHook_TextChanged_WithResult );
+         }
+         if( Settings.EnableIMGUI )
+         {
+            IMGUIHooks.HooksOverriden = SetupHook( KnownEvents.OnUnableToTranslateIMGUI, AutoTranslationPlugin.Current.ExternalHook_TextChanged_WithResult );
+         }
+      }
+
+      public static void InstallImageHooks()
+      {
+         try
+         {
+            if( Settings.EnableTextureTranslation || Settings.EnableTextureDumping )
+            {
+               _harmony.PatchAll( UGUIImageHooks.All );
+            }
+         }
+         catch( Exception e )
+         {
+            Logger.Current.Error( e, "An error occurred while setting up image hooks for UnityEngine." );
+         }
+
+         try
+         {
+            if( Settings.EnableTextureTranslation || Settings.EnableTextureDumping )
+            {
+               _harmony.PatchAll( NGUIImageHooks.All );
+            }
+         }
+         catch( Exception e )
+         {
+            Logger.Current.Error( e, "An error occurred while setting up image hooks for NGUI." );
+         }
+
+         //var knownTypes = new HashSet<Type> { typeof( Texture ), typeof( Texture2D ), typeof( Sprite ), typeof( Material ) };
+         //foreach( var assembly in AppDomain.CurrentDomain.GetAssemblies() )
+         //{
+         //   try
+         //   {
+         //      var types = assembly.GetTypes();
+         //      foreach( var type in types )
+         //      {
+         //         try
+         //         {
+         //            var properties = type.GetProperties( BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public );
+         //            foreach( var property in properties )
+         //            {
+         //               if( property.CanWrite && knownTypes.Contains( property.PropertyType ) )
+         //               {
+         //                  try
+         //                  {
+         //                     var original = property.GetSetMethod();
+         //                     var prefix = typeof( GenericPrefix_Hook ).GetMethod( "Prefix" );
+         //                     _harmony.Patch( original, new HarmonyMethod( prefix ), null, null );
+         //                     Logger.Current.Warn( "Patched: " + type.Name + "." + property.Name );
+         //                  }
+         //                  catch( Exception e )
+         //                  {
+         //                     Logger.Current.Error( "Failed patching: " + type.Name + "." + property.Name );
+         //                  }
+         //               }
+         //            }
+         //         }
+         //         catch( Exception e )
+         //         {
+         //            Logger.Current.Error( e, "Failed getting properties of type: " + type.Name );
+         //         }
+         //      }
+         //   }
+         //   catch( Exception )
+         //   {
+         //      Logger.Current.Error( "Failed getting types of assembly: " + assembly.FullName );
+         //   }
+         //}
+
+      }
+
+      public static void InstallTextHooks()
       {
-         var harmony = HarmonyInstance.Create( "gravydevsupreme.xunity.autotranslator" );
 
          try
          {
             if( Settings.EnableUGUI || Settings.EnableUtage )
             {
                UGUIHooks.HooksOverriden = SetupHook( KnownEvents.OnUnableToTranslateUGUI, AutoTranslationPlugin.Current.ExternalHook_TextChanged_WithResult );
-               harmony.PatchAll( UGUIHooks.All );
-               if( Settings.EnableTextureTranslation || Settings.EnableTextureDumping )
-               {
-                  harmony.PatchAll( UGUIImageHooks.All );
-               }
+               _harmony.PatchAll( UGUIHooks.All );
             }
          }
          catch( Exception e )
@@ -45,7 +136,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
             if( Settings.EnableTextMeshPro )
             {
                TextMeshProHooks.HooksOverriden = SetupHook( KnownEvents.OnUnableToTranslateTextMeshPro, AutoTranslationPlugin.Current.ExternalHook_TextChanged_WithResult );
-               harmony.PatchAll( TextMeshProHooks.All );
+               _harmony.PatchAll( TextMeshProHooks.All );
             }
          }
          catch( Exception e )
@@ -58,11 +149,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
             if( Settings.EnableNGUI )
             {
                NGUIHooks.HooksOverriden = SetupHook( KnownEvents.OnUnableToTranslateNGUI, AutoTranslationPlugin.Current.ExternalHook_TextChanged_WithResult );
-               harmony.PatchAll( NGUIHooks.All );
-               if( Settings.EnableTextureTranslation || Settings.EnableTextureDumping )
-               {
-                  harmony.PatchAll( NGUIImageHooks.All );
-               }
+               _harmony.PatchAll( NGUIHooks.All );
             }
          }
          catch( Exception e )
@@ -74,18 +161,16 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
          {
             if( Settings.EnableIMGUI )
             {
-               var success = SetupHook( KnownEvents.OnUnableToTranslateNGUI, AutoTranslationPlugin.Current.ExternalHook_TextChanged_WithResult );
-               if( !success )
-               {
-                  harmony.PatchAll( IMGUIHooks.All );
+               IMGUIHooks.HooksOverriden = SetupHook( KnownEvents.OnUnableToTranslateIMGUI, AutoTranslationPlugin.Current.ExternalHook_TextChanged_WithResult );
 
-                  // This wont work in "newer" unity versions!
-                  try
-                  {
-                     harmony.PatchType( typeof( DoButtonGridHook ) );
-                  }
-                  catch { }
+               _harmony.PatchAll( IMGUIHooks.All );
+
+               // This wont work in "newer" unity versions!
+               try
+               {
+                  _harmony.PatchType( typeof( DoButtonGridHook ) );
                }
+               catch { }
             }
          }
          catch( Exception e )
@@ -97,7 +182,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
          {
             if( Settings.EnableUtage )
             {
-               harmony.PatchAll( UtageHooks.All );
+               _harmony.PatchAll( UtageHooks.All );
             }
          }
          catch( Exception e )

+ 43 - 11
src/XUnity.AutoTranslator.Plugin.Core/Hooks/IMGUIHooks.cs

@@ -11,6 +11,8 @@ namespace XUnity.AutoTranslator.Plugin.Core.IMGUI
 {
    public static class IMGUIHooks
    {
+      public static bool HooksOverriden = false;
+
       public static readonly Type[] All = new[] {
          typeof( BeginGroupHook ),
          typeof( BoxHook ),
@@ -39,7 +41,10 @@ namespace XUnity.AutoTranslator.Plugin.Core.IMGUI
 
       static void Prefix( GUIContent content )
       {
-         AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         if( !IMGUIHooks.HooksOverriden )
+         {
+            AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         }
       }
    }
 
@@ -58,7 +63,10 @@ namespace XUnity.AutoTranslator.Plugin.Core.IMGUI
 
       static void Prefix( GUIContent content )
       {
-         AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         if( !IMGUIHooks.HooksOverriden )
+         {
+            AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         }
       }
 
    }
@@ -78,7 +86,10 @@ namespace XUnity.AutoTranslator.Plugin.Core.IMGUI
 
       static void Prefix( GUIContent content )
       {
-         AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         if( !IMGUIHooks.HooksOverriden )
+         {
+            AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         }
       }
    }
 
@@ -97,7 +108,10 @@ namespace XUnity.AutoTranslator.Plugin.Core.IMGUI
 
       static void Prefix( GUIContent content )
       {
-         AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         if( !IMGUIHooks.HooksOverriden )
+         {
+            AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         }
       }
    }
 
@@ -116,7 +130,10 @@ namespace XUnity.AutoTranslator.Plugin.Core.IMGUI
 
       static void Prefix( GUIContent content )
       {
-         AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         if( !IMGUIHooks.HooksOverriden )
+         {
+            AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         }
       }
    }
 
@@ -135,7 +152,10 @@ namespace XUnity.AutoTranslator.Plugin.Core.IMGUI
 
       static void Prefix( GUIContent content )
       {
-         AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         if( !IMGUIHooks.HooksOverriden )
+         {
+            AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         }
       }
    }
 
@@ -154,7 +174,10 @@ namespace XUnity.AutoTranslator.Plugin.Core.IMGUI
 
       static void Prefix( GUIContent title )
       {
-         AutoTranslationPlugin.Current.Hook_TextChanged( title );
+         if( !IMGUIHooks.HooksOverriden )
+         {
+            AutoTranslationPlugin.Current.Hook_TextChanged( title );
+         }
       }
    }
 
@@ -173,9 +196,12 @@ namespace XUnity.AutoTranslator.Plugin.Core.IMGUI
 
       static void Prefix( GUIContent[] contents )
       {
-         foreach( var content in contents )
+         if( !IMGUIHooks.HooksOverriden )
          {
-            AutoTranslationPlugin.Current.Hook_TextChanged( content );
+            foreach( var content in contents )
+            {
+               AutoTranslationPlugin.Current.Hook_TextChanged( content );
+            }
          }
       }
    }
@@ -195,7 +221,10 @@ namespace XUnity.AutoTranslator.Plugin.Core.IMGUI
 
       static void Prefix( GUIContent content )
       {
-         AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         if( !IMGUIHooks.HooksOverriden )
+         {
+            AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         }
       }
    }
 
@@ -214,7 +243,10 @@ namespace XUnity.AutoTranslator.Plugin.Core.IMGUI
 
       static void Prefix( GUIContent content )
       {
-         AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         if( !IMGUIHooks.HooksOverriden )
+         {
+            AutoTranslationPlugin.Current.Hook_TextChanged( content );
+         }
       }
    }
 }

+ 16 - 17
src/XUnity.AutoTranslator.Plugin.Core/Hooks/NGUIImageHooks.cs

@@ -11,7 +11,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
    public static class NGUIImageHooks
    {
       public static readonly Type[] All = new Type[] {
-         typeof( UIAtlas_texture_Hook ),
+         typeof( UIAtlas_spriteMaterial_Hook ),
          typeof( UISprite_OnInit_Hook ),
          typeof( UISprite_material_Hook ),
          typeof( UISprite_atlas_Hook ),
@@ -28,9 +28,8 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
       };
    }
 
-
    [Harmony]
-   public static class UIAtlas_texture_Hook
+   public static class UIAtlas_spriteMaterial_Hook
    {
       static bool Prepare( HarmonyInstance instance )
       {
@@ -42,9 +41,9 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
          return AccessTools.Property( ClrTypes.UIAtlas, "spriteMaterial" ).GetSetMethod();
       }
 
-      public static void Postfix( object __instance )
+      public static void Prefix( object __instance )
       {
-         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance );
+         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance, null, true );
       }
    }
    
@@ -80,9 +79,9 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
          return AccessTools.Property( ClrTypes.UISprite, "material" ).GetSetMethod();
       }
 
-      public static void Postfix( object __instance )
+      public static void Prefix( object __instance )
       {
-         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance );
+         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance, null, true );
       }
    }
 
@@ -99,9 +98,9 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
          return AccessTools.Property( ClrTypes.UISprite, "atlas" ).GetSetMethod();
       }
 
-      public static void Postfix( object __instance )
+      public static void Prefix( object __instance )
       {
-         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance );
+         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance, null, true );
       }
    }
    
@@ -118,9 +117,9 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
          return AccessTools.Property( ClrTypes.UITexture, "mainTexture" ).GetSetMethod();
       }
 
-      public static void Postfix( object __instance )
+      public static void Prefix( object __instance )
       {
-         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance );
+         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance, null, true );
       }
    }
 
@@ -137,9 +136,9 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
          return AccessTools.Property( ClrTypes.UITexture, "material" ).GetSetMethod();
       }
 
-      public static void Postfix( object __instance )
+      public static void Prefix( object __instance )
       {
-         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance );
+         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance, null, true );
       }
    }
 
@@ -175,9 +174,9 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
          return AccessTools.Property( ClrTypes.UI2DSprite, "sprite2D" ).GetSetMethod();
       }
 
-      public static void Postfix( object __instance )
+      public static void Prefix( object __instance )
       {
-         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance );
+         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance, null, true );
       }
    }
 
@@ -194,9 +193,9 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
          return AccessTools.Property( ClrTypes.UI2DSprite, "material" ).GetSetMethod();
       }
 
-      public static void Postfix( object __instance )
+      public static void Prefix( object __instance )
       {
-         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance );
+         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance, null, true );
       }
    }
 

+ 38 - 27
src/XUnity.AutoTranslator.Plugin.Core/Hooks/UGUIImageHooks.cs

@@ -18,32 +18,43 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
          typeof( RawImage_texture_Hook ),
          typeof( Cursor_SetCursor_Hook ),
 
-         //// fallback hooks on material (Prefix hooks)
-         //typeof( Material_mainTexture_Hook ),
+         // fallback hooks on material (Prefix hooks)
+         typeof( Material_mainTexture_Hook ),
       };
    }
 
-   //[Harmony]
-   //public static class Material_mainTexture_Hook
-   //{
-   //   static bool Prepare( HarmonyInstance instance )
-   //   {
-   //      return true;
-   //   }
-
-   //   static MethodBase TargetMethod( HarmonyInstance instance )
-   //   {
-   //      return AccessTools.Property( typeof( Material ), "mainTexture" ).GetSetMethod();
-   //   }
-
-   //   public static void Prefix( object __instance, Texture value )
-   //   {
-   //      if( value is Texture2D texture2D )
-   //      {
-   //         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance, texture2D, true );
-   //      }
-   //   }
-   //}
+   public static class GenericPrefix_Hook
+   {
+      public static void Prefix( object __instance, object value )
+      {
+         if( value is Texture2D texture2D )
+         {
+            AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance, texture2D, true );
+         }
+      }
+   }
+
+   [Harmony]
+   public static class Material_mainTexture_Hook
+   {
+      static bool Prepare( HarmonyInstance instance )
+      {
+         return true;
+      }
+
+      static MethodBase TargetMethod( HarmonyInstance instance )
+      {
+         return AccessTools.Property( typeof( Material ), "mainTexture" ).GetSetMethod();
+      }
+
+      public static void Prefix( object __instance, Texture value )
+      {
+         if( value is Texture2D texture2D )
+         {
+            AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance, texture2D, true );
+         }
+      }
+   }
 
    [Harmony]
    public static class MaskableGraphic_OnEnable_Hook
@@ -62,7 +73,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
       {
          if( __instance is Image || __instance is RawImage )
          {
-            AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance );
+            AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance, null, false );
          }
       }
    }
@@ -82,7 +93,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
 
       public static void Postfix( object __instance )
       {
-         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance );
+         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance, null, false );
       }
    }
 
@@ -101,7 +112,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
 
       public static void Postfix( object __instance )
       {
-         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance );
+         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance, null, false );
       }
    }
 
@@ -120,7 +131,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Hooks
 
       public static void Postfix( object __instance )
       {
-         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance );
+         AutoTranslationPlugin.Current.Hook_ImageChangedOnComponent( __instance, null, false );
       }
    }
 

+ 12 - 40
src/XUnity.AutoTranslator.Plugin.Core/Web/GoogleTranslateEndpoint.cs

@@ -7,7 +7,6 @@ using System.Net;
 using System.Reflection;
 using System.Text;
 using Harmony;
-using Jurassic;
 using SimpleJSON;
 using UnityEngine;
 using XUnity.AutoTranslator.Plugin.Core.Configuration;
@@ -199,40 +198,14 @@ namespace XUnity.AutoTranslator.Plugin.Core.Web
                {
                   var html = downloadResult.Result;
 
-                  const string lookup = "TKK=eval('";
-                  var index = html.IndexOf( lookup );
-                  if( index > -1 ) // jurassic approach
+                  bool found = false;
+                  string[] lookups = new[] { "tkk:'", "TKK='" };
+                  foreach( var lookup in lookups )
                   {
-                     var lookupIndex = index + lookup.Length;
-                     var openClamIndex = html.IndexOf( '{', lookupIndex );
-                     var closeClamIndex = html.IndexOf( '}', openClamIndex );
-                     var functionIndex = html.IndexOf( "function", lookupIndex );
-                     var script = html.Substring( functionIndex, closeClamIndex - functionIndex + 1 );
-                     var decodedScript = script.Replace( "\\x3d", "=" ).Replace( "\\x27", "'" ).Replace( "function", "function FuncName" );
-
-                     // https://github.com/paulbartrum/jurassic/wiki/Safely-executing-user-provided-scripts
-                     ScriptEngine engine = new ScriptEngine();
-                     engine.Evaluate( decodedScript );
-                     var result = engine.CallGlobalFunction<string>( "FuncName" );
-
-                     var parts = result.Split( '.' );
-                     if( parts.Length == 2 )
-                     {
-                        m = long.Parse( parts[ 0 ] );
-                        s = long.Parse( parts[ 1 ] );
-                     }
-                     else
-                     {
-                        Logger.Current.Warn( "An error occurred while setting up GoogleTranslate Cookie/TKK. Could not locate TKK value. Using fallback TKK values instead." );
-                     }
-                  }
-                  else
-                  {
-                     const string lookup2 = "TKK='";
-                     index = html.IndexOf( lookup2 );
+                     var index = html.IndexOf( lookup );
                      if( index > -1 ) // simple string approach
                      {
-                        var startIndex = index + lookup2.Length;
+                        var startIndex = index + lookup.Length;
                         var endIndex = html.IndexOf( "'", startIndex );
                         var result = html.Substring( startIndex, endIndex - startIndex );
 
@@ -241,17 +214,16 @@ namespace XUnity.AutoTranslator.Plugin.Core.Web
                         {
                            m = long.Parse( parts[ 0 ] );
                            s = long.Parse( parts[ 1 ] );
+                           found = true;
+                           break;
                         }
-                        else
-                        {
-                           Logger.Current.Warn( "An error occurred while setting up GoogleTranslate Cookie/TKK. Could not locate TKK value. Using fallback TKK values instead." );
-                        }
-                     }
-                     else
-                     {
-                        Logger.Current.Warn( "An error occurred while setting up GoogleTranslate Cookie/TKK. Could not locate TKK value. Using fallback TKK values instead." );
                      }
                   }
+
+                  if( !found )
+                  {
+                     Logger.Current.Warn( "An error occurred while setting up GoogleTranslate Cookie/TKK. Could not locate TKK value. Using fallback TKK values instead." );
+                  }
                }
                catch( Exception e )
                {

+ 0 - 1
src/XUnity.AutoTranslator.Plugin.Core/Web/GoogleTranslateLegitimateEndpoint.cs

@@ -7,7 +7,6 @@ using System.Net;
 using System.Reflection;
 using System.Text;
 using Harmony;
-using Jurassic;
 using SimpleJSON;
 using UnityEngine;
 using XUnity.AutoTranslator.Plugin.Core.Configuration;

+ 1 - 5
src/XUnity.AutoTranslator.Plugin.Core/XUnity.AutoTranslator.Plugin.Core.csproj

@@ -2,13 +2,9 @@
 
    <PropertyGroup>
       <TargetFramework>net35</TargetFramework>
-      <Version>3.0.0</Version>
+      <Version>2.16.0</Version>
    </PropertyGroup>
 
-   <ItemGroup>
-      <PackageReference Include="Jurassic" Version="2.2.2" />
-   </ItemGroup>
-
    <ItemGroup>
       <Reference Include="0Harmony">
          <HintPath>..\..\libs\0Harmony.dll</HintPath>

+ 1 - 1
src/XUnity.AutoTranslator.Plugin.IPA/XUnity.AutoTranslator.Plugin.IPA.csproj

@@ -2,7 +2,7 @@
 
    <PropertyGroup>
       <TargetFramework>net35</TargetFramework>
-      <Version>3.0.0</Version>
+      <Version>2.16.0</Version>
    </PropertyGroup>
 
    <ItemGroup>

+ 1 - 1
src/XUnity.AutoTranslator.Plugin.UnityInjector/XUnity.AutoTranslator.Plugin.UnityInjector.csproj

@@ -2,7 +2,7 @@
 
    <PropertyGroup>
       <TargetFramework>net35</TargetFramework>
-      <Version>3.0.0</Version>
+      <Version>2.16.0</Version>
    </PropertyGroup>
 
    <ItemGroup>

+ 0 - 1
src/XUnity.AutoTranslator.Setup/Program.cs

@@ -47,7 +47,6 @@ namespace XUnity.AutoTranslator.Setup
             AddFile( Path.Combine( managedDir, "0Harmony.dll" ), Resources._0Harmony );
             AddFile( Path.Combine( managedDir, "ExIni.dll" ), Resources.ExIni );
             AddFile( Path.Combine( managedDir, "ReiPatcher.exe" ), Resources.ReiPatcher ); // needed because file is modified by attribute in ReiPatcher... QQ
-            AddFile( Path.Combine( managedDir, "Jurassic.dll" ), Resources.Jurassic );
             AddFile( Path.Combine( managedDir, "XUnity.AutoTranslator.Plugin.Core.dll" ), Resources.XUnity_AutoTranslator_Plugin_Core, true );
 
             // create an .ini file for each launcher, if it does not already exist

+ 0 - 3
src/XUnity.AutoTranslator.Setup/Properties/Resources.resx

@@ -121,9 +121,6 @@
   <data name="ExIni" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\..\..\libs\ExIni.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="Jurassic" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>..\..\XUnity.AutoTranslator.Plugin.Core\bin\Release\net35\Jurassic.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
   <data name="Mono_Cecil" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\..\..\libs\Mono.Cecil.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>

+ 1 - 1
src/XUnity.AutoTranslator.Setup/XUnity.AutoTranslator.Setup.csproj

@@ -4,7 +4,7 @@
       <OutputType>Exe</OutputType>
       <TargetFramework>net40</TargetFramework>
       <AssemblyName>SetupReiPatcherAndAutoTranslator</AssemblyName>
-      <Version>3.0.0</Version>
+      <Version>2.16.0</Version>
    </PropertyGroup>
 
    <ItemGroup>