460
460
|
461
461
+-- DUnit - test source code that uses the DUnit framework</ pre >
462
462
< 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.
465
464
Git users may also see the usual < code > .git</ code > hidden
466
465
directory. If you have done some editing in the Delphi IDE you may also see
467
466
occasional hidden < code > __history</ code > folders.
@@ -498,18 +497,18 @@ <h3>
498
497
499
498
< pre > ./
500
499
|
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
508
507
|
509
508
...</ pre >
510
509
511
510
< 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.
513
512
In addition, < code > Make</ code > will have created a < code > .cfg</ code > file from
514
513
template in the < code > Src</ code > folder. This < code > .cfg</ code > file is needed
515
514
for DCC32 to run correctly. The file will be ignored by Git.
625
624
626
625
< p >
627
626
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.
629
628
</ p >
630
629
631
630
< h4 >
640
639
< pre class ="cmd "> < span class ="prompt "> ></ span > Make -DPORTABLE codesnip</ pre >
641
640
642
641
< 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
644
643
it is named < code > CodeSnip-p.exe</ code >
645
644
</ p >
646
645
@@ -654,13 +653,16 @@ <h3>
654
653
655
654
< pre class ="cmd "> < span class ="prompt "> ></ span > Make help</ pre >
656
655
656
+ < p >
657
+ The compiled help file will be written to the < code > _build\exe</ code > folder.
658
+ </ p >
657
659
< h3 >
658
660
Build the Setup Program
659
661
</ h3 >
660
662
661
663
< p >
662
664
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.
664
666
</ p >
665
667
666
668
< p >
679
681
< p >
680
682
The setup program is named < code > CodeSnip-Setup-x.x.x.exe</ code > , where
681
683
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.
683
685
</ p >
684
686
685
687
< p >
704
706
705
707
< p >
706
708
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.
707
710
</ p >
708
711
709
712
< h4 >
@@ -723,13 +726,17 @@ <h4>
723
726
< pre class ="cmd "> < span class ="prompt "> ></ span > Make release</ pre >
724
727
725
728
< 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
727
730
change this name by defining the < code > RELEASEFILENAME</ code > macro or
728
731
enviroment variable. For example, you can name the file
729
732
< code > MyRelease.zip</ code > by doing:
730
733
</ p >
731
734
732
- < pre class ="cmd "> < span class ="prompt "> ></ span > Make -DRELEASEFILENAME=MyRelease.zip release</ pre >
735
+ < pre class ="cmd "> < span class ="prompt "> ></ 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 >
733
740
734
741
< h4 >
735
742
Portable edition
@@ -754,7 +761,11 @@ <h4>
754
761
< code > MyPortableRelease.zip</ code > by doing:
755
762
</ p >
756
763
757
- < pre class ="cmd "> < span class ="prompt "> ></ span > Make -DPORTABLE -DRELEASEFILENAME=MyPortableRelease.zip release</ pre >
764
+ < pre class ="cmd "> < span class ="prompt "> ></ 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 >
758
769
759
770
< p class ="note ">
760
771
< strong > Warning:</ strong > If you are building both the standard and portable
@@ -763,6 +774,35 @@ <h4>
763
774
built release will overwrite the first.
764
775
</ p >
765
776
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 "> ></ 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 "> ></ 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 >
766
806
767
807
< h3 >
768
808
Build and Release Everything
@@ -784,16 +824,17 @@ <h3>
784
824
< span class ="prompt "> ></ span > Make setup
785
825
< span class ="prompt "> ></ span > Make release</ pre >
786
826
787
- < h4 >
788
- Portable edition
789
- </ h4 >
790
-
791
827
< p >
792
828
To perform a complete build of the portable edition of < em > CodeSnip</ em > do
793
829
</ p >
794
830
795
831
< pre class ="cmd "> < span class ="prompt "> ></ span > Make -DPORTABLE</ pre >
796
832
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
+
797
838
< h3 >
798
839
Clean Up
799
840
</ h3 >
0 commit comments