mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: libmime 64-bit.
This commit is contained in:
parent
7b43130c8a
commit
f226d2437a
16 changed files with 37 additions and 12 deletions
Binary file not shown.
|
|
@ -2,13 +2,28 @@
|
|||
|
||||
CPPFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include # -g3
|
||||
|
||||
all: libmime
|
||||
ifndef CPU_TARGET
|
||||
CPU_TARGET=i386
|
||||
endif
|
||||
|
||||
ifeq ($(CPU_TARGET),x86_64)
|
||||
CPPFLAGS += -m64
|
||||
else
|
||||
ifeq ($(CPU_TARGET),i386)
|
||||
CPPFLAGS += -m32
|
||||
else
|
||||
$(error Invalid target CPU)
|
||||
endif
|
||||
endif
|
||||
|
||||
all: clean libmime
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a *.so.*
|
||||
|
||||
libmime: mime-action.o mime-cache.o mime-type.o mime-util.o
|
||||
$(AR) rc libmime.a *.o
|
||||
cp libmime.a ../../$(CPU_TARGET)
|
||||
# shared library:
|
||||
# $(CC) -shared -Wl,-soname,libmime.so.1 -o libmime.so.1.0.1 libmime.a
|
||||
# ln -s libmime.so.1 libmime.so
|
||||
BIN
libraries/x86_64/libmime.a
Normal file
BIN
libraries/x86_64/libmime.a
Normal file
Binary file not shown.
6
src/doublecmd-fpc.cfg
Normal file
6
src/doublecmd-fpc.cfg
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#IFDEF CPU64
|
||||
-Fl../libraries/x86_64
|
||||
#ELSE
|
||||
-Fl../libraries/i386
|
||||
#ENDIF
|
||||
|
||||
|
|
@ -579,7 +579,6 @@
|
|||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(LazarusDir)\ide\;$(ProjOutDir)\"/>
|
||||
<Libraries Value="$(ProjPath)\..\libraries\"/>
|
||||
<OtherUnitFiles Value="$(ProjPath)\platform\;$(ProjPath)\platform\$(SrcOS)\;..\sdk\;$(ProjPath)\newdesign\;$(ProjPath)\newdesign\fileproperties\;newdesign\columnsview\"/>
|
||||
<UnitOutputDirectory Value="..\units\$(TargetCPU)-$(TargetOS)-$(LCLWidgetType)"/>
|
||||
<SrcPath Value="$(LazarusDir)\lcl\;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType)\;$(fpcsrcdir)\packages\fcl-base\src\"/>
|
||||
|
|
@ -608,6 +607,10 @@
|
|||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<ConfigFile>
|
||||
<CustomConfigFile Value="True"/>
|
||||
<ConfigFilePath Value="doublecmd-fpc.cfg"/>
|
||||
</ConfigFile>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
<ExecuteBefore>
|
||||
<Command Value="_getsvnrev.cmd $(LazarusDir)"/>
|
||||
|
|
|
|||
|
|
@ -6,9 +6,7 @@ interface
|
|||
|
||||
uses
|
||||
Classes,
|
||||
glib2, libc;
|
||||
|
||||
{$linklib libmime.a}
|
||||
glib2;
|
||||
|
||||
type
|
||||
PDesktopFileEntry = ^TDesktopFileEntry;
|
||||
|
|
@ -43,13 +41,16 @@ type
|
|||
Hidden: gboolean;
|
||||
end;
|
||||
|
||||
procedure mime_type_init; cdecl; external 'libmime';
|
||||
procedure mime_type_finalize; cdecl; external 'libmime';
|
||||
function mime_type_get_by_filename(filename: PChar; stat: Pointer) : PChar; cdecl; external 'libmime';
|
||||
function mime_type_get_actions(mimeType: PChar): PPChar; cdecl; external 'libmime';
|
||||
function mime_type_locate_desktop_file(DirectoryToCheck: PChar; DesktopFileId: PChar): PChar; cdecl; external 'libmime';
|
||||
function mime_get_desktop_entry(DesktopFileName: PChar): TCDesktopFileEntry; cdecl; external 'libmime';
|
||||
function translate_app_exec_to_command_line(const app: PCDesktopFileEntry; file_list: PGList): PChar; cdecl; external 'libmime';
|
||||
const
|
||||
libmime = 'libmime';
|
||||
|
||||
procedure mime_type_init; cdecl; external libmime;
|
||||
procedure mime_type_finalize; cdecl; external libmime;
|
||||
function mime_type_get_by_filename(filename: PChar; stat: Pointer) : PChar; cdecl; external libmime;
|
||||
function mime_type_get_actions(mimeType: PChar): PPChar; cdecl; external libmime;
|
||||
function mime_type_locate_desktop_file(DirectoryToCheck: PChar; DesktopFileId: PChar): PChar; cdecl; external libmime;
|
||||
function mime_get_desktop_entry(DesktopFileName: PChar): TCDesktopFileEntry; cdecl; external libmime;
|
||||
function translate_app_exec_to_command_line(const app: PCDesktopFileEntry; file_list: PGList): PChar; cdecl; external libmime;
|
||||
|
||||
function GetDesktopEntries(FileNames: TStringList): TList;
|
||||
var
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue