standalone/runtime executable

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

standalone/runtime executable

Gour
Hello,

there are some Smalltalks like Dolphin, VisualWorks..which can, afaict,
create stand-alone executable for easier deployment to end users.

I'm aware that Pharo probably has more important tasks to tackle first,
but just curious if creating stand-alone/runtime exectuables is
somewhere on its radar?


Sincerely,
Gour

--
As a lamp in a windless place does not waver, so the transcendentalist,
whose mind is controlled, remains always steady in his meditation on the
transcendent self.



Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

Peter Uhnak
On Thu, Aug 18, 2016 at 10:36:50AM +0200, Gour wrote:
> Hello,
>
> there are some Smalltalks like Dolphin, VisualWorks..which can, afaict,
> create stand-alone executable for easier deployment to end users.
>
> I'm aware that Pharo probably has more important tasks to tackle first,
> but just curious if creating stand-alone/runtime exectuables is
> somewhere on its radar?

This essentially means bundling-in the VMs. If you only target Mac and/or Win, it should be easy.
If you aim for linux, then good luck… I have a sometimes working setup that creates a build with the VMs and platform-specific launchers, but I don't really have time right now to clean it up and share it… but if you can wait a couple of weeks...

There was also effort to push for NixOS iirc, but I don't know how that works.

Peter

Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

Gour
On Thu, 18 Aug 2016 11:07:23 +0200
Peter Uhnak <[hidden email]> wrote:

> If you only target Mac and/or Win, it should be easy. If you aim for
> linux, then good luck…

If I'd use some other compiled language, then covering Mac/Win would be
fine considering that Linux users are (mostly) accustomed to build
install using ther preferred package manager, but I'm not sure how does
it work with Linux not seeing any end-user app written in Pharo
available for e.g. Debian?

> I have a sometimes working setup that creates a build with the VMs
> and platform-specific launchers,

Does it also include stripping the VM from the stuff as it is done with
other Smalltalks like the ones I've mentioned in original email?

> but I don't really have time right now to clean it up and share it…
> but if you can wait a couple of weeks...

There is no rush since I'm just starting learning Pharo...

> There was also effort to push for NixOS iirc, but I don't know how
> that works.

I did consider to switch to NixOS recently, but then decide to settle on
Debian for all machines I have to admin...


Sincerely,
Gour

--
The embodied soul may be restricted from sense enjoyment,
though the taste for sense objects remains. But, ceasing
such engagements by experiencing a higher taste,
he is fixed in consciousness.



Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

Peter Uhnak
On Thu, Aug 18, 2016 at 11:25:45AM +0200, Gour wrote:

> On Thu, 18 Aug 2016 11:07:23 +0200
> Peter Uhnak <[hidden email]> wrote:
>
> > If you only target Mac and/or Win, it should be easy. If you aim for
> > linux, then good luck…
>
> If I'd use some other compiled language, then covering Mac/Win would be
> fine considering that Linux users are (mostly) accustomed to build
> install using ther preferred package manager, but I'm not sure how does
> it work with Linux not seeing any end-user app written in Pharo
> available for e.g. Debian?

I am not sure what you mean by "not seeing any end-user app written in Pharo".

>
> > I have a sometimes working setup that creates a build with the VMs
> > and platform-specific launchers,
>
> Does it also include stripping the VM from the stuff as it is done with
> other Smalltalks like the ones I've mentioned in original email?

There is work being done on a "minimal Pharo bootstrap" which would allow you to take just the core of the platform and install whatever you need on top.
But I don't know the current state.

Peter

Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

Gour
On Thu, 18 Aug 2016 11:55:40 +0200 Peter Uhnak
<[hidden email]> wrote:

> I am not sure what you mean by "not seeing any end-user app written
> in Pharo".

Afaics, there are no applications written using Pharo to be installed
under Debian, right?

> There is work being done on a "minimal Pharo bootstrap" which would
> allow you to take just the core of the platform and install whatever
> you need on top. But I don't know the current state.

OK. Thanks.


Sincerely,
Gour

--
A person is said to be elevated in yoga when, having renounced
all material desires, he neither acts for sense gratification
nor engages in fruitive activities.



Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

Offray Vladimir Luna Cárdenas-2
In reply to this post by Gour
Hi,


On 18/08/16 11:25, Gour wrote:

> On Thu, 18 Aug 2016 11:07:23 +0200
> Peter Uhnak <[hidden email]> wrote:
>
>> If you only target Mac and/or Win, it should be easy. If you aim for
>> linux, then good luck…
> If I'd use some other compiled language, then covering Mac/Win would be
> fine considering that Linux users are (mostly) accustomed to build
> install using ther preferred package manager, but I'm not sure how does
> it work with Linux not seeing any end-user app written in Pharo
> available for e.g. Debian?

There is. See Phratch: http://www.phratch.com/

>> I have a sometimes working setup that creates a build with the VMs
>> and platform-specific launchers,
> Does it also include stripping the VM from the stuff as it is done with
> other Smalltalks like the ones I've mentioned in original email?

I remembered some mails about locking up the image so you can't not
access the developer environment. That precludes a lot of the Smalltalk
power and message IMHO.

>> There was also effort to push for NixOS iirc, but I don't know how
>> that works.
> I did consider to switch to NixOS recently, but then decide to settle on
> Debian for all machines I have to admin...

You can use Nix package manager with your current distro (debian, arch,
etc.) This combination have worked for me when the distro repos lack of
some package/version I care about or there are some dependency problems
on them, so you can have it as a distro neutral alternative package
manager that doesn't mess around with your current system without
leaving the convenience your favorite tool set (apt, dpkg, pacman,
builds, recipes and so on).

Cheers,

Offray

Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

Peter Uhnak
In reply to this post by Gour
On Thu, Aug 18, 2016 at 12:14:35PM +0200, Gour wrote:
> On Thu, 18 Aug 2016 11:55:40 +0200 Peter Uhnak
> <[hidden email]> wrote:
>
> > I am not sure what you mean by "not seeing any end-user app written
> > in Pharo".
>
> Afaics, there are no applications written using Pharo to be installed
> under Debian, right?

I'm still confused... do you mean in distribution? No, there is no such app for debian.

There is however PharoLauncher, which is technically an app written in Pharo, that is available for Ubuntu (you could probably install the .deb in debian though).

Also my DynaCASE https://dynacase.github.io/#download has linux build that should run on debian even if you don't have the required libs installed (it has them pre-downloaded, but I haven't tested it on non-debian systems).

Peter

Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

Gour
On Thu, 18 Aug 2016 13:05:39 +0200 Peter Uhnak
<[hidden email]> wrote:

> I'm still confused... do you mean in distribution?

Yes.

> There is however PharoLauncher, which is technically an app written
> in Pharo, that is available for Ubuntu (you could probably install
> the .deb in debian though).

I have PharoLauncher installed manualy and was not aware there is deb
package for it.

> Also my DynaCASE https://dynacase.github.io/#download has linux build
> that should run on debian even if you don't have the required libs
> installed (it has them pre-downloaded, but I haven't tested it on
> non-debian systems).

Thanks for the pointer.


Sincerely,
Gour

--
The intricacies of action are very hard to understand.
Therefore one should know properly what action is,
what forbidden action is, and what inaction is.



Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

Gour
In reply to this post by Offray Vladimir Luna Cárdenas-2
On Thu, 18 Aug 2016 12:21:11 +0200 Offray Vladimir Luna Cárdenas
<[hidden email]> wrote:

> There is. See Phratch: http://www.phratch.com/

That's very nice example, thank you.

> You can use Nix package manager with your current distro (debian,
> arch, etc.) This combination have worked for me when the distro repos
> lack of some package/version I care about or there are some
> dependency problems on them, so you can have it as a distro neutral
> alternative package manager that doesn't mess around with your
> current system without leaving the convenience your favorite tool set
> (apt, dpkg, pacman, builds, recipes and so on).

I'm aware of it, but Debian provides all what I need...I was more
interested for the NixOS as distro, but after few install failures I gave up on
it and now managing  to keep my Sid in a working state. :-)

Sincerely,
Gour

--
You have a right to perform your prescribed duty, but you
are not entitled to the fruits of action. Never consider
yourself the cause of the results of your activities,
and never be attached to not doing your duty.



Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

kilon.alios
In reply to this post by Gour
Pharo has the easiest deployment in any language I have used. It's just a single folder. It does not get any simpler way than that. You can also customize the name of the executable, the icon, the folder and the image itself. There is no need to install Pharo or your Pharo application.

So what you are asking yes it would be good for a beginner but someone that has some substantial experience with Pharo it's nowhere near as necessary.

Start experimenting you will be suprised how powerful it is.

On Thu, 18 Aug 2016 at 11:37, Gour <[hidden email]> wrote:
Hello,

there are some Smalltalks like Dolphin, VisualWorks..which can, afaict,
create stand-alone executable for easier deployment to end users.

I'm aware that Pharo probably has more important tasks to tackle first,
but just curious if creating stand-alone/runtime exectuables is
somewhere on its radar?


Sincerely,
Gour

--
As a lamp in a windless place does not waver, so the transcendentalist,
whose mind is controlled, remains always steady in his meditation on the
transcendent self.



Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

trayres
I don't want to present a whole application environment to the user, I want to disable everything not having to do with the task at hand.

Also, it gives people with more limited bandwidth connections the options of downloading the entire thing, or a highly stripped version that is much smaller. It certainly makes getting a "build environment" easy when asking for contributions though!

Dolphin has a similar tool and is now open source, perhaps there is something there worth investigating for Pharo.

I'll check out Phratch (also, Scat is an unfortunately named tool).


On Tue, Aug 23, 2016 at 4:26 AM, Dimitris Chloupis <[hidden email]> wrote:
Pharo has the easiest deployment in any language I have used. It's just a single folder. It does not get any simpler way than that. You can also customize the name of the executable, the icon, the folder and the image itself. There is no need to install Pharo or your Pharo application.

So what you are asking yes it would be good for a beginner but someone that has some substantial experience with Pharo it's nowhere near as necessary.

Start experimenting you will be suprised how powerful it is.

On Thu, 18 Aug 2016 at 11:37, Gour <[hidden email]> wrote:
Hello,

there are some Smalltalks like Dolphin, VisualWorks..which can, afaict,
create stand-alone executable for easier deployment to end users.

I'm aware that Pharo probably has more important tasks to tackle first,
but just curious if creating stand-alone/runtime exectuables is
somewhere on its radar?


Sincerely,
Gour

--
As a lamp in a windless place does not waver, so the transcendentalist,
whose mind is controlled, remains always steady in his meditation on the
transcendent self.




kmo
Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

kmo
In reply to this post by kilon.alios
<<Pharo has the easiest deployment in any language I have used.>>

Only if you think deployment means shipping your entire development environment to users and telling them to get on with it.

