Skip to content

Commit

Permalink
Update installer 0.14.0 (#496)
Browse files Browse the repository at this point in the history
* update gems for 0.14.0 version

* remove the install bat script

* tweak the windows setup script

* update for linux arm packages
  • Loading branch information
tijcolem authored Nov 21, 2024
1 parent ab4c84f commit 761206a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
19 changes: 9 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.10.2)
cmake_policy(SET CMP0048 NEW)

project(URBANoptCLI VERSION 0.13.0)
project(URBANoptCLI VERSION 0.14.0)

include(FindOpenStudioSDK.cmake)

Expand Down Expand Up @@ -89,21 +89,21 @@ option(BUILD_PACKAGE "Build package" OFF)
# need to update the MD5sum for each platform and url below
if(UNIX)
if(APPLE)
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20240709-darwin.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "b683bb30457904041567079ca4ff0fef")
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20241118-darwin.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "8c4d1ff5b4eb0592c16b4b2d259db6cd")
else()
if (ARCH MATCHES "arm64")
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20240524-linux-arm.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "18915b55621ee755bf92c506b5cdba2a")
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-2024112-linux-arm.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "67f329867b472d3fc84c304f306398e0")
else()
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20240719-linux.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "54f27859ff66915f6b343b0b9731a39c")
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20241118-linux.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "8e0203189e6b5abe857f714720d2b098")
endif()
endif()
elseif(WIN32)
if(CMAKE_CL_64)
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20240709-windows.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "d34b30aae5677f20738b4be6ad31862e")
set(URBANOPT_CLI_GEMS_ZIP_FILENAME "urbanopt-cli-gems-20241119-windows.tar.gz")
set(URBANOPT_CLI_GEMS_ZIP_EXPECTED_MD5 "6e0e369409108e7ad24e25a32d73d3b8")
endif()
endif()

Expand Down Expand Up @@ -182,7 +182,6 @@ if(UNIX)
elseif(WIN32)
install(PROGRAMS ${PROJECT_SOURCE_DIR}/scripts/setup-env-gitbash.sh DESTINATION "." COMPONENT "URBANopt" RENAME "setup-env.sh")
install(PROGRAMS ${PROJECT_SOURCE_DIR}/scripts/setup-env.ps1 DESTINATION "." COMPONENT "URBANopt")
install(PROGRAMS ${PROJECT_SOURCE_DIR}/scripts/setup-env.bat DESTINATION "." COMPONENT "URBANopt")
endif()

install(DIRECTORY "${PROJECT_BINARY_DIR}/ruby" DESTINATION "." COMPONENT "Ruby" USE_SOURCE_PERMISSIONS)
Expand Down
30 changes: 15 additions & 15 deletions scripts/setup-env.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ else {

$BASE_DIR_NAME = $PSScriptRoot

$env:GEM_HOME = "$BASE_DIR_NAME\gems\ruby\2.7.0"
$env:GEM_PATH = "$BASE_DIR_NAME\gems\ruby\2.7.0"
$env:PATH += ";$BASE_DIR_NAME\ruby\bin;$BASE_DIR_NAME\gems\ruby\2.7.0\bin;$RUBY_PYTHON_PATH"
$env:RUBYLIB = "$BASE_DIR_NAME\OpenStudio\Ruby"
$env:RUBY_DLL_PATH = "$BASE_DIR_NAME\OpenStudio\Ruby"
$GEM_HOME = "$BASE_DIR_NAME\gems\ruby\2.7.0"
$GEM_PATH = "$BASE_DIR_NAME\gems\ruby\2.7.0"
$PATH += ";$BASE_DIR_NAME\ruby\bin;$BASE_DIR_NAME\gems\ruby\2.7.0\bin;$RUBY_PYTHON_PATH;$env::PATH"
$RUBYLIB = "$BASE_DIR_NAME\OpenStudio\Ruby"
$RUBY_DLL_PATH = "$BASE_DIR_NAME\OpenStudio\Ruby"

# Remove if exists
Remove-Item $HOME/.env_uo.ps1 -ErrorAction Ignore
Remove-Item $HOME/.env_uo.bat -ErrorAction Ignore

'$env:GEM_HOME = "' + $env:GEM_HOME + '"' >> $HOME/.env_uo.ps1
'$env:GEM_PATH = "' + $env:GEM_PATH + '"' >> $HOME/.env_uo.ps1
'$env:PATH = "' + $env:PATH + '"' >> $HOME/.env_uo.ps1
'$env:RUBYLIB = "' + $env:RUBYLIB + '"' >> $HOME/.env_uo.ps1
'$env:RUBY_DLL_PATH = "' + $env:RUBY_DLL_PATH + '"' >> $HOME/.env_uo.ps1
'$env:GEM_HOME = "' + $GEM_HOME + '"' >> $HOME/.env_uo.ps1
'$env:GEM_PATH = "' + $GEM_PATH + '"' >> $HOME/.env_uo.ps1
'$env:PATH = "' + $PATH + '"' >> $HOME/.env_uo.ps1
'$env:RUBYLIB = "' + $RUBYLIB + '"' >> $HOME/.env_uo.ps1
'$env:RUBY_DLL_PATH = "' + $RUBY_DLL_PATH + '"' >> $HOME/.env_uo.ps1

'' >> $HOME/.env_uo.bat
'SET "GEM_HOME=' + $env:GEM_HOME + '"' >> $HOME/.env_uo.bat
'SET "GEM_PATH=' + $env:GEM_PATH + '"' >> $HOME/.env_uo.bat
'SET "PATH=' + $env:PATH + '"' >> $HOME/.env_uo.bat
'SET "RUBYLIB=' + $env:RUBYLIB + '"' >> $HOME/.env_uo.bat
'SET "RUBY_DLL_PATH=' + $env:RUBY_DLL_PATH + '"' >> $HOME/.env_uo.bat
'SET "GEM_HOME=' + $GEM_HOME + '"' >> $HOME/.env_uo.bat
'SET "GEM_PATH=' + $GEM_PATH + '"' >> $HOME/.env_uo.bat
'SET "PATH=' + $PATH + '"' >> $HOME/.env_uo.bat
'SET "RUBYLIB=' + $RUBYLIB + '"' >> $HOME/.env_uo.bat
'SET "RUBY_DLL_PATH=' + $RUBY_DLL_PATH + '"' >> $HOME/.env_uo.bat

0 comments on commit 761206a

Please sign in to comment.