; -- Sample1.iss --
; Demonstrates copying 3 files, creating an icon, and some registry entries.

; SEE THE DOCUMENTATION FOR DETAILS ON CREATING SETUP SCRIPTS!

[Setup]
AppName=Virtual Makeover 2
AppVerName=Virtual Makeover 2
AppCopyright=Copyright © 2005 Virtual Makeover 2 by Media Art, Inc.
DefaultDirName={pf}\Virtual Makeover 2
DefaultGroupName=Virtual Makeover 2
MinVersion=4,4
UninstallDisplayIcon={app}\Visage51.exe
LicenseFile=license.txt

[Dirs] 
Name: "{app}\ImageOut"


[Files]
Source: "ImageIn\*.*";   DestDir: "{app}\ImageIn"
;Source: "ImageOut\*.*";   DestDir: "{app}\ImageOut"
Source: "Works\*.*";   DestDir: "{app}\Works"
Source: "Music\*.*";   DestDir: "{app}\Music"
Source: "Help\*.*";   DestDir: "{app}\Help"
Source: "Help\Images\*.*";   DestDir: "{app}\Help\Images"
;Source: "IntFaces\Default\800-600\*.*";   DestDir: "{app}\IntFaces\Default\800-600"
Source: "IntFaces\Default\1024-768\*.*";   DestDir: "{app}\IntFaces\Default\1024-768"
Source: "Messages\Mdart_01\*.*";   DestDir: "{app}\Messages\Mdart_01"
Source: "Queries\*.*";   DestDir: "{app}\Queries"
Source: "Tips\*.*";   DestDir: "{app}\Tips"
Source: "Tips\Images\*.*";   DestDir: "{app}\Tips\Images"
;Source: "Parts\Beards\*.*";   DestDir: "{app}\Parts\Beards"
Source: "Parts\BodyPict\*.*";   DestDir: "{app}\Parts\BodyPict"
;Source: "Parts\BodyPict\EuroFlgs\*.*";   DestDir: "{app}\Parts\BodyPict\EuroFlgs"
Source: "Parts\BodyPict\tattoo\*.*";   DestDir: "{app}\Parts\BodyPict\tattoo"
Source: "Parts\Eyebrow\*.*";   DestDir: "{app}\Parts\Eyebrow"
Source: "Parts\Eyebrow\AP\*.*";   DestDir: "{app}\Parts\Eyebrow\AP"
Source: "Parts\Eyelash\*.*";   DestDir: "{app}\Parts\Eyelash"
Source: "Parts\Eyelash\ap\*.*";   DestDir: "{app}\Parts\Eyelash\ap"
;Source: "Parts\Eyelash\addon\*.*";   DestDir: "{app}\Parts\Eyelash\addon"
Source: "Parts\Eyeline\*.*";   DestDir: "{app}\Parts\Eyeline"
Source: "Parts\Eyeshad\*.*";   DestDir: "{app}\Parts\Eyeshad"
;Source: "Parts\FacePict\*.*";   DestDir: "{app}\Parts\FacePict"
Source: "Parts\Glasses\*.*";   DestDir: "{app}\Parts\Glasses"
;Source: "Parts\Glasses\Funny\*.*";   DestDir: "{app}\Parts\Glasses\Funny"
Source: "Parts\Hair\*.*";   DestDir: "{app}\Parts\Hair"
;Source: "Parts\Hats\Funny\*.*";   DestDir: "{app}\Parts\Hats\Funny"
Source: "Parts\Hats\Ladies\*.*";   DestDir: "{app}\Parts\Hats\Ladies"
;Source: "Parts\Hats\Man\*.*";   DestDir: "{app}\Parts\Hats\Man"
;Source: "Parts\Hats\Military\*.*";   DestDir: "{app}\Parts\Hats\Military"
;Source: "Parts\Hats\Bandanas\*.*";   DestDir: "{app}\Parts\Hats\Bandanas"
Source: "Parts\Jewelry\Earring\*.*";   DestDir: "{app}\Parts\Jewelry\Earring"
Source: "Parts\Jewelry\Neck\*.*";   DestDir: "{app}\Parts\Jewelry\Neck"
Source: "Parts\Jewelry\Piercing\*.*";   DestDir: "{app}\Parts\Jewelry\Piercing"
Source: "Parts\Lens\*.*";   DestDir: "{app}\Parts\Lens"
Source: "Parts\Lipline\*.*";   DestDir: "{app}\Parts\Lipline"
Source: "Parts\Lips\*.*";   DestDir: "{app}\Parts\Lips"
Source: "Parts\Lips\Lips_t\*.*";   DestDir: "{app}\Parts\Lips\Lips_t"
Source: "Parts\Nails\*.*";   DestDir: "{app}\Parts\Nails"
Source: "Parts\Nails\Pattern\*.*";   DestDir: "{app}\Parts\Nails\Pattern"
Source: "Parts\Rouge\*.*";   DestDir: "{app}\Parts\Rouge"
;Source: "Models\Addon\*.*";   DestDir: "{app}\Models\Addon"
;Source: "Models\Cat\*.*";   DestDir: "{app}\Models\Cat"
;Source: "Models\Clown1\*.*";   DestDir: "{app}\Models\Clown1"
;Source: "Models\Clown2\*.*";   DestDir: "{app}\Models\Clown2"
;Source: "Models\Clown3\*.*";   DestDir: "{app}\Models\Clown3"
;Source: "Models\Clown4\*.*";   DestDir: "{app}\Models\Clown4"
;Source: "Models\Clown5\*.*";   DestDir: "{app}\Models\Clown5"
;Source: "Models\Feather\*.*";   DestDir: "{app}\Models\Feather"
;Source: "Models\Flags\*.*";   DestDir: "{app}\Models\Flags"
;Source: "Models\Kabuka1\*.*";   DestDir: "{app}\Models\Kabuka1"
;Source: "Models\Kabuka2\*.*";   DestDir: "{app}\Models\Kabuka2"
;Source: "Models\Lion\*.*";   DestDir: "{app}\Models\Lion"
;Source: "Models\Mouse\*.*";   DestDir: "{app}\Models\Mouse"
;Source: "Models\Panda\*.*";   DestDir: "{app}\Models\Panda"
;Source: "Models\Vampire\*.*";   DestDir: "{app}\Models\Vampire"
;Source: "Models\Wicked\*.*";   DestDir: "{app}\Models\Wicked"
;Source: "Models\Witch\*.*";   DestDir: "{app}\Models\Witch"
Source: "PluginPrint\*.*";   DestDir: "{app}\PluginPrint";Copymode :alwaysoverwrite
Source: "PluginPrint\Interf\*.*";   DestDir: "{app}\PluginPrint\Interf";Copymode :alwaysoverwrite
Source: "PluginPrint\Help\*.*";   DestDir: "{app}\PluginPrint\Help";Copymode :alwaysoverwrite
;Source: "Visage.ini";   DestDir: "{app}"
;Source: "Visage31.exe"; DestDir: "{app}"
;Source: "eztw32.dll";     DestDir: "{app}"
;Source: "lead51n.dll";    DestDir: "{app}"
;Source: "logoprvt.bmp";   DestDir: "{app}"
;Source: "mp3ex.dat";      DestDir: "{app}"
;Source: "paldata.txt";    DestDir: "{app}"
;Source: "partbase.txt";   DestDir: "{app}"
;Source: "partshops.txt";  DestDir: "{app}"
;Source: "shops.txt";      DestDir: "{app}"
;Source: "models.txt";      DestDir: "{app}"
;Source: "termins.txt";    DestDir: "{app}"
Source: "*.*";    DestDir: "{app}"

