Skip to content

Commit 4611f3e

Browse files
committed
Update Build.html re changes to build process:
Use of _build directory for all binaries New VERSION macro to add version numbers to release zip files
1 parent 020199f commit 4611f3e

File tree

1 file changed

+62
-21
lines changed

1 file changed

+62
-21
lines changed

Build.html

Lines changed: 62 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,7 @@ <h3>
460460
|
461461
+-- DUnit - test source code that uses the DUnit framework</pre>
462462
<p>
463-
If, by chance you also have <code>Bin</code>, <code>Exe</code> and / or
464-
<code>Release</code> directories don't worry - all will become clear.
463+
If, by chance you also have a <code>_build</code> directory don't worry - all will become clear.
465464
Git users may also see the usual <code>.git</code> hidden
466465
directory. If you have done some editing in the Delphi IDE you may also see
467466
occasional hidden <code>__history</code> folders.
@@ -498,18 +497,18 @@ <h3>
498497

499498
<pre>./
500499
|
501-
+-- Bin - receives object files for CodeSnip
502-
|
503-
...
504-
|
505-
+-- Exe - receives executable code and compiled help file
506-
|
507-
+-- Release - receives release files
500+
+-- _build - contains all the build files
501+
| |
502+
| +-- bin - receives object files for CodeSnip
503+
| |
504+
| +-- exe - receives executable code and compiled help file
505+
| |
506+
| +-- release - receives release files
508507
|
509508
...</pre>
510509

511510
<p>
512-
If the <code>Bin</code> folder already existed, it will have been emptied.
511+
If the <code>_build/bin</code> folder already existed, it will have been emptied.
513512
In addition, <code>Make</code> will have created a <code>.cfg</code> file from
514513
template in the <code>Src</code> folder. This <code>.cfg</code> file is needed
515514
for DCC32 to run correctly. The file will be ignored by Git.
@@ -625,7 +624,7 @@ <h3>
625624

626625
<p>
627626
The <em>CodeSnip</em> executable, named <code>CodeSnip.exe</code> will be
628-
placed in the <code>Exe</code> folder.
627+
placed in the <code>_build\exe</code> folder.
629628
</p>
630629

631630
<h4>
@@ -640,7 +639,7 @@ <h4>
640639
<pre class="cmd"><span class="prompt">&gt;</span> Make -DPORTABLE codesnip</pre>
641640

642641
<p>
643-
Again the executable is placed in the <code>Exe</code> folder, but this time
642+
Again the executable is placed in the <code>_build/exe</code> folder, but this time
644643
it is named <code>CodeSnip-p.exe</code>
645644
</p>
646645

@@ -654,13 +653,16 @@ <h3>
654653

655654
<pre class="cmd"><span class="prompt">&gt;</span> Make help</pre>
656655

656+
<p>
657+
The compiled help file will be written to the <code>_build\exe</code> folder.
658+
</p>
657659
<h3>
658660
Build the Setup Program
659661
</h3>
660662

661663
<p>
662664
The setup program requires that the <em>CodeSnip</em> excutable and the
663-
compiled help file are already present in the <code>Exe</code> directory.
665+
compiled help file are already present in the <code>_build\exe</code> directory.
664666
</p>
665667

666668
<p>
@@ -679,7 +681,7 @@ <h3>
679681
<p>
680682
The setup program is named <code>CodeSnip-Setup-x.x.x.exe</code>, where
681683
x.x.x is the version number extracted from <em>CodeSnip</em>'s version
682-
information. It is placed in the <code>Exe</code> directory.
684+
information. It is placed in the <code>_build/exe</code> directory.
683685
</p>
684686

685687
<p>
@@ -704,6 +706,7 @@ <h3>
704706

705707
<p>
706708
Make can create zip files containing all the files that are included in a release.
709+
Zip files are written to the <code>_build/release</code> directory.
707710
</p>
708711

709712
<h4>
@@ -723,13 +726,17 @@ <h4>
723726
<pre class="cmd"><span class="prompt">&gt;</span> Make release</pre>
724727

725728
<p>
726-
By default the release file is named <code>dd-codesnip.zip</code>. You can
729+
By default the release file is named <code>codesnip-exe.zip</code>. You can
727730
change this name by defining the <code>RELEASEFILENAME</code> macro or
728731
enviroment variable. For example, you can name the file
729732
<code>MyRelease.zip</code> by doing:
730733
</p>
731734

732-
<pre class="cmd"><span class="prompt">&gt;</span> Make -DRELEASEFILENAME=MyRelease.zip release</pre>
735+
<pre class="cmd"><span class="prompt">&gt;</span> Make -DRELEASEFILENAME=MyRelease release</pre>
736+
737+
<p>
738+
Note that the <code>.zip</code> extension should not be included in the file name.
739+
</p>
733740

734741
<h4>
735742
Portable edition
@@ -754,7 +761,11 @@ <h4>
754761
<code>MyPortableRelease.zip</code> by doing:
755762
</p>
756763

757-
<pre class="cmd"><span class="prompt">&gt;</span> Make -DPORTABLE -DRELEASEFILENAME=MyPortableRelease.zip release</pre>
764+
<pre class="cmd"><span class="prompt">&gt;</span> Make -DPORTABLE -DRELEASEFILENAME=MyPortableRelease release</pre>
765+
766+
<p>
767+
Once again note that the <code>.zip</code> extension should not be included in the file name.
768+
</p>
758769

759770
<p class="note">
760771
<strong>Warning:</strong> If you are building both the standard and portable
@@ -763,6 +774,35 @@ <h4>
763774
built release will overwrite the first.
764775
</p>
765776

777+
<h4>
778+
Including version numbers in zip file names
779+
</h4>
780+
781+
<p>
782+
A version number can be suffixed to the release zip file name by defining the <code>VERSION</code> macro.
783+
This macro works with both the <code>PORTABLE</code> and <code>RELEASEFILENAME</code> macros.
784+
</p>
785+
786+
<p>
787+
For example to appended version number 4.22.0 to the zip file name on a standard edition build, with the default
788+
file name do:
789+
</p>
790+
791+
<pre class="cmd"><span class="prompt">&gt;</span> Make -DVERSION=4.22.0 release</pre>
792+
793+
<p>
794+
This will create a zip file named <code>codesnip-exe-4.22.0.zip</code>.
795+
</p>
796+
797+
<p>
798+
A more complex example would be to append the same version number to a portable edition build named <code>MyPortableRelease</code>. Do:
799+
</p>
800+
801+
<pre class="cmd"><span class="prompt">&gt;</span> Make -DPORTABLE -DRELEASEFILENAME=MyPortableRelease -DVERSION=4.22.0 release</pre>
802+
803+
<p>
804+
This time the resulting zip file will be named <code>MyPortableRelease-4.22.0.zip</code>.
805+
</p>
766806

767807
<h3>
768808
Build and Release Everything
@@ -784,16 +824,17 @@ <h3>
784824
<span class="prompt">&gt;</span> Make setup
785825
<span class="prompt">&gt;</span> Make release</pre>
786826

787-
<h4>
788-
Portable edition
789-
</h4>
790-
791827
<p>
792828
To perform a complete build of the portable edition of <em>CodeSnip</em> do
793829
</p>
794830

795831
<pre class="cmd"><span class="prompt">&gt;</span> Make -DPORTABLE</pre>
796832

833+
<p>
834+
Note that the <code>RELEASEFILENAME</code> and <code>VERSION</code> macros that can be used for customising
835+
zip file names can be used here too.
836+
</p>
837+
797838
<h3>
798839
Clean Up
799840
</h3>

0 commit comments

Comments
 (0)