Noutați

Powerful Easy To Use Build Automation Tool For Developers Made In Delphi

FinalBuilder is a build automation tool used by thousands of developers to simplify their build process and it is built in Delphi. Some of the FinalBuilder features include integrated debugging, email, MSN, FTP & SFTP support, version control integration, detailed logging, variables, scripting support, and an action studio for writing custom FinalBuilder actions. Build scripts can be scheduled with windows scheduler, or integrate them with Continua CI, Jenkins or any other CI Server according to the FinalBuilder site. FinalBuilder lists companies such as Intel, Samsung, Symantec, Cisco, and HP among their customers. There is a massive amount of features with this product and they have a feature matrix that outlines it all. Website https://www.finalbuilder.com/finalbuilder Screenshot Gallery

Read More

Learn How To Use WinRT In Your Native Windows Delphi And C++ Builder Apps

WinRT is the latest application architecture from Microsoft for Windows 10 and components development. This webinar will show you how to take advantage of the new WinRT APIs and components in your Delphi and C++Builder applications. WinRT is a modern C++17 language projection for WinRT and it’s implemented entirely in header files. This leads to great performance, both in time and space, typically performing better and producing smaller binaries than any other language option for the Windows Runtime. In one sentence, WinRT is for the new world. Agenda The Windows architecture strategy What is WinRT? Why should we care about it? WinRT/UWP vs Win32 vs COM vs .NET The Ever Moving Strategy with Windows WinRT Components in RAD Studio Q&A Windows Runtime  Combine what’s great in COM and .NET Binary interface for language interoperability Metadata management is similar to .NET New COM as a natural part of all languages/platforms .NET, C++, JavaScript, Delphi and C++ Builder Build a new class library on the new runtime Cleanup the library compared to .NET Do not enforce managed code

Read More

Hit The Ground Running With Windows Native MongoDB Database Sample Apps For Delphi

MongoDB is a document database, which means it stores data in JSON-like documents, the most natural way to think about data, and is much more expressive and powerful than the traditional row/column model. How about connecting with MongoDB and exploring the available databases and data using FireDAC components in your Application. Don’t know where to start? This post will guide you to do that. MongoDB.Explore Sample App shows how to connect to available MongoDB Databases, access to its ListCollections, and populate to the grid using MongoDB API wrapper class. You can find Delphi and C++ code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version. Components used in MangoDB.Explore Sample App: TFDPhysMongoDriverLink: To link the MongoDB driver to an application and set it up. In general, it is enough to only include the FireDAC.Phys.MongoDB unit into your application uses a clause. The TFDPhysMongoDriverLink component can be used to specify: The VendorHome – the MongoDB installation root folder. The VendorLib – the name and the optional path to the MongoDB client library. TFDConnection: To establish a connection to a DBMS and to manage associated datasets. TFDMongoDataset: Used to attach a dataset to an existing MongoDB cursor. This class allows you to attach the dataset to an existing MongoDB cursor. You can get the cursor from various MongoDB API wrapping class methods, such as TMongoDatabase.ListCollections.To open a dataset, assign a cursor to the Cursor property and call the Open method. TFDMongoQuery: The TFDMongoQuery class is used to execute a MongoDB query. You can specify a query in one of the following ways: Using the QProject, QMatch, and QSort properties at design-time or run-time. Using the Query Builder provided by the Query property at run-time. Use TDataSource to populate the fetched data to TDBGrid. Implementation Details: You can find the MongoDB Explore Demo sample project at: Object PascalDatabaseFireDACSamplesDBMS SpecificMongoDBMongo_Explore.dproj. Before running this, as a preliminary step, we need to have a MongoDB Server is running and accessible from your host. For Details, See Connect to MongoDB Database. Check the below screen for listing the databases in the MongoDB server. Upon changing the database, its list collections changes. This screen Demonstrates the “restaurants” collection of the “test” database is provisioned with test data. To provision this collection, run the MongoDB Restaurants Demo, and click the Load Data button: You can find the MongoDB Restaurants Demo sample project at: Object PascalDatabaseFireDACSamplesDBMS SpecificMongoDBRestaurants Check out the full article in the DocWiki about the MongoDB.Explore Sample. Check out the full source code for the MongoDB.Explore projects for Delphi over on GitHub. Check out the full source code for MondoDB samples in C++ over on GitHub.

