Giter Site home page Giter Site logo

Comments (11)

jmanc3 avatar jmanc3 commented on September 26, 2024

@mattatobin At the moment, the only place winbar checks for its resources is $HOME/.config/winbar.
It wouldn't be too hard to change it so that it checks /etc/winbar/* instead, and have the install script unzip into that folder.
Of course, since we can't write into that directory we'll still have to save and read transient files from ~/.config/winbar.
Would that work for you?

from winbar.

mattatobin avatar mattatobin commented on September 26, 2024

What about a wrapper script which can simply check if the directory exists or not in the user's directory and if not simply unzips and otherwise then runs the actual binary. So point autostart to the wrapper moving the step from "install" to "first run" for any user automagically!

Additionally, you could include a version file in there so the wrapper could be expanded to update resources if desired at some point.

Anyway, I'll do that for my spec file and let you know (and see) how it goes at any rate.

from winbar.

jmanc3 avatar jmanc3 commented on September 26, 2024

@mattatobin Although I didn't write this install script, this is an install script for winbar on the AUR
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=winbar-git

I'm not familiar with rpmbuild but I would guess it's possible for it to do something similar as that script does, which does the unzip as a post step or something.

(On the wrapper script: how would it know where winbar.zip is?)

from winbar.

mattatobin avatar mattatobin commented on September 26, 2024

Well, the AUR package extracts the resources to a system share location and then as a post-install step copies it to the user profile. Basically it is a direct translation of the install script more or less.

I don't think RPM has a post-install task that can target a specific user or current user because the only user that can install packages is root when using dnf.

Also, how will the wrapper know where things are? There are a couple ways to deal with that. If it is spec file specific as in not apart of your project then I simply can generate the wrapper with populated locations. If it is part of your setup, then cmake can preprocess it and fill it with paths or some other means like reasonable guess based on the Filesystem Heirarchy Standard.


Aside: Openbox, Nemo (with Desktop), and winbar. The recent changes have made it so much better. Endless potential in my opinion.

Screenshot from 2024-05-28 17-18-24

from winbar.

jmanc3 avatar jmanc3 commented on September 26, 2024

@mattatobin Can rpmbuild unzip winbar.zip into /etc/winbar? That seems like the simplest solution if it can. It's what we should be doing anyways as many of the resources in .config/winbar are not user specific anyways.

from winbar.

mattatobin avatar mattatobin commented on September 26, 2024

If you want to follow the FHS, only the initial configuration file should live in etc the resources should live in usr/share/winbar and the program should be handling copying read-only global configuration to the user's config. The build system should also be setup to obey --prefix when configuring and DESTDIR= for installing.

BUUUT that sure is a lot of requirements and the list of demands to be putting upon you all at once. So my solution is the startup wrapper that can serve if/until you decide to perform build system voodoo (and yes it is absolutely voodoo, I know from experience).

To answer your question, yeah, rpmbuild can do anything any script can (though, you may have to disable or override a few rpmbuild assumptions occasionally).

from winbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.