#Dexterity Development Environments – Part 7: Single Click Distribution


David Meego - Click for blog homepageThis 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:

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.

_RELEASE.BAT

@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).

Enjoy

David

This article was originally posted on http://www.winthropdc.com/blog.

Advertisements

One thought on “#Dexterity Development Environments – Part 7: Single Click Distribution

Please post feedback or comments

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s