Change Pharo window icon

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

Change Pharo window icon

Vincent.Blondeau
Hi,

I would like to know how to change the main Pharo window icon. I saw that there is a primitive for the title:
DisplayScreen class  >> primitiveWindowTitle:string: ; primitive: 'primitiveHostWindowTitle' module:'HostWindowPlugin'
but I cannot find one for the icon.
Should another primitive need to be implemented?

Thanks!

Vincent



winmail.dat (17K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Change Pharo window icon

Stephane Ducasse-3
Would it be possible to change the icon without having to compile a new VM?
To me the current setup looks so monolithic and dated.
I would expect that somebody can deploy a application with its own
logo by just providing some new resources.

Stef

On Wed, Jan 31, 2018 at 11:17 PM, Eliot Miranda <[hidden email]> wrote:

> Hi Vincent,
>
> On Wed, Jan 31, 2018 at 12:07 PM, <[hidden email]> wrote:
>>
>> Hi,
>>
>> I would like to know how to change the main Pharo window icon. I saw that
>> there is a primitive for the title:
>> DisplayScreen class  >> primitiveWindowTitle:string: ; primitive:
>> 'primitiveHostWindowTitle' module:'HostWindowPlugin'
>> but I cannot find one for the icon.
>> Should another primitive need to be implemented?
>
>
> The icon is baked into the VM executable.  So to change it one has to build
> a VM with a different icon.
>
> On Windows it is in
>     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.ico
> and the file that specifies to use Pharo.ico is
>     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.rc
>
> On Mac OS X it is in
>     platforms/iOS/vm/OSX/Pharo.icns
> (alongside three others such as PharoImage.icns)
> and the file that specifies to use Pharo.icns is
>     {build.macos32x86,build.macos64x64}/pharo.cog.spur/Makefile
> in setting the VM variable.  The file that associates the other icons with
> specific file types is
>     platforms/iOS//vm/OSX/Pharo-Info.plist
>
> If you're changing the Pharo icon let me suggest you update the icon files
> themselves in the opensmalltalk-vm source tree.
>
> If you're creating a new variant of the VM for some new purpose (say a
> special Lam VM) then let me suggest you add the icons to the
> opensmalltalk-vm source tree, creating special build directories for these
> VMs, such as {build.macos32x86,build.macos64x64}/lam.pharo.cog.spur/
>
> If you want to do this privately, then take either of the approaches above
> and simply don't publish the edits.  You can write a script that takes an
> updated checked-out opensmalltalk-vm source tree and edits it with files
> from a specific repository.  I have such scripts and can help you with them.
> Hint, pax is a very convenient directory hierarchy copying tool available at
> least on Mac OS X.  pax -rwlk will copy the trees under a sequence of
> directories into their corresponding places in a target tree.
>
>>
>> Thanks!
>>
>> Vincent
>>
>>
>
>
>
> --
> _,,,^..^,,,_
> best, Eliot

Reply | Threaded
Open this post in threaded view
|

Re: Change Pharo window icon

philippeback
For Windows one can change it using a resource editor.


Phil

On Feb 2, 2018 20:33, "Stephane Ducasse" <[hidden email]> wrote:
Would it be possible to change the icon without having to compile a new VM?
To me the current setup looks so monolithic and dated.
I would expect that somebody can deploy a application with its own
logo by just providing some new resources.

Stef

