hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
10.81k stars 2.12k forks source link

[Question] Embedded dependencies #17336

Open werdahias opened 1 year ago

werdahias commented 1 year ago

Platform

Linux / BSD

Compiler and build tool versions

n/a

Operating system version

Debian unstable

Build commands used

n/a

What happens

n/a

PPSSPP version affected

latest

Last working version

n/a

Checklist

werdahias commented 1 year ago

Real comment here:

Hi,

I wanted to create an official debian ppsspp package. The main issue here is the ext/ folder. Since debian policy states that no embedded code copies should be shipped this folder can be excluded on the packaging side.

1) Does ppsspp automatically prefer system libraries instead of the vendored ones? 2) Which libraries under ext/ are relevant for a linux-only build ? 3) I take it all the vxproj files can be excluded too, same as the windows, android and macOS folder ?

hrydgard commented 1 year ago

(Next time, if you don't want to use the issue template, just click the little link below all the choices that lets you create an empty issue, that's nicer than creating two posts).

It's not possible to reliably use system ffmpeg. You have to use the one we include (in ffmpeg), as upstream has changed a lot and is no longer compatible with our code. Well, it can stumble through working somewhat, but highly not recommended.

As for the other libraries, as you'll find in the CMakeLists.txt, there's some facilities to make use of system-installed libraries. But we just don't work the way Debian wants you to work, the app is designed to build on platforms without package managers and thus we include all our dependencies directly.

You'll need almost everything from ext/ , there's not much that can be excluded.

unknownbrackets commented 1 year ago

See here for more info on FFmpeg for example: https://github.com/hrydgard/ppsspp/issues/15308#issuecomment-1030655799

Not sure if anyone has jumped in yet to volunteer to do all this work. I know it would make packaging people very happy if we recreated FFmpeg from scratch. Using an old version of a library to emulate an old console makes people so angry, I realize. Good thing packagers aren't in charge of Windows though - games built for DirectX 9 would not only fail to run, they'd be disallowed for users to even install. Any app not using DirectX 12 would obviously need to be rewritten before anyone could install it.

Some dependencies have been patched. For example, "official" version of gason is not compatible with tagged pointers (a newer technique used for security.) It hasn't been updated in a bit. The version in our tree is patched to fix this.

Some dependencies do use system versions, if available, though - zlib, zstd, snappy, etc. It'd be nice if we could just use external dependencies across all platforms in a way that just works. That's not the real world, though.

-[Unknown]

werdahias commented 1 year ago

ok, thanks for the info. fwiw I'll continue to work on ppsspp to build it without any external libraries. This will require 10+ new libraries on the debian side.

werdahias commented 1 year ago

Regarding jpeg-compressor: On its own it compiles into a binary. This binary is needed during compiletime I assume ?

hrydgard commented 1 year ago

we have no need for a jpeg compressor binary, just a (static) library to do compression from the app.

werdahias commented 1 year ago

ok, thanks