{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "Implemented in change set 19757.",
    "ClosedDate": "2008-06-07T13:57:11.27-07:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "The library doesn't currently provide a way to create a self-extracting zip file (exe). It should.",
    "LastUpdatedDate": "2013-05-16T05:32:45.043-07:00",
    "PlannedForRelease": "1.5 DotNetZip Library",
    "ReleaseVisibleToPublic": true,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2008-06-03T18:39:57.503-07:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "Self extracting zip support",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 5132
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "How would this work?\r\nOne way to do it:  run the exe and the Main() method in the SelfExtractor runs.  It slurps in the zip archive from the resource manager, like any embedded resource - resourceManager.GetObject(\"EmbeddedZipStream\");.  This resource can emerge as a byte[], and there is a ZipFile constructor that accepts a byte[].  Now it has an instance of ZipFile.  The SelfExtractor pops up a window saying \"I am a self extracting zip, do you want to extract the files?\" and allows the user to OK/Cancel, and also specify the target extract directory. \r\n\r\nThen if OK, the logic just calls ZipFile.ExtractAll() or whatever on the zip stream.  \r\nThere are some special cases for passwords I guess. And you might want a command-line-only mode, too. \r\n\r\nSteps to build this:\r\n\r\n1. build the extraction logic (SelfExtractor class).  Manually embed a zip archive as a resource into the assembly.  Test out the model I described above.  This would validate the model. \r\n2. build the logic in ZipFile to save to a self-extracting-exe.  Probably a new method called SaveToSfx().  Within that method, you would use Reflection.Emit() to generate the code that you validated in step 1, and you'd have to save the generated assembly.  You will have to find the magic incantation that will allow you to programmatically embed a resource into the generated assembly. \r\n3. Finally, embed the Ionic.Utils.Zip.dll itself as a resource in the Self-extracting-zip, and then there would have to be some magic assembly-loading logic that loads that Zip assembly from the resource, and then is able to call into it.  I don't know if this would work, but one idea is here: http://blog.magenic.com/blogs/brante/archive/2008/04/14/Embedded-Assembly-Linker.aspx  \r\n\r\nThe resulting generated assembly would run on any platform that has the .NET Framework 2.0 on it.  \r\nThe extracting machine would not need to have the Ionic.Utils.Zip.dll assembly installed on it, because that assembly would be distributed (embedded) in the self-extracting-zip itself. \r\n",
      "PostedDate": "2008-06-06T14:44:23.563-07:00",
      "Id": -2147483648
    },
    {
      "Message": "I built an example as a prototype for this.\r\nSee changeset 19730. ",
      "PostedDate": "2008-06-06T18:01:31.91-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2008-06-07T09:37:59.68-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2008-06-07T13:57:11.27-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:44:48.943-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:32:45.043-07:00",
      "Id": -2147483648
    }
  ]
}