Skip to content

Commit

Permalink
Add support for snaps.
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
  • Loading branch information
audetto committed May 3, 2024
1 parent 81ad66c commit ea5738f
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,6 @@ CMakeLists.txt.user*

# VSCode
.vscode

# snap
*.snap
73 changes: 73 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: applewin # you probably want to 'snapcraft register <name>'
base: core22 # the base snap is the execution environment for this snap
version: "1.30.18.10" # just for humans, typically '1.2+git' or '1.3.2'
summary: AppleWin Apple II emulator # 79 char long summary
description: |
Apple II emulator for Linux
# grade: devel # must be 'stable' to release into candidate/stable channels
# confinement: devmode # use 'strict' once you have the right plugs and slots

grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots

parts:
applewin-part:
plugin: cmake
source: .
source-type: local
# source-branch: snapcraft
cmake-parameters:
- -DCMAKE_INSTALL_PREFIX=/usr
- -DCMAKE_BUILD_TYPE=Release
- -DBUILD_SA2=ON
build-packages:
- cmake
- g++
- ninja-build
- pkg-config
- libyaml-dev
- libminizip-dev
- libboost-program-options-dev
- libsdl2-image-dev
- libsdl2-dev
- libgles-dev
- libpcap-dev
- libslirp-dev
# - qtbase5-dev
# - qtmultimedia5-dev
# - libqt5gamepad5-dev
# - libqt5multimedia5-plugins
# - libncurses-dev
# - libevdev-dev
stage-packages:
- libyaml-0-2
- libsdl2-2.0-0
- libsdl2-image-2.0-0
- libboost-program-options1.74.0
- libminizip1
- libpcap0.8
- libslirp0
- libgles2

plugs:
etc-xattr:
interface: system-files
read:
- /etc/xattr.conf

apps:
applewin:
command: usr/bin/sa2
extensions:
- gnome
plugs:
- network
- network-bind
- audio-playback
- joystick
- home
- removable-media
# - hardware-observe # what is this for? it complains about /run/udev/data/c241:5
- screen-inhibit-control
- etc-xattr
5 changes: 5 additions & 0 deletions snapcraft/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sudo snap install ./applewin_1.30.18.10_amd64.snap --dangerous --devmode

snap connections applewin

sudo snappy-debug --only-snap=applewin
5 changes: 5 additions & 0 deletions source/frontends/common2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,8 @@ configure_file(config.h.in config.h)

install(DIRECTORY ${CMAKE_SOURCE_DIR}/resource
DESTINATION ${CMAKE_INSTALL_DATADIR}/applewin)

install(FILES
${CMAKE_SOURCE_DIR}/bin/A2_BASIC.SYM
${CMAKE_SOURCE_DIR}/bin/APPLE2E.SYM
DESTINATION ${CMAKE_INSTALL_DATADIR}/applewin/bin)

0 comments on commit ea5738f

Please sign in to comment.