How to deploy a Pharo 2.0 Desktop application?

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

How to deploy a Pharo 2.0 Desktop application?

MartinW
I want to deploy a Pharo 2.0 Desktop application to a dozen of people using Windows and MacOS computers. A couple of questions arise:

- How to properly start up and shut down my application when the Pharo image starts and shuts down?

- Can i give the Pharo window a custom size and make it non-resizable?

- How to hide development tools, world menu, global keyboard shortcuts, etc.?

- How to make a nice One-Click-Application, that preferably should have the name and icon of the application and not be called Pharo (not because i do not love Pharo, but because people won't understand :)

- How to automate all the above tasks, so i can easily build a new One-Click-Application again and again.

- What do i state as system requirements? "You need at least Windows XYZ or MacOS 10.X to run this application"

Martin.
Reply | Threaded
Open this post in threaded view
|

Re: How to deploy a Pharo 2.0 Desktop application?

philippeback
I am interested in that as well.

As far as I am concerned, I'd go for a custom build of VM for such
windows related things but I 'd like to know if there is a better way.

Phil

2013/3/14 MartinW <[hidden email]>:

> I want to deploy a Pharo 2.0 Desktop application to a dozen of people using
> Windows and MacOS computers. A couple of questions arise:
>
> - How to properly start up and shut down my application when the Pharo image
> starts and shuts down?
>
> - Can i give the Pharo window a custom size and make it non-resizable?
>
> - How to hide development tools, world menu, global keyboard shortcuts,
> etc.?
>
> - How to make a nice One-Click-Application, that preferably should have the
> name and icon of the application and not be called Pharo (not because i do
> not love Pharo, but because people won't understand :)
>
> - How to automate all the above tasks, so i can easily build a new
> One-Click-Application again and again.
>
> - What do i state as system requirements? "You need at least Windows XYZ or
> MacOS 10.X to run this application"
>
> Martin.
>
>
>
> --
> View this message in context: http://forum.world.st/How-to-deploy-a-Pharo-2-0-Desktop-application-tp4676695.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to deploy a Pharo 2.0 Desktop application?

S Krish
In reply to this post by MartinW
There is a wiki entry on this for squeak on Win32:


*****************************

Rest inlined..



On Thu, Mar 14, 2013 at 1:22 PM, MartinW <[hidden email]> wrote:
I want to deploy a Pharo 2.0 Desktop application to a dozen of people using
Windows and MacOS computers. A couple of questions arise:

- How to properly start up and shut down my application when the Pharo image
starts and shuts down?

In your custom class :
  MyApplication >> #startUp
   
    MyApplicationWindow new open.

  Save your image with this following executed:
   Smalltalk addToStartUpList: #MyApplication.
   Smalltalk addToShutDownList: #MyApplication.

   

- Can i give the Pharo window a custom size and make it non-resizable?

Guess this is in the VM built in.
 
 

- How to hide development tools, world menu, global keyboard shortcuts,
etc.?

Execute and save your image:
"No user-interrupt-into-debugger"
UserInterruptHandler cmdDotEnabled: false.
"turn off shift-click editing"
StringMorph editableStringMorph: false.
"No halos, etc." 
Morph cmdGesturesEnabled: false. 
 "No user commands invokable via cmd-key combos in text editor"
ParagraphEditor cmdKeysInText: false.
Editor cmdKeysInText: false.

- How to make a nice One-Click-Application, that preferably should have the
name and icon of the application and not be called Pharo (not because i do
not love Pharo, but because people won't understand :)

As Pharo does for its one click app. Just one image in the directory when you click on NBCog.exe / Pharo.exe VM runs the application.  

You will require the subfolders that Pharo currently uses. You can strip links to .changes / .sources files 
cleanUpEnvironment
    Smalltalk cleanUp: true.
    ScriptLoader new cleanUpForDesktopProduction.


    SmalltalkImage 
        checkChangesFileAvailability: false;
        checkSourcesFileAvailability: false. 
 
- How to automate all the above tasks, so i can easily build a new
One-Click-Application again and again.

Use Jenkins CI.
 
- What do i state as system requirements? "You need at least Windows XYZ or
MacOS 10.X to run this application"


??? Wherever Pharo is described to runnable, you can run your application and declare it to run viz: Windows XP upwards ( even older I have not tested ), Mac ?? , Linux ( my test is on Ubuntu/ Debian / not sure of others.. ) , Android , and dev iOS. 

 
Martin.



--
View this message in context: http://forum.world.st/How-to-deploy-a-Pharo-2-0-Desktop-application-tp4676695.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: How to deploy a Pharo 2.0 Desktop application?

philippeback
For OSX, that's another matter of course.

2013/3/14 S Krish <[hidden email]>:

> There is a wiki entry on this for squeak on Win32:
>
> http://squeakvm.org/win32/custom.html
>
> *****************************
>
> Rest inlined..
>
>
>
> On Thu, Mar 14, 2013 at 1:22 PM, MartinW <[hidden email]> wrote:
>>
>> I want to deploy a Pharo 2.0 Desktop application to a dozen of people
>> using
>> Windows and MacOS computers. A couple of questions arise:
>>
>> - How to properly start up and shut down my application when the Pharo
>> image
>> starts and shuts down?
>
>
> In your custom class :
>   MyApplication >> #startUp
>
>     MyApplicationWindow new open.
>
>   Save your image with this following executed:
>    Smalltalk addToStartUpList: #MyApplication.
>    Smalltalk addToShutDownList: #MyApplication.
>
>
>>
>>
>> - Can i give the Pharo window a custom size and make it non-resizable?
>
>
> Guess this is in the VM built in.
>
>>
>>
>>
>>
>> - How to hide development tools, world menu, global keyboard shortcuts,
>> etc.?
>
>
> Execute and save your image:
> "No user-interrupt-into-debugger"
> UserInterruptHandler cmdDotEnabled: false.
> "turn off shift-click editing"
> StringMorph editableStringMorph: false.
> "No halos, etc."
> Morph cmdGesturesEnabled: false.
>  "No user commands invokable via cmd-key combos in text editor"
> ParagraphEditor cmdKeysInText: false.
> Editor cmdKeysInText: false.
>>
>>
>> - How to make a nice One-Click-Application, that preferably should have
>> the
>> name and icon of the application and not be called Pharo (not because i do
>> not love Pharo, but because people won't understand :)
>
>
> As Pharo does for its one click app. Just one image in the directory when
> you click on NBCog.exe / Pharo.exe VM runs the application.
>
> You will require the subfolders that Pharo currently uses. You can strip
> links to .changes / .sources files
> cleanUpEnvironment
>     Smalltalk cleanUp: true.
>     ScriptLoader new cleanUpForDesktopProduction.
>
>     SmalltalkImage
>         checkChangesFileAvailability: false;
>         checkSourcesFileAvailability: false.
>>
>>
>>
>> - How to automate all the above tasks, so i can easily build a new
>> One-Click-Application again and again.
>>
> Use Jenkins CI.
>
>>
>> - What do i state as system requirements? "You need at least Windows XYZ
>> or
>> MacOS 10.X to run this application"
>>
>
> ??? Wherever Pharo is described to runnable, you can run your application
> and declare it to run viz: Windows XP upwards ( even older I have not tested
> ), Mac ?? , Linux ( my test is on Ubuntu/ Debian / not sure of others.. ) ,
> Android , and dev iOS.
>
>
>>
>> Martin.
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/How-to-deploy-a-Pharo-2-0-Desktop-application-tp4676695.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to deploy a Pharo 2.0 Desktop application?

EstebanLM
In reply to this post by MartinW
Hi, 

not an easy task...but doable :)

On Mar 14, 2013, at 8:52 AM, MartinW <[hidden email]> wrote:

I want to deploy a Pharo 2.0 Desktop application to a dozen of people using
Windows and MacOS computers. A couple of questions arise:

- How to properly start up and shut down my application when the Pharo image
starts and shuts down?

using startUp method as described in earlier message. You can also prepare your image previously by fixing a morph that occupies all the image size. 


- Can i give the Pharo window a custom size and make it non-resizable?

no

- How to hide development tools, world menu, global keyboard shortcuts,
etc.?

you can use keychain (world menu/system/switch user) to create an user without permissions, then, in combination with the morph on top of the world, you are actually closing the image :)


- How to make a nice One-Click-Application, that preferably should have the
name and icon of the application and not be called Pharo (not because i do
not love Pharo, but because people won't understand :)

rename the app works, but you still have the icon problem... which is trivial in mac (you just edit the info.plist file), but for windows... not so :)
what you need to do is to build your own vm changing the icon... and that was a hard task some time ago, but now is really easy: fork at gitorious (https://gitorious.org/cogvm/blessed) and follow the HOWTOBUILD file. 
For your needs, you need to subclass PharoWindowsConfig and PharoOSXConfig to change the icon and the name... then you can build it easily. 


- How to automate all the above tasks, so i can easily build a new
One-Click-Application again and again.

you can use a jenkins, and if you do not want a CI process, you can use https://gitorious.org/pharo-build/pharo-build/blobs/master/build-oneclick.sh and adapt it to your needs. 


- What do i state as system requirements? "You need at least Windows XYZ or
MacOS 10.X to run this application"

you could check that using NB-FFI and calling some system functions (no idea which ones, thought)

Esteban


Martin.



--
View this message in context: http://forum.world.st/How-to-deploy-a-Pharo-2-0-Desktop-application-tp4676695.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: How to deploy a Pharo 2.0 Desktop application?

Mariano Martinez Peck


On Thu, Mar 14, 2013 at 8:49 AM, Esteban Lorenzano <[hidden email]> wrote:
Hi, 

not an easy task...but doable :)

On Mar 14, 2013, at 8:52 AM, MartinW <[hidden email]> wrote:

I want to deploy a Pharo 2.0 Desktop application to a dozen of people using
Windows and MacOS computers. A couple of questions arise:

- How to properly start up and shut down my application when the Pharo image
starts and shuts down?

using startUp method as described in earlier message. You can also prepare your image previously by fixing a morph that occupies all the image size. 


- Can i give the Pharo window a custom size and make it non-resizable?


I though this was possible (set a custom size). I remember a hacky bash script that changed some bytes of the .image. And I though there was a new primitive for that later.
But making it non-resizable, I don't think so.

 
no

- How to hide development tools, world menu, global keyboard shortcuts,
etc.?

you can use keychain (world menu/system/switch user) to create an user without permissions, then, in combination with the morph on top of the world, you are actually closing the image :)


- How to make a nice One-Click-Application, that preferably should have the
name and icon of the application and not be called Pharo (not because i do
not love Pharo, but because people won't understand :)

rename the app works, but you still have the icon problem... which is trivial in mac (you just edit the info.plist file), but for windows... not so :)
what you need to do is to build your own vm changing the icon... and that was a hard task some time ago, but now is really easy: fork at gitorious (https://gitorious.org/cogvm/blessed) and follow the HOWTOBUILD file. 
For your needs, you need to subclass PharoWindowsConfig and PharoOSXConfig to change the icon and the name... then you can build it easily. 


- How to automate all the above tasks, so i can easily build a new
One-Click-Application again and again.

you can use a jenkins, and if you do not want a CI process, you can use https://gitorious.org/pharo-build/pharo-build/blobs/master/build-oneclick.sh and adapt it to your needs. 


- What do i state as system requirements? "You need at least Windows XYZ or
MacOS 10.X to run this application"

you could check that using NB-FFI and calling some system functions (no idea which ones, thought)

Esteban


Martin.



--
View this message in context: http://forum.world.st/How-to-deploy-a-Pharo-2-0-Desktop-application-tp4676695.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.





--
Mariano
http://marianopeck.wordpress.com
Reply | Threaded
Open this post in threaded view
|

Re: How to deploy a Pharo 2.0 Desktop application?

EstebanLM

On Mar 14, 2013, at 1:17 PM, Mariano Martinez Peck <[hidden email]> wrote:



On Thu, Mar 14, 2013 at 8:49 AM, Esteban Lorenzano <[hidden email]> wrote:
Hi, 

not an easy task...but doable :)

On Mar 14, 2013, at 8:52 AM, MartinW <[hidden email]> wrote:

I want to deploy a Pharo 2.0 Desktop application to a dozen of people using
Windows and MacOS computers. A couple of questions arise:

- How to properly start up and shut down my application when the Pharo image
starts and shuts down?

using startUp method as described in earlier message. You can also prepare your image previously by fixing a morph that occupies all the image size. 


- Can i give the Pharo window a custom size and make it non-resizable?


I though this was possible (set a custom size). I remember a hacky bash script that changed some bytes of the .image. And I though there was a new primitive for that later.
But making it non-resizable, I don't think so.

you can change the size (and the title), see DisplayScreen class>>#hostWindowSize: and around, but you cannot make it un-resizable.


 
no

- How to hide development tools, world menu, global keyboard shortcuts,
etc.?

you can use keychain (world menu/system/switch user) to create an user without permissions, then, in combination with the morph on top of the world, you are actually closing the image :)


- How to make a nice One-Click-Application, that preferably should have the
name and icon of the application and not be called Pharo (not because i do
not love Pharo, but because people won't understand :)

rename the app works, but you still have the icon problem... which is trivial in mac (you just edit the info.plist file), but for windows... not so :)
what you need to do is to build your own vm changing the icon... and that was a hard task some time ago, but now is really easy: fork at gitorious (https://gitorious.org/cogvm/blessed) and follow the HOWTOBUILD file. 
For your needs, you need to subclass PharoWindowsConfig and PharoOSXConfig to change the icon and the name... then you can build it easily. 


- How to automate all the above tasks, so i can easily build a new
One-Click-Application again and again.

you can use a jenkins, and if you do not want a CI process, you can use https://gitorious.org/pharo-build/pharo-build/blobs/master/build-oneclick.sh and adapt it to your needs. 


- What do i state as system requirements? "You need at least Windows XYZ or
MacOS 10.X to run this application"

you could check that using NB-FFI and calling some system functions (no idea which ones, thought)

Esteban


Martin.



--
View this message in context: http://forum.world.st/How-to-deploy-a-Pharo-2-0-Desktop-application-tp4676695.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.





--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: How to deploy a Pharo 2.0 Desktop application?

MartinW
In reply to this post by MartinW
Thank you all for the answers. I will sum up where i am now:


- How to properly start up and shut down my application when the Pharo image starts and shuts down?

Ok, problem solved via
Smalltalk addToStartUpList: and
Smalltalk addToShutDownList:


- Can i give the Pharo window a custom size and make it non-resizable?

Halfway solved. DisplayScreen class>>#hostWindowSize: works well.
Would be really nice if it was possible to make the window unresizable from within the image. It would also be nice to control the initial position of the Pharo Window on the HostOS screen.

I can see many One-Window-Desktop-Applications that could be done with Pharo if one had more control over the one Pharo window.

Can i still submit entries to GoogleIssueTracker or do i have to wait for a public accessible FogBugs site?


- How to hide development tools, world menu, global keyboard shortcuts, etc.?

The suggestion to work with the keychain worked best so far - where can i get more information on the keychain? Also there are some bugs.


- How to make a nice One-Click-Application, that preferably should have the name and icon of the application and not be called Pharo (not because i do not love Pharo, but because people won't understand :)

I work on a Mac, so i guess i cannot easily build a Windows VM on MacOS? Anyway this would be too much work for the application in question. But it might be interesing for future projects.


- How to automate all the above tasks, so i can easily build a new One-Click-Application again and again.

Ok, i can adapt the One-Click scripts.


- What do i state as system requirements? "You need at least Windows XYZ or MacOS 10.X to run this application"

My question was just, "What are the System requirements for the PharoVM?" - because this will be also the system requirements for my application. Does anybody know?

Martin.
Reply | Threaded
Open this post in threaded view
|

Re: How to deploy a Pharo 2.0 Desktop application?

EstebanLM

On Mar 15, 2013, at 11:25 AM, MartinW <[hidden email]> wrote:

> Thank you all for the answers. I will sum up where i am now:
>
>
> - How to properly start up and shut down my application when the Pharo image
> starts and shuts down?
>
> Ok, problem solved via
> Smalltalk addToStartUpList: and
> Smalltalk addToShutDownList:
>
>
> - Can i give the Pharo window a custom size and make it non-resizable?
>
> Halfway solved. DisplayScreen class>>#hostWindowSize: works well.
> Would be really nice if it was possible to make the window unresizable from
> within the image. It would also be nice to control the initial position of
> the Pharo Window on the HostOS screen.

the problem is that container window is created before launching pharo.
Using the ObjectiveCBridge (or the upcoming NB-ObjC) you could change the main Window properties in mac, and you could do something similar in win... but is not so easy in every case...
If my dreams of decouple the UI from the VM (and mamage the display initialization through the image) become true, that could be better managed, but so far, we don't have easy answers, sorry :)

>
> I can see many One-Window-Desktop-Applications that could be done with Pharo
> if one had more control over the one Pharo window.
>
> Can i still submit entries to GoogleIssueTracker or do i have to wait for a
> public accessible FogBugs site?

you can still report in the issue tracker and issue will be automatically migrated. Also you can wait a bit :)


>
>
> - How to hide development tools, world menu, global keyboard shortcuts,
> etc.?
>
> The suggestion to work with the keychain worked best so far - where can i
> get more information on the keychain? Also there are some bugs.

just report to the pharo-dev list.
keychain is complicated and the UI is not the best, but mainly works :P

>
>
> - How to make a nice One-Click-Application, that preferably should have the
> name and icon of the application and not be called Pharo (not because i do
> not love Pharo, but because people won't understand :)
>
> I work on a Mac, so i guess i cannot easily build a Windows VM on MacOS?
> Anyway this would be too much work for the application in question. But it
> might be interesing for future projects.
>
>
> - How to automate all the above tasks, so i can easily build a new
> One-Click-Application again and again.
>
> Ok, i can adapt the One-Click scripts.
>
>
> - What do i state as system requirements? "You need at least Windows XYZ or
> MacOS 10.X to run this application"
>
> My question was just, "What are the System requirements for the PharoVM?" -
> because this will be also the system requirements for my application. Does
> anybody know?

Win 3.1 or newer
OSX 10.6 or newer

:)

Esteban


>
> Martin.
>
>
>
> --
> View this message in context: http://forum.world.st/How-to-deploy-a-Pharo-2-0-Desktop-application-tp4676695p4676918.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: How to deploy a Pharo 2.0 Desktop application?

Ben Coman
In reply to this post by MartinW
There is also http://squeak.preeminent.org/tut2007/html/205.html
which however was for Squeak 3.9 circa 2007, so YMMV.

cheers -ben

MartinW wrote:

> Thank you all for the answers. I will sum up where i am now:
>
>
> - How to properly start up and shut down my application when the Pharo image
> starts and shuts down?
>
> Ok, problem solved via
> Smalltalk addToStartUpList: and
> Smalltalk addToShutDownList:
>
>
> - Can i give the Pharo window a custom size and make it non-resizable?
>
> Halfway solved. DisplayScreen class>>#hostWindowSize: works well.
> Would be really nice if it was possible to make the window unresizable from
> within the image. It would also be nice to control the initial position of
> the Pharo Window on the HostOS screen.
>
> I can see many One-Window-Desktop-Applications that could be done with Pharo
> if one had more control over the one Pharo window.
>
> Can i still submit entries to GoogleIssueTracker or do i have to wait for a
> public accessible FogBugs site?
>
>
> - How to hide development tools, world menu, global keyboard shortcuts,
> etc.?
>
> The suggestion to work with the keychain worked best so far - where can i
> get more information on the keychain? Also there are some bugs.
>
>
> - How to make a nice One-Click-Application, that preferably should have the
> name and icon of the application and not be called Pharo (not because i do
> not love Pharo, but because people won't understand :)
>
> I work on a Mac, so i guess i cannot easily build a Windows VM on MacOS?
> Anyway this would be too much work for the application in question. But it
> might be interesing for future projects.
>
>
> - How to automate all the above tasks, so i can easily build a new
> One-Click-Application again and again.
>
> Ok, i can adapt the One-Click scripts.
>
>
> - What do i state as system requirements? "You need at least Windows XYZ or
> MacOS 10.X to run this application"
>
> My question was just, "What are the System requirements for the PharoVM?" -
> because this will be also the system requirements for my application. Does
> anybody know?
>
> Martin.
>
>
>
> --
> View this message in context: http://forum.world.st/How-to-deploy-a-Pharo-2-0-Desktop-application-tp4676695p4676918.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>
>