Skip to content
This repository was archived by the owner on Apr 28, 2021. It is now read-only.

(WIP) Bedrock Linux Support - #59

Open
Titaniumtown wants to merge 24 commits into
ss7m:masterfrom
Titaniumtown:master
Open

(WIP) Bedrock Linux Support#59
Titaniumtown wants to merge 24 commits into
ss7m:masterfrom
Titaniumtown:master

Conversation

@Titaniumtown

@Titaniumtown Titaniumtown commented May 4, 2020

Copy link
Copy Markdown

Ok, I am new to C so be easy on me (that's also why my code is messy), lol. I did everything to add bedrock linux support, but I just don't now how I could implement multiple logos with the main function in paleofetch.c help needed!

I also stole the ascii art from neofetch.

@ss7m

ss7m commented May 4, 2020

Copy link
Copy Markdown
Owner

What is in the /bedrock/etc/or-release file? How does it differ from the regulr /etc/os-resease file? I'm not really familiar with bedrock linux

@otreblan

otreblan commented May 4, 2020

Copy link
Copy Markdown

I was thinking of adding a CMake option for each distro but my PR was closed.
#5

@Titaniumtown

Copy link
Copy Markdown
Author

@sam-barr that shows what bedrock linux version you're on. /etc/os-release shows the default linux distro running over top of bedrock linux.

@Titaniumtown

Copy link
Copy Markdown
Author

@otreblan I don't think that's related to this PR though. Maybe put that in Issues?

@Titaniumtown

Copy link
Copy Markdown
Author

@sam-barr have any idea how I could implement multiple logos in the main function?

@otreblan

otreblan commented May 4, 2020

Copy link
Copy Markdown

#60

@ss7m

ss7m commented May 4, 2020

Copy link
Copy Markdown
Owner

As it stands now the logo is decided at compile time, and I'm not really looking to change that behavior at the moment.

allisio (not sure how to tag them in this) has written some stuff w.r.t package managers which includes logic based on the distro. If/when they make a pull request with that this extra business with bedrock linux could probably be added onto that.

@Titaniumtown

Copy link
Copy Markdown
Author

My current code seems to not work. It compiles, but when I run it, it crashes. Can anyone else reproduce the issue? is it a simple mistake? I am new to C

@Titaniumtown Titaniumtown reopened this May 4, 2020
@Titaniumtown

Copy link
Copy Markdown
Author

wrong button, lol

Comment thread paleofetch.c Outdated
Comment thread paleofetch.c Outdated
@dwzg

dwzg commented May 5, 2020

Copy link
Copy Markdown
Contributor

So the logo part is still not working and I think it get's quite complicated and needs rethinking and some code changes. Maybe it would be best to narrow this pull request down to only add the bedrock name stuff and tackle the integration of other logos later?

@Titaniumtown

Copy link
Copy Markdown
Author

Would I just close the PR and create 2 new ones?

@Titaniumtown

Copy link
Copy Markdown
Author

Has anyone figured out how the logo can be decided on run time?

@Titaniumtown

Copy link
Copy Markdown
Author

I really want multi-os support!

@Titaniumtown

Copy link
Copy Markdown
Author

Bump. Anyone think of any ideas to fix this issue?

@otreblan

otreblan commented May 12, 2020

Copy link
Copy Markdown

image
Because LOGO is a pointer, COUNT() is returning 64/64=1.
ARCH_LOGO instead is an array so it return the correct value.

@otreblan

otreblan commented May 12, 2020

Copy link
Copy Markdown

image
When using a #define, COUNT() returns the correct value.
@Titaniumtown

@Titaniumtown

Copy link
Copy Markdown
Author

Oh cool! Thanks for the info!

@Titaniumtown

Copy link
Copy Markdown
Author

can someone check out my code so far? it works for me.

@Titaniumtown

Copy link
Copy Markdown
Author

Right now, my branch is about 10x slower than the master branch. It's all mostly due to package manager recognition.

@Titaniumtown

Copy link
Copy Markdown
Author

When you enable caching the package info, paleofetch becomes about the same speed as the master branch.

@Titaniumtown

Copy link
Copy Markdown
Author

One thing I found is that if I have 2 statums (on bedrock linux) of distros that use the same package manager, it only uses one of them to do the count.

@allisio

allisio commented May 18, 2020

Copy link
Copy Markdown

Caching the package count probably shouldn't be the default behavior. It's a dynamic value that changes pretty often.

@Titaniumtown

Copy link
Copy Markdown
Author

Yea, but paleofetch is super slow when you don't. I'm getting about 8-20 ms w/ caching, and 400-600 ms w/o caching.

@allisio

allisio commented May 18, 2020

Copy link
Copy Markdown

Then you're essentially breaking the build. Just my two cents.

@Titaniumtown

Copy link
Copy Markdown
Author

There has to be a faster way of looking for packages. Like paleofetch, is slow, not at the same level as neofetch, but slow nonetheless.

@Titaniumtown

Copy link
Copy Markdown
Author

Maybe it can be parallelized?

@Titaniumtown Titaniumtown changed the title (WIP) added bedrock linux (still need to add some stuff) (WIP) Bedrock Linux Support May 19, 2020
@ss7m

ss7m commented May 19, 2020

Copy link
Copy Markdown
Owner

In the packages branch, @allisio and I implemented querying the package database in parallel, you might be able to look at that for ideas.

@Titaniumtown

Copy link
Copy Markdown
Author

I just pushed a commit, it seems not to run, anyone know why? It's something to do with the logo.

@Titaniumtown

Copy link
Copy Markdown
Author

Currently it compiles correctly, everything is in place except for the LOGO variable being set per-OS.

@Titaniumtown

Copy link
Copy Markdown
Author

Maybe this PR could just be about multiple package managers?

@Titaniumtown

Copy link
Copy Markdown
Author

Oh, almost forgot. I need to add support for multiple stratums that use the same package manager. ex ubuntu 2004 and ubuntu 1804

@Titaniumtown

Copy link
Copy Markdown
Author

Does anyone have any ideas on how to fix the issue with having multiple logos?

@jake-87

jake-87 commented Oct 23, 2020

Copy link
Copy Markdown

Hmm. Where is the LOGO string actually declared? We could replace that declaration with a function that first checks if the user has specified a logo, then if they have not, check a file like /etc/os-release to declare the logo?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants