Gemba / skyscraper

Powerful and versatile game data scraper written in Qt and C++.
https://gemba.github.io/skyscraper/
GNU General Public License v3.0
55 stars 14 forks source link

Not possible to run from build directory #18

Closed 9p6 closed 8 months ago

9p6 commented 10 months ago

Describe the bug It seems Skyscraper is unable to locate some of its support files when run from build directory.

To Reproduce Build Skyscraper binary and try running it from build directory:

qmake
make
./Skyscraper

Expected behavior Should work without installation like previous fork does

Terminal output

$ ./Skyscraper 
File not found 'peas.json'. Now quitting...

Technical information

Gemba commented 10 months ago

While it is true that this Skyscraper bails out when the config files are missing, but so do the previous forks:

Create State if Skyscraper has never been installed

mv  ~/.skyscraper ~/.skyscraper_backup
sudo mv /usr/local/etc/skyscraper /usr/local/etc/skyscraper_backup

Muldjord

$ mkdir sandbox && cd sandbox
$ git clone --depth 1 https://github.com/muldjord/skyscraper.git skyscraper_muldjord
$ cd skyscraper_muldjord
$ qmake && make -j$(nproc)
# ./Skyscraper alone shows help but is not usable for scraping:
$ ./Skyscraper -p psx
------------------------------------------
Running Skyscraper v3.7.7 by Lars Muldjord
------------------------------------------
Couldn't read artwork xml file 'artwork.xml'. Please check file and permissions. Now exiting...

$ cd ..

Detain fork

$ git clone --depth 1 https://github.com/detain/skyscraper.git skyscraper_detain
$ cd skyscraper_detain
$ qmake && make -j$(nproc)
# ./Skyscraper alone shows help but is not usable for scraping:
$ ./Skyscraper -p psx
------------------------------------------
Running Skyscraper v3.7.7 by Lars Muldjord
------------------------------------------
Please set a valid platform with '-p [platform]'
Check '--help' for a list of supported platforms.

$ cd ..

TL;DR

You must run make install at least once at either fork.

9p6 commented 10 months ago

Yes you're right about the previous fork. But original 3.7.7 muldjord's version can be made to work simply by copying artwork.xml to ~/.skyscraper.

The problem with make install is that /usr/local path is hardcoded and not everyone wants or can install there. Maybe you could make it configurable?

Gemba commented 10 months ago

Ah, now I understand your inquiry. That makes sense to me and is useful in general. Should be doable.

Gemba commented 10 months ago

You may check the main/HEAD. Adjust PREFIX in skyscraper.pro to your needs.

Gemba commented 8 months ago

Closing bc. of inactivity

Newchair2644 commented 8 months ago

Is it possible to adjust the PREFIX in the skyscraper.pro when running the configure command instead? Like PREFIX=something qmake?