Compare commits
2 Commits
3c7b5d0958
...
34fe915e38
Author | SHA1 | Date | |
---|---|---|---|
34fe915e38 | |||
4e13dda29d |
@ -10,6 +10,11 @@ unix {
|
|||||||
LIBS += -L/opt/ptu5/opt/build-ATBTariffCalculator-Desktop_Qt_5_12_12_GCC_64bit-Debug/CalculatorCInterface/ -lCalculatorCInterface
|
LIBS += -L/opt/ptu5/opt/build-ATBTariffCalculator-Desktop_Qt_5_12_12_GCC_64bit-Debug/CalculatorCInterface/ -lCalculatorCInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
|
win32 {
|
||||||
|
INCLUDEPATH += C:\Users\G.Hoffmann\Downloads\libgit2-1.7.2\libgit2-1.7.2\include
|
||||||
|
LIBS += -LC:\build-ATBTariffCalculator-Desktop_Qt_6_5_0_MinGW_64_bit-Release\CalculatorCInterface\release -lCalculatorCInterface
|
||||||
|
}
|
||||||
|
|
||||||
# You can make your code fail to compile if it uses deprecated APIs.
|
# You can make your code fail to compile if it uses deprecated APIs.
|
||||||
# In order to do so, uncomment the following line.
|
# In order to do so, uncomment the following line.
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
@ -26,13 +26,13 @@ int main(int argc, char *argv[])
|
|||||||
//setDebugLevel(LOG_NOTICE);
|
//setDebugLevel(LOG_NOTICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __linux__
|
#if 1
|
||||||
|
|
||||||
//TariffCalculatorHandle handle = NewTariffCalculator();
|
//TariffCalculatorHandle handle = NewTariffCalculator();
|
||||||
//DeleteTariffCalculator(handle);
|
//DeleteTariffCalculator(handle);
|
||||||
|
|
||||||
if (InitGitLibrary() > 0) {
|
if (InitGitLibrary() > 0) {
|
||||||
qCritical() << CloneRepository("https://git.mimbach49.de/GerhardHoffmann/customer_999.git", "/tmp/customer_999");
|
qCritical() << CloneRepository("https://git.mimbach49.de/GerhardHoffmann/customer_999.git", "C:\\tmp\\customer_999");
|
||||||
ShutdownGitLibrary();
|
ShutdownGitLibrary();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
@ -8,6 +8,11 @@ unix {
|
|||||||
LIBS += -L/usr/lib64 -lgit2
|
LIBS += -L/usr/lib64 -lgit2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
win32 {
|
||||||
|
INCLUDEPATH += C:\Users\G.Hoffmann\Downloads\libgit2-1.7.2\libgit2-1.7.2\include
|
||||||
|
LIBS += -LC:\Users\G.Hoffmann\Downloads\libgit2-1.7.2\libgit2-1.7.2\build\Debug -lgit2
|
||||||
|
}
|
||||||
|
|
||||||
# INCLUDEPATH+=$$_PRO_FILE_PWD_/../Utilities/
|
# INCLUDEPATH+=$$_PRO_FILE_PWD_/../Utilities/
|
||||||
|
|
||||||
|
|
||||||
|
BIN
windows/git2.dll
Normal file
BIN
windows/git2.dll
Normal file
Binary file not shown.
BIN
windows/git2.exp
Normal file
BIN
windows/git2.exp
Normal file
Binary file not shown.
BIN
windows/git2.lib
Normal file
BIN
windows/git2.lib
Normal file
Binary file not shown.
BIN
windows/git2.pdb
Normal file
BIN
windows/git2.pdb
Normal file
Binary file not shown.
35
windows/tariffcalculator.pas
Normal file
35
windows/tariffcalculator.pas
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
unit TariffCalculator;
|
||||||
|
|
||||||
|
{$mode ObjFPC}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
SysUtils, CTypes;
|
||||||
|
|
||||||
|
type
|
||||||
|
// Can't use the class directly, so it is treated as an opaque handle.
|
||||||
|
// THandle is guaranteed to have the right size, even on other platforms.
|
||||||
|
TariffCalculatorHandle = THandle;
|
||||||
|
|
||||||
|
function NewTariffCalculator: TariffCalculatorHandle; stdcall;
|
||||||
|
procedure DeleteTariffCalculator(handle: TariffCalculatorHandle); stdcall;
|
||||||
|
|
||||||
|
function InitGitLibrary: cint32; stdcall;
|
||||||
|
function ShutdownGitLibrary: cint32; stdcall;
|
||||||
|
function CloneRepository(var url; var local_path) : cint32; stdcall;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
const
|
||||||
|
DLLName = 'CalculatorCInterface.dll';
|
||||||
|
|
||||||
|
function NewTariffCalculator: TariffCalculatorHandle; stdcall; external DLLName;
|
||||||
|
procedure DeleteTariffCalculator(handle: TariffCalculatorHandle); stdcall; external DLLName;
|
||||||
|
|
||||||
|
function InitGitLibrary: cint32; stdcall; external DLLName;
|
||||||
|
function ShutdownGitLibrary: cint32; stdcall; external DLLName;
|
||||||
|
function CloneRepository(var url; var local_path) : cint32; stdcall; external DLLName;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user