Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

games-emulation/ppsspp-libretro needs to install assets directory. #106

Open
crocket opened this issue Mar 25, 2018 · 11 comments
Open

games-emulation/ppsspp-libretro needs to install assets directory. #106

crocket opened this issue Mar 25, 2018 · 11 comments

Comments

@crocket
Copy link
Contributor

crocket commented Mar 25, 2018

The details are on libretro-mirrors/ppsspp#65

I think it makes sense to copy assets directory into /usr/share/ppsspp-libretro and tell users to copy it as /path/to/RetroArch-system-directory/PPSSPP

http://docs.libretro.com/library/ppsspp/#bios contains instructions.

Because some users might miss installation message, it will make sense to find a way to tell users about it in other places.

@stefan-gr
Copy link
Owner

That's what games-emulation/psp-assets does. I can't do much else apart from using ewarn to notify users of this.

@crocket
Copy link
Contributor Author

crocket commented Mar 25, 2018

You're right. However, I think psp-assets should be assimilated into ppsspp-libretro because ppsspp and assets are one bundle. Version difference between ppsspp and psp-assets can cause problems.

Another disadvantage of psp-assets is that I didn't know psp-assets were for ppsspp-libretro when it warned me to copy PPSSPP folder into system directory.

Also, I think it should warn users on every install because I didn't know what system_directory was on first install.

@stefan-gr
Copy link
Owner

There are two psp libretro implementations, that's why I opted to use a separate ebuild because they use the same assets folder. They are psp1-libretro and ppsspp-libretro.The former seems to be abandoned nowadays so I don't mind dropping it altogether and merging psp-assets into ppsspp-libretro.

Version difference between ppsspp and psp-assets can cause problems.

ppsspp seems to be kind of special in that they don't care about XDG spec so we have the situation that the PPSSPP directory is also used for savegames and probably other transient files that we have no control over, making version control a pain in the behind.

The best we could do is symlinking every single file manually instead of copying the folder to make sure at least some files are up-to-date without the user having to manually copying them again and again.

@stefan-gr
Copy link
Owner

stefan-gr commented Mar 26, 2018

I just did this blind, as usual. I hope everything still works after this.
psp-assets and psp1-libretro are now keyworded to force people to unmerge them before proceeding to update ppsspp-libretro.
The instructions for assets are now printed every time ppsspp-libretro gets merged. This time they are symlinked to make sure they are always up-to-date.

I did NOT test if ppsspp works with read-only symlinks.
Also, the built-in asset downloader will probably not work with symlinks.

@crocket
Copy link
Contributor Author

crocket commented Mar 26, 2018

$ time sudo emerge -quDN retroarch
...
...
 * Messages for package games-emulation/ppsspp-libretro-1.0_pre20180317-r1:

 * This package will overwrite one or more files that may belong to other
 * packages (see list below).
 *
 * Detected file collision(s):
 *
 *      /usr/share/libretro/PPSSPP/unknown.png
 *      /usr/share/libretro/PPSSPP/ui_atlas.zim
 *      /usr/share/libretro/PPSSPP/ppge_atlas.zim
 *      /usr/share/libretro/PPSSPP/langregion.ini
 *      /usr/share/libretro/PPSSPP/compat.ini
 *      /usr/share/libretro/PPSSPP/shaders/vignette.fsh
 *      /usr/share/libretro/PPSSPP/shaders/upscale_spline36.vsh
 *      /usr/share/libretro/PPSSPP/shaders/upscale_spline36.fsh
 *      /usr/share/libretro/PPSSPP/shaders/sharpen.fsh
 *      /usr/share/libretro/PPSSPP/shaders/scanlines.fsh
 *      /usr/share/libretro/PPSSPP/shaders/natural.vsh
 *      /usr/share/libretro/PPSSPP/shaders/natural.fsh
 *      /usr/share/libretro/PPSSPP/shaders/inversecolors.fsh
 *      /usr/share/libretro/PPSSPP/shaders/grayscale.fsh
 *      /usr/share/libretro/PPSSPP/shaders/fxaa.vsh
 *      /usr/share/libretro/PPSSPP/shaders/fxaa.fsh
 *      /usr/share/libretro/PPSSPP/shaders/defaultshaders.ini
 *      /usr/share/libretro/PPSSPP/shaders/crt.fsh
 *      /usr/share/libretro/PPSSPP/shaders/cartoon.vsh
 *      /usr/share/libretro/PPSSPP/shaders/cartoon.fsh
 *      /usr/share/libretro/PPSSPP/shaders/bloom.fsh
 *      /usr/share/libretro/PPSSPP/shaders/aacolor.vsh
 *      /usr/share/libretro/PPSSPP/shaders/aacolor.fsh
 *      /usr/share/libretro/PPSSPP/shaders/5xBR.vsh
 *      /usr/share/libretro/PPSSPP/shaders/5xBR.fsh
 *      /usr/share/libretro/PPSSPP/shaders/4xhqglsl.vsh
 *      /usr/share/libretro/PPSSPP/shaders/4xhqglsl.fsh
 *      /usr/share/libretro/PPSSPP/flash0/font/jpn0.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn9.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn8.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn7.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn6.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn5.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn4.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn3.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn2.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn15.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn14.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn13.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn12.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn11.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn10.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn1.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/ltn0.pgf
 *      /usr/share/libretro/PPSSPP/flash0/font/kr0.pgf
 *
 * Searching all installed packages for file collisions...
 *
 * Press Ctrl-C to Stop
 *
 * games-emulation/psp-assets-1.2.1-r1:0::abendbrot
 *      /usr/share/libretro/PPSSPP/compat.ini
 *      /usr/share/libretro/PPSSPP/langregion.ini
 *      /usr/share/libretro/PPSSPP/ppge_atlas.zim
 *      /usr/share/libretro/PPSSPP/shaders/cartoon.fsh
 *      /usr/share/libretro/PPSSPP/shaders/cartoon.vsh
 *      /usr/share/libretro/PPSSPP/shaders/crt.fsh
 *      /usr/share/libretro/PPSSPP/shaders/defaultshaders.ini
 *      /usr/share/libretro/PPSSPP/shaders/fxaa.fsh
 *      /usr/share/libretro/PPSSPP/shaders/fxaa.vsh
 *      /usr/share/libretro/PPSSPP/shaders/grayscale.fsh
 *      /usr/share/libretro/PPSSPP/shaders/inversecolors.fsh
 *      /usr/share/libretro/PPSSPP/shaders/natural.fsh
 *      /usr/share/libretro/PPSSPP/shaders/natural.vsh
 *      /usr/share/libretro/PPSSPP/shaders/scanlines.fsh
 *      /usr/share/libretro/PPSSPP/shaders/sharpen.fsh
 *      /usr/share/libretro/PPSSPP/shaders/upscale_spline36.fsh
 *      /usr/share/libretro/PPSSPP/shaders/upscale_spline36.vsh
 *      /usr/share/libretro/PPSSPP/shaders/vignette.fsh
 *      /usr/share/libretro/PPSSPP/ui_atlas.zim
 *      /usr/share/libretro/PPSSPP/unknown.png
 *
 * Package 'games-emulation/ppsspp-libretro-1.0_pre20180317-r1' NOT
 * merged due to file collisions. If necessary, refer to your elog
 * messages for the whole content of the above message.

