Secretchronicles / TSC

An open source two-dimensional platform game.
https://secretchronicles.org/
GNU General Public License v3.0
204 stars 50 forks source link

Macintosh version of TSC #691

Closed iMacker2020 closed 3 years ago

iMacker2020 commented 3 years ago

Hi, I just finished porting 'The Secret Chronicles of Dr. M' to Mac OS X. Here is the link: http://www.mediafire.com/file/ai6jvq7xmmjf8ey/The_Secret_Chroncles_beta_1.zip/file

I would like to see this program available on the game's download page. Please let me know if there is anything else I need to do.

Thank you.

iMacker2020 commented 3 years ago

That .in file isn't a C header file. I think the file you need is located here: cegui-0.8.7/cegui/include/CEGUI/CEGUI.h

On Nov 21, 2020, at 8:35 PM, Lauri Ojansivu notifications@github.com wrote:

Well, first it complained that CEGUI.h, Audio.h and maybe some others were missing, so I moved those:

mv CEGUI.h.in CEGUI.h So maybe that messed up it. I'll try to configure again.

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

iMacker2020 commented 3 years ago

I made a new version of the loader. This is the program that launches tsc-main. The program is small and easy to follow. Please let me know if you need more help with building this game.

Loader.zip

xet7 commented 3 years ago

@iMacker2020

Thanks a lot for creating a new version of loader ! I'll try it.

iMacker2020 commented 3 years ago

Hi guys. Is there anything else I can do to help move along support for Mac OS?

Quintus commented 3 years ago

Am 31. Januar 2021 um 18:31 Uhr -0800 schrieb iMacker2020:

Hi guys. Is there anything else I can do to help move along support for Mac OS?

I don't think so at this moment -- we're waiting for xet7 to retry. I'm sure he'll do that, but you see, free-time constraints. Don't be disappointed -- we will integrate this surely, it just takes time.

Since I do not have a Mac, I cannot test your proposals and need to wait for xet7 to signal if things are okay. All I can do is look at the code and think about it. That I think I can do next weekend.

-quintus -- Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite Passau, Deutschland | kontakt@guelker.eu | O<

Quintus commented 3 years ago

@iMacker2020 I have included your changes into a new branch experimental-macos-support. Please take a look at the diff to devel and tell me if I have overlooked something important.