On Wed, Jan 31, 2018 at 11:17 PM, Eliot Miranda <[hidden email]> wrote:
> Hi Vincent,
>
> On Wed, Jan 31, 2018 at 12:07 PM, <[hidden email]> wrote:
>>
>> Hi,
>>
>> I would like to know how to change the main Pharo window icon. I saw that
>> there is a primitive for the title:
>> DisplayScreen class  >> primitiveWindowTitle:string: ; primitive:
>> 'primitiveHostWindowTitle' module:'HostWindowPlugin'
>> but I cannot find one for the icon.
>> Should another primitive need to be implemented?
>
>
> The icon is baked into the VM executable.  So to change it one has to build
> a VM with a different icon.
>
> On Windows it is in
>     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.ico
> and the file that specifies to use Pharo.ico is
>     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.rc
>
> On Mac OS X it is in
>     platforms/iOS/vm/OSX/Pharo.icns
> (alongside three others such as PharoImage.icns)
> and the file that specifies to use Pharo.icns is
>     {build.macos32x86,build.macos64x64}/pharo.cog.spur/Makefile
> in setting the VM variable.  The file that associates the other icons with
> specific file types is
>     platforms/iOS//vm/OSX/Pharo-Info.plist
>
> If you're changing the Pharo icon let me suggest you update the icon files
> themselves in the opensmalltalk-vm source tree.
>
> If you're creating a new variant of the VM for some new purpose (say a
> special Lam VM) then let me suggest you add the icons to the
> opensmalltalk-vm source tree, creating special build directories for these
> VMs, such as {build.macos32x86,build.macos64x64}/lam.pharo.cog.spur/
>
> If you want to do this privately, then take either of the approaches above
> and simply don't publish the edits.  You can write a script that takes an
> updated checked-out opensmalltalk-vm source tree and edits it with files
> from a specific repository.  I have such scripts and can help you with them.
> Hint, pax is a very convenient directory hierarchy copying tool available at
> least on Mac OS X.  pax -rwlk will copy the trees under a sequence of
> directories into their corresponding places in a target tree.
>
>>
>> Thanks!
>>
>> Vincent
>>
>>
>
>
>
> --
> _,,,^..^,,,_
> best, Eliot

Reply | Threaded
Open this post in threaded view
|

Re: Change Pharo window icon

Stephane Ducasse-3
Yes I did that when I was at University. So clearly dated.


On Fri, Feb 2, 2018 at 8:40 PM, [hidden email] <[hidden email]> wrote:

> For Windows one can change it using a resource editor.
>
> http://www.angusj.com/resourcehacker/
>
> Phil
>
> On Feb 2, 2018 20:33, "Stephane Ducasse" <[hidden email]> wrote:
>>
>> Would it be possible to change the icon without having to compile a new
>> VM?
>> To me the current setup looks so monolithic and dated.
>> I would expect that somebody can deploy a application with its own
>> logo by just providing some new resources.
>>
>> Stef
>>
>> On Wed, Jan 31, 2018 at 11:17 PM, Eliot Miranda <[hidden email]>
>> wrote:
>> > Hi Vincent,
>> >
>> > On Wed, Jan 31, 2018 at 12:07 PM, <[hidden email]>
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >> I would like to know how to change the main Pharo window icon. I saw
>> >> that
>> >> there is a primitive for the title:
>> >> DisplayScreen class  >> primitiveWindowTitle:string: ; primitive:
>> >> 'primitiveHostWindowTitle' module:'HostWindowPlugin'
>> >> but I cannot find one for the icon.
>> >> Should another primitive need to be implemented?
>> >
>> >
>> > The icon is baked into the VM executable.  So to change it one has to
>> > build
>> > a VM with a different icon.
>> >
>> > On Windows it is in
>> >     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.ico
>> > and the file that specifies to use Pharo.ico is
>> >     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.rc
>> >
>> > On Mac OS X it is in
>> >     platforms/iOS/vm/OSX/Pharo.icns
>> > (alongside three others such as PharoImage.icns)
>> > and the file that specifies to use Pharo.icns is
>> >     {build.macos32x86,build.macos64x64}/pharo.cog.spur/Makefile
>> > in setting the VM variable.  The file that associates the other icons
>> > with
>> > specific file types is
>> >     platforms/iOS//vm/OSX/Pharo-Info.plist
>> >
>> > If you're changing the Pharo icon let me suggest you update the icon
>> > files
>> > themselves in the opensmalltalk-vm source tree.
>> >
>> > If you're creating a new variant of the VM for some new purpose (say a
>> > special Lam VM) then let me suggest you add the icons to the
>> > opensmalltalk-vm source tree, creating special build directories for
>> > these
>> > VMs, such as {build.macos32x86,build.macos64x64}/lam.pharo.cog.spur/
>> >
>> > If you want to do this privately, then take either of the approaches
>> > above
>> > and simply don't publish the edits.  You can write a script that takes
>> > an
>> > updated checked-out opensmalltalk-vm source tree and edits it with files
>> > from a specific repository.  I have such scripts and can help you with
>> > them.
>> > Hint, pax is a very convenient directory hierarchy copying tool
>> > available at
>> > least on Mac OS X.  pax -rwlk will copy the trees under a sequence of
>> > directories into their corresponding places in a target tree.
>> >
>> >>
>> >> Thanks!
>> >>
>> >> Vincent
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > _,,,^..^,,,_
>> > best, Eliot
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Change Pharo window icon

Stephane Ducasse-3
In reply to this post by Stephane Ducasse-3
Tx we should have a class to do it for us.

On Fri, Feb 2, 2018 at 11:42 PM, Eliot Miranda <[hidden email]> wrote:

> Hi Stef,
>
> On Fri, Feb 2, 2018 at 11:32 AM, Stephane Ducasse <[hidden email]>
> wrote:
>>
>> Would it be possible to change the icon without having to compile a new
>> VM?
>
>
> Through an AppleScript:
>
> e.g. https://www.sethvargo.com/replace-icons-osx/
>
>>
>> To me the current setup looks so monolithic and dated.
>> I would expect that somebody can deploy a application with its own
>> logo by just providing some new resources.
>
>
> And that's indeed possible.  Take the .app bundle and change the .icns file
> as described above.
>
>>
>>
>> Stef
>>
>> On Wed, Jan 31, 2018 at 11:17 PM, Eliot Miranda <[hidden email]>
>> wrote:
>> > Hi Vincent,
>> >
>> > On Wed, Jan 31, 2018 at 12:07 PM, <[hidden email]>
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >> I would like to know how to change the main Pharo window icon. I saw
>> >> that
>> >> there is a primitive for the title:
>> >> DisplayScreen class  >> primitiveWindowTitle:string: ; primitive:
>> >> 'primitiveHostWindowTitle' module:'HostWindowPlugin'
>> >> but I cannot find one for the icon.
>> >> Should another primitive need to be implemented?
>> >
>> >
>> > The icon is baked into the VM executable.  So to change it one has to
>> > build
>> > a VM with a different icon.
>> >
>> > On Windows it is in
>> >     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.ico
>> > and the file that specifies to use Pharo.ico is
>> >     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.rc
>> >
>> > On Mac OS X it is in
>> >     platforms/iOS/vm/OSX/Pharo.icns
>> > (alongside three others such as PharoImage.icns)
>> > and the file that specifies to use Pharo.icns is
>> >     {build.macos32x86,build.macos64x64}/pharo.cog.spur/Makefile
>> > in setting the VM variable.  The file that associates the other icons
>> > with
>> > specific file types is
>> >     platforms/iOS//vm/OSX/Pharo-Info.plist
>> >
>> > If you're changing the Pharo icon let me suggest you update the icon
>> > files
>> > themselves in the opensmalltalk-vm source tree.
>> >
>> > If you're creating a new variant of the VM for some new purpose (say a
>> > special Lam VM) then let me suggest you add the icons to the
>> > opensmalltalk-vm source tree, creating special build directories for
>> > these
>> > VMs, such as {build.macos32x86,build.macos64x64}/lam.pharo.cog.spur/
>> >
>> > If you want to do this privately, then take either of the approaches
>> > above
>> > and simply don't publish the edits.  You can write a script that takes
>> > an
>> > updated checked-out opensmalltalk-vm source tree and edits it with files
>> > from a specific repository.  I have such scripts and can help you with
>> > them.
>> > Hint, pax is a very convenient directory hierarchy copying tool
>> > available at
>> > least on Mac OS X.  pax -rwlk will copy the trees under a sequence of
>> > directories into their corresponding places in a target tree.
>> >
>> >>
>> >> Thanks!
>> >>
>> >> Vincent
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > _,,,^..^,,,_
>> > best, Eliot
>>
>
>
>
> --
> _,,,^..^,,,_
> best, Eliot

Reply | Threaded
Open this post in threaded view
|

Re: Change Pharo window icon

philippe.back@highoctane.be
In reply to this post by Stephane Ducasse-3
Well, Windows is still Windows at the core.

Even some Windows 2.0 books can provide insights into its working principles that are hard to find these days.

Anyway, I remember that there is a way to change the icon at runtime but not when listing the exe. Hence Resource editor.

Phil

On Feb 2, 2018 21:17, "Stephane Ducasse" <[hidden email]> wrote:
Yes I did that when I was at University. So clearly dated.


