Unpack() public méthode

public Unpack ( string fsPath ) : IManifest[]
fsPath string
Résultat IManifest[]
Exemple #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 });
            }
        }
        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 });
			}
		}