real    3m33.571s
user    10m57.055s
sys     0m50.437s
$ time sudo emerge --depclean

 * Always study the list of packages to be cleaned for any obvious
 * mistakes. Packages that are part of the world set will always
 * be kept.  They can be manually added to this set with
 * `emerge --noreplace <atom>`.  Packages that are listed in
 * package.provided (see portage(5)) will be removed by
 * depclean, even if they are part of the world set.
 *
 * As a safety measure, depclean will not remove any packages
 * unless *all* required dependencies have been resolved.  As a
 * consequence of this, it often becomes necessary to run
 * `emerge --update --newuse --deep @world` prior to depclean.

Calculating dependencies \ * ERROR: games-emulation/psp-assets-1.2.1-r1::abendbrot failed (depend phase):
 *   LIBRETRO_COMMIT_SHA must be set before inherit.
 *
 * Call stack:
 *                    ebuild.sh, line 620:  Called source '/var/lib/layman/abendbrot/games-emulation/psp-assets/psp-assets-1.2.1-r1.ebuild'
 *   psp-assets-1.2.1-r1.ebuild, line   6:  Called inherit 'libretro' 'cmake-utils'
 *                    ebuild.sh, line 316:  Called __qa_source '/var/lib/layman/abendbrot/eclass/libretro.eclass'
 *                    ebuild.sh, line 111:  Called source '/var/lib/layman/abendbrot/eclass/libretro.eclass'
 *              libretro.eclass, line  45:  Called die
 * The specific snippet of code:
 *      [ ${LIBRETRO_COMMIT_SHA} = die ] && die "LIBRETRO_COMMIT_SHA must be set before inherit."
 *
 * If you need support, post the output of `emerge --info '=games-emulation/psp-assets-1.2.1-r1::abendbrot'`,
 * the complete build log and the output of `emerge -pqv '=games-emulation/psp-assets-1.2.1-r1::abendbrot'`.
 * Working directory: '/usr/lib64/python3.5/site-packages'
 * S: '/var/tmp/portage/games-emulation/psp-assets-1.2.1-r1/work/psp-assets-1.2.1'
... done!

@stefan-gr
Copy link
Owner

Sorry, I forgot that portage needs working ebuilds to remove them.

@crocket
Copy link
Contributor Author

crocket commented Mar 26, 2018

emerge --depclean didn't work, but emerge --unmerge psp-assets worked without synchronizing with your overlay.

The workarounds are fragile. It's better to fix issues that require the workarounds.

@crocket
Copy link
Contributor Author

crocket commented Mar 26, 2018

I think ppsspp-libretro's instruction is outdated. ppsspp-libretro saves games in PSP folder in the folder that contains game ISO files. Thus, the folder structure looks like

/path/to/psp-games/PSP/
/path/to/psp-games/game1.iso
/path/to/psp-games/game2.iso

The command for making the symlink should be

ln -s /usr/share/libretro/PPSSPP /path/to/RetroArch-system-directory/

@stefan-gr
Copy link
Owner

The workarounds are fragile. It's better to fix issues that require the workarounds.

That wouldn't happen in the first place if I had a machine capable of testing this.

I added a blocker that should help portage in deciding to uninstall psp-assets itself. Just remember to always run emerge -uDN world before a depclean.

I think ppsspp-libretro's instruction is outdated. ppsspp-libretro saves games in PSP folder in the folder that contains game ISO files.

Good to hear. I adjusted the message accordingly.

@crocket
Copy link
Contributor Author

crocket commented Mar 26, 2018

If you moved the location of PPSSPP in ppsspp-libretro, there would be no collision with psp-assets.

@stefan-gr
Copy link
Owner

If you moved the location of PPSSPP in ppsspp-libretro, there would be no collision with psp-assets.

People that previously symlinked the assets themselves would have a not working installation. At the current state, if my changes are correct, users that just do a emerge -uDN world would not notice the change since everything should be taken care of by portage, provided that games-emulation/psp-assets is not in the world file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants