Difference between revisions of "GRFPack Dev Guide"

From #openttdcoop wiki

Jump to: navigation, search
(New page: ==Updating existing NewGRF== # be sure, if its really a update (md5sum) # commit to SVN with a proper message # Update GRF Table (Trunk) ## edit title with revision number ## check li...)
 
m (Protected "GRFPack Dev Guide" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite)))
 
(39 intermediate revisions by 5 users not shown)
Line 1: Line 1:
==Updating existing NewGRF==
+
__NOTOC__
 +
{{GrfMenu}}
  
# be sure, if its really a update (md5sum)
+
== How-to ==
# commit to SVN with a proper message
+
# Checkout or Update trunk: '''svn co https://svn.openttdcoop.org/grfpack/trunk ottdc_grfpack_trunk''' or '''cd ottdc_grfpack_trunk && svn up'''
# Update [[GRF Table (Trunk)]]
+
# Download the GRF to the right place
## edit title with revision number
+
# '''Open the GRF in OpenTTD'''
## check link, if its still direct to the current revision (grfcrawler isn't always right, TT-Forums should work if no official link available, links mostly change after update there...)
+
# Commit the GRF to REPO: '''svn ci -m "New/Update: ...."'''
## if there is a readme available, a link from column Details would be nice (link to www.openttdcoop.org/newgrfs/...)
+
# Edit the [[GRF_Table_(Trunk)]]
## after update, the credits might also change...
+
# Done
  
 +
== Updating an existing GRF file==
 +
This is a guide to update our #openttdcoop NewGrf Package with [http://subversion.tigris.org/Subversion Subversion] and documenting the changes at [[GRF Table (Trunk)]].
  
== Adding new GRF ==
+
=== General Aspects ===
 +
* GRFs in alpha/beta state change many times and should be checked before releasing a new pack.
 +
* The data from a GRF could differ from the data from the webpage or forum or any other resource. We would suggest to use the data from the GRF.
 +
* Remember that [http://grfcrawler.tt-forums.net/ GRFCrawler] isn't always up-to-date. TT-Forums should work if no official website exists, because the GRFs are mostly update at this place.
 +
* Loading the GRF in OpenTTD might be a good idea for checking title, credits etc. (Title in GRF Table should be the same...).
 +
* If there is a ReadMe available a link in the column 'Details' would be nice (link to www.openttdcoop.org/newgrfs/...).
  
# create a directory in the category, it belongs to. Also possible it needs an other location, because of a special dependency. Then you create a folder "a" or something like that for it, or you move it to top (1_others) or to bottom (9_last). EVERY GRF has its own directory. (svn mkdir; svn add <grf>)
+
=== Updating Procedure ===
# Update [[GRF Table (Trunk)]]
+
# '''Double check''' if it really is an update (md5sum).
## title with revision number
+
# Commit to SVN with a proper message (svn commit).
## link to grf, grfcrawler isn't always right, TT-Forums should work if no official link available, links mostly change after update there...
+
# Update [[GRF Table (Trunk)]].
## if there is a readme available, a link from column Details would be nice (link to www.openttdcoop.org/newgrfs/...)
+
## Edit title and version number.
## don't forget the credits (you see them in the GRF itself...)
+
## Check the link to the GRF authors page (whether its outdated or not - avoid [[wikipedia:HTTP_404|404]])
 +
## After an update the credits might change too.
 +
## Write the '''svn revision''' (of our grfpack) into the status column.
 +
 
 +
== Adding a new GRF file ==
 +
# Create a directory in the category, the NewGrf belongs to. Possibly the NewGrf needs another location because of a special dependency. Then you create a folder with a prefix (e.g. "a_") or you move it to the top directory (1_others) or to bottom (9_last). '''Every''' GRF has its own directory. (svn add <grffolder>).
 +
# Update [[GRF Table (Trunk)]].
 +
## Add the title with version number.
 +
## Add a link to the original resource of the GRF file.
 +
## Do '''not''' forget the credits (you can check them in the GRF file itself).
 +
## Write the '''svn revision''' (of our grfpack) into the status column.
 +
 
 +
== Deleting an old GRF file ==
 +
# Move it to [[GRF Table Removed]] and document the reason(s).
 +
# The GRF itself needs to be moved to z_obsolete for compatibility with older saves.
 +
 
 +
== Revert a commit ==
 +
Change to the directory where the GRF is, then
 +
 
 +
'''svn export -r <revision to revert -1> ./ ./ --force'''
 +
 
 +
Commit the change.
 +
 
 +
== Preambles for SVN commits ==
 +
*'''Update''': Updating an existing NewGrf
 +
*'''New''': Adding a new NewGrf
 +
*'''Orders''': Moving an existing NewGrf to another location to fix order dependencies
 +
*'''Fix''': Fixing some other bugs ;-)
 +
*'''Remove''': Deleting an existing NewGRF (with reason)
 +
*'''Release''': Creating a new tag in /grfpack/tags
 +
 
 +
==Release==
 +
# fdupes -r .
 +
# Create a ''wiki tag'' of [[GRF Table (Trunk)]]. (copy [[GRF Table (Trunk)]] to [[GRF Table $VERSION]])
 +
