Skip to content

Commit

Permalink
CodeSnip version 4.13.1
Browse files Browse the repository at this point in the history
  • Loading branch information
delphidabbler committed Sep 29, 2015
1 parent 7684f1b commit 497b61f
Show file tree
Hide file tree
Showing 12 changed files with 298 additions and 192 deletions.
8 changes: 7 additions & 1 deletion Docs/ChangeLogs/ChangeLog-v4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@
; 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) 2012-2014, Peter Johnson (www.delphidabbler.com).
; Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).
;
; $Rev$
; $Date$
;
; Change Log for CodeSnip Release 4
; ------------------------------------------------------------------------------

Release v4.13.1 of 29 September 2015
+ Improved operating system detection to detect Windows 10.
+ Modified program's manifest to declare it compatible with Windows 8 to 10.
+ Code that determines which system font to use no longer depends on OS version but simply on font availability.
+ Updated copyright date in program license as displayed in help, about box, installer and documentation.

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.
Expand Down
2 changes: 1 addition & 1 deletion Docs/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ This Source Code Form is subject to the terms of the Mozilla Public
License, 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/.

All files are copyright (C) 2012-2014, Peter Johnson (www.delphidabbler.com).
All files are copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).
4 changes: 2 additions & 2 deletions Docs/License.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,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) 2012-2014, Peter Johnson (www.delphidabbler.com).
* Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
Expand Down Expand Up @@ -228,7 +228,7 @@ <h2>
Executable Program
</h2>
<p>
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2014 by Peter D
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2015 by Peter D
Johnson, <a
href="http://www.delphidabbler.com"
>http://www.delphidabbler.com</a>.
Expand Down
329 changes: 214 additions & 115 deletions Src/3rdParty/PJSysInfo.pas

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Src/Help/HTML/license.htm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,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) 2012-2014, Peter Johnson (www.delphidabbler.com).
* Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
Expand All @@ -30,7 +30,7 @@ <h1>
<a name="license"></a>Summary of End User License Agreement
</h1>
<p>
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2014 by Peter D
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2015 by Peter D
Johnson, <a
href="http://delphidabbler.com"
class="weblink"
Expand Down
2 changes: 1 addition & 1 deletion Src/Install/Assets/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ This Source Code Form is subject to the terms of the Mozilla Public
License, 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/.

All files are copyright (C) 2012-2014, Peter Johnson (www.delphidabbler.com).
All files are copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).
Binary file modified Src/Install/Assets/License.rtf
Binary file not shown.
4 changes: 2 additions & 2 deletions Src/Res/HTML/dlg-about-program-tplt.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,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) 2005-2014, Peter Johnson (www.delphidabbler.com).
* Copyright (C) 2005-2015, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
Expand Down Expand Up @@ -50,7 +50,7 @@
<body>

<p>
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2014 by Peter D
DelphiDabbler <em>CodeSnip</em> is copyright &copy; 2005-2015 by Peter D
Johnson, <a
class="external-link"
href="http://delphidabbler.com"
Expand Down
33 changes: 22 additions & 11 deletions Src/Res/Misc/CodeSnip.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
* 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) 2012-2014, Peter Johnson (www.delphidabbler.com).
* Copyright (C) 2012-2015, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
*
* CodeSnip's Windows manifest file.
*
* GUIDs used in compatibility section taken from
* http://msdn.microsoft.com/en-us/library/windows/desktop/dn481241.aspx
* Application manifest file.
-->

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assembly
manifestVersion="1.0"
xmlns="urn:schemas-microsoft-com:asm.v1"
xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"
>
<assemblyIdentity
type="win32"
name="CodeSnip"
Expand All @@ -31,21 +32,31 @@
version="6.0.0.0"
publicKeyToken="6595b64144ccf1df"
language="*"
processorArchitecture="*"/>
processorArchitecture="*"
/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" />
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"
/>
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- App has been tested on Windows 7 -->
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- App has been tested on Windows Vista -->
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
</application>
</compatibility>
Expand Down
96 changes: 43 additions & 53 deletions Src/UFontHelper.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,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) 2006-2014, Peter Johnson (www.delphidabbler.com).
* Copyright (C) 2006-2015, Peter Johnson (www.delphidabbler.com).
*
* $Rev$
* $Date$
Expand Down Expand Up @@ -80,25 +80,21 @@ TFontHelper = class(TNoConstructObject)
}
strict private
const
DefaultFontName = 'Arial'; // Default font name
DefaultFontSize = 8; // Default font size
FallbackFontName = 'Arial'; // Fallback font name
FallbackFontSize = 8; // Fallback font size

DefaultContentFontName = DefaultFontName; // Default content font name
DefaultContentFontSize = DefaultFontSize; // Default content font size
VistaFontName = 'Segoe UI'; // Vista default font name
VistaFontSize = 9; // Vista default font size
VistaContentFontName = 'Calibri'; // Vista content font name
VistaContentFontSize = 10; // Vista content font size

