-
Notifications
You must be signed in to change notification settings - Fork 16
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
Mac Build In Releases Section #33
Comments
Possibly. I'm unfamiliar with the signing process and unsure if the brew libraries we link against require the system to have certain packages installed. If we can figure that out and add it to CI, I see no reason why not to. |
That sounds great. I just tried to follow the steps to build Riistudio for M1 Mac (I have an M1 Pro Macbook Pro), but when I ran this command:
Not sure what to do to fix this, as I'm not very knowledgable about CMake and C++! I'd really love to be able to use Riistudio natively on my Mac without having to use a Windows VM. |
I think it's not seeing |
yeah, when I run |
Perhaps it's being installed to a different directory? E.g. |
Yes this was the problem, I found the clang++ file in the llvm bin directory and changed the file pathway to this. If it helps anyone, on Apple Silicon, the pathway is: I ran the rest of the commands, and they all seemed to work. Having run all the commands where is the final build located? I can't seem to find it to run Riistudio and see if everything worked. |
It should be in the |
Here's what I have in my build folder, there is no `frontend` subdirectory so something must have gone wrong.
This might be the problem:
|
I just worked around that; pulling from upstream should do the trick. |
Just ran git pull and ran the cmake commands again, now there is this error:
|
Try pulling again--should be fixed. I bumped the project's |
Unfortunately I'm still getting the same error, the only difference is the version number of
|
Just tried running
|
|
Turns out I had some weird issue with |
Thanks! To be honest, I'm not sure. I've never really touched Mac packaging, and I don't know how that would interact with the current GitHub auto-updater. I'll leave this as an open issue to track that. |
Hi! I just wanted to ask how do i launch riistudio on mac?, i've installed it following the instructions, i had a few issues but i was able to complete the installation without errors, still i dont know how to launch it 🙈 |
Hi, you would open the executable in |
Hey, are you still planning on doing this? Unfortunately I know little about CMake, but I have built MacOS apps with Rust before so I do have some info that might be helpful that I'll just dump here: A MacOS In terms of the signing process, it seems like you need an Apple developer account to sign the app costing $100 a year (which is ridiculous ofc). Apple will add a quarantine flag to any app intalled which isn't signed meaning the app can't be opened, but the user can get around this by running |
I added a very hacky Rust wrapper for the RiiStudio app, which if adapted for MacOS should allow deployment with cargo-bundle itself. I'll look into this a bit more later--though I am not enthused about the $100/yr developer subscription. |
Oh cool. About the $100 a year thing, you could just not sign the apps then ask users to run the |
I've been trying to build Riistudio again, but am running into more issues (probably me not understanding how to do this properly!). I pulled the latest changes and ran
I'd really appreciate some help on fixing this, thanks! |
Is this on a Sonoma preview build? |
No I'm on the latest version of Ventura still |
Thanks for spotting that. I've fixed the build on clang-15 on Ventura, though have not validated clang-16 yet. |
unfortunately I'm still getting errors:
|
There seems to be an issue with the Apple |
thanks it worked! looks like a few of the tests failed though as you said |
I've added a MacOS build to the latest release (Apple Silicon). Note that it's neither signed nor compatible with the auto-updater. I'll see about integrating trust at some point to automatically publish MacOS builds when new git tags are created. |
I am not sure why those are being linked as dylibs when my rustc flags explicitly declare them staticically. println!("cargo:rustc-link-search=native={}", cargo_dir);
println!("cargo:rustc-link-lib=static=gctex");
println!("cargo:rustc-link-lib=dylib=llvm_sighandler");
println!("cargo:rustc-link-lib=static=avir_rs");
println!("cargo:rustc-link-lib=static=riistudio_rs");
println!("cargo:rustc-link-lib=static=szs");
println!("cargo:rustc-link-lib=static=c_wbz");
println!("cargo:rustc-link-lib=static=c_discord_rich_presence"); I'm also noticing that the brew deps are dylib references too. I'll see what I can do. It would certainly be my preference to ship a single static binary. |
That's weird... any progress on this? I noticed you removed the build from the latest release which makes sense haha. Until github releases Apple Silicon macos runners I'm assuming you'd have to add the build yourself which wouldn't be ideal |
The current build on tip should have shed most of these dependencies, although a few remain:
That is, for a published build to work at the moment, you'd need to have installed I'll update this issue if I solve that. |
Hiya, just tried to build Riistudio from source again and got a whole bunch of errors which all seem to centre around calls to the function
|
@riidefi Is there any progress on including macos In other news, trying to compile on Apple SIlicon gives a whole barrage of errors:
You should also probably update the |
I can try to set that up. Hopefully the 10x minute multiplier doesn't burn through too many credits lol
I saw this--hopefully should be pretty easy to make the .app standalone / ready for distribution.
Should be fixed now. |
ok just tried agian with your changes and it got so close but failed at the linking stage:
That |
Mhm that's because I edited
Yes! It's kind of bespoke and there are probably more standard libraries out there, though. Code here.
I added it to CI and it's building an ostensibly standalone .app file, although I have yet to verify on a system without those libraries installed. Let me know if that app file works in any case. |
Okay, thank you. That was pretty annoying to fix but I think the latest CI build should work, though needs xattr and chmod'ing--certainly not ideal. |
I tried doing differnet things recommended here, by default I do open the zip with the unarchiver (it says archive utility sometimes breaks things and I have experienced this before), but it could be something to do with how the file's being zipped as I know it's quite easy to break a macos app this way. It might be better to include the In terms of |
To be clear, I had to run |
Can confirm that when installing from .dmg, just |
Yeah, this worked for me! It seems like the |
Nice! Thanks for testing that. Yea I think you'd need to Not sure about the auto-updater. On Windows I rely on being able to rename a running executable--don't know if I can do that with a .app. Presumably command-line installing a DMG wouldn't be too much effort, though. |
I reckon it's still worth including it in the releases section, you could add a note at the bottom of each release with the CI I'm happy to look into MacOS auto updaters, in fact I'll have to do this soon anyway as I'm planning on adding this to my project. I'm happy to let you know when I find out how auto updaters should work on MacOS and whether you can rename running apps or if there's another way of doing it. |
@riidefi Ok, I've looked into implementing auto updaters, the rust crate self_update seems to have a nice implementation. In terms of replacing the file in-place, it relies on the crate self_replace. There is an explanation of how the replacement works cross-platform here. It actually seems like self replacement is a lot easier to implement on unix systems than windows! Here is their unix implementation. The one thing I'm not sure of is whether this works with |
Any chance of adding a Mac Intel and M1 Build to the releases section?
The text was updated successfully, but these errors were encountered: