Skip to content

Commit

Permalink
pnes: remove load_archive hacks (use libarchive)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cpasjuste committed May 12, 2022
1 parent 86f023e commit d407642
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 1,194 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
libconfig-dev libglm-dev libfreetype6-dev libpng-dev libminizip-dev zlib1g-dev \
libvdpau-dev libva-dev libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev \
libpostproc-dev libswresample-dev libswscale-dev libmpv-dev libass-dev libbz2-dev \
libfribidi-dev libzip-dev libfuse-dev
libfribidi-dev libzip-dev libarchive-dev libfuse-dev
- name: Build pfbneo
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
libconfig-dev libglm-dev libfreetype6-dev libpng-dev libminizip-dev zlib1g-dev \
libvdpau-dev libva-dev libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev \
libpostproc-dev libswresample-dev libswscale-dev libmpv-dev libass-dev libbz2-dev \
libfribidi-dev libzip-dev libfuse-dev
libfribidi-dev libzip-dev libarchive-dev libfuse-dev
- name: Build pfbneo
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
mingw-w64-x86_64-binutils mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-cmake mingw-w64-x86_64-pkgconf
mingw-w64-x86_64-SDL2 mingw-w64-x86_64-freetype mingw-w64-x86_64-glm
mingw-w64-x86_64-glew mingw-w64-x86_64-libconfig mingw-w64-x86_64-tinyxml2
mingw-w64-x86_64-mpv mingw-w64-x86_64-zlib mingw-w64-x86_64-minizip
mingw-w64-x86_64-mpv mingw-w64-x86_64-zlib mingw-w64-x86_64-minizip mingw-w64-x86_64-libarchive
- name: '🧰 Checkout'
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
mingw-w64-x86_64-binutils mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-cmake mingw-w64-x86_64-pkgconf
mingw-w64-x86_64-SDL2 mingw-w64-x86_64-freetype mingw-w64-x86_64-glm
mingw-w64-x86_64-glew mingw-w64-x86_64-libconfig mingw-w64-x86_64-tinyxml2
mingw-w64-x86_64-mpv mingw-w64-x86_64-zlib mingw-w64-x86_64-minizip
mingw-w64-x86_64-mpv mingw-w64-x86_64-zlib mingw-w64-x86_64-minizip mingw-w64-x86_64-libarchive
- name: '🧰 Checkout'
uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
libconfig-dev libglm-dev libfreetype6-dev libpng-dev libminizip-dev zlib1g-dev \
libvdpau-dev libva-dev libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev \
libpostproc-dev libswresample-dev libswscale-dev libmpv-dev libass-dev libbz2-dev \
libfribidi-dev libzip-dev libfuse-dev
libfribidi-dev libzip-dev libarchive-dev libfuse-dev
```
- clone pemu repository:
```
Expand Down Expand Up @@ -101,7 +101,7 @@
mingw-w64-x86_64-binutils mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-cmake mingw-w64-x86_64-pkgconf \
mingw-w64-x86_64-SDL2 mingw-w64-x86_64-freetype mingw-w64-x86_64-glm \
mingw-w64-x86_64-glew mingw-w64-x86_64-libconfig mingw-w64-x86_64-tinyxml2 \
mingw-w64-x86_64-mpv mingw-w64-x86_64-zlib mingw-w64-x86_64-minizip
mingw-w64-x86_64-mpv mingw-w64-x86_64-zlib mingw-w64-x86_64-minizip mingw-w64-x86_64-libarchive
```
- clone pemu repository:
```
Expand Down
2 changes: 1 addition & 1 deletion libcross2d
21 changes: 16 additions & 5 deletions pnes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ file(GLOB NESTOPIA_SRC
${CMAKE_SOURCE_DIR}/cores/nestopia/source/fltkui/cheats.cpp
${CMAKE_SOURCE_DIR}/cores/nestopia/source/fltkui/homebrew.cpp
${CMAKE_SOURCE_DIR}/cores/nestopia/source/fltkui/samples.cpp
${CMAKE_SOURCE_DIR}/cores/nestopia/source/fltkui/nstcommon.cpp
)

list(REMOVE_ITEM NESTOPIA_SRC
${CMAKE_SOURCE_DIR}/cores/nestopia/source/core/NstVideoFilter2xSaI.cpp
${CMAKE_SOURCE_DIR}/cores/nestopia/source/core/NstVideoFilterHqX.cpp
Expand All @@ -50,8 +50,15 @@ set(NESTOPIA_CFLAGS
##############
# pnes
##############
set(PNES_INC sources sources/nst)
file(GLOB PNES_SRC sources/*.c* sources/nst/*.c*)
set(PNES_INC sources)
file(GLOB PNES_SRC sources/*.c*)

##############
# deps
##############
include(FindPkgConfig)
pkg_search_module(LIBARCHIVE REQUIRED libarchive)
list(APPEND NESTOPIA_LDFLAGS ${LIBARCHIVE_LIBRARIES})

#####################
# PLATORM SPECIFIC
Expand All @@ -63,32 +70,36 @@ if (PLATFORM_VITA)
set(TITLE_ID "PNES00001" CACHE STRING "" FORCE)
list(APPEND PNES_INC sources/vita)
list(APPEND NESTOPIA_SRC sources/vita/port.c)
list(APPEND NESTOPIA_CFLAGS -Dstrcasecmp=strcmp)
list(APPEND NESTOPIA_CFLAGS -Dstrcasecmp=strcmp -DDATADIR="app0:/")
list(APPEND NESTOPIA_LDFLAGS ScePower_stub)
elseif (PLATFORM_PS4)
set(PS4_PKG_TITLE "pNES - Portable Nestopia")
set(PS4_PKG_TITLE_ID "PNES00001")
set(PS4_PKG_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}")
list(APPEND NESTOPIA_CFLAGS -DDATADIR="/app0/")
elseif (PLATFORM_SWITCH)
#####################
# SWITCH PLATFORM
#####################
list(APPEND NESTOPIA_SRC sources/switch/port.c)
list(APPEND NESTOPIA_CFLAGS -DDATADIR="romfs:/")
elseif (PLATFORM_3DS)
#####################
# 3DS PLATFORM
#####################
list(APPEND PNES_INC sources/3ds)
list(APPEND NESTOPIA_CFLAGS -Dstrcasecmp=strcmp)
list(APPEND NESTOPIA_CFLAGS -Dstrcasecmp=strcmp -DDATADIR="romfs:/")
list(APPEND NESTOPIA_SRC sources/3ds/port.c)
elseif (PLATFORM_LINUX)
#####################
# LINUX
#####################
list(APPEND NESTOPIA_CFLAGS -DDATADIR="/tmp/c2d_romfs/")
elseif (PLATFORM_WINDOWS)
#####################
# WINDOWS
#####################
list(APPEND NESTOPIA_CFLAGS -DDATADIR="data_romfs/")
endif (PLATFORM_VITA)

#####################
Expand Down
Empty file removed pnes/sources/3ds/SDL.h
Empty file.
Empty file removed pnes/sources/nst/archive.h
Empty file.
Empty file removed pnes/sources/nst/archive_entry.h
Empty file.
19 changes: 0 additions & 19 deletions pnes/sources/nst/audio.h

This file was deleted.

40 changes: 0 additions & 40 deletions pnes/sources/nst/input.h

This file was deleted.

Loading

0 comments on commit d407642

Please sign in to comment.