As you might have noticed, someone else recently contributed the removal of tinyclipboard in favour of sf::Clipboard (ticket #695). I have taken the liberty to rebase your changes on top of said removal. Could you please build the new experimental-macos-support branch and see if it compiles still with these changes applied? It should probably, but it's always good to test.

@xet7 could you also try building the experimental-macos-support branch with the instructions provided by @iMacker2020? Once I have your OK I think this can be merged.

Quintus commented 3 years ago

Link to the full diff: https://github.com/Secretchronicles/TSC/compare/devel...Secretchronicles:experimental-macos-support

iMacker2020 commented 3 years ago

On Feb 17, 2021, at 3:26 AM, Marvin Gülker notifications@github.com wrote:

@iMacker2020 I have included your changes into a new branch experimental-macos-support. Please take a look at the diff to devel and tell me if I have overlooked something important.

Thank you for this Mac support.

For the commit "Add explanatory comment to mRect() function", I think the comment should be formatted like this:

/*

iMacker2020 commented 3 years ago

On Feb 17, 2021, at 3:26 AM, Marvin Gülker notifications@github.com wrote:

@iMacker2020 I have included your changes into a new branch experimental-macos-support. Please take a look at the diff to devel and tell me if I have overlooked something important.

As you might have noticed, someone else recently contributed the removal of tinyclipboard in favour of sf::Clipboard (ticket #695). I have taken the liberty to rebase your changes on top of said removal. Could you please build the new experimental-macos-support branch and see if it compiles still with these changes applied? It should probably, but it's always good to test.

@xet7 could you also try building the experimental-macos-support branch with the instructions provided by @iMacker2020? Once I have your OK I think this can be merged.

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

I tried building this branch on Mac OS 10.8. I saw these errors related to the clipboard:

tsc/src/gui/generic.cpp:490:5: error: no member named 'Clipboard' in namespace 'sf'; did you mean 'CEGUI::Clipboard'? sf::Clipboard::setString(sel_text.c_str()); ^~~~~

tsc/src/gui/generic.cpp:490:20: error: no member named 'setString' in 'CEGUI::Clipboard' sf::Clipboard::setString(sel_text.c_str());



tsc/src/gui/generic.cpp:529:37: error: no member named 'Clipboard' in namespace 'sf'; did you mean 'CEGUI::Clipboard'?
        const sf::String cliptext = sf::Clipboard::getString();
                                    ^~~~~~~~~~~~~
                                    CEGUI::Clipboard

tsc/src/gui/generic.cpp:529:52: error: no member named 'getString' in 'CEGUI::Clipboard'
        const sf::String cliptext = sf::Clipboard::getString();
                                        ~~~~~~~~~~~^

tsc/src/gui/generic.cpp:553:52: error: no member named 'getString' in 'CEGUI::Clipboard'
        const sf::String cliptext = sf::Clipboard::getString();
                                        ~~~~~~~~~~~^
Quintus commented 3 years ago

Am 20. Februar 2021 um 21:53 Uhr -0800 schrieb iMacker2020:

I tried building this branch on Mac OS 10.8. I saw these errors related to the clipboard:

What version of SFML are you using? The clipboard has been added with version 2.5.0. Earlier versions will not work.

-quintus

-- Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite Passau, Deutschland | kontakt@guelker.eu | O<

iMacker2020 commented 3 years ago

On Feb 21, 2021, at 2:56 AM, Marvin Gülker notifications@github.com wrote:

Am 20. Februar 2021 um 21:53 Uhr -0800 schrieb iMacker2020:

I tried building this branch on Mac OS 10.8. I saw these errors related to the clipboard:

What version of SFML are you using? The clipboard has been added with version 2.5.0. Earlier versions will not work.

-quintus

-- Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite Passau, Deutschland | kontakt@guelker.eu | O< — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

I was using version 2.4.2. After upgrading to 2.5.1 I was able to compile all the game with your patches. Copy and paste support doesn't appear to work but that isn't a big deal to me. There is only one place in the game I could use it (the save's description field). I tried using command-v in the description field but not text was pasted. Other than that the patches should work.

Quintus commented 3 years ago

Am 21. Februar 2021 um 14:21 Uhr -0800 schrieb iMacker2020:

I was using version 2.4.2. After upgrading to 2.5.1 I was able to compile all the game with your patches.

Very nice. Thank you for testing.

Copy and paste support doesn't appear to work but that isn't a big deal to me. There is only one place in the game I could use it (the save's description field). I tried using command-v in the description field but not text was pasted.

Actually the game has not that many places where one can really use copy&paste. The most notable place is the level scripting editor. I could imagine that key bindings are not set up everywhere for MacOS and hardwired to CTRL+C, CTRL+V, though.

Other than that the patches should work.

Good. Do we need to ship anything else beside the source code changes? Cmake should be able to generate build project files for whatever is used on MacOS (XCode, I think?) so I think more is not required technically. Is that correct?

-quintus

-- Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite Passau, Deutschland | kontakt@guelker.eu | O<

iMacker2020 commented 3 years ago

On Feb 22, 2021, at 1:46 AM, Marvin Gülker notifications@github.com wrote:

Other than that the patches should work.

Good. Do we need to ship anything else beside the source code changes? Cmake should be able to generate build project files for whatever is used on MacOS (XCode, I think?) so I think more is not required technically. Is that correct?

-quintus

There are all the library files that the game depends on. These include SFML and CEGUI libraries.

The easy thing to do is to copy these files into the application bundle rather than remake them every time.

Quintus commented 3 years ago

Am 22. Februar 2021 um 03:18 Uhr -0800 schrieb iMacker2020:

There are all the library files that the game depends on. These include SFML and CEGUI libraries.

The easy thing to do is to copy these files into the application bundle rather than remake them every time.

I fear we cannot include all of TSC's dependencies recursively into the Git repository just for a single operating system, especially not in a precompiled form, which would burst the already large repository size even larger. I neither want to add Git submodules just for this one operating system.

We also cannot just provide a blob of precompiled binaries or even source files for download on the web site, because that would nail us to the specific versions of the libraries used. There needs to be an automated way to create such a download, because otherwise it will certainly get out of date every time a new version of TSC is relased.

If such bundling is the preferred way to ship applications on MacOS, then I think the best option is to add a MacOS-specific CMakeFile to TSC's repository, which gets include()d in the main CMakeLists.txt only for MacOS and if a compilation option is provided. That MacOS-specific CMakeFile would contain lots of ExternalProject_Add() calls along with any required additional steps to build the TSC binary and MacOS bundle. Such file would probably best be added to the tsc/extras/ directory. I think a compilation option is necessary, because unless a confident MacOS developer joins the team, the file will effectively be unmaintained and is only provided for the user's personal amusement. The option can be documented in INSTALL.md.

This however is not something I see as required to merge the `experimental-macos-support' branch. The code changes stand for themselves and for now it is on the user to provide the dependencies. If someone later provides the aforementioned CMakeFile, we can include that one into the repository.

I will merge that branch now.

Thank you for your contribution.

-quintus

-- Dipl.-Jur. M. Gülker | https://mg.guelker.eu | For security: Passau, Germany | kontakt@guelker.eu | () Avoid HTML e-mail European Union | PGP: see homepage | /\ http://asciiribbon.org

Quintus commented 3 years ago

With regard to the original question of providing a binary download for MacOS: I think this is @xet7's task as he is the only one of us with a Mac available. Once he manages to compile the game for MacOS he can upload the binary to secretchronicles.org.

-quintus

-- Dipl.-Jur. M. Gülker | https://mg.guelker.eu | For security: Passau, Germany | kontakt@guelker.eu | () Avoid HTML e-mail European Union | PGP: see homepage | /\ http://asciiribbon.org

iMacker2020 commented 3 years ago

On Feb 22, 2021, at 1:47 PM, Marvin Gülker notifications@github.com wrote:

With regard to the original question of providing a binary download for MacOS: I think this is @xet7's task as he is the only one of us with a Mac available. Once he manages to compile the game for MacOS he can upload the binary to secretchronicles.org.

-quintus

-- Dipl.-Jur. M. Gülker | https://mg.guelker.eu | For security: Passau, Germany | kontakt@guelker.eu | () Avoid HTML e-mail European Union | PGP: see homepage | /\ http://asciiribbon.org — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

Thank you.