Read More

Develop. Share. Inspire. – GM Update for November 2020

It is already November—time flies these days. Despite the global pandemic, we keep charging ahead. As developers are getting more used to working from home (and some love it), we see more projects picking up, which is exciting. I am especially thrilled that there are more and more public Delphi projects on GitHub, and related discussions on popular platforms, such as Stack Overflow and Reddit, are growing, though not as quickly. I know that we have our own more proprietary ones, which are great, but the more Delphi we put out there, the better! My themes lately have been simple: Develop brilliant code. Share it. Inspire existing and new Delphi developers. Have you checked any of these boxes lately? There are about 8K Delphi projects on GitHub. Some 500K+ developers know Delphi, and at least 200-300K are actively developing with it. You do the math! We recently released Bold for Delphi open source to help contribute to the community, and a fantastic group of developers is now working on the project. Embarcadero is just getting started with open source projects, so be on the lookout for more! Here are some highlights of our current efforts: 10.4 was an essential release with over 1,000 enhancements and quality fixes. Many of its features were welcomed by both large companies and individual developers. 10.4.1 is a stable and robust version, featuring a faster implementation of Delphi Code Insight based on Language Server Protocol, VCL styles that work great with High-DPI and 4K monitors, extended Apple platforms, and API coverage. It also includes a much improved GetIt package manager and many other features. 10.4.1 adds over 800 quality improvements, including 500+ for issues publicly reported on the Quality Portal site. 10.4.2 Beta is also kicking off soon for Update Subscription customers. It is a great time to upgrade! With almost 4000 people registered, this was our biggest annual Delphi event. If you missed the live sessions, register now to catch the replays. This year we included many expert panels, including with some of Delphi’s lead architects, a massive hit with everyone! Join and enjoy presentations from thought leaders and check out some of the great perks and discounts available. One of our goals with DelphiCon was to simplify the format compared to previous CodeRage events and we hope you enjoyed it. We are always looking for ways to improve, and your feedback is valuable. By popular demand, a dedicated C++ event is in the works for the spring. Product management recently updated the RAD Studio roadmap for November 2020. Always great to see what the plans are for the future, and read the commentary from product management around these plans. These roadmaps are based on the direction of the industry, and the feedback we receive from you, our users. Check out the roadmap, leave your feedback, and file feature requests on Quality Portal. We realize that budgets are tight these days and want to make working with the latest releases more economical. We have a number of attractive global promotions to fit different needs. We have enhanced the Architect SKU to include a lot of value-added products, from Ext JS and Ranorex licenses to the expanded use of InterBase and RAD Server. If you are looking for the best dollar deal, that is clearly […]

Read More

Integrate Python Threading, Windows Console, And Command Line Arguments In Delphi Windows GUI Apps

