Starting a new app with UXP

Discussions about applications built on our platform code that do not have a dedicated board.

Moderators: trava90, athenian200

dralmaember

Starting a new app with UXP

Unread post by dralmaember » 2020-05-16, 12:29

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!

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2306
Joined: 2018-05-05, 13:29

Re: Starting a new app with UXP

Unread post by vannilla » 2020-05-16, 12:55

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.

dralmaember

Re: Starting a new app with UXP

Unread post by dralmaember » 2020-05-16, 13:03

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

New Tobin Paradigm

Re: Starting a new app with UXP

Unread post by New Tobin Paradigm » 2020-05-16, 17:09

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.

dralmaember

Re: Starting a new app with UXP

Unread post by dralmaember » 2020-05-16, 18:53

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).

New Tobin Paradigm

Re: Starting a new app with UXP

Unread post by New Tobin Paradigm » 2020-05-16, 19:09

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.
Last edited by New Tobin Paradigm on 2020-05-16, 19:10, edited 1 time in total.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2306
Joined: 2018-05-05, 13:29

Re: Starting a new app with UXP

Unread post by vannilla » 2020-05-16, 19:10

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 ;)

dralmaember

Re: Starting a new app with UXP

Unread post by dralmaember » 2020-05-16, 19:25

Anyways, thanks for all your help, I'm preparing for an amount of try&fail type of learning :coffee:

User avatar
Isengrim
Board Warrior
Board Warrior
Posts: 1324
Joined: 2015-09-08, 22:54
Location: 127.0.0.1
Contact:

Re: Starting a new app with UXP

Unread post by Isengrim » 2020-05-17, 01:37

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.
a.k.a. Ascrod
Linux Mint 19.3 Cinnamon (64-bit), Debian Bullseye (64-bit), Windows 7 (64-bit)
"As long as there is someone who will appreciate the work involved in the creation, the effort is time well spent." ~ Tetsuzou Kamadani, Cave Story

New Tobin Paradigm

Re: Starting a new app with UXP

Unread post by New Tobin Paradigm » 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.

gh_origin

Re: Starting a new app with UXP

Unread post by gh_origin » 2020-07-12, 12:08

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.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 36696
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Starting a new app with UXP

Unread post by Moonchild » 2020-07-12, 12:16

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)
{{This headspace for lease}}
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5366
Joined: 2015-12-09, 15:45
Contact:

Re: Starting a new app with UXP

Unread post by moonbat » 2020-07-12, 14:30

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.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 36696
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Starting a new app with UXP

Unread post by Moonchild » 2020-07-12, 19:26

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.
{{This headspace for lease}}
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5366
Joined: 2015-12-09, 15:45
Contact:

Re: Starting a new app with UXP

Unread post by moonbat » 2020-07-13, 05:18

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!
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

New Tobin Paradigm

Re: Starting a new app with UXP

Unread post by New Tobin Paradigm » 2020-07-13, 05:26

Off-topic:
Everything is proceeding as I have foreseen.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5366
Joined: 2015-12-09, 15:45
Contact:

Re: Starting a new app with UXP

Unread post by moonbat » 2020-07-13, 05:32

New Tobin Paradigm wrote:
2020-07-13, 05:26
Off-topic:
Everything is proceeding as I have foreseen.
Off-topic:
Image
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

redbrain

Re: Starting a new app with UXP

Unread post by redbrain » 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.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2306
Joined: 2018-05-05, 13:29

Re: Starting a new app with UXP

Unread post by vannilla » 2021-01-19, 19:09

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.

dralmaember

Re: Starting a new app with UXP

Unread post by dralmaember » 2021-01-19, 20:57

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

Locked