On Fri, Feb 2, 2018 at 8:40 PM, [hidden email] <[hidden email]> wrote:
> For Windows one can change it using a resource editor.
>
> http://www.angusj.com/resourcehacker/
>
> Phil
>
> On Feb 2, 2018 20:33, "Stephane Ducasse" <[hidden email]> wrote:
>>
>> Would it be possible to change the icon without having to compile a new
>> VM?
>> To me the current setup looks so monolithic and dated.
>> I would expect that somebody can deploy a application with its own
>> logo by just providing some new resources.
>>
>> Stef
>>
>> On Wed, Jan 31, 2018 at 11:17 PM, Eliot Miranda <[hidden email]>
>> wrote:
>> > Hi Vincent,
>> >
>> > On Wed, Jan 31, 2018 at 12:07 PM, <[hidden email]>
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >> I would like to know how to change the main Pharo window icon. I saw
>> >> that
>> >> there is a primitive for the title:
>> >> DisplayScreen class  >> primitiveWindowTitle:string: ; primitive:
>> >> 'primitiveHostWindowTitle' module:'HostWindowPlugin'
>> >> but I cannot find one for the icon.
>> >> Should another primitive need to be implemented?
>> >
>> >
>> > The icon is baked into the VM executable.  So to change it one has to
>> > build
>> > a VM with a different icon.
>> >
>> > On Windows it is in
>> >     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.ico
>> > and the file that specifies to use Pharo.ico is
>> >     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.rc
>> >
>> > On Mac OS X it is in
>> >     platforms/iOS/vm/OSX/Pharo.icns
>> > (alongside three others such as PharoImage.icns)
>> > and the file that specifies to use Pharo.icns is
>> >     {build.macos32x86,build.macos64x64}/pharo.cog.spur/Makefile
>> > in setting the VM variable.  The file that associates the other icons
>> > with
>> > specific file types is
>> >     platforms/iOS//vm/OSX/Pharo-Info.plist
>> >
>> > If you're changing the Pharo icon let me suggest you update the icon
>> > files
>> > themselves in the opensmalltalk-vm source tree.
>> >
>> > If you're creating a new variant of the VM for some new purpose (say a
>> > special Lam VM) then let me suggest you add the icons to the
>> > opensmalltalk-vm source tree, creating special build directories for
>> > these
>> > VMs, such as {build.macos32x86,build.macos64x64}/lam.pharo.cog.spur/
>> >
>> > If you want to do this privately, then take either of the approaches
>> > above
>> > and simply don't publish the edits.  You can write a script that takes
>> > an
>> > updated checked-out opensmalltalk-vm source tree and edits it with files
>> > from a specific repository.  I have such scripts and can help you with
>> > them.
>> > Hint, pax is a very convenient directory hierarchy copying tool
>> > available at
>> > least on Mac OS X.  pax -rwlk will copy the trees under a sequence of
>> > directories into their corresponding places in a target tree.
>> >
>> >>
>> >> Thanks!
>> >>
>> >> Vincent
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > _,,,^..^,,,_
>> > best, Eliot
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Change Pharo window icon

Aliaksei Syrel
Hi

Since Pharo uses sdl2 (or should use)

Alex

On Sat, 3 Feb 2018 at 13:27, [hidden email] <[hidden email]> wrote:
Well, Windows is still Windows at the core.

Even some Windows 2.0 books can provide insights into its working principles that are hard to find these days.

Anyway, I remember that there is a way to change the icon at runtime but not when listing the exe. Hence Resource editor.

Phil

On Feb 2, 2018 21:17, "Stephane Ducasse" <[hidden email]> wrote:
Yes I did that when I was at University. So clearly dated.


On Fri, Feb 2, 2018 at 8:40 PM, [hidden email] <[hidden email]> wrote:
> For Windows one can change it using a resource editor.
>
> http://www.angusj.com/resourcehacker/
>
> Phil
>
> On Feb 2, 2018 20:33, "Stephane Ducasse" <[hidden email]> wrote:
>>
>> Would it be possible to change the icon without having to compile a new
>> VM?
>> To me the current setup looks so monolithic and dated.
>> I would expect that somebody can deploy a application with its own
>> logo by just providing some new resources.
>>
>> Stef
>>
>> On Wed, Jan 31, 2018 at 11:17 PM, Eliot Miranda <[hidden email]>
>> wrote:
>> > Hi Vincent,
>> >
>> > On Wed, Jan 31, 2018 at 12:07 PM, <[hidden email]>
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >> I would like to know how to change the main Pharo window icon. I saw
>> >> that
>> >> there is a primitive for the title:
>> >> DisplayScreen class  >> primitiveWindowTitle:string: ; primitive:
>> >> 'primitiveHostWindowTitle' module:'HostWindowPlugin'
>> >> but I cannot find one for the icon.
>> >> Should another primitive need to be implemented?
>> >
>> >
>> > The icon is baked into the VM executable.  So to change it one has to
>> > build
>> > a VM with a different icon.
>> >
>> > On Windows it is in
>> >     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.ico
>> > and the file that specifies to use Pharo.ico is
>> >     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.rc
>> >
>> > On Mac OS X it is in
>> >     platforms/iOS/vm/OSX/Pharo.icns
>> > (alongside three others such as PharoImage.icns)
>> > and the file that specifies to use Pharo.icns is
>> >     {build.macos32x86,build.macos64x64}/pharo.cog.spur/Makefile
>> > in setting the VM variable.  The file that associates the other icons
>> > with
>> > specific file types is
>> >     platforms/iOS//vm/OSX/Pharo-Info.plist
>> >
>> > If you're changing the Pharo icon let me suggest you update the icon
>> > files
>> > themselves in the opensmalltalk-vm source tree.
>> >
>> > If you're creating a new variant of the VM for some new purpose (say a
>> > special Lam VM) then let me suggest you add the icons to the
>> > opensmalltalk-vm source tree, creating special build directories for
>> > these
>> > VMs, such as {build.macos32x86,build.macos64x64}/lam.pharo.cog.spur/
>> >
>> > If you want to do this privately, then take either of the approaches
>> > above
>> > and simply don't publish the edits.  You can write a script that takes
>> > an
>> > updated checked-out opensmalltalk-vm source tree and edits it with files
>> > from a specific repository.  I have such scripts and can help you with
>> > them.
>> > Hint, pax is a very convenient directory hierarchy copying tool
>> > available at
>> > least on Mac OS X.  pax -rwlk will copy the trees under a sequence of
>> > directories into their corresponding places in a target tree.
>> >
>> >>
>> >> Thanks!
>> >>
>> >> Vincent
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > _,,,^..^,,,_
>> > best, Eliot
>>
>

--
Cheers,
Alex
Reply | Threaded
Open this post in threaded view
|

Re: Change Pharo window icon

Eliot Miranda-2
Hi Aliaksei,

On Feb 3, 2018, at 4:30 AM, Aliaksei Syrel <[hidden email]> wrote:

Hi

Since Pharo uses sdl2 (or should use)

Hang on.  Changing a window's icon is not at all the same as changing the VM's icon.  Which are we talking about here?  I thought we were talking about changing the VM icon.


Alex

On Sat, 3 Feb 2018 at 13:27, [hidden email] <[hidden email]> wrote:
Well, Windows is still Windows at the core.

Even some Windows 2.0 books can provide insights into its working principles that are hard to find these days.

Anyway, I remember that there is a way to change the icon at runtime but not when listing the exe. Hence Resource editor.

Phil

On Feb 2, 2018 21:17, "Stephane Ducasse" <[hidden email]> wrote:
Yes I did that when I was at University. So clearly dated.


