Once Again on Deployment

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Once Again on Deployment

Dan Shafer-3
Can someone give me or point me to a succinct status update on the  
current state of the ability to convert a Squeak image into a  
standalone application for WIndows, OSX and Linux? I know we can  
always deliver an image and a VM without sources and effectively  
create the appearance of a standalone but those suckers are huge, so  
my client is asking if the prospects for being able to deliver  
stripped-down and double-clickable apps is in the offing or in the  
distance.

Thanks.
Dan


Reply | Threaded
Open this post in threaded view
|

re: Once Again on Deployment

ccrraaiigg

Hi Dan--

        I plan to provide an answer for this with Spoon[1]. From a minimal
object memory (on the order of 64k), one will be able to load the
modules strictly necessary for the operation of an application.


-C

[1] http://netjam.org/spoon

--
Craig Latta
http://netjam.org/resume



Reply | Threaded
Open this post in threaded view
|

Re: Once Again on Deployment

Klaus D. Witzel
In reply to this post by Dan Shafer-3
Have a look at what Bert wrote recently in

-  
http://www.mail-archive.com/beginners@.../msg00330.html

/Klaus

On Thu, 13 Jul 2006 09:25:49 +0200, Dan Shafer wrote:

> Can someone give me or point me to a succinct status update on the  
> current state of the ability to convert a Squeak image into a standalone  
> application for WIndows, OSX and Linux? I know we can always deliver an  
> image and a VM without sources and effectively create the appearance of  
> a standalone but those suckers are huge, so my client is asking if the  
> prospects for being able to deliver stripped-down and double-clickable  
> apps is in the offing or in the distance.
>
> Thanks.
> Dan
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: Once Again on Deployment

Mikael Kindborg-2
Hi,

We are developing a software product for children we call "Magic
Words" and these are our experiences from experimenting with a
deployment version for WIndows.

We have found it useful to use a tiny laucher exe.

