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

How to distribute finished game to one directory with CI? #298

Open
saintech opened this issue Sep 25, 2019 · 4 comments
Open

How to distribute finished game to one directory with CI? #298

saintech opened this issue Sep 25, 2019 · 4 comments

Comments

@saintech
Copy link

Is there an easy way to automate copying shared libs to a binary location for all three platforms (win, osx, linux)? For example for Travis? The problem is that when i use cargo build --release, it puts shared libs in paths like build/tcod-sys-395905244d0762cd/out, and i don't know what commands i should use to create a release ZIP for all platforms.

@tomassedovic
Copy link
Owner

Sorry, I'm not sure :-(. There's OUT_DIR which is accessible in Cargo build scripts, but I don't know how to get one for a dependency (which is what you want here).

Here's what I used to do in my game when I was using tcod:

https://gitlab.com/tryjumping/dose-response/blob/911e420c13e63cf903f6ddfd5b0e31cfc2f8d82f/ci/before_deploy.sh#L23-29

It's not super pretty, but it worked. This was before any of the CIs (that I knew) had Windows, Linux and Mac support so I had a separate scripts for each platform.

Note that at least on Linux (and I'm pretty sure Mac too) just copying the DLL next to the binary does not work. You need to either set the right environment variables (e.g. LD_LIBRARY_PATH) or configure your binary to look in the right place.

@saintech
Copy link
Author

saintech commented Oct 2, 2019

This is very important information, because the task is very popular in home gamedev, but the information is impossible to find. Thank you, you really helped. I will try to finish my CI config.

Maybe some of this information should be added to the README/Wiki?

@tomassedovic
Copy link
Owner

Yeah absolutely. Would you be open to putting up a pull request at some point?

I'd prefer to have it in the readme (or a separate file linked from there if it's too big) -- that way it's always there if you clone the repo.

@saintech
Copy link
Author

saintech commented Oct 2, 2019

Yeah absolutely. Would you be open to putting up a pull request at some point?

Yeah, I'd like to, but not soon. I need to resolve this issue in my playground project first.

I'd prefer to have it in the readme (or a separate file linked from there if it's too big) -- that way it's always there if you clone the repo.

OK 👍

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

No branches or pull requests

2 participants