Win32Setup - custom VM and app tutorial

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

Win32Setup - custom VM and app tutorial

Torsten Bergmann
Hi,

there is now a ready made setup for installing pharo on windows.
   
   http://gforge.inria.fr/frs/download.php/22307/setup_pharo_0.0.0.1.exe

It is available in the Win32 Setup section on
   http://gforge.inria.fr/frs/?group_id=1299

Far from perfect, but working. Use at your own risk!

Additionally you will find a short tutorial below on how to build a custom Pharo VM and
distribution for Win32 Systems. It can also help if you want to create a
(commercial) application based on pharo.

Have fun
Torsten


-----------------------------------------------------------------------------------------------

SECTION A - Building a Pharo windows VM
=======================================
Since Pharo has its roots in Squeak Smalltalk the Squeak virtual machine is
used. These steps allow you build a more "pharoized" virtual machine:

- setup the tools environment for compiling the VM as described on [1]
- grab the lates Squeak VM sources from [2], here we use the squeak 3.11.2 VM
  so we download "SqueakVM-Win32-3.11.2-src.zip"
- extract it into a directory of your choice
- make a parallel copy of directory winbuild and name it "pharobuild"
- in the "pharobuild" directory
-- delete the three *.ico files from squeak (squeak.ico, squeak2.ico and squeak3.ico)
-- copy the pharo.ico file from [3] into the directory
-- copy the splash.bmp file from [4] into the directory
-- edit "Makefile" with a text editor and set the name of the new VM to "Pharo" in line 12 ("VM = Pharo"),
   note the uppercase
-- rename the file "Squeak.def.in" into "Pharo.def.in" (note the uppercase)
-- rename the file "Squeak.rc" into "Pharo.rc" (note the uppercase)
-- edit "Pharo.rc" with a text editor and modify all 3 icon definitions to use "pharo.ico" now
-- run "make" to build the VM
-- you will now find a "Pharo.exe" (with the custom icon) and two external
   plugins ("FT2Plugin.dll" and "SqueakFFIPrims.dll") in the pharobuild\obj\vm directory

SECTION B - Building a pharo distribution
=========================================
- create a new directory "pharodist"
- copy the "Pharo.exe", "FT2Plugin.dll" and "SqueakFFIPrims.dll" built in section A into
  this directory
- also copy splash.bmp into this directory
- download SqueakV39.sources.zip from [5]
- extract the file "SqueakV39.sources" from this ZIP right into your "pharodist" directory
  (make sure you extract it exactly into this folder so you have a "pharodist/SqueakV39.sources" file
- Download the latest pharo dev image (here we use pharo0.1-10309dev09.05.3.zip from [6])
  and extract it into your "pharodist" directory
- from this ZIP you should now extract the *.image file and the *.changes file into your "pharodist"
  directory (you should now have a "pharodist/pharo0.1-10309dev09.05.3.changes" and
  "pharodist/pharo0.1-10309dev09.05.3.image")
- you can start pharo by dragging the "pharo0.1-10309dev09.05.3.image" onto the "Pharo.exe" file
- note that automatically a new file "Pharo.ini" is created in your "pharodist" directory
- save the image as "pharo.image" (you should now have a pharo.image and pharo.changes file
- delete the old "pharo0.1-10309dev09.05.3.changes" and "pharo0.1-10309dev09.05.3.image" file
- if you wish to further customize the application you can set some parameters in the Pharo.ini file
  (a list of all available parameters can be found at [7])

SECTION C - Building a setup
============================
- copy "Pharo.ico" into the "pharodist" directory
- create a file "license.rtf" in the "pharodist" directory and clip the license from pharo-project.org
  into this file
- download and install the free NSIS installer package, here we use version 2.42 from [8]
- also download the file "ZIPDLL.zip" plugin from [9]
- Extract ZipDLL.dll to directory "Plugins" in your NSIS installation
- Extract ZipDLL.nsh to directory "Include" in your NSIS installation
- copy the file "setup.nsi" file (attached to this mail) to your "pharodist" directory and compile it
  using NSIS (right click on the file and select "Compile NSIS script" from the context menu
- you should now have a "setup_pharo_0.0.0.1.exe" ready for distribution
- easy, istnt it?

Things to improve:
==================
  - better looking icons for pharo exe (with transparency)
  - setup script with custom header on the installer wizard (MUI_HEADERIMAGE_BITMAP, etc)
  - setup script with installer and uninstaller icons (MUI_ICON, MUI_UNICON)
  - better version schema
  - automated build on a build machine (if someone has a windows box accessible from the web tell us)
  - ...

[1] http://www.squeakvm.org/win32/compiling.html
[2] http://www.squeakvm.org/win32/release
[3] http://lists.gforge.inria.fr/pipermail/pharo-project/2009-May/008513.html
[4] http://lists.gforge.inria.fr/pipermail/pharo-project/2009-May/008559.html
[5] http://gforge.inria.fr/frs/download.php/4621/SqueakV39.sources.zip
[6] http://gforge.inria.fr/frs/download.php/22298/pharo0.1-10309dev09.05.3.zip
[7] http://www.squeakvm.org/win32/settings.html
[8] http://nsis.sourceforge.net
[9] http://nsis.sourceforge.net/ZipDLL 


--
Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss für nur 17,95 Euro/mtl.!* http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

setup.nsi (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Win32Setup - custom VM and app tutorial

Henrik Sperre Johansen
Better hope noone installs to C:\! :)
(i.e. it's probably a good idea to specify the files to delete
specifically )

Cheers,
Henry

Torsten Bergmann skrev:

> Section "Uninstall"
>
> SetOutPath $INSTDIR
>     DetailPrint "Start uninstalling"
>     Delete "$INSTDIR\*.*"
>
>     ;delete uninstaller
>     Delete "$INSTDIR\Uninstall.exe"
>     RmDir /r /REBOOTOK "$SMPROGRAMS\${MGROUP}"
>     RmDir /REBOOTOK $INSTDIR
>     DeleteRegKey /ifempty HKCU "${REG_KEY}"
> SectionEnd
>
>  

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Win32Setup - custom VM and app tutorial

Janko Mivšek
In reply to this post by Torsten Bergmann
Hi Torsten,

I just tried it and I'd really like to thank for moving Smalltalk much
closer to usually spoiled Windows user, who won't even touch anything
without such installation as you provided. Big step forward in usability
terms, really!

Now just Pharo needs to be less scary when first opened by such user.

Because now it is scary. It was even for me - after such easy and normal
installation you end up with some blank screen with just those cryptic
references open. Hmm, what to do now?

So, there is at least some short text needed to encourage user to
explore further, at least a reference to Squeak by example book. And how
to open a Class browser ...

Best regards
Janko

Torsten Bergmann pravi:

> there is now a ready made setup for installing pharo on windows.
>    
>    http://gforge.inria.fr/frs/download.php/22307/setup_pharo_0.0.0.1.exe
>
> It is available in the Win32 Setup section on
>    http://gforge.inria.fr/frs/?group_id=1299
>
> Far from perfect, but working. Use at your own risk!
--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project