Subversion Repositories autosfx

Rev

Blame | Last modification | View Log | RSS feed

  1.  
  2. (******************************************************************)
  3. (* SFX for DelZip v1.8                                            *)
  4. (* ZipSFX                                                         *)
  5. (* Copyright 1997, Carl Bunton  Twojags@cris.com                  *)
  6. (*                                                                *)
  7. (* 1998-1901 maintained by Chris Vleghert                         *)
  8. (*                                                                *)
  9. (* 2002-? maintained again by Markus Stephany                     *)
  10. (* mailto:delphizip@mirkes.de                                     *)
  11. (* http://delphizip.mirkes.de                                     *)
  12. (*                                                                *)
  13. (* Credits: see CREDITS.TXT                                       *)
  14. (*                                                                *)
  15. (* last changed: 09/19/2005                                       *)
  16. (*                                                                *)
  17. (* In memory of Chris Vleghert                                    *)
  18. (*                                                                *)
  19. (* modified by Russell Peters, Roger Aelbrecht
  20.   This library is free software; you can redistribute it and/or
  21.   modify it under the terms of the GNU Lesser General Public
  22.   License as published by the Free Software Foundation; either
  23.   version 2.1 of the License, or (at your option) any later version.
  24.  
  25.   This library is distributed in the hope that it will be useful,
  26.   but WITHOUT ANY WARRANTY; without even the implied warranty of
  27.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  28.   Lesser General Public License (licence.txt) for more details.
  29.  
  30.   You should have received a copy of the GNU Lesser General Public
  31.   License along with this library; if not, write to the Free Software
  32.   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  33.  
  34.   contact: problems AT delphizip DOT org
  35.   updates: http://www.delphizip.org
  36.  
  37.   modified 22-Nov-2008
  38. ---------------------------------------------------------------------------*)
  39.  
  40. // Changes RCV:
  41. // Jan. 10, 1999  Adapted for D4 beta v0.99f=now v1.60
  42. // Feb. 10, 1999  Changed the Initialization and Finalization sections
  43. //                to include file close and CRC table.
  44. //                ( The Crc table was not freed after an Halt. )
  45. // Jun. 15, 2000  Added code to Dialog.pas to free a pidl, bug found by
  46. //                Lucjan Lukasik
  47. // Sep. 01, 2000  Added version Checked for Delphi 5 and BCB 4 and 5
  48. // Oct. 09, 2000  Added DirExists to the function FileExists because
  49. //                FindFirstFile does not work when there is no file on
  50. //                a drive (e.g. an empty 'A' drive) extract to that drive
  51. //                would not work, found by Clyde England clyde@conres.com.au
  52.  
  53. // changes mst:
  54. // apr 2002       almost completely rewritten (or better re-cut'n'pasted...)
  55. //                - moved routines/types/variables to appropriate units
  56. //                - added progress bar, ability to (initially) hide the files listview
  57. //                - removed "new directory" handling (this is handled by newer windows' themselves)
  58. //                - added the ability to expand environment variables
  59. //                - uses a new sfxheader instead of the MPV header; it's now a pascal record
  60. //                - added the ability to interrupt extraction (by pressing the "X" in the caption bar)
  61. // may 01, 2002   added the GetExeSize function from Angus Johnson's TZip-SFX to get rid of
  62. //                caring about the executable's size
  63. // further changes: see history.txt in the ..\doc\ directory
  64.  
  65. { Notes:
  66.  
  67. the initial release of zipsfx comes from Carl Bunton (see above).
  68.  
  69. the first modifications came from Eric W. Engler, the author of the great freeware
  70. delphi-vcl delzip that can handle zip-archives and -sfx's. (EEngler@zcsterling.com)
  71.  
  72. original zip-code comes from the infozip-group, they developped a free implementation
  73. of the zip/unzip-code for unix and later for other platforms.
  74.   Info-Zip home page:
  75.   http://freesoftware.com/pub/infozip/Info-ZIP.html
  76.  
  77. regards, Markus Stephany
  78. saarbrücken, saarland, germany, january 2004/september 2005
  79.  
  80. please read SFXInterface.pas for further details.
  81.  
  82.  
  83. }
  84.  
  85.   (* the structure of a zipsfx-file :
  86.  
  87.   - zipsfx-executable code (0-xxxxx)
  88.   - TSFXFileHeader record (see above)
  89.   - possibly one or more strings (depending on the headers' properties) (not #0 terminated)
  90.   Caption                             sfx dialog caption
  91.   Path                                sfx default extraction path
  92.   CmdLine                             command line to execute after extraction
  93.   RegFailPath                         default extract path if Path could not be read from registry
  94.   StartMsg                            startup message
  95.  
  96.   NOTE: the complete header (including the strings) must be DWORD-aligned!
  97.  
  98.   if not detached from the archive:
  99.   - the zip archive
  100.  
  101.   if detached from the archive:
  102.   - TSFXDetachedHeader + filename + TSFXDetachedHeader
  103.   - centraldirectories[] + endofcentraldir of the zip archive
  104.  
  105.  
  106.   *)
  107.  
  108. program ZMSFX19;
  109. {$IFDEF UNICODE}
  110.   cannot use Delphi 2009 or later
  111. {$ENDIF}
  112.  
  113. {$R 'ZMSFXDLG19.res' 'ZMSFXDLG19.rc'}
  114. {$R 'ZMSFX19.res' 'ZMSFX19.rc'}
  115.  
  116. uses
  117.   Windows,
  118.   ZMSFXDialogs19 in 'ZMSFXDialogs19.pas',
  119.   ZMSFXProcs19 in 'ZMSFXProcs19.pas',
  120.   ZMSFXInflate19 in 'ZMSFXInflate19.pas',
  121.   ZMSFXDefs19 in 'ZMSFXDefs19.pas',
  122.   ZMSFXInt19 in '..\ZMSFXInt19.pas',
  123.   ZMSFXStructs19 in 'ZMSFXStructs19.pas',
  124.   ZMSFXVars19 in 'ZMSFXVars19.pas',
  125.   ZMSFXStrings19 in 'ZMSFXStrings19.pas',
  126.   nvWinTrust in 'nvWinTrust.pas';
  127.  
  128. begin
  129.   Run;
  130. end.
  131.