Skip to content

Commit

Permalink
Change directory separator (for linux builds)
Browse files Browse the repository at this point in the history
  • Loading branch information
slackydev committed Apr 22, 2016
1 parent 84ebe04 commit e2f441b
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 708 deletions.
674 changes: 0 additions & 674 deletions COPYING

This file was deleted.

6 changes: 2 additions & 4 deletions OCRBitmap.pas
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
unit OCRBitmap;
{==============================================================================]
Author: Jarl K. Holta
Copyright (c) 2016, Jarl `slacky` Holta
Project: SimpleOCR
Project URL: https://github.com/WarPie/SimpleOCR
License: GNU GPL v3 (http://www.gnu.org/licenses/gpl.html)
A minimalistic bitmap type.
License: GNU Lesser GPL (http://www.gnu.org/licenses/lgpl.html)
[==============================================================================}
{$mode objfpc}{$H+}
{$macro on}
Expand Down
6 changes: 3 additions & 3 deletions OCREngine.pas
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
unit OCREngine;
{==============================================================================]
Author: Jarl K. Holta
Project: SimpleOCR
Copyright (c) 2016, Jarl `slacky` Holta
Project: SimpleOCR
Project URL: https://github.com/WarPie/SimpleOCR
License: GNU GPL v3 (http://www.gnu.org/licenses/gpl.html)
License: GNU Lesser GPL (http://www.gnu.org/licenses/lgpl.html)
[==============================================================================}
{$mode objfpc}{$H+}
{$macro on}
Expand Down
6 changes: 3 additions & 3 deletions OCRTypes.pas
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
unit OCRTypes;
{==============================================================================]
Author: Jarl K. Holta
Project: SimpleOCR
Copyright (c) 2016, Jarl `slacky` Holta
Project: SimpleOCR
Project URL: https://github.com/WarPie/SimpleOCR
License: GNU GPL v3 (http://www.gnu.org/licenses/gpl.html)
License: GNU Lesser GPL (http://www.gnu.org/licenses/lgpl.html)
[==============================================================================}
{$mode objfpc}{$H+}
{$macro on}
Expand Down
27 changes: 14 additions & 13 deletions OCRUtils.pas
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
unit OCRUtils;
{==============================================================================]
Author: Jarl K. Holta
Project: SimpleOCR
Project URL: https://github.com/WarPie/OSR-OCR
License: GNU GPL (http://www.gnu.org/licenses/gpl.html)
Copyright (c) 2016, Jarl `slacky` Holta
Project: SimpleOCR
Project URL: https://github.com/WarPie/SimpleOCR
License: GNU Lesser GPL (http://www.gnu.org/licenses/lgpl.html)
Utilities needed for the OCR-engine.
[==============================================================================}
Expand Down Expand Up @@ -190,17 +190,18 @@ function ListDir(Path:String): TStringArray;
end;

function FindFontPath(Font:String): String;
var
i,j:Int32;
paths:array [0..2] of string = ('Fonts/','Includes/','');
begin
if not(Font[Length(Font)] = '\') then Font += '\';
if not(Font[Length(Font)] = '/') then Font += '/';
if DirectoryExists(Font) then Exit(Font);
if DirectoryExists('Fonts\'+Font) then Exit('Fonts\'+Font);
if DirectoryExists('..\Fonts\'+Font) then Exit('..\Fonts\'+Font);
if DirectoryExists('..\..\Fonts\'+Font) then Exit('..\..\Fonts\'+Font);
if DirectoryExists('..\..\..\Fonts\'+Font) then Exit('..\..\..\Fonts\'+Font);

if DirectoryExists('Includes\'+Font) then Exit('Includes\'+Font);
if DirectoryExists('..\Includes\'+Font) then Exit('..\Includes\'+Font);
if DirectoryExists('..\..\Includes\'+Font) then Exit('..\..\Includes\'+Font);

for i:=0 to High(paths) do
for j:=0 to 6 do
if DirectoryExists(paths[i]+Font) then Exit(paths[i] + Font)
else paths[i] := '../' + paths[i];

Result := Font;
end;

Expand Down
10 changes: 6 additions & 4 deletions SimbaPlugin.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=]
Copyright (c) 2014, Jarl K. <Slacky> Holta || http://github.com/WarPie
All rights reserved.
[=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}
{==============================================================================]
Copyright (c) 2016, Jarl `slacky` Holta
Project: SimpleOCR
Project URL: https://github.com/WarPie/SimpleOCR
License: GNU Lesser GPL (http://www.gnu.org/licenses/lgpl.html)
[==============================================================================}
var
Methods: array of record procAddr: Pointer; ProcDef:PChar; end;
TypeDefs: array of record TypeName, TypeDef:PChar; end;
Expand Down
47 changes: 46 additions & 1 deletion SimpleOCR.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,53 @@
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1">
<BuildModes Count="3">
<Item1 Name="Default" Default="True"/>
<Item2 Name="Win32">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="SimpleOCR32"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<RelocatableUnit Value="True"/>
<TargetOS Value="win32"/>
</CodeGeneration>
<Linking>
<Options>
<ExecutableType Value="Library"/>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Win64">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="SimpleOCR64"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<RelocatableUnit Value="True"/>
<TargetCPU Value="x86_64"/>
<TargetOS Value="win64"/>
</CodeGeneration>
<Linking>
<Options>
<ExecutableType Value="Library"/>
</Options>
</Linking>
</CompilerOptions>
</Item3>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
Expand Down
6 changes: 3 additions & 3 deletions SimpleOCR.lpr
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
library SimpleOCR;
{==============================================================================]
Author: Jarl K. Holta
Project: SimpleOCR
Copyright (c) 2016, Jarl `slacky` Holta
Project: SimpleOCR
Project URL: https://github.com/WarPie/SimpleOCR
License: GNU GPL v3 (http://www.gnu.org/licenses/gpl.html)
License: GNU Lesser GPL (http://www.gnu.org/licenses/lgpl.html)
[==============================================================================}
{$mode objfpc}{$H+}
{$macro on}
Expand Down
6 changes: 3 additions & 3 deletions SimpleOCR.lps
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ProjectSession>
<PathDelim Value="\"/>
<Version Value="9"/>
<BuildModes Active="Default"/>
<BuildModes Active="Win64"/>
<Units Count="10">
<Unit0>
<Filename Value="SimpleOCR.lpr"/>
Expand Down Expand Up @@ -49,8 +49,8 @@
<UnitName Value="OCREngine"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="4"/>
<TopLine Value="186"/>
<CursorPos X="26" Y="199"/>
<TopLine Value="189"/>
<CursorPos X="36" Y="214"/>
<UsageCount Value="21"/>
<Loaded Value="True"/>
</Unit6>
Expand Down

0 comments on commit e2f441b

Please sign in to comment.