Skip to content

Commit

Permalink
Merged revision(s) 4720-4736 from tags/version-4.13.0:
Browse files Browse the repository at this point in the history
This effectively updates trunk to be a copy of CodeSnip release 4.13.0
  • Loading branch information
delphidabbler committed Sep 6, 2015
1 parent f4491a7 commit 7684f1b
Show file tree
Hide file tree
Showing 19 changed files with 114 additions and 309 deletions.
249 changes: 25 additions & 224 deletions Build.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/
*
* Copyright (C) 2009-2013, Peter Johnson (www.delphidabbler.com).
* Copyright (C) 2009-2015, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
Expand Down Expand Up @@ -191,6 +191,13 @@ <h3>
The Borland resource compiler. Used to compile various resource source
(<code>.rc</code>) files.
</dd>
<dt class="spaced">
<code>GenTLB</code>
</dt>
<dd>
Type library generator. Used to create the <code>ExternalObj.tlb</code> type
library from source code in <code>ExternalObj.ridl</code>.
</dd>
<dt class="spaced">
<code>TLibImpl</code>
</dt>
Expand Down Expand Up @@ -251,93 +258,6 @@ <h3>
works.
</p>

<h3 id="mssdk">
Microsoft Software Development Kit
</h3>

<p>
The MIDL IDL compiler that ships with the MS SDK is required to build
<code>ExternalObj.tlb</code> from <code>ExternalObj.idl</code>.
</p>

<p>
MIDL requires the use of Microsoft's <code>CL.exe</code> C Pre-processor
which in turn requires <code>mspdb**.dll</code>, where ** is a number that
depends on the version of Visual Studio used. I use MIDL v7 and
<code>mspdb80.dll</code> from the Windows 2008 (v6.1) platform SDK. So that
MIDL can find these files you need to update your system PATH to include:
</p>

<ul class="spaced">
<li>
<div>
The path to <code>CL.exe</code>. This will probably be in a sub folder
of a MS Visual Studio installation folder. For example:
</div>
<pre class="indent">C:\Program Files\Microsoft Visual Studio 9.0\VC\bin</pre>
<div>
or
</div>
<pre class="indent">C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin</pre>
</li>
<li>
<div>
The Common Visual studio binary directory where <code>mspdb**.dll</code>
is located. For example:
</div>
<pre class="indent">C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE</pre>
<div>
or
</div>
<pre class="indent">C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE</pre>
</li>
</ul>

<p>
The <code>MSSDK</code> environment variable must be set and contain the
MS SDK install directory. <code>MIDL.exe</code> must be in the
<code>Bin</code> sub-directory of <code>MSSDK</code> and the required
include files must be in the <code>Include</code> sub-directory.
</p>

<p>
You can use a batch file with contents similar to the following to set the
path and the <code>MSSDK</code> environment variable before building
<em>CodeSnip</em>:
</p>

<pre class="indent">if not "%PATHSET%" == "" goto end
set MSSDK=C:\Program Files\Microsoft SDKs\Windows\v7.1
set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
set PATHSET=1
:end</pre>

<p>
<strong>Note:</strong> You do not need a copy of Visual Studio for this
&ndash; the required directories and files are created when the SDK is
installed.
</p>

<h4>
Build Without MIDL or the MS SDK
</h4>

<p>
If you don't already have the MS SDK it's a big job to download and install
it just to compile one <code>.tlb</code> file. Therefore there's an
alternative that means you can compile without the SDK. This is described
in the section
<a
href="#nomidl"
>Editing and Compiling Without MIDL</a> below.
</p>

<p>
If you take this route, there's no need to set <code>MSSDK</code> or modify
the path.
</p>

<h3>
DelphiDabbler Version Information Editor (VIEd)
</h3>
Expand Down Expand Up @@ -474,27 +394,23 @@ <h4>
<li>
<code>INDY10</code>
</li>
<li>
<code>MSSDK</code> (if using MIDL - see step 2)
</li>
</ul>

<h4>
Step 2
</h4>

<p>
Update the <code>PATH</code> environment variable to include the paths that
MIDL needs (explained <a
href="#mssdk"
>above</a>).
Update the <code>PATH</code> environment variable to include
<code>%DELPHIROOT%\Bin</code> as its first path, i.e. do:
</p>

<pre class="cmd"><span class="prompt">&gt;</span> set PATH=%DELPHIROOT%\Bin;%PATH%</pre>

