1. Phix, and p2js

Hi Pete

Whats the actual process of getting a Phix program, to appear in someone elses browser. Step by step. If you could be so kind.

Cheers, Chris.

new topic     » topic index » view message » categorize

2. Re: Phix, and p2js

ChrisB said...

Whats the actual process of getting a Phix program to appear in someone elses browser. Step by step. If you could be so kind.

Can I assume you are ok with debugging on desktop/Phix, running pwa/p2js, and getting it to run in your browser?

The files have to be uploaded and hosted somewhere, as provided by your ISP or some other free or paid hosting service, ok with that part too?.

So, in http://phix.x10.mx/p2js/ (even I get a 403 on that url) I have previously uploaded p2js.js, pGUI.js, pGUI.css, and a builtins/ directory containing 58 files as populated by pwa/p2js.exw in C:\Program Files[ x86]\Phix\pwa\builtins (about 1.4MB in total). Having got some demo to run in my browser, I upload pwa/test.htm, rename it to something more appropriate such as primefib.htm, and then I can invite people to run http://phix.x10.mx/p2js/primefib.htm in their browser - nothing else to it. Of course I am specifically using a p2js\ subfolder on the Phix site, but there is no reason why you would have to do the same. Likewise there is nothing preventing you from shipping a zip of those files (pwa\test.htm will tell you exactly which ones are needed) so that someone else can run it locally from wherever they unzip it.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Phix, and p2js

petelomax said...
ChrisB said...

Whats the actual process of getting a Phix program to appear in someone elses browser. Step by step. If you could be so kind.

Can I assume you are ok with debugging on desktop/Phix, running pwa/p2js, and getting it to run in your browser?

No.

said...

The files have to be uploaded and hosted somewhere, as provided by your ISP, or some other free or paid hosting service, ok with that part too?.

Yes, I can upload files with ftp, or whatever method the provider uses. Do they have to be in specific location

said...

So, in http://phix.x10.mx/p2js/ (even I get a 403 on that url) I have previously uploaded p2js.js, pGUI.js, pGUI.css, and a builtins/ directory containing 58 files as populated by pwa/p2js.exw in C:\Program Files[ x86]\Phix\pwa\builtins (about 1.4MB in total). Having got some demo to run in my browser, I upload pwa/test.htm, rename it to something more appropriate such as primefib.htm, and then I can invite people to run http://phix.x10.mx/p2js/primefib.htm in their browser - nothing else to it. Of course I am specifically using a p2js\ subfolder on the Phix site, but there is no reason why you would have to do the same.

Kind of lost me at t his point.

So the package I need to upload, with a directory structure, should look like

p2js(folder) 
   pwa (folder) 
       primefib.htm (file) 
   builtins (folder) 
       builtin files (files) 
   p2js.js (file) 
   pGUI.js (file) 
   pGUI.css (file) 

Is that right? And then what's the 'someone else' browser pointed too?

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

4. Re: Phix, and p2js

ChrisB said...
petelomax said...

Can I assume you are ok with debugging on desktop/Phix, running pwa/p2js, and getting it to run in your browser?

No.

Try running pwa/p2js.exw, click on the "Choose File" button, open (say) demo\rosetta\15_puzzle_game_in_3D.exw and then press F5 or click the run button. Does that work/help?

(Aside: You can also/I often use <Ctrl W>, esc, and then switch to/refresh an already-open file:///C:/Program%20Files%20(x86)/Phix/pwa/test.htm tab, instead of F5/run.)
(Aside2: You can also paste/edit in the main screen of pwa/p2js, but be warned there is no save function (<Ctrl S> re-syntax-colours) and no warning whatsoever before it discards any edits.)
(Aside3: There probably will be a save function of some sort (localStorage in a browser, hdd on desktop/Phix) at some stage but all that is quite a long way down on my to-do list.)

ChrisB said...

Do they have to be in specific location
So the package I need to upload, with a directory structure, should look like

Almost, except there is no pwa sub-folder, and a containing p2js folder is entirely optional:

p2js(folder) [optional] 
   builtins (folder) 
       builtin files (files) 
   p2js.js (file) 
   pGUI.js (file) 
   pGUI.css (file) 
   primefib.htm (file) 

ChrisB said...

Kind of lost me at this point.
And then what's the 'someone else' browser pointed too?

All I can tell you is that if you uploaded/renamed to primefib.htm the URL someone else will need will end with that.
The first part of the URL depends on your ISP or other hosting provider, only you and you alone can possibly have any idea what that will be.
In my case it happens to be "http://phix.x10.mx/p2js/", yours will start with either "http://" or "https://", may or may not have the "p2js/" part, and that's the best/only clue I can give you.

PS: While I've gone for a single p2js folder, for projects left up long-term it might make sense to sequester the main htm file and all specific support files needed (in the case of primefib.htm that be 12 of them) in a project specific folder, so that (far) future uploads don't clobber older stuff. Just one possibility, there are equally valid arguments for "latest version and regular testing", and "shared files means cached files means better performance", of course.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu