<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to WindowsBuild</title><link>https://sourceforge.net/p/xtrkcad-fork/wiki/WindowsBuild/</link><description>Recent changes to WindowsBuild</description><atom:link href="https://sourceforge.net/p/xtrkcad-fork/wiki/WindowsBuild/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 24 Jun 2025 02:38:51 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/xtrkcad-fork/wiki/WindowsBuild/feed" rel="self" type="application/rss+xml"/><item><title>WindowsBuild modified by Russell Shilling</title><link>https://sourceforge.net/p/xtrkcad-fork/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v9
+++ v10
@@ -92,9 +92,9 @@
 #### Fetch

 Launch **TortoiseHg** Workbench
-* Configure TortoiseHg to use SSH.  Copy your private key into the .ssh folder as shown below. Edit the Settings and add the following in the [ui] section:
-    [ui]
-    ssh = "C:\Program Files\TortoiseHg\lib\tortoiseplink.exe" -ssh -i "C:\Users\USER\.ssh\sfprivate.ppk"
+* Configure TortoiseHg to use SSH.  Copy your private key into the .ssh folder shown below. Edit the Settings and add the following in the \[ui\] section:
+    \[ui\]
+    ssh = "C:\Program Files\TortoiseHg\lib\tortoiseplink.exe" -ssh -i "C:\Users\WINDOWSUSER\.ssh\sfprivate.ppk"
 * Create a new repository.  This will be the folder containing your source code.
 * Set the URL alias for the new read-only repository to &amp;gt;ssh://hg.code.sf.net/p/xtrkcad-fork/xtrkcad

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Russell Shilling</dc:creator><pubDate>Tue, 24 Jun 2025 02:38:51 -0000</pubDate><guid>https://sourceforge.netf2fb099f6d2a7a9680d946deeaa843a2498d197f</guid></item><item><title>WindowsBuild modified by Russell Shilling</title><link>https://sourceforge.net/p/xtrkcad-fork/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v8
+++ v9
@@ -92,8 +92,11 @@
 #### Fetch

 Launch **TortoiseHg** Workbench
+* Configure TortoiseHg to use SSH.  Copy your private key into the .ssh folder as shown below. Edit the Settings and add the following in the [ui] section:
+    [ui]
+    ssh = "C:\Program Files\TortoiseHg\lib\tortoiseplink.exe" -ssh -i "C:\Users\USER\.ssh\sfprivate.ppk"
 * Create a new repository.  This will be the folder containing your source code.
-* Set the URL alias for the new read-only repository to &amp;gt;http://hg.code.sf.net/p/xtrkcad-fork/xtrkcad
+* Set the URL alias for the new read-only repository to &amp;gt;ssh://hg.code.sf.net/p/xtrkcad-fork/xtrkcad

 * If you are going to be pushing changes you will need to use your sourceforge USERNAME
 &amp;gt;ssh://USERNAME@hg.code.sf.net/p/xtrkcad-fork/xtrkcad
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Russell Shilling</dc:creator><pubDate>Tue, 24 Jun 2025 02:28:49 -0000</pubDate><guid>https://sourceforge.net3a993b6c89cadb35507f3f550a23aedbd64c5a9b</guid></item><item><title>WindowsBuild modified by Martin Fischer</title><link>https://sourceforge.net/p/xtrkcad-fork/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v7
+++ v8
@@ -32,9 +32,12 @@
 _Libzip:_ https://libzip.org/ and _zlib:_ https://github.com/madler/zlib brings the functionality to read and write the extended file format. See [HowtoBuildLibzip] for instructions on building libzip and zlib in Visual Studio.

 #### **MiniXML**
+**Attention** At the time of writing, MiniXML 4.x.y is available. This cannot  be used for XTrackCAD.  Get version 3.3.1 instead. 
+The following instructions are valid for that version.

 Creating SVG exports depends on the _MiniXML library:_ https://www.msweet.org/mxml/. If this library cannot be found in the build system **XTrackCAD** is built anyway but won't include SVG export.
 **Note** The library and the main program share objects from the C Runtime Library. Therefore it is necessary to select the same runtime when building the mxml library and **XTrackCAD**. Using the the vcnet/mxml.sln provided with the source package of **MiniXML** build the solution mxmlstat. After complete copy mxmlstat.lib and mxml.h to the external tree into the **((architecture))/mxml** directory eg **x64/mxml**.
