Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions samples/ICSharpCode.SharpZipLib.Samples/Samples.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio Version 16
VisualStudioVersion = 16.0.29920.165
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CS", "CS", "{07E37AC9-4F01-4D1D-B5CB-6524CA36D22A}"
EndProject
Expand Down Expand Up @@ -39,6 +39,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cmd_ZipInfo", "cs\Cmd_ZipIn
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cmd_Checksum", "cs\Cmd_Checksum\Cmd_Checksum.csproj", "{82724A84-3399-4C27-91D2-2B2629B9E3F6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZipSFX", "cs\ZipSFX\ZipSFX.csproj", "{9CB9496F-4446-4E03-B8EF-2EC065969231}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -109,6 +111,10 @@ Global
{82724A84-3399-4C27-91D2-2B2629B9E3F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{82724A84-3399-4C27-91D2-2B2629B9E3F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{82724A84-3399-4C27-91D2-2B2629B9E3F6}.Release|Any CPU.Build.0 = Release|Any CPU
{9CB9496F-4446-4E03-B8EF-2EC065969231}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9CB9496F-4446-4E03-B8EF-2EC065969231}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9CB9496F-4446-4E03-B8EF-2EC065969231}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9CB9496F-4446-4E03-B8EF-2EC065969231}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -130,5 +136,9 @@ Global
{12C2AD0C-B815-426D-AFF1-7787C2DCA0F0} = {07E37AC9-4F01-4D1D-B5CB-6524CA36D22A}
{4C2CF0B1-FA7B-4FB6-83BA-24A9549AAB02} = {07E37AC9-4F01-4D1D-B5CB-6524CA36D22A}
{82724A84-3399-4C27-91D2-2B2629B9E3F6} = {07E37AC9-4F01-4D1D-B5CB-6524CA36D22A}
{9CB9496F-4446-4E03-B8EF-2EC065969231} = {07E37AC9-4F01-4D1D-B5CB-6524CA36D22A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B618EEE1-2569-4D50-BDE7-470C7BAD3B32}
EndGlobalSection
EndGlobal
6 changes: 6 additions & 0 deletions samples/ICSharpCode.SharpZipLib.Samples/cs/ZipSFX/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
49 changes: 49 additions & 0 deletions samples/ICSharpCode.SharpZipLib.Samples/cs/ZipSFX/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ZipSFX
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
// If launched with the arguments "--sfx", an input zip file, and an output exe file,
// create a self-extracting binary using a copy of the current binary with the zip-file appended
if (args.Length > 2 && args[0] == "--sfx")
{
using (var outStream = File.Open(args[2], FileMode.Create))
{
using (var exeStream = File.OpenRead(Application.ExecutablePath))
{
exeStream.CopyTo(outStream);
}

using (var zipStream = File.OpenRead(args[1]))
{
zipStream.CopyTo(outStream);
}

}

#if DEBUG
Process.Start(args[2]);
#endif
}
else
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new SfxForm());
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ZipSFX")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ZipSFX")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("9cb9496f-4446-4e03-b8ef-2ec065969231")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
191 changes: 191 additions & 0 deletions samples/ICSharpCode.SharpZipLib.Samples/cs/ZipSFX/SfxForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading