如何在SevenZipSharp源代码中启用SevenZipSFX类



关于如何在SevenZipSharp源代码中启用SFX类的分步指南,我将非常感激:

如何创建一个SFX ZIP与SevenZipSharp?

…获得使用SevenZipSharp创建SFX文件的功能。

源文件:http://sevenzipsharp.codeplex.com/downloads/get/145910

private void button1_Click(object sender, EventArgs e)
    {
        SevenZipCompressor comp = new SevenZipCompressor(@"cTemp");
        SevenZipCompressor.SetLibraryPath(@"C:Usersi.cilDesktop7zipSevenZip7z.dll");
        comp.ArchiveFormat = OutArchiveFormat.SevenZip;
        comp.CompressionLevel = CompressionLevel.Ultra;
        comp.CompressionMethod = CompressionMethod.Lzma;
        comp.CompressionMode = CompressionMode.Create;
        comp.CompressFiles(@"c:TempTemp.7z", @"C:TempCentAppLOG13-Sep-13010004.bak");
        SfxModule mdl = SfxModule.Extended;
        SevenZipSfx sfx = new SevenZipSfx(mdl);
        sfx.ModuleFileName = @"C:Usersi.cilDesktop7zipSevenZipsfx7zxSD_LZMA.sfx";
        sfx.MakeSfx(@"c:TempTemp.7z",
                    new Dictionary<string, string> 
                    { 
                        { "Title", "ATIG Platform" }, 
                        { "InstallPath", ProgramFilesx86() + "\ATIG Platform" },
                        { "BeginPrompt", "Yükleme işlemi başlatılsın mı?" },
                        { "CancelPrompt", "Yükleme işlemi iptal edilecek?" },
                        { "OverwriteMode", "2" },
                        { "GUIMode", "1" },
                        { "ExtractDialogText", "Dosyalar ayıklanıyor" },
                        { "ExtractTitle", "Ayıklama İşlemi" },
                        { "ErrorTitle", "Hata!" }
                    }, 
                    @"c:TempTemp.exe");
    }
    static string ProgramFilesx86()
    {
        if (8 == IntPtr.Size
            || (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"))))
        {
            return Environment.GetEnvironmentVariable("ProgramFiles(x86)");
        }
        return Environment.GetEnvironmentVariable("ProgramFiles");
    }

相关内容

  • 没有找到相关文章