x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Start of Simple Browser using winsock 2 (working!)

stingraze Page Icon Posted 2017-08-05 10:49 AM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
Hi guys, as all of you may know, there aren't many decent browsers that are out there for Windows CE.

I've started a simple browser project mostly making use of a sample I found on the internet plus gluing stackoverflow codes. (http://www.binarytides.com/winsock-socket-programming-tutorial/)
I now have a simple browser without the rendering / parser just to show that a little progress on my part has been done! (More like a stripped down version of lynx, even simpler, just displaying the source code lol)
It's nothing amazing, but it might be a little bit interesting for Windows CE fans out there...

I've attached the compiled exe file here.
I think I will release the source code to GitHub today or tomorrow.

Tested on my Sigmarion 3 right now using a CF Ethernet adapter.
It should work on Windows CE 4.1 or above.

How to use:

1. start up Command Prompt (cmd.exe) from Start -> Run...
2. change directory to where tinybrowser.exe is
3. type in tinybrowser.exe to start
4. type in url (withot http:// or https:// I made the port fixed to 80.
5. View the source code of the url .

I am planning to somehow study the source code of the first version of lynx or similar, and implement my version to this when I have time.

Enjoy!

Meanwhile, the source code / project file .zip is up on my server at: http://www.superai.online/windowsce/tinybrowser.zip

Edited by stingraze 2017-08-05 10:57 AM




Attachments
----------------
Attachments tinybrowser.exe (4KB - 2 downloads)
 Top of the page
stingraze Page Icon Posted 2017-08-05 11:58 AM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
Here's a screenshot to see what tinybrowser.exe is like.





(tinybrowser.jpg)



Attachments
----------------
Attachments tinybrowser.jpg (24KB - 1 downloads)
 Top of the page
SwizzleDude
SwizzleDude Page Icon Posted 2017-08-05 5:45 PM
#
Status:
This is really neat. Now we need some sort of HTML render engine
 Top of the page
stingraze Page Icon Posted 2017-08-05 9:25 PM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
thanks!

I just noticed after coding that I also need some sort of parser for the url that gets the domain name only to convert it to an IP address.
 Top of the page
stingraze Page Icon Posted 2017-08-05 11:25 PM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
I've uploaded the source code to GitHub at this address: https://github.com/stingraze/tinybrowser



Just a friendly tip: If you are targeting Armv4,

ws2.lib (Winsocket 2 for Windows CE) is at C:\Program Files (x86)\Windows CE Tools\wce400\STANDARDSDK\Lib\Armv4
& winsock2.h is also needed and is available here: C:\Program Files (x86)\Windows CE Tools\wce400\STANDARDSDK\Include\Armv4

 Top of the page
C:Amie Page Icon Posted 2017-08-06 3:32 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,950
Location:
United Kingdom
Status:
RAM and computational viability for JavaScript is going to be the problem. You could use WebKit to act as the rendering engine and come up with a 20-40MB browser executable capable of supporting modern standards. Like wkHtmltoPdf does, but you'll be doing a hell of a lot of paging to get it to do anything.
 Top of the page
stingraze Page Icon Posted 2017-08-06 10:38 PM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
Thanks for the tip.

I am thinking more of really basic version of lynx to be made, at least for now.
WebKit will be too stressful for Windows CE like Sigmarion 3, I guess.

Edited by stingraze 2017-08-06 10:43 PM
 Top of the page
stingraze Page Icon Posted 2022-02-06 2:46 AM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
Rather old thread, but I found a site explaining about building a really simple browser engine.
https://limpet.net/mbrubeck/2014/08/08/toy-layout-engine-1.html

Here's another resource I will read:
https://www.html5rocks.com/en/tutorials/internals/howbrowserswork/

I hope I can get my dev environment back together and try it out.

Edited by stingraze 2022-02-06 2:50 AM
 Top of the page
joval Page Icon Posted 2022-02-06 4:19 AM
#
Avatar image of joval
Subscribers
H/PC Sensei

Posts:
992
Location:
Northern California
Status:
Stingraze:
A noble cause...I salute your effort. The 2nd article referring to "looking under the hood "of a Browser (and this was some years ago) one finds "a million lines of code." But a lynx browser for WinCE would be a big plus.

Fortunately, although not perfect with longer webpages, the new Frogfind.com which strips https:// sites down to their text only and presents it as http://, really gives our aged PIE4 on the Jornada 720 a new lease on life, resuscitated from the brink of extinction.

Basically... it converts PIE4 into a Lynx-like browser with working clickable links... only much much faster than lynx. Unfortunately on the MP800 with PIE3 it suffers some sort of DNS issue (like Jake mentions on the Dos platforms) and is useless--- maybe there is a fix.

The Retro-proxy WRP is fairly impressive as it even works with MP800 PIE but is much slower...yet amazing as it renders an accurate image of https:// web pages... it takes a snapshot of all or a portion of a webpage and overlays a map of all the clickable links...which takes considerable time and cpu power on both sides to compress and process. But it works on WinCE 2.11 (thanks CE Geek) PIE3... !!!

joval

Edited by joval 2022-02-06 5:34 AM
 Top of the page
stingraze Page Icon Posted 2022-02-06 7:14 AM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
Yeah, I know about FrogFind.

I tried that a while ago, but the only downside is that all the pages you visit is recorded by the maker of FrogFind. Not that I'm going to browse anything bad, but it is better to keep it local at times. Hence, my interest in making a simple browser.

 Top of the page
joval Page Icon Posted 2022-02-06 5:28 PM
#
Avatar image of joval
Subscribers
H/PC Sensei

Posts:
992
Location:
Northern California
Status:
Quote
stingraze - 2022-02-05 11:14 PM

Yeah, I know about FrogFind.

I tried that a while ago, but the only downside is that all the pages you visit is recorded by the maker of FrogFind. Not that I'm going to browse anything bad, but it is better to keep it local at times. Hence, my interest in making a simple browser.



Good point ...as it's essentially a proxy server "at a distance" much like WRP is a local proxy server. And yes...everything shows up on the server! Back to my "mission critical" comment!

I confess I don't understand how near or far you are from success with your browser... what is the next hurdle?

Joval
 Top of the page
stingraze Page Icon Posted 2022-02-06 11:25 PM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
Yeah, I want to port what was done on my eMbedded Visual C++ environment to the CeGCC environment (under Ubuntu 20.04). It's a cross compiler that runs on Linux instead of eMbedded Visual C++, which runs on Windows.

I want to do that to you know, use the latest environment, and I installed CeGCC recently with the help of Karpour here.

So yeah, it should take a while, understanding the low-level TCP-IP stuff and HTTP protocols, but I hope to get there some day!

-stingraze

Edited by stingraze 2022-02-06 11:25 PM
 Top of the page
C:Amie Page Icon Posted 2022-02-07 2:33 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
17,950
Location:
United Kingdom
Status:
That would make for a really informative support article tutorial stingraze if you are interested? One for how to setup CeGCC on Ubuntu and may be another for how to port code from eCV++ to the CeGCC environment?
 Top of the page
stingraze Page Icon Posted 2022-02-07 11:34 PM
#
Avatar image of stingraze
H/PC Vanguard

Posts:
3,656
Location:
Japan
Status:
Sure. I can do that.

Porting from eVC++ to CeGCC is something I've never done before, so if I succeed, I will write!
 Top of the page
Jump to forum:
Seconds to generate: 0.203 - Cached queries : 71 - Executed queries : 10