dllToDate stating point

Cableguy

Expert
Licensed User
Longtime User
This weekend I hope to have a working "Dll2Date xml creator" so that the Dll Authors can start sending me the info to compile a working FULL xml file to post...
Due to EREL's Imposition:(, Dll2Date will NOT Auto-Update:sign0013:, but it will tell the user wich dll have updates ready:sign0060:, and open the correspondent "permalink"...:sign0188:
 

digitaldon37

Active Member
Licensed User
Longtime User
This weekend I hope to have a working "Dll2Date xml creator" so that the Dll Authors can start sending me the info to compile a working FULL xml file to post...
Due to EREL's Imposition:(, Dll2Date will NOT Auto-Update:sign0013:, but it will tell the user wich dll have updates ready:sign0060:, and open the correspondent "permalink"...:sign0188:

I'm ok without the auto-updating, and think it's a good suggestion to not have it auto-update. In fact, I'd want a way to turn it off and on if it did have auto-updating.
 

Cableguy

Expert
Licensed User
Longtime User
Time to pitch in

I NEED HELP!!!!

I just can't make sense of reading a basic xml file...

Can someone please create a module to read this xml?

B4X:
<?xml version="1.0" encoding="utf-8"?>
<!--Dll 2 date Client File-->
<Dll-1>
  <Name>XPTO</Name>
  <Version>1.0</Version>
  <Info>Test Dll xml with no actual info or use</Info>
</Dll-1>
<Dll-2>
  <Name>XPTO</Name>
  <Version>1.0</Version>
  <Info>Test Dll xml with no actual info or use</Info>
</Dll-2>
<Dll-3>
  <Name>XPTO</Name>
  <Version>1.0</Version>
  <Info>Test Dll xml with no actual info or use</Info>
</Dll-3>

I will be adding all relevant values to array...
So I need to declere them dinamically, with the count from the xml file..
ie, this simplistic file would create 3 arrays with 3 values each...
But these can and surelly will vary...
So any dll entry can have more values than other...
 

digitaldon37

Active Member
Licensed User
Longtime User
I NEED HELP!!!!

I just can't make sense of reading a basic xml file...

Can someone please create a module to read this xml?

B4X:
<?xml version="1.0" encoding="utf-8"?>
<!--Dll 2 date Client File-->
<Dll-1>
  <Name>XPTO</Name>
  <Version>1.0</Version>
  <Info>Test Dll xml with no actual info or use</Info>
</Dll-1>
<Dll-2>
  <Name>XPTO</Name>
  <Version>1.0</Version>
  <Info>Test Dll xml with no actual info or use</Info>
</Dll-2>
<Dll-3>
  <Name>XPTO</Name>
  <Version>1.0</Version>
  <Info>Test Dll xml with no actual info or use</Info>
</Dll-3>

I will be adding all relevant values to array...
So I need to declere them dinamically, with the count from the xml file..
ie, this simplistic file would create 3 arrays with 3 values each...
But these can and surelly will vary...
So any dll entry can have more values than other...

Since this is simple XML and I have looked through agraham's xml reader yet, I can put something together with a function I wrote below (assuming the XML doesn't format)

It works by processing the xml sequentially; the return value of the first match becomes a parameter for the next tag, and so on...
B4X:
Sub ParseXml2(html, str1, str2, str3)


   x=StrIndexOf(html,str1,0)
   y=StrIndexOf(html,str2,x+StrLength(str1))
   z=StrIndexOf(html, str3, y+StrLength(str1))

   Return SubString(html, y+StrLength(str2), z-(y+StrLength(str2)))

End Sub

I have used this in a couple of programs and has worked for me ok so far.
 

Cableguy

Expert
Licensed User
Longtime User
Thanks for the suggestion Digitaldon37...
I have started to grasp the xml dll...
It seems I had too many root elements..(!)
I have searched for a syntax explanation on the xml creation files, but it's all too tecnical...
I Have now started reading my xml, and hopefully will have a working module today or tomorrow...


EDIT.
Arrrrggghhhh...

I think I'll stick to what I DO KNOW...working with ini files....At least borrowing their structure....
It is SO much simpler to read and use...
 
Last edited:

Cableguy

Expert
Licensed User
Longtime User
I'm stuck!!!!

My authentication routine uses a Tweaked WebBrowserEX control, and it basically Logs In the user to the Forum, in and "invisible"way, and checks if the user is a licensed one...
Now I need to be able to download a "DllList" file....

Before uploading any file, I started testing if I could DownLoad any of the already learking zip files, in the "Aditional Libraries" Sub-forum...
Using the WebBrowser I can download but I'm prompt with a "FileDownload Dialog" asking me what to do:
save, open or cancel...
I've googled a bit and cannot find a way to go around this dialog...
Then I tryied using the http lib...
But it does not "Know" that I'm logged in to the forum, thus returns a "-1" length file...

Is there a way I can use to "Hide" the "dowonloadfile dialog", or work with the http dll, in a way it can download a file from the restrict Sub-Forums???

The "For the time being" solution would be to upload the file to a "Free" sub-forum...
 

digitaldon37

Active Member
Licensed User
Longtime User
I'm stuck!!!!

My authentication routine uses a Tweaked WebBrowserEX control, and it basically Logs In the user to the Forum, in and "invisible"way, and checks if the user is a licensed one...
Now I need to be able to download a "DllList" file....

Before uploading any file, I started testing if I could DownLoad any of the already learking zip files, in the "Aditional Libraries" Sub-forum...
Using the WebBrowser I can download but I'm prompt with a "FileDownload Dialog" asking me what to do:
save, open or cancel...
I've googled a bit and cannot find a way to go around this dialog...
Then I tryied using the http lib...
But it does not "Know" that I'm logged in to the forum, thus returns a "-1" length file...

Is there a way I can use to "Hide" the "dowonloadfile dialog", or work with the http dll, in a way it can download a file from the restrict Sub-Forums???

The "For the time being" solution would be to upload the file to a "Free" sub-forum...

I'm going to guess that user and password information needs to be sent in the http headers when using the http library.

Logged in using FireFox and an add-on to view header info, I can see the cookies that are used and the encoded userid and password in the http header matches them.
 

Cableguy

Expert
Licensed User
Longtime User
I'm going to guess that user and password information needs to be sent in the http headers when using the http library.

Logged in using FireFox and an add-on to view header info, I can see the cookies that are used and the encoded userid and password in the http header matches them.

I've tryed to use the post method but I have NO CLUE on how that is done...
Please PM me with your findings...
 

Zenerdiode

Active Member
Licensed User
Paulo,

While you're getting your head all fuzzy with XML and the like, an 'easy' thing for you to tackle is to check whether an internet connection is available. If I have my WiFi switched off; the program errors. Maybe you could test for a connection - or trap the error?
 

Cableguy

Expert
Licensed User
Longtime User
I am now stuck....
I cannot figure out how to use http with cookies, or whatever is necesasry, in order to acomplish a transparent download of a file in a reserved Forum....
If any one has ever tryed it or has some info I can use, please PM me...
Dll2Date cannot evolve untill this is surpassed as ALL the purpose of this app is to download and extract the files from the Forum...
 

digitaldon37

Active Member
Licensed User
Longtime User
I am now stuck....
I cannot figure out how to use http with cookies, or whatever is necesasry, in order to acomplish a transparent download of a file in a reserved Forum....
If any one has ever tryed it or has some info I can use, please PM me...
Dll2Date cannot evolve untill this is surpassed as ALL the purpose of this app is to download and extract the files from the Forum...

I think that there is a lot of value just being able to compare what is installed locally against what is available on a remote master list.

Worse case scenario, you can always shell to the program URL and let pocket IE worry about authentication and downloading.

Just my opinion...
 

Cableguy

Expert
Licensed User
Longtime User
One of my main "Walls" has been grounded...
I am now able to retrieve a page cookie into a string format...
Now the next wall to bring down will be to use those strings in an http request...
I am working with some tweaked out dlls...
One is WebBrowserEX with a few new methods that were implemented in a "Need to achieve..." basis...

So at this point I need some enlightment on how to use the cookies string in an http request...
Any One???
 
Last edited:

Cableguy

Expert
Licensed User
Longtime User
A new developers version as been posted...
All existing barriers have been overcome...
The new release adds smal UI changes, and tests file download...thanks to digitaldon37 who provided me with some personal, but very usefull info...
I NEED YOUR FEEDBACK ON THIS ONE....
What was your test result?

This release retrieves various sets of cookies, a few from the current browser session, and the rest from the user cookies folder...
I am retrieving the cookie folder path from the regestri under currentuser, to ensure that even someone with more than one account on it's desktop can use this...

This is comming slowly, and it will be a bit slower, as I am facing some personal issues...
If someone else wishes to persue this in a quicker way, I will gladly give the source code and whatever explanation is required to understand my "way of doing things"
 

digitaldon37

Active Member
Licensed User
Longtime User
A new developers version as been posted...
All existing barriers have been overcome...
The new release adds smal UI changes, and tests file download...thanks to digitaldon37 who provided me with some personal, but very usefull info...
I NEED YOUR FEEDBACK ON THIS ONE....
What was your test result?

This release retrieves various sets of cookies, a few from the current browser session, and the rest from the user cookies folder...
I am retrieving the cookie folder path from the regestri under currentuser, to ensure that even someone with more than one account on it's desktop can use this...

This is comming slowly, and it will be a bit slower, as I am facing some personal issues...
If someone else wishes to persue this in a quicker way, I will gladly give the source code and whatever explanation is required to understand my "way of doing things"

Hi...I'm looking for some feedback from the library developers on how to best implement this. I have a couple of options below - please let me know what you think.

The purpose of this program is to provide B4PPC developers a way to know if there are any updates to libraries, without having to always check the B4PPC forums.

1. Updates and new libraries: author notifies Paulo, so he updates his DLL post: http://www.b4x.com/forum/additional-libraries/3314-dll-version-listings.html

With this option, the Dll2Date program parses that post and extracts the URLs for each library, then parses each page associated with that URL and gets a listing of attached files. This list is compared to a list that has been saved on your pc, and notifies you of any differences.

This only works if authors continue to notify Paulo of changes, and if the attachments are named differently for each release. Since Agraham has the most libraries and uses this method, this seems to make the most sense.

2. Library authors create an XML file with information about their library and uploads that xml along with their library to their post.

