Two resoures requests

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Dr. Dri
Enthusiast
Enthusiast
Posts: 243
Joined: Sat Aug 23, 2003 6:45 pm

Two resoures requests

Post by Dr. Dri »

Resources are very usefull but they are anoying things that need to be fixed.

Constants
i tried to compile this simple rc file but it doesn't work

Code: Select all

STRINGTABLE
LANGUAGE LANG_FRENCH, SUBLANG_DEFAULT
{
    1, 	"Français"
    2, 	"France"
}

STRINGTABLE
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
{
    1, 	"English"
    2, 	"England"
}
I have to add this to make it works

Code: Select all

#define LANG_ENGLISH  9
#define LANG_FRENCH  12

#define SUBLANG_DEFAULT 1
Such constants exist in PB residents and i think we shouldn't have to redefine them. If it's not possible, a simple #include common.h in each resource script is okay. I know it's easy to create a common.h file with a little script that will compute each constant found in pb native residents :twisted:

Relative path
If this common.h file exist, it migth be in the "compiler" folder with other compiling files. Now if i want to add icons in my executable i can use the ICON keyword in the rc file but i have to use absolute path. This is not handy when i take my program on other computers and when i always have to rewrite absolute paths. Another solution is to put icons in the compiler folder but it's not better... It's good to have the ability to include files directly from the compiler folder but the sourcecode folder should have the priority, shouldn'nt it ?

Dri :)
Dr. Dri
Enthusiast
Enthusiast
Posts: 243
Joined: Sat Aug 23, 2003 6:45 pm

Post by Dr. Dri »

Nothing about resources ?
Maybe already done for PB 4 ?
I hope i'll get informations about those problems...

Dri :shock:
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

Dr. Dri, about your avatar, a skeleton walks into a bar, sits down and says "Gimme a beer. And a mop." :D
Last edited by netmaestro on Wed Feb 22, 2006 4:11 am, edited 2 times in total.
BERESHEIT
Dr. Dri
Enthusiast
Enthusiast
Posts: 243
Joined: Sat Aug 23, 2003 6:45 pm

Post by Dr. Dri »

:roll:
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

:lol:
@}--`--,-- A rose by any other name ..
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

it's not a real problem, you can still include the whole "windows.h" file from a C compiler (for example PellesC) if you are dealing with external resource (which is supported only for advanced programmers).
Dr. Dri
Enthusiast
Enthusiast
Posts: 243
Joined: Sat Aug 23, 2003 6:45 pm

Post by Dr. Dri »

and for binary files like icons ? what should i do ?
absolute path is annoying when you work in several places

Dri
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

There is probably a path setup to do when running the porc.exe file. I will take a look, thanks. The best would be the or use the .rc file as current directory right ?
Dr. Dri
Enthusiast
Enthusiast
Posts: 243
Joined: Sat Aug 23, 2003 6:45 pm

Post by Dr. Dri »

Yes it is :)
It would be very handy ^^

Dri
Post Reply