home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 June / CHIP_CD_2004-06.iso / software / miranda_hit / files / mirinstsetup.exe / Miranda Installer 0.0.1.2 / Worker.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-04-20  |  2.6 KB  |  78 lines

  1. /*
  2.     Miranda Installer - Installs nightlies and Miranda addons.
  3.     Copyright (C) 2002-2003 Goblineye Entertainment
  4.  
  5.     Authors: Saar (Tornado) and Kai (kai_b)
  6.  
  7.     This program is free software; you can redistribute it and/or modify
  8.     it under the terms of the GNU General Public License as published by
  9.     the Free Software Foundation; either version 2 of the License, or
  10.     (at your option) any later version.
  11.  
  12.     This program is distributed in the hope that it will be useful,
  13.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.     GNU General Public License for more details.
  16.  
  17.     You should have received a copy of the GNU General Public License
  18.     along with this program; if not, write to the Free Software
  19.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  20. */
  21.  
  22. #pragma once
  23.  
  24. // anything that has to do with the worker thread and its functions, goes here :)
  25. #include "zlib\unzip.h"
  26. #include "MirandaInstaller.h"
  27. #pragma hdrstop
  28.  
  29. #define DEFAULT_PACKAGENAME "(Unnamed Package)"
  30.  
  31. // probe script receives it through dwUserData
  32. // deleted by dialog
  33. typedef struct XMLPROBE_SCRIPTINFO_TYPE
  34. {
  35.     unzFile hFile; // zip file
  36.     HWND hwndCtrl; // handle to package selector
  37. } XMLPROBE_SCRIPTINFO;
  38.  
  39.  
  40. // returned by parser and package selection dialog
  41. // list of files to be installed
  42. // correction - used by a lot of stuff
  43. typedef struct GENERAL_FILELIST_TYPE
  44. {
  45.     char *lpFilename; // allocated (be sure to delete). name of file from archive to be installed.
  46.     GENERAL_FILELIST_TYPE *next;
  47. } GENERAL_FILELIST;
  48.  
  49.  
  50. // dialog gets it through lParam
  51. // deleted by dialog when not needed anymore
  52. typedef struct PACKAGEDLG_EXTRAINFO_TYPE
  53. {
  54.     unzFile hFile; // zip file
  55.     char *szFilename; // *not* allocated! don't try to delete this one!
  56.     char *lpScript; // script... :) disallocated by caller, not to be touched
  57.     GENERAL_FILELIST *pFileList; // allocated and later deleted by caller dialog. will contain list of files to be installed later.
  58. } PACKAGEDLG_EXTRAINFO;
  59.  
  60.  
  61. // extra info when using script to install
  62. // but w/o dialog
  63. typedef struct XMLINSTALLER_EXTRAINFO_TYPE
  64. {
  65.     byte bSolution; // 1 - all, 2 - main
  66.     GENERAL_FILELIST *pFileList; // chain of files to be installed
  67. } XMLINSTALLER_EXTRAINFO;
  68.  
  69.  
  70. // autorun info
  71. typedef struct AUTORUN_INFO_TYPE
  72. {
  73.     char *lpFilename; // filename mentioned. this means nothing to wether we found an autorun section or not
  74.     byte bState; // LSB - found an autorun section (data is here), 0x2 - type of autorun is document
  75. } AUTORUN_INFO;
  76.  
  77.  
  78. DWORD WINAPI InstallerProc(LPVOID lpParameter); // worker thread