Difference between revisions of "IGNFileFormat"

From The Battle for Wesnoth Wiki
m (Removed references to old style)
(Edited for clarity)
Line 1: Line 1:
== What is an .ign file? ==
+
__NOTOC__
  
 
When you upload an add-on, some files and directories are ignored and not uploaded.
 
When you upload an add-on, some files and directories are ignored and not uploaded.
  
If you would prefer to have more control over which files and directories should be ignored, you should provide an .ign file containing a list of filter patterns.
+
If you would prefer to have more control over which files and directories should be ignored, you should provide a <b>_server.ign</b> file containing a list of filter patterns. Each file or directory matching any entry of the _server.ign file will not be included when uploaded to the add-ons server.
  
== What goes into an .ign file? ==
+
== Where do I put the file? ==
  
* Each line should contain exactly one pattern and nothing else.
+
The file should be placed within the root level of your add-on (<code>data/add-ons/addon_name/_server.ign</code>).
* '''*''' and '''?''' wildcards are supported ('''?''' stands for any single character, '''*''' stands for any number of any characters).
 
* Patterns with a trailing forward slash ('''/''') will match directories; the rest only match files.
 
  
== Where do I put the .ign file? ==
+
== What goes into the file? ==
  
The file should be named ''_server.ign'' and placed within the root level of your add-on (''data/add-ons/addon_name/_server.ign'').
+
* Each line should contain exactly one pattern and nothing else.
 +
* <b>*</b> and <b>?</b> wildcards are supported (<b>?</b> stands for any single character, <b>*</b> stands for any number of any characters).
 +
* Patterns with a trailing forward slash (<b>/</b>) will match directories; the rest only match files.
  
== How does this work? ==
+
=== Default values ===
  
If there is no custom ign file present, the default filter as of Wesnoth 1.12 is:
+
If there is no custom _server.ign file present, a default filter will be used instead, which as of Wesnoth 1.12 is as follows:
  
 
  .*
 
  .*
Line 42: Line 42:
 
  *.project
 
  *.project
  
If there is an .ign file, the contents of the file are used as the filter '''instead''' of the defaults. Each file or directory matching any entry of the .ign file will not be uploaded to the add-ons server.
+
If there is a custom _server.ign file, the contents of the file are used as the filter '''instead''' of the defaults, so you should include any of the applicable default exclusions patterns in your own file as well.  
  
 
[[Category:Create]]
 
[[Category:Create]]

Revision as of 16:32, 17 December 2014


When you upload an add-on, some files and directories are ignored and not uploaded.

If you would prefer to have more control over which files and directories should be ignored, you should provide a _server.ign file containing a list of filter patterns. Each file or directory matching any entry of the _server.ign file will not be included when uploaded to the add-ons server.

Where do I put the file?

The file should be placed within the root level of your add-on (data/add-ons/addon_name/_server.ign).

What goes into the file?

  • Each line should contain exactly one pattern and nothing else.
  • * and ? wildcards are supported (? stands for any single character, * stands for any number of any characters).
  • Patterns with a trailing forward slash (/) will match directories; the rest only match files.

Default values

If there is no custom _server.ign file present, a default filter will be used instead, which as of Wesnoth 1.12 is as follows:

.*
.*/
__MACOSX
#*#
*~
*-bak
*.swp
*.pbl
*.ign
_info.cfg
*.exe
*.bat
*.cmd
*.com
*.scr
*.sh
*.js
*.vbs
*.o
Thumbs.db
*.wesnoth
*.project

If there is a custom _server.ign file, the contents of the file are used as the filter instead of the defaults, so you should include any of the applicable default exclusions patterns in your own file as well.