Page 1 of 4

Starting a new app with UXP

Posted: 2020-05-16, 12:29
by dralmaember
Hello everyone, my first question here.

I want to create a new (brand-new, not a browser fork) app using UXP. However, I don't know
where to start. My guess is to build Pale Moon from source and run my app with it kind of like
with firefox? However, I'm not sure this is how I should do it, so I would be happy for someone
to point me in the right direction.

Thank you in advance!

Re: Starting a new app with UXP

Posted: 2020-05-16, 12:55
by vannilla
There's no need to build Pale Moon to run a non-web browser application.
Admittedly it's rather convoluted at first, if you never worked with the platform, to properly set it up for a new application, but ultimately all UXP application are similar at the lowest level, with only the XUL/XPCOM part being truly different.
I suggest looking at the source code of applications like Ambassador and Borealis Navigator to have an idea on how UXP applications are built.
Unfortunately a proper guide is still lacking so there will be lots of trial and error at first.

Re: Starting a new app with UXP

Posted: 2020-05-16, 13:03
by dralmaember
Thank you, will be looking at those, then I will see where I get :D
BTW, I found this tutorial, but I don't know how much it
applies to UXP https://developer.mozilla.org/en-US/docs/Archive/Mozilla/XUL/Tutorial

Re: Starting a new app with UXP

Posted: 2020-05-16, 17:09
by New Tobin Paradigm
You would be served best to understanding the build system first and some basics. Ambassador dispite some non-standard stuff which needs sorted is a good one because it is an extension converted to also be a standalone application.

As for more detail, I am the person to see.

Re: Starting a new app with UXP

Posted: 2020-05-16, 18:53
by dralmaember
Really that's what I don't get; I have no idea where I should even begin. I checked the repo for Ambassador, but there are
just too many files. I don't know where I should even start reading those. If you (or someone else) could give some basic
direction on that, it would be really helpful. I can write a Makefile or CMAKE or whatever build system works with UXP
(from what I've seen simply makefile).

Re: Starting a new app with UXP

Posted: 2020-05-16, 19:09
by New Tobin Paradigm
No. Our build system is a ridiculous hybrid of two different configure routines and two and a half build file types.

You will just have to do it like everyone else and study how it builds something.

Re: Starting a new app with UXP

Posted: 2020-05-16, 19:10
by vannilla
dralmaember wrote:
2020-05-16, 18:53
If you (or someone else) could give some basic direction on that, it would be really helpful. I can write a Makefile or CMAKE or whatever build system works with UXP (from what I've seen simply makefile).
Get the UXP platform from https://github.com/MoonchildProductions/UXP
If you are using git to manage your progress, you should get it as a submodule instead.
Once you are done, you might want to checkout the master branch on a known-stable commit. Pale Moon has 2216275 at the time of this writing.
The UXP repo (usually a submodule) is the "platform" folder you see on e.g. the Pale Moon repository.
You then need to hook the platform into your application, but this can't fit into a forum post ;)

Re: Starting a new app with UXP

Posted: 2020-05-16, 19:25
by dralmaember
Anyways, thanks for all your help, I'm preparing for an amount of try&fail type of learning :coffee:

Re: Starting a new app with UXP

Posted: 2020-05-17, 01:37
by Isengrim
Ambassador isn't in the UXP repo because it's produced by myself, not Moonchild Productions. ;) The code is here. As Tobin said, it does some things in nonstandard ways, and there are traps you can fall into if not careful.

Perhaps you can try writing your application as an extension to Pale Moon first? Then we could give more concrete examples on how to migrate it to a full application.

Re: Starting a new app with UXP

Posted: 2020-05-17, 06:19
by New Tobin Paradigm
There are no applications in the UXP repo anymore except a partly functioning xulrunner. You also can't build anything under the UXP repo alone except said xulrunner.

Re: Starting a new app with UXP

Posted: 2020-07-12, 12:08
by gh_origin
New Tobin Paradigm wrote:
2020-05-17, 06:19
There are no applications in the UXP repo anymore except a partly functioning xulrunner. You also can't build anything under the UXP repo alone except said xulrunner.
As I new learner, trial and error is needed. xulrunner is very needed for this. All of the posts above all assumed the users to be professional enough to write something then just hook the platform into it and done. It's plain wrong.

What partly functioning mean? Does it good enough to use to test new application?

I always want to make an UXP application but can't do anything other than spend hours reading then give up, because I'm confused. All of the documents there are for the old Mozilla Firefox that can't even run as is with the new UXP platform. And how to modify these examples to work with the new platform, no one ever said anything about that!

I want to view my .xul file rendered to see if it's working or not. Of course, I used linting tool for xml to check my .xul file, but I still can't know if it works or not. Then remote xul is disabled, fsck, how could I see my .xul rendered? Everything now are dead links on the obsolete Mozilla XUL site. Even I wanted to develop for UXP very much, I still can't. Your documents sucks, or to be fair, it's not available at all! You are eating your own dog food, so don't expect UXP to be more popular.

IMHO, UXP is something like Electron. The only different is the XUL technology is much older and the later is so successful but almost no one know about the former. Of course we could blame that Node and Electron are backed by big companies, yeah, no one can refute that, because it's right. But it's still something very sad for UXP.

Re: Starting a new app with UXP

Posted: 2020-07-12, 12:16
by Moonchild
Now that's just being insulting. We're not here to hand stuff on a silver platter for you. Everything to get started is out there, you just have to take the time to find it (or ask nicely).
Go cool your heels for a bit. (temp ban issued)

Re: Starting a new app with UXP

Posted: 2020-07-12, 14:30
by moonbat
Moonchild wrote:
2020-07-12, 12:16
Now that's just being insulting. We're not here to hand stuff on a silver platter for you.
Off-topic:
Forget handing on a silver platter, he doesn't even bother to follow instructions when helped and is quick to dismiss anything else that is suggested.

Re: Starting a new app with UXP

Posted: 2020-07-12, 19:26
by Moonchild
Off-topic:
I guess a cooldown wasn't enough, judging by the rage/bile sent to the forum staff e-mail in response. Membership has been corrected accordingly.

Re: Starting a new app with UXP

Posted: 2020-07-13, 05:18
by moonbat
Off-topic:
Moonchild wrote:
2020-07-12, 19:26
judging by the rage/bile sent to the forum staff e-mail in response
:o
That escalated quickly!

Re: Starting a new app with UXP

Posted: 2020-07-13, 05:26
by New Tobin Paradigm
Off-topic:
Everything is proceeding as I have foreseen.

Re: Starting a new app with UXP

Posted: 2020-07-13, 05:32
by moonbat
New Tobin Paradigm wrote:
2020-07-13, 05:26
Off-topic:
Everything is proceeding as I have foreseen.
Off-topic:
Image

Re: Starting a new app with UXP

Posted: 2021-01-19, 17:26
by redbrain
Greetings! I'm new to the UXP and looking to create my first app as well. I apologize in advance for what could be considered necrothreading.

To be fair, there is not a lot of information on the build system, environment, etc for developing or distributing a UXP app, especially cross-platform.
While I don't expect to be spoon-fed, it would be nice to have even an overview of what's required to hook the UXP into a new app.

Staring at the Ambassador repo mentioned, there's the platform submodule, something called the Comm Build System, and then the app itself.
While it's easy enough to init a UXP submodule, all I've found on Comm is one MDN page.
I'm able to find docs on writing in XUL in Mozilla's MDN Archive, but there's nothing on actually distributing XUL applications, which strikes me as odd.

If I'm able to successfully create a UXP app, I'll probably create a boilerplate for other people to use.
Original Poster, if you've had any success, I'd love to hear about it as well.

Thanks for maintaining XUL, and thanks in advance for any help that I receive.

Re: Starting a new app with UXP

Posted: 2021-01-19, 19:09
by vannilla
redbrain wrote:
2021-01-19, 17:26
there's nothing on actually distributing XUL applications, which strikes me as odd.
While you can experiment with different forms of packaging, ultimately full applications built on top of UXP are one giant executable file containing both the platform and the application and you distribute that.
The actual structure once built might change, so it's not necessarily one giant file, but it's still all statically linked and bundled together.

Re: Starting a new app with UXP

Posted: 2021-01-19, 20:57
by dralmaember
redbrain wrote:
2021-01-19, 17:26
Greetings! I'm new to the UXP and looking to create my first app as well. I apologize in advance for what could be considered necrothreading.

To be fair, there is not a lot of information on the build system, environment, etc for developing or distributing a UXP app, especially cross-platform.
While I don't expect to be spoon-fed, it would be nice to have even an overview of what's required to hook the UXP into a new app.

Staring at the Ambassador repo mentioned, there's the platform submodule, something called the Comm Build System, and then the app itself.
While it's easy enough to init a UXP submodule, all I've found on Comm is one MDN page.
I'm able to find docs on writing in XUL in Mozilla's MDN Archive, but there's nothing on actually distributing XUL applications, which strikes me as odd.

If I'm able to successfully create a UXP app, I'll probably create a boilerplate for other people to use.
Original Poster, if you've had any success, I'd love to hear about it as well.

Thanks for maintaining XUL, and thanks in advance for any help that I receive.
I can't really speak about it because:

- My original reason to develop in the first place - not having found a text editor that appeals to me - has been solved without me doing anything :D
- I did not have time because school

However, right now I'm looking at it again and I might retry sometimes in the near future