This is the seventh article in my series about setting up and working with your Dexterity Development Environments.
If you have not read the previous articles, please do so first using the links below:
- #Dexterity Development Environments – Part 1: Installation
- #Dexterity Development Environments – Part 2: Setting up Projects
- #Dexterity Development Environments – Part 3: Single Code Base
- #Dexterity Development Environments – Part 4: Creating Chunk Files
- #Dexterity Development Environments – Part 5: Creating Dictionary Assemblies
- #Dexterity Development Environments – Part 6: Automating Distribution
Disclaimer: This is the Musgravion principles of development machine setup. It is not the only method but it has worked for me for many years and has been fine tuned during my career. Feel free to use it if it works for you.
In the previous article we discussed automating more of the distribution process. In this final article we will cover completing the distribution automation into a single click.
After we have completed all the preparation discussed in the previous articles, we now bring everything together so that we can launch a master “Release” batch file with a single double click to perform the following actions:
- Create the Dexterity Chunk
- Generate and sign the Dictionary Assemblies
- Copy and sign an optional Visual Studio Tools Addin
- Backup the distribution files
- Build and backup the Windows installer
- Test the installer and update the Applications
- Backup the development folder (including Dexterity, Visual Studio and Installer code)
Here is the Release batch file, named with an underscore to make sure it is listed at the top of the development folder.
@echo off cls echo Must Run as Administrator echo. :: BatchGotAdmin (Run as Admin code starts) REM --> Check for permissions >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" REM --> If error flag set, we do not have admin. if '%errorlevel%' NEQ '0' ( echo Requesting administrative privileges... goto UACPrompt ) else ( goto gotAdmin ) :UACPrompt echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs" "%temp%\getadmin.vbs" exit /B :gotAdmin if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" ) pushd "%CD%" CD /D "%~dp0" :: BatchGotAdmin (Run as Admin code ends) call CHUNK.BAT if errorlevel 1 goto error call DAG.BAT if errorlevel 1 goto error if exist COPY.BAT call COPY.BAT if errorlevel 1 goto error call MAKEZIP.BAT if errorlevel 1 goto error call BUILD.BAT if errorlevel 1 goto error call INSTALL.BAT if errorlevel 1 goto error call BACKUP.BAT if errorlevel 1 goto error :end goto exit :error pause goto exit :exit
This concludes the series on setting up your Dexterity Development Environment (at least for now).
This article was originally posted on http://www.winthropdc.com/blog.