home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GameStar 2003 December
/
Gamestar_57_2003-12_dvd.iso
/
Cestiny
/
nwninst.exe
/
rules.txt
< prev
next >
Wrap
Text File
|
2003-11-05
|
12KB
|
376 lines
#######
## Init - Zavola se automaticky po spusteni programu nastavi zakladni promenny, layout atd.
#######
[Init]
doSection SetVariables
doSection CreateFileSets
set _INFO Vφtejte v instalßtoru ΦeÜtiny Neverwinter Nights + Shadows of Undrentide. (verze 019/5.11.2003)\n
set _IMAGE backgrnd.jpg
SETPATHPARAMS 360 12 10 16777215 Tahoma
SETINFOPARAMS 355 155 270 110 B10 16777215 Tahoma
SETPROGRESSBAR 360 41 progress.jpg
set _PROGRESS 0
button 420 260 but1-1.jpg but1-2.jpg but1-2.jpg None Install
test ${INSTALLPATH} doSection ShowAfterInstallButtons
test ${INSTALLPATH} set _PROGRESS 265
button 404 301 but3-1.jpg but3-2.jpg but3-2.jpg None GetGamePath
button 415 321 but4-1.jpg but4-2.jpg but4-2.jpg None RunGame
button 446 342 but5-1.jpg but5-2.jpg but5-2.jpg None Quit
button 500 400 butx-1.jpg butx-2.jpg butx-2.jpg None Xzone
set _TLK_STYLE BG2
set _TLK_PROGRESS_POINTS 150
set _STRREF no
[ShowAfterInstallButtons]
button 404 280 but2-1.jpg but2-2.jpg but2-2.jpg None Uninstall
#button 70 277 ButL3-1.jpg ButL3-2.jpg ButL3-3.jpg None InstallPatch
############
##
## Sekce ktery se vykonavaj jako reakce na buttony.
##
###########
############
## Install - Nainstaluje hru z lib. adresare
###########
[Install]
set _INFO Instaluje se ΦeÜtina\nProbφhß p°φprava instalace a zßlohovßnφ.....
set _PROGRESS 0
doSection CheckGamePath
doSection CreateDirectories
set _PROGRESS 10
doSection CopyDistribution
set _PROGRESS 70
doSection MakeBackup
set _PROGRESS 100
set _INFO Instaluje se ΦeÜtina\nProbφhß import ΦeskΘho textu do hry a ·prava font∙......
doSection MakeInstall
set _PROGRESS 265
doSection PostInstall
set _INFO Instalace ΦeÜtiny dokonΦena.\nStiskn∞te "Spustit hru" a rovnou to vyzkouÜejte.\nP°ejeme vßm mnoho Üt∞stφ p°i h°e. NWNCZ team
############
## Uninstall - Odinstaluje hru
###########
[Uninstall]
set _INFO ╚eÜtina se odinstalovßvß.....\n(Tento proces je mnohem rychlejÜφ ne₧ instalace) :-)
set _PROGRESS 265
doSection CheckGamePath
doSection SetDirNames
set _PROGRESS 160
set _INFO ╚eÜtina se odinstalovßvß\nProbφhß obnova p∙vodnφch soubor∙.....
doSection RestoreBackup
set _PROGRESS 80
set _INFO ╚eÜtina se odinstalovßvß\nProbφhß mazßnφ soubor∙.....
doSection MakeUninstall
set _PROGRESS 0
set _INFO ╚eÜtina byla odinstalovßna.....\n(nejspφÜ ·sp∞Ün∞)
message ╚eÜtina byla odinstalovßna.....
quit
############
## InstallPatch - Rebuildne dialog.tlk a prida do nej texty ze zvolenyho .patch souboru
###########
[InstallPatch]
doSection CheckGamePath
message Tuto volbu pou₧ijte pouze pokud jste Φlen p°ekladatelskΘho t²mu a mßte k dispozici *.patch soubor s ΦßsteΦn²m p°ekladem.
set _INFO Vyberte soubor s ΦßsteΦn²m p°ekladem (*.patch)
set _PROGRESS 0
set _TLK_PROGRESS_POINTS 450
GETFILEPATH MYPATH Soubory s ΦßsteΦn²m p°ekladem (*.patch) | *.patch
set SOURCETLK ${_TARGETPATH}cestina\dialog_build.tlk
set DSTTLK ${_TARGETPATH}dialog.tlk
test ! ${DSTTLK} set _INFO Zdrojov² dialog ${DSTTLK} nebyl nalezen\nZkuste znovu p°einstalovat ΦeÜtinu.
test ! ${DSTTLK} error Neexistuje zdrojov² dialog ${DSTTLK}
GetFileDate DATE ${DSTTLK}
set _PROGRESS 5
rm ${SOURCETLK}
set _PROGRESS 10
cp ${DSTTLK} ${SOURCETLK}
set _PROGRESS 20
test ${MYPATH} set _INFO Provßdφ se p°evod p°elo₧en²ch °et∞zc∙ do hry\nZdrojov² soubor: ${MYPATH} \nCφlov² soubor: ${DSTTLK} (${DATE})
test ${MYPATH} patch2tlk ${MYPATH} ${SOURCETLK} ${DSTTLK}
test ${MYPATH} SetFileDate DATE ${DSTTLK}
rm ${SOURCETLK}
set _PROGRESS 500
set _INFO Instalace *.patch souboru byla ukonΦena. ${SOURCETLK}
#test ${MYPATH} set _INFO Instalace *.patch souboru byla ukonΦena.\n(Pravd∞podobn∞ ·sp∞Ün∞) :-)
#test ${_TARGETPATH}${MYPATH} set _INFO Instalace *.patch souboru byla stornovßna.\n
#test ! ${_TARGETPATH}${MYPATH} set _INFO Instalace *.patch souboru byla ne·sp∞Ünß\nNebyl nalezen *.patch soubor: ${MYPATH}
############
## RunGame - Spusti hru
###########
[RunGame]
#doSection CheckGamePath
cd ${_TARGETPATH}
exec ${_TARGETPATH}nwn.exe
quit
############
## GetGamePath - Nastavi cestu kam se to bude vsechno instalovat.
###########
[GetGamePath]
message Otev°ete soubor chitin.key (jako jedin² se ukß₧e) v adresß°i s hrou.
GETPATH MYPATH Aurora Engine Hry |chitin.key
test ${MYPATH} set _TARGETPATH ${MYPATH}
############
## Quit - konec, finito, ende, schlus, KOHEU, ..... jasny ?
###########
[Quit]
quit
############
## Xzone - spusti browser (doufam)
###########
[Xzone]
exec http://www.xzone.cz
###########################################
## Podsekce ktere se nevolaji pres buttony
##
###########################################
#######
## doCopyFile - zkopiruje jeden soubor z ${SOURCEDIR}${File} do ${TARGETDIR}${File}
## doEraseFile - smaze soubor z ${TARGETDIR}${File}
#######
[doCopyFile]
#test ${SOURCEDIR}${File} GetFileDate DATE ${SOURCEDIR}${File}
test ${SOURCEDIR}${File} cp ${SOURCEDIR}${File} ${TARGETDIR}${File}
#test ${SOURCEDIR}${File} test ${TARGETDIR}${File} SetFileDate DATE ${TARGETDIR}${File}
[doEraseFile]
test ${TARGETDIR}${File} rm ${TARGETDIR}${File}
[doBackupFile]
#test ${SOURCEDIR}${File} test ! ${TARGETDIR}${File} GetFileDate DATE ${SOURCEDIR}${File}
test ${SOURCEDIR}${File} test ! ${TARGETDIR}${File} cp ${SOURCEDIR}${File} ${TARGETDIR}${File}
#test ${SOURCEDIR}${File} test ! ${TARGETDIR}${File} test ${TARGETDIR}${File} SetFileDate DATE ${TARGETDIR}${File}
#######
## ChecGamePath - Overi nastaveni cesty ke hre.
#######
[CheckGamePath]
test ! ${_TARGETPATH} set _INFO Adresß° '${_TARGETPATH}' neexistuje.\nStiskn∞te tlaΦφtko "Zm∞nit cestu" a nalistujte hru ruΦn∞.
test ! ${_TARGETPATH} error Adresß° se hrou neexistuje \n${_TARGETPATH}
test ! ${_TARGETPATH}dialog.tlk set _INFO V adresß°i '${_TARGETPATH}' se hra nenachßzφ.\nStiskn∞te tlaΦφtko "Zm∞nit cestu" a nalistujte hru ruΦn∞.
test ! ${_TARGETPATH}dialog.tlk error Ve zvolenΘm adresß°i se hra nenachßzφ.
test ! ${_TARGETPATH}nwn.ini set _INFO V adresß°i '${_TARGETPATH}' se nenachßzφ hra NWN.\nStiskn∞te tlaΦφtko "Zm∞nit cestu" a nalistujte hru ruΦn∞.
test ! ${_TARGETPATH}nwn.ini error Ve zvolenΘm adresß°i se nenachßzφ hra NWN.
#######
## SetVariables - Nastavi ruzny uzitecny promenny a pokusi se najit hru. Taky vycucne z registru
## ruzny uzitecny veci treba jako kde je plocha startmenu favorites a atd.
#######
[SetVariables]
set INSTALL_KEY HKEY_LOCAL_MACHINE\Software\BioWare\NWN\cestina\
regset INSTALLPATH ${INSTALL_KEY}path
regset NWNPATH HKEY_LOCAL_MACHINE\Software\BioWare\NWN\Neverwinter\Location
set DEFAULT_PATH C:\NeverwinterNights\nwn\
regset NWNVERZE HKEY_LOCAL_MACHINE\Software\BioWare\NWN\Neverwinter\Version
set _TARGETPATH ${DEFAULT_PATH}
test ${NWNPATH} set _TARGETPATH ${NWNPATH}\
test ${INSTALLPATH} set _TARGETPATH ${INSTALLPATH}
set SOURCEPATH .\
regset PLOCHA HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Desktop
regset STARTMENU HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Programs
regset FAVORITES HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Favorites
set UNINSTALLKEY HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\NWNCZ\
set UNINSTALLLABEL Neverwinter Nights(TM) - ╚eÜtina
#######
## SetDirNames - Nastavi promenne cest podle toho jak byla nastavena _TARGETPATH
#######
[SetDirNames]
set CESTINA ${_TARGETPATH}cestina\
set ZALOHA ${CESTINA}zaloha\
set OVERRIDE ${_TARGETPATH}override\
set ZOVERRIDE ${ZALOHA}override\
set DATADIR ${CESTINA}data\
#######
## CreateDirectories - vytvori adresarovou strukturu pro soubory cestiny.
#######
[CreateDirectories]
doSection SetDirNames
test ! ${_TARGETPATH}override mkdir ${_TARGETPATH}override
test ! ${CESTINA} mkdir ${CESTINA}
test ! ${ZALOHA} mkdir ${ZALOHA}
test ! ${ZOVERRIDE} mkdir ${ZOVERRIDE}
test ! ${DATADIR} mkdir ${DATADIR}
#######
## MakeBackup - vytvori zalohu souboru ktery by se pri instalaci mohly prepsat
#######
[MakeBackup]
set SOURCEDIR ${OVERRIDE}
set TARGETDIR ${ZOVERRIDE}
foreach File in ${Files2Override} do doSection doBackupFile
set SOURCEDIR ${_TARGETPATH}
set TARGETDIR ${ZALOHA}
foreach File in ${Files2rootBk} do doSection doBackupFile
#######
## CopyDistribution - zkopiruje vsechny soubory z instalacniho adresare do adresare hry
## aby se to dalo pozdejc pustit/preinstalovat atd.
#######
[CopyDistribution]
set SOURCEDIR
set TARGETDIR ${DATADIR}
foreach File in ${AllFiles} do doSection doCopyFile
#######
## MakeInstall - nakopiruje vsechny soubory z datadir do prislusnych adresaru hry
#######
[MakeInstall]
set SOURCEDIR ${DATADIR}
set TARGETDIR ${OVERRIDE}
foreach File in ${Files2Override} do doSection doCopyFile
set _PROGRESS 82
#set TARGETDIR ${_TARGETPATH}
#foreach File in ${Files2Root} do doSection doCopyFile
set TARGETDIR ${CESTINA}
foreach File in ${Files2show} do doSection doCopyFile
test ${_TARGETPATH}dialog.tlk cp ${_TARGETPATH}dialog.tlk ${CESTINA}dialogb.tlk
set SOURCETLK ${CESTINA}dialogb.tlk
set DSTTLK ${_TARGETPATH}dialog.tlk
#set _TLK_PROGRESS_POINTS 350
test ! ${SOURCETLK} set _INFO Zdrojov² dialog ${SOURCETLK} nebyl nalezen\nZkuste znovu p°einstalovat ΦeÜtinu.
test ! ${SOURCETLK} error Neexistuje zdrojov² dialog \n${SOURCETLK}
set _PROGRESS 85
#GetFileDate DATE ${_TARGETPATH}dialog.tlk
patch2tlk ${DATADIR}dialog.patch ${SOURCETLK} ${_TARGETPATH}dialog.tlk
#SetFileDate DATE ${_TARGETPATH}dialog.tlk
test ${CESTINA}dialogb.tlk rm ${CESTINA}dialogb.tlk
#######
## PostInstall - nastavi odinstalaci do registru pripadne hodi neco na plochu a tak.
#######
[PostInstall]
regwrite ${_TARGETPATH} ${INSTALL_KEY}Path
set UNINSTALLSTRING ${DATADIR}Setup.exe "${DATADIR}"
regwrite ${UNINSTALLSTRING} ${UNINSTALLKEY}UninstallString
regwrite ${UNINSTALLLABEL} ${UNINSTALLKEY}DisplayName
doSection ShowAfterInstallButtons
message ╚eÜtina byla nainstalovßna. DalÜφ informace najdete v souboru ${CESTINA}infocz.txt.
exec ${CESTINA}Infocz.txt
[RestoreBackup]
set SOURCEDIR ${ZALOHA}
set TARGETDIR ${_TARGETPATH}
foreach File in ${Files2rootBk} do doSection doCopyFile
set SOURCEDIR ${ZOVERRIDE}
set TARGETDIR ${OVERRIDE}
foreach File in ${Files2Override} do doSection doEraseFile
foreach File in ${Files2Override} do doSection doCopyFile
[MakeUninstall]
set _PROGRESS 265
set TARGETDIR ${ZOVERRIDE}
foreach File in ${Files2Override} do doSection doEraseFile
set _PROGRESS 210
set TARGETDIR ${ZALOHA}
foreach File in ${Files2rootBk} do doSection doEraseFile
set _PROGRESS 140
set TARGETDIR ${CESTINA}
foreach File in ${Files2show} do doSection doEraseFile
set _PROGRESS 70
set TARGETDIR ${DATADIR}
foreach File in ${AllFiles} do doSection doEraseFile
set _PROGRESS 20
rmdir ${ZOVERRIDE}
rmdir ${ZALOHA}
rmdir ${DATADIR}
rmdir ${CESTINA}
regdeletekey ${INSTALL_KEY}
regdeletekey ${UNINSTALLKEY}
set _PROGRESS 0
#######
## CreateFileSets - nastavi promenny se seznamama souboru ke kopirovani
#######
[CreateFileSets]
set Files2Override fnt_dialog16x16.tga fnt_galahad14.tga fnt_dialog16x16.txi fnt_galahad14.txi gui_pre_bknd2.tga
set Files4engine setup.exe rules.txt *.jpg dialog.patch infocz.txt movies.txt
set Files2show movies.txt infocz.txt
set Files2rootBk dialog.tlk
#set Files2root infocz.txt
set AllFiles ${Files4engine} ${Files2Override}