Pharo is absolutely the worst language for deployment in the world. This is why, after all these years, there have only ever been three desktop applications written in it - phratch, dr geo, and the a legal database thing. (i suppose you could be generous and include pharo launcher as well - though that's a bit incestuous).

All other applications written in pharo are web apps so deployment is not an issue.

There may be good reasons for the lack of attention paid to the deployment of apps but pretending there is no problem is crazy.
Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

kilon.alios
"Only if you think deployment means shipping your entire development
environment to users and telling them to get on with it."

No

Including the Pharo enviroment is a great idea because it makes remote debugging a possibility. Pharo has tools to connect to another running image and control its execution and debugging capabilites which give you the massive advantage of being able to examine bugs up close and personal without the need of the user filling bug reports.  You can do this online and offline. Thats the appeal of Pharo anyway.  You user can message you and you can connect to his image , fix the error and allow him to continue execution without losing his live data.  Try that with you dream deployment tool.

Actually its standard practice in deployment when something goes wrong you are basically screwed. Fine grained error correction is not even a question , just stone age uninstall and re install.

Hiding the IDE from the user is very simple.

I fail to see how Pharo is worse from pretty much every other language that requires installation in order to work when Pharo is just a standalone folder.

We must be living in parallel universes.

"All other applications written in pharo are web apps so deployment is not an
issue."

Why you think thats a problem for dekstop apps ? Its actually pretty simple, pharo allows you to create a window or a frame that covers its entire window the moment this happens the user will no longer be able to trigger the world menu, unless he uses shortcuts which can be removed too.

This is the approach that PharoLauncher, Phratch and DrGeo follow.

The debugger will still trigger in case of error but then you will need a form of error reporting anyway, unless you prefer your pharo app freezing with no error message which obviously is not the standard practice in any dynamic programming language. Sure if you come from C/C++ crash and burn maybe acceptable but is not acceptable for Pharo standards. I suspect it wont be very acceptable for your user either.

"There may be good reasons for the lack of attention paid to the deployment
of apps but pretending there is no problem is crazy."

We read question like this from time to time in the mailing list from beginners but for experienced pharo coder I never read any serious complain.

"Also, it gives people with more limited bandwidth connections the options of downloading the entire thing, or a highly stripped version that is much smaller."

There are plans to modularize pharo image , there is even an image that offers a minimal set of libraries though its not recommended for general consumption. It can be used as template if size is such a big concern.

There is also project Spoon that managed to deploy Squeak (Pharo's ancestor) apps that were down to kbs in size. But smaller you go the more power and flexibility you sacrifice. Suffice to say devs did not care so much about Spoon.

Size wise zipped Pharo folder is 30mbs , probably even less if you use 7zip or some other more efficient compression. My connection is 100-200kbs/sec which means it does not take more than 3-4 minutes to download. So I fail to see where is the actual problem.

Yeah sure if you are on dial up it will take you forever but then the whole internet will take you forever anyway. People play games that are tens of Gigabytes in size of download and they don't complain about size.

This whole get the IDE together with the app is no longer a Smalltalk breakthrough anyway.

Python the language I was coding in before porting to Pharo comes with a ton of tools that range from inspectors, debugger, live refactoring tools and even profilers , error reporting tools, testing tools or even manipulation of the syntax itself through the AST module. And this is common for most if not every dynamic language out there.

Even games nowadays ship with their own error reporting tools, profilers, anylitics, benchmark tools etc. and of course the usual modding tools.


On Tue, Aug 23, 2016 at 10:28 PM kmo <[hidden email]> wrote:
<<Pharo has the easiest deployment in any language I have used.>>

Only if you think deployment means shipping your entire development
environment to users and telling them to get on with it.

Pharo is absolutely the worst language for deployment in the world. This is
why, after all these years, there have only ever been three desktop
applications written in it - phratch, dr geo, and the a legal database
thing. (i suppose you could be generous and include pharo launcher as well -
though that's a bit incestuous).

All other applications written in pharo are web apps so deployment is not an
issue.

There may be good reasons for the lack of attention paid to the deployment
of apps but pretending there is no problem is crazy.




--
View this message in context: http://forum.world.st/standalone-runtime-executable-tp4911677p4912370.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

kilon.alios
Correction: Actually I was wrong, you dont even need to delete shortcuts to make the IDE completely inaccessible to user. The moment you create the morph that covers the Pharo window, that morph can also receive all events which means no Pharo shortcuts will be able to trigger unless of course you make the morph to return the events back to the object that can trigger the IDE tools.

And what I am describing here is not some advanced concept this is super basic Pharo development. No magic, nothing special.

On Tue, Aug 23, 2016 at 11:31 PM Dimitris Chloupis <[hidden email]> wrote:
"Only if you think deployment means shipping your entire development
environment to users and telling them to get on with it."

No

Including the Pharo enviroment is a great idea because it makes remote debugging a possibility. Pharo has tools to connect to another running image and control its execution and debugging capabilites which give you the massive advantage of being able to examine bugs up close and personal without the need of the user filling bug reports.  You can do this online and offline. Thats the appeal of Pharo anyway.  You user can message you and you can connect to his image , fix the error and allow him to continue execution without losing his live data.  Try that with you dream deployment tool.

Actually its standard practice in deployment when something goes wrong you are basically screwed. Fine grained error correction is not even a question , just stone age uninstall and re install.

Hiding the IDE from the user is very simple.

I fail to see how Pharo is worse from pretty much every other language that requires installation in order to work when Pharo is just a standalone folder.

We must be living in parallel universes.

"All other applications written in pharo are web apps so deployment is not an
issue."

Why you think thats a problem for dekstop apps ? Its actually pretty simple, pharo allows you to create a window or a frame that covers its entire window the moment this happens the user will no longer be able to trigger the world menu, unless he uses shortcuts which can be removed too.

This is the approach that PharoLauncher, Phratch and DrGeo follow.

The debugger will still trigger in case of error but then you will need a form of error reporting anyway, unless you prefer your pharo app freezing with no error message which obviously is not the standard practice in any dynamic programming language. Sure if you come from C/C++ crash and burn maybe acceptable but is not acceptable for Pharo standards. I suspect it wont be very acceptable for your user either.

"There may be good reasons for the lack of attention paid to the deployment
of apps but pretending there is no problem is crazy."

We read question like this from time to time in the mailing list from beginners but for experienced pharo coder I never read any serious complain.

"Also, it gives people with more limited bandwidth connections the options of downloading the entire thing, or a highly stripped version that is much smaller."

There are plans to modularize pharo image , there is even an image that offers a minimal set of libraries though its not recommended for general consumption. It can be used as template if size is such a big concern.

There is also project Spoon that managed to deploy Squeak (Pharo's ancestor) apps that were down to kbs in size. But smaller you go the more power and flexibility you sacrifice. Suffice to say devs did not care so much about Spoon.

Size wise zipped Pharo folder is 30mbs , probably even less if you use 7zip or some other more efficient compression. My connection is 100-200kbs/sec which means it does not take more than 3-4 minutes to download. So I fail to see where is the actual problem.

Yeah sure if you are on dial up it will take you forever but then the whole internet will take you forever anyway. People play games that are tens of Gigabytes in size of download and they don't complain about size.

This whole get the IDE together with the app is no longer a Smalltalk breakthrough anyway.

Python the language I was coding in before porting to Pharo comes with a ton of tools that range from inspectors, debugger, live refactoring tools and even profilers , error reporting tools, testing tools or even manipulation of the syntax itself through the AST module. And this is common for most if not every dynamic language out there.

Even games nowadays ship with their own error reporting tools, profilers, anylitics, benchmark tools etc. and of course the usual modding tools.


On Tue, Aug 23, 2016 at 10:28 PM kmo <[hidden email]> wrote:
<<Pharo has the easiest deployment in any language I have used.>>

Only if you think deployment means shipping your entire development
environment to users and telling them to get on with it.

Pharo is absolutely the worst language for deployment in the world. This is
why, after all these years, there have only ever been three desktop
applications written in it - phratch, dr geo, and the a legal database
thing. (i suppose you could be generous and include pharo launcher as well -
though that's a bit incestuous).

All other applications written in pharo are web apps so deployment is not an
issue.

There may be good reasons for the lack of attention paid to the deployment
of apps but pretending there is no problem is crazy.




--
View this message in context: http://forum.world.st/standalone-runtime-executable-tp4911677p4912370.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

hernanmd
In reply to this post by kmo

2016-08-23 16:26 GMT-03:00 kmo <[hidden email]>:
<<Pharo has the easiest deployment in any language I have used.>>

Only if you think deployment means shipping your entire development
environment to users and telling them to get on with it.

Pharo is absolutely the worst language for deployment in the world. This is
why, after all these years, there have only ever been three desktop
applications written in it - phratch, dr geo, and the a legal database
thing. (i suppose you could be generous and include pharo launcher as well -
though that's a bit incestuous).


You forgot to mention PhyloclassTalk which also includes a Windows Installer written in Unicode NSIS.
I have two generators for this: A code generator written in Pharo to generate the NSIS script, and an image builder batch script which downloads image from ZeroConf, loads everything through Metacello, and launches NSIS to generate the executable file.

I probably do the same for CPack, but now I am busy finishing a paper.

You were right in part, deployment in Pharo is not easy and other fashion industry languages perform better, but it is not impossible.
 
All other applications written in pharo are web apps so deployment is not an
issue.

There may be good reasons for the lack of attention paid to the deployment
of apps but pretending there is no problem is crazy.


I agree with you on this one. We (Smalltalkers) need mountains of self-criticism and slow reading.

Hernán

Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

stepharo
In reply to this post by kmo

> <<Pharo has the easiest deployment in any language I have used.>>
>
> Only if you think deployment means shipping your entire development
> environment to users and telling them to get on with it.
>
> Pharo is absolutely the worst language for deployment in the world. This is
> why, after all these years, there have only ever been three desktop
> applications written in it - phratch, dr geo, and the a legal database
> thing. (i suppose you could be generous and include pharo launcher as well -
> though that's a bit incestuous).

We are concerned with that aspect. This is not by accident that
Guillermo spent
3 years working on bootstrapping a kernel. This is not by accident that
Pavel
is producing small images. This is not by accident that we want to manage
the ***Complete*** image and eco systems with dependencies and that we
are fighting with
cycles and layers. This is not by accident that we are revisiting all
the places that write on disc believing that
they can.

Now we should probably invest in a solution like the one of Hernan to
build application wrapper
I think that also having a better abstraction for user deployment is
needed.

Right now we are working on a bootstrap in production for multiple
reason but the main one is
to get a clean 'small' kernel so that we can build using normal
dependency small applications.

If you think that we are going slowly. We are getting slowly and too
slow for my taste.
I did you analysis back in 2002 :)
Now if you want to help us going faster. Help the community fixing bugs.
The less other things we have to do the more we can focus.

Stef

>
> All other applications written in pharo are web apps so deployment is not an
> issue.
>
> There may be good reasons for the lack of attention paid to the deployment
> of apps but pretending there is no problem is crazy.
>
>
>
>
> --
> View this message in context: http://forum.world.st/standalone-runtime-executable-tp4911677p4912370.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

Gour
In reply to this post by hernanmd
On Wed, 24 Aug 2016 00:54:10 -0300 Hernán Morales Durand
<[hidden email]> wrote:

> I have two generators for this: A code generator written in Pharo to
> generate the NSIS script, and an image builder batch script which
> downloads image from ZeroConf, loads everything through Metacello,
> and launches NSIS to generate the executable file.

Is that code available somewhere?

> I probably do the same for CPack, but now I am busy finishing a paper.

That would be cool...good luck with the paper. ;)


Sincerely,
Gour

--
A person is considered still further advanced when he regards honest
well-wishers, affectionate benefactors, the neutral, mediators, the
envious, friends and enemies, the pious and the sinners all with an
equal mind.



Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

hernanmd


2016-08-25 13:18 GMT-03:00 Gour <[hidden email]>:
On Wed, 24 Aug 2016 00:54:10 -0300 Hernán Morales Durand
<[hidden email]> wrote:

> I have two generators for this: A code generator written in Pharo to
> generate the NSIS script, and an image builder batch script which
> downloads image from ZeroConf, loads everything through Metacello,
> and launches NSIS to generate the executable file.

Is that code available somewhere?


Is not fully tested but here is how you install it:

Gofer it
    smalltalkhubUser: 'hernan' project: 'CodeGenerator';
    configuration;
    loadDevelopment.

CGSmalltalkExamples exampleNSISPharo4.
CGSmalltalkExamples exampleNSISPharo5.

It will generate a .nsi file in image directory.

 
> I probably do the same for CPack, but now I am busy finishing a paper.

That would be cool...good luck with the paper. ;)



Thank you.

Hernán

 
Sincerely,
Gour

--
A person is considered still further advanced when he regards honest
well-wishers, affectionate benefactors, the neutral, mediators, the
envious, friends and enemies, the pious and the sinners all with an
equal mind.




Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

Stephan Eggermont-3
On 26/08/16 18:49, Hernán Morales Durand wrote:

> Is not fully tested but here is how you install it:
>
> Gofer it
>     smalltalkhubUser: 'hernan' project: 'CodeGenerator';
>     configuration;
>     loadDevelopment.
>
> CGSmalltalkExamples exampleNSISPharo4.
> CGSmalltalkExamples exampleNSISPharo5.
>
> It will generate a .nsi file in image directory.
>

Thanks Hernán.
Could you tell us something more about the CodeGenerator
that you created it with? For someone new to NSIS there
are a lot of moving parts like this.

It would be great to have an example that is complete
and compiles out of the box. Good target for a screencast
also (for me they work very well for improved community
communication).

Stephan



Reply | Threaded
Open this post in threaded view
|

Re: standalone/runtime executable

hernanmd

Hi Stephan

2016-08-29 14:16 GMT-03:00 Stephan Eggermont <[hidden email]>:
On 26/08/16 18:49, Hernán Morales Durand wrote:
Is not fully tested but here is how you install it:

Gofer it
    smalltalkhubUser: 'hernan' project: 'CodeGenerator';
    configuration;
    loadDevelopment.

CGSmalltalkExamples exampleNSISPharo4.
CGSmalltalkExamples exampleNSISPharo5.

It will generate a .nsi file in image directory.


Thanks Hernán.
Could you tell us something more about the CodeGenerator
that you created it with? For someone new to NSIS there
are a lot of moving parts like this.

This will be properly documented in the future. But here I go with some basic notes.
The idea is to have a very modular hierarchy of code generation capabilities. There is a very basic generator for QC Magritte ;) but I hadn't the time for testing or complete yet
A description of hierarchy classes is

-CGAbstract (Provides code stream)
--CGTemplate (Utility class for extracting template methods from classes - in the sense of a Template framework, not design patterns)
---CGAuthoring (Provides identity management)
----CGBash (Bash code generator)
----CGNSISInstaller (Unicode NSIS Installer Script (.nsi) Generator, requires Mustache Templates and ZipDLL.nsh plugin installed)
----CGSmalltalkAuthoring (Abstract Smalltalk code generator providing author management - not the same as identity)

- CGStConvenienceMethods (Smalltalk Code Generator based in the pattern Convenience Methods (1998) by Robert Hirschfeld)
- CGStAbstractClassPattern (Smalltalk Code Generator based in the Abstract Class Pattern by Bobby Woolf.)
- CGStBuilderPattern (Builder Design Pattern - I don't remember the status of this one, I should check)

- CGStHierarchyCreator (Smalltalk Code Generator to generate a class hierarchy)
- CGStMagritte
- CGQCMagritte (Seaside QC Magritte Generator)
- CGQCBMagritte (Seaside QC Magritte + Bootstrap) Generator

- CGStImageImporter (Scans an input directory and uses ImageReadWriter to read binary file streams)
- CGStTextImporter (Same for textual resources)

- CGStSingleton (Generates a Singleton in Smalltalk)
- CGSunit (SUnit Tests Generator)

- CGStSpec (To be implemented)

These are examples of how to generate code:

Simple class and variables:

    CGSmalltalk uniqueInstance
        setCleanTarget;
        targetClassCategory: 'MPIRunner-Core';
        targetClass: #MPIRunner;
        addInstanceVariables: #(#nproc #submitToQueue).

Convenience methods

    CGStConvenienceMethods uniqueInstance
        setCleanTarget;
        parameterCount: 1;
        targetSelector: #cgConvEx1;
        targetClassCategory: 'ConvenienceMethodsEx';
        targetClass: #ConvenienceMethodsEx;
        generateMethods.

Singleton

    CGStSingleton uniqueInstance
        setCleanTarget;
        targetClassCategory: 'SingletonEx1';
        targetClass: #SingletonEx1;
        generateMethods.

Builder

    CGStBuilderPattern uniqueInstance
        setCleanTarget;
        targetClassCategory: 'CGGeneratedCode-Core';
        " Abstract Builder class name (ex: UIBuilder) "
        targetClass: #CGExCarBuilder;
        productNames: #('CGExFordCar' 'CGExBMWCar' 'CGExHondaCar');
        builderNames: #('CGExFordBuilder' 'CGExBMWBuilder' 'CGExHondaBuilder');
        familyNames: #('CGExCarEngine' 'CGExCarBody');
        " How many product parts per family ? "
        productPartsPerFamilyCount: 3;
        directorClassName: #CGExCarAssembler;
        generateClasses.




It would be great to have an example that is complete
and compiles out of the box. Good target for a screencast
also (for me they work very well for improved community
communication).


I would love to have more time :)

Hernán

 
Stephan