However the full path is not stored, so if the .pb file is moved to another folder, the compiler complains that it "can't find the icon file". The simple solution is to store the full path.UseIcon = ..\..\My.ico
IDE Options stored in PB File: icon file
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
IDE Options stored in PB File: icon file
Of the options stored, one is the app's icon:
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: IDE Options stored in PB File: icon file
If the full path is saved instead of the relative path and you move the pb file to another directory, the same problem persists.

Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
Re: IDE Options stored in PB File: icon file
Sicro wrote:If the full path is saved instead of the relative path and you move the pb file to another directory, the same problem persists.

Re: IDE Options stored in PB File: icon file
It will if the icon is stored anywhere in the project directory (which would be fairly common) that gets renamed.Dude wrote:Sicro wrote:If the full path is saved instead of the relative path and you move the pb file to another directory, the same problem persists.No it won't. If I tell it that my icon is stored as D:\MyIcon.ico, then my PB file will get the icon from D:\MyIcon.ico no matter where I move my PB file.
A best-of-both-worlds solution might be: the IDE could easily detect if the file is within the project directory ... if it is, use a relative path eg. "icons\MyIcon.ico", if not use the full external path "d:\common\icons\MyIcon.ico".
Re: IDE Options stored in PB File: icon file
The IDE should just use what's specified, so if it's a relative path, like "\icons\app.ico" with no leading drive qualifier, then just prefix the path with the PB source file path. Otherwise, if the specified path is absolute like "d:\icons\app.ico", then just use that and totally ignore the PB source file path.
[Edit] Oops, just realized that's what Keya said.
[Edit] Oops, just realized that's what Keya said.

Re: IDE Options stored in PB File: icon file
Yes, Keya, that's exactly what I wanted to write, but apparently it was already too late for me.

Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version