Skip to content

Commit

Permalink
Merge pull request #173 from gem/ae_appdata
Browse files Browse the repository at this point in the history
Switch from admin to user mode installation
  • Loading branch information
antonioettorre authored Feb 15, 2024
2 parents 476fc0a + a64b24f commit 14e6a5d
Show file tree
Hide file tree
Showing 6 changed files with 199 additions and 172 deletions.
89 changes: 0 additions & 89 deletions .github/workflows/tools.yml

This file was deleted.

16 changes: 6 additions & 10 deletions .github/workflows/windows_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,21 @@ jobs:
run: |
$Install = Get-ChildItem -Filter *.exe
Start-Process -FilePath $Install.Fullname -ArgumentList "/S" -Wait
cd "C:\Program Files\OpenQuake Engine\"
$env:PATH="C:\Program Files\OpenQuake Engine\python3\Scripts"
$env:PATH += ";$env:LOCALAPPDATA\Programs\OpenQuake Engine\python3\Scripts"
Write-Host ${env:PATH}
pwd
- name: Run oq
run: |
set mypath="C:\Program Files\OpenQuake Engine"
set PATH=%mypath%\python;%mypath%\python3\Scripts;%PATH%
cd "C:\Program Files\Openquake Engine"
dir
$env:PATH += ";$env:LOCALAPPDATA\Programs\OpenQuake Engine\python3\Scripts"
oq.exe --version
oq.exe engine --run "https://downloads.openquake.org/pkgs/test_event_based_risk_inputs_bc.zip"
oq.exe engine --list-risk-calculations
shell: cmd
- name: Run oq webui console and curl for the standalone tools
run: |
$env:PATH += ";C:\Program Files\OpenQuake Engine\python3\Scripts"
$env:PATH += ";$env:LOCALAPPDATA\Programs\OpenQuake Engine\python3\Scripts"
Write-Host ${env:PATH}
Start-Job -ScriptBlock{& 'C:\Program Files\OpenQuake Engine\python3\Scripts\oq.exe' webui start 127.0.0.1:8800 -s 1> webui.log 2>&1}
cd "$env:LOCALAPPDATA\Programs\OpenQuake Engine\python3\Scripts"
Start-Job -ScriptBlock{& oq.exe webui start 127.0.0.1:8800 -s 2>&1 > "$env:LOCALAPPDATA\Temp\webui.log" }
ping 127.0.0.1 -n 6 > null
Get-Job
netstat -o -n -a | findstr 8800
Expand All @@ -107,7 +103,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: WebUI_log
path: webui.log
path: C:\\Users\\runneradmin\\AppData\\Local\\Temp\\webui.log
retention-days: 5
Upload_Installer:
needs: Test_OQ
Expand Down
9 changes: 2 additions & 7 deletions installers/windows/nsis/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,11 @@ ENV HOME /home/builder
ENV WINEDEBUG -all
WORKDIR $HOME

RUN wget --cache=off https://ftp.openquake.org/windows/thirdparties/nsis-3.08-setup.exe && \
RUN wget --cache=off https://ftp.openquake.org/windows/thirdparties/nsis-3.09-setup.exe && \
wget --cache=off https://ftp.openquake.org/windows/thirdparties/python-3.11.6-win64.zip && \
wget --cache=off https://ftp.openquake.org/windows/thirdparties/get-pip.py
#
# Workaround for:
# - https://bugs.winehq.org/show_bug.cgi?id=42474
# - https://bugs.python.org/issue30186
#ADD dlloverride.reg .
#RUN wine regedit dlloverride.reg && sleep 10

RUN wine nsis-3.08-setup.exe /S && sleep 10
RUN wine nsis-3.09-setup.exe /S && sleep 10

CMD /bin/bash /io/docker/build.sh
Binary file removed installers/windows/nsis/docker/dlloverride.reg
Binary file not shown.
Loading

0 comments on commit 14e6a5d

Please sign in to comment.