We know how to do Multithreading in Delphi. How about a simple python script that performs threading in Python and runs the script in the Delphi application? This brings the advantage of using existing multithreaded or new python scripts in your Delphi application. This post guide you to do that with the Python4Delphi Sample app. You can also use Python4Delphi with C++Builder. Python4Delphi Demo22 Sample App shows how to create a Python script in Delphi Application which demonstrates creating thread and output the result in windows console, passing arguments in the command line. You can find the Demo22 source on GitHub. Prerequisites: Download and install the latest Python for your platform. Follow the Python4Delphi installation instructions mentioned here. Alternatively, you can check out this video Getting started with Python4Delphi. Components used in Python4Delphi Demo22 App: TPythonEngine: A collection of relatively low-level routines for communicating with Python, creating Python types in Delphi, etc. It’s a singleton class. You can find the Python4Delphi Demo22 sample project from the extracted GitHub repository ..Python4DelphiDemosDemo22.dproj. Open this project in RAD Studio 10.4.1 and run the application. Implementation Details: PythonEngine1 provides the connection to Python or rather the Python API. This project uses Python3.9 which can be seen in TPythonEngine DllName property. It uses a Python Script file threading_test.py where the below list of modules was used. threading: This module constructs higher-level threading interfaces on top of the lower level _thread module.  collections: This module implements specialized container datatypes providing alternatives to Python’s general-purpose built-in containers, dict, list, set, and tuple. In this sample, deque is used. time: This module provides various time-related functions. threading_test.py contains, ProducerThread, ConsumerThread, BoundedQueue class within the function _test. Memo1, used for providing the Python Script to execute. On Clicking Execute Button the below code executes the python script. procedure TForm1.Button1Click(Sender: TObject); begin PythonEngine1.ExecStrings( Memo1.Lines ); end; procedure TForm1.Button1Click(Sender: TObject); begin   PythonEngine1.ExecStrings( Memo1.Lines ); end; The script below is executed which will opens a window console, create threads put in a queue and execute one after other. import threading_test import sys # the following is needed to use the newly allocated console! sys.stdout = sys.stderr= open(‘CONOUT$’, ‘wt’) try: count = int(sys.argv[1]) except: count = 3 for i in range(count): print (“**** Pass”, i) threading_test._test() print (“**** Done.”) import threading_test   import sys # the following is needed to use the newly allocated console! sys.stdout = sys.stderr= open(‘CONOUT$’, ‘wt’)   try:   count = int(sys.argv[1]) except:   count = 3   for i in range(count):   print (“**** Pass”, i)   threading_test._test() print (“**** Done.”) Head over and check out the open source Python4Delphi project which makes it easy to build Python GUIs for Windows with Delphi.

Read More

Learn About The Initialization Of Class Objects By Rvalues In C++ Windows Development

