bpl插件系统开发(5)

彻底解决Delphi/C++Builder程序缺少VCL60.bpl运行时错误 在Windows软件开发中,动态链接库(DLL)是模块化编程和代码复用的核心技术,它允许程序在运行时加载共享的函数库,从而减小可执行文件体积并便于更新。然而,这种动态依赖也带来了部署难题,即目标系统若缺少特定DLL,程序将无法启动。Delphi/C++Builder平台特有的Borland包库(BPL)正是这种机制的延伸,专用于承载其可视化组件库(VCL)。当开发者使用“带运行时包编译”选项时,程序便依赖于如VCL60.bpl等外部文件。其技术价值在于实现组件共享和模块化更新,但代价是产生了外部依赖,这在程 阅读详情

在这样的构想下,我们来做一个demos,

我们来定义如下的被IMisDriver驱动的接口,加入现在能想到的简单的应用,我们要作的工作如下

  1. 定义被驱动的接口
  2. 撰写IMisDriver的一个实现,用它来驱动各个接口,IMisDriver通过调用TPluginLoader的获得接口实例.
  3. 撰写每个接口的实现,并生成多个bpl
  4. 用TPluginLoader来载入这些插件,
  5. 主程序,实例化一个TPluginLoader,然后取得IMisLoader的实例,运行它.

我们先来完成第一步

unit InterfaceDefine;

interface

uses DBClient, midasLib, Types, classes;

type

    ITracer = interface
        ['{623B3A22-15CE-4555-B470-C3F4EBEE7EB4}']
        procedure info( const msg: string );
        procedure error( const msg: string );
        procedure debug( const msg: string );
    end;

    ILogin = interface
        ['{082F9C02-B504-4417-ACEB-1C9E3410ADED}']
        procedure login( const user, pwd: string );
        function loginByCookie( const user, pwd: string ): string;
    end;

    IUserInfo = interface
        ['{4DE53541-6FC3-44C7-BA27-49B0827625F0}']
        function information: TObject;
    end;

    IAuthentic = interface
        ['{0E4BCF53-D685-4AC8-9C38-614117E59365}']
        procedure valid( const actionId: string );
        procedure config; 
     end;

    IDataService = interface
        ['{722CE946-1F59-4C67-A0EA-6655F1B1D961}']
        procedure beginTrans;
        procedure commitTrans;
        procedure rollbackTrans;

        function doSelectSql( const theSql: string ): TClientDataset;
        function doSelectValue( const theSql: string ): string;
        procedure doUpdateSql( const delta: string );
        procedure doUpdateSqls( const deltas: TStringDynArray );

    end;

    IShortcutDispather = interface
        ['{A2C08C9E-5B56-4DC9-934B-323CAEC1FF49}']
        function actionOf( const input: TShortCut ): string;
        procedure config;
    end;

    IProcessData = interface
        ['{9368710D-7240-466A-8BCF-0D8B2FF0502D}']
        function process( var theData: TClientDataSet );
    end;

    IActionManager = interface
        ['{0FEE643C-7610-4442-9EB7-5D21A433788A}']
        function processerOf( action: string ): IProcessData;

    end;

    IView = interface( IProcessData )
        ['{5F0000F8-7A9D-4824-915C-20A95A7B01F4}']
        procedure View( var theData: TClientDataSet );
    end;

    IReport = interface( IProcessData )
        ['{DD5A8AE6-37D9-4B9F-A2C9-9BEA9F217F90}']
        procedure report( var theData: TClientDataSet );
    end;

implementation

end.

Delphi控件包安装与排错:从KonopkaControls的BPL/DPK机制说起 在Delphi开发中,集成第三方控件库是提升界面效率与可维护性的常见手段,但安装与加载过程常因对IDE工作机制理解不足而陷入困境。BPL(运行时包)与DPK(包工程)构成了Delphi组件系统的核心,设计期包需正确引用运行期包并注册到组件面板,才能被IDE稳定加载。实际工程中,控件“装好又消失”多半源于路径变更、版本冲突、注册表残留或权限限制,而zip文件完整性(如EOCD缺失)也是被忽视的典型诱因。从VCL界面升级到老项目维护,理解这些原理能显著降低环境类故障排查成本。本文以经典VCL控件集Konopka 阅读详情

相关推荐

delphi中使用bpl模式合作开发的模式示例

本示例演示了, 如何动态加载bpl包文件, 如何动态调用bpl中的函数和窗体 如何在多人开发时,用bpl的方式分工协作

bpl插件系统开发

一个插件系统需要什么?       一个最小的插件系统当然需要插件本身,调用插件的容器,最后需要契约.       契约是什么呢?契约就是两个对象相互沟通的一个标准,这个标准应该统一,这样容器才能和不同的插件通讯.我们可以使用接口来表述这个契约.例如 type     IPlugin = interface         ['{48BF4000-B028-4B57-9955-B1A

diligentcat的专栏 1762

【文本分析学习】Anaconda+pytorch虚拟环境下的pycharm文本分析(含分词、词性标注、词形归一化、停用词、文本情感分析、词频、文本相似度,附数据代码) NLTK

文本分析学习之 Anadconda+pytorch虚拟环境下的pycharm文本分析(含分词、词性标注、词形归一化、停用词、文本情感分析、词频、文本相似度,附数据代码)

littlexmj的博客 2337

主题:程序的扩展性(BPL+DLL)

主题:程序的扩展性(BPL+DLL) 主题:程序的扩展性(BPL+DLL)时间:星期一下午(2004-11-22 15:00)主持:A1 / A3 关联A3的Demo: http://www.hnyyzy.com/myweb/dksoft/DLL_BPL.rar 2004-11-22 15:06:45 A1.Aleyn.wu(45198124)今天的主题:利用BPL+DL...

288

汽车电子电气架构演进:从分布式ECU到域集中与中央计算

汽车电子电气架构(EEA)是整车电子系统的顶层设计框架,定义了计算、通信、供电等核心要素的组织方式。其演进遵循从分布式到集中式的技术路径,旨在解决传统架构下ECU数量膨胀带来的成本、复杂度和协同难题。通过域控制器(DCU)整合功能域,以及向中央计算+区域控制架构发展,实现了硬件资源池化、软硬件解耦与高速通信。这一变革的核心技术价值在于提升算力利用率、简化线束布局、支持软件定义汽车(SDV)与持续OTA升级。在智能电动汽车时代,新架构为智能座舱、自动驾驶等复杂应用提供了可扩展的平台基础,推动了汽车产业从硬件导

weixin_30326741的博客 395

手把手教你用U盘给海信IP501H刷机:GK6323V100C芯片的4.4.2和9.0固件实战

本文详细介绍了海信IP501H电视盒子基于GK6323V100C芯片的刷机实战指南,涵盖Android 4.4.2强刷和Android 9.0免拆刷机两种方案。从工具准备、短接操作到ADB调试,提供全流程解析和常见问题解决方案,帮助用户安全高效地完成刷机操作。

lemon的博客 1484

delphi中的bpl开发注意事项

如果只是一个EXE文件附带一个BPL文件,这种架构还算单纯,如果有多个子系统(*.bpl),设计时需要注意如下情况: 1.各个Package(*.bpl)在开发过程中,彼此的Contains区段中不能有同名的Unit 2.共享的unit一定要放在package,也就是要把共享模块变成Package 示例:我们现在来想想,如果是我们来主导这个系统,我们会如何设计呢? 1.虽然

diligentcat的专栏 2375

openpi 入门教程(二)droid libero 训练、推理

OpenPI是由物理智能团队发布的机器人领域开源模型与软件平台,提供基于流扩散式(π₀)和自回归式(π₀-FAST)两类视觉-语言-动作模型。平台支持在DROID、ALOHA、UR5等多种机器人系统上部署,包含预训练检查点(1万+小时数据)和微调示例。文档详细说明了各平台部署流程:DROID需启动策略服务器并配置摄像头;ALOHA提供真实机器人任务(取吐司、叠毛巾等)的检查点和场景设置建议;UR5示例展示自定义数据转换方法。实验性验证显示π₀-FAST在LIBERO基准测试中平均得分85.5。平台强调模型适

2506_90492529的博客 1026

bpl插件系统开发(4)

我们可以想像这样一个系统,与mvc的思想比较相同,controller负责整个系统的调度,当用户执行了某个action后,controller将其处理后用某个特定的view来呈现给用结果.这就是mvc先看看这个图这图是我用Together6.1画的,关心的设计思想,而不是代码本省,而且together本身也不支持pascal语法生成(不知道有没有插件)其中的IMisDr

qiume的专栏 824

教程: 将 SolidWorks 设计导出为 ROS 的 URDF

请按照以下步骤应用自定义徽标纹理:创建徽标材质文件:techniquepass材质名称:测试/材质颜色属性:环境、漫反射、镜面和发射都设置为白色(1 1 1 1),这意味着该材质看起来完全是白色的。纹理 在表面应用纹理图像 logo.png。将材质文件复制到 gazebo matrial:复制徽标图像:将 “徽标 ”替换为机器人上徽标所在位置的适当参考值。按照以上步骤,您就可以在 Gazebo 中为机器人添加自定义材质和纹理,包括徽标。

机器人控制与仿真应用 2465

生成自定义工具栏

我们生成了和VBA时代几乎一样的常用的工具栏。用WPF也可以完成以后的插件开发,界面控件编写基本靠自己绘画,还有用代码去控制,代码结构像HTML,做过网站的应该可以很快入手。其它后台C#代码除了对控件代码的控制外,和WinForm基本相同,但目前来看用WPF是生成自定义工具栏的较好的办法。当然,你也可以在工具栏命令中调用WinForm程序,对Coreldraw进行操作,这也应该是比较高效的办法,下次会讨论。资源的加入是本次调试的难点之一,我们的目标是让图片资源嵌入到程序中去,不必去电脑文件目录去调用;

力先生C#程序开发 1395

Delphi BPL包合并图文教程

Delphi IDE 本身就是一个插件模式的工具,插件的好处不用多说。运行包的BPL,其实就是众多单元的集合,因此可以再次重新组合,只要你将各个BPL包用到的单元再组合一次!本文以  http://code.google.com/p/tangram-plugin-framewor

leon_kin的专栏 4268

【Cmder】--- Windows11 配置CMD神器 (超详细 持续更新中)

在编程的艺术世界里,代码和灵感需要寻找到最佳的交融点,才能打造出令人为之惊叹的作品。而在这座秋知叶i博客的殿堂里,我们将共同追寻这种完美结合,为未来的世界留下属于我们的独特印记。

秋知叶i 1万+

bpl插件系统开发(2)

插件规范-----------插件必须实现一个接口,该接口通过 GetObject,SetObject方法让容器和插件能够交互数据.IPlugin = interface        [{48BF4000-B028-4B57-9955-B1A8305DA394}]        function GetRunResult: TObject; //用于向容器返回执行Execut

qiume的专栏 776

小论文/大论文必备 | YOLO多模态目标检测、绘制曲线对比图 | 引入多种绘制曲线对比图,包括mAP0.5,mAP0.5:0.95,Loss损失变化的曲线对比

本文通过可视化方法分析YOLO多模态模型的训练过程,对比不同实验的检测精度和损失函数变化。主要内容包括:1)绘制mAP@0.5和mAP@0.5:0.95曲线评估检测精度;2)分析边界框回归损失(box_loss)、分类损失(cls_loss)和分布式损失(dfl_loss)的收敛趋势;3)提供完整的Python代码实现,支持多实验对比,可生成高清曲线图。该方法能直观展示模型训练效果,便于优化策略评估和参数调优。

