muldjord / skyscraper

Powerful and versatile game scraper written in c++
GNU General Public License v3.0
489 stars 128 forks source link

Numerous issues on Mac OS 11.2+ #301

Open trvrplk opened 3 years ago

trvrplk commented 3 years ago

I'm not really sure how exactly one would fix this, but when you try to run Skyscraper on Mac OS right now there are a number of issues. The first was a problem with Qt I solved by moving the path to Qt5 I installed through Homebrew to be first in $PATH. After I did that, though, I needed to reinstall Skyscraper, but found the build kept failing.

After much research, I found making a few changes in the Makefile the update script generates fixed the issue. I first changed the compiler to GCC and G++ (installed with Homebrew) rather than Xcode and renamed VERSION to VERSION.txt (the latter tip I found after a crazy amount of Googling), and then ran make --ignore-errors clean, make -j$(nproc) || handle_error "build", and sudo make install || handle_error "install", and it worked fine.

This is all a pain in the ass to do and I don't expect any changes to be made to the script to account for these issues, but I figured it was worth opening an issue so it could at least be noted in the documentation.

muldjord commented 3 years ago

Hi, thank you for the report. But without bullet-point, detailed description of the changes, it's hard for me to document. I don't own a Mac, so basically I would just be copying whatever users tell me to. Not exactly an optimal scenario.

I will add a note about potential issues and link to this issue ticket. Hopefully that will at least point Mac users in the right direction.

trvrplk commented 3 years ago

That's pretty much what I was asking for, just so anyone having problems has somewhere to turn

muzll0dr commented 3 years ago

This worked for me for a fresh install on Big Sur, thanks to @trvrplk!! The only thing I didn't have to deal with was the Qt5 issue, since that was already working for me. (Have homebrew already installed, etc.)

Here's the exact steps I took: (This is basically what @trvrplk was saying, but a little more verbose on the file changes since I wasn't entirely sure what a couple steps were wanting.)

trvrplk commented 3 years ago

yes, thanks for actually writing it down! I took hours trying to figure out what was wrong with Qt so by the time i fixed the makefile I was too exhausted to copy the actual commands

Samington33 commented 2 years ago

Hello, I followed the above instructions, and things seemed to go okay — no obvious error messages. But there doesn't seem to be a .skyscraper folder present.

I'm actually attempting to install into a different folder, ~/retro gaming stuff/tools. Is that a bad idea?

I attempted to find the folder by selecting "Go > Go to Folder" and typing "~/Retro Gaming Stuff/Tools/.skyscraper".

The "skysource" folder is present in this directory.

I'd like to access this in order to change settings within "skyscraper.ini.

Does anyone have any suggestions?

Really appreciate any help offered.

Samington33 commented 2 years ago

Okay so I found the folder, it was in my route directory.

However, the config.ini isn't present. Is there something I could be doing wrong?

Samington33 commented 2 years ago

So got it figured out. Basically, after I ran Skyscraper for the first time, it generated all the necessary files.

Clowser323 commented 2 years ago
* edit Makefile

Hi, can I ask you where is this makefile? If I search for "makefile" in the folder I don't get any results. I am very sorry if this is basic knowledge but I am not well versed in this kind of things (I created this account just for this question).

Samington33 commented 2 years ago

Hi, it should be in the “Skysource” folder.

Sent from my iPhone

On 8 May 2022, at 23:09, Clowser323 @.***> wrote:



  • edit Makefile Hi, can I ask you where is this makefile? If I search for "makefile" in the folder I don't get any results. I am very sorry if this is basic knowledge but I am not well versed in this kind of things (I created this account just for this question).

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

Clowser323 commented 2 years ago
image

this is what it's in my Skysource folder just cloned from the repo.

Samington33 commented 2 years ago

Hmm … just wondering, have you tried running “update_skyscraper.sh?

It’ll most likely fail to actually install until the above stated workarounds are followed, but should ensure that everything, including “Makefile”, is downloaded.

To be honest, I’m a bit new to this as well, learning as I go.

Sent from my iPhone

On 9 May 2022, at 08:05, Clowser323 @.***> wrote:



this is what it's in my Skysource folder just cloned from the repo.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

Clowser323 commented 2 years ago

Yes, I ran it. The problem is that while running the script I get this error --- Building Skyscraper v.3.7.5 --- make: *** No targets specified and no makefile found. Stop. --- Failed to build Skyscraper v.3.7.5, exiting with code 2 ---

Which is what leads me to think the makefile is missing for some reason.

Zorias23 commented 2 years ago

Ok I struggled with this crap for hours too. If you're using a mac, i can tell you easily how to get this damn thing to work. Change 2 lines in the makefile, someone before me mentioned what they are. In the directory, rename VERSION to VERSION.txt, i modified the update.sh file to the follow and it worked:

!/bin/bash