The problem we have had with the approach that Bert describes in the
page referred to below is that it takes quite a while for the
application to launch. We tried different variations for the ImageFile
parameter in the ini-file, but even when using the full pathname it
takes 15 seconds on my machine to start the app. (The parameters I
refer to are on this page, which is already pointed to by Bert's
message: http://minnow.cc.gatech.edu/squeak/3274)

As I recall, this problem have been discussed previously on the list,
and is related to how the virtual machine searches for image files at
startup and some quirks with a Windows API call involved in this. Hot
having investigated the detail about this (perhaps it can be fixed),
we wrote a tiny C program that simply starts Squeak with the image
file that contains our app as an argument. Using this method the app
launches in < 1 second.

Here is the source for the launcher app:

#include <windows.h>
#include <stdio.h>
#include <stdlib.h>

void LaunchSqueak(void);

int PASCAL WinMain( HINSTANCE inst, HINSTANCE previnst, LPSTR cmdline,
                    int cmdshow )
{
    //MSG         msg;

    /* shut up warning */
    previnst = previnst;
    cmdline = cmdline;

    LaunchSqueak();

    return(0);

} /* WinMain */


void LaunchSqueak()
{
    BOOL success;
    LPSTARTUPINFO sinfo;
    LPPROCESS_INFORMATION pinfo;
    LPSTR dir;
    LPSTR wdir;
    LPSTR command;

    // Startup info - no settings are used.

    sinfo = malloc (sizeof(STARTUPINFO));
    sinfo->cb = sizeof(STARTUPINFO);
    sinfo->lpReserved = (LPTSTR) NULL;
    sinfo->lpDesktop = (LPTSTR) NULL;
    sinfo->lpTitle = (LPTSTR) NULL;
    sinfo->dwX = (DWORD) NULL;
    sinfo->dwY = (DWORD) NULL;
    sinfo->dwXSize = (DWORD) NULL;
    sinfo->dwYSize = (DWORD) NULL;
    sinfo->dwXCountChars = (DWORD) NULL;
    sinfo->dwYCountChars = (DWORD) NULL;
    sinfo->dwFillAttribute = (DWORD) NULL;
    sinfo->dwFlags = (DWORD) NULL;
    sinfo->wShowWindow = 0;
    sinfo->cbReserved2 = 0;
    sinfo->lpReserved2 = NULL;
    sinfo->hStdInput = (HANDLE) NULL;
    sinfo->hStdOutput = (HANDLE) NULL;
    sinfo->hStdError = (HANDLE) NULL;

    // Returned process info - not used.

    pinfo = malloc(sizeof(PROCESS_INFORMATION));

    // Get current directory.

    dir = malloc(1000);
    GetCurrentDirectory(1000, dir);

    // Set working directory.

    wdir = malloc(1000);
    strcpy(wdir, dir);
    strcat(wdir, "\\Data");

    // Set command string.

    command = malloc(1000);
    strcpy(command, dir);
    strcat(command, "\\Data\\Squeak.exe App.image");
    //strcpy(command, dir);
    //strcat(command, "\\Data\\App.image");

    // Create the Squeak process.

    success = CreateProcess
        (
        NULL,           //LPCTSTR lpApplicationName,
        command,        //LPTSTR lpCommandLine,
        NULL,           //LPSECURITY_ATTRIBUTES lpProcessAttributes,
        NULL,           //LPSECURITY_ATTRIBUTES lpThreadAttributes,
        FALSE,          //BOOL bInheritHandles,
        (DWORD) NULL,   //DWORD dwCreationFlags,    ??
CREATE_NO_WINDOW use this flag? Appernetly not needed.
        NULL,           //LPVOID lpEnvironment,
        wdir,           //LPCTSTR lpCurrentDirectory,
        sinfo,          //LPSTARTUPINFO lpStartupInfo,
        pinfo           //LPPROCESS_INFORMATION lpProcessInformation
        );

    success = success;  // You can remove this, it was just to get a
place for a breakpoint for debugging.
}

We simply hardcoded the name of the application image and the
directory it is placed in. A bit ugly but seems to work. The following
is the directory layout:

AppDir (name of your program's directory)
  App.exe (name of the app's exe-file)
  Data
    App.image
    Squeak.exe (and related files you need)

We built this using the Open Watcom compiler.

Tried some of the ini options mention on http://minnow.cc.gatech.edu/squeak/3274
and WindowTitle works fine, but the options related to the Quit dialog
box did not work. The dialog always shows, with the standard text.
Here is the ini-file I used for testing, perhaps I got something
wrong:

[Global]
DeferUpdate=1
ShowConsole=0
DynamicConsole=1
ReduceCPUUsage=1
ReduceCPUInBackground=1
3ButtonMouse=0
1ButtonMouse=0
UseDirectSound=0
PriorityBoost=1
B3DXUsesOpenGL=0
CaseSensitiveFileMode=0
WindowTitle="Magic Words"
ImageFile="C:\Documents and
Settings\Mikael\Skrivbord\MagicWords\MagicWordsDev.image"
EnableAltF4Quit=0
QuitDialogMessage="Do you want to quit Magic Words?"
QuitDialogLabel="Magic Words"

To sum up, I think the deployment method we have used works very well,
and with a good installer installation is smooth. It is also easy to
put the program in a zip file and deploy it that way, or make a CD
with auto start.

I guess Mac and Linux also could use a simple start script to launch
Squeak with the desired image.

Regarding making a single exe, that would be nice for small
applications, but as Bert writes in this message, most programs need
additional files and various directories for application data etc.

Best regards, Micke

On 7/13/06, Klaus D. Witzel <[hidden email]> wrote:

> Have a look at what Bert wrote recently in
>
> -
> http://www.mail-archive.com/beginners@.../msg00330.html
>
> /Klaus
>
> On Thu, 13 Jul 2006 09:25:49 +0200, Dan Shafer wrote:
>
> > Can someone give me or point me to a succinct status update on the
> > current state of the ability to convert a Squeak image into a standalone
> > application for WIndows, OSX and Linux? I know we can always deliver an
> > image and a VM without sources and effectively create the appearance of
> > a standalone but those suckers are huge, so my client is asking if the
> > prospects for being able to deliver stripped-down and double-clickable
> > apps is in the offing or in the distance.
> >
> > Thanks.
> > Dan
> >
> >
> >
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Once Again on Deployment

Dan Shafer-3
In reply to this post by ccrraaiigg
Thanks, Craig. I'm going to investigate Spoon a bit myself this  
weekend, I think.

Dan

On Jul 13, 2006, at 12:50 AM, Craig Latta wrote:

>
> Hi Dan--
>
> I plan to provide an answer for this with Spoon[1]. From a minimal
> object memory (on the order of 64k), one will be able to load the
> modules strictly necessary for the operation of an application.
>
>
> -C
>
> [1] http://netjam.org/spoon
>
> --
> Craig Latta
> http://netjam.org/resume
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Once Again on Deployment

Dan Shafer-3
In reply to this post by Mikael Kindborg-2
Thanks to you and to Klaus. It appears the state of the art is about  
where I thought it was. The real problem with delivering a Squeak  
app, once you get the client past the issue of what constitutes a  
standalone (an increasingly meaningless term I suspect) is app size.  
Spoon sounds like a good step in the direction of giving me a  
stripped-down image to begin with. Now all I need is some discipline  
in how I code in Squeak so that I can file out just my stuff, suck it  
into a Spoon image, and then figure out what else from the original  
image needs to be brought in. Automatic tools to assist that process  
are, I suspect, in the works or in the wind but in the meantime, that  
feels daunting.

Dan

On Jul 13, 2006, at 2:49 AM, Mikael Kindborg wrote:

> Hi,
>
> We are developing a software product for children we call "Magic
> Words" and these are our experiences from experimenting with a
> deployment version for WIndows.
>
> We have found it useful to use a tiny laucher exe.

<<snip>>

Reply | Threaded
Open this post in threaded view
|

Re: Once Again on Deployment

timrowledge

On 13-Jul-06, at 10:15 AM, Dan Shafer wrote:

> Thanks to you and to Klaus. It appears the state of the art is  
> about where I thought it was. The real problem with delivering a  
> Squeak app, once you get the client past the issue of what  
> constitutes a standalone (an increasingly meaningless term I  
> suspect) is app size.

I've never really been able to comprehend this particular problem.  
Once upon a time, Smalltalk was huge; I mean really huge, it needed  
THREE 1.44Mb disks to distribute. Word was four or five back then but  
most machine had 2 or perhaps 4Mb of ram and maybe a 40MB disc.

Looking on my machine I see that
Address Book = 21.4Mb
Acrobat = 88Mb
Calculator = 7.1Mb (good grief, how?)
Firefox = 25Mb
GarageBand = 63Mb
iWeb = 307Mb !
microsoft messange = 15.6Mb
open office = 350Mb (eek! and it's total crap)

By comparison a not-terribly recent squeak 3.9 zip is 13Mb and the vm  
is about 6Mb (which is insane but this is after all OSX. ON RISC OS  
it is about 1Mb)

I swear, I've been sent one paragraph Word documents that are bigger  
than a squeak image.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
A paperless office has about as likely as a paperless bathroom.



Reply | Threaded
Open this post in threaded view
|

Re: Once Again on Deployment

Dan Shafer-3
Tim....

Your note made me laugh right out loud. You are so right. I went  
rummaging around my hard drive and discovered that so many apps I  
think of as "small, special-purpose tools" are tens or hundreds of MB  
in size. I think we're just not paying attention to that. Which  
raises the issue of why most of my clients ask the question anyway.  
Thanks for the reminder. Now I have some great pushback.

Dan

P.S. and OT -- I find Open Office (actually I'm using NeoOffice) to  
be quite useful and usable, nothing near total crap. Just another  
datapoint.
On Jul 13, 2006, at 10:39 AM, tim Rowledge wrote:

>
> On 13-Jul-06, at 10:15 AM, Dan Shafer wrote:
>
>> Thanks to you and to Klaus. It appears the state of the art is  
>> about where I thought it was. The real problem with delivering a  
>> Squeak app, once you get the client past the issue of what  
>> constitutes a standalone (an increasingly meaningless term I  
>> suspect) is app size.
>
> I've never really been able to comprehend this particular problem.  
> Once upon a time, Smalltalk was huge; I mean really huge, it needed  
> THREE 1.44Mb disks to distribute. Word was four or five back then  
> but most machine had 2 or perhaps 4Mb of ram and maybe a 40MB disc.
>
> Looking on my machine I see that
> Address Book = 21.4Mb
> Acrobat = 88Mb
> Calculator = 7.1Mb (good grief, how?)
> Firefox = 25Mb
> GarageBand = 63Mb
> iWeb = 307Mb !
> microsoft messange = 15.6Mb
> open office = 350Mb (eek! and it's total crap)
>
> By comparison a not-terribly recent squeak 3.9 zip is 13Mb and the  
> vm is about 6Mb (which is insane but this is after all OSX. ON RISC  
> OS it is about 1Mb)
>
> I swear, I've been sent one paragraph Word documents that are  
> bigger than a squeak image.
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> A paperless office has about as likely as a paperless bathroom.
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Once Again on Deployment

Andreas.Raab
In reply to this post by timrowledge
tim Rowledge wrote:
> I swear, I've been sent one paragraph Word documents that are bigger
> than a squeak image.

Yeah, I've seen this, too, after going to this website which asked me to
click "yes" on the little notifier ;-)

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: Once Again on Deployment

Steven W Riggins
In reply to this post by timrowledge

On Jul 13, 2006, at 10:39 AM, tim Rowledge wrote:

> I swear, I've been sent one paragraph Word documents that are  
> bigger than a squeak image.

They didn't run gc on the word doc (am serious heh)  Save As: usually  
makes docs much smaller (or turning off Fast Save)  Just a bit o'  
useless info :)

Reply | Threaded
Open this post in threaded view
|

Re: Once Again on Deployment

johnmci
In reply to this post by timrowledge

On 13-Jul-06, at 10:39 AM, tim Rowledge wrote:

> By comparison a not-terribly recent squeak 3.9 zip is 13Mb and the  
> vm is about 6Mb (which is insane but this is after all OSX. ON RISC  
> OS it is about 1Mb)

I should note the mac vm only contains 5.2mb of executable code, the  
other bits are pretty graphics for the Finder.
The 5.2mb is also misleading since that includes both the intel and  
powerpc version so the VM is roughly 2.6 MB for a platform.
that compares well with the flight tracker widget for dashboard which  
is 2.5MB


--
========================================================================
===
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===



Reply | Threaded
Open this post in threaded view
|

Re: Once Again on Deployment

Steven W Riggins

On Jul 13, 2006, at 1:00 PM, John M McIntosh wrote:

> I should note the mac vm only contains 5.2mb of executable code,  
> the other bits are pretty graphics for the Finder.
> The 5.2mb is also misleading since that includes both the intel and  
> powerpc version so the VM is roughly 2.6 MB for a platform.
> that compares well with the flight tracker widget for dashboard  
> which is 2.5MB

Can the Mac vm track flights? Huh? :)

Reply | Threaded
Open this post in threaded view
|

Re: Once Again on Deployment

Edgar J. De Cleene
In reply to this post by johnmci
John M McIntosh puso en su mail :

> I should note the mac vm only contains 5.2mb of executable code, the
> other bits are pretty graphics for the Finder.
> The 5.2mb is also misleading since that includes both the intel and
> powerpc version so the VM is roughly 2.6 MB for a platform.
> that compares well with the flight tracker widget for dashboard which
> is 2.5MB
I have many of your's PowerPc only what is 1.3 to 1.5 Mb and works without
any problem



               
_________________________________________________________
Horóscopos, Salud y belleza, Chistes, Consejos de amor:
el contenido más divertido para tu celular está en Yahoo! Móvil.
Obtenelo en http://movil.yahoo.com.ar

Reply | Threaded
Open this post in threaded view
|

Re: Once Again on Deployment

dcorking
In reply to this post by Dan Shafer-3
On 7/13/06, Dan Shafer <[hidden email]> wrote:
> I think we're just not paying attention to that. Which
> raises the issue of why most of my clients ask the question anyway.
> Thanks for the reminder. Now I have some great pushback.

Yes - maybe they put it up as some kind of paper tiger, or they are
merely afraid that your installer will cause DLL hell (you should be
able to reassure them on that.)

Maybe they just want a shorter manifest to copy into their remote
desktop management system and virus scanner :)

Although a single executable is nice in the few cases when it still
happens, remind your clients what they already know (and Bert already
said): that most of the world is making distributable apps with heaps
of run-time dependencies (_big_ virtual machines,  class files and
libraries.)  All Dan Shafer's product might install is a small VM, an
image, a cute icon to run the right image with the right VM, and an
uninstaller.

I think standalone executables without installers confuse users these
days.  It is no longer the user's job to think about where to install
it, or how to make a shortcut to it.

David

Reply | Threaded
Open this post in threaded view
|

Re: Once Again on Deployment

Lex Spoon
In reply to this post by Dan Shafer-3
Dan Shafer <[hidden email]> writes:
> Can someone give me or point me to a succinct status update on the
> current state of the ability to convert a Squeak image into a
> standalone application for WIndows, OSX and Linux?

There is a lot of material on the wiki.  I have deployed Squeak
programs a few times now.  In short, it is not push-button, but it is
not a big deal, either.  It seems no better or worse than distributing
a Java or C program.


A good starting point for information is the FAQ entry on this topic:

    http://minnow.cc.gatech.edu/squeak/778


Being a wiki, of course if anyone has something to add they are
welcome....


-Lex