Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
|
5c3819af77 | ||
|
1c427f1072 |
7 changed files with 28 additions and 210 deletions
180
.github/workflows/ppa-release.yml
vendored
180
.github/workflows/ppa-release.yml
vendored
|
@ -1,180 +0,0 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
build_rpm:
|
||||
env:
|
||||
REPO_URL: ${{ github.server_url }}/audetto/AppleWin
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os_name: fedora
|
||||
os_codename: '34'
|
||||
build_type: 'QT'
|
||||
|
||||
- os_name: fedora
|
||||
os_codename: '35'
|
||||
build_type: 'QT'
|
||||
|
||||
container: ${{ matrix.os_name }}:${{ matrix.os_codename }}
|
||||
|
||||
steps:
|
||||
- run: dnf -y update && dnf -y install git ca-certificates curl gpg rsync file && dnf clean all
|
||||
|
||||
- name: Import GPG key
|
||||
id: import_gpg
|
||||
uses: crazy-max/ghaction-import-gpg@v4
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.PACKAGE_SIGNING_KEY }}
|
||||
passphrase: ''
|
||||
|
||||
- run: git config --global --add safe.directory /__w/AppleWin/AppleWin && git init && git remote add origin "$REPO_URL" && git fetch origin ${{ github.ref }} && git checkout ${{ github.ref_name }} && git submodule init && git submodule update
|
||||
|
||||
- run: CPACK_TYPE=RPM INSTALL_DEPS=${{ matrix.build_type }} bash ./source/linux/build.sh
|
||||
|
||||
- run: cd build/packages && rm -rf ./_CPack_Packages
|
||||
- run: cd build/packages && dpkg-scanpackages --multiversion . > Packages
|
||||
- run: cd build/packages && gzip -k -f Packages
|
||||
|
||||
- run: cd build/packages && apt-ftparchive release . > Release
|
||||
- run: cd build/packages && gpg --default-key "${{ secrets.PACKAGE_SIGNING_EMAIL }}" -abs -o - Release > Release.gpg
|
||||
- run: cd build/packages && gpg --default-key "${{ secrets.PACKAGE_SIGNING_EMAIL }}" --clearsign -o - Release > InRelease
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.os_name }}-${{ matrix.os_codename }}
|
||||
path: ./build/packages/**/*
|
||||
|
||||
|
||||
|
||||
build_deb:
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
REPO_URL: ${{ github.server_url }}/audetto/AppleWin
|
||||
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os_name: debian
|
||||
os_codename: bullseye
|
||||
build_type: 'QT'
|
||||
has_backports: backports
|
||||
|
||||
- os_name: debian
|
||||
os_codename: bookworm
|
||||
build_type: 'QT'
|
||||
|
||||
|
||||
- os_name: ubuntu
|
||||
os_codename: bionic
|
||||
is_lts: lts
|
||||
build_type: 'WITHOUT_QT'
|
||||
|
||||
- os_name: ubuntu
|
||||
os_codename: focal
|
||||
is_lts: lts
|
||||
build_type: 'QT'
|
||||
|
||||
- os_name: ubuntu
|
||||
os_codename: hirsute
|
||||
build_type: 'QT'
|
||||
|
||||
- os_name: ubuntu
|
||||
os_codename: impish
|
||||
build_type: 'QT'
|
||||
|
||||
container: ${{ matrix.os_name }}:${{ matrix.os_codename }}
|
||||
|
||||
steps:
|
||||
- run: apt-get update && apt-get install -y --no-install-recommends git ca-certificates apt-transport-https curl gpg gpg-agent lsb-release dpkg-dev apt-utils rsync file
|
||||
|
||||
- name: Import GPG key
|
||||
id: import_gpg
|
||||
uses: crazy-max/ghaction-import-gpg@v4
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.PACKAGE_SIGNING_KEY }}
|
||||
passphrase: ''
|
||||
|
||||
- if: matrix.has_backports == 'backports'
|
||||
run: echo 'deb http://deb.debian.org/debian ${{ matrix.os_codename }}-backports main' >> /etc/apt/sources.list
|
||||
|
||||
- if: matrix.is_lts == 'lts'
|
||||
run: curl -L https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
|
||||
- if: matrix.is_lts == 'lts'
|
||||
run: echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/${{ matrix.os_name }}/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/kitware.list >/dev/null
|
||||
|
||||
- run: git config --global --add safe.directory /__w/AppleWin/AppleWin && git init && git remote add origin "$REPO_URL" && git fetch origin ${{ github.ref }} && git checkout ${{ github.ref_name }} && git submodule init && git submodule update
|
||||
|
||||
- run: INSTALL_DEPS=${{ matrix.build_type }} bash ./source/linux/build.sh
|
||||
|
||||
- run: cd build/packages && rm -rf ./_CPack_Packages
|
||||
- run: cd build/packages && dpkg-scanpackages --multiversion . > Packages
|
||||
- run: cd build/packages && gzip -k -f Packages
|
||||
|
||||
- run: cd build/packages && apt-ftparchive release . > Release
|
||||
- run: cd build/packages && gpg --default-key "${{ secrets.PACKAGE_SIGNING_EMAIL }}" -abs -o - Release > Release.gpg
|
||||
- run: cd build/packages && gpg --default-key "${{ secrets.PACKAGE_SIGNING_EMAIL }}" --clearsign -o - Release > InRelease
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.os_name }}-${{ matrix.os_codename }}
|
||||
path: ./build/packages/**/*
|
||||
|
||||
deploy:
|
||||
needs:
|
||||
- build_deb
|
||||
- build_rpm
|
||||
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
strategy:
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
include:
|
||||
- os_name: fedora
|
||||
os_codename: '34'
|
||||
- os_name: fedora
|
||||
os_codename: '35'
|
||||
|
||||
- os_name: debian
|
||||
os_codename: bullseye
|
||||
- os_name: debian
|
||||
os_codename: bookworm
|
||||
|
||||
- os_name: ubuntu
|
||||
os_codename: bionic
|
||||
- os_name: ubuntu
|
||||
os_codename: focal
|
||||
- os_name: ubuntu
|
||||
os_codename: hirsute
|
||||
- os_name: ubuntu
|
||||
os_codename: impish
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: audetto/AppleWin
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.event.inputs.tag }}
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.os_name }}-${{ matrix.os_codename }}
|
||||
path: packages
|
||||
|
||||
- name: Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@v4.3.0
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: packages
|
||||
target-folder: packages/${{ matrix.os_name }}/dists/${{ matrix.os_codename }}
|
|
@ -84,8 +84,7 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apple ][ emulator for Linux")
|
|||
set(CPACK_PACKAGE_CONTACT "audetto <mariofutire@gmail.com>")
|
||||
|
||||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS "ON")
|
||||
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS "ON")
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libyaml-0-2,libminizip1,libqt5gui5,libqt5widgets5,libqt5multimedia5,libqt5gamepad5,libncursesw6,libevdev2,libsdl2-image-2.0-0,libsdl2-2.0-0,libgles2,libpcap0.8,libslirp0,libboost-program-options1.74.0")
|
||||
|
||||
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
||||
set(CPACK_RPM_PACKAGE_GROUP "Applications/Emulators")
|
||||
|
|
|
@ -78,9 +78,9 @@ typedef int socklen_t;
|
|||
#define ETH_MINIMUM_SIZE (6 + 6 + 2)
|
||||
|
||||
// #define U2_LOG_VERBOSE
|
||||
// #define U2_LOG_TRAFFIC
|
||||
// #define U2_LOG_STATE
|
||||
// #define U2_LOG_UNKNOWN
|
||||
#define U2_LOG_TRAFFIC
|
||||
#define U2_LOG_STATE
|
||||
#define U2_LOG_UNKNOWN
|
||||
|
||||
#define MAC_FMT "%02X:%02X:%02X:%02X:%02X:%02X"
|
||||
#define MAC_DEST(p) p[0], p[1], p[2], p[3], p[4], p[5]
|
||||
|
@ -186,6 +186,8 @@ Socket::Socket()
|
|||
, sn_sr(W5100_SN_SR_CLOSED)
|
||||
, myFD(INVALID_SOCKET)
|
||||
, myErrno(0)
|
||||
, myDataRead(0)
|
||||
, myDataReceived(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -197,6 +199,9 @@ void Socket::clearFD()
|
|||
closesocket(myFD);
|
||||
#else
|
||||
close(myFD);
|
||||
#endif
|
||||
#ifdef U2_LOG_STATE
|
||||
LogFileOutput("U2: Connection closed\n");
|
||||
#endif
|
||||
}
|
||||
myFD = INVALID_SOCKET;
|
||||
|
@ -208,6 +213,8 @@ void Socket::setFD(const socket_t fd, const int status)
|
|||
clearFD();
|
||||
myFD = fd;
|
||||
myErrno = 0;
|
||||
myDataRead = 0;
|
||||
myDataReceived = 0;
|
||||
sn_sr = status;
|
||||
}
|
||||
|
||||
|
@ -466,7 +473,9 @@ void Uthernet2::updateRSR(const size_t i)
|
|||
#ifdef U2_LOG_TRAFFIC
|
||||
if (socket.sn_rx_rsr != dataPresent)
|
||||
{
|
||||
LogFileOutput("U2: Recv[%" SIZE_T_FMT "]: %d -> %d bytes\n", i, socket.sn_rx_rsr, dataPresent);
|
||||
const size_t dataRead = socket.sn_rx_rsr - dataPresent;
|
||||
socket.myDataRead += dataRead;
|
||||
LogFileOutput("U2: Recv[%" SIZE_T_FMT "]: %d - %" SIZE_T_FMT " -> %d (%" SIZE_T_FMT ") bytes\n", i, socket.sn_rx_rsr, dataRead, dataPresent, socket.myDataRead);
|
||||
}
|
||||
#endif
|
||||
socket.sn_rx_rsr = dataPresent;
|
||||
|
@ -643,14 +652,18 @@ void Uthernet2::receiveOnePacketFromSocket(const size_t i)
|
|||
#endif
|
||||
if (data > 0)
|
||||
{
|
||||
socket.myDataReceived += data;
|
||||
writeDataForProtocol(socket, myMemory, buffer.data(), data, source);
|
||||
#ifdef U2_LOG_TRAFFIC
|
||||
LogFileOutput("U2: Read %s[%" SIZE_T_FMT "]: +%" SIZE_T_FMT " -> %d bytes\n", proto, i, data, socket.sn_rx_rsr);
|
||||
LogFileOutput("U2: Read %s[%" SIZE_T_FMT "]: +%" SIZE_T_FMT " -> %d (%" SIZE_T_FMT ") bytes\n", proto, i, data, socket.sn_rx_rsr, socket.myDataReceived);
|
||||
#endif
|
||||
}
|
||||
else if (data == 0)
|
||||
{
|
||||
// gracefull termination
|
||||
#ifdef U2_LOG_TRAFFIC
|
||||
LogFileOutput("U2: %s[%" SIZE_T_FMT "]: recvfrom result = %" PTRDIFF_T_FMT "\n", proto, i, data);
|
||||
#endif
|
||||
// graceful termination
|
||||
socket.clearFD();
|
||||
}
|
||||
else // data < 0;
|
||||
|
@ -659,7 +672,7 @@ void Uthernet2::receiveOnePacketFromSocket(const size_t i)
|
|||
if (error != SOCK_EAGAIN && error != SOCK_EWOULDBLOCK)
|
||||
{
|
||||
#ifdef U2_LOG_TRAFFIC
|
||||
LogFileOutput("U2: %s[%" SIZE_T_FMT "]: recvfrom error %" ERROR_FMT "\n", proto, i, STRERROR(error));
|
||||
LogFileOutput("U2: %s[%" SIZE_T_FMT "]: recvfrom result = %" PTRDIFF_T_FMT ", error = %" ERROR_FMT "\n", proto, i, data, STRERROR(error));
|
||||
#endif
|
||||
socket.clearFD();
|
||||
}
|
||||
|
|
|
@ -29,6 +29,8 @@ struct Socket
|
|||
|
||||
socket_t myFD;
|
||||
int myErrno;
|
||||
size_t myDataReceived;
|
||||
size_t myDataRead;
|
||||
|
||||
bool isOpen() const;
|
||||
void clearFD();
|
||||
|
|
|
@ -215,7 +215,7 @@ namespace common2
|
|||
|
||||
if (!options.disk1.empty())
|
||||
{
|
||||
szImageName_drive[DRIVE_1] = options.disk1.c_str();
|
||||
szImageName_drive[DRIVE_2] = options.disk1.c_str();
|
||||
}
|
||||
|
||||
if (!options.disk2.empty())
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 088487a3d44dc75db73ed4aff9bbd224604102ac
|
||||
Subproject commit 3587ee492bbee8144dbfbf5f660d4a7fd6316638
|
|
@ -1,25 +1,9 @@
|
|||
#!/bin/bash
|
||||
BASEDIR="$(dirname "$(readlink -e "${BASH_SOURCE}")")/../.."
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
BUILD_QAPPLE=""
|
||||
if [ "${INSTALL_DEPS:-}" = "QT" ] ; then
|
||||
BUILD_QAPPLE="-DBUILD_QAPPLE=1"
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends qtbase5-dev qtmultimedia5-dev libqt5gamepad5-dev
|
||||
fi
|
||||
|
||||
if [ ! -z "${INSTALL_DEPS:-}" ] ; then
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends cmake make gcc g++ libyaml-dev libminizip-dev libboost-program-options-dev libncurses-dev libevdev-dev libsdl2-dev libsdl2-image-dev libgl-dev libpcap-dev
|
||||
apt-get install -y --no-install-recommends libslirp-dev || echo "Skipping libslirp"
|
||||
fi
|
||||
|
||||
cd "$BASEDIR"
|
||||
mkdir -p build/packages
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
cmake "$@" -DBUILD_APPLEN=1 $BUILD_QAPPLE -DBUILD_SA2=1 -DCMAKE_BUILD_TYPE=RELEASE "$BASEDIR"
|
||||
make -j $(nproc)
|
||||
cpack -G "${CPACK_TYPE:-DEB}" -B "$BASEDIR/build/packages"
|
||||
cmake -DCMAKE_BUILD_TYPE=RELEASE ..
|
||||
make -j 2
|
||||
|
|
Loading…
Add table
Reference in a new issue