+

 #### Optional development tools

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Martin Fischer</dc:creator><pubDate>Wed, 12 Mar 2025 15:33:35 -0000</pubDate><guid>https://sourceforge.net952081db3a112d1dbaf49653ead86257b2dd99d8</guid></item><item><title>WindowsBuild modified by Martin Fischer</title><link>https://sourceforge.net/p/xtrkcad-fork/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -29,7 +29,7 @@

 #### Libzip/ZLib

-_Libzip:_ https://libzip.org/ and _zlib:_ https://github.com/madler/zlib brings the functionality to read and write the extended file format. See [HowtoBuildLibzip] for instructions on building lipzip and zlib in Visual Studio.
+_Libzip:_ https://libzip.org/ and _zlib:_ https://github.com/madler/zlib brings the functionality to read and write the extended file format. See [HowtoBuildLibzip] for instructions on building libzip and zlib in Visual Studio.

 #### **MiniXML**

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Martin Fischer</dc:creator><pubDate>Mon, 10 Mar 2025 19:10:31 -0000</pubDate><guid>https://sourceforge.net1361a3b58ec9b94eebc18aa0725fb361c1e8a4c0</guid></item><item><title>WindowsBuild modified by Martin Fischer</title><link>https://sourceforge.net/p/xtrkcad-fork/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -17,11 +17,11 @@

 #### **GetText**

-Install gettext for windows. Download from http://gnuwin32.sourceforge.net/packages/gettext.htm
+Download _gettext_ from http://gnuwin32.sourceforge.net/packages/gettext.htm and install using the setup program. 

 #### NSIS

-Download from https://nsis.sourceforge.io/
+_NSIS_ is used to create the installer for Windows. Download from https://nsis.sourceforge.io/

 #### **FreeImage**

@@ -29,12 +29,12 @@

 #### Libzip/ZLib

-_Libzip:_ https://libzip.org/ and _zlib:_ https://github.com/madler/zlib brings the functionality to read and write the extended file format. See HowtoBuildLibzip for instructions on building lipzip and zlib in Visual Studio.
+_Libzip:_ https://libzip.org/ and _zlib:_ https://github.com/madler/zlib brings the functionality to read and write the extended file format. See [HowtoBuildLibzip] for instructions on building lipzip and zlib in Visual Studio.

 #### **MiniXML**

 Creating SVG exports depends on the _MiniXML library:_ https://www.msweet.org/mxml/. If this library cannot be found in the build system **XTrackCAD** is built anyway but won't include SVG export.
-**Note** The library and the main program share objects from the C Runtime Library. Therefore it is necessary to select the same runtime when building the mxml library and **XTrackCAD**. Using the the vcnet/mxml.sln provided with the source package of **MiniXML** build the solution mxmlstat. After complete copy mxmlstat.lib and mxml.h to the external tree into the ##**((architecture))/mxml**## directory eg ##x64/mxml##.
+**Note** The library and the main program share objects from the C Runtime Library. Therefore it is necessary to select the same runtime when building the mxml library and **XTrackCAD**. Using the the vcnet/mxml.sln provided with the source package of **MiniXML** build the solution mxmlstat. After complete copy mxmlstat.lib and mxml.h to the external tree into the **((architecture))/mxml** directory eg **x64/mxml**.

 #### Optional development tools

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Martin Fischer</dc:creator><pubDate>Mon, 10 Mar 2025 12:02:08 -0000</pubDate><guid>https://sourceforge.neta493068d1d3e9b16ddfaafe55032925c49a42720</guid></item><item><title>WindowsBuild modified by Russell Shilling</title><link>https://sourceforge.net/p/xtrkcad-fork/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -145,7 +145,7 @@
 Open a command window and execute 

 &amp;gt;(language-ref)
-&amp;gt; cd [builddir]
+&amp;gt; cd (build-directory)
 &amp;gt; cpack --config CPackSourceConfig.cmake
 CPack: Create package using ZIP
 CPack: Install projects
@@ -157,11 +157,11 @@

 ### Code Signing

-''Currently we don't have a code signing certicate. This step can be omitted.'' In case signing the executable is wanted open the Visual Studio shell:
+''Currently we don't have a code signing certificate. This step can be omitted.'' In case signing the executable is wanted open the Visual Studio shell:
 &amp;gt;
