Skip to content

Commit

Permalink
Update Windows tool flow (#10)
Browse files Browse the repository at this point in the history
* tools: fix Windows VNC script

* tools: expand Readme instructions
  • Loading branch information
phsauter authored Sep 27, 2024
1 parent 8092c21 commit b0889fb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Cell/Module placement | Routing


## Requirements
We are using the excelent docker container maintained by Harald Pretl. If you get stuck with installing the tools, we urge you to check the [Tool Repository](https://github.com/iic-jku/IIC-OSIC-TOOLS) or consult the [Guide](https://kwantaekim.github.io/2024/05/25/OSE-Docker).
We are using the excelent docker container maintained by Harald Pretl. If you get stuck with installing the tools, we urge you to check the [Tool Repository](https://github.com/iic-jku/IIC-OSIC-TOOLS).

### ETHZ systems
An environment setup for bash is provided.
Expand All @@ -95,11 +95,12 @@ source ethz.env

#### Docker (easy)
There are two possible ways, the easiest way is to install docker and work in the docker container, you can follow the install guides on the [Docker Website](https://docs.docker.com/desktop/).
**Note:** We may not support the latest version. The currently supported version (tag) is **2024.09**.
You do not need to manually download the container image, this will be done when running the script.
If you do not have `git` installed on your system, you also need to install [Github Desktop](https://desktop.github.com/download/) and then clone this git repository.

It is a good idea to grant non-root (`sudo`) users access to docker, this is decribed in the [Docker Article](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user).

Finally, you can navigate to this directory, open a terminal and type:
Finally, you can navigate to this directory, open a terminal (PowerShell in Windows) and type:
```sh
# Linux only (starts and enters docker container in shell)
./start_linux.sh
Expand All @@ -110,9 +111,10 @@ Finally, you can navigate to this directory, open a terminal and type:
```

If you use the VNC option, open a browser and type `localhost` in the address bar.
This should connect you to the VNC server (test by right-clicking somewhere).
This should connect you to the VNC server, the password is `abc123`, then test by right-clicking somewhere, starting the terminal and typing `ls`.
You should see the files in this repository again.

Now you should be in a Ubuntu environment with all tools pre-installed for you.
Now you should be in an Ubuntu environment with all tools pre-installed for you.
If something does not work, refer to the upstream [IIC-OSIC-Tools](https://github.com/iic-jku/IIC-OSIC-TOOLS/tree/main)

#### Native install (hard)
Expand Down
21 changes: 11 additions & 10 deletions start_vnc.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ REM ========================================================================
SETLOCAL

SET DESIGNS=%~dp0
REM Convert Windows path to Unix style for Docker compatibility
FOR /f "tokens=1,* delims=:" %%A IN ("%DESIGNS%") DO (
SET DRIVE_LETTER=%%A
SET PATH_REMAINDER=%%B
)

SET DRIVE_LETTER=%DRIVE_LETTER:~0,1%
SET DESIGNS_UNIX=%DRIVE_LETTER%:%PATH_REMAINDER%
SET DESIGNS_UNIX=%DESIGNS_UNIX:\=/%

SET DEFAULT_DESIGNS=%USERPROFILE%\eda\designs

Expand Down Expand Up @@ -82,14 +91,6 @@ IF DEFINED DOCKER_EXTRA_PARAMS (

IF "%DISP%"=="" SET DISP=host.docker.internal:0

where /q xhost
IF ERRORLEVEL 1 (
ECHO xhost is not detected / not in PATH. Please verify X-server access control!
) ELSE (
ECHO Using xhost to enable localhost access to the X-server.
%ECHO_IF_DRY_RUN% xhost +localhost
)

docker container inspect %CONTAINER_NAME% 2>&1 | find "Status" | find /i "running"
IF NOT ERRORLEVEL 1 (
ECHO Container is running! Stop with \"docker stop %CONTAINER_NAME%\" and remove with \"docker rm %CONTAINER_NAME%\" if required.
Expand All @@ -99,6 +100,6 @@ IF NOT ERRORLEVEL 1 (
echo Container %CONTAINER_NAME% exists. Restart with \"docker start %CONTAINER_NAME%\" or remove with \"docker rm %CONTAINER_NAME%\" if required.
) ELSE (
echo Container does not exist, creating %CONTAINER_NAME% ...
%ECHO_IF_DRY_RUN% docker run -d --user %CONTAINER_USER%:%CONTAINER_GROUP% %PARAMS% -v "%DESIGNS%":/foss/designs --name %CONTAINER_NAME% %DOCKER_USER%/%DOCKER_IMAGE%:%DOCKER_TAG%
%ECHO_IF_DRY_RUN% docker run -d --user %CONTAINER_USER%:%CONTAINER_GROUP% %PARAMS% -v "%DESIGNS_UNIX%":/foss/designs --name %CONTAINER_NAME% %DOCKER_USER%/%DOCKER_IMAGE%:%DOCKER_TAG%
)
)
)

0 comments on commit b0889fb

Please sign in to comment.