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