With this option, the Dll2Date program can find those xmls (same parsing of Paulo's DLL post) and download those for comparison.

This option creates additional work for the library author, but seems to be more robust and provides other capabilities such as using in different programs.
 

agraham

Expert
Licensed User
Longtime User
Option 1 definitely as far as I am concerned. There's no way I want to go back and create an XML file for each existing library and repost it.
This only works if authors continue to notify Paulo of changes
Actually, as long as the library name is in the list and the link to the post is correct the version number doesn't have to be up to date, the version comes from the archive name at the other end of the link. It even works as long as the archive name changed from the last version without explicit versioning in thename or if an additional attachment was posted. It only breaks if the updated library is posted in a different place, which I don't like doing because it leaves obsolete code lying around.
and if the attachments are named differently for each release
I think this is so obviously good practice ...
 

Cableguy

Expert
Licensed User
Longtime User
As you have probably noticed, DigitalDon37 has taken up the chalenge of:
1st - Understand my erratic way of coding....Sometimes I can't even understand how I made things work...
2nd Taking this App wannabe to a full grown and wel thought trough APLICATION...
I will still be around, and provide any feedback or clarify any doubt about my coding...
Hope you guys can help digitaldon as you have helped me so many times..
 

digitaldon37

Active Member
Licensed User
Longtime User
Option 1 definitely as far as I am concerned. There's no way I want to go back and create an XML file for each existing library and repost it.

Actually, as long as the library name is in the list and the link to the post is correct the version number doesn't have to be up to date, the version comes from the archive name at the other end of the link. It even works as long as the archive name changed from the last version without explicit versioning in thename or if an additional attachment was posted. It only breaks if the updated library is posted in a different place, which I don't like doing because it leaves obsolete code lying around.
I think this is so obviously good practice ...

When I posted this I was thinking of situations where the lib author writes a new lib - this will still require notifying Paulo so he can update the main post. It would be beyond my skills to comb through all the forum postings looking for new libraries.

Since agraham weighed in with his opinion, and he's got the most libraries, I shall attempt to implement option #1

There are some other considerations to work through for option #1, suggestions welcome (plus add anything I might be missing)

1. How to baseline what is installed on the PC. The easy answer would be to get the remote listing and build a list file locally under the assumption that everything is already current - any future changes on the B4PPC side would indicate an upgrade is available

2. How to distinguish whether the library is for PC, Mobile, or Both. For example, agraham's xml library is the only xml library, so I can assume it is for both platforms. Some of his other libraries have the words 'desktop' and 'device' so I can assume those are platform specific.

3. How does everyone store libraries locally when they download them? Do unzip on top of existing libraries and delete the zip file? How do you update your projects with the latest library (if you even do) - how should this be handled by a program?

Probably on the first version it will only notify that an upgrade is available and not do anything automatically. I'm trying to think ahead of what this program might be asked to do.
 

Cableguy

Expert
Licensed User
Longtime User
My next step was going to be creating a sub that, before exiting the firstrun, would go trought the libraries folde and create a list of all the existing libraries...
I can create and maintain a xml like file on the dll listing thread...
I can even go through the older dlls in order to retrieve the xml data..
But I need US to concour in a xml format...
This way, instead of going trough all the dll listing post and parsing it, it would only require to download the xml file and compare withe the lattest one on disk...

As I posted before... my xml file example would be something like...


B4X:
<Client Side xml file>
   <Total Dlls>2</Total Dlls>
   <Dll 1>
      <Name>Here we put the dll name</name>
      <Version>1.0</Version>
      <Description>Here we make a simple description of the Dll</Description>
      <Download URL>www.b4x.com\Forum........</Download URL>
      <Desktop Dll File>xpto-desktop.dll</Desktop Dll File>
                <Device Dll File>xpto-device.dll</Device Dll File>
      <Desktop CS File>xpto-desktop.cs</Desktop CS File>
                <Device CS File>xpto-device.cs</Device CS File>
      <Help File>xpto.chm</Help File>
                <ExtraFile1>extra.img</ExtraFile1>
   </Dll 1>
   
   <Dll 2>
      <Name>Here we put the dll name</name>
      .
                .
                .
                .
                .
   </Dll 2>
   .
   .
   .
   .
   .
   .
   </Client Side xml file>

No extra work for developers, except the indicating me, what files to extract to libraries folder
 
Last edited:

agraham

Expert
Licensed User
Longtime User
2. How to distinguish whether the library is for PC, Mobile, or Both.
In general they are either desktop only like ControlsExDesktop or for both, in that a device specific library like ControlsExDevice will in fact include a desktop dummy of limited functionality like ControlsExDevice Dummy to allow desktop development. Therefore in practice I think that you can regard a library archive as an individual entity and not worry about its intended target.
3. How does everyone store libraries locally when they download them?
No matter what I do with the contents I keep any downloaded archives (mainly dzts) in a single archive folder and extract them any time I want to reference them. So in my case just scanning that folder will tell whether I have downloaded the latest version.
Probably on the first version it will only notify that an upgrade is available and not do anything automatically.
I seem to remember that Cableguy implied in a previous post that Erel doesn't want any automatic downloads happening.
 
Top