C++Builder includes the use of rvalue references, which allow creating a reference to temporaries. When you initialize to an class object using an rvalue(a temporary object), C++11 looks to see if you have defined a move constructor in your class. If you have, the temporary object is passed to it as a modifiable (non-const) rvalue reference, allowing you to transfer ownership of resource pointers and handles, and nullify them in the temporary object. We can implement the move constructor as follows.   class SomeClass { private: int *foo; public: SomeClass() : foo(nullptr) {} //Move Constructor SomeClass(SomeClass &&c) { foo = c.foo; c.foo = nullptr; } }; int _tmain(int argc, _TCHAR* argv[]) { SomeClass obj = SomeClass(50); //Move constructor is called. return 0; } 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 class SomeClass {   private:      int *foo;     public:   SomeClass() : foo(nullptr) {}   //Move Constructor   SomeClass(SomeClass &&c)   {      foo = c.foo;      c.foo = nullptr;   } };   int _tmain(int argc, _TCHAR* argv[]) {   SomeClass obj = SomeClass(50); //Move constructor is called.     return 0; } Here use the syntax && to indicate that the variable is an rvalue reference. When the temporary object is initialized, we now simply copy the pointer instead of the content it points to. Head over and check out all of the C++ features supported by the Clang compiler in C++Builder.

Read More

Using Python4Delphi with C++Builder (webinar)

David I. has a fantastic blog post on using Python4Delphi with C++Builder. This was inspired by our previous webinars on the topic. and is the result of his collaboration with Kiriakos (AKA PyScripter), the maintainer of Python4Delphi, who also made some changes in the library to work better with C++Builder. By popular request, David and Kiriakos have also agreed to run a Python for C++ developers webinar where you can learn to leverage Python from your favorite C++ developer tools. Date: Wed, Dec 2nd, 2020 Time: 9 AM CST/1500 UTC  

Read More

Apple Platforms Patch for RAD Studio 10.4.1

We have just released a new patch focused on improving RAD Studio 10.4.1 support for XCode 12, iOS 14 and macOS 11 Big Sur (Intel): these are operating systems and tools which were not available when 10.4.1 shipped. Specifically, the patch offers fixes for a Delphi exception issue on macOS 11 Big Sur Intel (which was also affecting PAServer when running on that platform, meaning this patch includes a new version of PAServer), SDK import from Xcode 12, and debugging applications on an iOS 14 device. Notice that new ARM-based Macs running macOS 11 Big Sur can execute macOS apps built for the Intel platform, including those built with Delphi 10.4.1, via the Apple Rosetta 2 compatibility layer. The patch can be installed via GetIt (with automatic installation via a deferred package, applied as you restart RAD Studio) or a direct download from my.embarcadero.com (available shortly) and manual installation. In both cases you’ll have to copy the PAServer for macOS installer to your Mac and install it manually. The readme file includes additional information and details.

Read More

TMS WEB Core embraces ever more powerful PWA support from Google Chrome

There is no doubt that Google is and remains the driving force behind the fast evolving web world. And with Microsoft having adopted the Google Chromium engine in its latest and new default Windows 10 operating system browser, it is clear that the browser gets ever more powerful with each release. While every Chrome update sees a lot of enhancements, the release 86 introduced perhaps another disruptive feature: the file system access API! Yes, you read this correct, file system access API or in other words, access to the local file system from a PWA (Progressive Web App)! Of course, Google took the necessary measures to look over security. I can imagine you wouldn’t want to be directed to some URL and the web application at this URL will suddenly start scanning your local hard drive. All local file access remains initiated by user interaction and user consent! User consent prompt to view files in a folder What the File System Access API actually provides is: open local text or binary files save to a local text or binary files use the operating system file dialog to pick a file use the operating system file dialog to save to a file get access to a folder and its files/subfolders use the operating system to select a folder associate file types with PWA apps Now, you will understand that as we read the news, we were eager to investigate integration capabilities in a TMS WEB Core PWA and reflect on bringing easy to use Pascal language wrapper classes to take advantage of this new functionality. So, in our labs, we created a support unit for local file handling : WEBLib.LocalFiles. In this unit, three classes are available: TTextFile, TBinaryFile and TFolder. Working with local text files TTextFile offers following public interface TTextFile = class(TObject) public procedure OpenFile; overload; procedure OpenFile(AOpenFile: TOpenTextFileProc); overload; procedure SaveFile; overload; procedure SaveFile(ASaveFile: TSaveFileProc); overload; procedure SaveAsFile; overload; procedure SaveAsFile(ASaveFile: TSaveFileProc); overload; property Text: string; property FileName: string; property OnFileOpen: TNotifyEvent; property OnFileSave: TNotifyEvent; end; As you can see there are overloads for the OpenFile, SaveFile and SaveAsFile methods. In one version of the methods, there is an anonymouse method that is called when the action on the file completed and the other versioni will signal completion via an event. To use the class to open a file, we can write: begin ATextFile := TTextFile.Create; ATextFile.OpenFile(procedure(AText: string) begin WebMemo1.Lines.Text := AText; end); end; If the text was modified in the memo control, it can be saved with following code working on the same instance of the TTextFile object: begin ATextFile.Text := WebMemo1.Lines.Text; ATextFile.SaveFile(procedure begin ShowMessage(‘File succesfully saved’); end); end; As you can see, it becomes extremely easy for Pascal developers to take advantage of the file system access API in the browser! Working with local binary files For binary files, a similar class TBinaryFile was created with the important different from the TTextFile that here the data read or to be saved is of the type TJSArrayBuffer. TJSArrayBuffer is the Object Pascal wrapper for the JavaScript ArrayBuffer which basically is an array of bytes. The interface of TBinaryFile is the same as TTextFile except that it exposes public property TBinaryFile.Data: TJSArrayBuffer. To demonstrate its use, we can open a local image file with the following code: var […]

Read More

Double vector graphics, double quality

uses AdvTypes; procedure TForm1.LoadSVG; begin Image1.Picture.LoadFromFile(‘nature.svg’); end; uses AdvPDFLib, Types; procedure TForm1.Button1Click(Sender: TObject); var p: TAdvPDFLib; begin p := TAdvPDFLib.Create; try p.BeginDocument(‘SVGToPDF.pdf’); p.NewPage; p.Graphics.DrawImageFromFile(‘nature.svg’, RectF(50, 50, p.PageWidth – 50, 500)); p.EndDocument(True); finally p.Free; end; end; When zooming in, you’ll notice that the quality is not affected because of the native vector graphics used inside the PDF document.

Read More