How to install DUnitX under C++ builder?
I am working with Version 10.2.3. and I can't find any hints to use this testing framework in my projects.
For the specific C++Builder version addressed in the question, 10.2.x:
Installation: The C++Builder installer for 10.2 lets you select components to install during the installation. DunitX is one of the selectable components.
Usage: Embarcadero documents how to use DunitX with C++Builder 10.2 here in the overview page (archived here).
However, in 2022, the current C++Builder Release 11 (11.1, 11.2) no longer supports using DunitX with C++, so you might want to consider using another unit testing framework. See Embarcadero's note on the same documentation page for the current release (archived here):
Note: DUnitX uses Delphi language features that are not supported in C++. For C++ developers, DUnit is the best tool. C++ can also be tested using other frameworks such as Google Test, available via GetIt Package Manager.
Problem solved. I made a mistake when I installed my update.
Related
I have taken a look at these URLs:
check if runtime installed
https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution
some sample code assuming newer Delphi
Using WebView (EdgeHTML) in Delphi / C++ Builder
some sample code assuming newer Delphi
WebView2 (TEdgeBrowser) updated Delphi interface (e.g. ICoreWebView2Controller2)
Yet even those seem to assume a newer Delphi version than I use (XE4) ... and preferably I would like Lazarus support as well. At the same time I really love being able to use "newest available patched system browser" which is why I am not jumping on https://github.com/salvadordf/CEF4Delphi albeit it may end up being the final solution.
Is there anyone else who has begun the undertaking of implementing webview2 on older versions or is this simply impractical due to type libraries not being importable etc? (i.e. major headache in converting, implementing and testing everything, furthermore on old Delphi versions)
I recently published WebView4Delphi at GitHub with an MIT license.
WebView4Delphi uses the WebView2 runtime to embed Chromium based browsers in Delphi and Lazarus applications.
It was developed in Delphi 11 but it also works with Delphi XE3.
I have to update a Delphi XE installation for a project to a newer version of Delphi but I don't have much experience with Delphi, the problem is there are plenty of old packages and components in there.
When I install a new version did I have to install all components again (if it possible to install it in this new version) or is it something like an update to my old installation and all installed stuff is now in the new version also?
Updating a Delphi XE application to a newer Delphi is usually quite easy. The only serious issue could be third party components which you must install in the newer Delphi version. Check with each component vendor that a version exists for your target Delphi version.
I always strongly recommand to NOT use any third party component that has no source available. Also don't buy any third party component using a DLL, OCX or other external binary object.
When you buy a third party component, always buy the source code with it. Then throw away any pre-build package or dcu and recompile everything before any serious use. That way you'll be sure to have all required source code and work with that source code.
Once you have the source code, it becomes much easier to port to the next Delphi version. Usually there is just nothing to change (There was only one notable exception in the past between Delphi 2007 and Delphi 2010 when Unicode string were introduced).
When there is something to change, it is usually only the name of a "used" unit. Somtimes Embarcadero move one class from a unit to another one. Sometimes, you have to change a $IFDEF which specify a Delphi version. Look at {$IFDEF VER180} and similar to adapt to you current version (See the online help for such symbol).
And if you still have issues, then ask here...
Upgrading to newer version of Delphi might not be a trivial task.
First problem you will run into are Thid Party Components.
If you don't own the souce code for them it means that they come with precompiled packages and these packages unfortunately arent compatible between different Delphi versions.
If you do have source code for them you might be able to recompile them on newer Delphi versions but this might require you to do some code changes.
So I strongly recomend you first check to see if there are updated versions of these components available that support the Delphi version to which you are planning to upgrade.
For instance if your application relies on BDE (Borland Database Engine) that shipped with older versions of Delphi you Will be forced to do Quite some changes to properly set up the FireDac database framework that ships with newer delphi versions.
I recently switched from Borland Delphi 7 to Embarcadero Delphi XE6 and I find it very difficult to install a library with components. I wish to install the Microsoft Speech Library.
I have searched on the web for tutorials and guides, but non of them have helped me.
Can someone please help me by giving a step by step tutorial. I asked two of my friends which also uses Delphi XE6 and they switched from Delphi 7 and Delph 2010. They also do not know how to do it.
I do not have Delphi XE6 anymore. I'm now using Delphi 10.1 Berlin Update 1, but I did struggle to import a Type Library in XE6 as it was a bit different to Delphi 7. Anyway I can't remember how I managed to do it in XE6, but I'm assuming it is the same in Berlin. So here:
Go to 'Component' in the main menu.
Choose 'Import Component'.
Choose 'Import a Type Library' and click on Next.
Choose the library you wish to install.
Choose a name for it and where/how you want to install it.
Just follow the rest of the steps. It will then compile and install it into your IDE.
Be aware that the type library importer in XE6 is broken. I've found at least one instance where the resultant unit has several interfaces with the parameter declared incorrectly as a const type instead of a var type. Delphi 2010 imports the same library correctly.
what is the options for unit testing in delphi XE4? i'm trying to use DUnit but it seems didn't have any official version for XE4 and source didn't compile
Delphi has for a long time, and XE4 is no different, shipped with DUnit. You need to make sure that you select it in the install options.
The version that is shipped with Delphi is already updated to work with the version of Delphi that it ships with. Looking at the DUnit sourceforge project, it seems rather moribund. The last commit to the SVN archive that mentions Delphi versions is for Delphi 2009. So it seems clear to me that you are best sticking with the version that ships with Delphi.
You may be interested with the unit testing features available within our mORMot Open Source framework. See this StackOverflow answer.
In addition with unit testing with classes, just like DUnit, you have at hand a whole mocking/stubbing framework.
Using interfaces, in a SOLID context, is therefore more integrated within this framework than with DUnit. For instance, interface mocking directly links to a test case, so is able to be integrated within the unit test suit.
It is perfectly working with Delphi XE4, in both 32 bit and 64 bit Windows platforms.
There is a new project called DUnitX. It is intended to take advantage of newer features in the language and framework and works with Delphi 2010 and later.
Still very much a work in progress, but it is currently active and you will probably recognise some of the people who are working on it.
Typically, the install of the JEDI libraries is done using the installer. Does anybody know if the installer
Works with Rad Studio XE (Delphi and Builder)
Can be easily modified to do so if not
Knows of some manual install instructions?
Thanks
Depends on what JEDI Libraries your talking about as there are several.
Typically updated JEDI Library are available for download on sourceforge a few days after release. As they are not permitted to publish the required changes before the release. But since the JCL is used in the RAD Studio IDE, it is always updated to the latest version.
The JCL (JEDI Code Library) is on the partner DVD.
JCL for XE can be downloaded from Code Central here: http://cc.embarcadero.com/Item/27879
The JVCL (Jedi Visual component Library) can be downloaded from Code Central here: http://cc.embarcadero.com/Item/27901
The Delphi XE Partner DVD contains JCL and JVCL.
If you are using the Delphi XE trial, then it's possible that jedi installer does not work even when Jedi make the release with support of Delphi XE. That is because the tral version of the products doesn't support command line tools (e.g. command line compiler) that the installers need to compile Jedi's BPLs
The current state of the JCL and JVCL do not work with Builder C++ XE.
The author has stated he hopes for a release On Sept 10, 2010
Unless you are in a hurry you should wait for an official release, but if there are not "breaking changes" (and AFAIK XE has not), it's not difficult to modify the packages to generate different bpl/dcp names at least and install them manually.