Skip to content

Commit

Permalink
custom icon and windows resource
Browse files Browse the repository at this point in the history
  • Loading branch information
sherpya committed Oct 15, 2013
1 parent 07ef72b commit 558e29b
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Expand Up @@ -92,6 +92,8 @@ $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))

define DOPROG
OBJS-$(1) += $(1).o cmdutils.o $(EXEOBJS)
# if EXESUF is exe (win32) and the corresponding .rc file does exist
$(if $(and $(findstring .exe,$(EXESUF)),$(wildcard $(1).rc)),OBJS-$(1) += $(1)$(PROGSSUF)_rc.o)
$(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
$$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1))
$(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
Expand All @@ -101,6 +103,9 @@ endef

$(foreach P,$(PROGS-yes),$(eval $(call DOPROG,$(P))))

%$(PROGSSUF)_rc.o: %$(PROGSSUF).rc
$(CC:gcc=windres) -I$(SRC_PATH) -o $@ $<

%$(PROGSSUF)_g$(EXESUF): %.o $(FF_DEP_LIBS)
$(LD) $(LDFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)

Expand Down
36 changes: 36 additions & 0 deletions common.rc
@@ -0,0 +1,36 @@
#include <winver.h>
#include <version.h>
#include <libavutil/avutil.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>

1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
{
BLOCK "StringFileInfo"
{
BLOCK "000004b0" // LANG_NEUTRAL,UNICODE_CP
{
VALUE "Comments", __DESCRIPTION__
VALUE "FileDescription", __DESCRIPTION__
VALUE "FileVersion", FFMPEG_VERSION
VALUE "InternalName", __MODULE__
VALUE "LegalCopyright", "FFmpeg is a trademark of Fabrice Bellard, originator of the FFmpeg project"
VALUE "OriginalFilename", __MODULE__
VALUE "ProductName", "FFmpeg"
VALUE "libavutil", AV_STRINGIFY(LIBAVUTIL_VERSION)
VALUE "libavcodec", AV_STRINGIFY(LIBAVCODEC_VERSION)
VALUE "libavformat", AV_STRINGIFY(LIBAVFORMAT_VERSION)
VALUE "SpecialBuild", "http://oss.netfarm.it/mplayer-win32.php"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation",0,0x04b0
}
}

MAIN ICON DISCARDABLE __ICON__
Binary file added ffmpeg.ico
Binary file not shown.
4 changes: 4 additions & 0 deletions ffmpeg.rc
@@ -0,0 +1,4 @@
#define __MODULE__ "ffmpeg.exe"
#define __ICON__ "ffmpeg.ico"
#define __DESCRIPTION__ "FFmpeg video converter"
#include <common.rc>
Binary file added ffprobe.ico
Binary file not shown.
4 changes: 4 additions & 0 deletions ffprobe.rc
@@ -0,0 +1,4 @@
#define __MODULE__ "ffprobe.exe"
#define __ICON__ "ffprobe.ico"
#define __DESCRIPTION__ "Simple multimedia streams analyzer"
#include <common.rc>

0 comments on commit 558e29b

Please sign in to comment.