English 中文(简体)
B. 如何使最低规模的氯环乙烷列入框架
原标题:How to have the minimum size possible Chromium Embedded Framework dlls

Chromium Embedded Framework(http://code.google.com/p/delphichromiumembe/)是好的。 我只用它显示Delphi代码产生的静态超文本、联合材料和共同支助事务。

但我认为这太大了。

我需要:

  • I need HTML support
  • I need JavaScript support.
  • I need CSS support.
  • I need Unicode support.
  • I need OnNavigate event.

不需要:

  • I don t need D3D, GDI+, GLES support.
  • I don t need ability to load a web page. LoadString is enough for me.
  • I don t need Locales
  • I don t need Caching
  • I don t need Developer Tools

我如何能够通过尽可能少的一揽子部署计划来实现必要的特征?

目前,CEF有40种 MB。

最佳回答

根据需要的特点,你只能从某些档案/文件中删除。 我尝试并可以排除这些障碍:

  • avcodec-53.dll
  • avcodec-54.dll
  • avformat-53.dll
  • avformat-54.dll
  • avutil-51.dll
  • ffmpegsumo.dll
  • libEGL.dll
  • libGLESv2.dll
  • cef.pak
  • chrome.pak
  • devtools_resources.pak

我认为,如果你简单地利用录像机显示你应用中包含的网站,那么你就会有松散的录像击退能力和一些信使。

问题回答

关于减少CEF的图书馆规模,需要全面重建,并需要一些缩编阶段。 根据今天的计算机动力和网络带宽,花费了大量时间,也许不值得使用——40个甲基溴是小的。 而我则依靠欧洲紧急部队的“官方”释放,以保持最新版本的浏览器。

如果贵问题涉及一揽子部署的规模和单一可执行/无安装特征,你可考虑将<代码>dll列入exe

The trick I ve used is that the .dll files are stored as zip inside the main .exe, then uncompressed on a private temporary folder on the hard drive (you may want to use the same folder, but it won t work in C:Program Files due to the Vista/Seven UAC, and your user may wonder where all those files comes frome - that is the reason why I use a private folder).

From the user point of view, there is just one executable file to run. All .dll files are compressed within, and you can also add some non-binary resources to the files (which is not possible with exe/dll compactors). An hidden folder is created and used to load the libraries (which must be loaded with LoadLibrary(), not statically linked), and decompression will be done only once (therefore it will be faster than using an exe/dll compressor).

例如,我用它把藏书图书馆和英文字典植入我们的Syn Project工具。 法典如下:

constructor THunSpell.Create(DictionaryName: string=  );
var Temp, HunSpell, Aff, Dic: TFileName;
    i: integer;
begin
  if DictionaryName=   then
    DictionaryName :=  en_US ;
  Temp := GetSynopseCommonAppDataPath;
  HunSpell := Temp+ hunspell.dll ;
  with TZipRead.Create(HInstance, Zip , ZIP ) do
  try
    Aff := DictionaryName+ .aff ;
    if not FileExists(Temp+Aff) then
      StringToFile(Temp+Aff,UnZip(NameToIndex(Aff)));
    Dic := DictionaryName+ .dic ;
    if not FileExists(Temp+Dic) then
      StringToFile(Temp+Dic,UnZip(NameToIndex(Dic)));
    if not FileExists(HunSpell) then
      StringToFile(HunSpell,UnZip(NameToIndex( hunspell.dll )));
  finally
    Free;
  end;
  fHunLib := SafeLoadLibrary(HunSpell);
  if fHunLib=0 then
    exit;
  if not LoadEntryPoints then begin
    FreeLibrary(fHunLib);
    fHunLib := 0;
    exit;
  end;
  fDictionaryName := DictionaryName;
  fHunHandle := Hunspell_create(pointer(Temp+Aff),pointer(Temp+Dic));
  if fHunHandle=nil then
    exit;
   (....)
end;

See this link about details and source code.

您可考虑使用一些低水平的黑板,如BTMemory Module,但你得起任何可能的压缩。





相关问题
determining the character set to use

my delphi 2009 app has a basic translation system that uses GNUGetText. i had used some win API calls to prepare the fonts. i thought it was working correctly until recently when someone from Malta ...

Help with strange Delphi 5 IDE problems

Ok, I m going nuts here. For the last (almost) four years, I ve been putting up with some extremely bad behavior from my Delphi 5 IDE. Problems include: Seemingly random errors in coride50.bpl ...

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How convert string to integer in Oxygene

In Delphi, there is a function StrToInt() that converts a string to an integer value; there is also IntToStr(), which does the reverse. These functions doesn t appear to be part of Oxygene, and I can ...

Quick padding of a string in Delphi

I was trying to speed up a certain routine in an application, and my profiler, AQTime, identified one method in particular as a bottleneck. The method has been with us for years, and is part of a "...

热门标签