Re: [Pharo-dev] Change Pharo window icon

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

Re: [Pharo-dev] Change Pharo window icon

Eliot Miranda-2
 
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: [Pharo-dev] Change Pharo window icon

Eliot Miranda-2
 
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:

 
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: [Pharo-dev] Change Pharo window icon

Eliot Miranda-2
In reply to this post by Eliot Miranda-2
 


On Fri, Apr 13, 2018 at 5:23 PM, Eliot Miranda <[hidden email]> wrote:
Hi Vincent,
    I've replied to the vm-dev list (Open Smalltalk Virtual Machine Development Discussion <[hidden email]>).  For some reason your post went to [hidden email].

On Fri, Apr 13, 2018 at 4:45 PM, <[hidden email]> 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)


Be careful.  Unless you add stub definitions to unix and iOS files you may end up breaking the build.  Have you tested the build on iOS and a linux?

I looked.  You did the right thing (of course).  Forgive me!
 
 

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?


+1.  I'd like Vincent to be a committer.
 

 

Thanks in advance,

Vincent

 

From: Blondeau, Vincent
Sent: Tuesday, February 6, 2018 18:36
To: Pharo Development List <[hidden email]>
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 [[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

 

 




--
_,,,^..^,,,_
best, Eliot



--
_,,,^..^,,,_
best, Eliot
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] Change Pharo window icon

Eliot Miranda-2
In reply to this post by Eliot Miranda-2
 


On Fri, Apr 13, 2018 at 4:45 PM, <[hidden email]> 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 <[hidden email]>
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 [[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

 

 




--
_,,,^..^,,,_
best, Eliot
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] Change Pharo window icon

Vincent.Blondeau
In reply to this post by Eliot Miranda-2
 

 

 

From: Eliot Miranda [mailto:[hidden email]]
Sent: Friday, April 13, 2018 17:25
To: Open Smalltalk Virtual Machine Development Discussion <[hidden email]>
Cc: Blondeau, Vincent <[hidden email]>
Subject: Re: [Pharo-dev] Change Pharo window icon

 

 

 

On Fri, Apr 13, 2018 at 5:23 PM, Eliot Miranda <[hidden email]> wrote:

Hi Vincent,
    I've replied to the vm-dev list (Open Smalltalk Virtual Machine Development Discussion <[hidden email]>).  For some reason your post went to [hidden email].

 

On Fri, Apr 13, 2018 at 4:45 PM, <[hidden email]> 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)

 

Be careful.  Unless you add stub definitions to unix and iOS files you may end up breaking the build.  Have you tested the build on iOS and a linux?

 

I looked.  You did the right thing (of course).  Forgive me!

 

Thanks Eliot! I just committed into VMMaker repository. What is the next step? Should I generate the C code from it and add it to the PR I made?

 

Vincent

 

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] Change Pharo window icon

timrowledge
 


> On 14-04-2018, at 12:32 PM, <[hidden email]> <[hidden email]> wrote:
>
> Thanks Eliot! I just committed into VMMaker repository. What is the next step? Should I generate the C code from it and add it to the PR I made?

I assume you've generated the code and built it to test? As long as that is all ok there's no need that I know of to do anything else. The VMMaker will make the C code and next time a version (or whatever git calls them) is generated and committed it will be there.

And, by the way, good catch. John & I didn't think of that need when we did the original ghost window stuff.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful Latin Phrases:- Visne saltare? Viam Latam Fungosam scio = Do you want to dance? I know the Funky Broadway.


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] Change Pharo window icon

Vincent.Blondeau
 
Thank you Tim!
So, I just committed it, waiting for the CI.

Vincent

-----Original Message-----
From: Vm-dev [mailto:[hidden email]] On Behalf Of tim Rowledge
Sent: Saturday, April 14, 2018 13:05
To: Squeak Virtual Machine Development Discussion <[hidden email]>
Subject: Re: [Vm-dev] [Pharo-dev] Change Pharo window icon

 


> On 14-04-2018, at 12:32 PM, <[hidden email]> <[hidden email]> wrote:
>
> Thanks Eliot! I just committed into VMMaker repository. What is the next step? Should I generate the C code from it and add it to the PR I made?

I assume you've generated the code and built it to test? As long as that is all ok there's no need that I know of to do anything else. The VMMaker will make the C code and next time a version (or whatever git calls them) is generated and committed it will be there.

And, by the way, good catch. John & I didn't think of that need when we did the original ghost window stuff.

tim
--
tim Rowledge; [hidden email]; https://urldefense.proofpoint.com/v2/url?u=http-3A__www.rowledge.org_tim&d=DwIGaQ&c=RWI7EqL8K9lqtga8KxgfzvOYoob76EZWE0yAO85PVMQ&r=kIZIYXBAA3fhM7P5HOuTC5w6mnEApTfXPTq3lR34ZiY&m=DexW8uqYxZhcMR6sPO0isfgiyoUgSEWUN277yrx8jHU&s=KDCl2-UE6trPKzOnr2YwCHhmMC6zjZ_32i5T1GVj_04&e=
Useful Latin Phrases:- Visne saltare? Viam Latam Fungosam scio = Do you want to dance? I know the Funky Broadway.