fe-gtk: Use manual registration for resources.
This commit is contained in:
parent
6ca29b2eb4
commit
671a838b52
|
@ -54,6 +54,8 @@ src/common/textenums.h
|
|||
src/common/textevents.h
|
||||
src/fe-gtk/hexchat
|
||||
src/fe-gtk/hexchat.rc
|
||||
src/fe-gtk/resources.c
|
||||
src/fe-gtk/resources.h
|
||||
src/fe-text/hexchat-text
|
||||
src/htm/Main.resources
|
||||
src/htm/thememan.exe
|
||||
|
@ -74,7 +76,6 @@ src/**/*.plist
|
|||
# Win32 generated files
|
||||
plugins/wmpa/wmpa_h.h
|
||||
plugins/wmpa/wmpa_i.c
|
||||
src/fe-gtk/resources.c
|
||||
src/htm/obj/*
|
||||
win32/ipch/*
|
||||
win32/ext/perl/perl-x86-cache
|
||||
|
|
|
@ -17,7 +17,7 @@ EXTRA_DIST = \
|
|||
sexy-spell-entry.h textgui.h urlgrab.h userlistgui.h xtext.h \
|
||||
../../data/hexchat.gresource.xml
|
||||
|
||||
BUILT_SOURCES = resources.c
|
||||
BUILT_SOURCES = resources.h resources.c
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
|
||||
|
@ -43,12 +43,15 @@ endif
|
|||
hexchat_SOURCES = ascii.c banlist.c chanlist.c chanview.c custom-list.c \
|
||||
dccgui.c editlist.c fe-gtk.c fkeys.c gtkutil.c ignoregui.c joind.c menu.c \
|
||||
maingui.c notifygui.c $(notify_c) palette.c pixmaps.c plugin-tray.c $(plugingui_c) \
|
||||
plugin-notification.c rawlog.c resources.c servlistgui.c setup.c $(iso_codes_c) \
|
||||
plugin-notification.c rawlog.c resources.h resources.c servlistgui.c setup.c $(iso_codes_c) \
|
||||
sexy-spell-entry.c textgui.c urlgrab.c userlistgui.c xtext.c
|
||||
hexchat_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/src/common
|
||||
|
||||
resources.h: $(top_srcdir)/data/hexchat.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir)/data --generate-dependencies $(top_srcdir)/data/hexchat.gresource.xml)
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(top_srcdir)/data --generate-header --manual-register $<
|
||||
|
||||
resources.c: $(top_srcdir)/data/hexchat.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(top_srcdir)/data --generate-dependencies $(top_srcdir)/data/hexchat.gresource.xml)
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(top_srcdir)/data --generate-source $<
|
||||
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(top_srcdir)/data --generate-source --manual-register $<
|
||||
|
||||
if DO_STATIC_ANALYSIS
|
||||
analyze_plists = $(hexchat_SOURCES:%.c=%.plist)
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<!-- WholeProgramOptimization must be turned off for gresource constructors to work, otherwise the .CRT$XCU section is not emitted. -->
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\common;$(HexChatLib);$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
|
@ -43,8 +41,6 @@
|
|||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<!-- WholeProgramOptimization must be turned off for gresource constructors to work, otherwise the .CRT$XCU section is not emitted. -->
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\common;$(HexChatLib);$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DisableSpecificWarnings>4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
|
@ -62,7 +58,8 @@ SET SOLUTIONDIR=$(SolutionDir)..\
|
|||
powershell -File "$(SolutionDir)..\win32\version-template.ps1" "$(SolutionDir)..\src\fe-gtk\hexchat.rc.tt" "$(HexChatLib)hexchat.rc.utf8"
|
||||
REM hexchat.rc needs to be in UCS-2 or Resource Compiler will complain
|
||||
powershell "Get-Content -Encoding UTF8 '$(HexChatLib)hexchat.rc.utf8' | Out-File '$(HexChatLib)hexchat.rc'; Remove-Item '$(HexChatLib)hexchat.rc.utf8'"
|
||||
"$(DepsRoot)\bin\glib-compile-resources.exe" --generate-source --sourcedir "$(DataDir)" --target "$(HexChatLib)resources.c" "$(DataDir)hexchat.gresource.xml"
|
||||
"$(DepsRoot)\bin\glib-compile-resources.exe" --generate-header --manual-register --sourcedir "$(DataDir)" --target "$(HexChatLib)resources.h" "$(DataDir)hexchat.gresource.xml"
|
||||
"$(DepsRoot)\bin\glib-compile-resources.exe" --generate-source --manual-register --sourcedir "$(DataDir)" --target "$(HexChatLib)resources.c" "$(DataDir)hexchat.gresource.xml"
|
||||
]]></Command>
|
||||
<Message>Build hexchat.rc and gresource file</Message>
|
||||
</PreBuildEvent>
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "../common/cfgfiles.h"
|
||||
#include "../common/hexchat.h"
|
||||
#include "../common/fe.h"
|
||||
#include "resources.h"
|
||||
|
||||
#include <gio/gio.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
@ -108,6 +109,8 @@ load_pixmap (const char *filename)
|
|||
void
|
||||
pixmaps_init (void)
|
||||
{
|
||||
hexchat_register_resource();
|
||||
|
||||
pix_ulist_voice = load_pixmap ("ulist_voice");
|
||||
pix_ulist_halfop = load_pixmap ("ulist_halfop");
|
||||
pix_ulist_op = load_pixmap ("ulist_op");
|
||||
|
|
Loading…
Reference in New Issue