On Fri, Feb 2, 2018 at 8:40 PM, [hidden email] <[hidden email]> wrote:
> For Windows one can change it using a resource editor.
>
> http://www.angusj.com/resourcehacker/
>
> Phil
>
> On Feb 2, 2018 20:33, "Stephane Ducasse" <[hidden email]> wrote:
>>
>> Would it be possible to change the icon without having to compile a new
>> VM?
>> To me the current setup looks so monolithic and dated.
>> I would expect that somebody can deploy a application with its own
>> logo by just providing some new resources.
>>
>> Stef
>>
>> On Wed, Jan 31, 2018 at 11:17 PM, Eliot Miranda <[hidden email]>
>> wrote:
>> > Hi Vincent,
>> >
>> > On Wed, Jan 31, 2018 at 12:07 PM, <[hidden email]>
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >> I would like to know how to change the main Pharo window icon. I saw
>> >> that
>> >> there is a primitive for the title:
>> >> DisplayScreen class  >> primitiveWindowTitle:string: ; primitive:
>> >> 'primitiveHostWindowTitle' module:'HostWindowPlugin'
>> >> but I cannot find one for the icon.
>> >> Should another primitive need to be implemented?
>> >
>> >
>> > The icon is baked into the VM executable.  So to change it one has to
>> > build
>> > a VM with a different icon.
>> >
>> > On Windows it is in
>> >     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.ico
>> > and the file that specifies to use Pharo.ico is
>> >     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.rc
>> >
>> > On Mac OS X it is in
>> >     platforms/iOS/vm/OSX/Pharo.icns
>> > (alongside three others such as PharoImage.icns)
>> > and the file that specifies to use Pharo.icns is
>> >     {build.macos32x86,build.macos64x64}/pharo.cog.spur/Makefile
>> > in setting the VM variable.  The file that associates the other icons
>> > with
>> > specific file types is
>> >     platforms/iOS//vm/OSX/Pharo-Info.plist
>> >
>> > If you're changing the Pharo icon let me suggest you update the icon
>> > files
>> > themselves in the opensmalltalk-vm source tree.
>> >
>> > If you're creating a new variant of the VM for some new purpose (say a
>> > special Lam VM) then let me suggest you add the icons to the
>> > opensmalltalk-vm source tree, creating special build directories for
>> > these
>> > VMs, such as {build.macos32x86,build.macos64x64}/lam.pharo.cog.spur/
>> >
>> > If you want to do this privately, then take either of the approaches
>> > above
>> > and simply don't publish the edits.  You can write a script that takes
>> > an
>> > updated checked-out opensmalltalk-vm source tree and edits it with files
>> > from a specific repository.  I have such scripts and can help you with
>> > them.
>> > Hint, pax is a very convenient directory hierarchy copying tool
>> > available at
>> > least on Mac OS X.  pax -rwlk will copy the trees under a sequence of
>> > directories into their corresponding places in a target tree.
>> >
>> >>
>> >> Thanks!
>> >>
>> >> Vincent
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > _,,,^..^,,,_
>> > best, Eliot
>>
>

--
Cheers,
Alex
Reply | Threaded
Open this post in threaded view
|

Re: Change Pharo window icon

Aliaksei Syrel
Hi Eliot,

I thought Vincent wants to change Pharo main window icon (image).
I would like to know how to change the main Pharo window icon.

The fact that he mentioned an ability to change window's title from inside of the running image suggested me that he actually wants to change an icon at runtime too.
DisplayScreen class  >> primitiveWindowTitle:string:

I may be wrong :) But in any case it would be nice to be able to change window icon from the image.

Cheers,
Alex

On 3 February 2018 at 17:01, Eliot Miranda <[hidden email]> wrote:
Hi Aliaksei,

On Feb 3, 2018, at 4:30 AM, Aliaksei Syrel <[hidden email]> wrote:

Hi

Since Pharo uses sdl2 (or should use)

Hang on.  Changing a window's icon is not at all the same as changing the VM's icon.  Which are we talking about here?  I thought we were talking about changing the VM icon.


Alex

On Sat, 3 Feb 2018 at 13:27, [hidden email] <[hidden email]> wrote:
Well, Windows is still Windows at the core.

Even some Windows 2.0 books can provide insights into its working principles that are hard to find these days.

Anyway, I remember that there is a way to change the icon at runtime but not when listing the exe. Hence Resource editor.

Phil

On Feb 2, 2018 21:17, "Stephane Ducasse" <[hidden email]> wrote:
Yes I did that when I was at University. So clearly dated.


