Changes between Version 4 and Version 5 of BuildSetup

Sep 2, 2010, 12:34:23 PM (11 years ago)
Matthäus Wander



  • BuildSetup

    v4 v5  
    1 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.
     1Our current configuration uses MsBuild to build a CT2 snapshot and WiX to package it into an MSI setup file.
    3 == Build !CrypTool2 ==
     3== Must-have Requirements ==
    5 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.
     5||= Requirement =||= Ticket =||= Implemented =||
     6|| Check for installation prerequisites (.NET 4, C++ runtimes for native DLLs). Propose download link to user. || #8, #159 || yes for .NET, no for C++ ||
     7|| After installation of CT2 any pathes (default project file, default project path) should be preconfigured to the installation directory selected by user. || #96 || yes ||
     8|| Use assembly versioning scheme which includes SVN revision number. || || yes ||
     9|| Allow coredevs to configure major/minor CT2 version in central location. || || ||
     10|| Upgrade CT2 when installing newer setup file. || #144 || yes ||
     11|| Remove obsolete files no longer included in new setup versions. || #155 || partly (cleans build directory, but does not purge files from installation directory) ||
     12|| Support inclusion of third-party libraries (e.g. msieve, peers@play, external WPF controls, bouncycastle, NativeCryptography). Let trunk developers decide which version of the library to include. Caveat 1: libs may lack strong-names (may conflict with Software Publisher Certificate signing, see below). Caveat 2: libs may lack versioning scheme (may fail upgrade installation). || #149 || ||
     13|| Support inclusion of data files outside of assemblies (e.g. statistics data, wordlists, example texts). Data store should be shared, so that multiple plugins can access the same data files. || || partly ||
     14|| Show Apache license to user during setup. || #148 || yes ||
     15|| Include only one .exe in installation directory. || #150 || ||
     16|| Support running setup as non-admin (may ask for admin privileges if necessary, but catch failures if not granted). || #158 || ||
     17|| Automatically create nightly builds for website. || || yes ||
     18|| Support trunk developers to add their plugin to nightly build on their own. || #154 || ||
     19|| Send mail if nightly build fails. || || yes ||
     20|| Support creating stable milestone setups (manual step by coredev, but with as little work as possible). Use different build configuration than for nightly build. || || ||
     21|| Allow regular trunk developers without access to CrypWin/AnotherEditor sources to build and debug CT2 with both, Visual Studio and Visual C# Express. || || yes ||
     22|| Support internationalization/localization (I18N/L10N) in setup. Part of bigger task to support I18N in whole CT2. || #127 || ? ||
    7 == Update version and product code ==
     24== Nice-to-have Requirements ==
    9 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'''.
    11 ''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).''
    13 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.
    15 ''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.''
    17 ''Note: do not change the !UpgradeCode.''
    19 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.
    21 ''TODO: add explanation why automatic versioning does not work for some plugins.''
    23 You need to update the build number manually in Properties\!AssemblyInfo.cs for the following plugins (subject to change):
    25  * AnotherEditor
    26  * CrypCore
    27  * CrypPluginBase
    28  * FileInput
    29  * FileOutput
    30  * FrequencyTest
    31  * Kasiski
    32  * MD5
    33  * MonoalphabeticAnalysis
    34  * PRESENT
    35  * WEPAttacks
    37 == Build and test setup ==
    39 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.
    41 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\.
    43 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.
    45 ''Note: The setup.exe is not needed for recent Windows environments.''
    47 == Publish setup ==
    49 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.
     26||= Requirement =||= Ticket =||= Implemented =||
     27|| Support x86 and x64. || #106 || yes ||
     28|| Use strong names signing for assemblies. || || yes ||
     29|| Sign setup with Software Publisher Certificate. || || yes ||
     30|| Bind deployment of project samples to build of plugin, i.e. if plugin is included in build, also include its project samples. If plugin is removed from build, do not install associated project files into sample directory. || #151 || ||
     31|| Support grouping of plugins into setup components. || || ||