[Components]
AppInst.PhotoEd

[Defines]
USER=AllUsers
APPFOLDER_NAME=%AppFolder%
SOURCE_DIR=$CD_ROOT_DIR$\$APPFOLDER_NAME$\AIOC
PHOTO_SOURCE_DIR=$CD_ROOT_DIR$\$APPFOLDER_NAME$\PhotoEditor
MODEL_NAME=%ModelName%
FOLDER_NAME=$OEM$ $MODEL_NAME$
INSTALL_DIR=$PROGRAMFILES_DIR$\$FOLDER_NAME$
INSTALL_DIR64=$PROGRAMFILES_DIR$ (x86)\$FOLDER_NAME$
REG_APPPATH=Microsoft\Windows\CurrentVersion\App Paths
REG_APPPATH64=Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths
PHEDITOR_SHORTCUT=%Components.PhotoEd%
SYSTEST_INSTALL=<SetLabel,$MODEL_NAME$,EQ,System Test>
PRODUCT_INSTALL=<SetLabel,$MODEL_NAME$,NE,System Test>
TEST_DIR=$PROGRAMFILES_DIR$\$OEM$ System Test
8CLANG=%LANG%
PHOTO_EXE=<ExistFile,$CD_ROOT_DIR$\$APPFOLDER_NAME$\AIOC\pheditor.ex_>
SYS_PHOTO_EXE=<ExistFile,$CD_ROOT_DIR$\$APPFOLDER_NAME$\PhotoEditor\pheditor.ex_>
NO_PHOTO_EXE=Photo executable does not exist on this CD.
PHOTOED_PARAMETER = /p="$OEM$ $MODEL_NAME$"

[PhotoEd_EXTREQ]
$PHOTO_EXE$,EQ,TRUE
$SYS_PHOTO_EXE$,EQ,TRUE
ERROR:$NO_PHOTO_EXE$


[PhotoEd]
Platform=9X,2K_VISTA
OEMCommon=FALSE
SourceLocation=$SOURCE_DIR$
Requires=LeadTool


[PhotoEd_Actions]
[$PRODUCT_INSTALL$]File,Copy,$SOURCE_DIR$\$8CLANG$\ph*.*,$INSTALL_DIR$\
[$PRODUCT_INSTALL$]File,Copy,$SOURCE_DIR$\ph*.*,$INSTALL_DIR$\
[$PRODUCT_INSTALL$]RegistryEntry,Add,HKLM,Software\$REG_APPPATH$\PhotoEditor.exe,,STR,$INSTALL_DIR$\PhEditor.exe
[$PRODUCT_INSTALL$]RegistryEntry,Add,HKLM,Software\$REG_APPPATH$\PhotoEditor.exe,Path,STR,$INSTALL_DIR$\PhEditor.exe
[$PRODUCT_INSTALL$]Shortcut,Add,Startmenu\$FOLDER_NAME$,AllUsers,$INSTALL_DIR$\PhEditor.exe,$PHEDITOR_SHORTCUT$,,$PHOTOED_PARAMETER$
[9X,$PRODUCT_INSTALL$]Shortcut,Add,Startmenu\$FOLDER_NAME$,CurrentUser,$INSTALL_DIR$\PhEditor.exe,$PHEDITOR_SHORTCUT$,,$PHOTOED_PARAMETER$
# SYSTEM TEST INSTALL
[$SYSTEST_INSTALL$]File,Copy,$PHOTO_SOURCE_DIR$\$8CLANG$\*.*,$TEST_DIR$\
[$SYSTEST_INSTALL$]File,Copy,$PHOTO_SOURCE_DIR$\*.*,$TEST_DIR$\
[$SYSTEST_INSTALL$]RegistryEntry,Add,HKLM,Software\$REG_APPPATH$\PhotoEditor.exe,,STR,$TEST_DIR$\PhEditor.exe
[$SYSTEST_INSTALL$]RegistryEntry,Add,HKLM,Software\$REG_APPPATH$\PhotoEditor.exe,Path,STR,$TEST_DIR$\PhEditor.exe
[$SYSTEST_INSTALL$]ShortCut,Add,DESKTOP,$USER$,$TEST_DIR$\pheditor.exe,$OEM$ PhotoEditor

[PhotoEd_PostInstall]
#Post Actions here that need to happen after install is finished
RegistryEntry,Add,HKLM,Software\$REG_APPPATH$\PhEditor.exe,Path,STR,$INSTALL_DIR$
RegistryEntry,Add,HKLM,Software\$REG_APPPATH$\PhEditor.exe,,STR,$INSTALL_DIR$\PhEditor.exe

[PhotoEd_Actions_64]
[$PRODUCT_INSTALL$]File,Copy,$SOURCE_DIR$\$8CLANG$\ph*.*,$INSTALL_DIR64$\
[$PRODUCT_INSTALL$]File,Copy,$SOURCE_DIR$\ph*.*,$INSTALL_DIR64$\
[$PRODUCT_INSTALL$]RegistryEntry,Add,HKLM,Software\$REG_APPPATH64$\PhotoEditor.exe,,STR,$INSTALL_DIR64$\PhEditor.exe
[$PRODUCT_INSTALL$]RegistryEntry,Add,HKLM,Software\$REG_APPPATH64$\PhotoEditor.exe,Path,STR,$INSTALL_DIR64$\PhEditor.exe
[$PRODUCT_INSTALL$]Shortcut,Add,Startmenu\$FOLDER_NAME$,AllUsers,$INSTALL_DIR64$\PhEditor.exe,$PHEDITOR_SHORTCUT$,,$PHOTOED_PARAMETER$


[PhotoEd_PostInstall_64]
#Post Actions here that need to happen after install is finished
RegistryEntry,Add,HKLM,Software\$REG_APPPATH64$\PhEditor.exe,Path,STR,$INSTALL_DIR64$
RegistryEntry,Add,HKLM,Software\$REG_APPPATH64$\PhEditor.exe,,STR,$INSTALL_DIR64$\PhEditor.exe
