[GSOC] Porting Allegro or similar library to Haiku

Hello everyone. I’m Nikhil, a 2nd yr UG student at IIT Roorkee, India.
I have been part of the community for good few months, and loved the OS. I wanted to pitch porting Allegro or SFML similar library to Haiku as part of my GSOC proposal. Any ideas, which one should I learn in depth and try to port which may help the Haiku community the most? I’ve been Computer graphics nerd my whole life and have worked with OpenGL, and am currently building my own renderer from scratch, so I have a basic knowledge and experience working in the domain.
Also any other suggestions on unfinished projects/ projects requiring fixes which might be related to graphic drivers, libraries, etc will be helpful.
Thanks!

6 Likes

Open HaikuDepot, use search function and see. There are already ports of allegro and allegro tools available…

From what I saw in the gsoc ideas list, the idea I mention was present.

Allegro5 still hasn’t hit haikuports and from the talks of it it wouldn’t be a trivial task, I had a recipe that builds it, but that is as far as my knowlidge went, some more information can be found at haikuports:

2 Likes

Start with SFML. You can look at the SDL2 and earlier Allegro ports. A previous developer worked on the SFML port so it is mainly finishing the work with some core dev guidance.The SFML code compiles on Haiku so it is mainly the Haiku API integration work.

Allegro - this might take a bit longer so up to mentorship.

In the ideas page, it was in the “easy” category with 175 hrs length. Is it quite tough for a budding developer like me? If yes, what realistic libraries or drivers I may work on to completion/help developing for a 175 hrs project. Being a college student, I might not be able to give full time to the project, hence the 175 hrs time barrier :slight_smile:

Yeah this seems to be a viable option. Also, from what I saw of libraries, sfml seemed to have a better documentation and more helpful tutorials than Allegro. I will look into this for sure.
Thanks!

1 Like

It would be great if we didn’t just have the libraries, but if we had an IDE and examples to go with them.

and not just any standard things like they are on the net, but those that apply to haiku and help to do something there yourself.

I’m not a mentor for GSoC, was just replying to the thread, maybe someone from the mentors can chip in to tell you how hard the job would be, I am no developer otherwise I would have hunted it down by now. :slight_smile:

1 Like

Can you please elaborate the idea a bit? I would love to help the community in any way I can.

1 Like

There are many languages and also many tutorials. If you want to emphasize these languages more on haiku to make haiku attractive here, then you should have haiku own solutions here that make working with the languages easier (in this case Allegro). This included sample programs that actually run on Haiku (because we usually don’t have the latest version and there may be differences to other systems). The whole paired with an IDE would of course be the best.

IDE options:

  • Run the program for testing
  • Add examples
  • Add Templates
  • Export as stand alone program

Under the motto, show the user what he can do with it and win new people interested in Haiku

1 Like

It’s a fine idea, but building a whole ide for haiku might not be my forte. I can actually try doing it in spare time but doing in the specific deadline might be a lot tougher. If there are already unfinished solutions in the repo, I will surely look into it and try to complete it. For the time I would rather stick to bit easier, helpful projects so I won’t be burdened by my semester load lmao :slight_smile:

It seems you have found a work in progress version of SFML for Haiku. Did you try to compile it? Did that work? Is it provided with some examples? Do they run?

I think answering these questions will help you get a better idea of the current state of the work and what the next steps are.

I have found the forked version and I will be trying it later today and update here. Meanwhile, I was playing with the original library on my windows installation today and learning it.

Repo link: GitHub - CodeforEvolution/SFML at feature/haiku_port

You can review here: SFML porting

Key part mentioned:

  • Window module - “the module not only contains window management functionality, but also the controlling and monitoring of input devices, clipboard handling, handling of the cursor, and the handling of video modes. (CodeforEvolution)”.

  • “most of the library builds just fine at this point and is functional. (CodeforEvolution)”

You’ll want this key developer guide: Be Book.

  • Interface Kit
    • BWindow (BDirectWindow)
  • Application Kit
    • BClipboard
    • BCursor
1 Like

Thank you so much. It is my first time developing for Haiku so are those resources enough to start developing for it, i.e setting up the environment for building projects for haiku. Also, visual studio on windows is fast enough or should I switch to my linux installation and develop on an equivalent JetBrains IDE.

Can anyone also tell me with whom should I discuss my proposal? Here on the forum itself, or with the mentors personally who might help me with this? The gsoc ideas page mentioned @scottmc to be the one willing to mentor the project.

Contect @scottmc for mentorship. Someone like @Begasus for Haikuports recipe writing, haikuporter setup, and submitting patches.

Tools like VSC/JetBrains/Eclipse/GDB are great
to use. There many online coding tools as well.

1 Like

Thanks. I shall look into that.

Please keep the discussion here on the forum rather than talking privately with mentors. This way you get help from more people :slight_smile:

For the development environment, for this specific project it is probably best to work inside Haiku, either in a virtual machine or installed on real hardware. This means unfortunately a more limited set of IDEs are available. I can’t really give advice on them, because I’m a bit old-fashioned and do all my development with the Vim text editor, which is a somewhat different way to handle things.

We don’t really have an easy way to cross-compile things from Linux (it’s possible, but not well documented and supported), and even if you did, after building, you will still have to test and debug your code in Haiku anyways. So, working from Linux would be complicated. And working from Windows probably close to impossible at this point (maybe with WSL2, but at that point you may as well use Linux).

2 Likes