Le fichier monProjet_private.res n'est pas crée ?!
Bonjour, je test un petit prog. Je voudrais le compiler à la main sans l'aide d'ide mais je suis en face d'un gros problème. Je n'arrive pas à inclure de fichier ressource. Je voudrais que quand on fait clique droit sur mon app et que l'on aille dans détails on est : compagnie : maComp, copyright : Gpl, version : X.X.X.X ...
En fait le fichier test_private.res n'est pas crée ce qui fais que rien ne se compile.
Voilà le prog :
test.c
Code:
1 2 3 4 5 6 7 8 9
|
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Programme par Samy Hocine\n\n");
system("PAUSE");
return 0;
} |
Makefile:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
# Project: test
# Makefile by SamSoft_DEV
CC = gcc.exe
WINDRES = windres.exe
RES = test_private.res
OBJ = test.o $(RES)
LINKOBJ = test.o $(RES)
LIBS = -L"C:\Users\SamSoft\Documents\Programmation\projets\C++\SamSoft_DEV\bin\lib"
INCS = -I"C:\Users\SamSoft\Documents\Programmation\projets\C++\SamSoft_DEV\bin\include"
CXXINCS = -I"C:\Users\SamSoft\Documents\Programmation\projets\C++\SamSoft_DEV\bin\lib\gcc\mingw32\3.4.2\include" -I"C:\Users\SamSoft\Documents\Programmation\projets\C++\SamSoft_DEV\bin\include"
BIN = test.exe
CXXFLAGS = $(CXXINCS)
CFLAGS = $(INCS)
RM = rm -f
.PHONY: all all-before all-after clean clean-custom
all: all-before test_private.res test.exe all-after
clean: clean-custom
${RM} $(OBJ) $(BIN)
$(BIN): $(OBJ)
$(CC) $(LINKOBJ) -o "test.exe" $(LIBS)
test.o: test.c
$(CC) -c test.c -o test.o $(CFLAGS)
test_private.res: test_private.rc
$(WINDRES) -i test_private.rc --input-format=rc -o test_private.res -o coff |
test_private.rc
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#include <windows.h>
1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 2,4,8,10
FILETYPE VFT_APP
{
BLOCK "StringFileInfo"
{
BLOCK "040904E4"
{
VALUE "CompanyName", "SamSoft"
VALUE "FileVersion", "1.0.0.0"
VALUE "FileVersion", "1.0.0.0"
VALUE "FileDescription", "Logiciel test"
VALUE "InternalName", "programme test"
VALUE "LegalCopyright", "GPL"
VALUE "LegalTrademarks", ""
VALUE "OriginalFilename", "testO"
VALUE "ProductName", "test"
VALUE "ProductVersion", "2.4.8.10"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x040C, 1252
}
} |
test_private.h
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
/* THIS FILE WILL BE OVERWRITTEN BY SamSoft_DEV */
/*DO NOT EDIT*/
#ifndef TEST_H
#define TEST_H
/* VERSION DEFINITIONS */
#define VER_STRING "2.4.8.10"
#define VER_MAJOR 2
#define VER_MINOR 4
#define VER_RELEASE 8
#define VER_BUILD 10
#define COMPANY_NAME "SamSoft"
#define FILE_VERSION "1.0.0.0"
#define FILE_DESCRIPTION "Logiciel test"
#define INTERNAL_NAME "programme test"
#define LEGAL_COPYRIGHT "GPL"
#define LEGAL_TRADEMARKS ""
#define ORIGINAL_FILENAME "testO"
#define PRODUCT_NAME "test"
#define PRODUCT_VERSION "2.4.8.10"
#endif /*TEST_H*/
|
Pour vérifier si tout était correct. J'ai importé un fichier .res (que j'ai eu en compilant un projet via mingw via devcpp) et je l'ai renommé test_private.res que j'ai placé dans le rep courrant de test.c, test_private.h... Et là ca compile mais avec les détails de l'app compilé via devcpp
C'est tout ce que j'ai.
Merci d'avance :cry:
PS:Je suis sous Vista et j'utilise MinGW version 3.4.2