On Fri, Feb 2, 2018 at 8:40 PM, [hidden email] <[hidden email]> wrote:
> For Windows one can change it using a resource editor.
>
> http://www.angusj.com/resourcehacker/
>
> Phil
>
> On Feb 2, 2018 20:33, "Stephane Ducasse" <[hidden email]> wrote:
>>
>> Would it be possible to change the icon without having to compile a new
>> VM?
>> To me the current setup looks so monolithic and dated.
>> I would expect that somebody can deploy a application with its own
>> logo by just providing some new resources.
>>
>> Stef
>>
>> On Wed, Jan 31, 2018 at 11:17 PM, Eliot Miranda <[hidden email]>
>> wrote:
>> > Hi Vincent,
>> >
>> > On Wed, Jan 31, 2018 at 12:07 PM, <[hidden email]>
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >> I would like to know how to change the main Pharo window icon. I saw
>> >> that
>> >> there is a primitive for the title:
>> >> DisplayScreen class  >> primitiveWindowTitle:string: ; primitive:
>> >> 'primitiveHostWindowTitle' module:'HostWindowPlugin'
>> >> but I cannot find one for the icon.
>> >> Should another primitive need to be implemented?
>> >
>> >
>> > The icon is baked into the VM executable.  So to change it one has to
>> > build
>> > a VM with a different icon.
>> >
>> > On Windows it is in
>> >     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.ico
>> > and the file that specifies to use Pharo.ico is
>> >     {build.win32x86,build.win64x64}/pharo.cog.spur/Pharo.rc
>> >
>> > On Mac OS X it is in
>> >     platforms/iOS/vm/OSX/Pharo.icns
>> > (alongside three others such as PharoImage.icns)
>> > and the file that specifies to use Pharo.icns is
>> >     {build.macos32x86,build.macos64x64}/pharo.cog.spur/Makefile
>> > in setting the VM variable.  The file that associates the other icons
>> > with
>> > specific file types is
>> >     platforms/iOS//vm/OSX/Pharo-Info.plist
>> >
>> > If you're changing the Pharo icon let me suggest you update the icon
>> > files
>> > themselves in the opensmalltalk-vm source tree.
>> >
>> > If you're creating a new variant of the VM for some new purpose (say a
>> > special Lam VM) then let me suggest you add the icons to the
>> > opensmalltalk-vm source tree, creating special build directories for
>> > these
>> > VMs, such as {build.macos32x86,build.macos64x64}/lam.pharo.cog.spur/
>> >
>> > If you want to do this privately, then take either of the approaches
>> > above
>> > and simply don't publish the edits.  You can write a script that takes
>> > an
>> > updated checked-out opensmalltalk-vm source tree and edits it with files
>> > from a specific repository.  I have such scripts and can help you with
>> > them.
>> > Hint, pax is a very convenient directory hierarchy copying tool
>> > available at
>> > least on Mac OS X.  pax -rwlk will copy the trees under a sequence of
>> > directories into their corresponding places in a target tree.
>> >
>> >>
>> >> Thanks!
>> >>
>> >> Vincent
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > _,,,^..^,,,_
>> > best, Eliot
>>
>

--
Cheers,
Alex

kmo
Reply | Threaded
Open this post in threaded view
|

Re: Change Pharo window icon

kmo
" But in any case it would be nice to be able to change window icon from the
image. "

It would be nice to change the window title from the image as well - but
that's been broken in Linux for as long as I can remember.



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html

Reply | Threaded
Open this post in threaded view
|

Re: Change Pharo window icon

Vincent.Blondeau
In reply to this post by Aliaksei Syrel

Hi,

 

The fact that he mentioned an ability to change window's title from inside of the running image suggested me that he actually wants to change an icon at runtime too.

 

Indeed, that is what I would like to do.

 

Cheers,

Vincent

 

From: Pharo-dev [mailto:[hidden email]] On Behalf Of Aliaksei Syrel
Sent: Saturday, February 3, 2018 8:09
To: Pharo Development List <[hidden email]>
Subject: Re: [Pharo-dev] Change Pharo window icon

 

Hi Eliot,

 

I thought Vincent wants to change Pharo main window icon (image).

I would like to know how to change the main Pharo window icon.

 

The fact that he mentioned an ability to change window's title from inside of the running image suggested me that he actually wants to change an icon at runtime too.

DisplayScreen class  >> primitiveWindowTitle:string:

 

I may be wrong :) But in any case it would be nice to be able to change window icon from the image.


Cheers,

Alex

 

On 3 February 2018 at 17:01, Eliot Miranda <[hidden email]> wrote:

Hi Aliaksei,

On Feb 3, 2018, at 4:30 AM, Aliaksei Syrel <[hidden email]> wrote:

Hi

 

Since Pharo uses sdl2 (or should use)

 

Hang on.  Changing a window's icon is not at all the same as changing the VM's icon.  Which are we talking about here?  I thought we were talking about changing the VM icon.



 

Alex