updates to support MacOS Catalina lack of 32bit support, wine in docker, new Virtual ][

This commit is contained in:
Egan Ford 2020-03-12 08:01:24 -06:00
parent b0555698c4
commit 008faedd31
11 changed files with 65 additions and 30 deletions

12
Dockerfile.wine32 Normal file
View file

@ -0,0 +1,12 @@
# docker build --no-cache -t wine32 -f Dockerfile.wine32 .
FROM ubuntu:19.10
ENV LC_CTYPE C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
RUN dpkg --add-architecture i386
RUN apt-get update
RUN apt-get -qy install wine32
WORKDIR /root
RUN wine foobar || true

View file

@ -41,6 +41,7 @@ Download <https://github.com/datajerk/c2t/archive/master.zip> and extract.
Both the archive and the repo `bin` directory contain OS/X 64-bit (`c2t`) and Windows 32-bit (`c2t.exe`) binaries. Just copy to any directory in your path.
> OS/X users may need to adjust the permissions, e.g.:
>
```
cp bin/c2t /usr/local/bin
cp bin/c2t-96h /usr/local/bin
@ -49,11 +50,11 @@ chmod 755 /usr/local/bin/c2t-96h
```
An alternative and perhaps simplier install for OS/X:
```
sudo curl https://raw.githubusercontent.com/datajerk/c2t/master/bin/c2t-96h >/usr/local/bin/c2t-96h
sudo chmod 755 /usr/local/bin/c2t-96h
sudo curl https://raw.githubusercontent.com/datajerk/c2t/master/bin/c2t >/usr/local/bin/c2t
sudo chmod 755 /usr/local/bin/c2t
sudo chmod 755 /usr/local/bin/c2t-96h /usr/local/bin/c2t
```
## Build from Source
@ -66,24 +67,34 @@ Prerequisites:
```
git clone https://github.com/datajerk/c2t.git
```
To build for OS/X or Linux:
```
make clean
make
```
To build from Windows, first install MinGW (<http://www.mingw.org/>), then type from the root of this distribution:
```
PATH=C:\MinGW\bin;%PATH%
gcc -Wall -Wno-unused-value -Wno-unused-function -Wno-misleading-indentation -I. -O3 -static -o c2t c2t.c
```
To cross build for Windows from OS/X, first install <http://crossgcc.rts-software.org/download/gcc-4.8.0-qt-4.8.4-win32/gcc-4.8.0-qt-4.8.4-for-mingw32.dmg>, then type:
```
make clean
make windows # or 'make dist' if you want both OS/X and Windows built
```
> If MacOS errors with _cannot be opened because the developer cannot be verified_ with the mingw32 gcc binaries type:
>
```
sudo xattr -r -d com.apple.quarantine /usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32
```
## c2t-96h Version
@ -141,17 +152,26 @@ Single load binaries will auto extract and execute. Disk images will auto extra
Automated testing is only supported on OS/X and requires the following:
* Virtual ][ 7.6 (<http://http://www.virtualii.com/>)
* Virtual ][ 9.2 (<http://http://www.virtualii.com/>)
* Windows cross-compiling tools <http://crossgcc.rts-software.org/download/gcc-4.8.0-qt-4.8.4-win32/gcc-4.8.0-qt-4.8.4-for-mingw32.dmg>
* Wine (<http://winehq.org>) installed in `~/wine` (extract the tarball in `~/wine` and move the contents of `~/wine/usr` to `~/wine`, or change the path to `wine` in `tests/test.sh`).
* Docker Desktop for Mac (<https://hub.docker.com/editions/community/docker-ce-desktop-mac/>)
> You can edit `tests/test.md` if you do not want to test Windows binaries or want to use different images for test.
Build wine32 container:
```
# start docker first, make sure it is running
docker build --no-cache -t wine32 -f Dockerfile.wine32 .
```
To test, type:
```
make testclean # only once, unless you want to start over
make test
```
> If Virtual ][ crashes while testing, just `make test` again to restart failed test and continue where it left off. Do not type `make testclean` again unless you want to start over.
Example output: <https://youtu.be/FCOb4f2hYN8>

3
tests/dwine Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
docker run --rm -it -v $PWD/..:/pwd wine32 bash -c "cd /pwd/tests && wine $*"

View file

@ -1,26 +1,26 @@
## Automated Tests
| Test | Command | Input | Machine | Load | Compare | Offset | Timeout |
|:----:|-------------------------------|-------------------|---------|---------------|-------------|:------:|:-------:|
| 1 | ../bin/c2t-96h | zork.dsk | iie | LOAD | dskiie.tiff | 0 | 25 |
| 2 | ../bin/c2t-96h | dd.po | iie | LOAD | dskiie.tiff | 0 | 25 |
| 3 | ../bin/c2t-96h | zork.dsk | iip | LOAD | dskiip.tiff | 0 | 25 |
| 4 | ../bin/c2t-96h | dd.po | iip | LOAD | dskiip.tiff | 0 | 25 |
| 5 | ../bin/c2t-96h -2bcf | moon.patrol,801 | iie | LOAD | mpiie.tiff | 0 | 25 |
| 6 | ../bin/c2t-96h -2bcf | moon.patrol,801 | iip | LOAD | mpiie.tiff | 0 | 25 |
| 7 | ../bin/c2t-96h -2acf | moon.patrol,801 | ii | 800.A00R 800G | mpii.tiff | 0 | 25 |
| 8 | ../bin/c2t-96h -2bc8 | super_puckman,800 | iie | LOAD | spiie.tiff | 0 | 25 |
| 9 | ../bin/c2t-96h -2bc8 | super_puckman,800 | iip | LOAD | spiie.tiff | 0 | 25 |
| 10 | ../bin/c2t-96h -2ac8 | super_puckman,800 | ii | 800.A00R 800G | spiie.tiff | 0 | 25 |
| 11 | wine ../bin/c2t-96h.exe | zork.dsk | iie | LOAD | dskiie.tiff | 0 | 25 |
| 12 | wine ../bin/c2t-96h.exe | dd.po | iie | LOAD | dskiie.tiff | 0 | 25 |
| 13 | wine ../bin/c2t-96h.exe | zork.dsk | iip | LOAD | dskiip.tiff | 0 | 25 |
| 14 | wine ../bin/c2t-96h.exe | dd.po | iip | LOAD | dskiip.tiff | 0 | 25 |
| 15 | wine ../bin/c2t-96h.exe -2bcf | moon.patrol,801 | iie | LOAD | mpiie.tiff | 0 | 25 |
| 16 | wine ../bin/c2t-96h.exe -2bcf | moon.patrol,801 | iip | LOAD | mpiie.tiff | 0 | 25 |
| 17 | wine ../bin/c2t-96h.exe -2acf | moon.patrol,801 | ii | 800.A00R 800G | mpii.tiff | 0 | 25 |
| 18 | wine ../bin/c2t-96h.exe -2bc8 | super_puckman,800 | iie | LOAD | spiie.tiff | 0 | 25 |
| 19 | wine ../bin/c2t-96h.exe -2bc8 | super_puckman,800 | iip | LOAD | spiie.tiff | 0 | 25 |
| 20 | wine ../bin/c2t-96h.exe -2ac8 | super_puckman,800 | ii | 800.A00R 800G | spiie.tiff | 0 | 25 |
| Test | Command | Input | Machine | Load | Compare | Offset | Timeout |
|:----:|--------------------------------|-------------------|---------|---------------|-------------|:------:|:-------:|
| 1 | ../bin/c2t-96h | zork.dsk | iie | LOAD | dskiie.tiff | 0 | 25 |
| 2 | ../bin/c2t-96h | dd.po | iie | LOAD | dskiie.tiff | 0 | 25 |
| 3 | ../bin/c2t-96h | zork.dsk | iip | LOAD | dskiip.tiff | 0 | 25 |
| 4 | ../bin/c2t-96h | dd.po | iip | LOAD | dskiip.tiff | 0 | 25 |
| 5 | ../bin/c2t-96h -2bcf | moon.patrol,801 | iie | LOAD | mpiie.tiff | 0 | 25 |
| 6 | ../bin/c2t-96h -2bcf | moon.patrol,801 | iip | LOAD | mpiie.tiff | 0 | 25 |
| 7 | ../bin/c2t-96h -2acf | moon.patrol,801 | ii | 800.A00R 800G | mpii.tiff | 0 | 25 |
| 8 | ../bin/c2t-96h -2bc8 | super_puckman,800 | iie | LOAD | spiie.tiff | 0 | 25 |
| 9 | ../bin/c2t-96h -2bc8 | super_puckman,800 | iip | LOAD | spiie.tiff | 0 | 25 |
| 10 | ../bin/c2t-96h -2ac8 | super_puckman,800 | ii | 800.A00R 800G | spiie.tiff | 0 | 25 |
| 11 | dwine ../bin/c2t-96h.exe | zork.dsk | iie | LOAD | dskiie.tiff | 0 | 25 |
| 12 | dwine ../bin/c2t-96h.exe | dd.po | iie | LOAD | dskiie.tiff | 0 | 25 |
| 13 | dwine ../bin/c2t-96h.exe | zork.dsk | iip | LOAD | dskiip.tiff | 0 | 25 |
| 14 | dwine ../bin/c2t-96h.exe | dd.po | iip | LOAD | dskiip.tiff | 0 | 25 |
| 15 | dwine ../bin/c2t-96h.exe -2bcf | moon.patrol,801 | iie | LOAD | mpiie.tiff | 0 | 25 |
| 16 | dwine ../bin/c2t-96h.exe -2bcf | moon.patrol,801 | iip | LOAD | mpiie.tiff | 0 | 25 |
| 17 | dwine ../bin/c2t-96h.exe -2acf | moon.patrol,801 | ii | 800.A00R 800G | mpii.tiff | 0 | 25 |
| 18 | dwine ../bin/c2t-96h.exe -2bc8 | super_puckman,800 | iie | LOAD | spiie.tiff | 0 | 25 |
| 19 | dwine ../bin/c2t-96h.exe -2bc8 | super_puckman,800 | iip | LOAD | spiie.tiff | 0 | 25 |
| 20 | dwine ../bin/c2t-96h.exe -2ac8 | super_puckman,800 | ii | 800.A00R 800G | spiie.tiff | 0 | 25 |
### Future Edit Instructions Here

View file

@ -8,8 +8,8 @@ on run argv
set loadcmd to item 5 of argv
set my_timeout to item 6 of argv
-- tell application "Virtual ]["
tell application "/Applications/Virtual ][/7.6/Virtual ][.app"
tell application "Virtual ]["
-- tell application "/Applications/Virtual ][/7.6/Virtual ][.app"
activate
delay 1.5
-- Close all open machines
@ -26,7 +26,7 @@ on run argv
end if
tell theMachine
-- Change to a color screen
-- set monochrome screen to false
set monochrome screen to false
set scanlines to true
set speaker volume to 0.25
if dsk = "1" then

View file

@ -1,7 +1,7 @@
#!/bin/bash
# Path to wine binary for testing Windows binary
PATH=~/wine/bin:$PATH
PATH=.:$PATH
TESTS=$1
IMAGES=images

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.