fifaFS PatchHowTo Tutorial
(c) Mania Software, 2001-2009
http://www.fifasoccer.ru/en
===========================

fifaFS allows to create compact and easy-to-install patches
without using installation packages.


Now there will be an example on how to create patch for FIFA 06,
step by step.


Let's imagine...
You have made 5 faces, 10 kits and a few banners.

Also, you have changed files
	53_title.fsh
	53_title.o
from data\gui\boot\53_legal.big

And finally you've made some changes to 
	fifa.db

Now, you want to make a patch for everybody.
Create a folder 'My Patch' somewhere and start making these steps:


----------------------------------------------------------
 Step 1 - We need to create installation script for fifaFS
----------------------------------------------------------

Open your notepad and write:


set $patch_title$, string{My Patch}
set $patch_version$, string{1.0}
set $patch_author$, string{J. Smith}

if $dir_fifa06$ == string{} 
break FIFA 06 it not installed. Patch aborted.
endif

if exists{$dir_fifa06$\data\fifa.fat} == false
break FIFA 06 is not properly installed. Patch aborted.
endif

if registry{HKEY_LOCAL_MACHINE:SOFTWARE\FIFAFS Patches\$patch_title$:Version} == $patch_version$
break $patch_title$ [$patch_version$] had been already installed.
endif

mountfs $dir_fifa06$\data\

; faces
-ar|1 *|c, faces\*.*

; kits
-ar|1 *|c, kits\*.*

; banners
-ar|1 *|c, banners\*.*

; 53_legal
mountbig $dir_fifa06$\data\gui\boot\53_legal.big, 53_lg
-r 53_title.fsh , legal\53_title.fsh , 53_lg
-r 53_title.o   , legal\53_title.o   , 53_lg

; backup current fifa.db
mkdir $mydocumentsfolder$\$patch_title$\$patch_version$\backup\
copy $dir_fifa06$\data\cmn\fifa.db, $mydocumentsfolder$\$patch_title$\$patch_version$\backup\

; copy db\fifa.db
copy fifa.db, $dir_fifa06$\data\cmn\

; write version to registry
write registry{HKEY_LOCAL_MACHINE:SOFTWARE\FIFAFS Patches\$patch_title$:Version}, $patch_version$



Save that file as install.txt in your 'My Patch' folder.

--------------------------
 Step 2 - create bat file 
--------------------------

Open your notepad again and write:


fifaFS.exe install.txt


Save that file as runme.bat in your folder.


--------------------------------------
 Step 3 - putting everything together
--------------------------------------

In your 'My Patch' folder  create another 5 folders:
kits (put all kit files there)
faces (put all face files there)
banners (put all banner files there)
legal (put 53_title.fsh and 53_title.o there)
db (put your fifa.db there)

Put fifaFS.exe in 'My Patch' folder, 
near to install.txt.

Now compress the folder 'My Patch' with your 
favorite archivator, and the patch is ready!

Tell others to unpack the archive and run runme.bat.

For better usability, use self-extracting archive,
by the way, in WinRAR you can make self-extracting
archive that will execute 'runme.bat' after extraction.
So that, users only have to click twice on your
file and the patch will be installed.



---------------
 For a dessert
---------------

If you want to use fifaFS.exe in your patches or programs, 
you must mention it and put doc's included with fifaFS.exe.

That is our rule.


Feel free to send e-mails on fifaFS subject to
admin@fifasoccer.ru
thegood@fifasoccer.ru


(c) Mania Software, 2001-2008
http://www.fifasoccer.ru/en
