Skip to content

Commit

Permalink
Add quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
reyery committed Feb 6, 2024
1 parent 4dd8ae0 commit 32650bf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions setup/cityenergyanalyst.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -73,32 +73,32 @@ Section "Base Installation" Base_Installation_Section
StrCpy $PowershellCommand "%windir%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -Command"
StrCpy $MicromambaPath "$INSTDIR\dependencies\micromamba.exe"
StrCpy $RootPrefix "$INSTDIR\dependencies\micromamba"
StrCpy $MicromambaHook '$PowershellCommand "& $MicromambaPath shell hook -r $RootPrefix -s powershell | Out-String | Invoke-Expression ;"'
StrCpy $MicromambaHook "$PowershellCommand '& $MicromambaPath shell hook -r $RootPrefix -s powershell | Out-String | Invoke-Expression ;'"
StrCpy $ActivateCEA "$MicromambaHook micromamba activate cea;"

# create CEA conda environment
DetailPrint "Creating CEA conda environment (this might take awhile)"
nsExec::ExecToLog '$MicromambaHook micromamba create -n cea -f "$INSTDIR\dependencies\conda-lock.yml"'
nsExec::ExecToLog '"$MicromambaHook" micromamba create -n cea -f "$INSTDIR\dependencies\conda-lock.yml"'

# install git
DetailPrint "Installing git"
nsExec::ExecToLog '$ActivateCEA micromamba install git -c conda-forge'
nsExec::ExecToLog '"$ActivateCEA" micromamba install git -c conda-forge'

# clean micromamba cache (to save space)
DetailPrint "Cleaning cache"
nsExec::ExecToLog '$MicromambaHook micromamba clean -afy'
nsExec::ExecToLog '"$MicromambaHook" micromamba clean -afy'

# install CEA from tarball
DetailPrint "pip installing CityEnergyAnalyst==${VER}"
nsExec::ExecToLog '$ActivateCEA pip install --no-deps "$INSTDIR\cityenergyanalyst.tar.gz"'
nsExec::ExecToLog '"$ActivateCEA" pip install --no-deps "$INSTDIR\cityenergyanalyst.tar.gz"'
Pop $0 # make sure cea was installed
DetailPrint 'pip install cityenergyanalyst==${VER} returned $0'
${If} "$0" != "0"
Abort "Could not install CityEnergyAnalyst ${VER} - see Details"
${EndIf}

# create cea.config file in the %userprofile% directory by calling `cea --help` and set daysim paths
nsExec::ExecToLog '$ActivateCEA cea --help'
nsExec::ExecToLog '"$ActivateCEA" cea --help'
Pop $0
DetailPrint '"cea --help" returned $0'
${If} "$0" != "0"
Expand Down

0 comments on commit 32650bf

Please sign in to comment.