ClearWorkshop small changes
This commit is contained in:
parent
e79790d7de
commit
71bef3da32
@ -15,6 +15,6 @@
|
||||
<ProjectReference Include="..\..\DTLib\DTLib\DTLib.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Configuration)' != 'Debug' ">
|
||||
<PackageReference Include="DTLib" Version="1.1.6" />
|
||||
<PackageReference Include="DTLib" Version="1.1.7" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@ -10,6 +10,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution_files", "solution_
|
||||
.gitignore = .gitignore
|
||||
nuget.config = nuget.config
|
||||
publish_native.sh = publish_native.sh
|
||||
publish_debug.sh = publish_debug.sh
|
||||
README.md = README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DTLib", "..\DTLib\DTLib\DTLib.csproj", "{67E226B7-F04B-4FB1-A9AA-E4AE3A5A8A3F}"
|
||||
|
||||
@ -20,11 +20,10 @@ static class Workshop
|
||||
for (int i = 0; i < moddirs.Length; i++)
|
||||
{
|
||||
string modId = moddirs[i].LastName().ToString();
|
||||
IOPath modZip="";
|
||||
if (Directory.GetFiles(moddirs[i], "*.zip").Length != 0)
|
||||
modZip = Directory.GetFiles(moddirs[i], "*.zip")[0];
|
||||
if (modZip.Length != 0)
|
||||
var zips = Directory.GetFiles(moddirs[i], "*.zip");
|
||||
if (zips.Length > 0)
|
||||
{
|
||||
var modZip = zips[0];
|
||||
Log("y", $"archive found: {modZip}");
|
||||
if (Directory.Exists("_UNZIP")) Directory.Delete("_UNZIP");
|
||||
var pr = new Process();
|
||||
@ -32,7 +31,7 @@ static class Workshop
|
||||
pr.StartInfo.UseShellExecute = false;
|
||||
pr.StartInfo.FileName = "7z";
|
||||
pr.StartInfo.Arguments = $"x -y -o_UNZIP \"{modZip}\"";
|
||||
Log("h",$"{pr.StartInfo.WorkingDirectory}$: {pr.StartInfo.FileName} {pr.StartInfo.Arguments}");
|
||||
Log("h",$"{pr.StartInfo.FileName} {pr.StartInfo.Arguments}");
|
||||
pr.Start();
|
||||
pr.WaitForExit();
|
||||
moddirs[i] = "_UNZIP";
|
||||
@ -78,7 +77,12 @@ static class Workshop
|
||||
Directory.Copy(Path.Concat(moddirs[i], subdirs[n]),
|
||||
Path.Concat(outModDir, subdirs[n]),
|
||||
true, out var _conflicts);
|
||||
Log("y", $"found {_conflicts.Count} conflicts:\n{_conflicts.MergeToString('\n')}");
|
||||
if (_conflicts.Count != 0)
|
||||
{
|
||||
Log("r", $"found {_conflicts.Count} conflicts:\n{_conflicts.MergeToString('\n')}");
|
||||
return;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -97,7 +101,7 @@ static class Workshop
|
||||
string desc = await DownloadModDescription(workshopId);
|
||||
var file = Path.Concat(outDir, $"desc_{workshopId}.txt");
|
||||
File.WriteAllText(file, desc);
|
||||
Log("g", $"downloaded {workshopId} description to {file}");
|
||||
Log("h", $"downloaded {workshopId} description to {file}");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<ProjectReference Include="..\..\DTLib\DTLib\DTLib.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Configuration)' != 'Debug' ">
|
||||
<PackageReference Include="DTLib" Version="1.1.6" />
|
||||
<PackageReference Include="DTLib" Version="1.1.7" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\diff-text\diff-text.csproj" />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user