[linux] updmanager: add automatic generation of glib resources

This commit is contained in:
SimplestStudio
2024-01-16 12:37:45 +02:00
parent d0fd9df40d
commit 3db20a8b40
7 changed files with 20 additions and 4273 deletions

4
.gitignore vendored
View File

@ -4,10 +4,10 @@ win-linux/3dparty/WinSparkle/win_32
win-linux/3dparty/WinSparkle/win_64
win-linux/extras/projicons/build
win-linux/extras/update-daemon/build
win-linux/extras/update-daemon/event_message/build
win-linux/extras/update-daemon/res/gresource.c
win-linux/extras/online-installer/build
win-linux/ASCDocumentEditor.build/*
win-linux/res/gresource.c
win-linux/package/linux/index.html
win-linux/package/windows/index.html

View File

@ -45,7 +45,15 @@ message($$PLATFORM_BUILD)
#}
updmodule:core_linux {
SOURCES += $$PWD/res/gtk_resources.c
SOURCES += $$PWD/res/gresource.c
GLIB_RESOURCE_FILES += $$PWD/res/gresource.xml
glib_resources.name = gresource
glib_resources.input = GLIB_RESOURCE_FILES
glib_resources.output = $$PWD/res/${QMAKE_FILE_IN_BASE}.c
glib_resources.commands = glib-compile-resources --target ${QMAKE_FILE_OUT} --sourcedir ${QMAKE_FILE_IN_PATH} --generate-source ${QMAKE_FILE_IN}
glib_resources.variable_out = SOURCES
QMAKE_EXTRA_COMPILERS += glib_resources
}
HEADERS += \

View File

@ -8,6 +8,14 @@ DEFINES += APP_LANG_PATH=\"./langs/langs.iss\"
core_linux {
SOURCES += $$PWD/res/gresource.c
GLIB_RESOURCE_FILES += $$PWD/res/gresource.xml
glib_resources.name = gresource
glib_resources.input = GLIB_RESOURCE_FILES
glib_resources.output = $$PWD/res/${QMAKE_FILE_IN_BASE}.c
glib_resources.commands = glib-compile-resources --target ${QMAKE_FILE_OUT} --sourcedir ${QMAKE_FILE_IN_PATH} --generate-source ${QMAKE_FILE_IN}
glib_resources.variable_out = SOURCES
QMAKE_EXTRA_COMPILERS += glib_resources
}
OTHER_FILES += $$PWD/res/langs/langs.iss

View File

@ -1,402 +0,0 @@
#include <gio/gio.h>
#if defined (__ELF__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
# define SECTION __attribute__ ((section (".gresource.gresource"), aligned (8)))
#else
# define SECTION
#endif
static const SECTION union { const guint8 data[3129]; const double alignment; void * const ptr;} gresource_resource_data = {
"\107\126\141\162\151\141\156\164\000\000\000\000\000\000\000\000"
"\030\000\000\000\164\000\000\000\000\000\000\050\003\000\000\000"
"\000\000\000\000\001\000\000\000\002\000\000\000\052\042\323\171"
"\001\000\000\000\164\000\000\000\011\000\166\000\200\000\000\000"
"\045\014\000\000\170\110\267\050\002\000\000\000\045\014\000\000"
"\006\000\114\000\054\014\000\000\060\014\000\000\324\265\002\000"
"\377\377\377\377\060\014\000\000\001\000\114\000\064\014\000\000"
"\070\014\000\000\154\141\156\147\163\056\151\163\163\000\000\000"
"\225\013\000\000\000\000\000\000\133\103\165\163\164\157\155\115"
"\145\163\163\141\147\145\163\135\012\012\145\156\056\103\101\120"
"\124\111\117\116\137\124\105\130\124\040\075\117\116\114\131\117"
"\106\106\111\103\105\040\125\160\144\141\164\145\040\123\145\162"
"\166\151\143\145\012\162\165\056\103\101\120\124\111\117\116\137"
"\124\105\130\124\040\075\320\241\320\265\321\200\320\262\320\270"
"\321\201\040\320\276\320\261\320\275\320\276\320\262\320\273\320"
"\265\320\275\320\270\320\271\040\117\116\114\131\117\106\106\111"
"\103\105\012\012\145\156\056\115\105\123\123\101\107\105\137\124"
"\105\130\124\137\105\122\122\061\040\075\101\156\040\145\162\162"
"\157\162\040\157\143\143\165\162\162\145\144\072\012\162\165\056"
"\115\105\123\123\101\107\105\137\124\105\130\124\137\105\122\122"
"\061\040\075\320\237\321\200\320\276\320\270\320\267\320\276\321"
"\210\320\273\320\260\040\320\276\321\210\320\270\320\261\320\272"
"\320\260\072\012\012\145\156\056\115\105\123\123\101\107\105\137"
"\124\105\130\124\137\105\122\122\062\040\075\101\156\040\145\162"
"\162\157\162\040\157\143\143\165\162\162\145\144\040\167\150\151"
"\154\145\040\144\145\154\145\164\151\156\147\072\012\162\165\056"
"\115\105\123\123\101\107\105\137\124\105\130\124\137\105\122\122"
"\062\040\075\320\237\321\200\320\276\320\270\320\267\320\276\321"
"\210\320\273\320\260\040\320\276\321\210\320\270\320\261\320\272"
"\320\260\040\320\277\321\200\320\270\040\321\203\320\264\320\260"
"\320\273\320\265\320\275\320\270\320\270\072\012\012\145\156\056"
"\115\105\123\123\101\107\105\137\124\105\130\124\137\105\122\122"
"\063\040\075\101\156\040\145\162\162\157\162\040\157\143\143\165"
"\162\162\145\144\040\167\150\151\154\145\040\143\162\145\141\164"
"\151\156\147\072\012\162\165\056\115\105\123\123\101\107\105\137"
"\124\105\130\124\137\105\122\122\063\040\075\320\237\321\200\320"
"\276\320\270\320\267\320\276\321\210\320\273\320\260\040\320\276"
"\321\210\320\270\320\261\320\272\320\260\040\320\277\321\200\320"
"\270\040\321\201\320\276\320\267\320\264\320\260\320\275\320\270"
"\320\270\072\012\012\145\156\056\115\105\123\123\101\107\105\137"
"\124\105\130\124\137\105\122\122\064\040\075\101\156\040\145\162"
"\162\157\162\040\157\143\143\165\162\162\145\144\040\167\150\151"
"\154\145\040\162\145\163\164\141\162\164\151\156\147\040\164\150"
"\145\040\163\145\162\166\151\143\145\041\012\162\165\056\115\105"
"\123\123\101\107\105\137\124\105\130\124\137\105\122\122\064\040"
"\075\320\237\321\200\320\276\320\270\320\267\320\276\321\210\320"
"\273\320\260\040\320\276\321\210\320\270\320\261\320\272\320\260"
"\040\320\277\321\200\320\270\040\320\277\320\265\321\200\320\265"
"\320\267\320\260\320\277\321\203\321\201\320\272\320\265\040\321"
"\201\320\265\321\200\320\262\320\270\321\201\320\260\041\012\012"
"\145\156\056\115\105\123\123\101\107\105\137\124\105\130\124\137"
"\105\122\122\065\040\075\125\160\144\141\164\145\040\143\141\156"
"\143\145\154\154\145\144\056\040\103\141\156\047\164\040\146\151"
"\156\144\040\146\157\154\144\145\162\072\012\162\165\056\115\105"
"\123\123\101\107\105\137\124\105\130\124\137\105\122\122\065\040"
"\075\320\236\320\261\320\275\320\276\320\262\320\273\320\265\320"
"\275\320\270\320\265\040\320\276\321\202\320\274\320\265\320\275"
"\320\265\320\275\320\276\056\040\320\235\320\265\040\321\203\320"
"\264\320\260\320\273\320\276\321\201\321\214\040\320\275\320\260"
"\320\271\321\202\320\270\040\320\277\320\260\320\277\320\272\321"
"\203\072\012\012\145\156\056\115\105\123\123\101\107\105\137\124"
"\105\130\124\137\105\122\122\066\040\075\125\160\144\141\164\145"
"\040\143\141\156\143\145\154\154\145\144\056\040\124\150\145\040"
"\146\151\154\145\040\163\151\147\156\141\164\165\162\145\040\151"
"\163\040\155\151\163\163\151\156\147\072\012\162\165\056\115\105"
"\123\123\101\107\105\137\124\105\130\124\137\105\122\122\066\040"
"\075\320\236\320\261\320\275\320\276\320\262\320\273\320\265\320"
"\275\320\270\320\265\040\320\276\321\202\320\274\320\265\320\275"
"\320\265\320\275\320\276\056\040\320\236\321\202\321\201\321\203"
"\321\202\321\201\321\202\320\262\321\203\320\265\321\202\040\320"
"\277\320\276\320\264\320\277\320\270\321\201\321\214\040\321\204"
"\320\260\320\271\320\273\320\260\072\012\012\145\156\056\115\105"
"\123\123\101\107\105\137\124\105\130\124\137\105\122\122\067\040"
"\075\125\160\144\141\164\145\040\143\141\156\143\145\154\154\145"
"\144\056\040\103\141\156\047\164\040\144\145\154\145\164\145\040"
"\146\157\154\144\145\162\072\012\162\165\056\115\105\123\123\101"
"\107\105\137\124\105\130\124\137\105\122\122\067\040\075\320\236"
"\320\261\320\275\320\276\320\262\320\273\320\265\320\275\320\270"
"\320\265\040\320\276\321\202\320\274\320\265\320\275\320\265\320"
"\275\320\276\056\040\320\235\320\265\040\321\203\320\264\320\260"
"\320\273\320\276\321\201\321\214\040\321\203\320\264\320\260\320"
"\273\320\270\321\202\321\214\040\320\277\320\260\320\277\320\272"
"\321\203\072\012\012\145\156\056\115\105\123\123\101\107\105\137"
"\124\105\130\124\137\105\122\122\070\040\075\125\160\144\141\164"
"\145\040\143\141\156\143\145\154\154\145\144\056\040\124\150\145"
"\040\160\162\157\147\162\141\155\040\151\163\040\156\157\164\040"
"\143\154\157\163\145\144\072\012\162\165\056\115\105\123\123\101"
"\107\105\137\124\105\130\124\137\105\122\122\070\040\075\320\236"
"\320\261\320\275\320\276\320\262\320\273\320\265\320\275\320\270"
"\320\265\040\320\276\321\202\320\274\320\265\320\275\320\265\320"
"\275\320\276\056\040\320\237\321\200\320\270\320\273\320\276\320"
"\266\320\265\320\275\320\270\320\265\040\320\275\320\265\040\320"
"\267\320\260\320\272\321\200\321\213\321\202\320\276\072\012\012"
"\145\156\056\115\105\123\123\101\107\105\137\124\105\130\124\137"
"\105\122\122\071\040\075\125\160\144\141\164\145\040\143\141\156"
"\143\145\154\154\145\144\056\040\103\141\156\047\164\040\143\162"
"\145\141\164\145\040\146\157\154\144\145\162\072\012\162\165\056"
"\115\105\123\123\101\107\105\137\124\105\130\124\137\105\122\122"
"\071\040\075\320\236\320\261\320\275\320\276\320\262\320\273\320"
"\265\320\275\320\270\320\265\040\320\276\321\202\320\274\320\265"
"\320\275\320\265\320\275\320\276\056\040\320\235\320\265\040\321"
"\203\320\264\320\260\320\273\320\276\321\201\321\214\040\321\201"
"\320\276\320\267\320\264\320\260\321\202\321\214\040\320\277\320"
"\260\320\277\320\272\321\203\072\012\012\145\156\056\115\105\123"
"\123\101\107\105\137\124\105\130\124\137\105\122\122\061\060\040"
"\075\125\160\144\141\164\145\040\143\141\156\143\145\154\154\145"
"\144\056\040\103\141\156\047\164\040\162\145\160\154\141\143\145"
"\040\146\151\154\145\163\040\164\157\040\142\141\143\153\165\160"
"\072\012\162\165\056\115\105\123\123\101\107\105\137\124\105\130"
"\124\137\105\122\122\061\060\040\075\320\236\320\261\320\275\320"
"\276\320\262\320\273\320\265\320\275\320\270\320\265\040\320\276"
"\321\202\320\274\320\265\320\275\320\265\320\275\320\276\056\040"
"\320\235\320\265\040\321\203\320\264\320\260\320\273\320\276\321"
"\201\321\214\040\320\277\320\265\321\200\320\265\320\274\320\265"
"\321\201\321\202\320\270\321\202\321\214\040\321\204\320\260\320"
"\271\320\273\321\213\040\320\262\040\321\200\320\265\320\267\320"
"\265\321\200\320\262\320\275\321\203\321\216\040\320\272\320\276"
"\320\277\320\270\321\216\072\012\012\145\156\056\115\105\123\123"
"\101\107\105\137\124\105\130\124\137\105\122\122\061\061\040\075"
"\103\141\156\047\164\040\162\145\163\164\157\162\145\040\146\151"
"\154\145\163\040\146\162\157\155\040\142\141\143\153\165\160\041"
"\012\162\165\056\115\105\123\123\101\107\105\137\124\105\130\124"
"\137\105\122\122\061\061\040\075\320\235\320\265\040\321\203\320"
"\264\320\260\320\273\320\276\321\201\321\214\040\320\262\320\276"
"\321\201\321\201\321\202\320\260\320\275\320\276\320\262\320\270"
"\321\202\321\214\040\321\204\320\260\320\271\320\273\321\213\040"
"\320\270\320\267\040\321\200\320\265\320\267\320\265\321\200\320"
"\262\320\275\320\276\320\271\040\320\272\320\276\320\277\320\270"
"\320\270\041\012\012\145\156\056\115\105\123\123\101\107\105\137"
"\124\105\130\124\137\105\122\122\061\062\040\075\125\160\144\141"
"\164\145\040\143\141\156\143\145\154\154\145\144\056\040\103\141"
"\156\047\164\040\155\157\166\145\040\165\160\144\141\164\145\163"
"\040\164\157\040\101\160\160\040\160\141\164\150\072\012\162\165"
"\056\115\105\123\123\101\107\105\137\124\105\130\124\137\105\122"
"\122\061\062\040\075\320\236\320\261\320\275\320\276\320\262\320"
"\273\320\265\320\275\320\270\320\265\040\320\276\321\202\320\274"
"\320\265\320\275\320\265\320\275\320\276\056\040\320\235\320\265"
"\040\321\203\320\264\320\260\320\273\320\276\321\201\321\214\040"
"\320\277\320\265\321\200\320\265\320\274\320\265\321\201\321\202"
"\320\270\321\202\321\214\040\320\276\320\261\320\275\320\276\320"
"\262\320\273\320\265\320\275\320\270\321\217\040\320\262\040\320"
"\277\320\260\320\277\320\272\321\203\040\320\277\321\200\320\270"
"\320\273\320\276\320\266\320\265\320\275\320\270\321\217\072\012"
"\012\145\156\056\115\105\123\123\101\107\105\137\124\105\130\124"
"\137\105\122\122\061\063\040\075\101\156\040\145\162\162\157\162"
"\040\157\143\143\165\162\162\145\144\040\167\150\151\154\145\040"
"\162\145\155\157\166\145\040\101\160\160\040\160\141\164\150\072"
"\012\162\165\056\115\105\123\123\101\107\105\137\124\105\130\124"
"\137\105\122\122\061\063\040\075\320\237\321\200\320\276\320\270"
"\320\267\320\276\321\210\320\273\320\260\040\320\276\321\210\320"
"\270\320\261\320\272\320\260\040\320\277\321\200\320\270\040\321"
"\203\320\264\320\260\320\273\320\265\320\275\320\270\320\270\040"
"\320\277\320\260\320\277\320\272\320\270\040\320\277\321\200\320"
"\270\320\273\320\276\320\266\320\265\320\275\320\270\321\217\072"
"\012\012\145\156\056\115\105\123\123\101\107\105\137\124\105\130"
"\124\137\105\122\122\061\064\040\075\101\156\040\145\162\162\157"
"\162\040\157\143\143\165\162\162\145\144\040\167\150\151\154\145"
"\040\162\145\163\164\157\162\145\040\146\151\154\145\163\040\146"
"\162\157\155\040\142\141\143\153\165\160\072\012\162\165\056\115"
"\105\123\123\101\107\105\137\124\105\130\124\137\105\122\122\061"
"\064\040\075\320\237\321\200\320\276\320\270\320\267\320\276\321"
"\210\320\273\320\260\040\320\276\321\210\320\270\320\261\320\272"
"\320\260\040\320\277\321\200\320\270\040\320\262\320\276\321\201"
"\321\201\321\202\320\260\320\275\320\276\320\262\320\273\320\265"
"\320\275\320\270\320\270\040\321\204\320\260\320\271\320\273\320"
"\276\320\262\040\320\270\320\267\040\321\200\320\265\320\267\320"
"\265\321\200\320\262\320\275\320\276\320\271\040\320\272\320\276"
"\320\277\320\270\320\270\072\012\012\145\156\056\115\105\123\123"
"\101\107\105\137\124\105\130\124\137\105\122\122\061\065\040\075"
"\101\156\040\145\162\162\157\162\040\157\143\143\165\162\162\145"
"\144\040\167\150\151\154\145\040\162\145\163\164\141\162\164\151"
"\156\147\040\164\150\145\040\160\162\157\147\162\141\155\041\012"
"\162\165\056\115\105\123\123\101\107\105\137\124\105\130\124\137"
"\105\122\122\061\065\040\075\320\237\321\200\320\276\320\270\320"
"\267\320\276\321\210\320\273\320\260\040\320\276\321\210\320\270"
"\320\261\320\272\320\260\040\320\277\321\200\320\270\040\320\277"
"\320\265\321\200\320\265\320\267\320\260\320\277\321\203\321\201"
"\320\272\320\265\040\320\277\321\200\320\270\320\273\320\276\320"
"\266\320\265\320\275\320\270\321\217\041\012\012\145\156\056\115"
"\105\123\123\101\107\105\137\124\105\130\124\137\105\122\122\061"
"\066\040\075\123\104\114\040\151\156\151\164\040\145\162\162\157"
"\162\072\012\162\165\056\115\105\123\123\101\107\105\137\124\105"
"\130\124\137\105\122\122\061\066\040\075\320\236\321\210\320\270"
"\320\261\320\272\320\260\040\320\270\320\275\320\270\321\206\320"
"\270\320\260\320\273\320\270\320\267\320\260\321\206\320\270\320"
"\270\040\123\104\114\072\012\012\145\156\056\115\105\123\123\101"
"\107\105\137\124\105\130\124\137\105\122\122\061\067\040\075\123"
"\145\162\166\151\143\145\103\164\162\154\104\151\163\160\141\164"
"\143\150\145\162\040\162\145\164\165\162\156\145\144\040\145\162"
"\162\157\162\072\012\162\165\056\115\105\123\123\101\107\105\137"
"\124\105\130\124\137\105\122\122\061\067\040\075\123\145\162\166"
"\151\143\145\103\164\162\154\104\151\163\160\141\164\143\150\145"
"\162\040\320\262\320\265\321\200\320\275\321\203\320\273\040\320"
"\276\321\210\320\270\320\261\320\272\321\203\072\012\000\000\050"
"\165\165\141\171\051\154\141\156\147\163\057\000\000\000\000\000"
"\057\000\000\000\001\000\000\000" };
static GStaticResource static_resource = { gresource_resource_data.data, sizeof (gresource_resource_data.data) - 1 /* nul terminator */, NULL, NULL, NULL };
G_MODULE_EXPORT
GResource *gresource_get_resource (void);
GResource *gresource_get_resource (void)
{
return g_static_resource_get_resource (&static_resource);
}
/* GLIB - Library of useful routines for C programming
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
/*
* Modified by the GLib Team and others 1997-2000. See the AUTHORS
* file for a list of people on the GLib Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GLib at ftp://ftp.gtk.org/pub/gtk/.
*/
#ifndef __G_CONSTRUCTOR_H__
#define __G_CONSTRUCTOR_H__
/*
If G_HAS_CONSTRUCTORS is true then the compiler support *both* constructors and
destructors, in a usable way, including e.g. on library unload. If not you're on
your own.
Some compilers need #pragma to handle this, which does not work with macros,
so the way you need to use this is (for constructors):
#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(my_constructor)
#endif
G_DEFINE_CONSTRUCTOR(my_constructor)
static void my_constructor(void) {
...
}
*/
#ifndef __GTK_DOC_IGNORE__
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
#define G_HAS_CONSTRUCTORS 1
#define G_DEFINE_CONSTRUCTOR(_func) static void __attribute__((constructor)) _func (void);
#define G_DEFINE_DESTRUCTOR(_func) static void __attribute__((destructor)) _func (void);
#elif defined (_MSC_VER) && (_MSC_VER >= 1500)
/* Visual studio 2008 and later has _Pragma */
/*
* Only try to include gslist.h if not already included via glib.h,
* so that items using gconstructor.h outside of GLib (such as
* GResources) continue to build properly.
*/
#ifndef __G_LIB_H__
#include "gslist.h"
#endif
#include <stdlib.h>
#define G_HAS_CONSTRUCTORS 1
/* We do some weird things to avoid the constructors being optimized
* away on VS2015 if WholeProgramOptimization is enabled. First we
* make a reference to the array from the wrapper to make sure its
* references. Then we use a pragma to make sure the wrapper function
* symbol is always included at the link stage. Also, the symbols
* need to be extern (but not dllexport), even though they are not
* really used from another object file.
*/
/* We need to account for differences between the mangling of symbols
* for x86 and x64/ARM/ARM64 programs, as symbols on x86 are prefixed
* with an underscore but symbols on x64/ARM/ARM64 are not.
*/
#ifdef _M_IX86
#define G_MSVC_SYMBOL_PREFIX "_"
#else
#define G_MSVC_SYMBOL_PREFIX ""
#endif
#define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX)
#define G_DEFINE_DESTRUCTOR(_func) G_MSVC_DTOR (_func, G_MSVC_SYMBOL_PREFIX)
#define G_MSVC_CTOR(_func,_sym_prefix) \
static void _func(void); \
extern int (* _array ## _func)(void); \
int _func ## _wrapper(void); \
int _func ## _wrapper(void) { _func(); g_slist_find (NULL, _array ## _func); return 0; } \
__pragma(comment(linker,"/include:" _sym_prefix # _func "_wrapper")) \
__pragma(section(".CRT$XCU",read)) \
__declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _wrapper;
#define G_MSVC_DTOR(_func,_sym_prefix) \
static void _func(void); \
extern int (* _array ## _func)(void); \
int _func ## _constructor(void); \
int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL, _array ## _func); return 0; } \
__pragma(comment(linker,"/include:" _sym_prefix # _func "_constructor")) \
__pragma(section(".CRT$XCU",read)) \
__declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _constructor;
#elif defined (_MSC_VER)
#define G_HAS_CONSTRUCTORS 1
/* Pre Visual studio 2008 must use #pragma section */
#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1
#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1
#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \
section(".CRT$XCU",read)
#define G_DEFINE_CONSTRUCTOR(_func) \
static void _func(void); \
static int _func ## _wrapper(void) { _func(); return 0; } \
__declspec(allocate(".CRT$XCU")) static int (*p)(void) = _func ## _wrapper;
#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \
section(".CRT$XCU",read)
#define G_DEFINE_DESTRUCTOR(_func) \
static void _func(void); \
static int _func ## _constructor(void) { atexit (_func); return 0; } \
__declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = _func ## _constructor;
#elif defined(__SUNPRO_C)
/* This is not tested, but i believe it should work, based on:
* http://opensource.apple.com/source/OpenSSL098/OpenSSL098-35/src/fips/fips_premain.c
*/
#define G_HAS_CONSTRUCTORS 1
#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1
#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1
#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \
init(_func)
#define G_DEFINE_CONSTRUCTOR(_func) \
static void _func(void);
#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \
fini(_func)
#define G_DEFINE_DESTRUCTOR(_func) \
static void _func(void);
#else
/* constructors not supported for this compiler */
#endif
#endif /* __GTK_DOC_IGNORE__ */
#endif /* __G_CONSTRUCTOR_H__ */
#ifdef G_HAS_CONSTRUCTORS
#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(gresourceresource_constructor)
#endif
G_DEFINE_CONSTRUCTOR(gresourceresource_constructor)
#ifdef G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA
#pragma G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(gresourceresource_destructor)
#endif
G_DEFINE_DESTRUCTOR(gresourceresource_destructor)
#else
#warning "Constructor not supported on this compiler, linking in resources will not work"
#endif
static void gresourceresource_constructor (void)
{
g_static_resource_init (&static_resource);
}
static void gresourceresource_destructor (void)
{
g_static_resource_fini (&static_resource);
}

View File

@ -2,9 +2,6 @@
<gresources>
<gresource prefix="/">
<file>icons/app-icon_64.png</file>
<file>icons/app-icon_96.png</file>
<file>icons/app-icon_128.png</file>
<file>icons/app-icon_256.png</file>
</gresource>
</gresources>

File diff suppressed because it is too large Load Diff

View File

@ -38,6 +38,7 @@
#include "updatedialog.h"
#include "cascapplicationmanagerwrapper.h"
#include <gdk/gdkx.h>
#include "res/gresource.c"
#define toCharPtr(qstr) qstr.toLocal8Bit().data()
#define TEXT_SKIP toCharPtr(QObject::tr("Skip this version"))