Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Jul 02, 2020 1:24 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 32 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Win32 Application Builder Changes
PostPosted: Wed May 07, 2008 3:36 pm 
Offline
User avatar

Joined: Wed Sep 28, 2005 8:39 am
Posts: 9341
Location: St Augusta, MN
I noticed that some people are wondering why Win32 executables now get a Libs folder that contains DLLs -- a very valid thing to wonder about. There's a Read Me buried in the Documentation directory that explains this change, but I'm going to post the contents of it here so that it's easier to find.

Read Me.txt wrote:
Win32 Application Builder Changes
Aaron Ballman (aaron@realsoftware.com)

Summary:
One of the striking changes that is happening in REALbasic 2008 Release 2 is that REALbasic will no longer be building a single-file executable for all Win32 applications. Instead, if your application makes use of any plugins (including "internal" plugins that come with REALbasic), your application will be built to a self-contained folder that contains the executable file as well as the DLL files for the plugins. This is not a change we made lightly, but it is one that had to be made.

History:
In previous versions of REALbasic, the plugin DLL files were included within the executable itself. Early versions of REALbasic would attempt to write the DLLs out to disk when the application was launched. This caused many problems with 3rd party AV software, as well as "locked" machines, machines low on disk space, situations where you could not modify the target machine, etc.

Later versions of REALbasic changed the behavior in that the DLL files were not written out to disk at application launch time. Instead, the files were loaded into memory via a custom-written DLL loader. This solved all of the issues that users ran into with previous versions of REALbasic. However, it also introduced new issues that can no longer be ignored. Since this mechanism for loading DLLs skirts around the system DLL loader, it does not function properly (nor can it ever) in all situations. What's worse, the failure points can be seemingly random, and very difficult to track down. For instance, the plugin may load fine on a 32-bit version of XP, but crash in the middle of execution while running on a 64-bit DEP-enabled machine. There is simply no way to tell whether a plugin will cause an issue or not (for instance, the plugin may require the OS to load an application compatibility shim in order to function properly -- but the custom memory loader will never be able to accomplish this).

Repeated discussions with the DLL loader team from Microsoft cemented the understanding that continuing with the current architecture would be increasingly problematic. We decided to no longer fight against the operating system with regards to handling plugins. The DLLs will be present on the disk, next to the executable so that the OS DLL loader can handle loading them instead of requiring us to mimic the loader functionality. This resolves all of the issues in a consistent way, with as little chance for failure as possible.

Usage:
The REALbasic compiler will spit out a folder containing a single .exe file for your application, along with a directory containing one DLL file per plugin that the executable requires. The DLL files must reside in that directory, and must retain their original names. Any name or relative location changes are not supported and may cause the application to fail to load. This means that you cannot place the DLL files into the System directory. This also means that you cannot have multiple applications using the same DLL files. These two constraints remove any possibilities of running into the classic "DLL hell" problems which you've already been avoiding by using REALbasic.

The folder which the DLLs are placed into will be the name of your executable file, plus a suffix of "Libs." Since all executable names must be unique, this ensures that the plugin support folder has a unique name as well, which in turn allows multiple REALbasic executables to reside side-by-side.

If your application does not use any plugins, then the compiler will spit out a single .exe file instead of a folder.

Examples:
Let's say you have a project which uses three plugins: RBScript, BevelButton, and MyCustomPluginClass. When you build this application, the file structure on disk will be:

My Application
My Application.exe
My Application Libs
RBScript.dll
Appearance Pak.dll
My Custom Plugin.dll

Conclusion:
While this may seem like a hardship for REALbasic users creating Win32 applications, it's not as large of a problem as you might think. Zipping up a folder to send it to a friend is not much different from zipping up a single file (to reduce its size) to send it to a friend. And professional applications on Windows require an installer which can easily package the contents of the folder for distribution. The trade-off is that your Win32 applications will not suffer from the wide variety of obscure problems related to attempting to circumvent the natural tendencies of the platform.


Top
 Profile  
Reply with quote  
 Post subject: Re: Win32 Application Builder Changes
PostPosted: Thu May 08, 2008 8:45 am 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
The formatting above is a little misleading. All I've done is update the indent and specify which one's are folders.