{ LATEST=wget -q -O - "https://api.github.com/repos/muldjord/skyscraper/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'

if [ ! -f VERSION ]
then
echo "VERSION=0.0.0" > VERSION
fi
source VERSION

handle_error () {
local EXITCODE=$?
local ACTION=$1
rm --force VERSION
echo "--- Failed to $ACTION Skyscraper v.${LATEST}, exiting with code $EXITCODE ---"
exit $EXITCODE
}

## then
#echo "--- Fetching Skyscraper v.$LATEST ---"
#wget -N https://github.com/muldjord/skyscraper/archive/${LATEST}.tar.gz || handle_error "fetch"
echo "--- Unpacking ---"
tar xf skyscraper-3.7.5.tar.gz || handle_error "unpack"
#rm ${LATEST}.tar.gz
echo "--- Cleaning out old build if one exists ---"
mv VERSION VERSION.txt
make --ignore-errors clean
#rm --force .qmake.stash
#qmake || handle_error "clean old"
echo "--- Building Skyscraper v.$LATEST ---"
make -j$(nproc) || handle_error "build"
echo "--- Installing Skyscraper v.$LATEST ---"
sudo make install || handle_error "install"
echo "--- Skyscraper has been updated to v.$LATEST ---"

else

 #echo "--- Skyscraper is already the latest version, exiting ---"
#echo "You can force a reinstall by removing the VERSION file by running rm VERSION. Then rerun ./update_skyscraper.sh afterwards."
#fi
echo "You are done!!"
exit

}

run that sh file and you should be good!

notoast76 commented 2 years ago

Hi, I've followed all instructions, and I don't seem to have a makefile. Running the update script doesn't seem to create so I'm a bit lost. Does anyone know how to generate this file?

fallwith commented 2 years ago

Hi all,

With macOS, I ran into all of the issues detailed here. Thanks for all of the great advice on workarounds. I put together a new version of the update script that aims to fix all of the problems for macOS without breaking anything under Linux.

I've submitted PR #349 which explains the root cause of all issues and what was done to fix them.

In the meantime, if I simply change the README instructions to use my fork, everything works for me. Here is the complete list of steps I followed (NOTE the use of my "fallwith" fork in the url given to wget).

$ brew install wget
$ brew install qt5
$ brew link qt5 --force
$ mkdir skysource
$ cd skysource
$ wget -q -O - https://raw.githubusercontent.com/fallwith/skyscraper/make_update_script_work_on_mac/update_skyscraper.sh | bash
notoast76 commented 2 years ago

Hi all,

With macOS, I ran into all of the issues detailed here. Thanks for all of the great advice on workarounds. I put together a new version of the update script that aims to fix all of the problems for macOS without breaking anything under Linux.

I've submitted PR #349 which explains the root cause of all issues and what was done to fix them.

In the meantime, if I simply change the README instructions to use my fork, everything works for me. Here is the complete list of steps I followed (NOTE the use of my "fallwith" fork in the url given to wget).

$ brew install wget
$ brew install qt5
$ brew link qt5 --force
$ mkdir skysource
$ cd skysource
$ wget -q -O - https://raw.githubusercontent.com/fallwith/skyscraper/make_update_script_work_on_mac/update_skyscraper.sh | bash

Thank you so much! This worked flawlessly!

aptonline commented 2 years ago

Hi all, With macOS, I ran into all of the issues detailed here. Thanks for all of the great advice on workarounds. I put together a new version of the update script that aims to fix all of the problems for macOS without breaking anything under Linux. I've submitted PR #349 which explains the root cause of all issues and what was done to fix them. In the meantime, if I simply change the README instructions to use my fork, everything works for me. Here is the complete list of steps I followed (NOTE the use of my "fallwith" fork in the url given to wget).

$ brew install wget
$ brew install qt5
$ brew link qt5 --force
$ mkdir skysource
$ cd skysource
$ wget -q -O - https://raw.githubusercontent.com/fallwith/skyscraper/make_update_script_work_on_mac/update_skyscraper.sh | bash

Thank you so much! This worked flawlessly!

This compiles perfectly fine using the above but for some reason doesn't run when launch (no app windows). Running Monterey 12.6 on Apple Silicon.

aptonline commented 2 years ago

Hi @fallwith would you be able to provide a compiled version for Mac so I can test on my M1? Still having issues compiling it.

jeantichoc commented 1 year ago

Hi everyone, thank you for the workarounds ! I made an update_skyscraper_macos.sh with all the workarounds. https://github.com/jean-potato/skyscraper/blob/master/update_skyscraper_macos.sh

I didn't made a pull request to add it as the owner ask to not do that

emilianos commented 12 months ago

this didnt work for me, what os are you on ? how can i troubleshoot? I dont get any error, actually it just doesnt recognize any game.. (btw, I tried it in another linux system and it worked)

Gemba commented 10 months ago

I made an update_skyscraper_macos.sh with all the workarounds.

@jeantichoc does it work? On which MacOS config has it been tested?

Feel free to file a PR in my fork (the official maintained fork after muldjord discontinued Skyscraper).

jeantichoc commented 10 months ago

I made an update_skyscraper_macos.sh with all the workarounds.

@jeantichoc does it work? On which MacOS config has it been tested?

Feel free to file a PR in my fork (the official maintained fork after muldjord discontinued Skyscraper).

It doesn't work anymore with the latest MacOS version, I'll try to see with you fork and try to fix it.

jeantichoc commented 10 months ago

I made an update_skyscraper_macos.sh with all the workarounds.

@jeantichoc does it work? On which MacOS config has it been tested?

Feel free to file a PR in my fork (the official maintained fork after muldjord discontinued Skyscraper).

OK, it works now, I made a PR here https://github.com/Gemba/skyscraper/pull/15 It took me 1 hour to figure out that I had to re-execute brew link qt@5 --force 🥲 (I know nothing about C++ / QT compilation)