<p>
If you are not using MIDL then there is no need to modify the
<code>PATH</code> variable or set <code>MSSDK</code>. Instead you can
define <code>IGNOREMIDL</code> by setting it to some value, e.g.
<code>set IGNOREMIDL=1</code>.
You do not have to do this but it means you can run the preferred version of
<code>Make</code> from the command line without having to specify its path
every time.
</p>

<h4>
Expand Down Expand Up @@ -554,7 +470,11 @@ <h3>
<div>
Check out the source using the following command:
</div>
<pre class="cmd"><span class="prompt">&gt;</span> svn checkout http://codesnip.googlecode.com/svn/trunk/ PATH</pre>
<pre class="cmd"><span class="prompt">&gt;</span> svn checkout https://svn.code.sf.net/p/codesnip/code/trunk PATH</pre>
<div>
or
</div>
<pre class="cmd"><span class="prompt">&gt;</span> svn checkout svn://svn.code.sf.net/p/codesnip/code/trunk PATH</pre>
<div>
Where <code>PATH</code> is the directory where you want to place the
working copy. You will not be able to commit changes unless you join
Expand All @@ -565,7 +485,11 @@ <h3>
<div>
Export the code using this command:
</div>
<pre class="cmd"><span class="prompt">&gt;</span> svn export http://codesnip.googlecode.com/svn/trunk/ PATH</pre>
<pre class="cmd"><span class="prompt">&gt;</span> svn export https://svn.code.sf.net/p/codesnip/code/trunk PATH</pre>
<div>
or
</div>
<pre class="cmd"><span class="prompt">&gt;</span> svn export svn://svn.code.sf.net/p/codesnip/code/trunk PATH</pre>
<div>
where <code>PATH</code> is the directory where you wish to store the
code.
Expand Down Expand Up @@ -746,96 +670,6 @@ <h4>
steps automatically.
</p>

<h3 id="nomidl">
Editing and Compiling without MIDL
</h3>

<p>
If you don't have the MIDL compiler you need to get hold of a pre-compiled
copy of the <code>ExternalObj.tlb</code> type library and tell Make to skip
the MIDL compiling stage.
</p>

<h4>
Getting The Type Library
</h4>

<ol class="spaced">
<li>
If necessary download a resource file editor. XN Resource Editor will
do the job. You can get that from
<a
href="http://www.wilsonc.demon.co.uk/d10resourceeditor.htm"
>http://www.wilsonc.demon.co.uk/d10resourceeditor.htm</a>.
</li>
<li>
Get a suitable copy of the <em>CodeSnip</em> executable. This must have
been compiled from the same version of <code>ExternalObj.idl</code> as
that included in the source tree.
</li>
<li>
Load <code>CodeSnip.exe</code> into the resource file editor (Use
<em>File | Open</em> in XN Resource Editor). You need to
find the TYPELIB resource type. There should only be one, language
neutral, TYPELIB resource. Select this and export it as
<code>ExternalObj.tlb</code> in the <code>Bin</code> folder in your
configured source tree. (Use <em>Resource | Export</em> Resource in XN
Resource Editor).
</li>
</ol>

<p>
If you are working on the latest development tree from the code repository
you should get <code>ExternalObj.tlb</code> from the latest release of
<em>CodeSnip</em>, <strong>unless</strong> <code>ExternalObj.idl</code>
has been changed since the last release. In this case you
<strong>must</strong> use MIDL to build the <code>.idl</code> file, because
a suitable <code>.tlb</code> file won't be available.
</p>

<h4>
Editing the Type Library
</h4>

<p>
You can edit the type library from the Delphi IDE. Start the IDE, select
File | Open, change the file type to Type Library and navigate to
<code>ExternalObj.tlb</code>. This opens the type library. Edit as required
then save the changes. Delete any <code>*_TLB</code> files that appear.
</p>

<p>
If you do make changes you should also use the type library editor's
<em>Export to IDL</em> button to save a copy of the IDL in
<code>ExternalObj.idl</code> in the <code>Src</code> folder. The license in
the original code must be restored, so take a copy of the license from
<code>ExternalObj.idl</code> before overwriting it!
</p>

<p>
You must regenerate the associated Pascal file. Do this by running:
</p>

<pre class="cmd"><span class="prompt">&gt;</span> Make autogen</pre>

<h4>
Telling Make to Ignore MIDL
</h4>

<p>
You now need to prevent Make from trying to compile the <code>.idl</code>
file in the absence of MIDL. Do this by defining an environment variable
called <code>IGNOREMIDL</code>. This can be done from the command line or
a batch file by doing:
</p>

<pre class="cmd">
<span class="prompt">&gt;</span> set IGNOREMIDL=1</pre>

