Skip to content

Commit

Permalink
Old DemiLib Core files are now atutomatically deleted if new ones are…
Browse files Browse the repository at this point in the history
… present
  • Loading branch information
Demigiant committed Dec 6, 2015
1 parent 28cf80f commit c1f7a06
Show file tree
Hide file tree
Showing 44 changed files with 40 additions and 1 deletion.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll
Binary file not shown.
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll
Binary file not shown.
Binary file not shown.
Binary file modified UnityTests.Unity5/Assets/_Tests PRO/TempPro.unity
Binary file not shown.
2 changes: 1 addition & 1 deletion _DOTween.Assembly/DOTween/DOTween.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace DG.Tweening
public class DOTween
{
/// <summary>DOTween's version</summary>
public static readonly string Version = "1.1.120";
public static readonly string Version = "1.1.130";

///////////////////////////////////////////////
// Options ////////////////////////////////////
Expand Down
35 changes: 35 additions & 0 deletions _DOTween.Assembly/DOTweenEditor/Core/EditorUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections;
using System.Reflection;
using System.IO;
using DG.Tweening;
using UnityEditor;
using UnityEngine;

Expand Down Expand Up @@ -86,6 +87,40 @@ public static bool DOTweenSetupRequired()
return Directory.GetFiles(dotweenDir, "*.addon").Length > 0 || hasPro && Directory.GetFiles(dotweenProDir, "*.addon").Length > 0;
}

// Deletes old DemiLib core if new one (inside Core directory) exists
public static void DeleteOldDemiLibCore()
{
string demiLibDir = EditorUtils.GetAssemblyFilePath(typeof(DOTween).Assembly);
string slash = demiLibDir.IndexOf("/") != -1 ? "/" : "\\";
demiLibDir = demiLibDir.Substring(0, demiLibDir.LastIndexOf(slash));
demiLibDir = demiLibDir.Substring(0, demiLibDir.LastIndexOf(slash)) + slash + "DemiLib";
string adbDemiLibDir = FullPathToADBPath(demiLibDir);
if (!AssetExists(adbDemiLibDir)) return;

string demiLibNewCoreDir = adbDemiLibDir + "/Core";
if (!AssetExists(demiLibNewCoreDir)) return;

// New version present, delete old versions
DeleteAssetsIfExist(new[] {
adbDemiLibDir + "/DemiLib.dll",
adbDemiLibDir + "/DemiLib.xml",
adbDemiLibDir + "/DemiLib.dll.mdb",
adbDemiLibDir + "/Editor/DemiEditor.dll",
adbDemiLibDir + "/Editor/DemiEditor.xml",
adbDemiLibDir + "/Editor/DemiEditor.dll.mdb",
adbDemiLibDir + "/Editor/Imgs"
});
// Delete Editor folder if empty
if (AssetExists(adbDemiLibDir + "/Editor") && Directory.GetFiles(demiLibDir + slash + "Editor").Length == 0)
AssetDatabase.DeleteAsset(adbDemiLibDir + "/Editor");
}
static void DeleteAssetsIfExist(string[] adbFilePaths)
{
foreach (string f in adbFilePaths) {
if (AssetExists(f)) AssetDatabase.DeleteAsset(f);
}
}

/// <summary>
/// Returns TRUE if the file/directory at the given path exists.
/// </summary>
Expand Down
4 changes: 4 additions & 0 deletions _DOTween.Assembly/DOTweenEditor/DOTweenUtilityWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Created: 2014/12/24 13:37

using System.IO;
using System.Reflection;
using DG.DOTweenEditor.Core;
using DG.Tweening;
using DG.Tweening.Core;
Expand All @@ -21,6 +22,9 @@ static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAsse
string[] dotweenEntries = System.Array.FindAll(importedAssets, name => name.Contains("DOTween") && !name.EndsWith(".meta") && !name.EndsWith(".jpg") && !name.EndsWith(".png"));
bool dotweenImported = dotweenEntries.Length > 0;
if (dotweenImported) {
// Delete old DemiLib configuration
EditorUtils.DeleteOldDemiLibCore();
//
bool openSetupDialog = EditorUtils.DOTweenSetupRequired()
&& (EditorPrefs.GetString(Application.dataPath + DOTweenUtilityWindow.Id) != Application.dataPath + DOTween.Version
|| EditorPrefs.GetString(Application.dataPath + DOTweenUtilityWindow.IdPro) != Application.dataPath + EditorUtils.proVersion);
Expand Down
Binary file modified _DOTween.Assembly/bin/DOTween.dll
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween.dll.mdb
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween43.dll
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween43.dll.mdb
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween46.dll
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween46.dll.mdb
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween50.dll
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/DOTween50.dll.mdb
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/Editor/DOTweenEditor.dll
Binary file not shown.
Binary file modified _DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb
Binary file not shown.

0 comments on commit c1f7a06

Please sign in to comment.