Sorry that the README is not complete
This commit is contained in:
parent
76cd0a4e75
commit
0e618b9909
|
@ -110,7 +110,7 @@ public class TimelapsePack
|
||||||
}
|
}
|
||||||
string fname =Path.GetFileName(f);
|
string fname =Path.GetFileName(f);
|
||||||
|
|
||||||
DirCopy(f,Path.Combine(src,fname),copyItem);
|
DirCopy(f,Path.Combine(dest,fname),copyItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach(var f in Directory.GetFiles(src))
|
foreach(var f in Directory.GetFiles(src))
|
||||||
|
@ -120,7 +120,7 @@ public class TimelapsePack
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
string fname =Path.GetFileName(f);
|
string fname =Path.GetFileName(f);
|
||||||
File.Copy(f,Path.Combine(src,fname));
|
File.Copy(f,Path.Combine(dest,fname),true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static string? Pack(string? outname)
|
public static string? Pack(string? outname)
|
||||||
|
@ -141,7 +141,7 @@ public class TimelapsePack
|
||||||
if(!string.IsNullOrWhiteSpace(outPut))
|
if(!string.IsNullOrWhiteSpace(outPut))
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory("_build/extension");
|
Directory.CreateDirectory("_build/extension");
|
||||||
File.Copy("extension_info.json","_build/extension_info.json");
|
File.Copy("extension_info.json","_build/extension_info.json",true);
|
||||||
string? dirname=Path.GetDirectoryName(outPut);
|
string? dirname=Path.GetDirectoryName(outPut);
|
||||||
|
|
||||||
if(!string.IsNullOrWhiteSpace(dirname)){
|
if(!string.IsNullOrWhiteSpace(dirname)){
|
||||||
|
@ -155,7 +155,7 @@ public class TimelapsePack
|
||||||
return !_hasDeps.Contains(cF);
|
return !_hasDeps.Contains(cF);
|
||||||
});
|
});
|
||||||
string fname = $"{Path.GetFileNameWithoutExtension(outPut)}.zip";
|
string fname = $"{Path.GetFileNameWithoutExtension(outPut)}.zip";
|
||||||
File.Copy(outPut,"_build/extension/extension.dll");
|
File.Copy(outPut,"_build/extension/extension.dll",true);
|
||||||
|
|
||||||
if(!string.IsNullOrWhiteSpace(outname))
|
if(!string.IsNullOrWhiteSpace(outname))
|
||||||
{
|
{
|
||||||
|
@ -166,7 +166,7 @@ public class TimelapsePack
|
||||||
File.Delete(fname);
|
File.Delete(fname);
|
||||||
}
|
}
|
||||||
ZipFile.CreateFromDirectory ("_build",fname,CompressionLevel.SmallestSize, false);
|
ZipFile.CreateFromDirectory ("_build",fname,CompressionLevel.SmallestSize, false);
|
||||||
Directory.Delete("_build");
|
Directory.Delete("_build",true);
|
||||||
return fname;
|
return fname;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
<PackageId>Tesses.TimelapsePack</PackageId>
|
<PackageId>Tesses.TimelapsePack</PackageId>
|
||||||
<Authors>Mike Nolan</Authors>
|
<Authors>Mike Nolan</Authors>
|
||||||
<Company>Tesses</Company>
|
<Company>Tesses</Company>
|
||||||
<Version>1.0.1</Version>
|
<Version>1.0.2</Version>
|
||||||
<AssemblyVersion>1.0.1</AssemblyVersion>
|
<AssemblyVersion>1.0.2</AssemblyVersion>
|
||||||
<FileVersion>1.0.1</FileVersion>
|
<FileVersion>1.0.2</FileVersion>
|
||||||
<Description>Extension Packaging tool for TimelapseNow</Description>
|
<Description>Extension Packaging tool for TimelapseNow</Description>
|
||||||
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
|
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
|
||||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||||
|
|
|
@ -25,9 +25,15 @@ public class ExtensionLoader
|
||||||
var info=GetExtensionInfo(Path.Combine(dirTmp,"extension_info.json"));
|
var info=GetExtensionInfo(Path.Combine(dirTmp,"extension_info.json"));
|
||||||
if(info != null)
|
if(info != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
Directory.CreateDirectory(Api.GetInternalFile("ExtensionInfo"));
|
Directory.CreateDirectory(Api.GetInternalFile("ExtensionInfo"));
|
||||||
File.Copy(Path.Combine(dirTmp,"extension_info.json"),Api.GetInternalFile("ExtensionInfo",$"{info.name}.json"));
|
if(Directory.Exists(Api.GetInternalFile("ExtensionBinaries",info.name)))
|
||||||
Directory.Move(Path.Combine(dirTmp,"ExtTMP","extension"),Api.GetInternalFile("ExtensionBinaries",info.name));
|
{
|
||||||
|
Directory.Delete(Api.GetInternalFile("ExtensionBinaries",info.name),true);
|
||||||
|
}
|
||||||
|
File.Copy(Path.Combine(dirTmp,"extension_info.json"),Api.GetInternalFile("ExtensionInfo",$"{info.name}.json"),true);
|
||||||
|
|
||||||
|
Directory.Move(Path.Combine(dirTmp,"extension"),Api.GetInternalFile("ExtensionBinaries",info.name));
|
||||||
File.Move(Api.GetInternalFile("ExtensionBinaries",info.name,"extension.dll"),Api.GetInternalFile("ExtensionBinaries",info.name,$"{info.name}.dll"));
|
File.Move(Api.GetInternalFile("ExtensionBinaries",info.name,"extension.dll"),Api.GetInternalFile("ExtensionBinaries",info.name,$"{info.name}.dll"));
|
||||||
|
|
||||||
if(add)
|
if(add)
|
||||||
|
@ -56,6 +62,7 @@ public class ExtensionLoader
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Directory.Delete(dirTmp,true);
|
||||||
}
|
}
|
||||||
public static ExtensionInfo? GetExtensionInfo(string filename)
|
public static ExtensionInfo? GetExtensionInfo(string filename)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue