Unpack() public method

public Unpack ( string fsPath ) : IManifest[]
fsPath string
return IManifest[]
示例#1
0
        private void ProcessBinaries(string _packageDir)
        {
            var binFiles        = new List <string>(Directory.GetFiles(_packageDir));
            var executableFiles = new List <string>(Directory.GetFiles(_packageDir, "*.dll"));

            executableFiles.AddRange(Directory.GetFiles(_packageDir, "*.exe"));
            foreach (var executableFile in executableFiles)
            {
                var asmName          = Path.GetFileNameWithoutExtension(executableFile);
                var pdbSourcePath    = Path.Combine(_packageDir, asmName + ".pdb");
                var configSourcePath = executableFile + ".config";
                binFiles.Remove(executableFile);
                binFiles.Remove(pdbSourcePath);
                binFiles.Remove(configSourcePath);

                if (AssemblyHandler.IsInstallerAssembly(executableFile))
                {
                    var asmUnpacker = new AssemblyUnpacker();
                    var asmManifest = asmUnpacker.Unpack(executableFile);
                    _manifests.AddRange(asmManifest);
                }
                else
                {
                    _manifest.AddExecutable(new AssemblyInstallStep(_manifest, null)
                    {
                        AssemblyPath = executableFile
                    });
                }
            }
            foreach (var binFile in binFiles)
            {
                //_manifest.AddExecutable(new BinaryInstallStep(_manifest, null) { SourcePath = binFile });
            }
        }
示例#2
0
        private void ProcessBinaries(string _packageDir)
		{
			var binFiles = new List<string>(Directory.GetFiles(_packageDir));
			var executableFiles = new List<string>(Directory.GetFiles(_packageDir, "*.dll"));
			executableFiles.AddRange(Directory.GetFiles(_packageDir, "*.exe"));
			foreach (var executableFile in executableFiles)
			{
				var asmName = Path.GetFileNameWithoutExtension(executableFile);
				var pdbSourcePath = Path.Combine(_packageDir, asmName + ".pdb");
				var configSourcePath = executableFile + ".config";
				binFiles.Remove(executableFile);
				binFiles.Remove(pdbSourcePath);
				binFiles.Remove(configSourcePath);

				if (AssemblyHandler.IsInstallerAssembly(executableFile))
				{
					var asmUnpacker = new AssemblyUnpacker();
					var asmManifest = asmUnpacker.Unpack(executableFile);
					_manifests.AddRange(asmManifest);
				}
				else
				{
					_manifest.AddExecutable(new AssemblyInstallStep(_manifest, null) { AssemblyPath = executableFile });
				}
			}
			foreach (var binFile in binFiles)
			{
				//_manifest.AddExecutable(new BinaryInstallStep(_manifest, null) { SourcePath = binFile });
			}
		}