LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-18-2009, 01:49 AM   #1
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
Question How do you patch WINE with this file?


Hey guys.

I made a post earlier on this subject which returned no replies. So I attempted to Google till my fingers fell off and that's just about what I've done. I am using Ubuntu Karmic Koala 9.10.

What I am trying to do is install Adobe Creative Suite 4 Master Collection using WINE version 1.1.15 as described in this article. The article mentions a patch that needs to be applied in order to do this.

After searching around for a while on Google, I found that I needed to compile WINE from source. I used this article as my main reference.

Here's the patch I needed to use:
Code:
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index c824904..05df4bb 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -777,6 +777,59 @@ static UINT msi_set_context(MSIPACKAGE *package)
     return ERROR_SUCCESS;
 }
 
+/* Dummy thread just to initialize an MTA for the benefit of custom action DLLs */
+static HANDLE dummy_thread_sync_event = NULL;
+static HANDLE dummy_thread_stop_event = NULL;
+static HANDLE dummy_thread_handle = NULL;
+
+DWORD WINAPI dummy_thread_proc(void *arg)
+{
+    HRESULT hr;
+    DWORD dwWaitResult;
+
+    hr = CoInitializeEx(0, COINIT_MULTITHREADED);
+    if (FAILED(hr))
+        WARN("CoInitializeEx failed %u\n", hr);
+
+    SetEvent(dummy_thread_sync_event);
+    dwWaitResult = WaitForSingleObject(dummy_thread_stop_event, INFINITE);
+
+    if (dwWaitResult != WAIT_OBJECT_0)
+        ERR("WaitForSingleObject failed?\n");
+
+    CoUninitialize();
+    return 0;
+}
+
+static void start_dummy_thread(void)
+{
+    if (dummy_thread_handle) return;
+
+    dummy_thread_sync_event = CreateEventA(NULL, TRUE, FALSE, "DummyThreadUpAndRunning");
+    if (dummy_thread_sync_event == NULL)
+        ERR("Can't create dummy thread sync event\n");
+    dummy_thread_stop_event = CreateEventA(NULL, TRUE, FALSE, "DummyThreadStop");
+    if (dummy_thread_stop_event == NULL)
+        ERR("Can't create dummy thread stop event\n");
+    dummy_thread_handle = CreateThread(NULL, 0, dummy_thread_proc, NULL, 0, NULL);
+    if (dummy_thread_handle == NULL)
+        ERR("Can't create dummy thread\n");
+
+    WaitForSingleObject(dummy_thread_sync_event, INFINITE);
+}
+
+static void end_dummy_thread(void)
+{
+    SetEvent(dummy_thread_stop_event);
+    WaitForSingleObject(dummy_thread_handle, INFINITE);
+
+    CloseHandle(dummy_thread_sync_event);
+    CloseHandle(dummy_thread_stop_event);
+    CloseHandle(dummy_thread_handle);
+
+    dummy_thread_handle = NULL;
+}
+
 /****************************************************
  * TOP level entry points 
  *****************************************************/
@@ -841,6 +894,8 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
     msi_clone_properties( package );
     msi_set_context( package );
 
+    start_dummy_thread();
+
     if ( (msi_get_property_int(package, szUILevel, 0) & INSTALLUILEVEL_MASK) >= INSTALLUILEVEL_REDUCED )
     {
         package->script->InWhatSequence |= SEQUENCE_UI;
@@ -870,6 +925,8 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
 
     /* finish up running custom actions */
     ACTION_FinishCustomActions(package);
+
+    end_dummy_thread();
     
     return rc;
 }
Here's how I interpreted the directions (they used diferent patch and WINE version):
1. Downloaded WINE 1.1.15 source from sourceforge.
2. Ran "sudo apt-get build-dep wine" in a Terminal.
3. Ran "mkdir wine-1.1.15" in a Terminal.
4. Moved downloaded WINE source from /home/wolf/downloads to /home/wolf/wine-1.1.15 using nautilus.
5. Made a text file, pasted the patch code into it, saved it as 'adobe.patch'.
6. Ran: "patch -p0 < adobe.patch" in a Terminal. It resulted in an error:
Code:
wolf@frozenrain:~$ cd wine-1.1.15
wolf@frozenrain:~/wine-1.1.15$ patch -p0 < adobe.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/dlls/msi/action.c b/dlls/msi/action.c
|index c824904..05df4bb 100644
|--- a/dlls/msi/action.c
|+++ b/dlls/msi/action.c
--------------------------
File to patch: b8965ee7c90a687af4c84ad0ede73b1df901e16c 
b8965ee7c90a687af4c84ad0ede73b1df901e16c: No such file or directory
Skip this patch? [y] y
Skipping patch.
3 out of 3 hunks ignored
Please explain in plain English what's wrong and how to get this patch working, Thanks.
 
Old 12-18-2009, 03:23 AM   #2
AutoBot
Member
 
Registered: Mar 2002
Location: I can see you from here.
Distribution: Gentoo 1.3b
Posts: 182

Rep: Reputation: 34
Try patch -p1 < adobe.patch as the patch lists the path to the file to be patched.
 
1 members found this post helpful.
Old 12-18-2009, 03:34 AM   #3
AutoBot
Member
 
Registered: Mar 2002
Location: I can see you from here.
Distribution: Gentoo 1.3b
Posts: 182

Rep: Reputation: 34
The -p0 would indicate that action.c is in the directory your running the patch in but it isn't if I'm not mistaken, -p1 tells patch to follow the path listed in the patch (dlls/msi/action.c).
 
1 members found this post helpful.
Old 12-18-2009, 03:37 AM   #4
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Original Poster
Rep: Reputation: 146Reputation: 146
You are not mistaken. It worked. You need a blue thumbs up icon the size of th Atlantic Ocean.
 
1 members found this post helpful.
Old 12-18-2009, 03:39 AM   #5
AutoBot
Member
 
Registered: Mar 2002
Location: I can see you from here.
Distribution: Gentoo 1.3b
Posts: 182

Rep: Reputation: 34
Lol, your welcome buddy.
 
  


Reply

Tags
adobe, patching, sourcecode, ubuntu, wine


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
patch problem - can't find file to patch jnutt Linux - Kernel 3 02-10-2010 04:45 PM
wine-20050725-3.2.i586.patch can't update xyz9915 Linux - Software 1 04-12-2006 04:18 AM
wine-20050725-3.2.i586.patch can'n update xyz9915 Suse/Novell 1 04-11-2006 02:24 PM
Unable to run hl1110 patch with wine- Details inside; help! ljs1987 Linux - Games 0 11-12-2003 05:36 AM
wine: chdir to /tmp/.wine-tom/server-306-33fca : No such file or directory Kinstonian Linux - Software 19 06-21-2003 06:16 AM


All times are GMT -5. The time now is 12:41 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration