|
From: | bj |
Subject: | Re: Fw: [Tinycc-devel] windows resources LinkRes2Exe.exe by Mike Henning |
Date: | Thu, 05 Oct 2006 04:25:27 +0800 |
User-agent: | Opera Mail/9.02 (Win32) |
i forgot to put the output of LinkRes2Exe.exe, sorry :) DataSize = 0 HeaderSize = 32 ResType = NULL ResName = 0 DataVersion = 0 MemFlags = None LangId = 0 Version = 0 Charistics = 0 ------------------------------------------------------------ DataSize = 55776 HeaderSize = 40 ResType = Unknown ResName = 4E DataVersion = 68 MemFlags = MOVEABLE PURE PRELOAD DISCARDABLE LangId = 104 Version = 0 Charistics = 67698736 ------------------------------------------------------------ DataSize = 1769234802 HeaderSize = 28271 ResType = Unknown ResName = 0 DataVersion = 5505106 MemFlags = MOVEABLE PRELOAD LangId = 70 Version = 5111887 Charistics = 84 ------------------------------------------------------------my resource file has a sound file, font file and a manifest file. if anyone could give me an example c and rc source code that uses resources like a sound file, a font file and a text file using LinkRes2Exe that Mike sent to us all, i would gladly appreciate it. or if anyone had made LinkRes2Exe work with resources, please email me the source code or email it to us all.
thanks :) On Thu, 05 Oct 2006 02:01:11 +0800, bj <address@hidden> wrote:
to Mike Henning your program doesn't work.i have tried compiling it with MinGW, tcc, Borland C compiler bcc32, and Microsoft Visual C++ Toolkit 2003 but only MinGW and tcc were able to compile it to exe files. both exe files got an error.these are their error reports:LinkRes2Exetcc(LinkRes2Exe.c compiled with tcc) got this error report, the one you get when you click "click here" and "click here" again in the dialog where you can send the error report.<?xml version="1.0" encoding="UTF-16"?> <DATABASE> <EXE NAME="LinkRes2Exetcc.exe" FILTER="GRABMI_FILTER_PRIVACY"><MATCHING_FILE NAME="LinkRes2Exe.exe" SIZE="5632" CHECKSUM="0xF525AD9E" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="01/01/1970 00:00:00" UPTO_LINK_DATE="01/01/1970 00:00:00" /> <MATCHING_FILE NAME="LinkRes2Exe2.exe" SIZE="22379" CHECKSUM="0x6B3B6C39" MODULE_TYPE="WIN32" PE_CHECKSUM="0x13D53" LINKER_VERSION="0x10000" LINK_DATE="10/04/2006 14:27:39" UPTO_LINK_DATE="10/04/2006 14:27:39" /> <MATCHING_FILE NAME="LinkRes2Exegcc.exe" SIZE="22379" CHECKSUM="0x6B3B6C39" MODULE_TYPE="WIN32" PE_CHECKSUM="0x59A2" LINKER_VERSION="0x10000" LINK_DATE="10/04/2006 16:28:25" UPTO_LINK_DATE="10/04/2006 16:28:25" /> <MATCHING_FILE NAME="LinkRes2Exetcc.exe" SIZE="5632" CHECKSUM="0xF525AD9E" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="01/01/1970 00:00:00" UPTO_LINK_DATE="01/01/1970 00:00:00" /></EXE> <EXE NAME="msvcrt.dll" FILTER="GRABMI_FILTER_THISFILEONLY"><MATCHING_FILE NAME="msvcrt.dll" SIZE="343040" CHECKSUM="0x1BFAF375" BIN_FILE_VERSION="7.0.2600.2180" BIN_PRODUCT_VERSION="6.1.8638.2180" PRODUCT_VERSION="7.0.2600.2180" FILE_DESCRIPTION="Windows NT CRT DLL" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Microsoft® Windows® Operating System" FILE_VERSION="7.0.2600.2180 (xpsp_sp2_rtm.040803-2158)" ORIGINAL_FILENAME="msvcrt.dll" INTERNAL_NAME="msvcrt.dll" LEGAL_COPYRIGHT="© Microsoft Corporation. All rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x57CD3" LINKER_VERSION="0x50001" UPTO_BIN_FILE_VERSION="7.0.2600.2180" UPTO_BIN_PRODUCT_VERSION="6.1.8638.2180" LINK_DATE="08/04/2004 07:59:14" UPTO_LINK_DATE="08/04/2004 07:59:14" VER_LANGUAGE="English (United States) [0x409]" /></EXE> <EXE NAME="kernel32.dll" FILTER="GRABMI_FILTER_THISFILEONLY"><MATCHING_FILE NAME="kernel32.dll" SIZE="983552" CHECKSUM="0x4CE79457" BIN_FILE_VERSION="5.1.2600.2180" BIN_PRODUCT_VERSION="5.1.2600.2180" PRODUCT_VERSION="5.1.2600.2180" FILE_DESCRIPTION="Windows NT BASE API Client DLL" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Microsoft® Windows® Operating System" FILE_VERSION="5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)" ORIGINAL_FILENAME="kernel32" INTERNAL_NAME="kernel32" LEGAL_COPYRIGHT="© Microsoft Corporation. All rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0xFF848" LINKER_VERSION="0x50001" UPTO_BIN_FILE_VERSION="5.1.2600.2180" UPTO_BIN_PRODUCT_VERSION="5.1.2600.2180" LINK_DATE="08/04/2004 07:56:36" UPTO_LINK_DATE="08/04/2004 07:56:36" VER_LANGUAGE="English (United States) [0x409]" /></EXE> </DATABASE> LinkRes2Exegcc(LinkRes2Exe.c compiled with MinGW) has this error report <?xml version="1.0" encoding="UTF-16"?> <DATABASE> <EXE NAME="LinkRes2Exegcc.exe" FILTER="GRABMI_FILTER_PRIVACY"><MATCHING_FILE NAME="LinkRes2Exe.exe" SIZE="5632" CHECKSUM="0xF525AD9E" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="01/01/1970 00:00:00" UPTO_LINK_DATE="01/01/1970 00:00:00" /> <MATCHING_FILE NAME="LinkRes2Exe2.exe" SIZE="22379" CHECKSUM="0x6B3B6C39" MODULE_TYPE="WIN32" PE_CHECKSUM="0x13D53" LINKER_VERSION="0x10000" LINK_DATE="10/04/2006 14:27:39" UPTO_LINK_DATE="10/04/2006 14:27:39" /> <MATCHING_FILE NAME="LinkRes2Exegcc.exe" SIZE="22379" CHECKSUM="0x6B3B6C39" MODULE_TYPE="WIN32" PE_CHECKSUM="0x5AD6" LINKER_VERSION="0x10000" LINK_DATE="10/04/2006 16:33:33" UPTO_LINK_DATE="10/04/2006 16:33:33" /> <MATCHING_FILE NAME="LinkRes2Exetcc.exe" SIZE="5632" CHECKSUM="0xF525AD9E" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="01/01/1970 00:00:00" UPTO_LINK_DATE="01/01/1970 00:00:00" /></EXE> <EXE NAME="msvcrt.dll" FILTER="GRABMI_FILTER_THISFILEONLY"><MATCHING_FILE NAME="msvcrt.dll" SIZE="343040" CHECKSUM="0x1BFAF375" BIN_FILE_VERSION="7.0.2600.2180" BIN_PRODUCT_VERSION="6.1.8638.2180" PRODUCT_VERSION="7.0.2600.2180" FILE_DESCRIPTION="Windows NT CRT DLL" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Microsoft® Windows® Operating System" FILE_VERSION="7.0.2600.2180 (xpsp_sp2_rtm.040803-2158)" ORIGINAL_FILENAME="msvcrt.dll" INTERNAL_NAME="msvcrt.dll" LEGAL_COPYRIGHT="© Microsoft Corporation. All rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x1" MODULE_TYPE="WIN32" PE_CHECKSUM="0x57CD3" LINKER_VERSION="0x50001" UPTO_BIN_FILE_VERSION="7.0.2600.2180" UPTO_BIN_PRODUCT_VERSION="6.1.8638.2180" LINK_DATE="08/04/2004 07:59:14" UPTO_LINK_DATE="08/04/2004 07:59:14" VER_LANGUAGE="English (United States) [0x409]" /></EXE> <EXE NAME="kernel32.dll" FILTER="GRABMI_FILTER_THISFILEONLY"><MATCHING_FILE NAME="kernel32.dll" SIZE="983552" CHECKSUM="0x4CE79457" BIN_FILE_VERSION="5.1.2600.2180" BIN_PRODUCT_VERSION="5.1.2600.2180" PRODUCT_VERSION="5.1.2600.2180" FILE_DESCRIPTION="Windows NT BASE API Client DLL" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Microsoft® Windows® Operating System" FILE_VERSION="5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)" ORIGINAL_FILENAME="kernel32" INTERNAL_NAME="kernel32" LEGAL_COPYRIGHT="© Microsoft Corporation. All rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0xFF848" LINKER_VERSION="0x50001" UPTO_BIN_FILE_VERSION="5.1.2600.2180" UPTO_BIN_PRODUCT_VERSION="5.1.2600.2180" LINK_DATE="08/04/2004 07:56:36" UPTO_LINK_DATE="08/04/2004 07:56:36" VER_LANGUAGE="English (United States) [0x409]" /></EXE> </DATABASE>thanks for the help but can you give me an example c source code, resource file and rc source code that whenc source code is compiled with tcc to exe file, and rc source code and resource file are compiled with rc to res file,LinkRes2Exe.exe can combine the created .res file and .exe file into one .exe filethe PlaySoundA problem was solved already. thanks for that help in tiny_impdef.exe winmmto Jakob Eriksson, i have used your code and some strcat functions to make the executable create the manifest file from string variable for itself before it shows any windows. thanks for the code. thanks for the code. if Mike Henning's program still doesn't work i might resort to include your code of making the sound file from an unsigned char data. the only problem is you have to restart the executable for it to show the xp theme. so does anybody know how to make a c source code that when compiled can conditionally restart itself like so... if manifest file doesn't existwrite manifest file from string variable that contains manifest contents restart program // this is what i need , the code for the above and below is already done with the help of jakob's codeelse continue ... to all, so what i need are:a working LinkRes2Exe.exe or just c file, rc file and resource file that uses ita program that can restart itself conditionallyto Doug Currie, i'll try using that (strip and upx) on the executable. strip is from MinGW, right? just checkingto all, please, just a favor to all if you're going to send me exe files please rename their extensions to ._exe because my gmail account can 't accept exe files as attachments, :)thanks to all in advance, i hope i am not imposing on anyone, i just like to improve my work.Re: Fw: [Tinycc-devel] windows resources, playsound, xp theme (just reseFrom: Mike Henning Subject: Re: Fw: [Tinycc-devel] windows resources, playsound, xp theme (just resending to the group)Date: Tue, 3 Oct 2006 18:54:19 -0700 (PDT) Update: Use this version. The previous one has a small alignment bug preventing manifests from working correctly. Mike Henning --- Mike Henning <address@hidden> wrote:--- bj <address@hidden> wrote:okay, this is how i understand it> 1. make .c code and .rc code > 2. add int dummy __attribute__ > ((section(".rsrc"))); to c code > 3. compile .rc code to .res code > 4. compile c code > 5. compile .res file to .exe file using your program This looks correct.ok, absolutely!!please email your program to me.in > fact email it to all > of us so everyone can use it. > oh yeah, thanks so much. > and please reply to this email with the > 1. program you wrote , > 2. source code if possible, > 3. your full credits and > 4. license to it > so i can add it to my list of licenses on my thesis. > thanks again. >> oh yeah, to all. does anyone know how to link your > code with .a files, > .lib files and .h files like mmsystem.h and> winmm.lib or libwinmm.a? i > linked my code to libwinmm.a and mmsystem.h but it> still can't find > PlaySoundA (it says tcc: undefined symbol> 'PlaySoundA'), can anyone help > me here? like some source code for it? thanks in> advance. Use: Tiny_impdef winmm This will create a winmm.def file that should be placed in your Lib path. You can then link by adding the usual -lwinmm I've attached the file along with the source code. It's nothing fancy but it works. The only limitation is that it does not currently support unicode ids which is not very common anyway. If there is a need for this I can add support. Hope this helps, Mike H. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection aroundhttp://mail.yahoo.com >_______________________________________________Tinycc-devel mailing list address@hiddenhttp://lists.nongnu.org/mailman/listinfo/tinycc-devel__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com LinkRes2Exe.zip Description: 1730702515-LinkRes2Exe.zip
-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
tccwindowwithbutton._exe
Description: Binary data
tccwindowwithbutton.exe.manifest
Description: Binary data
windowwithbutton.res
Description: Binary data
LinkRes2Exe._exe
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |