Skip to content

Instantly share code, notes, and snippets.

@raganmd
Last active July 26, 2021 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raganmd/1f08033b7a4f496e1c16ada2de78ccf8 to your computer and use it in GitHub Desktop.
Save raganmd/1f08033b7a4f496e1c16ada2de78ccf8 to your computer and use it in GitHub Desktop.
@echo off
rem turn off echo
rem set TouchDesigner build numbers
set TOUCHVERSION=2020.26630
rem set our project file target
set TOEFILE="project.toe"
rem set the rest of our paths for executables
set TOUCHDIR=%PROGRAMFILES%\Derivative\TouchDesigner.
set TOUCHEXE=\bin\TouchDesigner.exe
rem combine our elements so we have a single path to our TouchDesigner.exe
set TOUCHPATH="%TOUCHDIR%%TOUCHVERSION%%TOUCHEXE%"
rem check to see if we can open with that version
if exist %TOUCHPATH% goto :STARTPROJECT
echo Touch Version: %TOUCHVERSION% is not installed.
CHOICE /M "Download"
if %errorlevel% equ 1 goto :DOWNLOAD
if %errorlevel% equ 2 goto :eof
:DOWNLOAD
echo Downloading...
rem download version that isn't installed.
start "" https://download.derivative.ca/TouchDesigner.%TOUCHVERSION%.exe
goto :eof
:STARTPROJECT
rem start our project file with the target TD installation
start "" %TOUCHPATH% %TOEFILE%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment