tanghai 1 жил өмнө
parent
commit
b3c3b6ad9b

+ 0 - 71
Scripts/CodeLinker.ps1

@@ -1,71 +0,0 @@
-$packages = ("Packages", "Library\PackageCache")
-$dirs = ("Model~", "Hotfix~", "ModelView~", "HotfixView~")
-$client_server_dir = ("Client", "Server", "Share")
-
-
-function Link($targetPath, $linker, $subPath, $moudle)
-{
-    $path = $linker + $subPath
-    foreach($c in Get-ChildItem $path)
-    {
-        if ($c -is [System.IO.FileInfo])
-        {
-            $to = $targetPath + "/" + $moudle + $subPath + $c.Name
-
-            Write-Host "link:", $to, $c.FullName
-
-            New-Item -ItemType HardLink -Path $to -Value $c.FullName -Force
-            continue
-        }
-        elseif ($c -is [System.IO.DirectoryInfo])
-        {
-            $newSubPath = $subPath + $c.Name + "/"
-            Link $targetPath $linker $newSubPath $moudle
-        }
-    }
-}
-
-
-foreach($package in $packages)
-{
-    foreach($a in Get-ChildItem $package) 
-    {
-        # name = core
-        $name = $a.Name
-        if (!$name.StartsWith("com.et.")) 
-        {
-            continue
-        }
-        $name = $name.Substring(7, $name.Length - 7);
-
-        $newDir = $a.FullName + "/Scripts"
-
-        # $b model~ dir
-        foreach($b in Get-ChildItem $newDir)
-        {
-            $name2 = $b.Name
-            if (!$dirs.Contains($name2))
-            {
-                continue
-            }
-
-            $path = $b.FullName
-
-            # name3  Hotfix  name2 Hotfix~
-            $name3 = $name2.Substring(0, $name2.Length - 1)
-
-            foreach($c in Get-ChildItem $path)
-            {
-                $name4 = $c.Name
-                if (!$client_server_dir.Contains($name4))
-                {
-                    continue
-                }
-
-                # Assets/Scripts/Hotfix/Client/
-                $targetPath = "Assets/Scripts/$name3/$name4"
-                Link $targetPath $c.FullName "/" $name
-            }
-        }
-    }
-}

+ 0 - 19
Scripts/MoveToPackages.ps1

@@ -1,19 +0,0 @@
-foreach($dir in Get-ChildItem "Library/PackageCache")
-{
-    if (!($dir -is [System.IO.DirectoryInfo]))
-    {
-        continue
-    }
-
-    if ($dir.Name.StartsWith("cn.etetet"))
-    {
-        $baseName = $dir.Name.Substring(0, $dir.Name.indexOf("@"))
-        
-        $t = $dir.Name
-        Write-Host "move Library/PackageCache/$t to Packages/$baseName"
-        Move-Item "Library/PackageCache/$t" "Packages/$baseName"
-    }  
-}
-
-Write-Host "move finish!"
-#Read-Host -Prompt "Press Enter to exit"