Author Topic: Resource files  (Read 12605 times)

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Resource files
« on: July 02, 2005, 11:43:31 pm »
:twisted:  :evil:  :x My thread was deleted the first time.

I have a .rc resrouce file in my project, and it does not get compiled into a .res file. I have added the path in the platform sdk to rc.exe (The vc++ resource compiler).

I can compile them manually
Code: [Select]
rc.exe /r xxxxx.rc to get my res file. Now when I put the res file with the object files to be linked in, it says 'cvtres.exe' command execution failed.

Also, when added to the project, the .rc file is treated as some misc file, and goes under the 'other files' section. The .res files can be added, and get a resource files section for them.... .res files are the compiled output of the resource compiler, and shouldn't be what you open as a resource... the .rc files are the 'source code' files.
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Resource files
« Reply #1 on: July 03, 2005, 01:30:21 am »
VD: Try to look at how Code::Blocks was compiled, we use rc files, too! :)

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Resource files
« Reply #2 on: July 03, 2005, 02:03:16 am »
Quote from: rickg22
VD: Try to look at how Code::Blocks was compiled, we use rc files, too! :)
I never said you didn't. :) I need a little help getting my rc files to compile. CB is not making my .res file at all, and I have done what was in the previous thread (check compile and link).
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Resource files
« Reply #3 on: July 03, 2005, 03:21:39 am »
hmmmmmmmmmmmmmmm dunno. Actually i don't work with res files :-P Yiannis?

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Resource files
« Reply #4 on: July 03, 2005, 03:30:07 am »
As for the IDE portion:

The .res is a binary. It's the output from the resource compiler. The RC file should be under resources, and not others.
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Resource files
« Reply #5 on: July 03, 2005, 09:55:07 am »
Quote
My thread was deleted the first time.

<RANT>
Your thread was not deleted. It was probably posted on the old server while the new server was active for some of us (due to DNS propagation time).
Please don't make it sound like we 're dictators or something...
</RANT>

About the tree view categorization, go to "Project->Project tree->Edit file types & categories" and edit the "Resources" file mask. You can also add/remove categories there, so feel free to adapt everything the way you want :)

About your resource problem now:
First make sure "Compile" and "Link" are checked in the file properties ( I 'm talking about the .rc file).
Also, make sure that the "Compiler variable" is set to WINDRES (in file properties too).
Then enable "Full command line" logging for your compiler (Settings->Compiler->[choose compiler]->Other->Compiler logging).
Rebuild your project and post the full build log here, if it doesn't give you a hint.
You might even want to post the project file's contents or, even better, send me just the project file to take a look at it.

If I understand correctly, you 're using VC toolkit to compile and, although I 've used it with resource files, there is always the chance that something might not work as expected. We 'll find this bug (if it is one) together :)

Yiannis.
Be patient!
This bug will be fixed soon...

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Resource files
« Reply #6 on: July 03, 2005, 12:00:32 pm »
Okay, all options tweaked as you asked.

The project has no need to be sent to you. There is nothing in it really. Main.h(includes windows headers for now), Main.cpp (empty winmain that calls the dialog box from my .rc) and arenaview.rc (the evil non-compiling villain in this whole thing Wink)

Project   : ArenaView
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\code\ArenaView\src\
--------------------------------------------------------------------------------
Switching to target: default
cl.exe /nologo   /GA /G6 /Ox /GA /G6 /Ox  /GA /G6 /Ox    /I"C:\Program Files\Microsoft Visual C++ Toolkit 2003\include" /I"C:\Program Files\Microsoft Platform SDK\Include" /IC:\code\DarkLib\src /I"C:\Program Files\Microsoft DirectX 9.0 SDK (February 2005)\Include" /c main.cpp /FoC:\code\ArenaView\obj\main.obj
main.cpp
RC.Exe    -foC:\code\ArenaView\obj\ArenaView.res ArenaView.rc
Command execution failed...
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Resource files
« Reply #7 on: July 03, 2005, 12:04:17 pm »
It appears that the CB settings always want to look in the VC++ bin fodler and not the platform SDK folder, even when I set it otherwise. I even add the path to the platform SDK bin in the extra paths options, and it still doesn't work!

I know you didn't delete my post. :)
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Resource files
« Reply #8 on: July 03, 2005, 12:07:08 pm »
Okay progress here.

Copying the full path into the little edit box that said rc.exe fixed the problem with RC.exe failing. I get my nice little .res file now... but it says 'cvtres.exe' cannot be run now at the linking stage.
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Resource files
« Reply #9 on: July 03, 2005, 12:17:05 pm »
Problem solved... :roll: cvtres.exe must be acquired seperately from microsoft.com

 :lol: But at least I found a problem with the extra bin path for rc.exe  :oops:
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Resource files
« Reply #10 on: July 03, 2005, 12:20:58 pm »
Quote from: Vampyre_Dark
It appears that the CB settings always want to look in the VC++ bin fodler and not the platform SDK folder, even when I set it otherwise. I even add the path to the platform SDK bin in the extra paths options, and it still doesn't work!

I now understand the problem. I thought that rc.exe was not ever called.
What C::B version are you using?
1.0-finalbeta had a bug with the compiler extra bin paths, which is fixed in CVS, AFAIK.

Quote from: Vampyre_Dark
I know you didn't delete my post. :)

I know you know :). It's just that someone might read it and think otherwise, that's why I had to reply...

