howto: create a release

davidlallen

Deity
Joined
Apr 28, 2008
Messages
4,743
Location
California
In case I get run over by a truck, or somebody else wants to create a release, this thread describes the steps to follow. I do not think there is anything magic here, but the thread may be useful as a checklist for how to prepare a release.
 
The first key point is how to know which files you have changed, to go into a patch release. In Windows XP, you need to understand the "archive" file attribute. Windows keeps a flag for each file to mark whether it is changed or not. Tools like winzip can use this flag to create a zipfile which contains only changed files. When you are creating a patch release such as 1.7.3, you want to include all the changed files since the past major release such as 1.7. Use the archive flag to manage this.

In file explorer, you can view the attributes field, and you can use the properties -> advanced dialog to manage the field. Here is a screenshot.

attachment.php


This shows the properties dialog and the advanced tab. Using this tab, you can set and clear the archive bit. What I do is to install the 1.7 release; then use this dialog to make sure none of the files show as changed; and then modify any files I want to modify. If I edit a file, it now shows up as changed with the "A" field in the attributes column. If I install a patch, all the files show up as changed.

As I develop the patch, the set of changed files grows. I do not have to manage the flag specifically; Windows automatically sets the changed flag on any file which is modified. Using file explorer, I can see the changed flag as an "A" field in the file attributes column. As you see in this screenshot, the only locally changed file is the CvGameCoreDLL.dll file. You may need to use the View menu to make the attributes column visible.

attachment.php


When the patch is ready, I can use a program like winzip to create a zipfile of all the modified files. You do this using the main winzip dialog box shown in this screenshot. Notice the checkbox, "Include only if archive attribute is set". Check this, and the zipfile will contain only changed files. This is what you want for a patch release.

attachment.php


Once you have a zipfile of only the changed files, proceed onto the next post.
 

Attachments

  • patch-screen-1.gif
    patch-screen-1.gif
    14.5 KB · Views: 262
  • patch-screen-2.gif
    patch-screen-2.gif
    18.8 KB · Views: 287
  • patch-screen-3.gif
    patch-screen-3.gif
    6.7 KB · Views: 255
Once you have a zipfile of the changed files, you can make a patch release. I have used the NullSoft Installer script created by phungus420 and others. This creates an "exe" file which automatically knows what directory to install into. This is helpful; but it is certainly possible to use the zipfile of changed files. Almost all civfanatics users can handle installing a zipfile into the mods directory. If you cannot get this step to work, you can skip it, and just release the zipfile.

I have attached the NSI script I used to create the 1.7.3 release. It is a simple text file you can edit with notepad. You may need to change some paths in the file, to match your local installation; but this should be obvious in the first few lines of the script.

You will need to download the nullsoft installer, which you can find easily using google. Once you have the installer installed, you can right click on the NSI file in file explorer. One of the choices in the right click menu will be "Compile NSIS script". Select that, and it will create an exe.

Upload the exe or zip file to the public download site of your choice. I use mediafire; but there is nothing magic about that. For mediafire, I find it helpful to download the file after I upload it, and make sure that the file did not get corrupted. Several times upon uploading a large file, when I download it again it is corrupted and the installer will not run. Deleting it from mediafire and uploading again has always cured this problem.

Once the file is uploaded to a public site, enter the new release into the civfanatics download database. Post the release note to the Welcome thread. Update the first post of the welcome thread and the first post in the Dune Wars modpack thread to point to the release note and download. (If you are not me, you may not have permissions to edit these threads. If I am really gone, then contact the moderators; ask to have the existing thread unstickied, and create a new thread which you can edit. If you look in the Dune Wars forum, you will see an older Welcome thread which had been owned by keldath; so this has happened before.)
 

Attachments

The only difference between a patch release and a major release is that a major release contains all the files. Not just the changed ones. The main reason for doing this is that there may be so many changes, it is simpler to release everything instead of tracking just the changed files. Typically for Dune Wars, a patch release is between 2-10 MB, and a full release is 100 MB. So a lot less bandwidth is consumed by all the downloads of a patch release.

To make a full release, you should know how to use pakbuild. A full release should have all the art files combined into a single pak file. Instructions on using pakbuild can be found in the tutorials subforum.

Once you have created the pak file, you can use the full installer script attached here to create the exe file. You can use notepad to edit the file to change the paths to match your local installation. As with the patch release, there is not really a lot of difference between the full release as an exe, compared to the full release as a zip. Lots of mods use the zipfile approach, and only a very few civfanatics users are unable to install from a zipfile.
 

Attachments

Somewhere in here, I should have pointed out that there is one file in the release, which gives the release number. Before creating a major release or patch release, you should make sure to edit assets/python/CvModName.py, and change the release number to match.
 
For some reason recent installers I've made don't seem to be creating the Dune Wars/UserSettings folder for users that have not played the mod before. Any ideas why this might be?

Edit: This was me being an idiot.
 
Back
Top Bottom