VistaFontName = 'Segoe UI'; // Vista default font name
VistaFontSize = 9; // Vista default font size
VistaContentFontName = 'Calibri'; // Vista content font name
VistaContentFontSize = 10; // Vista content font size
XPFontName = 'Tahoma'; // XP default font name
XPFontSize = FallbackFontSize; // XP default font size
XPContentFontName = 'Verdana'; // XP content font name
XPContentFontSize = FallbackFontSize; // XP content font size

XPFontName = 'Tahoma'; // XP default font name
XPFontSize = DefaultFontSize; // XP default font size
XPContentFontName = 'Verdana'; // XP content font name
XPContentFontSize // XP content font size
= DefaultContentFontSize;

DefaultMonoFontName = 'Courier New'; // Default mono font name
DefaultMonoFontSize = 8; // Default mono font size
DefaultMonoFontName = 'Courier New'; // Default mono font name
DefaultMonoFontSize = 8; // Default mono font size
end;


Expand All @@ -109,7 +105,7 @@ implementation
// Delphi
SysUtils, Windows, Forms,
// Project
UGraphicUtils, UStrUtils, USystemInfo;
UGraphicUtils, UStrUtils;


{ TFontHelper }
Expand Down Expand Up @@ -193,28 +189,25 @@ class procedure TFontHelper.SetContentFont(const Font: TFont);
@param Font [in] Font to be set.
}
begin
// Set default content font, size and style
Font.Name := DefaultContentFontName;
Font.Size := DefaultContentFontSize;
Font.Style := [];
if TOSInfo.IsReallyWindowsVistaOrGreater then
// Try Vista & later content font. If that fails try XP/Win2k font. One of the
// two should always work, but in case fonts have been uninstalled, use a
// fallback font.
if FontExists(VistaContentFontName) then
begin
// We have Vista or later - use Calibri if installed
if FontExists(VistaContentFontName) then
begin
Font.Name := VistaContentFontName;
Font.Size := VistaContentFontSize;
end;
Font.Name := VistaContentFontName;
Font.Size := VistaContentFontSize;
end
else if FontExists(XPContentFontName) then
begin
Font.Name := XPContentFontName;
Font.Size := XPContentFontSize;
end
else
begin
// Earlier OS than Vista (i.e. 2000 or XP)
if FontExists(XPContentFontName) then
begin
Font.Name := XPContentFontName;
Font.Size := XPContentFontSize;
end;
Font.Name := FallbackFontName;
Font.Size := FallbackFontSize;
end;
Font.Style := [];
end;

class procedure TFontHelper.SetDefaultBaseFont(const BaseFont: TFont);
Expand All @@ -233,7 +226,7 @@ class procedure TFontHelper.SetDefaultBaseFont(const BaseFont: TFont);
SetDefaultFont(DefaultFont);
// font delta is difference between normal default font size and that used
// on a specific OS (e.g. Vista uses Segoe UI 9 rather than MS Sans Serif 8)
FontDelta := DefaultFont.Size - DefaultFontSize;
FontDelta := DefaultFont.Size - FallbackFontSize;
// change base font name and size as required
BaseFont.Name := DefaultFont.Name;
BaseFont.Size := BaseFont.Size + FontDelta;
Expand All @@ -255,28 +248,25 @@ class procedure TFontHelper.SetDefaultFont(const Font: TFont);
@param Font [in] Font to be set.
}
begin
// Set default font, size and style
Font.Name := DefaultFontName;
Font.Size := DefaultFontSize;
Font.Style := [];
if TOSInfo.IsReallyWindowsVistaOrGreater then
// Try Vista & later default font. If that fails try XP/Win2k font. One of the
// two should always work, but in case fonts have been uninstalled, use a
// fallback font.
if FontExists(VistaFontName) then
begin
Font.Name := VistaFontName;
Font.Size := VistaFontSize;
end
else if FontExists(XPFontName) then
begin
// Vista or later
if FontExists(VistaFontName) then
begin
Font.Name := VistaFontName;
Font.Size := VistaFontSize;
end;
Font.Name := XPFontName;
Font.Size := XPFontSize;
end
else
begin
// Earlier OS than Vista (i.e. 2000 or XP)
if FontExists(XPFontName) then
begin
Font.Name := XPFontName;
Font.Size := XPFontSize;
end;
Font.Name := FallbackFontName;
Font.Size := FallbackFontSize;
end;
Font.Style := [];
end;

class procedure TFontHelper.SetDefaultFonts(const Fonts: array of TFont);
Expand Down
4 changes: 2 additions & 2 deletions Src/VCodeSnip.vi
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@


[Fixed File Info]
File Version #=4, 13, 0, 251
Product Version #=4, 13, 0, 0
File Version #=4, 13, 1, 252
Product Version #=4, 13, 1, 0
File OS=4
File Type=1
File Sub-Type=0
Expand Down
4 changes: 2 additions & 2 deletions Src/VCodeSnipPortable.vi
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@


[Fixed File Info]
File Version #=4, 13, 0, 251
Product Version #=4, 13, 0, 0
File Version #=4, 13, 1, 252
Product Version #=4, 13, 1, 0
File OS=4
File Type=1
File Sub-Type=0
Expand Down

0 comments on commit 497b61f

Please sign in to comment.