# Download the GRF Table to trunk. You can use firefox for this job. Go to the wiki page of the grf table, press ctrl-s and save the html files and the images. To conform to the current svn grftable structure, rename the images folder to 'images'. Rename the html file to 'GRFLIST.htm'. Open us the html file and replace the GRF_TABLE_*.*_files (the old images dir name) with 'images'. Open up the htm file to verify that everything works. Copy the html file and the images files to the svn repository and add any new images and commit everything.
 +
# Update the ReadMe file and VERSION file
 +
# Update the 0_info.grf (Script makeinfogrf <version>)
 +
# Update ottdc_grfpack.cfg (Script makenewgrfcfg)
 +
# Tag the Release. (link the tag to tag ottdc_grfpack)
 +
# Generate the release packages. (Script eportpacks (edit the config first ;-) )
 +
# Generating md5sum list @ [http://www.openttdcoop.org/newgrfs/ottdc_grfpack.md5sum http://www.openttdcoop.org/newgrfs/ottdc_grfpack.md5sum]
 +
# http://www.openttdcoop.org/newgrfs/ottdc_grfpack/VERSION should show current available version
 +
 
 +
 
 +
[[Category:GRF]]

Latest revision as of 15:57, 9 March 2010

How-to

  1. Checkout or Update trunk: svn co https://svn.openttdcoop.org/grfpack/trunk ottdc_grfpack_trunk or cd ottdc_grfpack_trunk && svn up
  2. Download the GRF to the right place
  3. Open the GRF in OpenTTD
  4. Commit the GRF to REPO: svn ci -m "New/Update: ...."
  5. Edit the GRF_Table_(Trunk)
  6. Done

Updating an existing GRF file

This is a guide to update our #openttdcoop NewGrf Package with Subversion and documenting the changes at GRF Table (Trunk).

General Aspects

  • GRFs in alpha/beta state change many times and should be checked before releasing a new pack.
  • The data from a GRF could differ from the data from the webpage or forum or any other resource. We would suggest to use the data from the GRF.
  • Remember that GRFCrawler isn't always up-to-date. TT-Forums should work if no official website exists, because the GRFs are mostly update at this place.
  • Loading the GRF in OpenTTD might be a good idea for checking title, credits etc. (Title in GRF Table should be the same...).
  • If there is a ReadMe available a link in the column 'Details' would be nice (link to www.openttdcoop.org/newgrfs/...).

Updating Procedure

  1. Double check if it really is an update (md5sum).
  2. Commit to SVN with a proper message (svn commit).
  3. Update GRF Table (Trunk).
    1. Edit title and version number.
    2. Check the link to the GRF authors page (whether its outdated or not - avoid 404)
    3. After an update the credits might change too.
    4. Write the svn revision (of our grfpack) into the status column.

Adding a new GRF file

  1. Create a directory in the category, the NewGrf belongs to. Possibly the NewGrf needs another location because of a special dependency. Then you create a folder with a prefix (e.g. "a_") or you move it to the top directory (1_others) or to bottom (9_last). Every GRF has its own directory. (svn add <grffolder>).
  2. Update GRF Table (Trunk).
    1. Add the title with version number.
    2. Add a link to the original resource of the GRF file.
    3. Do not forget the credits (you can check them in the GRF file itself).
    4. Write the svn revision (of our grfpack) into the status column.

Deleting an old GRF file

  1. Move it to GRF Table Removed and document the reason(s).
  2. The GRF itself needs to be moved to z_obsolete for compatibility with older saves.

Revert a commit

Change to the directory where the GRF is, then

svn export -r <revision to revert -1> ./ ./ --force

Commit the change.

Preambles for SVN commits

  • Update: Updating an existing NewGrf
  • New: Adding a new NewGrf
  • Orders: Moving an existing NewGrf to another location to fix order dependencies
  • Fix: Fixing some other bugs ;-)
  • Remove: Deleting an existing NewGRF (with reason)
  • Release: Creating a new tag in /grfpack/tags

Release

  1. fdupes -r .
  2. Create a wiki tag of GRF Table (Trunk). (copy GRF Table (Trunk) to GRF Table $VERSION)
  3. Download the GRF Table to trunk. You can use firefox for this job. Go to the wiki page of the grf table, press ctrl-s and save the html files and the images. To conform to the current svn grftable structure, rename the images folder to 'images'. Rename the html file to 'GRFLIST.htm'. Open us the html file and replace the GRF_TABLE_*.*_files (the old images dir name) with 'images'. Open up the htm file to verify that everything works. Copy the html file and the images files to the svn repository and add any new images and commit everything.
  4. Update the ReadMe file and VERSION file
  5. Update the 0_info.grf (Script makeinfogrf <version>)
  6. Update ottdc_grfpack.cfg (Script makenewgrfcfg)
  7. Tag the Release. (link the tag to tag ottdc_grfpack)
  8. Generate the release packages. (Script eportpacks (edit the config first ;-) )
  9. Generating md5sum list @ http://www.openttdcoop.org/newgrfs/ottdc_grfpack.md5sum
  10. http://www.openttdcoop.org/newgrfs/ottdc_grfpack/VERSION should show current available version
Powered by MediaWiki
  • This page was last modified on 9 March 2010, at 15:57.