SHA256
1
0
forked from pool/wine

Accepting request 102283 from Emulators

update to 1.4-rc1, spec cleanups, baselibs.conf changes

OBS-URL: https://build.opensuse.org/request/show/102283
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/wine?expand=0&rev=108
This commit is contained in:
Stephan Kulow 2012-02-10 16:20:28 +00:00 committed by Git OBS Bridge
commit 84a6c2d729
7 changed files with 1058 additions and 901 deletions

15
baselibs.conf Normal file
View File

@ -0,0 +1,15 @@
wine
+^/usr/bin/wine$
+^/usr/bin/wine-preloader$
requires "libX11.so.6"
requires "libXext.so.6"
requires "libXcursor.so.1"
requires "libXi.so.6"
requires "libXxf86vm.so.1"
requires "libXrender.so.1"
requires "libXrandr.so.2"
requires "libXinerama.so.1"
requires "libXcomposite.so.1"
requires "libGL.so.1"
requires "libGLU.so.1"
wine-devel

View File

@ -1,653 +0,0 @@
diff --git a/configure.ac b/configure.ac
index ae89108..3085136 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,6 +42,7 @@ AC_ARG_WITH(coreaudio, AS_HELP_STRING([--without-coreaudio],[do not use the Core
AC_ARG_WITH(cups, AS_HELP_STRING([--without-cups],[do not use CUPS]))
AC_ARG_WITH(curses, AS_HELP_STRING([--without-curses],[do not use (n)curses]),
[if test "x$withval" = "xno"; then ac_cv_header_ncurses_h=no; ac_cv_header_curses_h=no; fi])
+AC_ARG_WITH(dbus, AS_HELP_STRING([--without-dbus],[do not use dbus (dynamic device support)]))
AC_ARG_WITH(fontconfig,AS_HELP_STRING([--without-fontconfig],[do not use fontconfig]),
[if test "x$withval" = "xno"; then ac_cv_header_fontconfig_fontconfig_h=no; fi])
AC_ARG_WITH(freetype, AS_HELP_STRING([--without-freetype],[do not use the FreeType library]))
@@ -1201,6 +1202,23 @@ fi
WINE_WARNING_WITH(xslt,[test "x$ac_cv_lib_soname_xslt" = "x"],
[libxslt ${notice_platform}development files not found, xslt won't be supported.])
+dnl **** Check for libdbus ****
+AC_SUBST(DBUSINCL,"")
+if test "x$with_dbus" != "xno"
+then
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test "$PKG_CONFIG" != "false"
+ then
+ ac_dbus_libs="`$PKG_CONFIG --libs dbus-1 2>/dev/null`"
+ ac_dbus_cflags="`$PKG_CONFIG --cflags dbus-1 2>/dev/null`"
+ CPPFLAGS="$CPPFLAGS $ac_dbus_cflags"
+ fi
+ AC_CHECK_HEADER(dbus/dbus.h,
+ [WINE_CHECK_SONAME(dbus-1,dbus_bus_get,[DBUSINCL="$ac_dbus_cflags"],,[$ac_dbus_libs])])
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+
dnl **** Check for libhal ****
AC_SUBST(HALINCL,"")
if test "x$with_hal" != "xno"
@@ -1221,7 +1239,7 @@ then
fi
CPPFLAGS="$ac_save_CPPFLAGS"
fi
-WINE_NOTICE_WITH(hal,[test "x$ac_cv_lib_soname_hal" = "x" -a "x$ac_cv_header_DiskArbitration_DiskArbitration_h" != "xyes"],
+WINE_NOTICE_WITH(hal,[test "x$ac_cv_lib_soname_hal" = "x" -a "x$ac_cv_lib_soname_dbus_1" = "x" -a "x$ac_cv_header_DiskArbitration_DiskArbitration_h" != "xyes"],
[libhal/libdbus ${notice_platform}development files not found, no dynamic device support.])
dnl **** Check for libgnutls ****
diff --git a/dlls/mountmgr.sys/Makefile.in b/dlls/mountmgr.sys/Makefile.in
index 91203e1..f3355e0 100644
--- a/dlls/mountmgr.sys/Makefile.in
+++ b/dlls/mountmgr.sys/Makefile.in
@@ -2,13 +2,14 @@ MODULE = mountmgr.sys
IMPORTS = uuid advapi32 ntoskrnl.exe
DELAYIMPORTS = user32
EXTRADLLFLAGS = -Wb,--subsystem,native
-EXTRADEFS = @HALINCL@
+EXTRADEFS = @HALINCL@ @DBUSINCL@
EXTRALIBS = @DISKARBITRATIONLIB@
C_SRCS = \
device.c \
diskarb.c \
hal.c \
- mountmgr.c
+ mountmgr.c \
+ udisks.c
@MAKE_DLL_RULES@
diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c
index 4e9900f..df0dbd3 100644
--- a/dlls/mountmgr.sys/mountmgr.c
+++ b/dlls/mountmgr.sys/mountmgr.c
@@ -443,6 +443,8 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
RtlInitUnicodeString( &nameW, harddiskW );
status = IoCreateDriver( &nameW, harddisk_driver_entry );
+ /* start udisks before hal */
+ initialize_udisks();
initialize_hal();
initialize_diskarbitration();
diff --git a/dlls/mountmgr.sys/mountmgr.h b/dlls/mountmgr.sys/mountmgr.h
index a47a3e3..7d07b45 100644
--- a/dlls/mountmgr.sys/mountmgr.h
+++ b/dlls/mountmgr.sys/mountmgr.h
@@ -35,6 +35,7 @@
#define WINE_MOUNTMGR_EXTENSIONS
#include "ddk/mountmgr.h"
+extern void initialize_udisks(void) DECLSPEC_HIDDEN;
extern void initialize_hal(void) DECLSPEC_HIDDEN;
extern void initialize_diskarbitration(void) DECLSPEC_HIDDEN;
diff --git a/dlls/mountmgr.sys/udisks.c b/dlls/mountmgr.sys/udisks.c
new file mode 100644
index 0000000..6b7fe13
--- /dev/null
+++ b/dlls/mountmgr.sys/udisks.c
@@ -0,0 +1,556 @@
+/*
+ * udisks devices support
+ *
+ * Copyright 2006 Alexandre Julliard
+ * Copyright 2011 Detlef Riekenberg
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+#include "wine/port.h"
+
+#include <assert.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/time.h>
+
+#include "mountmgr.h"
+#include "winnls.h"
+#include "excpt.h"
+
+#include "wine/library.h"
+#include "wine/exception.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(mountmgr);
+
+
+static char udisks_version[32];
+
+#ifdef SONAME_LIBDBUS_1
+
+#include <dbus/dbus.h>
+
+/* ########## */
+
+typedef struct properties_s {
+ CHAR *device_file;
+ CHAR *id_usage;
+ CHAR *id_type;
+ CHAR *id_uuid;
+ BOOL device_is_mounted;
+ BOOL device_is_optical_disc;
+ BOOL device_is_removable;
+ CHAR *device_mount_paths;
+ CHAR *drive_media;
+ CHAR *drive_media_compatibility;
+ int depth;
+ const char * last_name;
+}properties_t;
+
+static const char *my_match_rule = "interface=org.freedesktop.UDisks";
+static const char *dest_udisks_device = "org.freedesktop.UDisks.Device";
+static const char *dest_udisks = "org.freedesktop.UDisks";
+static const char *path_udisks = "/org/freedesktop/UDisks";
+static const char *iface_dbus_prop = "org.freedesktop.DBus.Properties";
+static const char *daemonversion = "DaemonVersion";
+
+/* ########## */
+
+#define DBUS_FUNCS \
+ DO_FUNC(dbus_bus_add_match); \
+ DO_FUNC(dbus_bus_get); \
+ DO_FUNC(dbus_bus_remove_match); \
+ DO_FUNC(dbus_connection_pop_message); \
+ DO_FUNC(dbus_connection_read_write_dispatch); \
+ DO_FUNC(dbus_connection_send_with_reply_and_block); \
+ DO_FUNC(dbus_connection_unref); \
+ DO_FUNC(dbus_error_free); \
+ DO_FUNC(dbus_error_init); \
+ DO_FUNC(dbus_error_is_set); \
+ DO_FUNC(dbus_message_append_args); \
+ DO_FUNC(dbus_message_get_member); \
+ DO_FUNC(dbus_message_iter_get_arg_type); \
+ DO_FUNC(dbus_message_iter_get_basic); \
+ DO_FUNC(dbus_message_iter_init); \
+ DO_FUNC(dbus_message_iter_next); \
+ DO_FUNC(dbus_message_iter_recurse); \
+ DO_FUNC(dbus_message_new_method_call); \
+ DO_FUNC(dbus_message_type_to_string); \
+ DO_FUNC(dbus_message_unref)
+
+#define DO_FUNC(f) static typeof(f) * p_##f
+DBUS_FUNCS;
+#undef DO_FUNC
+
+
+static BOOL load_dbus_functions(void)
+{
+ void *dbus_handle;
+ char error[128];
+
+ if (!(dbus_handle = wine_dlopen(SONAME_LIBDBUS_1, RTLD_NOW|RTLD_GLOBAL, error, sizeof(error))))
+ goto failed;
+
+#define DO_FUNC(f) if (!(p_##f = wine_dlsym(RTLD_DEFAULT, #f, error, sizeof(error)))) goto failed
+ DBUS_FUNCS;
+#undef DO_FUNC
+
+ return TRUE;
+
+failed:
+ WARN("failed to load udisks support: %s\n", error);
+ return FALSE;
+}
+
+static GUID *parse_uuid( GUID *guid, const char *str )
+{
+ /* standard uuid format */
+ if (strlen(str) == 36)
+ {
+ UNICODE_STRING strW;
+ WCHAR buffer[39];
+
+ if (MultiByteToWideChar( CP_UNIXCP, 0, str, 36, buffer + 1, 36 ))
+ {
+ buffer[0] = '{';
+ buffer[37] = '}';
+ buffer[38] = 0;
+ RtlInitUnicodeString( &strW, buffer );
+ if (!RtlGUIDFromString( &strW, guid )) return guid;
+ }
+ }
+
+ /* check for xxxx-xxxx format (FAT serial number) */
+ if (strlen(str) == 9 && str[4] == '-')
+ {
+ memset( guid, 0, sizeof(*guid) );
+ if (sscanf( str, "%hx-%hx", &guid->Data2, &guid->Data3 ) == 2) return guid;
+ }
+ return NULL;
+}
+
+static LONG WINAPI assert_fault(EXCEPTION_POINTERS *eptr)
+{
+ if (eptr->ExceptionRecord->ExceptionCode == EXCEPTION_WINE_ASSERTION)
+ return EXCEPTION_EXECUTE_HANDLER;
+ return EXCEPTION_CONTINUE_SEARCH;
+}
+
+/* #########################################
+ * get_properties_from_iter [internal]
+ *
+ * NOTES
+ * format of args in a reply from GetAll:
+ * an ARRAY of DICT_ENTRY
+ * each DICT_ENTRY has a STRING (property name) and a VARIANT (property value)
+ * each VARIANT has a BOOLEAN or a STRING or an ARRAY of STRING or an here unused value
+ */
+static BOOL get_properties_from_iter(properties_t * p, DBusMessageIter * iter)
+{
+ DBusMessageIter sub;
+ int arg_type = p_dbus_message_iter_get_arg_type(iter);
+
+ p->depth++;
+ while (arg_type != DBUS_TYPE_INVALID)
+ {
+ if ((arg_type == DBUS_TYPE_ARRAY) ||
+ (arg_type == DBUS_TYPE_DICT_ENTRY) ||
+ (arg_type == DBUS_TYPE_VARIANT))
+ {
+ p_dbus_message_iter_recurse(iter, &sub);
+ if (!get_properties_from_iter(p, &sub))
+ {
+ p->depth--;
+ return FALSE;
+ }
+ }
+ else if (arg_type == DBUS_TYPE_STRING)
+ {
+ char * data;
+ p_dbus_message_iter_get_basic(iter, &data);
+ if (p->depth == 3) p->last_name = data;
+ else if (p->last_name)
+ {
+ if (!strcmp(p->last_name, "DeviceFile"))
+ p->device_file = data;
+ else if (!strcmp(p->last_name, "DeviceMountPaths"))
+ p->device_mount_paths = data; /* use only the first entry */
+ else if (!strcmp(p->last_name, "DriveMedia"))
+ p->drive_media = data;
+ else if (!strcmp(p->last_name, "DriveMediaCompatibility"))
+ p->drive_media_compatibility = data; /* use only the first entry */
+ else if (!strcmp(p->last_name, "IdType"))
+ p->id_type = data;
+ else if (!strcmp(p->last_name, "IdUsage"))
+ p->id_usage = data;
+ else if (!strcmp(p->last_name, "IdUuid"))
+ p->id_uuid = data;
+
+ p->last_name = NULL;
+ }
+ }
+ else if (arg_type == DBUS_TYPE_BOOLEAN)
+ {
+ dbus_bool_t data;
+ if (p->last_name)
+ {
+ p_dbus_message_iter_get_basic(iter, &data);
+ if (!strcmp(p->last_name, "DeviceIsMounted"))
+ p->device_is_mounted = data;
+ else if (!strcmp(p->last_name, "DeviceIsOpticalDisc"))
+ p->device_is_optical_disc = data;
+ else if (!strcmp(p->last_name, "DeviceIsRemovable"))
+ p->device_is_removable = data;
+
+ p->last_name = NULL;
+ }
+ }
+
+ p_dbus_message_iter_next(iter);
+ arg_type = p_dbus_message_iter_get_arg_type(iter);
+ }
+ p->depth--;
+ return TRUE;
+}
+
+static DBusMessage * get_properties_from_path(properties_t * p, DBusConnection *ctx, const char * path)
+{
+ DBusMessage *request;
+ DBusMessage *reply = NULL;
+ DBusMessageIter iter;
+ DBusError error;
+
+ TRACE("(%p, %p, %s)\n", p, ctx, path);
+
+ memset(p, 0, sizeof(properties_t));
+ request = p_dbus_message_new_method_call(dest_udisks, path, iface_dbus_prop, "GetAll");
+ if (request)
+ {
+ if (p_dbus_message_append_args(request, DBUS_TYPE_STRING, &dest_udisks_device, DBUS_TYPE_INVALID))
+ {
+ p_dbus_error_init(&error);
+ if ((reply = p_dbus_connection_send_with_reply_and_block(ctx, request, -1, &error)))
+ {
+ p_dbus_message_iter_init(reply, &iter);
+ get_properties_from_iter(p, &iter);
+ }
+ else
+ WARN("no reply for %s\n", path);
+
+ p_dbus_error_free(&error);
+ }
+ else
+ WARN("dbus_message_append_args failed for 'GetAll'\n");
+
+ p_dbus_message_unref(request);
+ }
+ return reply;
+}
+
+static int get_drive_type(properties_t * p)
+{
+ /* examples: optical_cd, optical_cd_rw, optical_dvd_plus_r_dl */
+ if (p->device_is_optical_disc && p->drive_media && !memcmp(p->drive_media, "optical_", 8))
+ {
+ if (!memcmp(p->drive_media + 8, "cd", 2))
+ return DEVICE_CDROM;
+ else
+ return DEVICE_DVD;
+ }
+ else if (p->drive_media_compatibility && !strcmp(p->drive_media_compatibility, "floppy"))
+ return DEVICE_FLOPPY;
+ else if (!p->device_is_removable && p->id_usage && !strcmp(p->id_usage, "filesystem"))
+ return DEVICE_HARDDISK_VOL;
+
+ return DEVICE_UNKNOWN;
+}
+
+static void udisks_add_device(DBusConnection *ctx, const char *path)
+{
+ DBusMessage *reply;
+ properties_t p;
+ GUID guid;
+ GUID *guid_ptr = NULL;
+
+ TRACE("%s\n", debugstr_a(path));
+
+ reply = get_properties_from_path(&p, ctx, path);
+ if (reply)
+ {
+ int drive_type = get_drive_type(&p);
+
+ TRACE("DeviceFile: %s\n", p.device_file);
+ TRACE("IdUsage: %s\n", p.id_usage);
+ TRACE("IdType: %s\n", p.id_type);
+ TRACE("IdUuid: %s\n", p.id_uuid);
+ TRACE("DeviceIsMounted: %d (%s)\n", p.device_is_mounted, p.device_is_mounted ? "true" : "false");
+ TRACE("DeviceIsOpticalDisc: %d (%s)\n", p.device_is_optical_disc, p.device_is_optical_disc ? "true" : "false");
+ TRACE("DeviceIsRemovable: %d (%s)\n", p.device_is_removable, p.device_is_removable ? "true" : "false");
+ TRACE("DeviceMountPaths: %s\n", p.device_mount_paths);
+ TRACE("DriveMedia: %s\n", p.drive_media);
+ TRACE("DriveMediaCompatibility: %s\n", p.drive_media_compatibility);
+ TRACE("using drive_type: %d\n", drive_type);
+
+ if (p.device_is_mounted && p.device_mount_paths)
+ {
+ if (p.id_uuid)
+ guid_ptr = parse_uuid(&guid, p.id_uuid);
+
+ if (p.device_is_removable)
+ add_dos_device(-1, path, p.device_file, p.device_mount_paths, drive_type, guid_ptr);
+ else if (guid_ptr)
+ add_volume(path, p.device_file, p.device_mount_paths, DEVICE_HARDDISK_VOL, guid_ptr);
+
+ }
+ p_dbus_message_unref(reply);
+ }
+}
+
+static void udisks_remove_device(DBusConnection *ctx, const char *path)
+{
+ TRACE("%s\n", debugstr_a(path));
+
+ if (remove_dos_device(-1, path))
+ remove_volume(path);
+}
+
+static void udisks_change_device(DBusConnection *ctx, const char *path)
+{
+ DBusMessage *reply;
+ properties_t p;
+
+ TRACE("%s\n", debugstr_a(path));
+
+ reply = get_properties_from_path(&p, ctx, path);
+ if (reply)
+ {
+ int drive_type = get_drive_type(&p);
+
+ if (p.device_is_mounted && p.device_mount_paths)
+ udisks_add_device(ctx, path);
+ else
+ {
+ TRACE("DeviceFile: %s\n", p.device_file);
+ TRACE("IdUsage: %s\n", p.id_usage);
+ TRACE("IdType: %s\n", p.id_type);
+ TRACE("IdUuid: %s\n", p.id_uuid);
+ TRACE("DeviceIsMounted: %d (%s)\n", p.device_is_mounted, p.device_is_mounted ? "true" : "false");
+ TRACE("DeviceIsOpticalDisc: %d (%s)\n", p.device_is_optical_disc, p.device_is_optical_disc ? "true" : "false");
+ TRACE("DeviceIsRemovable: %d (%s)\n", p.device_is_removable, p.device_is_removable ? "true" : "false");
+ TRACE("DeviceMountPaths: %s\n", p.device_mount_paths);
+ TRACE("DriveMedia: %s\n", p.drive_media);
+ TRACE("DriveMediaCompatibility: %s\n", p.drive_media_compatibility);
+ TRACE("using drive_type: %d\n", drive_type);
+
+ udisks_remove_device(ctx, path);
+ }
+ p_dbus_message_unref(reply);
+ }
+}
+
+/* ########### */
+
+static void udisks_get_all_devices(DBusConnection *ctx)
+{
+ DBusMessage *request;
+ DBusMessage *reply;
+ DBusMessageIter iter;
+ DBusMessageIter sub;
+ DBusError error;
+ int arg_type;
+
+ request = p_dbus_message_new_method_call(dest_udisks, path_udisks, dest_udisks, "EnumerateDevices");
+ if (request)
+ {
+ p_dbus_error_init(&error);
+ if ((reply = p_dbus_connection_send_with_reply_and_block(ctx, request, -1, &error)))
+ {
+ p_dbus_message_iter_init(reply, &iter);
+ arg_type = p_dbus_message_iter_get_arg_type(&iter);
+ if (arg_type == DBUS_TYPE_ARRAY)
+ {
+ p_dbus_message_iter_recurse(&iter, &sub);
+ while ((arg_type = p_dbus_message_iter_get_arg_type(&sub)) == DBUS_TYPE_OBJECT_PATH)
+ {
+ char * data;
+ p_dbus_message_iter_get_basic(&sub, &data);
+ udisks_add_device(ctx, data);
+ p_dbus_message_iter_next(&sub);
+ }
+ }
+ else
+ WARN("expected ARRAY, got %c\n", arg_type);
+
+ p_dbus_message_unref(reply);
+ }
+ p_dbus_error_free(&error);
+ p_dbus_message_unref(request);
+ }
+}
+
+static void udisks_get_version(DBusConnection *ctx)
+{
+ DBusMessage *request;
+ DBusMessage *reply;
+ DBusMessageIter iter;
+ DBusMessageIter sub;
+ DBusError error;
+ int arg_type;
+
+ request = p_dbus_message_new_method_call(dest_udisks, path_udisks, iface_dbus_prop, "Get");
+ if (request)
+ {
+ if (p_dbus_message_append_args(request, DBUS_TYPE_STRING, &dest_udisks,
+ DBUS_TYPE_STRING, &daemonversion,
+ DBUS_TYPE_INVALID))
+ {
+ p_dbus_error_init(&error);
+ if ((reply = p_dbus_connection_send_with_reply_and_block(ctx, request, -1, &error)))
+ {
+ p_dbus_message_iter_init(reply, &iter);
+ arg_type = p_dbus_message_iter_get_arg_type(&iter);
+ if (arg_type == DBUS_TYPE_VARIANT)
+ {
+ p_dbus_message_iter_recurse(&iter, &sub);
+ arg_type = p_dbus_message_iter_get_arg_type(&sub);
+ if (arg_type == DBUS_TYPE_STRING)
+ {
+ char * data;
+ p_dbus_message_iter_get_basic(&sub, &data);
+ lstrcpynA(udisks_version, data, sizeof(udisks_version) - 1);
+ TRACE("found udisks daemon %s\n", udisks_version);
+ }
+ else
+ WARN("expected STRING, got %c\n", arg_type);
+
+ }
+ else
+ WARN("expected VARIANT, got %c\n", arg_type);
+
+ p_dbus_message_unref(reply);
+ }
+ p_dbus_error_free(&error);
+ }
+ else
+ WARN("dbus_message_append_args failed\n");
+
+ p_dbus_message_unref(request);
+ }
+ return;
+
+}
+
+static DWORD WINAPI udisks_thread( void *arg )
+{
+ DBusConnection *ctx;
+ DBusMessage *msg;
+ DBusMessageIter iter;
+ DBusError error;
+ const char *member;
+ int arg_type;
+ char *data;
+
+ p_dbus_error_init(&error);
+ ctx = p_dbus_bus_get(DBUS_BUS_SYSTEM, &error);
+
+ if (!ctx)
+ {
+ WARN("failed to get system dbus connection: %s\n", error.message);
+ p_dbus_error_free(&error);
+ return 1;
+ }
+
+ p_dbus_bus_add_match(ctx, my_match_rule, &error);
+ if (p_dbus_error_is_set(&error))
+ {
+ WARN("add dbus filter failed: %s\n", error.message);
+ p_dbus_error_free(&error);
+ p_dbus_connection_unref(ctx);
+ return 1;
+ }
+
+ udisks_get_version(ctx);
+
+ if (!*udisks_version)
+ {
+ TRACE("udisks service not available\n");
+ p_dbus_bus_remove_match(ctx, my_match_rule, NULL);
+ p_dbus_error_free(&error);
+ p_dbus_connection_unref(ctx);
+ return 1;
+ }
+
+ __TRY
+ {
+ /* retrieve all existing devices */
+ udisks_get_all_devices(ctx);
+
+ while (p_dbus_connection_read_write_dispatch(ctx, -1 ))
+ {
+ while ((msg = p_dbus_connection_pop_message(ctx)))
+ {
+ member = p_dbus_message_get_member(msg);
+ p_dbus_message_iter_init(msg, &iter);
+ arg_type = p_dbus_message_iter_get_arg_type(&iter);
+
+ if (arg_type == DBUS_TYPE_OBJECT_PATH)
+ p_dbus_message_iter_get_basic(&iter, &data);
+
+ if (!lstrcmpA(member, "DeviceChanged"))
+ udisks_change_device(ctx, data);
+ else if (!lstrcmpA(member, "DeviceAdded"))
+ udisks_add_device(ctx, data);
+ else if (!lstrcmpA(member, "DeviceRemoved"))
+ udisks_remove_device(ctx, data);
+ else if (lstrcmpA(member, "DeviceJobChanged"))
+ WARN("got signal for %s\n", member);
+
+ p_dbus_message_unref(msg);
+ }
+ }
+ }
+ __EXCEPT(assert_fault)
+ {
+ WARN("dbus assertion failure, disabling UDisks support\n");
+ return 1;
+ }
+ __ENDTRY;
+
+ p_dbus_bus_remove_match(ctx, my_match_rule, NULL);
+ p_dbus_error_free(&error);
+ p_dbus_connection_unref(ctx);
+ return 0;
+}
+
+void initialize_udisks(void)
+{
+ HANDLE handle = NULL;
+
+ if (!load_dbus_functions()) return;
+ if (!(handle = CreateThread(NULL, 0, udisks_thread, NULL, 0, NULL))) return;
+ CloseHandle(handle);
+}
+
+#else /* SONAME_LIBDBUS_1 */
+
+void initialize_udisks(void)
+{
+ TRACE("Skipping, DBUS support not compiled in\n");
+}
+
+#endif /* SONAME_LIBDBUS_1 */

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f4acb34a64ae10e1a4dfd1a91019f48a9cc39ad225b6114e4d1a9130987319db
size 19809275

3
wine-1.4-rc1.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:63c4dc5dbba882b1132ebbb18eee3c39d57634bf63a0c26e441a753ee51d3390
size 19901423

View File

@ -1,8 +1,75 @@
-------------------------------------------------------------------
Fri Jan 27 20:23:03 UTC 2012 - meissner@suse.com
- Updated to 1.4-rc1 release candidate (1.3.38_1.4rc1 for linearity)
- Improved crash dialog with support for saving the backtrace.
- Support for the Back button in built-in Internet Explorer.
- Keyboard accelerators can now be translated through po files.
- A number of installer fixes.
- Many translation updates and tweaks.
- Various bug fixes.
-------------------------------------------------------------------
Thu Jan 26 22:00:45 UTC 2012 - meissner@suse.com
- autogenerate baselibs.conf
-------------------------------------------------------------------
Mon Jan 16 17:53:20 CET 2012 - meissner@suse.de
- Updated to 1.3.36 development snapshot
- Completion of the DIB engine.
- Improvements to the C++ runtime.
- A number of fixes in the audio drivers.
- Unnecessary Direct3D options removed from WineCfg.
- Some fixes to the built-in Internet Explorer.
- Various bug fixes.
- packaging changed to use baselibs methods
-------------------------------------------------------------------
Fri Dec 30 18:59:04 UTC 2011 - meissner@suse.com
- Updated to 1.3.36 development snapshot
- UDisks backend for the dynamic device support.
- Polygons and geometric pens implemented in the DIB engine.
- JScript now compiles entire functions.
- Improved support for vertical fonts.
- A few more scripts in UniScribe.
- A bunch of ctype functions implemented in MSVCP.
- Various bug fixes.
-------------------------------------------------------------------
Wed Dec 21 10:51:39 UTC 2011 - coolo@suse.com
- add autoconf as buildrequire to avoid implicit dependency
-------------------------------------------------------------------
Sat Dec 17 10:13:32 UTC 2011 - meissner@suse.com
- Updated to 1.3.35 development snapshot
- Triangular gradients and cosmetic wide pens support in the DIB engine.
- All Wine dialogs can now be translated through po files.
- Many more scripts added to UniScribe.
- JScript using bytecode throughout now.
- Several MSXML improvements.
- Various bug fixes.
-------------------------------------------------------------------
Fri Dec 2 23:39:07 CET 2011 - meissner@suse.de
- Updated to 1.3.34 development snapshot
- Bytecode support in JavaScript.
- Support for gradients in the DIB engine.
- A number of Uniscribe improvements.
- Fixes for DirectDraw mode switching.
- A few more MSVC runtime functions.
- Various bug fixes.
-------------------------------------------------------------------
Mon Nov 21 22:49:24 CET 2011 - meissner@suse.de
- Remove -fomit-frame-pointer again.
-------------------------------------------------------------------
Fri Nov 18 21:51:53 CET 2011 - meissner@suse.de

204
wine.spec
View File

@ -1,7 +1,7 @@
#
# spec file for package wine
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -56,34 +56,45 @@ BuildRequires: sane-backends
%if 0%{?suse_version} > 1130
BuildRequires: gstreamer-0_10-plugins-base-devel
%endif
Version: 1.3.33
Version: 1.3.38_1.4rc1
Release: 0
Summary: An MS Windows Emulator
License: LGPL-2.1+
Group: System/Emulators/PC
Url: http://www.winehq.com
# vanilla Wine release
Source0: wine-%version.tar.bz2
%define winever 1.4-rc1
Source0: wine-%{winever}.tar.bz2
Source1: http://kegel.com/wine/winetricks
Source2: http://kegel.com/wine/wisotool
Source3: README.SuSE
Source4: wine.desktop
Source5: ubuntuwine.tar.bz2
Source7: baselibs.conf
# SUSE specific patches
# - currently none, but add them here
Patch0: susepatches.patch
#Patch0: susepatches.patch
Recommends: wine-gecko >= 1.4
Recommends: wine-mp3
Recommends: dosbox
Conflicts: wine-gecko < 1.3
%ifarch %ix86 x86_64
%ifarch x86_64
Requires: wine-32bit = %version
%endif
# for winetricks:
Requires: unzip cabextract
%ifarch x86_64
Requires: libX11.so.6()(64bit) libXext.so.6()(64bit) libXcursor.so.1()(64bit) libXi.so.6()(64bit) libXxf86vm.so.1()(64bit) libXrender.so.1()(64bit) libXrandr.so.2()(64bit) libXinerama.so.1()(64bit) libXcomposite.so.1()(64bit) libGL.so.1()(64bit) libGLU.so.1()(64bit) libxslt.so.1()(64bit) libncurses.so.6()(64bit) libfreetype.so.6()(64bit) libfontconfig.so.1()(64bit) libcups.so.2()(64bit)
%else
%ifarch %ix86
Requires: libXcursor.so.1 libXi.so.6 libXxf86vm.so.1 libXrender.so.1 libXrandr.so.2 libXinerama.so.1 libXcomposite.so.1 libxslt.so.1 libncurses.so.6 libfreetype.so.6 libcrypto.so.1.0.0 libssl.so.1.0.0 libfontconfig.so.1 libcups.so.2 libpng14.so.14
%if 0%{?suse_version} < 1210
Requires: libgnutls.so.26
%else
Requires: libgnutls.so.28
%endif
%endif
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -95,45 +106,25 @@ libraries.
It is not necessary to have a Windows installation to run WINE.
Refer to /usr/share/doc/packages/wine/README.SuSE. There is more
Refer to %{_datadir}/doc/packages/wine/README.SuSE. There is more
documentation available in that directory. Read 'man wine' for further
information.
You can invoke wine by entering 'wine program.exe'. Configure it by
running 'winecfg'.
%ifarch %ix86
%package 32bit
Summary: The 32bit runtime system of Wine
# requires either 32bit or 64bit wine
Requires: wine = %version
# lib dependencies that are dynamically loaded
Requires: libXcursor.so.1 libXi.so.6 libXxf86vm.so.1 libXrender.so.1 libXrandr.so.2 libXinerama.so.1 libXcomposite.so.1 libxslt.so.1 libncurses.so.6 libfreetype.so.6 libcrypto.so.1.0.0 libssl.so.1.0.0 libfontconfig.so.1 libcups.so.2 libpng14.so.14
%if 0%{?suse_version} < 1210
Requires: libgnutls.so.26
%else
Requires: libgnutls.so.28
%endif
%description 32bit
This package contains the 32bit runtime environment (libraries, DLLs, EXEs) of Wine.
It is required to run Win32 binaries. It requires either the 32bit or 64bit
"wine" environment to work.
%endif
%package devel
Summary: files for wine development
Group: System/Emulators/PC
%description devel
This RPM contains the header files and development tools for the WINE
libraries.
%prep
%setup -q
%patch0 -p1
%setup -q -n %name-%winever
#%patch0 -p1
#
cp %{S:3} .
#
@ -141,12 +132,12 @@ cp %{S:3} .
%build
cat VERSION
%ifarch %ix86
# e.g. Steam hates it.
# e.g. Steam and other copy protections hate removed %ebp.
export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fomit-frame-pointer//'`
%endif
# keep just for susepatches with configure changes
autoconf
autoheader -I include
#autoconf
#autoheader -I include
CFLAGS="$RPM_OPT_FLAGS" \
%configure \
--with-x \
@ -155,77 +146,78 @@ CFLAGS="$RPM_OPT_FLAGS" \
%endif
--verbose
cat config.log
grep "have_x=yes" config.log || exit 1
grep SONAME_ config.status
# generate baselibs.conf
%ifarch %ix86
echo "# autogenerated in .spec file" >%SOURCE7
echo "%name" >> %SOURCE7
echo " +^/usr/bin/wine\$" >> %SOURCE7
echo " +^/usr/bin/wine-preloader\$" >> %SOURCE7
echo " +^/usr/lib/wine/fakedlls" >> %SOURCE7
grep SONAME_ config.log
grep SONAME_ config.log|grep -v 'so"'|sed -e 's/^.*\(".*"\).*$/ requires \1/;'|sort -u >>%SOURCE7
echo "%name-devel" >> %SOURCE7
cat %SOURCE7
%endif
make %{?jobs:-j%jobs} all
%install
make install DESTDIR=$RPM_BUILD_ROOT
make install DESTDIR=%{buildroot}
# install desktop file
install -d $RPM_BUILD_ROOT/usr/share/applications/
install -d %{buildroot}%{_datadir}/applications/
%suse_update_desktop_file %{SOURCE4} Emulator
install -m 0644 %SOURCE4 $RPM_BUILD_ROOT/usr/share/applications/
install -m 0755 %SOURCE1 $RPM_BUILD_ROOT/usr/bin/
install -m 0755 %SOURCE2 $RPM_BUILD_ROOT/usr/bin/
mv $RPM_BUILD_ROOT/%{_mandir}/de.UTF-8 $RPM_BUILD_ROOT/%{_mandir}/de
mv $RPM_BUILD_ROOT/%{_mandir}/fr.UTF-8 $RPM_BUILD_ROOT/%{_mandir}/fr
mv $RPM_BUILD_ROOT/%{_mandir}/pl.UTF-8 $RPM_BUILD_ROOT/%{_mandir}/pl
install -m 0644 %SOURCE4 %{buildroot}%{_datadir}/applications/
install -m 0755 %SOURCE1 %{buildroot}%{_bindir}/
install -m 0755 %SOURCE2 %{buildroot}%{_bindir}/
mv %{buildroot}/%{_mandir}/de.UTF-8 %{buildroot}/%{_mandir}/de
mv %{buildroot}/%{_mandir}/fr.UTF-8 %{buildroot}/%{_mandir}/fr
mv %{buildroot}/%{_mandir}/pl.UTF-8 %{buildroot}/%{_mandir}/pl
tar xjf %{SOURCE5}
# Copied from Ubuntu Wine out of debian.diff
# https://launchpad.net/~ubuntu-wine/+archive/ppa/+packages
# taken on 1.2rc2 time.
cd ubuntuwine
install -d $RPM_BUILD_ROOT/etc/xdg/menus/applications-merged
install -c -m 644 wine.menu $RPM_BUILD_ROOT/etc/xdg/menus/applications-merged
install -d %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged
install -c -m 644 wine.menu %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged
# Install application-specific desktop files
install -d $RPM_BUILD_ROOT/usr/share/applications
install -c -m 644 *.desktop $RPM_BUILD_ROOT/usr/share/applications/
install -d %{buildroot}%{_datadir}/applications
install -c -m 644 *.desktop %{buildroot}%{_datadir}/applications/
install -d $RPM_BUILD_ROOT/usr/share/desktop-directories/
install -c -m 644 *.directory $RPM_BUILD_ROOT/usr/share/desktop-directories/
install -d %{buildroot}%{_datadir}/desktop-directories/
install -c -m 644 *.directory %{buildroot}%{_datadir}/desktop-directories/
# Install icons
install -d $RPM_BUILD_ROOT/usr/share/icons/hicolor/scalable/apps/
install -c -m 644 *.svg $RPM_BUILD_ROOT/usr/share/icons/hicolor/scalable/apps/
install -d %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
install -c -m 644 *.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
cd ..
%fdupes -s $RPM_BUILD_ROOT
%ifarch %ix86
%post 32bit -p /sbin/ldconfig
%postun 32bit -p /sbin/ldconfig
%else
%fdupes -s %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%endif
%files
%defattr(-,root,root)
%doc ANNOUNCE AUTHORS LICENSE LICENSE.OLD README*
/usr/bin/function_grep.pl
/usr/bin/msiexec
/usr/bin/notepad
/usr/bin/regedit
/usr/bin/regsvr32
/usr/bin/wineboot
/usr/bin/winecfg
/usr/bin/wineconsole
/usr/bin/winedbg
/usr/bin/winefile
/usr/bin/winemine
/usr/bin/winepath
/usr/bin/wineserver
/usr/bin/winetricks
/usr/bin/wisotool
/usr/share/wine
/usr/share/applications/wine.desktop
%{_bindir}/function_grep.pl
%{_bindir}/msiexec
%{_bindir}/notepad
%{_bindir}/regedit
%{_bindir}/regsvr32
%{_bindir}/wineboot
%{_bindir}/winecfg
%{_bindir}/wineconsole
%{_bindir}/winedbg
%{_bindir}/winefile
%{_bindir}/winemine
%{_bindir}/winepath
%{_bindir}/wineserver
%{_bindir}/winetricks
%{_bindir}/wisotool
%{_datadir}/wine
%{_datadir}/applications/wine.desktop
%doc %{_mandir}/man1/wine.1*
%doc %{_mandir}/man1/winedbg.1*
%doc %{_mandir}/man1/wineserver.1*
@ -245,34 +237,26 @@ cd ..
%doc %{_mandir}/man1/winefile.1.*
%doc %{_mandir}/man1/winemine.1.*
%doc %{_mandir}/man1/winepath.1.*
%dir /etc/xdg/menus/
%dir /etc/xdg/menus/applications-merged
%config /etc/xdg/menus/applications-merged/*.menu
/usr/share/applications/*.desktop
%dir /usr/share/desktop-directories/
/usr/share/desktop-directories/*.directory
%dir /usr/share/icons/hicolor
%dir /usr/share/icons/hicolor/scalable
%dir /usr/share/icons/hicolor/scalable/apps
/usr/share/icons/hicolor/scalable/apps/*.svg
%if 0%{?suse_version} > 1120
%dir %{_sysconfdir}/xdg/menus/
%dir %{_sysconfdir}/xdg/menus/applications-merged
%config %{_sysconfdir}/xdg/menus/applications-merged/*.menu
%{_datadir}/applications/*.desktop
%dir %{_datadir}/desktop-directories/
%{_datadir}/desktop-directories/*.directory
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/scalable/apps/*.svg
%ifarch %ix86
%files 32bit
%defattr(-,root,root)
%endif
%endif
%ifarch %ix86
/usr/bin/wine
/usr/bin/wine-preloader
%{_bindir}/wine
%{_bindir}/wine-preloader
%endif
%ifarch ppc
/usr/bin/wine
%{_bindir}/wine
%endif
%ifarch x86_64
/usr/bin/wine64
/usr/bin/wine64-preloader
%{_bindir}/wine64
%{_bindir}/wine64-preloader
%endif
%{_libdir}/wine/*.so
%{_libdir}/lib*.so.*
@ -283,15 +267,15 @@ cd ..
%files devel
%defattr(-,root,root)
%{_includedir}/wine
/usr/bin/widl
/usr/bin/winebuild
/usr/bin/winecpp
/usr/bin/winedump
/usr/bin/wineg++
/usr/bin/winegcc
/usr/bin/winemaker
/usr/bin/wmc
/usr/bin/wrc
%{_bindir}/widl
%{_bindir}/winebuild
%{_bindir}/winecpp
%{_bindir}/winedump
%{_bindir}/wineg++
%{_bindir}/winegcc
%{_bindir}/winemaker
%{_bindir}/wmc
%{_bindir}/wrc
%{_libdir}/wine/*.def
%{_libdir}/wine/*.a
%{_libdir}/lib*.so
@ -304,6 +288,6 @@ cd ..
%doc %{_mandir}/man1/wmc.1*
%doc %{_mandir}/man1/wrc.1*
# /usr/share/aclocal/wine.m4
# %{_datadir}/aclocal/wine.m4
%changelog

1014
winetricks

File diff suppressed because it is too large Load Diff