ofPackageManager: pre-release for osx testing

Heyho,
I recently had some time to continue working on a package manager for oF.

I uploaded a pre-release version for testing. It currently works on osx only. Version 1.0.0 will then hopefully support windows and linux too.

Please note that the version of the project generator bundled with 0.10.1 does not support comments at the line endings. It is fixed in the most recent version.

Install it via brew:

brew tap thomasgeissl/tools
brew install ofpackagemanager
# brew upgrade ofpackagemanager
ofPackageManager config -g
cd path/to/test/project

# install addons locally via github user/repo
ofPackageManager install arturoc/ofxEasing
# install addons locally via url
ofPackageManager install https://github.com/npisanti/ofxPDSP.git
# install addons via database key
ofPackageManager install ofxMidi
# you can also install a specific version (hash or tag)
ofPackageManager install ofxMidi@1.1.1
# or install an addon globally
ofPackageManager install -g ofxMidi@1.1.1

# remove your local addons and reinstall them
rm -rf local_addons
ofPackageManager install

Please post feedback here or on the github issue tracker.

Thomas

7 Likes

Heyho friends,

i have updated the database. More addons are now supported by their id.

If you have already installed the package manager then this should update the database: cd ~/.ofPackages && git pull

Feel free to add more addons and send PRs (ofPackages).

Thomas

1 Like

in case it helps here’s a list generated from github. not sure if the format is the most useful but let me know if a different format might be better or some additional info would be useful, like branches or latest commit…

1 Like

It would be very handy if you could provide me list with the following information:
user/repo, isFork, starCount, timeOfLastCommit, license (i hope github provides this info, otherwise probably too much work to figure out).
Comma separated or whitespace separated should be both fine.
Then i can automate creating the files based on some rules, e.g.:

  • isFork == 0
  • starCount >= 10
  • In case of naming conflicts i dont know if starCount or timeOfLastCommit is more important

This is useful, thanks for putting time on writing this tool.

1 Like

Thanks. Let me know if you find any bug. I will hopefully soon find some time to make it work on windows and linux.
It saved me already more time, getting old projects compiled again than it took me to write it.

Heyho people,
i fixed a couple of bugs. Especially for installing addon dependencies. It shoudl now automatically install the dependency.
e.g. ofPackageManager install ofxHTTP

Feel free to upgrade: brew upgrade ofpackagemanager

And report issues or fork and fix them.
Thanks Thomas

we recently got it working, it now compiles on windows and linux. Feel free to test it and give feedback. A windows version is available here. Download it and then add it to your path.

I try to fix the remaining bugs in the next couple of weeks and hopefully release version 1.0.0 soon.

Thomas

6 Likes

I just added a little website. It still needs some more windows docs and maybe some more design work.
B is there anything which i should add?

https://thomasgeissl.github.io/ofPackageManager

2 Likes

Website looks nice :wink: I have started using it. So far so good.

A couple of things that maybe can be improved:

  • When searching by username, the tool reports all the repository for that user. Maybe it could return just that ones that are prefixed with ofx?
  • It would be nice if when seraching for an addon, there is the timestamp of the last commit. Like “last updated at”
1 Like

thanks.

The first issue is fixed on the master. I will add some more verbose output to search tasks and then do another release.

for the second one, i can use the updated property. I am also thinking of including if it is a fork, how many forks it has, the number of stars.

https://api.github.com/users/edap/repos

@thomasgeissl the db i sent you contains all the addons available on gh so you could just query that instead of directly github?

hey arturo, i dont remember, where did you send me? do you mean the list above?

i would love to be independent from github, having a local database is one step. We should make sure that there is an easy way to update it regularly. Properties like number of stars, number of open issues or updated_at will change daily.
In addition to that i wanna keep the search on github.

I will test with the database you showed me last time. If i remember correctly it was still not clear how to work with forks and the way the database is currently parsed. I think i am using the filename as an ID.

oh, you are right i sent it to ellie but never to you i thought he might have sent you. can you send me an email? i don’t think i have yours

I sent it via slack, i think i should be small enough to send it via slack directly. thanks

I improved the search task a little bit. The search task is now interactive and more verbose. Hopefully not too annoying by asking at every search if you wanna install or continue searching on github.

./bin/ofPackageManager.app/Contents/MacOS/ofPackageManager search ofxTimeline
The following package was found in the database: 
{
    "author": "YCamInterlab",
    "cloneUrl": "https://github.com/YCAMInterlab/ofxTimeline.git",
    "license": "",
    "name": "ofxTimeline",
    "type": "addon",
    "website": "https://github.com/YCAMInterlab/ofxTimeline"
}
Do you want to install it? [y|n] (y) n
Okey-dokey, do you want to search it on github? [y|n] (y) y
[ notice ] search: The following repositories contain ofxTimeline:
0: YCAMInterlab/ofxTimeline
        https://github.com/YCAMInterlab/ofxTimeline
        stars: 244, open issues: 45, updated at: 2019-10-23T23:20:01Z, forks: 133, isFork: false

// ...
16: borg/ofxOpenALSoundPlayer
        https://github.com/borg/ofxOpenALSoundPlayer
        stars: 0, open issues: 0, updated at: 2017-11-10T19:02:13Z, forks: 1, isFork: false


Do you wanna install any of them? [y|n] (y) n
[ notice ] Thanks for using ofPackageManager. If you find a bug then please report it on the github issue tracker (https://github.com/thomasgeissl/ofPackageManager/issues). See you soon.

It is in the current master, but not yet in the releases.

1 Like

heyho,
i just did another release of the package manager.

brew tap thomasgeissl/tools
brew install ofpackagemanager
# brew upgrade ofpackagemanager

the package manager now supports a local config. That means it will use the config file in your project, if there is none, it will recursively check the parent directory and fall back to the global config. Now you can have configs per project or per oF installation.

Please feel free to test and report bugs.

Also, it would be very helpful if someone wanna test and do a release on windows.

@thomasgeissl thanks for sharing this.

I was wondering what would be the easiest way to use this with the PG and thinking that maybe the first step might be to be able to link ofpackagemanager into the command line version of the PG ( https://github.com/openframeworks/projectGenerator/tree/master/commandLine ) as we are already compiling that for most platforms.

Would there be any barrier to doing that currently?

Then it would just be a matter of exposing some of the package manager functionality in the Electron frontend.

1 Like

hey @theo,

the first step for me is calling the command line pg from the package manager. That should be straight forward and i was already working on it today.

Then i would like to prepare the package manager to live next to the command line pg and be called form it or the electron frontend. A few steps are needed therefore.

  • passing config options instead of parsing them from a file (branch: feature/pg)
  • silencing outputs when called from another tool (otherwise it will be quite difficult to parse the results)
  • no interactive tasks, i guess there wont be a back and forth communication between the apps
  • proper interface, maybe json based: ofPackageManager {task: "install", ...}

libgit makes it a bit painful to compile the package manager on all platforms.
The interface part is done mostly in the main file. The core functionality lives in the app. I guess you could also use that part in the project generator. But i dont think that the code is clean enough yet and not sure how to maintain it in the future if the two apps are bound together.

I happy to collaborate and move this forward.

Do you think a json based interface like this one could work?

1 Like