Not possible to run from build directory
9p6 opened this issue · comments
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
- Skyscraper version: 3.9.2
- Ubuntu 22.04
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.
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?
Ah, now I understand your inquiry. That makes sense to me and is useful in general. Should be doable.
You may check the main/HEAD. Adjust PREFIX
in skyscraper.pro
to your needs.
Closing bc. of inactivity
Is it possible to adjust the PREFIX
in the skyscraper.pro
when running the configure command instead? Like PREFIX=something qmake
?