Technical support > Windows
Proposal for /base/archives.bat
(1/1)
odie:
Hi,
I read the archives.bat batch file in /base, and realises that it works on updating files only.
My question is what if there are new update / revised files?
Can i propose the original code
--- Code: ---rem NOTE: This batch file requires you to have the 7-zip command line utility, 7za.exe, in your path.
rem You can get this utility here: http://www.7-zip.org/download.html
rem -r recurse subdirectories. for example, this ensures that 0models.pk3 will contain stuff from "models\aliens" as well as "models".
7za a -tzip 0base.pk3 *.cfg irc_motd.txt -x!".svn"
7za a -r -tzip 0maps.pk3 materials\*.mat maps\*.bsp maps\*.ump -x!".svn"
7za a -r -tzip 0media.pk3 shaders\*.fp shaders\*.vp media\*.ttf -x!".svn"
7za a -r -tzip 0models.pk3 models\*.md2 models\*.md3 models\*.jpg models\*.png models\*.tga models\*.anm models\*.txt models\*.tag -x!".svn"
7za a -r -tzip 0music.pk3 music\*.ogg -x!".svn"
7za a -r -tzip 0pics.pk3 pics\*.jpg pics\*.tga pics\*.png textures\*.jpg textures\*.tga textures\*.png -x!".svn"
7za a -r -tzip 0snd.pk3 sound\*.ogg sound\*.wav -x!".svn"
7za a -r -tzip 0ufos.pk3 ufos\*.ufo -x!".svn"
7za a -r -tzip 0vids.pk3 videos\*.roq -x!".svn"
--- End code ---
be updated to:
--- Code: ---rem NOTE: This batch file requires you to have the 7-zip command line utility, 7za.exe, in your path.
rem You can get this utility here: http://www.7-zip.org/download.html
rem -r recurse subdirectories. for example, this ensures that 0models.pk3 will contain stuff from "models\aliens" as well as "models".
7za u -tzip 0base.pk3 *.cfg irc_motd.txt -x!".svn"
7za u -r -tzip 0maps.pk3 materials\*.mat maps\*.bsp maps\*.ump -x!".svn"
7za u -r -tzip 0media.pk3 shaders\*.fp shaders\*.vp media\*.ttf -x!".svn"
7za u -r -tzip 0models.pk3 models\*.md2 models\*.md3 models\*.jpg models\*.png models\*.tga models\*.anm models\*.txt models\*.tag -x!".svn"
7za u -r -tzip 0music.pk3 music\*.ogg -x!".svn"
7za u -r -tzip 0pics.pk3 pics\*.jpg pics\*.tga pics\*.png textures\*.jpg textures\*.tga textures\*.png -x!".svn"
7za u -r -tzip 0snd.pk3 sound\*.ogg sound\*.wav -x!".svn"
7za u -r -tzip 0ufos.pk3 ufos\*.ufo -x!".svn"
7za u -r -tzip 0vids.pk3 videos\*.roq -x!".svn"
--- End code ---
The a is for adding files to archives.
u is for updating, which should include adding new files, and refreshing old files.
For the uninformed of what the breakdown of the command is:
7za - the program used, 7za (a dos version of 7zip, a free archiver)
a - add files
u - update files
-tzip - specifies the type of archives, in this case, type = zip
the pk3 file name - eg 0vids.pk3 = the name of the archive
This is followed by a path\*.extension = the files to be archives, in this case is a wildcard.
-x".svn" = this tells the batch file not to include the file .svn, which is the file used for SVN updates and such.
Mattn:
please submit a patch to our patch tracker - i will have a look when i find the time.
odie:
--- Quote from: Mattn on April 15, 2009, 07:59:38 am ---please submit a patch to our patch tracker - i will have a look when i find the time.
--- End quote ---
Hi mattn,
Done that. :)
odie:
Okie, case closed.
Accepted.
Refer to: Proposed New Batch File for Archives.bat in Compiling pk3 Files
Navigation
[0] Message Index
Go to full version