<p>
Alternatively, call Make with the <code>-DIGNOREMIDL</code> switch.
</p>

<h2>
Building CodeSnip
</h2>
Expand Down Expand Up @@ -921,28 +755,6 @@ <h4>
it is named <code>CodeSnip-p.exe</code>
</p>

<h4>
Building without MIDL
</h4>

<p>
If you are building without MIDL, and have a suitable copy of
<code>ExternalObj.tlb</code> already in the <code>Bin</code> directory you
must either have defined the <code>IGNOREMIDL</code> environment variable or
you must do:
</p>

<pre class="cmd"><span class="prompt">&gt;</span> Make -DIGNOREMIDL codesnip</pre>

<p>
This is the same as doing:
</p>

<pre class="cmd"><span class="prompt">&gt;</span> Make -DIGNOREMIDL typelib
<span class="prompt">&gt;</span> Make resources
<span class="prompt">&gt;</span> Make autogen
<span class="prompt">&gt;</span> Make pascal</pre>

<h3>
Build the Help File
</h3>
Expand All @@ -968,11 +780,6 @@ <h3>

<pre class="cmd"><span class="prompt">&gt;</span> Make exes</pre>

<p>
<code>Make exes</code> will require the use of the <code>-DIGNOREMIDL</code>
switch if MIDL is not available.
</p>

<p>
Once you have built all the required files you build the setup file by
doing:
Expand Down Expand Up @@ -1088,12 +895,6 @@ <h3>
<span class="prompt">&gt;</span> Make setup
<span class="prompt">&gt;</span> Make release</pre>

<p>
<strong>Warning:</strong> You should not run this command if MIDL is not
available since <code>Make config</code> will delete any <code>.tlb</code>
file you may have placed in the <code>Bin</code> directory.
</p>

<h4>
Portable edition
</h4>
Expand Down
6 changes: 6 additions & 0 deletions Docs/ChangeLogs/ChangeLog-v4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
; Change Log for CodeSnip Release 4
; ------------------------------------------------------------------------------

Release v4.13.0 of 5 September 2015
+ Added support for test compilation with, and detection of, Delphi 10 Seattle compiler.
+ Made some minor changes to method used to build required type library to remove dependency on the MS MIDL compiler, greatly simplifying build process.
+ Updated documentation re changes.
+ Updated help file re changes.

Release v4.12.0 of 6 May 2015
+ Added support for test compilation with, and detection of, Delphi XE8 compiler.
+ Updated documentation re changes.
Expand Down
9 changes: 9 additions & 0 deletions Docs/Design/FileFormats/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ <h4>
<li>
<em>DXE8</em> &ndash; Delphi XE8
</li>
<li>
<em>D10S</em> &ndash; Delphi 10 Seattle
</li>
<li>
<em>FPC</em> &ndash; Free Pascal
</li>
Expand Down Expand Up @@ -585,6 +588,12 @@ <h4>
<dd>
Indicates whether Delphi XE8 was included in search.
</dd>
<dt>
<strong>D10S</strong> (Boolean)
</dt>
<dd>
Indicates whether Delphi 10 Seattle was included in search.
</dd>
<dt>
<strong>FPC</strong> (Boolean)
</dt>
Expand Down
3 changes: 3 additions & 0 deletions Docs/Design/FileFormats/export.html
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,9 @@ <h2>
<li>
<em>dXE8</em> &ndash; Delphi XE8 compiler
</li>
<li>
<em>d10s</em> &ndash; Delphi 10 Seattle compiler
</li>
<li>
<em>fpc</em> &ndash; Free Pascal compiler
</li>
Expand Down
4 changes: 4 additions & 0 deletions Docs/Design/FileFormats/main-db.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ <h3>
DelphiXE6=&lt;Y|N|Q|W&gt;
DelphiXE7=&lt;Y|N|Q|W&gt;
DelphiXE8=&lt;Y|N|Q|W&gt;
Delphi10S=&lt;Y|N|Q|W&gt;
FPC=&lt;Y|N|Q|W&gt;
Extra=&lt;extra-info-REML&gt;
StandardFormat=&lt;0|1&gt;
Expand Down Expand Up @@ -343,6 +344,9 @@ <h3>
<li>
<em>DelphiXE8</em> &ndash; Delphi XE8 compiler
</li>
<li>
<em>Delphi10S</em> &ndash; Delphi 10 Seattle compiler
</li>
<li>
<em>FPC</em> &ndash; Free Pascal compiler
</li>
Expand Down
Loading

0 comments on commit 7684f1b

Please sign in to comment.