Replies: 54 comments 35 replies
-
Have you tried using environment variable SNIS_ASSET_DIR to make assets be read from someplace else? See the FILES section of man page for snis_client, for example:
|
Beta Was this translation helpful? Give feedback.
-
SNIS does need to write to disk for some things, mainly the little "database" it uses to keep track of a ship's state when jumping from one "solar system" (snis_server process) to another. |
Beta Was this translation helpful? Give feedback.
-
Hmm, yeah SNIS_ASSET_DIR won't help with that. TBH, if you can't compile the game yourself, you probably won't like it anyway, so not too keen on binary distributions anyway, just lets the horde of whiners in. |
Beta Was this translation helpful? Give feedback.
-
Just committed: a1b6cab Make snis_launcher put log files where you want them Try this:
I would not be too surprised if there are other files that it tries to write though. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much. export SNIS_LOG_DIR=/tmp/snis_log_dir I have been testing making an AppImage using WSL on windows. Now over to linux to give it a full test. WSL is not working with sound. I am not sure it would be accurate to say that those who can't compile it would not appreciate it. I am not hopeful on building a flatpak as I believe that all dependencies have to seamlessly download and compile also. And there seem to be a few dependencies. If I get a AppImage build working with github actions, I will let you know. |
Beta Was this translation helpful? Give feedback.
-
Alright, cool. |
Beta Was this translation helpful? Give feedback.
-
One more small update to this: 40f2d62 snis_launcher: guard against non-existent or unwritable SNIS_LOG_DIR |
Beta Was this translation helpful? Give feedback.
-
Thanks.
With all the dependencies I have had a time to make an appimage.
I have a build and instructions:
https://github.com/vpelss/Space-Nerds-In-Space-Appimage/releases/tag/Newest
I had to build on a newer ubuntu, so mileage may vary on different distros.
I tested on Zorn distro, as that is all I had handy.
I have asked an unreliable friend to test on one of their linux distros. So
I will see how it fairs there.
It might be more stable to try and build in a flatpak. Although I foresee a
lot of hiccups. We will see :)
Thanks again!
…On Wed, Dec 18, 2024 at 7:20 PM smcameron ***@***.***> wrote:
One more small update to this:
40f2d62
<40f2d62>
snis_launcher: guard against non-existent or unwritable SNIS_LOG_DIR
—
Reply to this email directly, view it on GitHub
<#362 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACMU44L3IWBJPNINLFYHN2D2GIGMVAVCNFSM6AAAAABT3DJUYGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNRRGE2TAMQ>
.
You are receiving this because you authored the thread.Message ID:
<smcameron/space-nerds-in-space/repo-discussions/362/comments/11611502@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Thanks. Mentioned it here https://old.reddit.com/r/SNIS/comments/1hjxbw0/snis_appimage/ and here https://www.patreon.com/posts/space-nerds-in-118468188 |
Beta Was this translation helpful? Give feedback.
-
Tested successfully on: q4OS I am still trying a flatpack (off and on), but there are many hurdles. Flatpak insists that flatpak-builder is the only way to build packages from source. So for example, opus, the code in the makefile will not work as inside flatpak-builder, it won't let the make environment download anything from the internet. So for each dependency I have to try and find a flatpak friendly code base, and figure out a way to build it in flatpak builder. I believe flatpak is doing all this so they can validate the code in the flatpak, but it is a slog IMO. |
Beta Was this translation helpful? Give feedback.
-
Alright, let me work on the opus situation. You can build without it (and without voice chat functionality,) which is completely fine if you're playing locally, as is meant to be the case ... the voice chat was added during covid lockdown to try to enable over the internet play, but I don't know if anyone's really ever used it in anger, or how well it really works. I've done some minimal testing and it seems to work reasonably well with two users, one in Ohio and one (me) in Virginia, and the snis_server in New York, but I can't really say I've stress tested the voice functionality. To turn off the voice chat functionality, at the top of the Makefile, change "WITHVOICECHAT=yes" to "WITHVOICECHAT=no" (or to anything but yes). I think that will also prevent it from trying to download opus, as it should no longer be a dependency. |
Beta Was this translation helpful? Give feedback.
-
Does this patch help? It should allow you to pre-download opus to whatever location, then build via, e.g.:
so it won't try to use wget to fetch it from mozilla.org. It also occurs to me that the "make update-assets" target runs util/snis_update_assets.sh which makes extensive use of wget to fetch loads of art assets from my digital ocean server. You'll have to find a way around that too, I imagine. (Actually, you don't have to update the assets, the default assets should work, they just don't necessarily look very good.) |
Beta Was this translation helpful? Give feedback.
-
I am starting to hate flatpak more than I did before :) I had some really odd flatpak errors with a trailing space in a yaml file a few months back. To test and fix this I will have to probably have to fork the glew-cmake version I am using and remove those lines. |
Beta Was this translation helpful? Give feedback.
-
Are you sure that's a comment?
is, so far as I know, valid C, and it means the same as
Only the '#' has to be in the first column. You can indent ifdefs this way:
From the GNU C Preprocessor https://debrouxl.github.io/gcc4ti/cpp.html
Hmm, according to that, the '#' doesn't even need to be in the first column. If you're talking about this:
Yeah, those definitely aren't comments. |
Beta Was this translation helpful? Give feedback.
-
Hmm, I'm not a big fan of CMake as there's too much black magic, but you might try this black magic I found:
edit: actually no, you want it undefined, hmm... Oh wait no you do want it defined! Too many double negatives, heh. |
Beta Was this translation helpful? Give feedback.
-
Certainly no pressure from me, if you're not having fun, take a break for sure. Nobody's really getting paid for this (discounting a couple bucks a month I scrounge of Patreon, lol) so don't sweat it, you don't owe anybody anything on this project. And thanks for the work you've put in so far. |
Beta Was this translation helpful? Give feedback.
-
You are an inspiration to unpaid programmers everywhere. I really mean that! I have tested and it seems to work in flatpak. I will fire up a rebuild of the AppImage to test later. I assume you prefer a light download with no assets and an asset upload on the first run, correct? You had mentioned that maybe an initial copy from flatpak to ~ might be in the works. But more code, more bugs. Oh, your build instructions might need to include installing libcurl14-openssl-dev and libssl-dev. I needed those on zorin. I noticed that you can set your own power settings. I am finding one second hold is too short and I overwrite them all the time. Maybe 3 seconds? Just a thought. |
Beta Was this translation helpful? Give feedback.
-
Let's try 2 seconds. d9fb1a6 snis_button: increase button long press time to 2 seconds |
Beta Was this translation helpful? Give feedback.
-
Thanks! I have had some success creating a downloadable flatpak single file build using github actions. But one needs to download it then:
So that is not optimal. I need to find out how to copy the repo folder back into my snis_flatpak git. Maybe it's just me, but I rarely find documentation easy to find, and If I find it, easy to understand. It's always written for those who already know how to do it. |
Beta Was this translation helpful? Give feedback.
-
Huh, link was striped out above. |
Beta Was this translation helpful? Give feedback.
-
I think this is it: Using github actions, I have options to build a single file flatpak https://github.com/vpelss/snis_flatpak If you want to set up your own just create a new github repository and coy it over (minus the repo) Same with AppImage too. Just need people to test. I have only tested the basics. For whatever reason, sound croaks on my WSL. But my WSL might be really messed up. |
Beta Was this translation helpful? Give feedback.
-
Not I had to modify the makefile for the flatpak, so that is why there is one in my snis_flatpak Just search for #vinman to find changes |
Beta Was this translation helpful? Give feedback.
-
Added this to https://spacenerdsinspace.com
|
Beta Was this translation helpful? Give feedback.
-
I have never submitted any flatpaks to flathub.com I detest the bureaucracy. That being said:
|
Beta Was this translation helpful? Give feedback.
-
Here's the part where I confess I don't know a damn thing about flatpaks, lol. This was your idea, you can do whatever you think is best. |
Beta Was this translation helpful? Give feedback.
-
Ok, watched a few youtube videos, read a bit. Let me think about it some. I am kind of thinking that perhaps it would be best if it were under my control, since, if there are bug reports and whatnot, I'd likely be on the receiving end of those, so it might be a good idea if I knew something about what was going on, and while I've been working on SNIS for a decade or so, and am unlikely to abandon it, you may not wish to commit to maintaining and updating some package for years and years and years and may want to wander off and work on other stuff instead at some point, which is 100% understandable (and probably predictable), so I don't want to rope you into such a commitment. So let me do some research and think about it some. |
Beta Was this translation helpful? Give feedback.
-
but I am realizing I don't know shit about flatpak, so, "best" may not be attainable, heh. I think I'm back to "do whatever you think is best" on the flatpak issue. |
Beta Was this translation helpful? Give feedback.
-
Yeah, up to now, I have not really tagged or versioned anything, I always develop on a branch, and the idea has been any commit at all that you care to pick on master should be working (to enable git bisect to work, and because my method of "releasing" it has always just been to tell people to "git clone" it if they want it, and "git pull" to get updates). I won't say that there are zero commits on master that are broken, but it's not far from zero. The closest thing I currently have to a version is the "v 0.1" plus git commit hash that you see if you go on COMMS and type "/about". But yeah, I gathered that I'd need to do some kind of a versioned release for flatpak. |
Beta Was this translation helpful? Give feedback.
-
A few commits related to version numbers: b5ef127 snis: bump version number to 1.0.0 Also, I made a release: https://github.com/smcameron/space-nerds-in-space/releases/tag/v1.0.0 |
Beta Was this translation helpful? Give feedback.
-
FYI I no longer rely on a modified copy of your Makefile. I was unaware that the following would clobber internal values. I am assuming I am doing that correctly. Well it works. So now there should be less package build issues on my side when you do Makefile updates. I spent a day, trying to hunt down an elusive bug on updating to flatpak runtime from org.freedesktop.Platform 23.08 to 24.08 |
Beta Was this translation helpful? Give feedback.
-
I am making an AppImage or Flatpak for easy distribution.
The only problem is that the code places temp files in the same path as the code which will not allow AppImage to work, but I 'might. be able to get Flatpak to work.
AppImage creates a read only tmp directory to run the program.
See:
/tmp/.mount_Space_PFfcwi/usr/bin/snis_launcher: 317: cannot create snis_client_log.txt: Read-only file system
If temp files (and snisb) could be written to maybe ~, then I could package this up and open it to a wider audience.
Beta Was this translation helpful? Give feedback.
All reactions