Skip to content

Instantly share code, notes, and snippets.

@samuelduchesne
Last active March 12, 2020 19:14
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 samuelduchesne/aef233396167e0f961df3d62a193573e to your computer and use it in GitHub Desktop.
Save samuelduchesne/aef233396167e0f961df3d62a193573e to your computer and use it in GitHub Desktop.
EnergyPlus install batch script
@echo off
SETLOCAL ENABLEEXTENSIONS
SET me=%~n0
SET parent=%~dp0
SET ENERGYPLUS_VERSION=9.2.0
SET ENERGYPLUS_SHA=921312fa1d
SET ENERGYPLUS_INSTALL_VERSION=9-2-0
SET EXT=exe
SET PLATFORM=Windows
SET ENERGYPLUS_DOWNLOAD_BASE_URL=https://github.com/NREL/EnergyPlus/releases/download/v%ENERGYPLUS_VERSION%
SET ENERGYPLUS_DOWNLOAD_FILENAME=EnergyPlus-%ENERGYPLUS_VERSION%-%ENERGYPLUS_SHA%-%PLATFORM%-x86_64
SET ENERGYPLUS_DOWNLOAD_URL=%ENERGYPLUS_DOWNLOAD_BASE_URL%/%ENERGYPLUS_DOWNLOAD_FILENAME%.%EXT%
ECHO Downloading EnergyPlus at...
ECHO %ENERGYPLUS_DOWNLOAD_URL%
curl -SLO %ENERGYPLUS_DOWNLOAD_URL%
ECHO Installing EnergyPlus...
%ENERGYPLUS_DOWNLOAD_FILENAME% /S
ECHO Done
# Install additional material
SET ATTCHBASE=86
SET ATTCHNUM=8231
SET EXTRAS_DOWNLOAD_URL=http://energyplus.helpserve.com/Knowledgebase/Article/GetAttachment/%ATTCHBASE%/%ATTCHNUM%
ECHO Installing older conversion files from...
ECHO %EXTRAS_DOWNLOAD_URL%
curl -SLO %EXTRAS_DOWNLOAD_URL%
SET DEST=C:\EnergyPlusV%ENERGYPLUS_INSTALL_VERSION%\PreProcess\IDFVersionUpdater
ECHO Extracting and Copying files to...
ECHO %DEST%
tar xvf %ATTCHNUM% -C %DEST%
DEL /s %ATTCHNUM%
ECHO Succesfully installed EnergyPlus and conversion files
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment