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

Zig 12 Support #38

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

Zig 12 Support #38

wants to merge 4 commits into from

Conversation

lassade
Copy link

@lassade lassade commented Dec 18, 2023

Follow up of PR #36 tested with zig 0.12.0-dev.1746+19af8aac8

Here is @desttinghim, I did fixed the sign step, I was runing before the zipalign but now everything is runing in the order they supose to (you can check useing --summary all)

Edit: I only fixed the egl sample
Edit2: Had to add bindings for OpenSLES because of many dependencies loop in the translate-c sample

@hammerfunctor
Copy link

Three other examples fixed here. Feel free to add that into this pr.

@lassade
Copy link
Author

lassade commented Jan 6, 2024

can we still publish a apk in the Play Store?

@nacho00112
Copy link

can we still publish a apk in the Play Store?

It seems that you need to build an aab file instead, this would be a good addition to the repository.
Alternatively I don't know if you can make an aab from an apk. The contrary in theory should be possible because the /data/app android directory where you can get the apks of your installed apps or otherwise it wouldn't make sense for me.
But anyway before publishing you would probably want to get a more decent ecosystem in the app, like SDL or something

@lassade
Copy link
Author

lassade commented Jan 17, 2024

Yeah I acctually wrote a new build system that creates an aab, the process is very simmilar but with some extra steps and required downloads (they arent inlcuded in the sdk or buildtools for some reason)

@kpence
Copy link

kpence commented Jan 21, 2024

This PR claims to give this project support for Zig 12, however, you cannot build this with even zig 11, because as of zig 11, std.build and std.build.Builder have been combined into std.Build, and there is no std.build.

How are you compiling this, are you using an older version of zig's std?

@kpence
Copy link

kpence commented Jan 22, 2024

I wrote some changes to get it to build for me. The only thing I have left is to get it to strip the binaries for .ReleaseSmall. I don't know yet how to do that.

@lassade
Copy link
Author

lassade commented Jan 23, 2024

How are you compiling this, are you using an older version of zig's std?

I'm using 0.12.0-dev.1746+19af8aac8 as far I know zig .11 wont work because the build system changed on .12

@hammerfunctor
Copy link

This PR claims to give this project support for Zig 12, however, you cannot build this with even zig 11, because as of zig 11, std.build and std.build.Builder have been combined into std.Build, and there is no std.build.

The removal of std.build happens somewhere between 0.12.0-dev.1879 and 0.12.0-dev.2063.

@kpence
Copy link

kpence commented Jan 24, 2024

This PR claims to give this project support for Zig 12, however, you cannot build this with even zig 11, because as of zig 11, std.build and std.build.Builder have been combined into std.Build, and there is no std.build.

The removal of std.build happens somewhere between 0.12.0-dev.1879 and 0.12.0-dev.2063.

But in the change notes for 0.11.0, they list:

std.build and std.build.Builder combined into std.Build

https://ziglang.org/download/0.11.0/release-notes.html#Rename-Types-and-Functions

@hammerfunctor
Copy link

@kpence
Copy link

kpence commented Jan 25, 2024

Ok, my problem was that the version of std that I got from here:

https://ziglang.org/download/0.11.0/zig-0.11.0.tar.xz

does not contain the same code for std as that snapshot.

It seems that this was added in after 0.11.0. That was my misunderstanding

@kassane
Copy link

kassane commented Jan 27, 2024

Deprecated doesn't imply removed immediately https://github.com/ziglang/zig/blob/e19219fa0e0a563dfda4a5f00737e0aadd7ca44e/lib/std/std.zig#L198

build alias has removed. see: ziglang/zig@142471f#diff-79f63a2ce591380c4ec317daf5a0566972135f67b1b39c7173ddbe765d5446a0

Suggestion (based on andrewrk nasm fork):

const build_rename = std.SemanticVersion.parse("0.12.0-dev.1377+3fc6fc681") catch unreachable;
const Build = if (builtin.zig_version.order(build_rename).compare(.lt)) std.build else std.Build;

pub fn build(b: *Build) void { ... }

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.

6 participants