Build, publish and update your AutoCAD OEM application with fully automated BuildTool (while saving a lot of time doing so) [Part 1]

#1 Introduction to the BuildTool

Today I want to introduce to you a productivity tool I have developed to help and speed up development and publication of AutoCAD and AutoCAD OEM based applications.

We (as a company) are developing and publishing an application called AutoSTAGE. The standalone version is based on AutoCAD OEM. AutoSTAGE, is a powerful software for the economical and easy creation of professional CAD drawings, technical planning and visualization for trade show, theatre and event technology.

Also, AutoSTAGE is an expansive monolithic desktop CAD application with lots of moving parts and dependencies. Building this is a complex and intricate process, which can take (but should not) a lot of time and work to accomplish. This counts usually as well for all applications that are based on AutoCAD OEM.

Over the years I have developed a BuildTool to fully automate the build process. This saves a lot of time and enables us to realize (kind of) a CI/CD (continuous integration/continuous delivery) pipeline, where it is very easy to create a new version and/or an update for the application. For a monolithic desktop CAD application, this is no small feat.

When there is a need for a current update, for example because of the need to roll out a fix for a software bug or to publish a new feature, the only limiting factor (apart from changing app code) is the time to build the whole application to a deployment ready state. Since the build process is fully automated with the BuildTool, the build process, for example, can be started in the evening and a couple of hours later in the morning the deployable files are completed and are ready for publication.

The publication itself is further automated with some scripts that push the files over FTP to the servers, where the user can download the updated software for installation. There is also an auto-update function within the AutoSTAGE application, where the user installation checks for updates on a regular basis and downloads the latest version for installation.

Our goal has always been to achieve an agile development and publication process, where changes can be pushed to the user very fast, instead of one or maybe two monolithic updates per year, if at all.

#2 What problems does the BuildTool solve?

As said in the introduction, AutoSTAGE is a monolithic CAD desktop application. To give the reader a gross summary:

When building the application, there needs to be roughly build:

  • 29 Visual Studio C++ Solutions resulting in 44 dbx-, arx- and dll-files
  • 13 Visual Studio C# Solutions resulting in as many .net dll-files
  • 8 Visual Studio C# Solutions resulting in as many executable exe-files
  • 5 associated Visual Studio WiX (Windows Installer Xml) projects to build dozens of installers targeting different platforms and install scenarios.

AutoSTAGE is published for multiple platforms and targets:

  • (A) As a regular plug-in for AutoCAD, called AutoSTAGE App
    We want to reach customers that may work with older versions of AutoCAD, which is (in our experience) not at all seldom. Therefore, we target the AutoCAD Versions 2017 up to the current one, which is (time of writing) AutoCAD 2023.

  • (B) As a standalone software based on AutoCAD OEM, currently AutoSTAGE 2023
    We offer a perpetual as well as a term-based licence. Updating software that is term based is (in theory) easy: just push the latest version to the user.
    For the perpetual license, we offer a maintenance plan with an upgrade to the current AutoCAD OEM Version (for example currently AutoSTAGE 2023). But some users may be reluctant to upgrade to the current AutoCAD OEM version for a variety of reasons, so we offer additionally a maintenance plan without an upgrade to the latest version. This updates just the AutoSTAGE features, the underlying platform stays as it is. With this determining factor, we need to supply updates for AutoSTAGE 2018 up to the current version (as time of writing) AutoSTAGE 2023.

  • (C) Free education version
    For students, we offer a free version for study and educational purposes. This is a separate build to include some water marks in the drawing. Also, licensing works different than with the full version. The educational version adds some more build targets for the plug-in as well as the standalone OEM version.

  • (D) Free trial version
    Selling a CAD software without giving a prospective customers as deeper look at the features and functions before making a purchase decision is not really working. So there needs to be a free trial version to fool around with everything. This adds again some more build targets for the plug-in as well as the standalone OEM version.

  • (E) Multi-Language build
    Starting with AutoCAD OEM 2022, we publish our application in our native German language version as well as an international English language version.

With each build, there need to be created for the full version at least 7 distinct installers targeting AutoCAD 2017 to 2023, as well as 6 distinct installers targeting AutoSTAGE 2018 to 2023. Add the respective educational and trial versions as well as the builds for the multilingual versions, then this figure will increase dramatically.

This is a HUGE effort and cannot be done effectively and/or economically in any manual way by hand. Just to give you a figure: when everything has run through, there are around 40GB of data in the deployment path, PER BUILD!

Enter the BuildTool: All steps of the build process are automated. For example, the Visual Studio solutions get build from code with calling MsBuild.exe and the AutoCAD OEM applications get build calling the AutoCAD OEM Make Wizard and Installer Wizard.

All parts of the build process run in a successive order, based on what needs to be build first to have the right data for the next process in the line. This is fully automated: just start the build process and a couple of hours later the desired files “materialize” on the hard disk. Usually, everything runs smoothly when all the parts of build process have been set up correctly.

#3 User Interface of the BuildTool

Builds can go wrong and will go wrong. There can be a lot of reasons why a given build will not run smoothly through and may stall.

To be maximum flexible, the BuildTool works with parameters that determine the behaviour of the build, i.e., the steps or parts that need to be build. With this, we can select specific parts of the build process for error checking.

The build process is started with a double click on a simple batch file. The batch file just calls the BuildTool with a PowerShell command:

The parameters (or arguments) come from the name of the batch file. Naming the batch file with the respective parameters results in the execution of the desired build function. Here you can see an example of different batch files employed for varied build scenarios:

BuildTool_batch-files

What to build the latest code version for AutoCAD 2023? Just double click

BuildTool_batch-files_A23

Or need to build everything and shut down the computer afterwards? Use

BuildTool_batch-files_ALL

Or just want to build the OEM Installer for AutoCAD OEM 2023 without building the code solutions? Invalidate the build (B) argument to skip code building by adding an x before or after the argument:

BuildTool_batch-files_O23

Need any other build configuration?
Just copy and/or rename an existing batch file with the desired build options.

After clicking, the PowerShell command gets admin rights for the execution of the build process. Then a confirmation window is shown with the used build parameters:

BuildTool_start-build

Pressing Ok starts the build process, where the progress is displayed in a simple command window:

#4 Overview of the build arguments

The BuildTool has great flexibility because of the wide use of different build options. With this, very targeted builds can be archived. The arguments will be recognized in a full fashion or as an abbreviated argument, like RELEASE or simply R.

First, we have the domain for the build: for release, for trial or for education.

Followed by the solution selection.

And the target selection.

Global options to influence the overall build: Sign the resulting files with a certificate, add the licensing mechanism and more.

Options to influence the build for the AutoCAD plug-in:

Options for the OEM build:

Auxiliary options for additional features:

Read on in Part 2

Check out also

Part 2
of this series!

2 Likes