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.