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

Fixes to compile examples on Unix #23

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

michaliskambi
Copy link

I was testing PasVulkan on Unix (more precisely, I used now Ubuntu 21.10 with NVIDIA GeForce GTX 660).

This PR contains fixes such that sequence

./compileprojectmanager
./projectmanager compileassets examples
./projectmanager build examples
./projectmanager run examples

really works out-of-the-box.

Most importantly, the compileshaders script was missing for Unix. I see that for Windows, you have a BAT that calls other BATs in subdirectrories, and these BATs in subdirectrories seem to be just adjusted copies of the same code.

For Unix, I made projects/examples/src/assets/shaders/compileshaders as a single script with bash function, so it will require less maintenance -- no need to list all vert/frag files, you just need to keep up-to-date the list of calls like compile_dir textoverlay for each subdirectory that contains some shader files.

Here are 2 screenshots with example happily working on my system :)

Zrzut ekranu z 2022-03-08 11-44-48
Zrzut ekranu z 2022-03-08 11-44-43

@michaliskambi
Copy link
Author

Hi,

I tested latest version of pasvulkan, and updated this PR. The fixes I propose here still seem relevant to make the flow

./compileprojectmanager
./projectmanager compileassets examples
./projectmanager build examples
./projectmanager run examples

work on Linux.

P.S. Some things I noticed, but didn't address in this PR:

  • I would suggest to change all existing bash scripts in repo to follow "strict bash mode" described on http://redsymbol.net/articles/unofficial-bash-strict-mode/ , or at least add set -eu to them. By default bash scripts just ignore errors in subprocesses, and continue, making it harder to notice problems / debug (because you will see "Successful!" even when actually some things failed).

  • projects/examples/src/android/local.properties is part of the repo, but it is overwritten by PasVulkan project manager. The file contains explicit recommendation "This file must NOT be checked into Version Control Systems,".

    I would suggest to remove it from repo.

    Or document in the file header why it is necessary to be kept in the repo, and point users to ability to use git update-index --assume-unchanged ... to ignore future changes.

  • projects/examples/src/examples.dpr

    Similar to above. This file is automatically changed by project manager.

    I would suggest to

    • remove it from repo (more preferred) or
    • document in the file header why it is necessary to be kept in the repo, and point users to ability to use git update-index --assume-unchanged ....

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

1 participant