VSoft Technologies BlogsVSoft Technologies Blogs - posts about our products and software development.https://www.finalbuilder.com/resources/blogsBlack Friday Sale 2023 - 50% off all new licenseshttps://www.finalbuilder.com/resources/blogs/postid/846/black-friday-sale-2023-50-percent-off-all-new-licensesAutomise,Continua CI,Delphi,FinalBuilderFri, 24 Nov 2023 02:27:58 GMT<p>50% OFF. No, that’s not a typo! Our first ever Black Friday sale - 50% off all new licenses - valid to midnight Tues 28th Nov (UTC).</p> <p>No coupon code required, the store will apply the discount automatically.</p> 846Code Signing with USB Tokenshttps://www.finalbuilder.com/resources/blogs/postid/845/code-signing-with-usb-tokensContinua CI,Delphi,FinalBuilderMon, 03 Oct 2022 16:40:22 GMT<p>Big changes are coming for code signing certificates in 2023. New and reissued publicly trusted organisation validation (OV) and individual validation (IV) code signing certificates will have to be issued or stored on preconfigured secure hardware by the issuing Certificate Authority (CA) and the device must meet FIPS 140 Level 2, Common Criteria EAL 4+ or equivalent security standards.</p> <p>This is already the case for EV (Extended Validation) certificates, and it presents some problems in an automated build environment. In this post we'll take a look at the issues with hardware-based certificates and how to work around them. </p> <h2>Why is this change necessary?</h2> <p>If you work in IT, you will have heard or read about the <a href="https://www.sans.org/blog/what-you-need-to-know-about-the-solarwinds-supply-chain-attack/" target="_blank">SolarWinds supply chain hack</a>. It was a big deal. It's more common than we might think - in February 2022 <a href="https://www.malwarebytes.com/blog/news/2022/03/stolen-nvidia-certificates-used-to-sign-malware-heres-what-to-do" target="_blank">NVIDIA</a> had their code signing certificates stolen and they were used to sign malware (those certificates have since expired).</p> <p>These (and other) episodes made many in the industry (Microsoft in particular) very nervous. Trust is a big deal when it comes to certificates, and that is certainly the case when it comes to certificate issuance, but there is not a lot of trust in how those certificates are secured by the developers using them. Ask anyone who has done the merry validation dance with a CA, it's not that easy to get a code signing certificate these days. With that in mind, the CA/Browser forum <a href="https://cabforum.org/2022/04/06/ballot-csc-13-update-to-subscriber-key-protection-requirements/" target="_blank">adopted a proposal</a> to change the requirements for how issued certificates are stored.</p> <p>The change makes a lot of sense - it's much harder to steal hardware than it is to steal files. </p> <h2>What does this mean</h2> <p>From 1 June 2023, all new and reissued publicly trusted OV and IV code signing certificates will have to be issued or stored on a pre-configured secure hardware device by the issuing certificate authority (CA) and the device must meet FIPS 140 Level 2, Common Criteria EAL 4+ or equivalent security standards. </p> <p>Existing OV/IV certificates will continue to work, but if you need your certificate to be reissued you may encounter issues due to key size requirements changing (so don't lose your certificate). The reality is that most certificate providers have already switched to issuing certificates on tokens (or discontinued selling OV/IV certificates). This is the end of simply downloading a pfx. </p> <h2>What are these hardware devices </h2> <p>These devices fall broadly into 3 categories:</p> <h3>Network-attached Hardware Security Modules (HSM)</h3> <p style="text-align: center"><img src="/blogimages/vincent/codesign-usb/SafeNet-Luna-Network-HSM_0.png" /></p> <p>HSM's in this class bring a lot of benefits and functionality (like key usage audit logs) - code signing is just part of that. These devices are not cheap - usually in the "if you have to ask you probably can't afford" price range! There's a reason for that steep price though. They are designed to be ultra-secure and tamper proof - open the lid and you will likely lock it up or brick it. </p> <p>CA's will charge you a premium if you BYOD (bring your own device) - expect an audit fee of around $500 - or you can employ your own suitably qualified auditor (no idea what the criteria is for that but it sounds expensive). You will also have to deal with creating a Certificate Signing Request (CSR) to send to the CA. The process varies depending on the device, and the CA websites don't offer much guidance there. </p> <h3>Cloud HSM's</h3> <p>Azure, AWS, Google and others provide cloud HSM's, a service layer in front of network-attached HSM's - you basically rent time/space on them. They typically charge a monthly fee and then a fee per cryptographic operation. CA's charge a hefty fee to create certificates for use on these services - up to $1200 - and on top of that some CA's charge per number of signings per year (no idea how they police that). You also need to do some work to configure secure access to the HSM. These services make sense if you are already running on the cloud. Like other HSM's you will need to create a CSR to send to the CA during the order/validation process</p> <p>SSL.com offer an eSigner cloud-based service (they are also a CA), but the prices will make you think twice about code signing: USD $100 per month for 10 signings, plus $10 for each additional signing. We sign every build that might escape the building and each build has several files that need signing! </p> <h3>USB tokens</h3> <p>In my research so far, the most common USB token is the Gemalto/Thales SafeNet token. The only other ones I have encountered are Yubikey (only SSL.com seems to be using those) and Certum (for which I could find very little info on the client software). The token tends to be included in the price of the certificate (I did see one case where it was not). You do not need to create a CSR (unless you are using your own existing token) as the CA loads the certificate on the device before posting it to you. The one I have (from Digicert) is a Safenet token. It's already obsolete and cannot be used for new certificates as it doesn't support the larger key size required now (newer model required).  </p> <h3>Locked In</h3> <p>One thing to note about all the possible hardware devices, whether it's yours or one you rent, is that once a certificate is installed on that device, it's private key cannot be exported. So if you decide the cloud service you are using is too expensive and want to move, well it's time for a new certificate. </p> <p>Some CA's say they cannot reissue EV's on USB tokens, whilst others provide a procedure - it's likely you will be up for a new token cost and more verification hoops to jump through. So don't lose or damage it! </p> <p>In the rest of this post, I'm only going to cover USB tokens. If you have access to network or cloud HSM's then you are probably well past this point.  </p> <h2>So, what's the problem then?</h2> <p>Different USB tokens might use different client software/drivers - but they all have one thing in common - the USB token needs to be present (i.e. plugged in to the machine) when code signing. This seemingly innocuous little USB token (which looks just like a memory stick) needs to be physically secure. If someone walks past your machine and takes it (likely thinking it's a memory stick), well you are up a creek without a paddle. My SafeNet token has a bright blue LED on the end that just screams "Take me!". Our build servers are colocated at a data centre - so leaving things like USB devices plugged in is asking for trouble. It's not like I can walk over and plug it in when needed (every day!). The data center is 300km from where I live/work.</p> <p>Add to this that build machines are typically virtual, so you are into the realm of USB passthrough. If you use Hyper-V Server (as we do), well you are bang out of luck.. not supported. I have heard that VMWare ESXI supports it just fine but have never used it. I tested with XCP-ng and did get it working, but it was a major hassle to configure (reams of commands and copying of guids).</p> <h2>USB - Remotely</h2> <p>Fortunately, there are alternatives to USB passthrough. I looked at a bunch of USB remoting products (USB over IP/UDP), and after poor results with most, I found one that works. In fact it works incredibly well, with much better pricing than the others.</p> <p>That product is <a href="https://virtualhere.com" target="_blank">VirtualHere</a> (VH). Of all the vendors I contacted, they were the only one who actually responded and answered the question I asked - "Does it support code signing tokens?". The author responded, "Actually I use my (Digicert) JC Token via VirtualHere to sign VirtualHere when I build VirtualHere inside a VM." Good enough for me to give it a try!</p> <p>The VH Server runs on Windows, Linux, MacOS, a bunch of NAS servers, even a Raspberry Pi! The server licence is locked to the host machine, so if you decide to move the USB token to another host you will need to purchase another license - but at USD$49 that probably won't break the bank!</p> <p>I installed the VH server software on my XCP-ng host - installation was trivial and took all of 2 minutes (I'm no Linux expert). I then plugged the USB token in (the server is in my mini rack at home) and installed the VirtualHere client software on my Windows machine.</p> <p>The VH client can auto detect servers, however in my case the two machines were on different subnets, so I had to manually specify it. With the trial version, a message box shows up when it first connects. The client immediately showed a tree of the USB devices plugged into the server. The SafeNet token shows up as Token JC, right-click on it and select "Auto use this device" so it connects automatically. When I did this, the familiar Windows sound indicated a device had plugged in. I already had the SafeNet software installed so it didn't prompt me for drivers etc.</p> <p style="text-align: center"><img src="/blogimages/vincent/codesign-usb/virtualhere-client.png" /></p> <p>The last step in this USB remoting journey was to install the client as a service (right click on the USB Hubs node). This can only connect to licensed servers, so leave this step until you have purchased.<br /> <br /> <strong>NOTE</strong> : I didn't make it clear before, but the VH client and token client software need to be installed on the machine where the signing takes place, ie your build machine or build agent machine. </p> <h2>Prompting for Passwords</h2> <p>Another issue with the USB tokens being present during code signing, is they also expect a human to be present - a password prompt is shown. That flies in the face of conventional wisdom - automate all the things!</p> <p>Fortunately, for the SafeNet token at least, there is a work around for this.</p> <p>Open the Safenet Authentication Client Tools, click on the Advanced View button (the gear). You may be prompted for the token password if you haven't already entered it. In the tree on the left, right-click on the certificate (under User certificates) and select Export certificate. Just to be clear here, this is the certificate without the private key (which stays on the token) - you can't use this exported certificate on a machine that does not have access to the USB token. </p> <p style="text-align: center"><img src="/blogimages/vincent/codesign-usb/safenetvalues.png" /></p> <p>In the certificate view, under Private Key, take note of the Cryptographic Provider value (likely "eToken Base Cryptographic Provider" and the Container Name (p11#xxxxxxxxxxx). You will have to manually type them out somewhere as it doesn't support the clipboard. Save those values somewhere - as you will need them in your build process for code signing.</p> <p>Whilst still in the Client tools, select Client Settings and go to the Advance tab, check the "Enable single Login" and "Enable single Logon for PKCS#11." options, and set Automatic Logoff to Never - then hit Save. You can close the client now.</p> <h2>Code Signing</h2> <p>With all that done, we can use Signtool action in FinalBuilder. The Signing option tab is where those values we saved earlier come into play.</p> <p>The only difficult one is the Private Key container. Fortunately, some clever person on StackOverflow figure out the required format:</p> <p>[{{%CSPWD%}}]=p11#xxxxxxxxxx</p> <p>I have used a variable CSPWD for the token password.</p> <p style="text-align: center"><img src="/blogimages/vincent/codesign-usb/signtooloptions.png" /></p> <p>That's it. In my tests I have run FinalBuilder from the Windows task scheduler while logged out, and from a Continua CI build agent service (again while logged out) and it worked in both instances. I did a bunch of login/out/reboot testing and it continued to work. VirtualHere has been flawless. The next step is to configure our CI agents to access the USB token over VPN. Sadly our EV token is about to expire (and we never used it once in production, our OV cert still has another year left) - so I first have to jump through the validation hoops to get a new one.</p> <p>When using this technique on a CI server, you will need to take care that only one build at a time is using the token. In Continua CI, that is trivial to achieve using a <a href="https://wiki.finalbuilder.com/display/continua/Shared+Resources" target="_blank"> shared resource lock.</a></p> <p>I would love to test out some of the cloud HSM services too, but purchasing a certificate for each one is too rich for me. If you are using any of those with a cloud-based HSM, jump on our forums and let us know your experiences. If you experiment with or get up and running using VH let us know how it went - I might do a follow up post as we all gain more experience with usb tokens and code signing.</p> <h2>Warning (added 19 Oct 2022)</h2> <p>I probably should have pointed out that most tokens are configured to lock you out after too many authentication failures. So if you are getting auth failures when setting this up, stop, and manually login to the token to reset the failed count. </p> <h2>Rant</h2> <p>CA's (and their resellers) have some of the worst websites I have ever had the displeasure of reading. Pages and pages of useless or contradictory information with links promising more information that take you around in circles. Grrrrr. </p> 845Continua CI System Server Propertieshttps://www.finalbuilder.com/resources/blogs/postid/844/continua-ci-server-propertiesContinua CI,Delphi,FinalBuilder,GeneralThu, 13 May 2021 12:59:28 GMT<p>If you are using Continua for your CI, (and if not why not?) ensure that you check out <a href="https://wiki.finalbuilder.com/x/BYDp">System Server Properties</a>. These allow access to global settings which do not fit on any existing page.</p> <p>They can be used to configure several aspects of the UI and build process to fit your team preferences. This could simply be the number items to show per page on each of the dashboard views (<em>Server.ProjectsView.*.PageSize</em>), or more complex patterns for detecting errors and warnings in actions settings (<em>Actions.Messages.*Patterns</em>). Some system server properties are rarely needed, but some can be considered essential, such as <em>Server.HostUrl</em> which can be used to ensure the links in notifications go to the correct external host name.</p> <p>We have recently added some new server properties which allow you to control the tabs on the Queue Options dialog (<em>Server.QueueOptionsDialog.*</em>) and create a banner for displaying a message to all (or a subset of) users (<em>Server.Banner.*</em>).</p> <p>Here is the result of changing <em>Server.QueueOptionsDialog.TabSequence</em> from "Variables,Repositories,Options"</p> <p><img alt="Queue Options dialog tabs - Variables first" src="/blogimages/daves/serverprops/QueueOptionsVariablesFirst.png" /></p> <p>to "Repositories,Variables,Options".</p> <p><img alt="Queue Options dialog tabs - Variables first" src="/blogimages/daves/serverprops/QueueOptionsRepositoriesFirst.png" /></p> <p> </p> <p>This is what happens to an existing banner when you change the <em>Server.Banner.MessageType</em> from "Information"</p> <p><img alt="Information Banner" src="/blogimages/daves/serverprops/InformationBanner.png" /></p> <p>to "Warning".</p> <p><img alt="Warning Banner" src="/blogimages/daves/serverprops/WarningBanner.png" /></p> <p>Server properties can be edited on the "Continua Server - Properties" page located in the "Administration" section of Continua CI. See our documentation for <a href="https://wiki.finalbuilder.com/x/BYDp">details on all the currently available server properties</a>.</p> 844DPM Package Manager - Progress updatehttps://www.finalbuilder.com/resources/blogs/postid/842/dpm-package-manager-progress-updateDelphi,DPMWed, 24 Feb 2021 10:46:15 GMT <p>In December 2019, I <a href="/resources/blogs/introducing-dpm-a-package-manager-for-delphi" target="_blank">blogged</a> about a package manager for Delphi that I am working on. This post is a progress update that shows where it's at and what's left to do to get to v1.</p> <h3>DPM Recap</h3> <p> For those not familiar with what I am trying to achieve here, I highly recommend reading my original <a href="/resources/blogs/delphi-package-manager-rfc" target="_blank"> Delphi Package Manager RFC</a> post. In that post I detailed my ideas, and some of the challenges that Delphi presents when compared to other development environments. </p> <p> In December 2019, the bare bones of DPM were there. We had a command line tool and that was it. We were able to create packages, install packages (and their dependencies) and restore them (restore ensures all referenced packages are present). Oh and we could list the available packages in our package feed (a folder). </p> <h3>IDE Integration</h3> <p> In the last 13 months there were around 175 commits to the DPM repository. In that time I have added an IDE plugin (that works in Delphi XE2 to 10.4). This involved the creation of several custom controls (I wasn't able to bend any existing ones to work how I wanted it to). </p> <p> In addition to the work in the project repository, I also published <a href="https://github.com/vsoftTechnologies/" target="_blank">several useful libraries</a> that I needed for this project. DPM is now bootstrapped, to build DPM you need DPM, as it requires several libraries that are referenced as dpm packages. </p> <p> In Nov 2020 I published the first alpha release that included an installer (code signed by VSoft Technologies) for installing both the command line tool and the IDE plugin (single installer, you can choose which IDE versions to install for). The installer allows you to install for the current user, or for all users (requires elevation to install). </p> <img src="/blogimages/vincent/dpm-progress/installer.png"> <p></p> <p> I also did a zoom presentation about DPM to the Melbourne chapter of the Australian Delphi Users Group - a recording of that (long) presentation can be found <a href="https://www.youtube.com/watch?v=TjVAMLfhgLo" target="_blank">here</a>. </p> <p> Adding IDE support for DPM was a massive undertaking. I had very little experience in developing Delphi IDE plugins (using the tools api) - and there were lots of subtle changes between delphi versions, getting things working correctly in 12 versions of Delphi was not easy. In particular, with the later versions of Delphi IDE that use VCL themes, getting things to look right (ie like a native part of the IDE) was a challenge. </p> <img src="/blogimages/vincent/dpm-progress/dpm-ide.png"> <p></p> <p>The above image shows the installed packages for one of the projects in the project group, you get to this view by right clicking on the project node, or the DPM Packages node in the Project tree. </p> <p>Note the view only shows the directly installed packages, not the transient dependencies - those you can see in the project tree under the DPM Packages node.</p> <p>Before you can use DPM in the IDE, you need to configure a package source (a folder where your package files will live)</p> <p>This can be done fron the command line</p> <pre>dpm sources add -name=local -source=path to the folder you created</pre> <p></p> <p>Or from the IDE Settings</p> <img src="/blogimages/vincent/dpm-progress/dpm-settings.png"> <p></p> <h3>Compile during install</h3> <p> The most recent updates added support for compiling packages during first install. Packages need to declare how to build in their dspec file, and dpm will use that and call msbuild to compile the packages if needed. DPM also records a bill of materials file (package.bom) in the package cache so that it can tell whether the package needs to be recompiled or not. </p> <p>On first install, packages that are being compiled during the install process will take a little longer, but on subsequent installs or restores, the process is almost instant (a few ms). </p> <p> Prior to adding this feature, building dpm on our Continua CI build agents took 13 minutes, much of which was taken up with compiling the dpm packages that it references (in particular, earlier versions of Delphi were very slow with spring4d). Since updating dpm on our agents with the new version, the entire build process for DPM (console app and 12 versions of the IDE plugin and the installer) takes less than 2 minutes. </p> <img src="/blogimages/vincent/dpm-progress/dpm-build-times.png"> <p></p> <h3>Missing features</h3> <h4>Project group support</h4> <p> When installing packages, the dependency resolution code does not know about other projects in the project group, or what packages and versions they reference. This will be a problem for packages that include design time components that need to be loaded - the IDE can only load 1 version of a design time package. This is what I am currently working on. </p> <h4>Design time packages</h4> <p>DPM does not currently install design time packages into the IDE. This is dependent on project group support, so it's next on the list after project group support.</p> <h4>Package Updates</h4> <p>The ability to detect when package updates are available and make it easy to install those updates. There's an Updates tab in the IDE but it's non functional at this time.</p> <h4>Package Repository</h4> <p>In it's current state, DPM only supports folder based package feeds. This works fine, but it does have some limitations</p> <ul> <li>Limted search abilities - limted to searching on the package filenames.</li> <li>You have to download packages to a folder.</li> <li>Package Authors have to host the package files somewhere (mine are under releases on their github projects).</li> </ul> <p>I have made a start on the Package Repository, but not a lot of progress since I'm focusing on the client site right now.</p> <h3>Q & A</h3> <h4>Is it usable?</h4> <p>In it's current state, it's only usable for non visual libraries. As I mentioned, the DPM projects all use DPM themselves, and we have DPM actions in FinalBuilder for running the Pack and Restore commands. </p> <p>If you use any of my open source libraries like DUnitX, Delphi Mocks etc, I have created packages for all of those libraries, and also created mirror projects (just for hosting the package files) for some other popular libraries like Spring4D. </p> <p>I would encourage library authors in particular to take a look and provide feedback.</p> <h4>Where can we find it?</h4> <p>DPM is an open source project on <a href="https://github.com/DelphiPackageManager/DPM" target="_blank">GitHub</a>, the installer can be found under <a href="https://github.com/DelphiPackageManager/DPM/releases" target="_blank">Releases</a> (under each release, there is an Assets dropdown section).</p> <img src="/blogimages/vincent/dpm-progress/installer-location.png"> <p></p> <h4>What versions of Delphi does it support?</h4> <p>Delphi XE2 to 10.4.2 - note that we compile with the latest updates installed for each compiler version. </p> <h4>Why is it taking so long?</h4> <p>Yes, someone asked that recently! This is a side project, free and open source. My primary focus is on running my business and working on our products (that keeps the lights on).</p> <h4>Can we sponsor the project?</h4> <p>Not right now, however it's something I'll look at in the future. </p> <h4>Can we help?</h4> <p>Absolutely. Fork the project on GitHub and clone it to your dev machine and spend some time getting to know the source code. Before making any pull requests, create an issue on github to discuss your ideas and make sure we on the same wavelength!</p>842Advice for Delphi library authorshttps://www.finalbuilder.com/resources/blogs/postid/841/advice-for-delphi-library-authorsDelphi,DPMWed, 24 Feb 2021 00:57:00 GMT <p>We use many third-party Delphi libraries to build FinalBuilder and Automise, and that brings plenty of issues when upgrading compiler versions. I've been using Delphi since 1995, both as a developer and as a component vendor, I have learned a thing or two about creating libraries that I would like to share. These are all ideas that make life easier for users, and make it easy to migrate from one version of Delphi to another.</p> <p>There's no hard and fast rules on how Delphi Libraries are <i>supposed to be</i> structured, these are just my preferences and things I have learned over the years. Hopefully this will help new and existing library authors.</p> <h3>Folder Structure</h3> <p>Keep the Source and the Packages in separate folders, this makes it easier to find the correct packages to compile, e.g : <pre>\Source \Packages \Demos</pre> </p> <p>Under Packages, create a folder for each compiler version your library supports, e.g: <pre>\Packages\Rad Studio XE8 \Packages\Rad Studio 10.0 \Packages\Rad Studio 10.1</pre> </p> <h3>Package Names</h3> <p>Please, <b>do not</b> put the Delphi version in the package project names.</p> <h4>Bad!!!</h4> <pre>MyProjectRun_D10_4.dproj MyProjectDesign270.dproj</pre> <h4>Good</h4> <pre>MyProjectRun.dproj MyProjectR.dproj MyProjectDesign.dproj MyProjectD.dproj</pre> <p></p> <p>Why not put the compiler version in the package project name you might ask? Well the answer is that it makes upgrading compiler versions a major pain for users who link their projects with Runtime Packages (yes, that includes us).</p> <p>The reason is that when you compile a package, it creates a packagename.dcp file and that is what your project references. So, if your package name is MyPackageRun_D10_4 then that is what will be added to projects that use it.</p> <pre class="brush:delphi; toolbar:false;"> package MyOwnPackage; //... requires rtl, vcl, MyPackageRun_D10_4, AnotherPackage_Sydney, YetAnotherPackage_D104, // ... </pre> <p></p> <p>When Delphi 10.5 comes out, guess what the user has to do to upgrade their projects.... Yep, replace that all those package references with 10.5 versions (and the multitude of suffixes). Multiply that by a number of projects and a number of libraries (each with potentially multiple runtime packages) and you can see why this might be a pain.</p> <p>Now you might say, but we don't want 15 versions of MyPackageRun.bpl laying about on users machines, and you would be right. The solution to this is a feature that has been around since Delphi 6 (2001) - <a href="http://docwiki.embarcadero.com/RADStudio/Sydney/en/Compiler_directives_for_libraries_or_shared_objects_(Delphi)" target="_blank">LIBSUFFIX</a>.</p> <img src="/blogimages/vincent/advice-for-d/libsuffix.png" alt="LIBSUFFIX"> <p></p> <p>Setting LIBSUFFIX (on the Description section of project settings) will append the specified suffix to the BPL file name. So a suffix of _D10_4 will result in a package :</p> <pre>MyPackageRun_D10_4.bpl</pre> <p></p> <p>however, the DCP file will still be generated as :</p> <pre>MyPackageRun.dcp</pre> <p></p> <p>Remember it's the dcp file that our projects reference (for linking) - so by keeping the dcp file the same for all delphi versions, upgrading to a new compiler version just got a whole lot easier!</p> <p>So when Delphi 10.5 comes out in the future, all I need to do is install the packages, no changes to my projects.</p> <p><b>Update</b> : Someone pointed out that Delphi 10.4.1 support LIBSUFFIX $(Auto) - this will use the Delphi defined PackageVersion - which for 10.4 is 270. This is a nice addition as it makes upgrading the package projects simpler. Of course if you don't like the PackageVersion suffix and use a custom one, then this is not for you.</p> <h3>Use Explicit rebuild, not Rebuild as needed</h3> <p>Have you ever encountered the error <pre>E2466 Never-build package 'XXX' requires always-build package 'YYY'</pre> What this means is, a package, set to Expicit rebuild, references another package, set to 'Rebuild as needed', and it's a pain in the proverbial. Rebuild as needed is also referred to as Implicit Build - in dpk's you will see it as <pre>{$IMPLICITBUILD ON}</pre> If that "Rebuild as needed" package is not part of your project group, guess what, you get to waste time closing and opening projects trying to get it to compile. </p> <p>I'm sure someone will correct me on this, but I cannot see a good reason to have "Rebuild as needed" set. I suspect this is a hangover from before the Delphi IDE allowed you to specify <a href="http://docwiki.embarcadero.com/RADStudio/Sydney/en/Project_Dependencies" target="_blank">Project Dependencies</a> and it slows down builds. </p> <h3>Use Search Paths for includes</h3> <p>I often see includes with either hard coded paths, or relative paths like this :</p> <pre class="brush:delphi; toolbar:false;"> {$I '..\..\MyDefines.inc'} </pre> <p>That's great, if the installer delivers the files in the right place - but they often don't - I hit this issue today, where the package just would not compile. I eventually figured out that the relative path was wrong. </p> <p>There's a simple fix for this, and that is to remove the path in the $I statement, and use the Project Search Paths feature instead. </p> <img src="/blogimages/vincent/advice-for-d/searchpath.png" alt="Search Paths"> <p></p> <p>I have also seen libraries where there are mulitple copies of the include file and they are slightly different!</p> <h3>Mark packages as Runtime only or Designtime only</h3> <p>Some libraries have their packages marked as "Runtime and Designtime" (the default) - the impact of this is only minor, but it's a pet peeve of mine. The Delphi IDE (in recent versions at least) provides a nice indication of whether packages are runtime or designtime in the project tree, and for designtime packages, whether they are installed. </p> <p>This makes it simple for me to determine which ones need to be installed or not.</p> <p>Not Installed</p> <img src="/blogimages/vincent/advice-for-d/not-installed.png" alt="Not Installed"> <p>Installed</p> <img src="/blogimages/vincent/advice-for-d/installed.png" alt="Installed"> <p></p> <h3>Summing up</h3> <p>One of the major reasons people do not upgrade Delphi versions is because it's too hard to deal with the third party libraries and all the changes required just to get to the point of compiling. That eventually results in a lack of Delphi sales which results in a lack of investment in Delphi which feeds back into.... well you get the idea ;)</p> <p>Making third party libraries easier to work with in Delphi has been a bit of a crusade for me, I've been <a href="/resources/blogs/delphi-package-manager-rfc">working on this for a while now</a>, and I'm getting closer to a solution - <a href="https://github.com/DelphiPackageManager/DPM">DPM - A package manager for Delphi</a> - if you are a library author, I encourage you to take a look. For examples on how to create a package spec (dspec) take a look at our open source projects <a href="https://github.com/vsoftTechnologies/">https://github.com/vsoftTechnologies/</a> </p> 841Announcing the Release of Continua CI Version 1.9.2https://www.finalbuilder.com/resources/blogs/postid/840/introducing-the-release-of-continua-ci-version-192Continua CI,DelphiMon, 09 Nov 2020 06:16:32 GMT<p>We are delighted to announce that <a href="/downloads/continuaci/continua-ci-version-history-v192" target="_blank">version 1.9.2 of Continua CI</a> has passed through the beta and release candidate stages, and has now been released. Here is a reminder of the new features in v1.9.2:</p> <ul> <li><a href="#export-and-import"><b>Export and Import</b></a>: You can now export one or more configurations to a file and import them back from the file into Continua CI.</li> <li><a href="#requeuing-stages"><b>Requeuing Stages</b></a>: Requeue a failing stage without restarting the build.</li> <li><a href="#multiple-daily-cleanup-rules"><b>Multiple Daily Cleanup Rules</b></a>: Each type of build by-product can now have a different shelf life.</li> </ul> <h2><a name="export-and-import">Export and Import</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p>Users with Configuration Edit permissions can now export one or more project configurations to a YAML or JSON file. This may be for backup, versioning or migration to another server.</p> <p>The export wizard has a number of steps allowing selection of one or more configurations, and also any related repositories, variables and shared resources.</p> <p><img alt="Export Wizard - Configuration Selection" class="dropShadow" src="/blogimages/daves/v1.9.2-release/Export_Resized.png" /></p> <p>The configuration details can be exported to YAML or JSON file formats, according to your preferences for readability and differencing.</p> <p><img alt="Export Wizard - File Details" class="dropShadow" src="/blogimages/daves/v1.9.2-release/Export-File-Details_Resized.png" /></p> <p>The resultant file is downloaded to your computer, allowing you to file it away until you need it.</p> <p><img alt="Export Wizard - Downloaded File" class="dropShadow" src="/blogimages/daves/v1.9.2-release/Export-Download.png" /></p> <p><img alt="Export Wizard - YAML" class="dropShadow" src="/blogimages/daves/v1.9.2-release/Export-YAML.png" /></p> <p>The import wizard also consists of several steps, allowing users with Project Edit permissions to upload a file, ...</p> <p><img alt="Import Wizard - File Selection" class="dropShadow" src="/blogimages/daves/v1.9.2-release/Import-File-Details_Resized.png" /></p> <p>choose which items in the file to import and whether to overwrite any existing matching items of create new items.</p> <p><img alt="Import Wizard - Configuration Selection" class="dropShadow" src="/blogimages/daves/v1.9.2-release/Import-Configurations_Resized.png" /></p> <p>The import runs in a transaction, so if any modified file content fails validation it will rollback...</p> <p><img alt="Import Wizard - Import Failed" class="dropShadow" src="/blogimages/daves/v1.9.2-release/Import-Failed_Resized.png" /></p> <p>allowing you to make changes and retry.</p> <p><img alt="Export Wizard - Import Complete" class="dropShadow" src="/blogimages/daves/v1.9.2-release/Import-Complete_Resized.png" /></p> <h2><a name="requeuing-stages">Requeuing Stages</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p>Sometimes a build stage may fail due to external influences. It could be that a file server was offline, network connectivity was down, or a file was locked for access. If it has taken several long stages to get to this point, then having to run the whole build again from the start can be a pain.</p> <p>The last stage of a completed build can now be requeued, providing that it has failed, stopped or errored, and the server workspace is intact.</p> <p>If no parts of the server workspace have been removed by the cleanup process, then a Requeue Stage button will be shown after the last stage in the Stages list on the Build page.</p> <p><img alt="Action list categories" class="dropShadow" src="/blogimages/daves/v1.9.2-release/Requeue-stage-button.png" /></p> <p>This allows you to requeue and execute the stage again!</p> <p><img alt="Action list search" class="dropShadow" src="/blogimages/daves/v1.9.2-release/Requeue-stage-running.png" /></p> <p>You can also optionally make changes to the stage actions and requeue the stage with the latest changes.</p> <p><img alt="Stages" class="dropShadow" src="/blogimages/daves/v1.9.2-release/Requeue-stage-dialog.png" /></p> <h2><a name="multiple-daily-cleanup-rules">Multiple Daily Cleanup Rules</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p>Every build that is executed within Continua CI stores information in the server's workspace, such as artifacts and build logs, and entries in the database. These by-products are vital for executing your build process and tracking build information, however, they can also take up considerable disk space over time and have a negative impact on database performance. The cleanup settings define the shelf life for the build by-products.</p> <p>Up until now, the cleanup settings have been quite limited - you could set up a single policy per configuration defining the build age and build limits for cleaning up either the database, the workspace, or both. Often, however you would want to cleanup the workspace files to save space, well before removing the build from the database. This update allows you to define multiple cleanup rules, with different shelf lives for each type of build by-product.</p> <p><img alt="Cleanup rules" class="dropShadow" src="/blogimages/daves/v1.9.2-release/CleanupRules_Resized.png" /></p> <p>Each rule can include one or more by-product to clean up.</p> <p><img alt="Cleanup rules dialog" class="dropShadow" src="/blogimages/daves/v1.9.2-release/CleanupRule.png" /></p> <p>Download the installers for Continua CI v1.9.2 from the <a href="/downloads/continuaci" target="_blank">Downloads</a> page</p> <style type="text/css">ul.horizontal { overflow: auto; margin: 10px 0 0 0; } ul.horizontal li { float: left; margin-left: 2em } .syntaxhighlighter { background-color: #eee !important; margin-top: 0 !important; padding: 10px; outline-style: dashed; outline-width: 1px; outline-color: #666; width: 97% !important; } .syntaxhighlighter .line.alt2 { background-color: #eee !important; } .syntaxhighlighter table td.code { overflow-y: hidden !important; } .syntaxhighlighter .plain, .syntaxhighlighter .plain a { color: #639099 !important; } h1 { margin-bottom: 0.6em !important; } .up-link { float: right } img.dropShadow { -webkit-filter: drop-shadow(5px 5px 5px #222); filter: drop-shadow(5px 5px 5px #222); margin-bottom: 1em; } </style> 840Introducing Continua CI Version 1.9.2 Betahttps://www.finalbuilder.com/resources/blogs/postid/839/introducing-continua-ci-version-192-betaContinua CI,DelphiSun, 30 Aug 2020 14:12:26 GMT<p>We are delighted to announce a new <a href="/downloads/continuaci/continua-ci-version-history-v192" target="_blank">beta release</a> of Continua CI. We have added the following new features:</p> <ul> <li><a href="#export-and-import"><b>Export and Import</b></a>: You can now export one or more configurations to a file and import them back from the file into Continua CI.</li> <li><a href="#requeuing-stages"><b>Requeuing Stages</b></a>: Requeue a failing stage without restarting the build.</li> <li><a href="#multiple-daily-cleanup-rules"><b>Multiple Daily Cleanup Rules</b></a>: Each type of build by-product can now have a different shelf life.</li> </ul> <h2><a name="export-and-import">Export and Import</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p>Administrators can now export one or more project configurations to a YAML or JSON file. This may be for backup, versioning or migration to another server.</p> <p>The export wizard has a number of steps allowing selection of one or more configurations, and also any related repositories, variables and shared resources.</p> <p><img class="dropShadow" alt="Export Wizard - Configuration Selection" src="/blogimages/daves/v1.9.2/Export_Resized.png" /></p> <p>The configuration details can be exported to YAML or JSON file formats, according to your preferences for readability and differencing.</p> <p><img class="dropShadow" alt="Export Wizard - File Details" src="/blogimages/daves/v1.9.2/Export-File-Details_Resized.png" /></p> <p>The resultant file is downloaded to your computer, allowing you to file it away until you need it.</p> <p><img class="dropShadow" alt="Export Wizard - Downloaded File" src="/blogimages/daves/v1.9.2/Export-Download.png" /></p> <p><img class="dropShadow" alt="Export Wizard - YAML" src="/blogimages/daves/v1.9.2/Export-YAML.png" /></p> <p>The import wizard also consists of several steps, allowing you to upload a file, ... </p> <p><img class="dropShadow" alt="Import Wizard - File Selection" src="/blogimages/daves/v1.9.2/Import-File-Details_Resized.png" /></p> <p>choose which items in the file to import and whether to overwrite any existing matching items of create new items.</p> <p><img class="dropShadow" alt="Import Wizard - Configuration Selection" src="/blogimages/daves/v1.9.2/Import-Configurations_Resized.png" /></p> <p>The import runs in a transaction, so if any modified file content fails validation it will rollback...</p> <p><img class="dropShadow" alt="Import Wizard - Import Failed" src="/blogimages/daves/v1.9.2/Import-Failed_Resized.png" /></p> <p>allowing you to make changes and retry.</p> <p><img class="dropShadow" alt="Export Wizard - Import Complete" src="/blogimages/daves/v1.9.2/Import-Complete_Resized.png" /></p> <h2><a name="requeuing-stages">Requeuing Stages</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p>Sometimes a build stage may fail due to external influences. It could be that a file server was offline, network connectivity was down, or a file was locked for access. If it has taken several long stages to get to this point, then having to run the whole build again from the start can be a pain.</p> <p>The last stage of a completed build can now be requeued, providing that it has failed, stopped or errored, and the server workspace is intact.</p> <p>If no parts of the server workspace have been removed by the cleanup process, then a Requeue Stage button will be shown after the last stage in the Stages list on the Build page.</p> <p><img class="dropShadow" alt="Action list categories" src="/blogimages/daves/v1.9.2/Requeue-stage-button.png" /></p> <p>This allows you to requeue and execute the stage again!</p> <p><img class="dropShadow" alt="Action list search" src="/blogimages/daves/v1.9.2/Requeue-stage-running.png" /></p> <p>You can also optionally make changes to the stage actions and requeue the stage with the latest changes.</p> <p><img class="dropShadow" alt="Stages" src="/blogimages/daves/v1.9.2/Requeue-stage-dialog.png" /></p> <h2><a name="multiple-daily-cleanup-rules">Multiple Daily Cleanup Rules</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p>Every build that is executed within Continua CI stores information in the server's workspace, such as artifacts and build logs, and entries in the database. These by-products are vital for executing your build process and tracking build information, however, they can also take up considerable disk space over time and have a negative impact on database performance. The cleanup settings define the shelf life for the build by-products.</p> <p>Up until now, the cleanup settings have been quite limited - you could set up a single policy per configuration defining the build age and build limits for cleaning up either the database, the workspace, or both. Often, however you would want to cleanup the workspace files to save space, well before removing the build from the database. This update allows you to define multiple cleanup rules, with different shelf lives for each type of build by-product. </p> <p><img class="dropShadow" alt="Cleanup rules" src="/blogimages/daves/v1.9.2/CleanupRules_Resized.png" /></p> <p>Each rule can include one or more by-product to clean up.</p> <p><img class="dropShadow" alt="Cleanup rules dialog" src="/blogimages/daves/v1.9.2/CleanupRule.png" /></p> <p>Download the installers for Continua CI v1.9.2 Beta from the <a href="/downloads/continuaci" target="_blank">Downloads</a> page</p> <style type="text/css">ul.horizontal { overflow: auto; margin: 10px 0 0 0; } ul.horizontal li { float: left; margin-left: 2em } .syntaxhighlighter { background-color: #eee !important; margin-top: 0 !important; padding: 10px; outline-style: dashed; outline-width: 1px; outline-color: #666; width: 97% !important; } .syntaxhighlighter .line.alt2 { background-color: #eee !important; } .syntaxhighlighter table td.code { overflow-y: hidden !important; } .syntaxhighlighter .plain, .syntaxhighlighter .plain a { color: #639099 !important; } h1 { margin-bottom: 0.6em !important; } .up-link { float: right } img.dropShadow { -webkit-filter: drop-shadow(5px 5px 5px #222); filter: drop-shadow(5px 5px 5px #222); margin-bottom: 1em; } </style> 839Daily Builds with Continua CIhttps://www.finalbuilder.com/resources/blogs/postid/838/daily-builds-with-continua-ciContinua CI,Delphi,Deployment,TriggersSun, 24 May 2020 09:22:55 GMT<p>Generally, at VSoft, we like to build. So we build every commit and this allows us to look back at our build history and see which changes caused the build to fail. We use manual stage promotion to prevent every build being released until we decide that it is ready to go.</p> <p><img alt="Build promotion" src="/blogimages/daves/dailytriggers/BuildPromotion.png" /></p> <p>Many teams like to trigger a build at the end of each day, or during the night, compiling the work for the day in one single package.</p> <p>The obvious choice for this scenario is the Daily Trigger. This can be set to run a build at a specific time every day, or just weekdays - even just weekends for those with alternative lifestyles.</p> <p><img alt="Build promotion" src="/blogimages/daves/dailytriggers/DailyTrigger.png" /></p> <p>But what if the team is just having a design day, is off on a team building excursion or, perish the thought, a day of meetings! No commits are made, but the daily build still runs even though there are no changes. One possible solution is to use a Discard condition.</p> <p><img alt="Discard condition" src="/blogimages/daves/dailytriggers/DiscardCondition.png" /></p> <p>This will prevent the build running if there are no changes since the last build.</p> <p><img alt="Build being discarded" src="/blogimages/daves/dailytriggers/DiscardCondition.gif" /></p> <p>Another option has been added to Continua CI recently. The Quiet Period setting on Repository Triggers now allows you to enter an End Time rather than an Interval.</p> <p><img alt="Quiet period end time on repository trigger" src="/blogimages/daves/dailytriggers/EndTimeRepositoryTrigger.png" /></p> <p>Any builds triggered from a repository change are then queued right through the day until the specified end time. Any additional changes added to the configuration repositories during the day are added to the queued build, and when the end time comes up, the build executes on the latest changeset.</p> <p><img alt="Build waiting on quiet period end time" src="/blogimages/daves/dailytriggers/QuietPeriodTrigger.png" /></p> <p>If you're going home earlier than the end time and want stuff deployed already, you can swiftly end the quiet period at the click of a button. Using a repository trigger in this way means that you can ignore changes to some files, changesets with a specific comment, or commits from certain users.</p> <p><img alt="Trigger with user exclusion" src="/blogimages/daves/dailytriggers/TriggerUserExclusion.png" /></p> <p> - like that hands-on manager who thinks of his commit count as a key performance indicator.</p> <p><a href="https://www.commitstrip.com/en/2016/05/09/when-the-pm-fixes-a-bug/" target="_blank"><img alt="'When the PM fixes a bug' cartoon by commitstrip.com" src="/blogimages/daves/dailytriggers/Strip-Quand-les-PM-se-mettent-au-code-650-finalenglish-1.jpg" /></a> </p> 838Introducing DPM - a Package Manager for Delphihttps://www.finalbuilder.com/resources/blogs/postid/837/introducing-dpm-a-package-manager-for-delphiDelphi,DPM,Open SourceThu, 12 Dec 2019 09:41:00 GMT<p>Back in Feb 2019, I <a href="/resources/blogs/delphi-package-manager-rfc" target="_blank">blogged</a> about the need for a Package Manager for Delphi. The blog post garnered lots of mostly useful feedback and encouragement, but until recently I could never find a solid block of time to work on it. Over the last few weeks I've been working hard to get it to an mvp stage.</p> <p>DPM is an <b>open source</b> package/library manager for Delphi XE2 or later. It is heavily influenced by Nuget, so the cli, docs etc will seem very familiar to nuget users. Delphi’s development environment is quite different from .net, and has different challenges to overcome, so whilst I drew heavily on nuget, DPM is not identical to nuget. I also took a close look at many other package managers for other development eco systems.</p> <h2>What is a Package Manager</h2> <p>A package manager provides a standard for developers to share and consume code. Authors create packages that other developers can consume. The package manager provides a simple way to automate the installation, upgrading or removal of packages. This streamlines the development process, allowing developers to get up and running on a project quickly, without needing to understand the (usually adhoc) way the project or organization has structured their third party libraries. This also translates into simpler build/CI processes, with less ‘compiles on my machine’ style issues.</p> <h2>Who and Why</h2> <p>DPM’s initial developer is Vincent Parrett (author of DUnitX, FinalBuilder, Continua CI etc). Why is discussed in <a href="http://www.finalbuilder.com/resources/blogs/delphi-package-manager-rfc">this blog post</a>.</p> <h2>DPM Status</h2> <p>DPM is still in development, so not all functionality is ready yet. At this time, it's at the stage where we I would encourage library authors to take a look and play with it and provide feedback (and perhaps get involved in the development). It's very much at a minimum viable product stage. Potential users are of course welcome to look at it and provide feedback, it's just that, well, there are no packages for it yet (there's some test packages in the repo, and I'll be creating ones for my open source libraries). .</p> <h3>What works</h3> <ul> <li>Creating packages</li> <li>Pushing packages to a package source.</li> <li>Installing packages, including dependencies</li> <li>Restoring packages, including dependencies.</li> </ul> <h3>How do I use it</h3> <p>The documentation is at <a href="http://docs.delphipm.org">http://docs.delphipm.org</a></p> <p>See the <a href="http://docs.delphipm.org/get-started/getting-started.html">getting started guide</a>.</p> <p>The command line documentation can be found <a href="http://docs.delphipm.org/commands.html">here</a>.</p> <p>The Source is on GitHub <a href="https://github.com/DelphiPackageManager/DPM">https://github.com/DelphiPackageManager/DPM</a></p> <h3>Is DPM integrated into the Delphi IDE</h3> <p>Not yet but it is planned. If you are a wiz with the open tools api and want to contribute then let us know.</p> <h3>Is there a central package source</h3> <p>Not yet but it is planned. At the moment, only local folder based <a href="http://docs.delphipm.org/concepts/sources.html">sources</a> are supported. The client code architecture has a provision for http based sources in the future, however right now we are focused on nailing down the package format, dependency resolution, installation, updating packages etc.</p> <h3>Is my old version of delphi supported</h3> <p>Maybe, <a href="http://docs.delphipm.org/compiler-versions.html">see here</a> for supported compiler versions. All target <a href="http://docs.delphipm.org/platforms.html">platforms</a> for supported compiler versions are supported.</p> <h3>What about C++ Builder or FPC</h3> <p><a href="http://docs.delphipm.org/compiler-versions.html">see here</a></p> <h3>Does it support design time components</h3> <p>Not yet, but that is being worked on.</p> <h3>How does it work</h3> <p>See <a href="http://docs.delphipm.org/concepts/how-it-works.html">this page</a></p> 837Managing Delphi Version Info with FinalBuilderhttps://www.finalbuilder.com/resources/blogs/postid/836/managing-delphi-version-info-with-finalbuilderDelphi,FinalBuilder,WindowsWed, 26 Jun 2019 15:49:26 GMT<p>In this post, we'll take a look at the various options for managing and updating Version Info in Delphi projects using FinalBuilder.</p> <h2>Windows Version Info Primer</h2> <p>Windows Version Info (ie the version info shown in explorer) is stored in a <a href="https://docs.microsoft.com/en-us/windows/desktop/menurc/versioninfo-resource" target="_blank">VERSIONINFO</a> resource inside the executable (exe or dll). These resources are created by defining a .rc file, and compiling with either the windows resource compiler (rc.exe) or Delphi's provided resource compiler (brcc32 or cgrc depending on the delphi version). This results in a .res file, which can be linked into exe at compile time by referencing it in the source code, e.g :</p> <pre class="brush:delphi; toolbar:false;"> {$R 'myresource.res'}</pre> <p>I highly recommend familiarising yourself with the VERSIONINFO resource type and it's parts.</p> <h2>Delphi IDE Support for Version Info</h2> <p>The Delphi IDE creates a [YourProjectName].res file next to the dpr or dpk when you create a new project. This is where the IDE will place the VERSIONINFO resource when you enable the option to "Include version information in project".  When you compile the project in the IDE, if needed the IDE will regenerate this res file with updated version info before it is linked into the executable.  For exe's, this resource file also includes the MAINICON resource (the icon shown in explorer).</p> <p>You do not have to use this feature, you can leave the option turned off and manage the version info yourself, by creating your own resource script (.rc) with a VERSIONINFO structure,  and compiling it and referencing the resulting .res file in your source code. You can even just reference the .rc file</p> <pre class="brush:delphi; toolbar:false;"> {$R 'myresource.res' 'myresource.rc'}</pre> <p>and the IDE will compile the rc file and link in the resulting res file. The caveat to this technique is that the command line compiler (dcc32, dcc64 etc) does not support this. </p> <p>If your binary doesn't have version info, or has incorrect version info, it's typically because :</p> <p>1) The version info  resource wasn't referenced in the source and wasn't linked in<br /> 2) There are duplicate VERSIONINFO resources linked, windows will pick the first one it finds.<br /> 3) You set the version info on the wrong IDE configuration (more on this below). </p> <p>The Delphi IDE, along with the dproj file (which is an msbuild project file), uses a convoluted configuration inheritance mechanism to set project properties, including version info. Many a developer has been caught out by this scheme, setting the version info at the wrong node in the heirachy, resulting in no version info in their executables. There have also been issues with dproj files that have been upgraded through multiple versions of delphi over the years.</p> <h2>Using FinalBuilder</h2> <p>In the development environment, the version info usually doesn't matter too much, but for formal releases it's critical, so it's best to leave setting/updating your version info  to your <a href="/finalbuilder" target="_blank">automated build tool</a> or your <a href="/continua-ci" target="_blank">continuous integration server</a>. In FinalBuilder we have invested a lot of time and energy to making version info work correctly with all the different versions of delphi, dealing with the vagaries and subtle differences with each version (and there are many!).</p> <p style="text-align: center;"><img src="/blogimages/vincent/fbversioninfo/delphi-versioninfo-tab.png" /></p> <p>On the Delphi action in FinalBuilder, the Version Info tab presents the version info in a similar way to old versions of delphi IDE did (a much nice ui that the current version imho). This ui allows you control all the various version info properties (and there are a lot!). Note that these will only take effect if you have the "Regenerate resource" option checked on the Project tab (ie, regenerate yourproject.res). </p> <p style="text-align: center;"><img src="/blogimages/vincent/fbversioninfo/delphi-project-tab.png" /></p> <p>Note that the Major, Minor, Release and Build fields are number spin edits, and cannot take FinalBuilder variables. That can easily be worked around with some simple scripting, in the BeforeAction script event  (javascript):</p> <p style="text-align: center;"><img src="/blogimages/vincent/fbversioninfo/delphi-action-script.png" /></p> <p>Another option is to use <a href="https://wiki.finalbuilder.com/display/FB8/Property+Sets" target="_blank">Property Sets</a> to provide the source of the Version Info. Property sets are especially useful when you have multiple actions that need the same version info, or at least to share the same version numbers. Creating a Property Set is trivial, just drop a PropertySet Define action on your target, before the Delphi Action. In the PropertySet Define action, select Win32 Version Info to manage all version info properties, or Win32 Version Numbers to have the property set just manage the major, minor, release and build numbers.</p> <p style="text-align: center;"><img src="/blogimages/vincent/fbversioninfo/define-propertyset.png" /></p> <p>To set the property set values, add a PropertySet Assign Values action before the Delphi action.</p> <p style="text-align: center;"><img src="/blogimages/vincent/fbversioninfo/propset-assign.png" /></p> <p>Then in the Delphi action it's a simple task to select the property set in the version info tab</p> <p style="text-align: center;"><img src="/blogimages/vincent/fbversioninfo/delphi-use-propset.png" /></p> <p>Notice that the version number fields are disabled, since they are now provided by the property set. If you choose the Win32 Version Info property set type, more fields are disabled.</p> <p>One last thing I should mention, is that along with the Version Info and the MAINICON, the project.res file also typically (well for windows at least) contains the manifest file. I recommend you look at the Resource Compiler tab, where it lets you choose which resource compiler to use (more useful in older versions of delphi, where brcc32 didn't cope with some hicolor icon types) and specify the manifest file. I discussed <a href="/resources/blogs/windows-manifest-files" target="_blank">windows manifest files a few years ago in this blog post</a>.</p> 836Introducing Continua CI Version 1.9.1 Betahttps://www.finalbuilder.com/resources/blogs/postid/835/introducing-continua-ci-version-191-beta.NET,Continua CI,Delphi,DeploymentWed, 01 May 2019 07:00:08 GMT<p>This new <a href="/downloads/continuaci/continua-ci-version-history-v191" target="_blank">beta release</a> includes substantial improvements to the expressions engine including new several expressions objects and functions. We have also made some updates to the stage editor, implemented automatic report generation for some reporting actions, and added several new deployment actions providing support for Docker, Azure, SQL packages, File Transfer and SSH.</p> <p>Continue reading for details of all the new features.</p> <ul> <li><a href="#expressions-engine">Enhanced expressions engine</a></li> <li><a href="#stage-editor-changes">Stage editor changes</a></li> <li><a href="#deployment-actions">New premium deployment actions</a></li> <li><a href="#other-actions">Other new and updated actions</a></li> <li><a href="#automatic-reporting">Automatic reporting</a></li> </ul> <h2><a name="expressions-engine">Enhanced expressions engine</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p>The expression engine in Continua CI evaluates expression objects and variables denoted with $ and % characters. It also provides auto-completion suggestions when typing such expressions into expression fields. This has now been overhauled to include function return types, chaining of functions, nesting functions as function parameters, selection and filtering of collections and many improvements to expression parsing. We have added several new functions, objects and collections to give access to more values and allow you to manipulate those values.</p> <p><img alt="Expression in Set Variable action list categories" src="/blogimages/daves/v1.9.1/SetVariableAction.png" /></p> <p>You can now, for example, use the following expression to get the time that the penultimate build stage finished;</p> <pre class="brush:javascript;toolbar:false;gutter:false;"> $Build.Stages.Item($Build.Stages.Count.Decrement()$).Finished.ToLongTimeString()$</pre> <p>combine the result of multiple flags by chaining functions, as in this expression;</p> <pre class="brush:plain;toolbar:false;gutter:false;"> $Build.HasErroredStages.Or($Build.HasFailedStages$).Or($Build.HasWarnings$)$</pre> <p>or use the following expression to get the comment of the first build changeset in the build containing the word 'merge' (ignoring case):</p> <pre class="brush:plain;toolbar:false;gutter:false;"> $Source.SuperFancyRepo.Changesets.First(Comment, Contains, "merge", true).Comment$</pre> <p>We have also included functions to get the value of a variable as a type, allowing you to use properties or functions on the variable value.</p> <p>You can, for example, now use the following expression to get the abbreviated day of the week from a variable entered using a DateTime prompt;</p> <pre class="brush:javascript;toolbar:false;gutter:false;"> $Utils.GetDateTime(%DateTimeTest%).DayOfWeek.Substring(0, 3)$</pre> <p>use expressions to do some more complex maths on a Numeric variable;</p> <pre class="brush:plain;toolbar:false;gutter:false;"> $Utils.GetNumber(%NumberTest%).Floor().Modulus(10).Multiply(100)$</pre> <p>or get the first selected value in a checkbox select variable with this expression:</p> <pre class="brush:plain;toolbar:false;gutter:false;"> $Utils.GetString(%CheckboxSelectTest%).SplitWithQuotes(",").First()$</pre> <p>You can see a full list of available expression objects, collection and functions on the <a href="https://wiki.finalbuilder.com/x/C4DmAQ">Expression Objects page</a> of the documentation.</p> <p>Auto-completion has also been revamped so show more information in the suggestions list. A list of parameters with types is now shown for each for each function. Descriptions are also displayed on mouse over for each object, collection and function in the suggestions list. We have also removed some annoying quirks with expression auto-completion where the cursor would end up in the wrong place or end characters would be added in the wrong place.</p> <h2><a name="stage-editor-changes">Stage editor changes</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p>As Continua CI matures, the number of actions (and categories) has increased. This can make it more difficult to find the action you need. We have therefore redesigned the action list.</p> <p>The list of categories has been pulled up into a drop down menu with all actions listed below by default.</p> <p><img alt="Action list categories" src="/blogimages/daves/v1.9.1/ActionListCategories.png" /></p> <p>The filtering of actions using the search box is now fuzzier, using partial and keyword matches.</p> <p><img alt="Action list search" src="/blogimages/daves/v1.9.1/ActionListSearch.png" /></p> <p>Stage buttons now resize (up to a maximum) to fit the stage name. If you stage names are short, this means you can fit more stages into your browser width. If your stage names are long, then the text will no longer escape the stage borders. Really long stage names which do not fit the maximum stage button size will now be truncated.</p> <p><img alt="Stages" src="/blogimages/daves/v1.9.1/Stages.png" /></p> <p>All actions now include a Validate button to allow you to check that all fields have valid values before saving.</p> <h2><a name="deployment-actions">New premium deployment actions</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p>We have added a set of premium actions which can be used for deploying the results of your build. The following actions can only be used if you have purchased one or more concurrent build licenses.</p> <p><b>File Transfer action:</b> This allows you to upload files to a remote server via FTP, FTPS and SFTP. <a href="https://wiki.finalbuilder.com/x/GADc" target="_blank" title="Further information on File Transfer action"><img src="/images/info.png" /></a></p> <p><b>SSH Run Script action:</b> This can be used to run a script or list of commands on an SSH server. <a href="https://wiki.finalbuilder.com/x/KIAJAQ" target="_blank" title="Further information on SSH Run Script action"><img src="/images/info.png" /></a></p> <p><b>Azure actions:</b> Several new actions are available to allow you to deploy web apps, function apps, files and blobs to Azure. <a href="https://wiki.finalbuilder.com/x/OwBJAg" target="_blank" title="Further information on Azure actions"><img src="/images/info.png" /></a></p> <p><img alt="Azure actions" src="/blogimages/daves/v1.9.1/AzureActions.png" /></p> <ul class="horizontal"> <li>Create Azure Resource Group</li> <li>Delete Azure Resource Group</li> </ul> <ul class="horizontal"> <li>Create Azure App Service Plan</li> <li>Delete Azure App Service Plan</li> </ul> <ul class="horizontal"> <li>Create Azure Web App</li> <li>Deploy Azure Web App</li> <li>Upload Azure Web App</li> <li>Control Azure Web App</li> <li>Delete Azure Web App</li> </ul> <ul class="horizontal"> <li>Create Azure Function</li> <li>Deploy Azure Function</li> <li>Delete Azure Function</li> </ul> <ul class="horizontal"> <li>Create Azure Storage Account</li> <li>Get Azure Storage Account Keys</li> <li>Delete Azure Storage Account</li> </ul> <ul class="horizontal"> <li>Create Azure Storage Container</li> <li>Delete Azure Storage Container</li> </ul> <ul class="horizontal"> <li>Upload Azure Blob</li> <li>Delete Azure Blob</li> </ul> <ul class="horizontal"> <li>Create Azure File Share</li> <li>Delete Azure File Share</li> </ul> <ul class="horizontal"> <li>Create Azure Directory</li> <li>Delete Azure Directory</li> </ul> <ul class="horizontal"> <li>Upload Azure File</li> <li>Delete Azure File</li> </ul> <p><b></b></p> <p><b>Docker actions:</b> These new actions are available to allow you to build, deploy and manage Docker containers. <a href="https://wiki.finalbuilder.com/x/AwAPAg" target="_blank" title="Further information on Docker actions"><img src="/images/info.png" /></a></p> <ul class="horizontal"> <li>Docker Build</li> <li>Docker Command</li> <li>Docker Commit</li> <li>Docker Inspect</li> <li>Docker Pull</li> <li>Docker Push</li> <li>Docker Run</li> <li>Docker Stop</li> <li>Docker Tag</li> </ul> <p><b></b></p> <p><b>SQL Package actions:</b> These new actions allow you to create, update and export SQL Server database schemas and table data. <a href="https://wiki.finalbuilder.com/x/PwBJAg" target="_blank" title="Further information on SQL Package actions"><img src="/images/info.png" /></a></p> <ul class="horizontal"> <li>SQL Package Export</li> <li>SQL Package Extract</li> <li>SQL Package Import</li> <li>SQL Package Publish</li> <li>SQL Package Script</li> </ul> <h2><a name="other-actions">Other new and updated actions</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p><b>Extent Reports:</b> Wrapper for the Extent Reports CLI for reporting on NUnit results. <a href="https://wiki.finalbuilder.com/x/3oE6Ag" target="_blank" title="Further information on Extent Reports action"><img src="/images/info.png" /></a></p> <p><b>ReportGenerator:</b> Updated to include all the latest command line options. <a href="https://wiki.finalbuilder.com/x/WQMZ" target="_blank" title="Further information on ReportGenerator action"><img src="/images/info.png" /></a></p> <p><b>Rename Directory:</b> Does what it says on the tin.. <a href="https://wiki.finalbuilder.com/x/BgAxAg" target="_blank" title="Further information on Rename Directory action"><img src="/images/info.png" /></a></p> <h2><a name="automatic-reporting">Automatic reporting</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p>Currently, there are a few steps to configure when setting up a report. You have to ensure that the report files are included in the Workspace Rules and that the report is defined in the Reports section of the configuration wizard. Furthermore, it's also recommended to include the report files in the artifact rules so that you can control when they are cleaned up.</p> <p>To simplify this process, we have added a new option to automatically register the report with the server to actions which generate reports (FinalBuilder, ReportGenerator and the new Extent Reports action). Ticking this option shows a new tab where you can enter the name, description and run order of the report. When a stage completes, any report files generated by actions where this option is turned on, will automatically be copied to the server workspace. The main report file will be registered as a report and all report files will be registered as artifacts.</p> <p><img alt="FinalBuilder automatic report option" src="/blogimages/daves/v1.9.1/FinalBuilderAutomaticReport.png" /></p> <p>Download the installers for Continua CI v1.9.1 Beta from the <a href="/downloads/continuaci" target="_blank">Downloads</a> page</p> <style type="text/css">ul.horizontal { overflow: auto; margin: 10px 0 0 0; } ul.horizontal li { float: left; margin-left: 2em } .syntaxhighlighter { background-color: #eee !important; margin-top: 0 !important; padding: 10px; outline-style: dashed; outline-width: 1px; outline-color: #666; width: 97% !important; } .syntaxhighlighter .line.alt2 { background-color: #eee !important; } .syntaxhighlighter table td.code { overflow-y: hidden !important; } .syntaxhighlighter .plain, .syntaxhighlighter .plain a { color: #639099 !important; } h1 { margin-bottom: 0.6em !important; } .up-link { float: right } </style> 835Visual Studio 2019 Preview Supporthttps://www.finalbuilder.com/resources/blogs/postid/833/visual-studio-2019-preview-supportFinalBuilder,Visual StudioThu, 13 Dec 2018 11:45:35 GMT<p>Today we released a FinalBuilder 8 update with Visual Studio 2019 and MSBuild 16 Preview support. So far, for the most part Visual Studio 2019 seems to operate (well, from our point of view) pretty much the same as 2017. There were some changes to the MSBuild location, but other than that it all seems to work fine. Since it's based on the preview, it's subject to change and or breakage at any time.</p> <p style="text-align: center;"><img src="/blogimages/vincent/vs2019/vs2019.png" /> </p> 833Delphi 10.3 Rio - Language Changeshttps://www.finalbuilder.com/resources/blogs/postid/832/delphi-103-rio-language-changesDelphi,FinalBuilderThu, 13 Dec 2018 11:12:39 GMT<p>Back in December 2016, I posted some ideas for some <a href="/resources/blogs/delphi-language-enhancements">Delphi language enhancements</a>. That post turned out to be somewhat controversial, I received some rather hostile emails about how I was trying to turn Delphi into C#. That certainly wasn't my intent, but rather to modernize Delphi, in a way that helps me write less, but more maintainable code. Nearly 2 years later, Delphi 10.3 Rio actually implements some of those features.</p> <p>I'm not going to claim credit for the new language features, and the syntax suggestions I made were pretty obvious ones, but I like to think I perhaps spurred them on a bit ;) My blog post had over 12K views, so there was certainly plenty of interest in new language features, and from what I have seen out there on the interwebs they have for the most part been well received.</p> <p>So lets take a look at which suggestions made the cut for 10.3 - referencing my original post.</p> <style type="text/css">.featureTable { border: 1px solid #0071c5; border-collapse: collapse; width: 100%; margin-left: auto; margin-right: auto; } .featureTable thead { background-color: #0071c5; color: White; } .featureTable td { border: 1px solid #0071c5; padding: 5px; } </style> <table align="center" cellpadding="0" cellspacing="0" class="featureTable"> <thead> <tr> <th>Feature</th> <th>Implemented</th> <th>Comments</th> </tr> </thead> <tbody> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#localvarinit">Local Variable Initialisation</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#typeinference">Type Inference</a></td> <td>Yes!</td> <td>For inline variables only, Confuses code insight!</td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#inlinevars">Inline variable declaration, with type inference and block scope</a></td> <td>Yes, Yes and Yes!</td> <td>Confuses code insight!</td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#loopvars">Loop variable inline declaration</a></td> <td>Yes!</td> <td>Confuses code insight!</td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#shortcutprops">Shortcut property declaration</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#interfacehelpers">Interface Helpers</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#nonordinalcase">Strings (and other non ordinals) in Case Statements</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#ternaryoperator">Ternary Operator</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#tryexceptfinally">Try/Except/Finally</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#namedargs">Named Arguments</a></td> <td> </td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#varargs">Variable method arguments</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#lambdas">Lambdas</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#linq">Linq</a></td> <td>No</td> <td>Depends on lambdas and interface helpers.</td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#asyncawait">Async/Await</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#nonrefinterfaces">Non reference counted interfaces</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#attributeconstraints">Attribute Constraints</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#operatoroverloading">Operator overloading on classes.</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#genericconstraints">Improve Generic Constraint</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#fixienumerable">Fix IEnumerable<t></t></a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#yield">Yield return - Iterator blocks</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#partialclasses">Partial classes</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#multipleuses">Allow Multiple Uses clauses</a></td> <td>No</td> <td> </td> </tr> <tr> <td><a href="/resources/blogs/delphi-language-enhancements#interfacegenerics">Allow non parameterized interfaces to have parameterized methods</a></td> <td>No</td> <td> </td> </tr> </tbody> </table> <p> </p> <p>So, 3 out of 23. To be honest, I was pleasantly surprised when I found out about them, given the pace of language change in the past. I'm hopeful this is just the start of things to come and we get to see Delphi evolve and catch up with other modern programming languages. I have a bunch of other language features I'd like to see, and received lots of suggestions from other users. </p> <p>We're still using Delphi XE7 for FinalBuilder 8, and I rarely change compiler versions during the life of a major product version. So I'll only get to use the new language features when I get fully stuck into FinalBuilder 9 & Automise 6. I'm in the process of getting Delphi 10.3 compatible versions of all the third party libraries (commercial and open source) - as and long time delphi user will know, that's always more difficult than it should be!  </p> 832New VSoft Forumshttps://www.finalbuilder.com/resources/blogs/postid/831/new-vsoft-forumsDelphi,General,Web DevelopmentMon, 10 Sep 2018 15:13:04 GMT<p>TLDR; Our forums have moved to <a href="https://www.finalbuilder.com/forums">https://www.finalbuilder.com/forums</a></p> <p>After years of frustration with Active Forums on Dotnetnuke, we finally got around to moving to a new forums platform. </p> <p>The old forums had zero facilities for dealing with spammers, and sure enough every day, spammers would register on the website and post spam on the forums. Even after turning on email verification (where registration required verifying your email), spammers would verify their emails and post spam.</p> <p>The old forums were also terrible at handling images, code markup etc, and will often completely mangle any content you paste in.</p> <p>So the hunt was on for a new platform. I've lost count of the number of different forum products I've looked at over the years, none of which totally satisfied my needs/wants. I've even contemplated writing my own, but I have little enough free time as it is, and would much rather focus on our products. </p> <p><a href="https://discourse.org">Discourse</a>  looked interesting, so I installed it on a Ubuntu Server 18.04 virtual machine (it runs in a Docker container). After some initial trouble with email configuration (it didn't handle subdomains properly) it was up and running. I'm not great with linux, I've tinkered with it many times over the years but never really used it for any length of time. I was a little apprehensive about installing Discourse, however their guide is pretty good and I managed just fine. </p> <p>The default settings are pretty good, but it is easy to configure. After experimenting with it for a few days (there are a LOT of options), we we liked it a lot, and decided to go with it. </p> <p>Discourse is Excellent at handling bad markup, I'm astounded at how well it deals with malformed html and just renders a good looking post (most of the time). Inserting images is a breeze, the editor will accept Markdown or html, and gives an accurate preview while you are writing a post. Posting code snippets works well usng the same markup as github, with syntax highlighting for a bunch of languages (C#, delphi, javascript, vbscript, xml etc). The preview makes it easy to tell when you have things just right. Discourse also works very well on mobile, although our website does not (the login page is usable) - more work to be done there (like a whole new site!). </p> <p>Discourse is open source (GPL), so you can either host it yourself (free) or let Discourse.org host if for you (paid, starting at $100pm). Since we had spare capacity on our web servers (which run hypver-v 2016) I chose to host it ourselves. That was 11 days ago. </p> <p>My goal was to import the content from the old forums, there are 12 years of valuable posts there which I was loath to lose. </p> <p>The first challenge was that Discourse requires unique emails, and our dotnetnuke install did not. After 12 years of upgrades, our database was in a bit of a sorry state. There were many duplicate accounts (some users had 5 accounts), I guess if you can't remember your login you just create a new one, right? I can't totally blame users for that, the password reset email system was unreliable in the past (it should be ok now, check your spam folder!). So we cleaned up the database, removed old accounts that had no licenses and no forum posts. </p> <p>The next challenge was enabling single sign on with the website. Someone had written a dotnetnuke extension for it, but I wasn't able to get it working (it was written for an older version), so I spent 2 days writing my own (and almost losing the will to live!). Once that was sorted, I got to work on importing the data. Discourse does have a bunch of import code on <a href="https://github.com/discourse/discourse/tree/master/script/import_scripts">github</a> - none of which are for dotnetnuke, and they are all written in Ruby (which I have zero experience with). Fortunately, Discourse does have a <a href="https://docs.discourse.org/">rest api</a> - so using C# (with dapper & restsharp) I set about writing a tool to do the import. Since Discourse doesn't allow you to permanently delete topics, this needed to work first time, and be restartable when an error occurred. This took 4 days to write, much of which was just figuring out how to get past the rate limits Discourse imposes. I did this all locally with a back up of the website db and a local discourse instance. The import took several hours, with many restarts (usually due to bad content in the old forums, topics too short etc). </p> <p>Backing up the local instance of Discourse was trivial, as was restoring it on the remote server (in LA). We did have to spend several hours fixing a bunch of posts, and then some time with sql fixing dates (editing a post sends it to the top of a category). I did also have to ssh into the container to "rebake" the posts to fix image url issues. Fortunately theres is a wealth of info on <a href="https://meta.discourse.org">Discourse's own forums</a> - and search works really well!</p> <p>We chose not to migrate the FinalBuilder Server forum (the product was discontinued in 2013) or the Action Studio forum (which gets very few posts).  </p> <p style="text-align: center;"><img src="/blogimages/vincent/new-forums/discourse.png" /> </p> <p>I'm sure we'll still be tweaking the forums over the next few weeks, but on the whole we are pretty happy with how they are. Let us know what you think (in the <a href="https://www.finalbuilder.com/forums/c/site-feedback">Site Feedback</a> forum!).</p> 831Introducing Continua CI Version 1.9https://www.finalbuilder.com/resources/blogs/postid/782/introducing-continua-ci-version-19.NET,Continua CI,Delphi,General,Web Development,WindowsTue, 14 Aug 2018 13:47:08 GMT<p><img alt="" src="/blogimages/dave/ContinuaCIWizardImageSmall.png" style="border-width: 0px; border-style: solid; margin-right: 5px; margin-left: 5px; width: 55px; height: 55px;" /></p> <p>Version 1.9 is now out of beta and available as a stable release. Thank you to those of you who have already tried out the beta - especially those who reported issues.</p> <p>This version brings major changes to the notifications system. We redesigned it using a common architecture, that makes it much easier to add new notification publisher types. Where previously, only email, XMPP and private message notifications were available, there are now publishers for Slack, Teams, Hipchat and Stride. And we can now add more (let us know what you need).</p> <p><img alt="" src="/blogimages/dave/PublisherTypes.png" style="width: 626px; height: 399px; display: block; margin-left: auto; margin-right: auto; " /></p> <p>We are no longer limited to one publisher of each type. You may, for example, have different email servers for different teams on your company. You can set up two email publishers, one for each server, and set up subscriptions so that notifications from different projects go to different email servers. Likewise for different Slack workspaces, Teams channel connectors and so on.</p> <p>We have also improved the XMPP publisher to support sending notifications to rooms. Subscriptions have been improved, allowing you to specify a room and/or channel for this and other publishers.</p> <p><img alt="" src="/blogimages/dave/Subscription.png" style="display: block; margin-left: auto; margin-right: auto; width: 625px; height: 733px;" /></p> <p>User preferences have been updated allowing each user to specify a recipient id, username or channel per publisher.</p> <p><img alt="" src="/blogimages/dave/UserPreferences.png" style="width: 726px; height: 751px; display: block; margin-left: auto; margin-right: auto; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);" /></p> <p>You can see some metrics on the throughput of each publisher (number of messages on queue, messages sent per second, average send time, etc.) on the Publishers page in the Administration area. This also shows real-time counts of any errors occurring while sending messages and also any messages waiting on a retry queue due to rate limiting or service outages. This allows you to know when you need to upgrade rate limits or make other service changes.</p> <p><img alt="" src="/blogimages/dave/PublisherMetrics.png" style="width: 990px; height: 306px; display: block; margin-left: auto; margin-right: auto; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);" /></p> <p>The Templates page has been updated. Templates are now divided into a tab per publisher. The list of available variables for each event type has been moved to a expandable side panel.</p> <p><img alt="" src="/blogimages/dave/NotificationTemplates.png" style="width: 564px; height: 707px; display: block; margin-left: auto; margin-right: auto; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);" /></p> <p>This release is built on .Net Framework version 4.7.2, which has allowed us to upgrade a number of third party libraries, including the database ORM and PostgreSQL drivers. This has noticeably improved performance, as well as providing us with a richer platform to build future features on. The setup wizard will prompt for you to install .Net Framework version 4.7.2, before continuing with the installation.</p> <p><img alt="" src="/blogimages/dave/InstallerFrameworkRequirement.PNG" style="width: 503px; height: 391px; display: block; margin-left: auto; margin-right: auto;" /></p> <p>Note that applications running on .Net 4.7.2 do not run on versions of Windows prior to Windows Server 2008R2 and Windows 7 SP1. We are also dropping the 32-bit server installer. This is mainly to reduce testing overheads. We will still be releasing 32-bit agents for those who are using 16-bit compilers.</p> <p>We will continue to provide bug fixes to Continua CI version 1.8.1 for while to give you time to migrate from older platforms.</p> <p> </p> <p> </p> 782Delphi Package Manager RFChttps://www.finalbuilder.com/resources/blogs/postid/777/delphi-package-manager-rfcDelphi,DPM,Open SourceMon, 16 Jul 2018 01:58:00 GMT<p>Delphi/Rad Studio desperately needs a proper package/library/component manager. A package manager provides a standardized way of consuming third party libraries. At the moment, use of third party libraries is very much adhoc, and in many cases this makes it difficult to move projects between machines, or to get a new hire up and running quickly.</p> <p>Other developement environments, like the .net and javascript eco systems, recognised and solved this problem many years ago. Getting a .net or javascript project up an running, in a new working folder or new machine is trivial.</p> <p>With Delphi/Rad Studio, it's much harder than it should be. In consulting work, I've made it a point to see how clients were handling third party code, and every client had a different way. The most common technique was... well, best described as adhoc (with perhaps a readme with the list of third party products to install). Getting that code compiling on a CI server was a nightmare.</p> <h2>Existing Package Managers</h2> <p>Embarcadero introduced their GetIt package manager with XE8, and the GetIt infrastructure has certainly has made the installation of RAD Studio itself a lot nicer. But as a package manager for third party libraries, it comes up short in a number of areas.</p> <p>There is also Delphinus, which is an admirable effort, but hasn't gotten much traction, possibly due to it being strongly tied to github (you really need github account to use it, otherwise you get api rate limiting errors).</p> <p>Rather than pick apart GetIt or Delphinus, I'd like to outline my ideas for a Delphi package manager. I spend a lot of time working with .net (nuget) and javascript (npm, yarn), so they have very much influenced what I will layout below.</p> <p>I have resurrected an old project (from 2013) that I shelved when GetIt was announced, and I have spent a good deal of time thinking about package management (not just in Delphi), but I'm sure I haven't thought of everything, I'd love to hear feedback from people interested in contributing to this project, or just potential users.</p> <h2>Project Ideals</h2> <p>These are just some notes that I wrote up when I first started working on this back in 2013, I've tried to whip them into some semblance of order for presentation here, but they are just just rough outline of my ideas.</p> <h3>Open Source</h3> <p>The Project should be Open Source. Of course we should welcome contributions from commercial entities, but the direction of the project will be controlled by the community (ie users). The project will be hosted on GitHub, and contributions will be made through Pull Requests, with contributions being reviewed by the Steering committee (TBA).</p> <h3>Public Package Registry</h3> <p>There will be a public website/package server, where users can browse the available packages, and package authors can upload packages. This will be a second phase of the project, with the initial phase being focused on getting a working client/package architecture, with a local or network share folder for the package source.</p> <p>The package registry should not be turned into a store. Once a public package registry/server is available, evaluation packages could be be allowed, perhaps by providing a fee (web hosting is not free). Commercial vendors will of course be able to distribute commercial packages directly to their customers, as the package manager will support hosting of packages in a shared network or local directory. Package meta data will include flags to indicate if the packages are commercial, eval or free/open source. Users will be able to decide which package types show up in their searches.</p> <h3>Package Submission</h3> <p>Package submission to the public registry should be a simple process, without filling in and signing and faxing of forms! We will follow the lead of nuget, npm, ruby etc on this. There should be a dispute process for package names, copyright infringement etc. There will also be the ability to assign ownership of a package, for example when project ownership changes.</p> <p>Package Authors will be able to reserve a package prefix, in order to prevent other authors from infringing on their names or copyrights. For example, Embarcadero might reserve Emb. as their prefix, TMS might reserve TMS. as theirs. (of course I'm hoping to get both on board). The project will provide a dispute resolution process for package prefixes and names.</p> <h2>Delphi specific challenges</h2> <p>Delphi presents a number of challenges when compared to the .net or nodejs/javascript world.</p> <h3>Compatibility</h3> <p>With npm, packages contain source (typically minimized and obfuscated) which is pure javascript. Compatibility is very high.</p> <p>With Nuget, packages contain compiled (to .NET IL) assemblies. A package might contain a few different versions, that target different the versions of the .net framework. Again, compatibility is pretty good, an assembly compiled against .net 2.0 will work on .net 4.7 (.net core breaks this, but it has a new compatibility model, netstandard).</p> <p>If we look at Delphi, binary compatibility between Delphi compiler versions is pretty much non existent(yes, I know about 2006/7 etc). The dcu, dcp and bpl files are typically only compatible with the version they were compiled with. They are also only compatible with the platform they were generated for (so you can't share dcu's between 32 and 64 bit windows, or between iOS and Android). So we would need to include binaries for each version of Delphi we want our library to support. This also has major implications for library dependencies. Where as npm and nuget define dependencies as a range of versions, a binary dependency in Delphi would be fixed to that specific version. There is a way to maintain binary compatibility between releases, provided the interfaces do not change, however exactly what the rules are for this is hard to come by, so for now we'll ignore that possibility.</p> <p>That limits the scope for updating to newer versions of libraries, but that can also be overcome by including the source code in package, and providing on the fly compilation of the library during install. My preference would be for pre-compiled libraries, as that speeds up the build process (of course, since that's an area I have a particular interest in). In Continuous Integration environments, you want to build fast and build often, rebuilding library code with each CI build would be painful (speaking from experience here, 50% of time building FinalBuilder is building the third party libraries).</p> <p>There's also the consideration of Debug vs Release - so if we are including binaries, compiled for Release would be required, but Debug optional? The size of a package file could be problematic. If the package contains pre-compiled binaries for multiple compiler versions, it could get rather large. So perhaps allow for packages that either support a single compiler version, or multiples? The compilers supported would be exposed in the package metadata, and perhaps also in the package file name. Feedback, ideas around this would be welcome.</p> <p>Package files would be (like with other package managers), a simple zip file, which include a metadata (xml) file which describes the contents of the package, and folders containing binaries, source, resources etc. Packages will not contain any scripts (ie to build during install) for security reasons (I don't want to be running random scripts). We will need to provide a way to compile during install (using a simple dsl to describe what needs to be done), this still needs a lot of thought (and very much involves dependencies).</p> <h3>Library/Search Paths</h3> <p>Say goodbye to the IDE's Library path. It was great back in 1995, when we had a few third party libraries and a few projects and we just upgraded the projects to deal with library versioning (just get on the latest). It's simply incompatible with the notion of using multiple versions of the same libraries these days.</p> <p>I rarely change major versions of a library during the lifespan of a major release of my products, I might however take minor updates for bugfixes or performance improvements. The way to deal with this is simply to use the Project Search path. Project A can use version 1 of a library, Project 2 can use version 9, all quite safely (design time components do complicate this).</p> <p>Where a project targets multiple platforms, installing a package should install for all platforms it supports, but it should be possible for the user to specify which platforms they need the package installed for.</p> <h3>Design time Component Installation</h3> <p>The Rad Studio IDE only allows one version of a design time package to be installed at a time. So when switching projects, which might use different versions of a component library, we would need a system that is aware of component versions, and can uninstall/install components on the fly, as projects are loaded.</p> <p>I suspect this will be one of the biggest project hurdles to overcome, it will requires someone with very good open tools api knowledge (ie, not me!).</p> <h3>Dependencies</h3> <p>Libraries that depend on other libraries will need to specify those dependencies in a metadata file, such that they can resolved during installation. As I mentioned above, binary compatibility issues make dependency resolution somewhat more complicated, but not insurmountable. The resolution algorithm will need to take into account compiler version and platform. The algorithm will also need to handle when a package is compiled from source, for example, binary only packages should not be allowed to depend on source only packages (to ensure compatibility). If we end up with install time package compilation, then some serious work will be needed on the dependency tree algorithm to work our what else needs to be done during install (ie, do any dependencies need to be recompiled?).</p> <p>This is certainly more complicated than other platforms, and a significant amount of work to get right (ps, if you think it isn't, you haven't considered all the angles!)</p> <h2>General Considerations</h2> <h3>Package Install/Restore</h3> <p>The user should be able to choose from a list packages to install. When installing the package, this would be recorded either in the dproj, or a separate file alongside the drproj. The install process will update the project search paths accordingly. Package meta data would control what gets added to the search paths, my preference would be for 1 folder per package, as that would keep the search path shorter which improves compile times.</p> <p>When a project is loaded, the dproj (or packages config file) would be checked, and any missing packages restored automatically. This should also handle the situation where a project is loaded in a different IDE version.</p> <h3>Security</h3> <p>We should allow for signing of packages, such that the signatures can be verified by the client(s). Clients should be able to chose whether to only allow signed packages, or allow signed and unsigned, and what to do when signature verification fails. This will allow users certainty in the authenticity and integrity of the package (ie where it comes from and whether it's been modified/tampered with).</p> <h2>Clients</h2> <p>It is envisaged that will be at least 2 clients, a command line tool, and a Rad Studio IDE plugin. Clients will download packages, add those packages to project/config search paths. A local package cache will help with performance, avoiding repetitive package downloads and also reduce disk space demands. The clients will also detect available updates to packages, and package dependency conflicts.</p> <h3>Command line Client</h3> <p>The command like tool will be similar to nuget or npm, which provide the ability to create packages, install or restore missing packages, update packages etc. The tool should allow the specification of compiler versions and platforms, as this is not possible to detect from the dproj alone. This is where the project is currently focused (along with the core package handling functionality).</p> <h3>RAD Studio IDE Client</h3> <p>An IDE plugin client will provide the ability to search for, install, restore, update or remove packages, in a similar manner to the Nuget Visual Studio IDE support (hopefully faster!). This plugin will share the core code with the the command line client (ie, it will not call out to the command line tool). I have not done any work on this yet (help wanted).</p> <h2>Delphi/Rad Studio Version Support</h2> <p>Undecided at the moment. I'm developing with XE7, but it's possible the code will compile with earlier versions, or be made to compile with minor changes.</p> <h2>Summary</h2> <p>Simply put, I want/need a package manager for Delphi, one that works as well as nuget, npm, yarn etc. I'm still fleshing out how this might all work, and I'd love some feedback, suggestions, ideas etc. I'd like to get some people with the right skills 'signed up' to help, particularly people with open tools api expertise.</p> <h2>Get Involved!</h2> <p>I have set up a home for the project on GitHub - <a href="https://github.com/DelphiPackageManager/PackageManagerRFC">The Delphi Package Manager Project - RFC</a>. We'll use issues for discussion, and the wiki to document the specifications as we develop them. I have created a few issues with things that need some dicusssion. I hope to publish the work I have already done on this in the next few days (needs tidying up).</p> 777Continua CI Roadmap 2018https://www.finalbuilder.com/resources/blogs/postid/776/continua-ci-roadmap-2018.NET,Continua CI,Delphi,Web DevelopmentMon, 18 Jun 2018 14:49:38 GMT<p>I'm not usually one for publishing roadmaps, mostly because I don't like to promise something and not deliver. That said, we've had a few people ask recently what is happening with Continua CI. </p> <div style="background:#eeeeee;border:1px solid #cccccc;padding:5px 10px;"><strong><span style="color:#e74c3c;">Disclaimer - nothing I write here is set in stone, our plans may change.</span></strong></div> <p><br /> A few weeks ago, I wrote up a "roadmap" for Continua CI on the whiteboard in our office. Continua CI 1.8.x has been out for some time, but we have been working on 2.x for quite a while. The length of time it is taking to get some features out is a cause of frustration in the office, that lead to a lengthy team discussion, the result was a "new plan". </p> <p>One of the reasons we had been holding features back for 2.x, is they required a change in the system requirements. Many of the third party libraries we use have dropped .net 4.0 support, so we were stuck on old versions. So rather than wait for 2.0 we will release 1.9 on .net 4.7.2. This will allow us to release some new features while we continue working on 2.0, and to take in some bug fixes from third party libraries.</p> <p>This is "The Plan" :</p> <style type="text/css">.featureTable { border: 1px solid #0071c5; border-collapse: collapse; width:100%; margin-left: auto; margin-right: auto; font-size: 14px; } .featureTable thead { background-color : #0071c5; color : White; } .featureTable td { border: 1px solid #0071c5; padding : 5px; } </style> <table align="center" cellpadding="0" cellspacing="0" class="featureTable"> <thead> <tr> <td style="width: 70px;">Version</td> <td style="width: 130px;">.NET Framework</td> <td style="width: 70px">x86/x64</td> <td style="width: 170px;">Min OS Version</td> <td style="width: 70px">UI</td> <td>Features</td> </tr> </thead> <tbody> <tr> <td>1.8.x</td> <td>4.0</td> <td>both</td> <td>Windows Server 2003R2</td> <td>MVC 4</td> <td> </td> </tr> <tr> <td>1.9.0</td> <td>4.7.2</td> <td>x64</td> <td>Windows Server 2008R2</td> <td>MVC 5</td> <td>New Notifications types</td> </tr> <tr> <td>1.9.1</td> <td>4.7.2</td> <td>x64</td> <td>Windows Server 2008R2</td> <td>MVC 5</td> <td>Deployment Actions</td> </tr> <tr> <td>1.9.2</td> <td>4.7.2</td> <td>x64</td> <td>Windows Server 2008R2</td> <td>MVC 5</td> <td>Import/Export</td> </tr> <tr> <td>2.0.0</td> <td>netcore 2.1</td> <td>x64</td> <td>Windows Server 2012</td> <td>MVC 6</td> <td>New Architecture</td> </tr> <tr> <td>3.0.0</td> <td>netcore x.x</td> <td>x64</td> <td>Windows Server 2012</td> <td>TBA</td> <td>New User Interface</td> </tr> </tbody> </table> <p> </p> <p>Let's break down this plan.</p> <h2>1.9.0 Release</h2> <p>The 1.9 Release will built on .net 4.7.2, which allowed us to take updates to a number of third party libraries, most notably NHibernate and Npgsql (postgress driver). These two libraries factor heavily in the performance improvements we see in 1.9.0. </p> <p>The major new feature in 1.9.0 will be a completely redesigned notifications architecture. In 1.8, notifications are quite limited, offering only email, xmpp and private messages. There was very little shared infrastructure between the notification types, so adding new notification types was not simple. You could only use 1 mail server and 1 xmpp server.</p> <p>In 1.9.0, notifications are implemented as plugins*, using a common architecture that made it much easier add new notification types. You can also define multiple notification publishers of the same type, so different projects can use different email servers for example.</p> <p>Notification Types :  Private message, Email, XMPP, Slack, Hipchat, Stride. More will follow in subsequent updates (let us know what you need).</p> <p>*We probably won't publish this api for others to use just yet, as it will be changing for 2.0 due to differences between the .net framework and .net core.</p> <p>If you are running Continua CI on a 32-bit machine, then start planning your migration. Supporting both x86/x64 is no longer feasable, and dropping x86 support simplifies a lot of things for us (like updating bundled tools etc).  We will continue supporting 1.8.x for a while, but only with bug or security fixes. The minimum OS version will be the same as for the .Net Framework 4.7.2 - since Windows Server 2003R2 is out of support these days, it makes sense for us to drop support for it. </p> <h2>1.9.1 Release</h2> <p>Deployment focused actions.  <br /> <br />   - AWS S3 Get/Put<br />   - Azure Blob Upload, Publish, Cloud Rest Service, Web Deploy<br />   - Docker Build Image, Push Image, Run Command, Run Image<br />   - File Transfer (FTP, FTPS, SFTP)<br />   - SSH Action<br />   - SQL Package Export, Package Extract, Package Import, Package Publish<br />   - SSH Run Script<br />   - Web Deploy</p> <p>These actions are all mostly completed, but are waiting on some other (UI) changes to make them easier to use. We'll provide more detail about these when they closer release.</p> <p><strong>Note</strong> : These actions will only be available to licensed customers, not in the free Solo Edition.</p> <h2>1.9.2 Release</h2> <p>One of the most requested features in Continua CI, is the ability to Export and Import Continua CI Projects and Configurations. This might be for moving from a proof of concept server to a production server, or simply to be able to make small changes, and import configurations into other projects. The file format will be YAML.</p> <h2>Continua CI 2.0 Release - .net core.</h2> <p>We originally planned to target .net framework 4.7 with Continua CI 2.0, but with .net core improving significantly with netcore 2.0 and 2.1, the time is right to port to .net core. The most obvious reason to target .net core is cross platform. This is something we have wanted to do for some time, and even explored with mono, but were never able to get things working in a satisfactory manner. It's our hope that .net core will deliver on it's cross platform promise, but for now it's a significant amount of work just to target .net core. So that said, our plans for Continua CI 2.0 is to get it up and running on .net core on <strong>Windows only</strong>, without losing any functionality or features. During the port we are taking note of what our Windows dependencies are for future reference. </p> <p>The current (1.8.x) architecture looks like this :</p> <p><strong><span style="font-family:Courier New,Courier,monospace;">Browser <----> IIS(Asp.net with MVC)<--(WCF)-->Service <--(WCF)-->Agent(s)</span></strong></p> <p>With .net core, it's possible to host asp.net in a service process, and that is what we have chosen to do. This cuts out the WCF layer between IIS and the service. .net core doesn't have WCF server support, and to be honest I'm not all that cut up about it ;) That said, we still need a replacement for WCF for communication between the agents and the server. We're currently evaluating few options for this.</p> <p>Continua CI 2.0  architecture currently looks like this :</p> <p><strong><span style="font-family:Courier New,Courier,monospace;">Browser <----> Service(hosting asp.net core 2.1/mvc)<--(TBD)--> Agent(s)</span></strong></p> <p>The current state of the port is that most of the code has been ported, the communication between the agents and the server is still being worked on, and none of the UI has been ported. We do have asp.net core and mvc running in the service. There are significant differences between asp.net/mvc and asp.net core/mvc, so we're still working through this, I expect it will take a month or so to go through and resolve the issues, then we can move on to new features. </p> <h3>Continua CI 2.0 - new features.</h3> <p>Rest API. This is something we had been working on for a while, but on the .net framework using self hosted Nancy (in the service, running on a separate port from IIS). Once we made the decision to port to .net core, we chose to just use asp.net rather than Nancy. Fortunately we were able to use much of what was already done with nancy on asp.net core (models, services etc) and we're currently working on this right now..</p> <p>Other features - TBA</p> <h2>Continua CI 3.0 - A new UI</h2> <p>Asp.net MVC has served us well over the years, but it relies on a bunch of jQuery code to make the UI usable, and I'll be honest, no one here likes working with jQuery! Even though we ported much of the javascript to typescript, it's still hard to create complex UI's using jQuery. The Stage Editor is a good example of this, even with some reasonably well structured javascript, it's still very hard to work on without breaking it. The UI is currently based on Bootstrap 3.0, with a ton of customisations. Of course Bootstrap 4.0 completely breaks things so we're stuck on 3.0 for now.<br /> <br /> So it's time to change tack and use an SPA framework. We've done proof of concepts with Angular and React, and will likely look at Vue before making a decision - right now I'm leaning towards React. Creating a new user interface is a large chunk of work, so work will start on this soon (it's dependent on the rest api). We're likely to look at improving usability and consistency in the UI, and perhaps a styling refresh. </p> <p>Linux & MacOS Agents - with .net core running on these platforms, this is now a possibility. We looked at this several times before with Mono, but the api coverage or behavor left a lot to be desired. We do still have some windows specific stuff to rework in our agent code, and Actions will need to filtered by platform but this is all quite doable.</p> <h2>Summing up</h2> <p>We're making a big effort here to get features out more frequently, but you will notice I haven't put any timeframe on releases outlined above, they will be released when ready. We expect a 1.9.0 Beta to be out in the next week or so (currently testing the installer, upgrades etc), and we'll blog when that happens (with more details about the new notifications features). Note that it's highly likely there will be other releases in between the ones outlined above, with bug fixes and other minor new features as per usual. We have a backlog of feature requests to work from, many of which are high priorities, so we're never short of things to do (and we welcome feature requests). </p> 776Introducing archive rules in Continua CIhttps://www.finalbuilder.com/resources/blogs/postid/766/introducing-archive-rules-in-continua-ciContinua CI,DelphiWed, 16 May 2018 14:15:12 GMT<p>In version 1.8.1.870 of Continua CI, we have added new archiving functionality to the workspace and repository rules.</p> <p>Builds can generate a lot of output files: binary library files or report files, for example. Copying a large number of these files back to the server at the end of the build can take time. Manually downloading each individual artefact from the server can be a tedious task, so compressing these files into a handy bundle makes sense.</p> <p>Previously, you would have needed to use actions, such as the Seven Zip action, in your build stages to zip these files. The compression can now be performed as part of the agent-to-server workspace rules.</p> <p>To compress a set of files in the agent workspace to an archive in the server workspace, specify a file with a zip extension on the left-hand side of a agent-to-server workspace rule.</p> <p>e.g.</p> <pre class="brush:plain; toolbar:false;gutter:false;"> Libraries.zip < Output/**.dll </pre> <p>Note that the all the usual operators are taken into account when compressing files so, in the above example, the directory structure is preserved. Likewise, using the <- operator will cause all matching files to be flattened into the root folder of the zip file.</p> <p>Doubling up with the << operator will delete any existing zip file before compressing to a new file. Without the << operator, multiple sets of files can be added to the same archive file.</p> <p>e.g.</p> <pre class="brush:plain; toolbar:false;gutter:false;"> Reports.zip < Output/**.html Reports.zip < Output/**.css </pre> <p>You can also compress files into subfolders within the zip file using the new : operator</p> <p>e.g.</p> <pre class="brush:plain; toolbar:false;gutter:false;"> Reports.zip:/css < Output/**.css </pre> <p>Once files have been compressed at the end of one stage, you may need to access the contents of zip files in the next stage. Additionally, you may wish to unpack a zip file from your repository at the start of a stage. The : operator facilitates the extracting of zip files in server-to-agent workspace rules and repository rules.</p> <p>To extract a set of files from an archive in the server workspace to a folder in the agent workspace, specify a file with a zip extension on the left-hand side of a server-to-agent workspace rule. Ensure that you follow the ‘zip’ with a : operator, otherwise the zip file will just be copied.</p> <p>e.g.</p> <pre class="brush:plain; toolbar:false;gutter:false;"> Libraries.zip: > Libraries </pre> <p>This also works for repository rules.</p> <p>e.g.</p> <pre class="brush:plain; toolbar:false;gutter:false;"> $Source.MyRepo$/Documents.zip: > Docs/Main </pre> <p>Note that the all the usual operators >, >>, -> and --> have the same meaning when extracting files as they have when copying file; signifying whether to preserve the directory structure within the zip file and whether to empty the destination folder.</p> <p>You can also specify a pattern after the : operator, allowing you to filter the extracted files.</p> <p> e.g.</p> <pre class="brush:plain; toolbar:false;gutter:false;"> Libraries.zip:/plugins/**.dll > Libraries/Plugins $Source.MyRepo$/Documents.zip:**.md > Docs/Markdown </pre> <p>See the <a href="http://wiki.finalbuilder.com/display/continua/Workspace+Rules" target="_blank">Workspace Rules documentation</a> for further details on the new archive rules syntax.</p> 766Continua CI and TLS 1.2https://www.finalbuilder.com/resources/blogs/postid/761/continua-ci-and-tls-12.NET,Continua CI,Delphi,WindowsFri, 23 Feb 2018 09:24:09 GMT<p>SSL standards are changing, and older SSL/TSL protocols are slowly being deprecated, or even turned off by some services. This post shows how to enable TLS 1.2 support in Continua CI.</p> <p>Yesterday, we started getting reports that the Github Status event handler, and the Github Status action in Continua CI had stopped working.</p> <p>Sure enough, in our testing here we were able to confirm the case. While testing this under the debugger, the error we were seeing was rather strange : "The request was aborted: Could not create SSL/TLS secure channel.". </p> <p>After some research, we found this error was due to being unable to negotiate a common protocol between the client and the server.</p> <p>Now Continua CI 1.x is built with .NET 4.0 (v2 will be on 4.7.1) - we know that .NET 4.0 doesn't support TLS 1.2, and a quick check of the github api server using <a href="https://www.ssllabs.com/ssltest/" target="_blank">SSLLabs</a> shows that they now only support TLS 1.2.</p> <p style="text-align: center;"> <img alt="" src="/blogimages/vincent/continua-tls/github-ssllabs.png" width="987" height="279" /> </p> <br /> <p> I wondered if this was announced by github - turns out they did announce this 3 weeks ago :</p> <p> <a href="https://github.com/blog/2498-weak-cryptographic-standards-removal-notice" target="_blank">Weak cryptographic standards removal notice</a> </p> <p>and yesterday they permanently disabled TLS 1.0 and 1.1</p> <p> <a href="https://github.com/blog/2507-weak-cryptographic-standards-removed" target="_blank">Weak cryptographic standards removed</a> </p> <p>Anyway, back to Continua CI. The good news is that there is a way to enable TLS 1.2 support in Continua CI. Note that this only works when running on Windows Server 2008 or later (Server 2003 does not support TLS 1.2 at all, and we will be dropping support for it with v2).</p> <p>1) Install .Net Framework 4.5 or later - since all 4.x frameworks effectively replace 4.0 - 4.5 has support for TLS 1.2</p> <p>2) Edit %ProgramFiles%\VSoft Technologies\ContinuaCI\Server\Continua.Server.Service.exe.config on the server and %ProgramFiles%\VSoft Technologies\ContinuaCI Agent\Continua.Agent.Service.exe.config on each agent - add the following line in <strong>appSettings</strong> section :</p> <pre class="brush:xml; toolbar:false;"> &lt;add key="Continua.Service.SecurityProtocolType" value="Tls|Tls11|Tls12" /&gt; </pre> Note that the key supports the following values: Ssl2|Ssl3|Tls|Tls11|Tls12|Default<br /> <p> Default = Ssl3|Tls<br /> Multiple protocols can be separated with |<br /> The value "Tls|Tls11|Tls12" will allow Continua CI to work with services that do not support or have not enabled TLS 1.2, and with services that only support TLS 1.2 .</p> <p>3) Open Regedit and add the following value to : HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319 : SchUseStrongCrypto type DWORD value 1</p> <p>4) Restart the Server and Agent Services.</p> <p>5) You may need to restart your server(s) for the registry change to take effect.</p> <p>One last note : This change also effects the communication between the Continua CI Server and agents, if you make the change on the server, make sure you make a compatible change on the agents.</p>761Windows 10 Fall Creators Updatehttps://www.finalbuilder.com/resources/blogs/postid/756/windows-10-fall-creators-updateAutomise,Delphi,FinalBuilder,WindowsTue, 17 Oct 2017 09:55:38 GMTThe <a href="https://blogs.windows.com/windowsexperience/2017/10/17/get-windows-10-fall-creators-update" title="How do I get the Fall Update?">Windows 10 Fall Creators Update has only been out a few hours</a>, but we're already getting questions about it.&nbsp;<br /> <br /> In our limited testing, FinalBuilder 8 and Automise 5 run fine.<br /> <br /> I've only been running the Fall Update for a few hours, but so far I have not noticed any issues. The applications I use daily all run fine.&nbsp;<br /> <br /> The "Windows 10 Creators Update" (ie the one before the Fall Update - stupid release naming imho) <a href="https://quality.embarcadero.com/browse/RSP-17972" title="Embarcadero issue tracker. Requires registration/login to view.">broke the Delphi debugger</a> when using runtime packages. Aparently the issue was caused by a library loader optiimisation, not taking into account that dll's can have multiple import tables. I never did see a full explaination or acknowledgement of the problem from Microsoft. <br /> <br /> This only affected the debugger (all native code debuggers, not just Delphi), which would load and unload each dll many times (based on the number of imports, for FinalBuilder's core package, it was in the hundreds). Sometimes the application would launch, only for the debugger to crash, sometimes it would just hang, sometimes the Delphi IDE would get out of memory errors.&nbsp;<br /> <br /> For me, this was a big issue, since FinalBuilder and Automise use runtime packages. This affected all versions of Delphi, even the latest 10.2 (Tokyo). Embarcadero did eventually ship an update to 10.2 that mostly resolved the problem (not an easy thing as it involved major linker changes), but that didn't help us as we're using an older version (for reasons I won't go into here!). <br /> <br /> So since April 2017, I've been really hamstrung when it comes to debugging. Fortunately we discovered the issue before the Creators Update was installed on our other Delphi development machines (and it's a been a constant battle with windows update nagging to install it ever since) so we were still able debug, just not on my dev machine. Frustrating to say the least.&nbsp;<br /> <br /> The good news is that the Fall Update (mostly) fixes the problem.&nbsp; I still see some dlls/packages getting unloaded and reloaded again, but the application launches and I can debug.&nbsp;<br /> <br /> As far as windows functionality in the Fall Update goes, well the Task Manager has a new GPU section on the performance tab which is mildly interesting, but since I don't use a Pen, or wear a VR headset while working, I'm not noticing much to get excited about. Hopefully, it's just a lot of bug fixes and performance enhancements, minus the show stoppers!!&nbsp;756