In my previous two posts (see Part1 and Part2) I introduced to you the BuildTool that fully automates the build process of AutoCAD and AutoCAD OEM applications.
Today I want to add one more important feature: Building an AutoCAD OEM application for different language targets. For example, our AutoSTAGE 2023 application is available in our native German language version as well as an international English language version. So we need to build the application with the German AutoCAD OEM Make Wizard as well with the English AutoCAD OEM Make Wizard.
Building an AutoCAD OEM application with different languages is not so easy as it sounds: It is not advisable to install different language version of the AutoCAD OEM Make and Installer Wizard side by side on the same machine.
From the Autodesk Developer Network (ADN):
The real side by side problem (with installing different language versions on the same machine) is the generation of the product msi file. It relies on some non-switchable global MSI locale settings to work properly.
In theory, there may be workarounds for this impediment, but these may be rather fragile. As a responsible developer, I would not go down this path.
With the BuildTool, I have chosen the different approach to spread out the build process over multiple machines. There is a build-host machine with the IP address 10.1.1.1 and a virtual machine called build-vm with the IP address 10.1.1.2. In general, all operations that can be done in the build-host machine will be done there. Everything that needs to be build language specific need to be separated out to build-vm.
In the case, on the build-host machine is the German AutoCAD OEM Make Wizard installed. On the build-vm machine is the English AutoCAD OEM Make Wizard installed.
On the build-vm machine, we need to run just the OEM Make Wizard, use this output for the OEM Installer Wizard and finally the WinRar application to create the self-extracting installer file.
As a vm host we use VMware Workstation Pro with an installation of Win 10.
Now, lets make a quick tour of the automated process.
#1 Boot vm
Starting a vm is a straightforward matter: just call the right arguments to the vmrun.exe from VMware Workstation Pro. /* argument */
String strArg = "/c "
+ “vmrun.exe”
+ " -T"
+ " ws";
/* start */
strArg += " start "
+ <build-vm>
+ " nogui";
/* new process */
var proc = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "cmd.exe",
Arguments = strArg,
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
}
};
/* start process */
proc.Start();
We wait for a predetermined time span to give the build-vm enough time to boot. Then we check with a PING to the IP address if the machine is ready for build.
20220618_11-42-59-163 Starting <build-vm>...
20220618_11-42-59-174 <build-vm> Ping OK for 10.1.1.2
#2 Copy all necessary data
We need to copy all the necessary data from build-host to build-vm that are needed in the vm and/or that should not be changed on the host machine by the vm.
20220618_11-42-59-182 Copy Data from <build-host> to <build-vm> started... PLEASE WAIT!
This copies the latest code of the BuildTool to the vm.
20220618_11-42-59-182 Copy Data from <build-host> to <build-vm> started... PLEASE WAIT!
20220618_11-43-06-639 Source Drive -> \\10.1.1.1\<build-host>\DEV\_AuStTools\AuStTool\
20220618_11-43-06-641 Target Drive -> \\10.1.1.2\<build-vm>\DEV\_AuStTools\AuStTool\
20220618_11-43-06-649 (0) Copy -> \\10.1.1.1\<build-host>\DEV\_AuStTools\AuStTool\ -> \\10.1.1.2\<build-vm>\DEV\_AuStTools\AuStTool\ ...PLEASE WAIT...
20220618_11-43-11-834 (0) Copy -> \\10.1.1.1\<build-host>\DEV\_AuStTools\AuStTool\ -> \\10.1.1.2\<build-vm>\DEV\_AuStTools\AuStTool\ ...FINISHED!
Here we copy the output from the msbuild operations to the vm. In theory, we could have left them on the host machine, but the workflow is easier with copying the data to the vm.
20220618_11-43-11-835 -------------------------------------------------------------------
20220618_11-43-11-836 Source Drive -> \\10.1.1.1\<build-host>\DEV\_AuStTools\RELEASE\
20220618_11-43-11-836 Target Drive -> \\10.1.1.2\<build-vm>\DEV\_AuStTools\RELEASE\
20220618_11-43-11-848 (0) Copy -> \\10.1.1.1\<build-host>\DEV\_AuStTools\RELEASE\ -> \\10.1.1.2\<build-vm>\DEV\_AuStTools\RELEASE\ ...PLEASE WAIT...
20220618_11-43-12-335 (0) Copy -> \\10.1.1.1\<build-host>\DEV\_AuStTools\RELEASE\ -> \\10.1.1.2\<build-vm>\DEV\_AuStTools\RELEASE\ ...FINISHED!
20220618_11-43-12-337 -------------------------------------------------------------------
And we need to have in the vm local copies of the make and installer wizard xml and associated files for the OEM Wizards.
20220618_11-43-14-441 Source Drive -> \\10.1.1.1\<build-host>\DEV\AuStOem\
20220618_11-43-14-443 Target Drive -> \\10.1.1.2\<build-vm>\DEV\AuStOem\
20220618_11-43-14-451 (0) Copy -> \\10.1.1.1\<build-host>\DEV\AuStOem\ -> \\10.1.1.2\<build-vm>\DEV\AuStOem\ ...PLEASE WAIT...
20220618_11-43-34-375 (0) Copy -> \\10.1.1.1\<build-host>\DEV\AuStOem\ -> \\10.1.1.2\<build-vm>\DEV\AuStOem\ ...FINISHED!
20220618_11-43-38-608 Copy Data from <build-host> to <build-vm> FINISHED!
#3 Run OEM Make Wizard with BuildTool in the vm
To run the BuildTool on the vm from the host machine, we use the Microsoft toolPsExec
which lets you execute processes on other systems and without having to manually install client software.
20220618_13-40-47-802 Call PsExec -->
20220618_13-40-47-803 -i
20220618_13-40-47-804 \\<build-vm>
20220618_13-40-47-804 -u
20220618_13-40-47-805 <build-vm>\<user-account>
20220618_13-40-47-806 -p
20220618_13-40-47-807 <user-password>
20220618_13-40-47-807 -h
20220618_13-40-47-808 -realtime
20220618_13-40-47-811 -accepteula
20220618_13-40-47-812 D:\DEV\_AuStTools\RELEASE\AuStTool.exe
20220618_13-40-47-813 AuStBuild,R,O23,OM,SILENT
As arguments, we need to log into the vm with the user name and password, as well as the local executable we want to run, in this case the AuStTool.exe, with the required parameters. With this, the build action starts in the vm.
The doubled time stamps in the logfile is as signal that the action runs on the vm.
20220618_13-40-56-478 20220618_13-40-56-469
20220618_13-40-56-479 20220618_13-40-56-469 -------------------------------------------------------------------
20220618_13-40-56-480 20220618_13-40-56-469 BUILD OEM EN MAKE WIZARD started...
20220618_13-40-56-481 20220618_13-40-56-469 -------------------------------------------------------------------
20220618_13-40-56-482 20220618_13-40-56-469
20220618_13-40-56-483 20220618_13-40-56-469
20220618_13-40-56-483 20220618_13-40-56-469 -------------------------------------------------------------------
20220618_13-40-59-019 20220618_13-40-59-009
20220618_13-40-59-020 20220618_13-40-59-009 Edit ACAD2023OEM_EN AuSt OEM Make Wizard xml file...
20220618_13-41-00-080 20220618_13-41-00-063 Edit ACAD2023OEM_EN AuSt OEM Make Wizard xml file...DONE!
20220618_13-41-00-081 20220618_13-41-00-063
20220618_13-41-00-083 20220618_13-41-00-079
20220618_13-41-00-084 20220618_13-41-00-079 BUILD ACAD2023OEM_EN AuSt...
20220618_13-41-00-089 20220618_13-41-00-079
20220618_13-41-00-089 20220618_13-41-00-079 Run Batch Build_Oem.bat... Param -> ACAD2023OEM_EN AuSt 06<serial>18
20220618_13-42-47-635 20220618_13-42-47-631 Run Batch Build_Oem.bat... Param -> ACAD2023OEM_EN AuSt 06<serial>18 DONE!
20220618_13-42-47-635 20220618_13-42-47-631
20220618_13-42-47-638 20220618_13-42-47-631 BUILD ACAD2023OEM_EN AuSt...DONE!
20220618_13-42-57-975 20220618_13-42-57-961
20220618_13-42-57-976 20220618_13-42-57-961 -------------------------------------------------------------------
20220618_13-42-57-977 20220618_13-42-57-961
20220618_13-42-57-978 20220618_13-42-57-961
20220618_13-42-57-979 20220618_13-42-57-961 -------------------------------------------------------------------
20220618_13-42-57-979 20220618_13-42-57-961 BUILD OEM EN MAKE WIZARD ended...
20220618_13-42-57-980 20220618_13-42-57-961 -------------------------------------------------------------------
20220618_13-42-57-981 20220618_13-42-57-961
#4 Sign the build files
We want to sign the build files done with the OEM Make Wizard. This could be done on the vm, but it is easier to do it on the host machine, depending on the type and method of signing certificate that is used. For this, we copy the OEM output folder, the files from the OEM Make Wizard, from the vm to the host machine and do the signing on the host machine.20220618_13-42-58-050 Copy (\\10.1.1.2\<build-vm>\REL\RELEASE\AUST2023EN\AuSt\\) to (D:\REL\RELEASE\AUST2023EN\AuSt\)
20220618_13-44-58-149 Copy OK!
20220618_13-44-58-150
20220618_13-45-02-194 SIGNED -> D:\REL\RELEASE\AUST2023EN\AuSt\aust.exe
20220618_13-45-06-113 SIGNED -> D:\REL\RELEASE\AUST2023EN\AuSt\AuSt10.dll
20220618_13-45-10-093 SIGNED -> D:\REL\RELEASE\AUST2023EN\AuSt\AuSt10Mgd.dll
20220618_13-45-14-053 SIGNED -> D:\REL\RELEASE\AUST2023EN\AuSt\AuSt10Wrapper.dll
20220618_13-47-25-350 SIGNED -> D:\REL\RELEASE\AUST2023EN\AuSt\AuSt10Object.dbx
#5 Run OEM Installer Wizard with BuildTool in the vm
The Installer Wizard needs to be run in the vm, similar to the Make Wizard. As data source we can take the OEM output folder with the signed files from the host machine. This folder does not have to be on the vm. Again, we are using PsExec to call the BuildTool, this time with slightly different parameters:20220618_14-05-43-090 Call PsExec -->
20220618_14-05-43-091 -i
20220618_14-05-43-092 \\<build-vm>
20220618_14-05-43-092 -u
20220618_14-05-43-093 <build-vm>\<user-account>
20220618_14-05-43-093 -p
20220618_14-05-43-094 <user-password>
20220618_14-05-43-095 -h
20220618_14-05-43-096 -realtime
20220618_14-05-43-096 -accepteula
20220618_14-05-43-097 D:\DEV\_AuStTools\RELEASE\AuStTool.exe
20220618_14-05-43-098 AuStBuild,R,O23,OI,SILENT
This sets of the OEM Installer Wizard. The resulting files get written directly to the host machine.
20220618_14-05-43-750 20220618_14-05-43-734
20220618_14-05-43-751 20220618_14-05-43-734 -------------------------------------------------------------------
20220618_14-05-43-752 20220618_14-05-43-734 BUILD OEM EN INSTALLER WIZARD started...
20220618_14-05-43-753 20220618_14-05-43-750 -------------------------------------------------------------------
20220618_14-05-43-754 20220618_14-05-43-750
20220618_14-05-43-755 20220618_14-05-43-750
20220618_14-05-43-756 20220618_14-05-43-750 -------------------------------------------------------------------
20220618_14-05-43-756 20220618_14-05-43-750 -------------------------------------------------------------------
20220618_14-05-43-762 20220618_14-05-43-750
20220618_14-05-43-762 20220618_14-05-43-750 Edit ACAD2023OEM_EN AuSt OEM Installer Wizard xml file...
20220618_14-05-44-790 20220618_14-05-44-775 Edit ACAD2023OEM_EN AuSt OEM Installer Wizard xml file...DONE!
20220618_14-05-44-791 20220618_14-05-44-775
20220618_14-05-44-792 20220618_14-05-44-775
20220618_14-05-44-793 20220618_14-05-44-775 BUILD ACAD2023OEM_EN AuSt OEM INSTALLER WIZARD started...
20220618_14-05-44-795 20220618_14-05-44-790
20220618_14-05-44-796 20220618_14-05-44-790 Run Batch Build_OemInstaller.bat... Param -> ACAD2023OEM_EN AuSt --10.1.1.1-<build-host>-DEPLOY-getAuSt2023EN-AutoSTAGE_2023EN__Installer_2.3.29-
20220618_14-10-29-929 20220618_14-10-29-916 Run Batch Build_OemInstaller.bat... Param -> ACAD2023OEM_EN AuSt --10.1.1.1-<build-host>-DEPLOY-getAuSt2023EN-AutoSTAGE_2023EN__Installer_2.3.29- DONE!
20220618_14-10-29-930 20220618_14-10-29-916
20220618_14-10-29-932 20220618_14-10-29-916 BUILD ACAD2023OEM_EN AuSt OEM INSTALLER WIZARD started...DONE!
20220618_14-10-29-933 20220618_14-10-29-916
20220618_14-10-49-945 20220618_14-10-49-942 -------------------------------------------------------------------
20220618_14-10-49-945 20220618_14-10-49-942 -------------------------------------------------------------------
20220618_14-10-49-947 20220618_14-10-49-942
20220618_14-10-49-948 20220618_14-10-49-942
20220618_14-10-49-949 20220618_14-10-49-942 -------------------------------------------------------------------
20220618_14-10-49-950 20220618_14-10-49-942 BUILD OEM EN INSTALLER WIZARD ended...
20220618_14-10-49-950 20220618_14-10-49-942 -------------------------------------------------------------------
20220618_14-10-49-951 20220618_14-10-49-942
#6 Create self-extracting installer file
Finally, we want to create a self-extracting archive for the installation of our AutoCAD OEM based application. Again, we use PsExec to run the English language version WinRar on the vm.20220618_14-20-19-601 Call PsExec -->
20220618_14-20-19-606 -i
20220618_14-20-19-607 \\<build-vm>
20220618_14-20-19-607 -u
20220618_14-20-19-608 <build-vm>\<user-account>
20220618_14-20-19-609 -p
20220618_14-20-19-610 <user-password>
20220618_14-20-19-610 -h
20220618_14-20-19-611 -realtime
20220618_14-20-19-611 -accepteula
20220618_14-20-19-612 D:\DEV\_AuStTools\RELEASE\AuStTool.exe
20220618_14-20-19-613 AuStBuild,R,O23,OZ,OS,SILENT
In theory, we could do this also on the host machine, but then the self-extracting archive would show German language strings while the compressed application is in English language. Does not look good, so we stay in line and do it language specific in the vm.
The WinRar takes the data from the host machine, creates the self-extracting archive and writes the results to the host machine. No data is used from the vm for this operation.
-------------------------------------------------------------------
20220618_14-20-20-219 20220618_14-20-20-211 BUILD OEM EN INSTALLER RAR started...
20220618_14-20-20-220 20220618_14-20-20-211 -------------------------------------------------------------------
20220618_14-20-20-221 20220618_14-20-20-211
20220618_14-20-20-221 20220618_14-20-20-211
20220618_14-20-20-222 20220618_14-20-20-211 -------------------------------------------------------------------
20220618_14-20-20-225 20220618_14-20-20-211
20220618_14-20-20-226 20220618_14-20-20-211 BUILD ACAD2023OEM_EN AuSt OEM SFX INSTALLER started...
20220618_14-20-20-236 20220618_14-20-20-226 Compile to -> \\10.1.1.1\<build-host>\DEPLOY\_getAuSt2023EN\AutoSTAGE_2023EN__Installer.exe
20220618_14-27-08-136 20220618_14-27-07-824 BUILD ACAD2023OEM_EN AuSt OEM SFX INSTALLER started...DONE!
20220618_14-27-08-137 20220618_14-27-07-824
20220618_14-27-08-138 20220618_14-27-07-824
20220618_14-27-08-141 20220618_14-27-07-824 BUILD ACAD2023OEM_EN AuSt OEM SFX INSTALLER started...
20220618_14-27-08-141 20220618_14-27-07-824 Compile to -> \\10.1.1.1\<build-host>\DEPLOY\_getAuSt2023EN\AutoSTAGE_2023EN__Installer_SILENT.exe
20220618_14-33-05-295 20220618_14-33-04-862 BUILD ACAD2023OEM_EN AuSt OEM SFX INSTALLER started...DONE!
20220618_14-33-05-296 20220618_14-33-04-862
20220618_14-33-05-297 20220618_14-33-04-862 -------------------------------------------------------------------
20220618_14-33-05-298 20220618_14-33-04-862
20220618_14-33-05-300 20220618_14-33-04-862
20220618_14-33-05-302 20220618_14-33-04-862 -------------------------------------------------------------------
20220618_14-33-05-302 20220618_14-33-04-862 BUILD OEM EN INSTALLER RAR ended...
20220618_14-33-05-303 20220618_14-33-04-862 -------------------------------------------------------------------
#7 Summary
With this workflow from the BuildTool, it is very easy to build multilingual AutoCAD OEM based application, provided the host and the vm is correctly set up. We us this with just two languages (German and English), but you could extend this to much more, i.e., all available AutoCAD OEM languages.The only downside is a much longer build time, because we copy and transfer a lot of data over an IP connection between the host and the virtual machine, and that takes a heavy timing toll. So you would have to factor in more wait time until the application(s) are done. But again, everything is automated, you just have to start the process and get some cups of coffee (or a night’s break) until all is well and done.