UserResidents

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
akee
Enthusiast
Enthusiast
Posts: 504
Joined: Wed Aug 18, 2004 9:52 am
Location: Penang, Malaysia

UserResidents

Post by akee »

Please allow constants (.res] files to be included from:

Code: Select all

../PureBasic/Residents/UserResidents
Thank you.
User avatar
Bisonte
Addict
Addict
Posts: 1333
Joined: Tue Oct 09, 2007 2:15 am

Re: UserResidents

Post by Bisonte »

A little question : Why you need another path ?
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
Axolotl
Addict
Addict
Posts: 936
Joined: Wed Dec 31, 2008 3:36 pm

Re: UserResidents

Post by Axolotl »

I guess it's to separate the user residents from the originals.
Advantage: you don't have to check for overwriting!?

BTW: I use this code to be on the safe side.....

Code: Select all

#OriginalResFiles$ = "Expat.res Interface.res InterfaceDX.res OpenGL.res PureBasic.res Scintilla.res WebView2.res Windows.res" 

Procedure IsOutputFilenameAnOriginal(SourceFilename$)  ; BOOL 
  Protected outFile$ 

  outFile$ = GetFilePart(SourceFilename$, #PB_FileSystem_NoExtension) + ".res"  ; output filename !! 
  If FindString(#OriginalResFiles$, outFile$) ; <== Safety Check => don't overwrite the PB original residents files 
    ProcedureReturn #True 
  EndIf 
  ProcedureReturn #False 
EndProcedure 
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Post Reply