Ai缝合怪、助力小伙伴高效发论文 265

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

Delphi BPL包合并图文教程 IDEWiz tangram-plugin-framework

Delphi BPL包合并图文教程 Framework IDEWiz tangram-plugin-framework elphi IDE 本身就是一个插件模式的工具,插件的好处不用多说。运行包的BPL,其实就是众多单元的集合,因此可以再次重新组合,只要你将各个BPL包用到的单元再组合一次! 本文以http://code.google.com/p/tangram-plugin-frame...

qq_18932003的博客 891

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

[MyBean说明书]-如何制作BPL插件

DEMO位置:     samples\simpleConsole\Lib-bpl 【步骤】: 1. 首先新建一个BPL工程。 2. 添加一个窗体,实现IPluginForm接口(simpleConsole.exe只能显示IPluginForm插件) 3.在窗体单元的部分注册插件 4.copy到simpleConsole.exe所在目录的plug-ins\下面 5.可以运行simpl...

weixin_34343000的博客 107

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

我们永远优雅,但绝不炫耀:合并BPL包图文教程!

Delphi IDE 本身就是一个插件模式的工具,插件的好处不用多说。运行包的BPL,其实就是众多单元的集合,因此可以再次重新组合,只要你将各个BPL包用到的单元再组合一次!本文以  http://code.google.com/p/tangram-plugin-framework/ 插件框架自带的BPL包合并向导工具做一次图文介绍! 1、安装好开源插件框架 tangram-plugin后,然后

442

合并BPL包图文教程

<br /> Delphi IDE 本身就是一个插件模式的工具,插件的好处不用多说。运行包的BPL,其实就是众多单元的集合,因此可以再次重新组合,只要你将各个BPL包用到的单元再组合一次!<br />本文以  http://code.google.com/p/tangram-plugin-framework/ 插件框架自带的BPL包合并向导工具做一次图文介绍!<br /> <br />1、安装好开源插件框架 tangram-plugin后,然后点击 菜单 File->New->Others,找到tangra

leonkin的专栏 1439

[转]合并BPL包图文教程!

Delphi IDE 本身就是一个插件模式的工具,插件的好处不用多说。运行包的BPL,其实就是众多单元的集合,因此可以再次重新组合,只要你将各个BPL包用到的单元再组合一次! 本文以 http://code.google.com/p/tangram-plugin-framework/ 插件框架自带的BPL包合并向导工具做一次图文介绍! 1、安装好开源插件框架 tangram-plugin...

weixin_30332241的博客 168
上一篇: bpl插件系统开发(4)
下一篇: 停止更新
JavaD
博客等级 码龄23年 3粉丝 11原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址