[Icons]
Name: "{group}\Virtual Makeover 2"; Filename: "{app}\Visage51.exe" ; IconFilename: "{app}\ICON.ico"
Name: "{group}\Virtual Makeover 2 uninstall"; Filename: "{app}\unins000.exe"

; NOTE: Most apps do not need registry entries to be pre-created, so if
; you are using this script as a template for a new install, you should
; probably remove these [Registry] entries.

[Registry]
; Start "Software\My Company\My Program" keys under HKEY_CURRENT_USER
; and HKEY_LOCAL_MACHINE. The flags tell it to always delete the
; "My Program" keys upon uninstall, and delete the "My Company" keys
; if there is nothing left in them.
Root: HKCU; Subkey: "Software"; Flags: uninsdeletekeyifempty
Root: HKCU; Subkey: "Software\Virtual Makeover 2"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\Virtual Makeover 2"; ValueType: string; ValueName: "Version"; ValueData: "5.1"
Root: HKCU; Subkey: "Software\Virtual Makeover 2"; ValueType: string; ValueName: "HDPath"; ValueData: "{app}"
Root: HKCU; Subkey: "Software\Virtual Makeover 2"; ValueType: string; ValueName: "CDPath"; ValueData: "{src}"

[Run]
Filename: "{app}\Visage51.exe"; Description: "Launch Virtual Makeover 2"; Flags: nowait postinstall skipifsilent


[code]
function GetSystemMetrics(nindex: Integer ):Integer;
external 'GetSystemMetrics@user32.dll';
const
MB_ICONINFORMATION = $40;
var
x,y: Integer;
function InitializeSetup(): Boolean;
begin
x:=GetSystemMetrics(0);
y:=GetSystemMetrics(1);
if (x<1024) or (y<768) then begin
MsgBox('Screen resolution is lower than the required 1024x768.'#13
'The instructions below will show you how to change your screen resolution:'#13''#13
'Click on START'#13
'Click on SETTINGS'#13
'Click on CONTROL PANEL'#13
'Double click on DISPLAY icon (You may need click on "Switch to Classic View" first)'#13
'Click on the tab labelled SETTINGS'#13
'Now move the slider bar to the right so that the text underneath states 1024x768 pixels'#13
'Press APPLY'#13
'Press OK/Yes (if asked to keep the settings click on YES)'#13
'Once done, re-run the installation of the software.'#13''#13
'If you cannot change your screen resolution, contact Technical Support on +44(0) 1889 570589 or support@focusmm.co.uk'#13
,mbInformation, MB_OK);
Result := False;
end else
Result := True;
end;