Yiannis.
Be patient!
This bug will be fixed soon...

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Resource files
« Reply #11 on: July 03, 2005, 12:27:30 pm »
This is the link to the cvtres.exe file. You might want to note this somewhere. I can't be the only one to eventually have this problem.
http://download.microsoft.com/download/vstudio97pro/patch/1/win98/en-us/cvtres1.exe

I'm using the finalbeta build.

 :oops: You've made comments about other things I've mentioned being fixed. Maybe I should try the cvs version? Can I just swap out the .exe or do I have to uninstall? I don't want to have to redo all my colours and compiler settings.

Me asking you what you thought of us sending you our custom colours was another thread that was not deleted. :lol:
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Resource files
« Reply #12 on: July 03, 2005, 01:06:39 pm »
No need to uninstall :)
But you can't just swap the exe. The plugins need update too and all the zip resource files. You can have more than on C::B version installed at the same time (but they will share configuration settings).
Anyway, it seems that the next release is not too far ahead, so you might want to wait.

Quote
Me asking you what you thought of us sending you our custom colours was another thread that was not deleted.

In CVS, there is a new colour configuration system in place. Simple external XML files describe the editor colors for a particular language. To add support for a new language (must be supported by scintilla, mind you), just a new XML file is needed.
Already supported now are:
  • C/C++ files
  • RC files
  • Hitachi H8 assembler files
  • Lua scripts
  • GameMonkey scripts[/list:u]
    Adding support for other files is just a matter of adding a new XML file and restarting C::B :)
    Optionally, a sample file can be added that contains sample code (the one you see when editing the color settings).

    Here is the C/C++ lexer
    Here is the respective sample file
    (if the above links don't work, browse the C::B CVS repository here and navigate to "codeblocks/src/sdk/resources/lexers")

    [EDIT]
    I 've yet to write documentation about those "magic" index numbers in the lexer files, but I promise I will ;)
    [/EDIT]

    HTH,
    Yiannis.
Be patient!
This bug will be fixed soon...

Offline nfz

  • Multiple posting newcomer
  • *
  • Posts: 30
Re: Resource files
« Reply #13 on: October 26, 2005, 02:25:24 am »
Looks like the "magic" index numbers in the lexer files are the wxStyledTextCtrl Variable Wrappers.

An example is the lua lexxer has an index of 15 which corresponds to wxSTC_LEX_LUA.

Style name "Number" in the lua lexer xml has an index of 4 which corresponds to wxSTC_LUA_NUMBER.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Resource files
« Reply #14 on: October 26, 2005, 09:09:56 am »
Looks like the "magic" index numbers in the lexer files are the wxStyledTextCtrl Variable Wrappers.

An example is the lua lexxer has an index of 15 which corresponds to wxSTC_LEX_LUA.

Style name "Number" in the lua lexer xml has an index of 4 which corresponds to wxSTC_LUA_NUMBER.

You can take a look at this message, until a proper document is written.
Be patient!
This bug will be fixed soon...

Offline nfz

  • Multiple posting newcomer
  • *
  • Posts: 30
Re: Resource files
« Reply #15 on: October 26, 2005, 04:05:05 pm »
Thanks, I found that just after I made the post which confirmed what I had found in the Scintilla stuff.