66 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
77 * obtain one at http://mozilla.org/MPL/2.0/
88 *
9- * Copyright (C) 2009-2013 , Peter Johnson (www.delphidabbler.com).
9+ * Copyright (C) 2009-2015 , Peter Johnson (www.delphidabbler.com).
1010 *
1111 * $Rev$
1212 * $Date$
@@ -191,6 +191,13 @@ <h3>
191191 The Borland resource compiler. Used to compile various resource source
192192 (< code > .rc</ code > ) files.
193193 </ dd >
194+ < dt class ="spaced ">
195+ < code > GenTLB</ code >
196+ </ dt >
197+ < dd >
198+ Type library generator. Used to create the < code > ExternalObj.tlb</ code > type
199+ library from source code in < code > ExternalObj.ridl</ code > .
200+ </ dd >
194201 < dt class ="spaced ">
195202 < code > TLibImpl</ code >
196203 </ dt >
@@ -251,93 +258,6 @@ <h3>
251258 works.
252259</ p >
253260
254- < h3 id ="mssdk ">
255- Microsoft Software Development Kit
256- </ h3 >
257-
258- < p >
259- The MIDL IDL compiler that ships with the MS SDK is required to build
260- < code > ExternalObj.tlb</ code > from < code > ExternalObj.idl</ code > .
261- </ p >
262-
263- < p >
264- MIDL requires the use of Microsoft's < code > CL.exe</ code > C Pre-processor
265- which in turn requires < code > mspdb**.dll</ code > , where ** is a number that
266- depends on the version of Visual Studio used. I use MIDL v7 and
267- < code > mspdb80.dll</ code > from the Windows 2008 (v6.1) platform SDK. So that
268- MIDL can find these files you need to update your system PATH to include:
269- </ p >
270-
271- < ul class ="spaced ">
272- < li >
273- < div >
274- The path to < code > CL.exe</ code > . This will probably be in a sub folder
275- of a MS Visual Studio installation folder. For example:
276- </ div >
277- < pre class ="indent "> C:\Program Files\Microsoft Visual Studio 9.0\VC\bin</ pre >
278- < div >
279- or
280- </ div >
281- < pre class ="indent "> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin</ pre >
282- </ li >
283- < li >
284- < div >
285- The Common Visual studio binary directory where < code > mspdb**.dll</ code >
286- is located. For example:
287- </ div >
288- < pre class ="indent "> C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE</ pre >
289- < div >
290- or
291- </ div >
292- < pre class ="indent "> C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE</ pre >
293- </ li >
294- </ ul >
295-
296- < p >
297- The < code > MSSDK</ code > environment variable must be set and contain the
298- MS SDK install directory. < code > MIDL.exe</ code > must be in the
299- < code > Bin</ code > sub-directory of < code > MSSDK</ code > and the required
300- include files must be in the < code > Include</ code > sub-directory.
301- </ p >
302-
303- < p >
304- You can use a batch file with contents similar to the following to set the
305- path and the < code > MSSDK</ code > environment variable before building
306- < em > CodeSnip</ em > :
307- </ p >
308-
309- < pre class ="indent "> if not "%PATHSET%" == "" goto end
310- set MSSDK=C:\Program Files\Microsoft SDKs\Windows\v7.1
311- set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
312- set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
313- set PATHSET=1
314- :end</ pre >
315-
316- < p >
317- < strong > Note:</ strong > You do not need a copy of Visual Studio for this
318- – the required directories and files are created when the SDK is
319- installed.
320- </ p >
321-
322- < h4 >
323- Build Without MIDL or the MS SDK
324- </ h4 >
325-
326- < p >
327- If you don't already have the MS SDK it's a big job to download and install
328- it just to compile one < code > .tlb</ code > file. Therefore there's an
329- alternative that means you can compile without the SDK. This is described
330- in the section
331- < a
332- href ="#nomidl "
333- > Editing and Compiling Without MIDL</ a > below.
334- </ p >
335-
336- < p >
337- If you take this route, there's no need to set < code > MSSDK</ code > or modify
338- the path.
339- </ p >
340-
341261< h3 >
342262 DelphiDabbler Version Information Editor (VIEd)
343263</ h3 >
@@ -474,27 +394,23 @@ <h4>
474394 < li >
475395 < code > INDY10</ code >
476396 </ li >
477- < li >
478- < code > MSSDK</ code > (if using MIDL - see step 2)
479- </ li >
480397</ ul >
481398
482399< h4 >
483400 Step 2
484401</ h4 >
485402
486403< p >
487- Update the < code > PATH</ code > environment variable to include the paths that
488- MIDL needs (explained < a
489- href ="#mssdk "
490- > above</ a > ).
404+ Update the < code > PATH</ code > environment variable to include
405+ < code > %DELPHIROOT%\Bin</ code > as its first path, i.e. do:
491406</ p >
492407
408+ < pre class ="cmd "> < span class ="prompt "> ></ span > set PATH=%DELPHIROOT%\Bin;%PATH%</ pre >
409+
493410< p >
494- If you are not using MIDL then there is no need to modify the
495- < code > PATH</ code > variable or set < code > MSSDK</ code > . Instead you can
496- define < code > IGNOREMIDL</ code > by setting it to some value, e.g.
497- < code > set IGNOREMIDL=1</ code > .
411+ You do not have to do this but it means you can run the preferred version of
412+ < code > Make</ code > from the command line without having to specify its path
413+ every time.
498414</ p >
499415
500416< h4 >
@@ -554,7 +470,11 @@ <h3>
554470 < div >
555471 Check out the source using the following command:
556472 </ div >
557- < pre class ="cmd "> < span class ="prompt "> ></ span > svn checkout http://codesnip.googlecode.com/svn/trunk/ PATH</ pre >
473+ < pre class ="cmd "> < span class ="prompt "> ></ span > svn checkout https://svn.code.sf.net/p/codesnip/code/trunk PATH</ pre >
474+ < div >
475+ or
476+ </ div >
477+ < pre class ="cmd "> < span class ="prompt "> ></ span > svn checkout svn://svn.code.sf.net/p/codesnip/code/trunk PATH</ pre >
558478 < div >
559479 Where < code > PATH</ code > is the directory where you want to place the
560480 working copy. You will not be able to commit changes unless you join
@@ -565,7 +485,11 @@ <h3>
565485 < div >
566486 Export the code using this command:
567487 </ div >
568- < pre class ="cmd "> < span class ="prompt "> ></ span > svn export http://codesnip.googlecode.com/svn/trunk/ PATH</ pre >
488+ < pre class ="cmd "> < span class ="prompt "> ></ span > svn export https://svn.code.sf.net/p/codesnip/code/trunk PATH</ pre >
489+ < div >
490+ or
491+ </ div >
492+ < pre class ="cmd "> < span class ="prompt "> ></ span > svn export svn://svn.code.sf.net/p/codesnip/code/trunk PATH</ pre >
569493 < div >
570494 where < code > PATH</ code > is the directory where you wish to store the
571495 code.
@@ -746,96 +670,6 @@ <h4>
746670 steps automatically.
747671</ p >
748672
749- < h3 id ="nomidl ">
750- Editing and Compiling without MIDL
751- </ h3 >
752-
753- < p >
754- If you don't have the MIDL compiler you need to get hold of a pre-compiled
755- copy of the < code > ExternalObj.tlb</ code > type library and tell Make to skip
756- the MIDL compiling stage.
757- </ p >
758-
759- < h4 >
760- Getting The Type Library
761- </ h4 >
762-
763- < ol class ="spaced ">
764- < li >
765- If necessary download a resource file editor. XN Resource Editor will
766- do the job. You can get that from
767- < a
768- href ="http://www.wilsonc.demon.co.uk/d10resourceeditor.htm "
769- > http://www.wilsonc.demon.co.uk/d10resourceeditor.htm</ a > .
770- </ li >
771- < li >
772- Get a suitable copy of the < em > CodeSnip</ em > executable. This must have
773- been compiled from the same version of < code > ExternalObj.idl</ code > as
774- that included in the source tree.
775- </ li >
776- < li >
777- Load < code > CodeSnip.exe</ code > into the resource file editor (Use
778- < em > File | Open</ em > in XN Resource Editor). You need to
779- find the TYPELIB resource type. There should only be one, language
780- neutral, TYPELIB resource. Select this and export it as
781- < code > ExternalObj.tlb</ code > in the < code > Bin</ code > folder in your
782- configured source tree. (Use < em > Resource | Export</ em > Resource in XN
783- Resource Editor).
784- </ li >
785- </ ol >
786-
787- < p >
788- If you are working on the latest development tree from the code repository
789- you should get < code > ExternalObj.tlb</ code > from the latest release of
790- < em > CodeSnip</ em > , < strong > unless</ strong > < code > ExternalObj.idl</ code >
791- has been changed since the last release. In this case you
792- < strong > must</ strong > use MIDL to build the < code > .idl</ code > file, because
793- a suitable < code > .tlb</ code > file won't be available.
794- </ p >
795-
796- < h4 >
797- Editing the Type Library
798- </ h4 >
799-
800- < p >
801- You can edit the type library from the Delphi IDE. Start the IDE, select
802- File | Open, change the file type to Type Library and navigate to
803- < code > ExternalObj.tlb</ code > . This opens the type library. Edit as required
804- then save the changes. Delete any < code > *_TLB</ code > files that appear.
805- </ p >
806-
807- < p >
808- If you do make changes you should also use the type library editor's
809- < em > Export to IDL</ em > button to save a copy of the IDL in
810- < code > ExternalObj.idl</ code > in the < code > Src</ code > folder. The license in
811- the original code must be restored, so take a copy of the license from
812- < code > ExternalObj.idl</ code > before overwriting it!
813- </ p >
814-
815- < p >
816- You must regenerate the associated Pascal file. Do this by running:
817- </ p >
818-
819- < pre class ="cmd "> < span class ="prompt "> ></ span > Make autogen</ pre >
820-
821- < h4 >
822- Telling Make to Ignore MIDL
823- </ h4 >
824-
825- < p >
826- You now need to prevent Make from trying to compile the < code > .idl</ code >
827- file in the absence of MIDL. Do this by defining an environment variable
828- called < code > IGNOREMIDL</ code > . This can be done from the command line or
829- a batch file by doing:
830- </ p >
831-
832- < pre class ="cmd ">
833- < span class ="prompt "> ></ span > set IGNOREMIDL=1</ pre >
834-
835- < p >
836- Alternatively, call Make with the < code > -DIGNOREMIDL</ code > switch.
837- </ p >
838-
839673< h2 >
840674 Building CodeSnip
841675</ h2 >
@@ -921,28 +755,6 @@ <h4>
921755 it is named < code > CodeSnip-p.exe</ code >
922756</ p >
923757
924- < h4 >
925- Building without MIDL
926- </ h4 >
927-
928- < p >
929- If you are building without MIDL, and have a suitable copy of
930- < code > ExternalObj.tlb</ code > already in the < code > Bin</ code > directory you
931- must either have defined the < code > IGNOREMIDL</ code > environment variable or
932- you must do:
933- </ p >
934-
935- < pre class ="cmd "> < span class ="prompt "> ></ span > Make -DIGNOREMIDL codesnip</ pre >
936-
937- < p >
938- This is the same as doing:
939- </ p >
940-
941- < pre class ="cmd "> < span class ="prompt "> ></ span > Make -DIGNOREMIDL typelib
942- < span class ="prompt "> ></ span > Make resources
943- < span class ="prompt "> ></ span > Make autogen
944- < span class ="prompt "> ></ span > Make pascal</ pre >
945-
946758< h3 >
947759 Build the Help File
948760</ h3 >
@@ -968,11 +780,6 @@ <h3>
968780
969781< pre class ="cmd "> < span class ="prompt "> ></ span > Make exes</ pre >
970782
971- < p >
972- < code > Make exes</ code > will require the use of the < code > -DIGNOREMIDL</ code >
973- switch if MIDL is not available.
974- </ p >
975-
976783< p >
977784 Once you have built all the required files you build the setup file by
978785 doing:
@@ -1088,12 +895,6 @@ <h3>
1088895< span class ="prompt "> ></ span > Make setup
1089896< span class ="prompt "> ></ span > Make release</ pre >
1090897
1091- < p >
1092- < strong > Warning:</ strong > You should not run this command if MIDL is not
1093- available since < code > Make config</ code > will delete any < code > .tlb</ code >
1094- file you may have placed in the < code > Bin</ code > directory.
1095- </ p >
1096-
1097898< h4 >
1098899 Portable edition
1099900</ h4 >
0 commit comments