-&amp;gt;cd [builddirectory]/app/bin/Release
+&amp;gt;cd (build-directory)/app/bin/Release
 &amp;gt;signtool sign /f certfile /p password xtrkcad.exe
-&amp;gt;cd [builddirectory]
+&amp;gt;cd (build-directory)
 &amp;gt;cpack
 &amp;gt;signtool sign /f certfile /p password xtrkcad-setup-4.2.4a.exe

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Russell Shilling</dc:creator><pubDate>Sun, 28 Apr 2024 18:47:16 -0000</pubDate><guid>https://sourceforge.net1bab19910ee63fcac7588629968626e262451092</guid></item><item><title>WindowsBuild modified by Russell Shilling</title><link>https://sourceforge.net/p/xtrkcad-fork/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -25,23 +25,23 @@

 #### **FreeImage**

-_FreeImage:_ [http://freeimage.sourceforge.net/] is used for loading and rendering the backgrounds.
+_FreeImage:_ http://freeimage.sourceforge.net/ is used for loading and rendering the backgrounds.

 #### Libzip/ZLib

-_Libzip:_ [https://libzip.org/] and _zlib:_ [https://github.com/madler/zlib] brings the functionality to read and write the extended file format. See HowtoBuildLibzip for instructions on building lipzip and zlib in Visual Studio.
+_Libzip:_ https://libzip.org/ and _zlib:_ https://github.com/madler/zlib brings the functionality to read and write the extended file format. See HowtoBuildLibzip for instructions on building lipzip and zlib in Visual Studio.

 #### **MiniXML**

-Creating SVG exports depends on the _MiniXML library:_ [https://www.msweet.org/mxml/]. If this library cannot be found in the build system **XTrackCAD** is built anyway but won't include SVG export.
+Creating SVG exports depends on the _MiniXML library:_ https://www.msweet.org/mxml/. If this library cannot be found in the build system **XTrackCAD** is built anyway but won't include SVG export.
 **Note** The library and the main program share objects from the C Runtime Library. Therefore it is necessary to select the same runtime when building the mxml library and **XTrackCAD**. Using the the vcnet/mxml.sln provided with the source package of **MiniXML** build the solution mxmlstat. After complete copy mxmlstat.lib and mxml.h to the external tree into the ##**((architecture))/mxml**## directory eg ##x64/mxml##.

 #### Optional development tools

 The following tools can be used to make development easier but are not required.
-* _CMocka:_ [https://cmocka.org/] is a unit testing framework that can be used for testing some features.
-* _Doxygen:_ [http://www.doxygen.nl/] documentation can be created to ease navigation through the source code.     
-* For some document generation _pandoc:_ [https://pandoc.org/] is used.
+* _CMocka:_ https://cmocka.org/ is a unit testing framework that can be used for testing some features.
+* _Doxygen:_ http://www.doxygen.nl/ documentation can be created to ease navigation through the source code.   
+* For some document generation _pandoc:_ https://pandoc.org/ is used.

 ### Build

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Russell Shilling</dc:creator><pubDate>Sun, 28 Apr 2024 18:44:44 -0000</pubDate><guid>https://sourceforge.net57334dcfb1da6d3c38b6d67c7e99391098ce9d3a</guid></item><item><title>WindowsBuild modified by Russell Shilling</title><link>https://sourceforge.net/p/xtrkcad-fork/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -77,12 +77,12 @@
 Note: the contents of the zlib and libzip directories isn't shown in detail. This will be filled correctly by using the approach described in HowtoBuildLibzip.

 Using this setup the CMake modules included will automatically find and resolve all dependencies for building under Windows. Use CMake-GUI to create the project files needed by Visual Studio. You can have both 32-bit and 64-bit builds by using separate directories for each destination. I set up my source and build folders within my main **XTrackCAD** folder like this: 
-&amp;gt;
-XTrackCAD ------+-- xtrkcad - Source files from SourceForge
-       |
-       +-- buildx64 - Folder for 64-bit binaries
-       |
-       +-- buildx86 - Folder for 32-bit binaries
+
+| Root | Folder | Contents |
+| --- | --- | --- |
+| XTrackCAD | xtrkcad | Source files from SourceForge |
+|   | buildx64 | Folder for 64-bit binaries |
+|   | buildx86 | Folder for 32-bit binaries |



&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Russell Shilling</dc:creator><pubDate>Sat, 27 Apr 2024 21:14:07 -0000</pubDate><guid>https://sourceforge.net3b4b276aea9f0b7215ac2d155cc092a4e12a72d6</guid></item><item><title>WindowsBuild modified by Russell Shilling</title><link>https://sourceforge.net/p/xtrkcad-fork/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -55,29 +55,24 @@
    1) Inside that directory create additional directories per dependency.

 The complete structure is
-&amp;gt;
-XTCEXTERN ------+-- x64--+-- FreeImage -- FreeImage.dll, FreeImage.h, FreeImage.lib
-       |        |
-       |        +-- libzip ---+- bin
-       |        |             +- include
-       |        |             +- lib
-       |        |             +- share
-       |        |
-       |        +-- mxml ----- mxml.h, mxmlstat.lib
-       |        |
-       |        +-- zlib -----+- bin
-       |        |             +- include
-       |        |             +- lib
-       |        |             +- share      
-       |
-       +-- x86--+-- FreeImage -- FreeImage.dll, FreeImage.h, FreeImage.lib
-            |
-            +-- libzip ----- &amp;lt;&amp;lt;as above="" for="" x64=""&amp;gt;&amp;gt;
-            |
-            +-- mxml ----- &amp;lt;&amp;lt;as above="" for="" x64=""&amp;gt;&amp;gt;
-            |
-            +-- zlib ------- &amp;lt;&amp;lt;as above="" for="" x64=""&amp;gt;&amp;gt;

+| Root | Architecture | Folder | Contents |
+| --- | --- | --- | --- |
+| XTCEXTERN | x64 | FreeImage | FreeImage.dll, FreeImage.h, FreeImage.lib |
+|   |   | libzip | bin |
+|   |   |   | include |
+|   |   |   | lib |
+|   |   |   | share |
+|   |   |  mxml | mxml.h, mxmlstat.lib |
+|   |   | zlib | bin |
+|   |   |   | include |
+|   |   |   | lib |
+|   |   |   | share |
+|   |   |   |   |
+|    | x86 | FreeImage | FreeImage.dll, FreeImage.h, FreeImage.lib |
+|   |   |  libzip | **as above for x64** |
+|   |   |  mxml | **as above for x64** |
+|   |   |  zlib | **as above for x64** |

 Note: the contents of the zlib and libzip directories isn't shown in detail. This will be filled correctly by using the approach described in HowtoBuildLibzip.

&amp;lt;/as&amp;gt;&amp;lt;/as&amp;gt;&amp;lt;/as&amp;gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Russell Shilling</dc:creator><pubDate>Sat, 27 Apr 2024 21:11:39 -0000</pubDate><guid>https://sourceforge.netbeabfdf97693b5c0afa0ddd84b9d2b403587380d</guid></item><item><title>WindowsBuild modified by Russell Shilling</title><link>https://sourceforge.net/p/xtrkcad-fork/wiki/WindowsBuild/</link><description>&lt;div class="markdown_content"&gt;&lt;h2 id="windows-build"&gt;Windows Build&lt;/h2&gt;
&lt;h3 id="prerequisites"&gt;Prerequisites&lt;/h3&gt;
&lt;h4 id="mercurial"&gt;Mercurial&lt;/h4&gt;
&lt;p&gt;Install &lt;strong&gt;TortoiseHg&lt;/strong&gt; (5.6 or greater) 64bit from &lt;a href="http://www.mercurial-scm.org" rel="nofollow"&gt;http://www.mercurial-scm.org&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="visual-studio"&gt;Visual Studio&lt;/h4&gt;
&lt;p&gt;Install MSVC Community from &lt;a href="https://visualstudio.microsoft.com/downloads/" rel="nofollow"&gt;https://visualstudio.microsoft.com/downloads/&lt;/a&gt;&lt;br/&gt;
When installing, choose Desktop Development with &lt;strong&gt;C++&lt;/strong&gt;&lt;/p&gt;
&lt;h4 id="help"&gt;Help&lt;/h4&gt;
&lt;p&gt;Goto to &lt;a href="http://microsoft.com" rel="nofollow"&gt;http://microsoft.com&lt;/a&gt; and search for &lt;em&gt;html help workshop download&lt;/em&gt;.  Download htmlhelp.exe and run it.  This will install the HTML Help tools.&lt;/p&gt;
&lt;h4 id="gettext"&gt;&lt;strong&gt;GetText&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Install gettext for windows. Download from &lt;a href="http://gnuwin32.sourceforge.net/packages/gettext.htm" rel="nofollow"&gt;http://gnuwin32.sourceforge.net/packages/gettext.htm&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="nsis"&gt;NSIS&lt;/h4&gt;
&lt;p&gt;Download from &lt;a href="https://nsis.sourceforge.io/" rel="nofollow"&gt;https://nsis.sourceforge.io/&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="freeimage"&gt;&lt;strong&gt;FreeImage&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;FreeImage:&lt;/em&gt; &lt;span&gt;[http://freeimage.sourceforge.net/]&lt;/span&gt; is used for loading and rendering the backgrounds.&lt;/p&gt;
&lt;h4 id="libzipzlib"&gt;Libzip/ZLib&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Libzip:&lt;/em&gt; &lt;span&gt;[https://libzip.org/]&lt;/span&gt; and &lt;em&gt;zlib:&lt;/em&gt; &lt;span&gt;[https://github.com/madler/zlib]&lt;/span&gt; brings the functionality to read and write the extended file format. See HowtoBuildLibzip for instructions on building lipzip and zlib in Visual Studio.&lt;/p&gt;
&lt;h4 id="minixml"&gt;&lt;strong&gt;MiniXML&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Creating SVG exports depends on the &lt;em&gt;MiniXML library:&lt;/em&gt; &lt;span&gt;[https://www.msweet.org/mxml/]&lt;/span&gt;. If this library cannot be found in the build system &lt;strong&gt;XTrackCAD&lt;/strong&gt; is built anyway but won't include SVG export.&lt;br/&gt;
&lt;strong&gt;Note&lt;/strong&gt; The library and the main program share objects from the C Runtime Library. Therefore it is necessary to select the same runtime when building the mxml library and &lt;strong&gt;XTrackCAD&lt;/strong&gt;. Using the the vcnet/mxml.sln provided with the source package of &lt;strong&gt;MiniXML&lt;/strong&gt; build the solution mxmlstat. After complete copy mxmlstat.lib and mxml.h to the external tree into the ##&lt;strong&gt;((architecture))/mxml&lt;/strong&gt;## directory eg ##x64/mxml##.&lt;/p&gt;
&lt;h4 id="optional-development-tools"&gt;Optional development tools&lt;/h4&gt;
&lt;p&gt;The following tools can be used to make development easier but are not required.&lt;br/&gt;
* &lt;em&gt;CMocka:&lt;/em&gt; &lt;span&gt;[https://cmocka.org/]&lt;/span&gt; is a unit testing framework that can be used for testing some features.&lt;br/&gt;
* &lt;em&gt;Doxygen:&lt;/em&gt; &lt;span&gt;[http://www.doxygen.nl/]&lt;/span&gt; documentation can be created to ease navigation through the source code.&lt;br/&gt;
* For some document generation &lt;em&gt;pandoc:&lt;/em&gt; &lt;span&gt;[https://pandoc.org/]&lt;/span&gt; is used.&lt;/p&gt;
&lt;h3 id="build"&gt;Build&lt;/h3&gt;
&lt;h4 id="third-party-tools"&gt;Third Party Tools&lt;/h4&gt;
&lt;p&gt;Not all of these libs have a standard installation method for Windows. For &lt;strong&gt;XTrackCAD&lt;/strong&gt; the following setup is recommended:&lt;br/&gt;
    1) create a directory for all external dependencies, eg. C:\Users\&amp;lt;yourid&amp;gt;\Documents\&lt;strong&gt;XTrackCAD&lt;/strong&gt;/XTCEXTERN&lt;br/&gt;
    1) set the environment variable XTCEXTERNALROOT to that complete path.&lt;br/&gt;
    1) in the root directory create a directory x86 for the 32 bit dependencies and x64 for the 64-bit dependencies.&lt;br/&gt;
    1) Inside that directory create additional directories per dependency.&amp;lt;/yourid&amp;gt;&lt;/p&gt;
&lt;p&gt;The complete structure is&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;XTCEXTERN ------+-- x64--+-- FreeImage -- FreeImage.dll, FreeImage.h, FreeImage.lib&lt;br/&gt;
        |        |&lt;br/&gt;
        |        +-- libzip ---+- bin&lt;br/&gt;
        |        |             +- include&lt;br/&gt;
        |        |             +- lib&lt;br/&gt;
        |        |             +- share&lt;br/&gt;
        |        |&lt;br/&gt;
        |        +-- mxml ----- mxml.h, mxmlstat.lib&lt;br/&gt;
        |        |&lt;br/&gt;
        |        +-- zlib -----+- bin&lt;br/&gt;
        |        |             +- include&lt;br/&gt;
        |        |             +- lib&lt;br/&gt;
        |        |             +- share    &lt;br/&gt;
        |&lt;br/&gt;
        +-- x86--+-- FreeImage -- FreeImage.dll, FreeImage.h, FreeImage.lib&lt;br/&gt;
             |&lt;br/&gt;
             +-- libzip ----- &amp;lt;&amp;lt;as above="" for="" x64=""&amp;gt;&amp;gt;&lt;br/&gt;
             |&lt;br/&gt;
             +-- mxml ----- &amp;lt;&amp;lt;as above="" for="" x64=""&amp;gt;&amp;gt;&lt;br/&gt;
             |&lt;br/&gt;
             +-- zlib ------- &amp;lt;&amp;lt;as above="" for="" x64=""&amp;gt;&amp;gt;&amp;lt;/as&amp;gt;&amp;lt;/as&amp;gt;&amp;lt;/as&amp;gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Note: the contents of the zlib and libzip directories isn't shown in detail. This will be filled correctly by using the approach described in HowtoBuildLibzip.&lt;/p&gt;
&lt;p&gt;Using this setup the CMake modules included will automatically find and resolve all dependencies for building under Windows. Use CMake-GUI to create the project files needed by Visual Studio. You can have both 32-bit and 64-bit builds by using separate directories for each destination. I set up my source and build folders within my main &lt;strong&gt;XTrackCAD&lt;/strong&gt; folder like this: &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;XTrackCAD ------+-- xtrkcad - Source files from SourceForge&lt;br/&gt;
        |&lt;br/&gt;
        +-- buildx64 - Folder for 64-bit binaries&lt;br/&gt;
        |&lt;br/&gt;
        +-- buildx86 - Folder for 32-bit binaries&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id="fetch"&gt;Fetch&lt;/h4&gt;
&lt;p&gt;Launch &lt;strong&gt;TortoiseHg&lt;/strong&gt; Workbench&lt;br/&gt;
* Create a new repository.  This will be the folder containing your source code.&lt;br/&gt;
* Set the URL alias for the new read-only repository to &amp;gt;http://hg.code.sf.net/p/xtrkcad-fork/xtrkcad&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you are going to be pushing changes you will need to use your sourceforge USERNAME&lt;blockquote&gt;
&lt;p&gt;ssh://USERNAME@hg.code.sf.net/p/xtrkcad-fork/xtrkcad&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;@@{{image url="images/WindowsBuild/thg-1.png" title="TortioseHg Setup" alt="TortoiseHg Setup"}}@@&lt;br/&gt;
* pull incoming changes&lt;br/&gt;
* update to the desired branch&lt;br/&gt;
This might complain about differences in .hgignore.  If so, check 'Discard local changes, no backup' on the Update dialog and try again.&lt;/p&gt;
&lt;h4 id="cmake"&gt;CMake&lt;/h4&gt;
&lt;p&gt;Install cmake (3.18.4 or greater) win64 from &lt;a href="https://cmake.org/download" rel="nofollow"&gt;https://cmake.org/download&lt;/a&gt;&lt;br/&gt;
* Launch CMake-gui&lt;br/&gt;
* Select the build folder (from above) corresponding to the project you want to build (x64 or x86)&lt;br/&gt;
* Run cmake-gui: generator = Visual Studio 16 2019, platform = &amp;lt;blank&amp;gt; for x64, win32 for x86, optional toolset = &amp;lt;blank&amp;gt;, use default native compilers. &lt;br/&gt;
* Configure, Generate, then Open Solution&amp;lt;/blank&amp;gt;&amp;lt;/blank&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;32-bit Build&lt;/strong&gt;&lt;br/&gt;
&lt;img alt="Toolchain 32-bit" rel="nofollow" src="https://xtrkcad-fork.sf.net/images/WindowsBuild/CMake-1.png"/&gt; &lt;br/&gt;
@@{{image url="images/WindowsBuild/CMake-2.png" title="CMake Setup 32-bit" alt="CMake Setup 32-bit"}}@@&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;64-bit Build&lt;/strong&gt;&lt;br/&gt;
&lt;img alt="Toolchain 64-bit" rel="nofollow" src="https://xtrkcad-fork.sf.net/images/WindowsBuild/CMake-3.png"/&gt; &lt;br/&gt;
@@{{image url="images/WindowsBuild/CMake-4.png" title="CMake Setup 64-bit" alt="CMake Setup 64-bit"}}@@&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You will see a number of configuration values to set.  We only need to deal with 2:&lt;br/&gt;
~~ &lt;strong&gt;CMAKE_CONFIGURATION_TYPE&lt;/strong&gt;: Set to Debug or &lt;strong&gt;RelWithDebInfo&lt;/strong&gt; (if building a release version)&lt;br/&gt;
~~ &lt;strong&gt;CMAKE_INSTALL_PREFIX&lt;/strong&gt;: Should be set to the appropriate folder: C:\Program Files\XTrackCAD for x64, C:\Program Files (x86)\XTrackCAD for x86.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="build_1"&gt;Build&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Compile &lt;strong&gt;XTrackCAD&lt;/strong&gt; using the new project files.  For example, start MSVC and open the XTrkCAD.sln solution file which is located in your build directory.&lt;/li&gt;
&lt;li&gt;Build the "BUILD_ALL" project to build the software.&lt;/li&gt;
&lt;li&gt;Build the "INSTALL" project to install the software.&lt;/li&gt;
&lt;li&gt;Run &lt;strong&gt;XTrackCAD&lt;/strong&gt; by double-clicking its icon located in the install directory - for example: ##&lt;strong&gt;C:/Program Files/XTrkCAD/bin/xtrkcad.exe&lt;/strong&gt;##.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="release-build"&gt;Release Build&lt;/h3&gt;
&lt;p&gt;On Windows you have the possibility to create an installer using  &lt;em&gt;NSIS:&lt;/em&gt; &lt;span&gt;[http://nsis.sf.net/]&lt;/span&gt; and a ZIP archive for the source code. &lt;/p&gt;
&lt;h4 id="installer"&gt;Installer&lt;/h4&gt;
&lt;p&gt;Make sure that NSIS is installad and running. In Visual C&lt;strong&gt;++&lt;/strong&gt; build the ##PACKAGE## project. If all goes well, the installable package ##xtrkcad-setup-//version//.exe## is created in your build directory.&lt;/p&gt;
&lt;p&gt;Building the source archive takes a few more steps. &lt;/p&gt;
&lt;p&gt;Open a command window and execute &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;(language-ref)&lt;br/&gt;
cd &lt;span&gt;[builddir]&lt;/span&gt;&lt;br/&gt;
cpack --config CPackSourceConfig.cmake&lt;br/&gt;
CPack: Create package using ZIP&lt;br/&gt;
CPack: Install projects&lt;br/&gt;
CPack: - Install directory: D:/XTrackCAD/xtc-version&lt;br/&gt;
CPack: Create package&lt;br/&gt;
CPack: - package: &lt;span&gt;[builddir]&lt;/span&gt;xtrkcad-source-//version//.zip generated.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="code-signing"&gt;Code Signing&lt;/h3&gt;
&lt;p&gt;''Currently we don't have a code signing certicate. This step can be omitted.'' In case signing the executable is wanted open the Visual Studio shell:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cd &lt;span&gt;[builddirectory]&lt;/span&gt;/app/bin/Release&lt;br/&gt;
signtool sign /f certfile /p password xtrkcad.exe&lt;br/&gt;
cd &lt;span&gt;[builddirectory]&lt;/span&gt;&lt;br/&gt;
cpack&lt;br/&gt;
signtool sign /f certfile /p password xtrkcad-setup-4.2.4a.exe&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;CategoryDevel&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Russell Shilling</dc:creator><pubDate>Thu, 28 Mar 2024 01:27:19 -0000</pubDate><guid>https://sourceforge.netf48fe77d258a23033bc1bb50e16c8c716b63bbd4</guid></item></channel></rss>