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

Fix the build instructions #1616

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

hexagonrecursion
Copy link
Contributor

@hexagonrecursion hexagonrecursion commented Nov 12, 2023

I have managed to compile the game, despite incorrect build instructions and other difficulties.

  1. This three lines assume we are inside <colobot_repository>/build/ but we never changed into it:
cmake ../
make
colobot -datadir ../data
  1. There was no <colobot_repository>/build/bin/ directory. The executable was in <colobot_repository>/build/

Edit: building the game and getting it to run required a lot of trial-and-error (especially the dev branch). I added more complete build instructions to reduce the trial-and-error for future contributors.

Design philosophy:

Note: the instructions are missing a step: the installation of dependencies. I do not intend to add this step in this pull request.

@hexagonrecursion hexagonrecursion marked this pull request as draft November 13, 2023 14:47
@hexagonrecursion hexagonrecursion marked this pull request as ready for review November 13, 2023 15:53
cd <colobot_repository>
git clone https://github.com/colobot/colobot.git
cd colobot
git switch master # or dev (see above)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd change comment to something like # if you intend to work with last release code.
The switch to dev branch being default branch was meant to make it easier to work on more up-to-date code and create pull request to this branch. Making everyone switch to master anyway defeats this purpose.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean switch this around? Like this?

git switch dev  # or master (see above)

Edit: I see no point in repeating what is said earlier in README-dev.md so I'm simply referencing it with "see above"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching it around doesn't make sense, because when you clone repository without any other flags you're already on dev. The point is to make it clear this line is optional.

Your comment might suggest that this is mandatory to switch to master branch before making any work, while in most cases it shouldn't be required. Unless you're package maintainer, or you want to fix some serious bug ASAP.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Then I'll just delete the line. The option of switching to master is already implied in "Branch setup".

cd colobot
git switch master # or dev (see above)
git submodule update --init
ln --symbolic ../src/graphics/opengl/shaders/ data/ # ON BRANCH dev RUN THIS INSTEAD: ln --symbolic ../colobot-base/graphics/opengl33/shaders/ data/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious about this line. When is it needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is needed if you want to be able to use any renderer other than gl14. On dev there is no gl14 so this line is always needed. Without this we get a blank black screen:

image

mkdir build
cmake ../
cd build
cmake -D TRANSLATIONS=OFF ../ # You can't compile translations unless you have python2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TRANSLATIONS=OFF should be removed once colobot/colobot-data#88 is merged AND both dev and master use the new data.

Update: colobot/colobot-data#88 has been merged, but git submodule has not been updated.

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

Successfully merging this pull request may close these issues.

None yet

2 participants