Change Pharo window icon
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
Hi Vincent, On Wed, Jan 31, 2018 at 12:07 PM, <Vincent.Blondeau@lamresearch.com> 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
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 <eliot.miranda@gmail.com> wrote:
Hi Vincent,
On Wed, Jan 31, 2018 at 12:07 PM, <Vincent.Blondeau@lamresearch.com> 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
For Windows one can change it using a resource editor. http://www.angusj.com/resourcehacker/ Phil On Feb 2, 2018 20:33, "Stephane Ducasse" <stepharo.self@gmail.com> 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 <eliot.miranda@gmail.com> wrote:
Hi Vincent,
On Wed, Jan 31, 2018 at 12:07 PM, <Vincent.Blondeau@lamresearch.com> 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
Yes I did that when I was at University. So clearly dated. On Fri, Feb 2, 2018 at 8:40 PM, phil@highoctane.be <phil@highoctane.be> 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" <stepharo.self@gmail.com> 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 <eliot.miranda@gmail.com> wrote:
Hi Vincent,
On Wed, Jan 31, 2018 at 12:07 PM, <Vincent.Blondeau@lamresearch.com> 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
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" <stepharo.self@gmail.com> wrote:
Yes I did that when I was at University. So clearly dated.
On Fri, Feb 2, 2018 at 8:40 PM, phil@highoctane.be <phil@highoctane.be> 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" <stepharo.self@gmail.com> 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 <
eliot.miranda@gmail.com>
wrote:
Hi Vincent,
On Wed, Jan 31, 2018 at 12:07 PM, <Vincent.Blondeau@lamresearch.com> 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
Hi Since Pharo uses sdl2 (or should use) https://wiki.libsdl.org/SDL_SetWindowIcon Alex On Sat, 3 Feb 2018 at 13:27, philippe.back@highoctane.be < philippe.back@gmail.com> 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" <stepharo.self@gmail.com> wrote:
Yes I did that when I was at University. So clearly dated.
On Fri, Feb 2, 2018 at 8:40 PM, phil@highoctane.be <phil@highoctane.be> 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" <stepharo.self@gmail.com> 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 <
eliot.miranda@gmail.com>
wrote:
Hi Vincent,
On Wed, Jan 31, 2018 at 12:07 PM, <Vincent.Blondeau@lamresearch.com> 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
Hi Aliaksei,
On Feb 3, 2018, at 4:30 AM, Aliaksei Syrel <alex.syrel@gmail.com> wrote:
Hi
Since Pharo uses sdl2 (or should use) https://wiki.libsdl.org/SDL_SetWindowIcon
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, philippe.back@highoctane.be <philippe.back@gmail.com> 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" <stepharo.self@gmail.com> wrote: Yes I did that when I was at University. So clearly dated.
On Fri, Feb 2, 2018 at 8:40 PM, phil@highoctane.be <phil@highoctane.be> 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" <stepharo.self@gmail.com> 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 <eliot.miranda@gmail.com> wrote:
Hi Vincent,
On Wed, Jan 31, 2018 at 12:07 PM, <Vincent.Blondeau@lamresearch.com> 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
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 <eliot.miranda@gmail.com> wrote:
Hi Aliaksei,
On Feb 3, 2018, at 4:30 AM, Aliaksei Syrel <alex.syrel@gmail.com> wrote:
Hi
Since Pharo uses sdl2 (or should use) https://wiki.libsdl.org/SDL_SetWindowIcon
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, philippe.back@highoctane.be < philippe.back@gmail.com> 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" <stepharo.self@gmail.com> wrote:
Yes I did that when I was at University. So clearly dated.
On Fri, Feb 2, 2018 at 8:40 PM, phil@highoctane.be <phil@highoctane.be> 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" <stepharo.self@gmail.com> 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 < eliot.miranda@gmail.com> wrote:
Hi Vincent,
On Wed, Jan 31, 2018 at 12:07 PM, <Vincent.Blondeau@lamresearch.com
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.macos6 4x64}/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
" 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
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:pharo-dev-bounces@lists.pharo.org] On Behalf Of Aliaksei Syrel Sent: Saturday, February 3, 2018 8:09 To: Pharo Development List <pharo-dev@lists.pharo.org> 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 <eliot.miranda@gmail.com<mailto:eliot.miranda@gmail.com>> wrote: Hi Aliaksei, On Feb 3, 2018, at 4:30 AM, Aliaksei Syrel <alex.syrel@gmail.com<mailto:alex.syrel@gmail.com>> wrote: Hi Since Pharo uses sdl2 (or should use) https://wiki.libsdl.org/SDL_SetWindowIcon<https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.libsdl.org_SDL-5FSetWindowIcon&d=DwMFaQ&c=RWI7EqL8K9lqtga8KxgfzvOYoob76EZWE0yAO85PVMQ&r=kIZIYXBAA3fhM7P5HOuTC5w6mnEApTfXPTq3lR34ZiY&m=l_zmsWuiNTZnwaqnFoVWP5ND2EpDg5f0AKqxxWuemDc&s=BquvgGPDy_24-w_Ilvxs0hadxiqEJ341IaRCJSoJPNM&e=> 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
Hi, In the way to change dynamically the icon of the main window, I am adding a primitive in the HostWindow VM Plugin. So, I implemented the primitive call on Pharo side: https://github.com/pharo-project/pharo/pull/1198 Modified the C plugin file: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/248 (only the windows version for now) And implemented the binding in VMMaker, and I would commit this last one. However, I do not have the write access to http://source.squeak.org/VMMaker. Could someone grant me to it? Thanks in advance, Vincent From: Blondeau, Vincent Sent: Tuesday, February 6, 2018 18:36 To: Pharo Development List <pharo-dev@lists.pharo.org> Subject: RE: [Pharo-dev] Change Pharo window icon 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:pharo-dev-bounces@lists.pharo.org] On Behalf Of Aliaksei Syrel Sent: Saturday, February 3, 2018 8:09 To: Pharo Development List <pharo-dev@lists.pharo.org<mailto:pharo-dev@lists.pharo.org>> 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 <eliot.miranda@gmail.com<mailto:eliot.miranda@gmail.com>> wrote: Hi Aliaksei, On Feb 3, 2018, at 4:30 AM, Aliaksei Syrel <alex.syrel@gmail.com<mailto:alex.syrel@gmail.com>> wrote: Hi Since Pharo uses sdl2 (or should use) https://wiki.libsdl.org/SDL_SetWindowIcon<https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.libsdl.org_SDL-5FSetWindowIcon&d=DwMFaQ&c=RWI7EqL8K9lqtga8KxgfzvOYoob76EZWE0yAO85PVMQ&r=kIZIYXBAA3fhM7P5HOuTC5w6mnEApTfXPTq3lR34ZiY&m=l_zmsWuiNTZnwaqnFoVWP5ND2EpDg5f0AKqxxWuemDc&s=BquvgGPDy_24-w_Ilvxs0hadxiqEJ341IaRCJSoJPNM&e=> 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 Fri, Apr 13, 2018 at 4:45 PM, <Vincent.Blondeau@lamresearch.com> wrote:
Hi,
In the way to change dynamically the icon of the main window, I am adding a primitive in the HostWindow VM Plugin.
So, I implemented the primitive call on Pharo side: https://github.com/pharo-project/pharo/pull/1198
Modified the C plugin file: https://github.com/ OpenSmalltalk/opensmalltalk-vm/pull/248 (only the windows version for now)
And implemented the binding in VMMaker, and I would commit this last one.
However, I do not have the write access to http://source.squeak.org/ VMMaker. Could someone grant me to it?
OK, you're now added to the committer list using your source.squeak.org credentials.
Thanks in advance,
Vincent
*From:* Blondeau, Vincent *Sent:* Tuesday, February 6, 2018 18:36 *To:* Pharo Development List <pharo-dev@lists.pharo.org> *Subject:* RE: [Pharo-dev] Change Pharo window icon
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:pharo-dev-bounces@lists.pharo.org <pharo-dev-bounces@lists.pharo.org>] *On Behalf Of *Aliaksei Syrel *Sent:* Saturday, February 3, 2018 8:09 *To:* Pharo Development List <pharo-dev@lists.pharo.org> *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 <eliot.miranda@gmail.com> wrote:
Hi Aliaksei,
On Feb 3, 2018, at 4:30 AM, Aliaksei Syrel <alex.syrel@gmail.com> wrote:
Hi
Since Pharo uses sdl2 (or should use)
https://wiki.libsdl.org/SDL_SetWindowIcon <https://urldefense.proofpoint.com/v2/url?u=https-3A__wiki.libsdl.org_SDL-5FS...>
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
-- _,,,^..^,,,_ best, Eliot
Hi Stef, On Fri, Feb 2, 2018 at 11:32 AM, Stephane Ducasse <stepharo.self@gmail.com> 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 <eliot.miranda@gmail.com> wrote:
Hi Vincent,
On Wed, Jan 31, 2018 at 12:07 PM, <Vincent.Blondeau@lamresearch.com> 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
Tx we should have a class to do it for us. On Fri, Feb 2, 2018 at 11:42 PM, Eliot Miranda <eliot.miranda@gmail.com> wrote:
Hi Stef,
On Fri, Feb 2, 2018 at 11:32 AM, Stephane Ducasse <stepharo.self@gmail.com> 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 <eliot.miranda@gmail.com> wrote:
Hi Vincent,
On Wed, Jan 31, 2018 at 12:07 PM, <Vincent.Blondeau@lamresearch.com> 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
participants (7)
-
Aliaksei Syrel -
Eliot Miranda -
kmo -
phil@highoctane.be -
philippe.back@highoctane.be -
Stephane Ducasse -
Vincent.Blondeau@lamresearch.com