My Application (folder)
---My Application.exe
---My Application Libs (folder)
------RBScript.dll
------Appearance Pak.dll
------My Custom Plugin.dll

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Win32 Application Builder Changes
PostPosted: Thu May 08, 2008 4:10 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 4:19 pm
Posts: 398
Location: European Community
Hi,

Thanks Aaron for the explanation.

Indeed I see and understand the benefits of this new structure. This new structure has only one disadvantage for me.

I am using my own updater (based on George Bonisch Episode 5 updater) which updates the single executable automaticly when I place a new version onto a folder on my website. Now I have to update the updater to load the directory also.

But it is worth the effort and now we can have two RealBasic applications running using the same DLL file. It is worth the little price we have to pay for this feature. I always found the single executable a very good idea, however I am more than willing to give it up for the stability the new structure provide.

Have a nice day and all the best.

Friendly greetings,

Bad_Wolf


Top
 Profile  
Reply with quote  
 Post subject: Re: Win32 Application Builder Changes
PostPosted: Thu May 08, 2008 4:22 pm 
Offline
User avatar

Joined: Wed Sep 28, 2005 8:39 am
Posts: 9341
Location: St Augusta, MN
Bad_Wolf wrote:
But it is worth the effort and now we can have two RealBasic applications running using the same DLL file. It is worth the little price we have to pay for this feature.


It pains me to point this out since you're being so nice.. but you *can't* have two RB applications running using the same DLL file. That's an unsupported configuration.

Read Me.txt wrote:
This also means that you cannot have multiple applications using the same DLL files.


Top
 Profile  
Reply with quote  
 Post subject: Re: Win32 Application Builder Changes
PostPosted: Thu May 08, 2008 6:35 pm 
Offline

Joined: Sun Oct 09, 2005 11:58 am
Posts: 273
Location: Northeastern, Nevada, USA
Hate to point this out, but the new folder structure for Windows has created a bug when building projects. You cannot generate Windows and Linux executables at the same time on Mac OS X 10.5 using RB Pro 2008 r2. You can only build one, or the other -- but not both.

Attempting to simultaneously build both spawns the following error dialog:

| Compilation of "MyProgram.rbp" failed.
|
| A file system error occurred (#104) for "myprogram". If the application already
| exists, please make sure that it is not currently running; otherwise, please
| make sure that the destination directory is writable.
|
| ( Cancel )


The work around is to make sure you move the Windows application folder to a different location before building the Linux application.


Top
 Profile  
Reply with quote  
 Post subject: Re: Win32 Application Builder Changes
PostPosted: Thu May 08, 2008 6:43 pm 
Offline
User avatar

Joined: Wed Sep 28, 2005 8:39 am
Posts: 9341
Location: St Augusta, MN
Or name them differently, but that's a great point. You should file a bug report about that so we can default to a more sensible behavior (which is likely to be: rename subsequent naming conflicts to something else).


Top
 Profile  
Reply with quote  
 Post subject: Re: Win32 Application Builder Changes
PostPosted: Thu May 08, 2008 7:14 pm 
Offline

Joined: Sun Oct 09, 2005 11:58 am
Posts: 273
Location: Northeastern, Nevada, USA
Aaron Ballman wrote:
... You should file a bug report about that ...


I receive an error when trying to submit a new bug report to the feedback system. I've got to run, I'll resubmit it (again) and post the error I get here later.


Top
 Profile  
Reply with quote  
 Post subject: Re: Win32 Application Builder Changes
PostPosted: Fri May 09, 2008 1:10 am 
Offline
User avatar

Joined: Sat Apr 29, 2006 10:13 am
Posts: 239
Location: Sweden
Quote:
These two constraints remove any possibilities of running into the classic "DLL hell" problems which you've already been avoiding by using REALbasic.

But what if an old .dll gets mixed with a new .exe when you update a deployment after, say, disk full or just due to sloppiness?
Do all dlls come with a fresh time stamp so it could be verified in that way that they go with the new exe?

Lennart


Top
 Profile  
Reply with quote  
 Post subject: Re: Win32 Application Builder Changes
PostPosted: Fri May 09, 2008 9:27 am 
Offline

Joined: Sun Oct 09, 2005 11:58 am
Posts: 273
Location: Northeastern, Nevada, USA
yeslekmc wrote:
Aaron Ballman wrote:
... You should file a bug report about that ...


I receive an error when trying to submit a new bug report to the feedback system. I've got to run, I'll resubmit it (again) and post the error I get here later.

OK, so I sent it back to the feedback system again. This time I received no errors after hitting submit. In fact, the form cleared and that's about all that happened. No feedback id, no nothing. How do I know it was submitted? Then I clicked on "View my watchlist", and it doesn't show up -- just my old feedback bug reports. I'm frustrated with the feedback system.


Top
 Profile  
Reply with quote  
 Post subject: Re: Win32 Application Builder Changes
PostPosted: Fri May 09, 2008 10:24 am 
Offline
Real Software Engineer

Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7858
Location: Canada, Alberta, Near Red Deer
You should get an automated email back to you with a URL in it

Check your spam filters

The old feedback system does not get the new reports

_________________
Norman Palardy (Real Software)


Top
 Profile  
Reply with quote  
 Post subject: Re: Win32 Application Builder Changes
PostPosted: Fri May 09, 2008 10:59 am 
Offline

Joined: Mon May 21, 2007 4:01 am
Posts: 13
my application is running on previous releases. When I try releases 2 I get:

Runtime Error
....
..\..\..\..\Common\plugin.cpp: 7317
Failure Condition: pluginEntryTable.GetEntry (entrypointName, out)
can't find plugin method BevelButton.DeleteAllRows

When I push OK then

...BevelButton.AddRow(text as string)
...BevelButton.AddSeperator

Anybody with similar problems?

rb2008r2 on WinXP


Top
 Profile  
Reply with quote  
 Post subject: Re: Win32 Application Builder Changes
PostPosted: Fri May 09, 2008 11:36 am 
Offline
User avatar

Joined: Wed Sep 28, 2005 8:39 am
Posts: 9341
Location: St Augusta, MN
This is an issue we were just alerted to yesterday (and is fixed for the next release): if your path contains non-ASCII characters, you'll run into build problems. So move the project to somewhere that doesn't contain non-ASCII characters as a work around.


Top
 Profile  
Reply with quote  
 Post subject: Re: Win32 Application Builder Changes
PostPosted: Fri May 09, 2008 1:12 pm 
Offline

Joined: Sun Oct 09, 2005 11:58 am
Posts: 273
Location: Northeastern, Nevada, USA
npalardy wrote:
You should get an automated email back to you with a URL in it

Check your spam filters

The old feedback system does not get the new reports

Ok, I realize that this is now off topic for the original intent of this thread. But, I'm really stumped with the Feedback system. It is confusing to me. I just checked my mail (including junk mail), and do not have anything from REAL Software's feedback system. I do have a REAL Software email from Tuesday (06-MAY-2008) letting me know that RB 2008 r2 is available, so REAL's email is making it through to me.

When I go to http://www.realsoftware.com/feedback, there is no idication about a "NEW" and "OLD" feedback system. How do I know where my feedback is going when I click on "Create Report"? And after I submit the report, how do I know where it ends up? When I click on "My Account" and then click "View my watch list", I do not see my just submitted report. It only shows reports I've submitted in the past year. If these are in the "OLD" system, how do I see what is in the "NEW" system?

I appreciate your assistance here. If you like, move this to a new thread as I realize it's off-topic. But honestly, I do not understand how the feedback system is suppose to work now, where submissions end up, and how to confirm that they were submitted. There is absolutely ZERO instruction, comment, or note of this at http://www.realbasic.com/feedback.

Thanks, ---> Kelsey


Top
 Profile  
Reply with quote  
 Post subject: Re: Win32 Application Builder Changes
PostPosted: Fri May 09, 2008 3:23 pm 
Offline

Joined: Mon May 21, 2007 4:01 am
Posts: 13
Aaron Ballman wrote:
So move the project to somewhere that doesn't contain non-ASCII characters as a work around.

Thanks, now it works


Top
 Profile  
Reply with quote  
 Post subject: Re: Win32 Application Builder Changes
PostPosted: Fri May 09, 2008 8:52 pm 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
I have a solution :-)

http://forums.realsoftware.com/viewtopic.php?f=1&t=22303

Gruß
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group