wiki:BuildSetup

Version 4 (modified by Matthäus Wander, 12 years ago) (diff)

md5 added

This page describes how to build a new setup and publish it on the !CrypTool2 webpage. You need SVN core developer access to execute the following steps. As a regular developer you can build and execute !CrypTool2 without creating a setup. See the plugin howto for more information.

Build !CrypTool2

Open the core solution trunk\CoreDeveloper\CrypTool 2.0.sln in Visual Studio 2008. Make sure that the active solution configuration is set to "Release". Build and run the solution. Check if CT2 runs without errors and check some exemplary samples whether they work as expected. Close CT2 if everything is fine.

Update version and product code

Go to your Windows Explorer and browse to trunk\CrypWin\bin\Release\. It should contain a fresh !CrypTool2 build from the above step. Open the properties of CrypWin.exe, select tab Details and memorize or copy the build number of the file. It composes the third number block of the file version. For example if the file version is 2.0.3524.25395, the build number is 3524.

Note: The build number remains static for the current calendar day, even if you compile !CrypTool2 several times. Instead the revision number increases (fourth number block).

Scroll to the CrypToolSetup entry in the Solution Explorer (at the bottom) and left-click on it. Go to the Properties Window and update the build number in the Version field as seen above. A dialog opens and ask you whether to update the ProductCode. Select yes. Then go to the File System view of the setup. Open Application Folder -> uninstall.bat and replace the old ProductCode with the newly created one. Make sure the curly brackets remain.

Note: technically the version number does not need to be equal, it simply must be incremented with each setup. Nevertheless using the same version may help to avoid confusion and is therefore considered as best practice.

Note: do not change the UpgradeCode.

As you may have noticed, the CrypWin build number has been incremented automatically. This is achieved by setting the version number to 2.0.* in Properties\AssemblyInfo.cs. Most plugins use this automatic versioning as well and therefore share the same build number as CrypWin. Unfortunately there are some plugins where this automatic versioning does not work and for them you need to update the version number in each new setup by hand.

TODO: add explanation why automatic versioning does not work for some plugins.

You need to update the build number manually in Properties\AssemblyInfo.cs for the following plugins (subject to change):

  • AnotherEditor
  • CrypCore
  • CrypPluginBase
  • FileInput
  • FileOutput
  • FrequencyTest
  • Kasiski
  • MD5
  • MonoalphabeticAnalysis
  • PRESENT
  • WEPAttacks

Build and test setup

You need VS 2008 with Service Pack 1 to build a setup, otherwise you will get an error with the launch condition for the .NET framework. Note that VS 2008 SP1 is not automatically installed by Windows Update and it is not the same as .NET 3.5 SP1.

Right-click on CrypToolSetup and select Build. If everything goes fine, two files CrypTool-Setup-v2.0.xxxxy(beta).msi and setup.exe will be created in trunk\CoreDeveloper\CrypToolSetup\Release\.

Before publishing the setup on the !CrypTool2 website you (and as possible some other people) should test it. To spread it among the CT2 developers you can move the MSI file to trunk\CrypCurrentVersionDownload\. Replace xxxx in the file name with build number and y with character "a" (respectively "b" for the second setup try on that day with the same build number, "c" for the third and so forth). You can commit it but do not change the file CurrentVersion.txt at this point.

Note: The setup.exe is not needed for recent Windows environments.

Publish setup

After testing the setup and being convinced that it runs smoothly, you can publish it on the website. If you didn't copy and rename the setup file as described in the step above, do it now. Then update the version number in CurrentVersion.txt and commit it. The download link on the CT2 website will be redirected at 3:00 AM CET/CEST to your brand-new setup file.