First step to Lazarus

Signed-off-by: Laentir Valetov <laex@bk.ru>
This commit is contained in:
Laentir Valetov 2019-12-20 16:03:49 +04:00
parent 549b8e43ee
commit d2c148d10b
4 changed files with 27 additions and 22 deletions

14
.gitignore vendored
View File

@ -7,10 +7,14 @@ Debug/
Release/ Release/
ipch/ ipch/
lib/ lib/
packages/Lazarus/
/resource/result/*.* /resource/result/*.*
CVAutoInstaller/ CVAutoInstaller/
/source/ffmpeg/examples
/source/ffmpeg/headers !InitDelphiFFMPEG.cmd
!/CheckCVDep/CheckCVDep.exe
!opencv_classes*.dll
!opencv_classes*.dll
#ResourceFiles #ResourceFiles
/resource/stereosample/Aloe/*.png /resource/stereosample/Aloe/*.png
@ -18,7 +22,6 @@ CVAutoInstaller/
#Files #Files
*.exe *.exe
!/CheckCVDep/CheckCVDep.exe
#*.dll #*.dll
*.ini *.ini
*.bsc *.bsc
@ -50,13 +53,10 @@ CVAutoInstaller/
*.local *.local
*.identcache *.identcache
*.cmd *.cmd
!InitDelphiFFMPEG.cmd
*.stat *.stat
*.iobj *.iobj
*.ipdb *.ipdb
*.db *.db
*.user *.user
*.filters *.filters
*.user *.user
!opencv_classes*.dll
!opencv_classes*.dll

View File

@ -22,9 +22,9 @@ or from the repository (Delphi-OpenCV\redist\ffmpeg):
(4) FFmpeg 64-bit Shared "\x64" (4) FFmpeg 64-bit Shared "\x64"
``` ```
* Dynamic library OpenCV need to download [here][4]<br> * Dynamic library OpenCV need to download [here][4]<br>
Files: *2413.dll and *2413d.dll Files: *2413.dll and *2413d.dll<br>
```
After installing OpenCV: After installing OpenCV:
```
(5) 32-bit in the C:\OpenCV\build\x86\vc14\bin\*.dll (5) 32-bit in the C:\OpenCV\build\x86\vc14\bin\*.dll
(6) 64-bit in the C:\OpenCV\build\x64\vc14\bin\*.dll (6) 64-bit in the C:\OpenCV\build\x64\vc14\bin\*.dll
``` ```
@ -35,17 +35,7 @@ or from the repository (Delphi-OpenCV\redist\SDL\1.2 and \2.0):
(8) 64-bit - SDL.dll and SDL2.dll "\x64" (8) 64-bit - SDL.dll and SDL2.dll "\x64"
``` ```
# How to install: # How to install:
## 1. Copy dynamic libraries files ## 1. Delphi environment setting
<b>OS Windows 64-bit</b><br>
```
Target platform 64-bit: (2),(4),(6),(8) -> "C:\Windows\System32\"
Target platform 32-bit: (1),(3),(5),(7) -> "C:\Windows\SysWOW64\"
```
<b>OS Windows 32-bit</b><br>
```
Target platform 32-bit: (1),(3),(5),(7) -> "C:\Windows\System32\"
```
## 2. Delphi environment setting
Download and unzip the [archive][1] or clone repository<br> Download and unzip the [archive][1] or clone repository<br>
``` ```
git clone https://github.com/Laex/Delphi-OpenCV.git git clone https://github.com/Laex/Delphi-OpenCV.git
@ -83,6 +73,17 @@ Add the search path for the modules of the project in Delphi IDE<br>
<PROJECT_ROOT>\Delphi-FFMPEG\source <PROJECT_ROOT>\Delphi-FFMPEG\source
``` ```
where ```<PROJECT_ROOT>``` directory, which was unzipped (or cloned) repository.<br> where ```<PROJECT_ROOT>``` directory, which was unzipped (or cloned) repository.<br>
## 2. Copy dynamic libraries files
<b>OS Windows 64-bit</b><br>
```
Target platform 64-bit: (2),(4),(6),(8) -> "C:\Windows\System32\"
Target platform 32-bit: (1),(3),(5),(7) -> "C:\Windows\SysWOW64\"
```
<b>OS Windows 32-bit</b><br>
```
Target platform 32-bit: (1),(3),(5),(7) -> "C:\Windows\System32\"
```
<b>Alternatively</b>, dynamic libraries can be placed next to an executable file.
## 3. Verify that the environment is configured correctly ## 3. Verify that the environment is configured correctly
Run from the repository Run from the repository
``` ```

View File

@ -538,6 +538,7 @@
{ Set FreePascal to Delphi mode } { Set FreePascal to Delphi mode }
{$IFDEF FPC} {$IFDEF FPC}
{$mode objfpc} {$mode objfpc}
// {$MODE DELPHI}
{$H+} {$H+}
{$modeswitch ADVANCEDRECORDS} {$modeswitch ADVANCEDRECORDS}
{$DEFINE CPUASM} {$DEFINE CPUASM}

View File

@ -2675,10 +2675,13 @@ asm
pop ecx // ÷èñòèì ñòåê pop ecx // ÷èñòèì ñòåê
mov ecx, edx // ñîõðàíÿåì ìëàäøóþ ÷àñòü ðåçóëüòàòà _cvGetSize mov ecx, edx // ñîõðàíÿåì ìëàäøóþ ÷àñòü ðåçóëüòàòà _cvGetSize
pop edx // âîññòàíàâëèâàåì Result pop edx // âîññòàíàâëèâàåì Result
{$IFDEF FPC}
mov DWORD PTR [ebp-$08],eax
mov DWORD PTR [ebp-$04],ecx
{$ELSE}
mov Result.width, eax mov Result.width, eax
// mov DWORD PTR [ebp-$08],eax
mov Result.height, ecx mov Result.height, ecx
// mov DWORD PTR [ebp-$04],ecx {$ENDIF FPC}
end; end;
{$ENDIF CPU32} {$ENDIF CPU32}
{$IFDEF CPU64} {$IFDEF CPU64}