diff --git a/susepatches.patch b/susepatches.patch new file mode 100644 index 0000000..96a6f75 --- /dev/null +++ b/susepatches.patch @@ -0,0 +1,335 @@ +diff --git a/dlls/crypt32/str.c b/dlls/crypt32/str.c +index 914ccaa..6d0fb5b 100644 +--- a/dlls/crypt32/str.c ++++ b/dlls/crypt32/str.c +@@ -190,6 +190,7 @@ DWORD WINAPI CertNameToStrA(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, + static const char crlfSep[] = "\r\n"; + static const char plusSep[] = " + "; + static const char spaceSep[] = " "; ++ static const char quoteSep[] = "\""; + DWORD ret = 0, bytes = 0; + BOOL bRet; + CERT_NAME_INFO *info; +@@ -204,7 +205,7 @@ DWORD WINAPI CertNameToStrA(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, + if (bRet) + { + DWORD i, j, sepLen, rdnSepLen; +- LPCSTR sep, rdnSep; ++ LPCSTR sep, rdnSep, quote; + BOOL reverse = dwStrType & CERT_NAME_STR_REVERSE_FLAG; + const CERT_RDN *rdn = info->rgRDN; + +@@ -222,11 +223,16 @@ DWORD WINAPI CertNameToStrA(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, + else + rdnSep = plusSep; + rdnSepLen = strlen(rdnSep); ++ if (dwStrType & CERT_NAME_STR_NO_QUOTING_FLAG) ++ quote = NULL; ++ else ++ quote = quoteSep; + for (i = 0; (!psz || ret < csz) && i < info->cRDN; i++) + { + for (j = 0; (!psz || ret < csz) && j < rdn->cRDNAttr; j++) + { + DWORD chars; ++ int needquote = 0; + char prefixBuf[10]; /* big enough for GivenName */ + LPCSTR prefix = NULL; + +@@ -255,13 +261,44 @@ DWORD WINAPI CertNameToStrA(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, + psz ? psz + ret : NULL, psz ? csz - ret - 1 : 0); + ret += chars; + } +- /* FIXME: handle quoting */ ++ /* FIXME: quoting still misses " (which is replaced by "") */ + chars = CertRDNValueToStrA( + rdn->rgRDNAttr[j].dwValueType, + &rdn->rgRDNAttr[j].Value, psz ? psz + ret : NULL, + psz ? csz - ret : 0); +- if (chars) ++ ++ /* poor mans memmem(), for , seperation */ ++ if (psz && quote && chars) { ++ int xx; ++ for (xx=0;xxrgRDNAttr[j].dwValueType, ++ &rdn->rgRDNAttr[j].Value, psz ? psz + ret : NULL, ++ psz ? csz - ret : 0); + ret += chars - 1; ++ if (psz && ret < csz - strlen(quote) - 1) ++ memcpy (psz + ret, quote, strlen(quote)); ++ ret += strlen(quote); ++ } else { ++ if (chars) ++ ret += chars - 1; ++ } ++ ++ /* FIXME: handle quoting */ + if (j < rdn->cRDNAttr - 1) + { + if (psz && ret < csz - rdnSepLen - 1) +@@ -353,6 +390,7 @@ DWORD cert_name_to_str_with_indent(DWORD dwCertEncodingType, DWORD indentLevel, + static const WCHAR crlfSep[] = { '\r','\n',0 }; + static const WCHAR plusSep[] = { ' ','+',' ',0 }; + static const WCHAR spaceSep[] = { ' ',0 }; ++ static const WCHAR quoteSep[] = { '"',0 }; + DWORD ret = 0, bytes = 0; + BOOL bRet; + CERT_NAME_INFO *info; +@@ -365,7 +403,7 @@ DWORD cert_name_to_str_with_indent(DWORD dwCertEncodingType, DWORD indentLevel, + if (bRet) + { + DWORD i, j, sepLen, rdnSepLen; +- LPCWSTR sep, rdnSep; ++ LPCWSTR sep, rdnSep, quote; + BOOL reverse = dwStrType & CERT_NAME_STR_REVERSE_FLAG; + const CERT_RDN *rdn = info->rgRDN; + +@@ -383,11 +421,16 @@ DWORD cert_name_to_str_with_indent(DWORD dwCertEncodingType, DWORD indentLevel, + else + rdnSep = plusSep; + rdnSepLen = lstrlenW(rdnSep); ++ if (dwStrType & CERT_NAME_STR_NO_QUOTING_FLAG) ++ quote = NULL; ++ else ++ quote = quoteSep; + for (i = 0; (!psz || ret < csz) && i < info->cRDN; i++) + { + for (j = 0; (!psz || ret < csz) && j < rdn->cRDNAttr; j++) + { + DWORD chars; ++ int needquote = 0; + LPCSTR prefixA = NULL; + LPCWSTR prefixW = NULL; + +@@ -435,13 +478,43 @@ DWORD cert_name_to_str_with_indent(DWORD dwCertEncodingType, DWORD indentLevel, + psz ? psz + ret : NULL, psz ? csz - ret - 1 : 0); + ret += chars; + } +- /* FIXME: handle quoting */ ++ /* FIXME: quoting still misses " (which is replaced by "") */ + chars = CertRDNValueToStrW( + rdn->rgRDNAttr[j].dwValueType, + &rdn->rgRDNAttr[j].Value, psz ? psz + ret : NULL, + psz ? csz - ret : 0); +- if (chars) ++ ++ /* poor mans memmem(), for , seperation */ ++ if (psz && quote && chars) { ++ int xx; ++ for (xx=0;xxrgRDNAttr[j].dwValueType, ++ &rdn->rgRDNAttr[j].Value, psz ? psz + ret : NULL, ++ psz ? csz - ret : 0); + ret += chars - 1; ++ if (psz && ret < csz - lstrlenW(quote) - 1) ++ memcpy (psz + ret, quote, lstrlenW(quote) * sizeof(WCHAR)); ++ ret += lstrlenW(quote); ++ } else { ++ if (chars) ++ ret += chars - 1; ++ } ++ + if (j < rdn->cRDNAttr - 1) + { + if (psz && ret < csz - rdnSepLen - 1) +diff --git a/dlls/crypt32/tests/str.c b/dlls/crypt32/tests/str.c +index ebc3342..2549bcc 100644 +--- a/dlls/crypt32/tests/str.c ++++ b/dlls/crypt32/tests/str.c +@@ -67,12 +67,12 @@ static const BYTE cert[] = + 0x73,0x6f,0x74,0x61,0x31,0x14,0x30,0x12,0x6,0x3,0x55,0x4,0x7,0x13,0xb,0x4d, + 0x69,0x6e,0x6e,0x65,0x61,0x70,0x6f,0x6c,0x69,0x73,0x31,0x14,0x30,0x12,0x6,0x3, + 0x55,0x4,0xa,0x13,0xb,0x43,0x6f,0x64,0x65,0x57,0x65,0x61,0x76,0x65,0x72,0x73, +- 0x31,0x19,0x30,0x17,0x6,0x3,0x55,0x4,0xb,0x13,0x10,0x57,0x69,0x6e,0x65,0x20, ++ 0x31,0x19,0x30,0x17,0x6,0x3,0x55,0x4,0xb,0x13,0x10,0x57,0x69,0x6e,0x65,0x2c, + 0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x31,0x12,0x30,0x10, + 0x6,0x3,0x55,0x4,0x3,0x13,0x9,0x6c,0x6f,0x63,0x61,0x6c,0x68,0x6f,0x73,0x74, + 0x31,0x23,0x30,0x21,0x6,0x9,0x2a,0x86,0x48,0x86,0xf7,0xd,0x1,0x9,0x1,0x16, + 0x14,0x61,0x72,0x69,0x63,0x40,0x63,0x6f,0x64,0x65,0x77,0x65,0x61,0x76,0x65, +- 0x72,0x73,0x2e,0x63,0x6f,0x6d,0x30,0x1e,0x17,0xd,0x30,0x36,0x30,0x31,0x32, ++ 0x72,0x73,0x3b,0x63,0x6f,0x6d,0x30,0x1e,0x17,0xd,0x30,0x36,0x30,0x31,0x32, + 0x35,0x31,0x33,0x35,0x37,0x32,0x34,0x5a,0x17,0xd,0x30,0x36,0x30,0x32,0x32, + 0x34,0x31,0x33,0x35,0x37,0x32,0x34,0x5a,0x30,0x81,0xa1,0x31,0xb,0x30,0x9,0x6, + 0x3,0x55,0x4,0x6,0x13,0x2,0x55,0x53,0x31,0x12,0x30,0x10,0x6,0x3,0x55,0x4,0x8, +@@ -80,11 +80,11 @@ static const BYTE cert[] = + 0x3,0x55,0x4,0x7,0x13,0xb,0x4d,0x69,0x6e,0x6e,0x65,0x61,0x70,0x6f,0x6c,0x69, + 0x73,0x31,0x14,0x30,0x12,0x6,0x3,0x55,0x4,0xa,0x13,0xb,0x43,0x6f,0x64,0x65, + 0x57,0x65,0x61,0x76,0x65,0x72,0x73,0x31,0x19,0x30,0x17,0x6,0x3,0x55,0x4,0xb, +- 0x13,0x10,0x57,0x69,0x6e,0x65,0x20,0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d, ++ 0x13,0x10,0x57,0x69,0x6e,0x65,0x2c,0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d, + 0x65,0x6e,0x74,0x31,0x12,0x30,0x10,0x6,0x3,0x55,0x4,0x3,0x13,0x9,0x6c,0x6f, + 0x63,0x61,0x6c,0x68,0x6f,0x73,0x74,0x31,0x23,0x30,0x21,0x6,0x9,0x2a,0x86,0x48, + 0x86,0xf7,0xd,0x1,0x9,0x1,0x16,0x14,0x61,0x72,0x69,0x63,0x40,0x63,0x6f,0x64, +- 0x65,0x77,0x65,0x61,0x76,0x65,0x72,0x73,0x2e,0x63,0x6f,0x6d,0x30,0x81,0x9f, ++ 0x65,0x77,0x65,0x61,0x76,0x65,0x72,0x73,0x3b,0x63,0x6f,0x6d,0x30,0x81,0x9f, + 0x30,0xd,0x6,0x9,0x2a,0x86,0x48,0x86,0xf7,0xd,0x1,0x1,0x1,0x5,0x0,0x3,0x81, + 0x8d,0x0,0x30,0x81,0x89,0x2,0x81,0x81,0x0,0x9b,0xb5,0x8f,0xaf,0xfb,0x9a,0xaf, + 0xdc,0xa2,0x4d,0xb1,0xc8,0x72,0x44,0xef,0x79,0x7f,0x28,0xb6,0xfe,0x50,0xdc, +@@ -107,71 +107,71 @@ static const BYTE cert[] = + 0x91,0x8a,0xf8,0x5,0xef,0x5b,0x3b,0x49,0xbf,0x5f,0x2b}; + + static char issuerStr[] = +- "US, Minnesota, Minneapolis, CodeWeavers, Wine Development, localhost, aric@codeweavers.com"; ++ "US, Minnesota, Minneapolis, CodeWeavers, \"Wine,Development\", localhost, \"aric@codeweavers;com\""; + static char issuerStrSemicolon[] = +- "US; Minnesota; Minneapolis; CodeWeavers; Wine Development; localhost; aric@codeweavers.com"; ++ "US; Minnesota; Minneapolis; CodeWeavers; \"Wine,Development\"; localhost; \"aric@codeweavers;com\""; + static char issuerStrCRLF[] = +- "US\r\nMinnesota\r\nMinneapolis\r\nCodeWeavers\r\nWine Development\r\nlocalhost\r\naric@codeweavers.com"; ++ "US\r\nMinnesota\r\nMinneapolis\r\nCodeWeavers\r\n\"Wine,Development\"\r\nlocalhost\r\n\"aric@codeweavers;com\""; + static char subjectStr[] = +- "2.5.4.6=US, 2.5.4.8=Minnesota, 2.5.4.7=Minneapolis, 2.5.4.10=CodeWeavers, 2.5.4.11=Wine Development, 2.5.4.3=localhost, 1.2.840.113549.1.9.1=aric@codeweavers.com"; ++ "2.5.4.6=US, 2.5.4.8=Minnesota, 2.5.4.7=Minneapolis, 2.5.4.10=CodeWeavers, 2.5.4.11=\"Wine,Development\", 2.5.4.3=localhost, 1.2.840.113549.1.9.1=\"aric@codeweavers;com\""; + static char subjectStrSemicolon[] = +- "2.5.4.6=US; 2.5.4.8=Minnesota; 2.5.4.7=Minneapolis; 2.5.4.10=CodeWeavers; 2.5.4.11=Wine Development; 2.5.4.3=localhost; 1.2.840.113549.1.9.1=aric@codeweavers.com"; ++ "2.5.4.6=US; 2.5.4.8=Minnesota; 2.5.4.7=Minneapolis; 2.5.4.10=CodeWeavers; 2.5.4.11=\"Wine,Development\"; 2.5.4.3=localhost; 1.2.840.113549.1.9.1=\"aric@codeweavers;com\""; + static char subjectStrCRLF[] = +- "2.5.4.6=US\r\n2.5.4.8=Minnesota\r\n2.5.4.7=Minneapolis\r\n2.5.4.10=CodeWeavers\r\n2.5.4.11=Wine Development\r\n2.5.4.3=localhost\r\n1.2.840.113549.1.9.1=aric@codeweavers.com"; +-static char x500SubjectStr[] = "C=US, S=Minnesota, L=Minneapolis, O=CodeWeavers, OU=Wine Development, CN=localhost, E=aric@codeweavers.com"; +-static char x500SubjectStrSemicolonReverse[] = "E=aric@codeweavers.com; CN=localhost; OU=Wine Development; O=CodeWeavers; L=Minneapolis; S=Minnesota; C=US"; ++ "2.5.4.6=US\r\n2.5.4.8=Minnesota\r\n2.5.4.7=Minneapolis\r\n2.5.4.10=CodeWeavers\r\n2.5.4.11=\"Wine,Development\"\r\n2.5.4.3=localhost\r\n1.2.840.113549.1.9.1=\"aric@codeweavers;com\""; ++static char x500SubjectStr[] = "C=US, S=Minnesota, L=Minneapolis, O=CodeWeavers, OU=\"Wine,Development\", CN=localhost, E=\"aric@codeweavers;com\""; ++static char x500SubjectStrSemicolonReverse[] = "E=\"aric@codeweavers;com\"; CN=localhost; OU=\"Wine,Development\"; O=CodeWeavers; L=Minneapolis; S=Minnesota; C=US"; + static WCHAR issuerStrW[] = { + 'U','S',',',' ','M','i','n','n','e','s','o','t','a',',',' ','M','i','n','n', + 'e','a','p','o','l','i','s',',',' ','C','o','d','e','W','e','a','v','e','r', +- 's',',',' ','W','i','n','e',' ','D','e','v','e','l','o','p','m','e','n','t', +- ',',' ','l','o','c','a','l','h','o','s','t',',',' ','a','r','i','c','@','c', +- 'o','d','e','w','e','a','v','e','r','s','.','c','o','m',0 }; ++ 's',',',' ','"','W','i','n','e',',','D','e','v','e','l','o','p','m','e','n','t','"', ++ ',',' ','l','o','c','a','l','h','o','s','t',',',' ','"','a','r','i','c','@','c', ++ 'o','d','e','w','e','a','v','e','r','s',';','c','o','m','"',0 }; + static WCHAR issuerStrSemicolonW[] = { + 'U','S',';',' ','M','i','n','n','e','s','o','t','a',';',' ','M','i','n','n', + 'e','a','p','o','l','i','s',';',' ','C','o','d','e','W','e','a','v','e','r', +- 's',';',' ','W','i','n','e',' ','D','e','v','e','l','o','p','m','e','n','t', +- ';',' ','l','o','c','a','l','h','o','s','t',';',' ','a','r','i','c','@','c', +- 'o','d','e','w','e','a','v','e','r','s','.','c','o','m',0 }; ++ 's',';',' ','"','W','i','n','e',',','D','e','v','e','l','o','p','m','e','n','t','"', ++ ';',' ','l','o','c','a','l','h','o','s','t',';',' ','"','a','r','i','c','@','c', ++ 'o','d','e','w','e','a','v','e','r','s',';','c','o','m','"',0 }; + static WCHAR issuerStrCRLFW[] = { + 'U','S','\r','\n','M','i','n','n','e','s','o','t','a','\r','\n','M','i','n', + 'n','e','a','p','o','l','i','s','\r','\n','C','o','d','e','W','e','a','v','e', +- 'r','s','\r','\n','W','i','n','e',' ','D','e','v','e','l','o','p','m','e','n', +- 't','\r','\n','l','o','c','a','l','h','o','s','t','\r','\n','a','r','i','c', +- '@','c','o','d','e','w','e','a','v','e','r','s','.','c','o','m',0 }; ++ 'r','s','\r','\n','"','W','i','n','e',',','D','e','v','e','l','o','p','m','e','n', ++ 't','"','\r','\n','l','o','c','a','l','h','o','s','t','\r','\n','"','a','r','i','c', ++ '@','c','o','d','e','w','e','a','v','e','r','s',';','c','o','m','"',0 }; + static WCHAR subjectStrW[] = { + '2','.','5','.','4','.','6','=','U','S',',',' ','2','.','5','.','4','.','8', + '=','M','i','n','n','e','s','o','t','a',',',' ','2','.','5','.','4','.','7', + '=','M','i','n','n','e','a','p','o','l','i','s',',',' ','2','.','5','.','4', + '.','1','0','=','C','o','d','e','W','e','a','v','e','r','s',',',' ','2','.', +- '5','.','4','.','1','1','=','W','i','n','e',' ','D','e','v','e','l','o','p', +- 'm','e','n','t',',',' ','2','.','5','.','4','.','3','=','l','o','c','a','l', ++ '5','.','4','.','1','1','=','"','W','i','n','e',',','D','e','v','e','l','o','p', ++ 'm','e','n','t','"',',',' ','2','.','5','.','4','.','3','=','l','o','c','a','l', + 'h','o','s','t',',',' ','1','.','2','.','8','4','0','.','1','1','3','5','4', +- '9','.','1','.','9','.','1','=','a','r','i','c','@','c','o','d','e','w','e', +- 'a','v','e','r','s','.','c','o','m',0 }; ++ '9','.','1','.','9','.','1','=','"','a','r','i','c','@','c','o','d','e','w','e', ++ 'a','v','e','r','s',';','c','o','m','"',0 }; + static WCHAR subjectStrSemicolonW[] = { + '2','.','5','.','4','.','6','=','U','S',';',' ','2','.','5','.','4','.','8', + '=','M','i','n','n','e','s','o','t','a',';',' ','2','.','5','.','4','.','7', + '=','M','i','n','n','e','a','p','o','l','i','s',';',' ','2','.','5','.','4', + '.','1','0','=','C','o','d','e','W','e','a','v','e','r','s',';',' ','2','.', +- '5','.','4','.','1','1','=','W','i','n','e',' ','D','e','v','e','l','o','p', +- 'm','e','n','t',';',' ','2','.','5','.','4','.','3','=','l','o','c','a','l', ++ '5','.','4','.','1','1','=','"','W','i','n','e',',','D','e','v','e','l','o','p', ++ 'm','e','n','t','"',';',' ','2','.','5','.','4','.','3','=','l','o','c','a','l', + 'h','o','s','t',';',' ','1','.','2','.','8','4','0','.','1','1','3','5','4', +- '9','.','1','.','9','.','1','=','a','r','i','c','@','c','o','d','e','w','e', +- 'a','v','e','r','s','.','c','o','m',0 }; ++ '9','.','1','.','9','.','1','=','"','a','r','i','c','@','c','o','d','e','w','e', ++ 'a','v','e','r','s',';','c','o','m','"',0 }; + static WCHAR subjectStrCRLFW[] = { + '2','.','5','.','4','.','6','=','U','S','\r','\n','2','.','5','.','4','.','8', + '=','M','i','n','n','e','s','o','t','a','\r','\n','2','.','5','.','4','.','7', + '=','M','i','n','n','e','a','p','o','l','i','s','\r','\n','2','.','5','.','4', + '.','1','0','=','C','o','d','e','W','e','a','v','e','r','s','\r','\n','2','.', +- '5','.','4','.','1','1','=','W','i','n','e',' ','D','e','v','e','l','o','p', +- 'm','e','n','t','\r','\n','2','.','5','.','4','.','3','=','l','o','c','a','l', ++ '5','.','4','.','1','1','=','"','W','i','n','e',',','D','e','v','e','l','o','p', ++ 'm','e','n','t','"','\r','\n','2','.','5','.','4','.','3','=','l','o','c','a','l', + 'h','o','s','t','\r','\n','1','.','2','.','8','4','0','.','1','1','3','5','4', +- '9','.','1','.','9','.','1','=','a','r','i','c','@','c','o','d','e','w','e', +- 'a','v','e','r','s','.','c','o','m',0 }; ++ '9','.','1','.','9','.','1','=','"','a','r','i','c','@','c','o','d','e','w','e', ++ 'a','v','e','r','s',';','c','o','m','"',0 }; + static WCHAR x500SubjectStrSemicolonReverseW[] = { +- 'E','=','a','r','i','c','@','c','o','d','e','w','e','a','v','e','r','s','.','c', +- 'o','m',';',' ','C','N','=','l','o','c','a','l','h','o','s','t',';',' ','O','U', +- '=','W','i','n','e',' ','D','e','v','e','l','o','p','m','e','n','t',';',' ','O', ++ 'E','=','"','a','r','i','c','@','c','o','d','e','w','e','a','v','e','r','s',';','c', ++ 'o','m','"',';',' ','C','N','=','l','o','c','a','l','h','o','s','t',';',' ','O','U', ++ '=','"','W','i','n','e',',','D','e','v','e','l','o','p','m','e','n','t','"',';',' ','O', + '=','C','o','d','e','W','e','a','v','e','r','s',';',' ','L','=','M','i','n','n', + 'e','a','p','o','l','i','s',';',' ','S','=','M','i','n','n','e','s','o','t','a', + ';',' ','C','=','U','S',0 }; +@@ -399,11 +399,8 @@ static void test_NameToStrConversionW(PCERT_NAME_BLOB pName, DWORD dwStrType, + sizeof(buffer) / sizeof(buffer[0])); + ok(i == lstrlenW(expected) + 1, "Expected %d chars, got %d\n", + lstrlenW(expected) + 1, i); +- ok(!lstrcmpW(buffer, expected), "Unexpected value\n"); +-#ifdef DUMP_STRINGS +- trace("Expected %s, got %s\n", ++ ok(!lstrcmpW(buffer, expected), "Expected %s, got %s\n", + wine_dbgstr_w(expected), wine_dbgstr_w(buffer)); +-#endif + } + + static void test_CertNameToStrW(void) +diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c +index 1c9cf22..054683c 100644 +--- a/dlls/shell32/pidl.c ++++ b/dlls/shell32/pidl.c +@@ -1753,13 +1753,13 @@ LPITEMIDLIST _ILCreateEntireNetwork(void) + + TRACE("\n"); + +- pidlOut = _ILAlloc(PT_NETWORK, FIELD_OFFSET(PIDLDATA, u.network.szNames[sizeof("Entire Network")])); ++ pidlOut = _ILAlloc(PT_NETWORK, FIELD_OFFSET(PIDLDATA, u.network.szNames[strlen("Entire Network")+1])); + if (pidlOut) + { + LPPIDLDATA pData = _ILGetDataPointer(pidlOut); + + pData->u.network.dummy = 0; +- strcpy(pData->u.network.szNames, "Entire Network"); ++ memcpy(pData->u.network.szNames, "Entire Network", strlen("Entire Network")+1); + } + return pidlOut; + } diff --git a/wine-1.2.tar.bz2 b/wine-1.2.tar.bz2 deleted file mode 100644 index bbcb251..0000000 --- a/wine-1.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2a338eeb576942cc8aef1133568af62c914de5991fda0c091335f6aea287cb94 -size 17738554 diff --git a/wine-1.3.3.tar.bz2 b/wine-1.3.3.tar.bz2 new file mode 100644 index 0000000..e97451a --- /dev/null +++ b/wine-1.3.3.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ca08a6e13b9a4a7c2643e5b12ff873360ba4e96187851c169a57365edb7a9e1 +size 18043897 diff --git a/wine.changes b/wine.changes index 959fa13..9928fd9 100644 --- a/wine.changes +++ b/wine.changes @@ -1,8 +1,60 @@ +------------------------------------------------------------------- +Mon Sep 20 13:11:42 CEST 2010 - meissner@suse.de + +- Updated to 1.3.3 development snapshot + - Improved support for right-to-left text. + - Support for CMYK JPEG images. + - Beginnings of a Game Explorer implementation. + - Improved 64-bit support in MSI. + - Stub inetcpl control panel applet. + - A number of fixes to crypto support. + - Translation updates. + - Various bug fixes. +- updated winetricks + ------------------------------------------------------------------- Wed Sep 15 09:04:56 UTC 2010 - aj@suse.de - Change BuildRequires for sane-backends devel split. +------------------------------------------------------------------- +Mon Sep 6 12:55:46 CEST 2010 - meissner@suse.de + +- Updated to 1.3.2 development snapshot + - Update of the Gecko engine, now including a 64-bit version. + - New implementation of console support on Unix terminals. + - Many new functions in the C runtime dlls. + - Various bug fixes. +- updated winetricks + +------------------------------------------------------------------- +Sun Aug 22 12:51:50 CEST 2010 - meissner@suse.de + +- Updated to 1.3.1 development snapshot + - Support for drag & drop between X11 and OLE. + - New ipconfig.exe builtin tool. + - Support for favorites in builtin Internet Explorer. + - Beginnings of a shell Explorer control. + - A number of DirectDraw code cleanups. + - Improvements to the calendar control. + - Various bug fixes. + +------------------------------------------------------------------- +Sun Aug 1 16:31:57 CEST 2010 - meissner@suse.de + +- Updated to 1.3.0 development snapshot + - Beginnings of a user interface for the builtin Internet Explorer. + - Support for cross-process OLE drag & drop. + - New builtin wscript.exe (Windows Script Host) program. + - Open/save dialogs remember the last used directory. + - Translation updates. + - Various bug fixes. +- updated winetricks + - various new loaders + - bugfixes +- updated wisotool + - lots of fixes + ------------------------------------------------------------------- Fri Jul 16 21:28:13 CEST 2010 - meissner@suse.de diff --git a/wine.spec b/wine.spec index 96940a0..4a2cc12 100644 --- a/wine.spec +++ b/wine.spec @@ -1,5 +1,5 @@ # -# spec file for package wine (Version 1.2) +# spec file for package wine (Version 1.3.3) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -27,16 +27,19 @@ BuildRequires: sane-backends License: LGPLv2.1+ Group: System/Emulators/PC AutoReqProv: on -Version: 1.2 -Release: 2 +Version: 1.3.3 +Release: 1 Summary: An MS Windows Emulator Url: http://www.winehq.com +# vanilla Wine release Source0: wine-%version.tar.bz2 Source1: http://kegel.com/wine/winetricks Source2: http://kegel.com/wine/wisotool Source3: README.SuSE Source4: wine.desktop Source5: ubuntuwine.tar.bz2 +# SUSE specific patches +Patch0: susepatches.patch Recommends: wine-gecko wine-mp3 Requires: wine-32bit = %version # for winetricks: @@ -91,6 +94,7 @@ libraries. %prep %setup -q +%patch0 -p1 # cp %{S:3} . # diff --git a/winetricks b/winetricks index 851f2ea..4ec6082 100644 --- a/winetricks +++ b/winetricks @@ -15,12 +15,12 @@ # # Note to contributors: please avoid gnu extensions in this shell script, # as it has to run on MacOSX and Solaris, too. A good book on the topic is -# "Portable Shell Programming" by Bruce Blinn +# "Portable Shell Programming" by Bruce Blinn, ISBN: 0-13-451494-7 #---- Constants ------------------------------------------------- # Name of this version of winetricks (YYYYMMDD) -VERSION=20100618 +VERSION=20100917 early_wine() { @@ -48,16 +48,27 @@ case "$OS" in ;; esac +# Decide where to store downloaded files +if test ! "$WINETRICKS_CACHE" -a -d $HOME/.winetrickscache +then + # For backwards compatibility + WINETRICKS_CACHE="$HOME/.winetrickscache" +else + # See http://standards.freedesktop.org/basedir-spec/latest/ar01s03.html + XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache} + WINETRICKS_CACHE="${WINETRICKS_CACHE:-$XDG_CACHE_HOME/winetricks}" +fi +test -d "$WINETRICKS_CACHE" || mkdir -p "$WINETRICKS_CACHE" + # Internal variables; these locations are not too important -WINETRICKS_CACHE="${WINETRICKS_CACHE:-$HOME/.winetrickscache}" WINETRICKS_CACHE_WIN="`$XXXPATH -w $WINETRICKS_CACHE | tr '\012' ' ' | sed 's/ $//'`" WINETRICKS_TMP="$DRIVE_C"/winetrickstmp WINETRICKS_TMP_WIN='c:\winetrickstmp' mkdir -p $WINETRICKS_TMP # Handle case where z: doesn't exist -if test "$WINETRICKS_CACHE_WIN" = "" -then +case "$WINETRICKS_CACHE_WIN" in +""|*\?\\unix*) # WINETRICKS_CACHE isn't accessible via a drive letter mapping, so make one, # but be sure to clean it up later. for letter in y x w v u t s r q @@ -69,7 +80,8 @@ then break fi done -fi + ;; +esac # Overridden for windows ISO_MOUNT_ROOT=/mnt/winetricks @@ -80,7 +92,6 @@ WINDIR="$DRIVE_C/windows" # their mirror picker sometimes persistantly sends you to a broken # mirror. case `date +%S` in -*[01]) SOURCEFORGE=http://internap.dl.sourceforge.net/sourceforge ;; *[23]) SOURCEFORGE=http://easynews.dl.sourceforge.net/sourceforge ;; *) SOURCEFORGE=http://downloads.sourceforge.net;; esac @@ -180,8 +191,10 @@ usage() { echo " colorprofile Standard RGB color profile" echo " comctl32 MS common controls 5.80" echo " comctl32.ocx MS comctl32.ocx and mscomctl.ocx, comctl32 wrappers for VB6" + echo " comdlg32.ocx MS comdlg32.ocx for VB6" echo " controlpad MS ActiveX Control Pad" echo " corefonts MS Arial, Courier, Times fonts" + echo " crypt32 MS crypt32.dl" echo " cygwin Unix apps for Windows (needed by some build scripts)" echo " d3dx9 MS d3dx9_??.dll (from DirectX 9 user redistributable)" echo " d3dx9_28 MS d3dx9_28.dll" @@ -189,8 +202,9 @@ usage() { echo " d3dx10 MS d3dx10_??.dll (from DirectX user redistributable)" echo " d3dxof MS d3dxof.dll (from DirectX user redistributable)" echo " dcom98 MS DCOM (ole32, oleaut32); requires Windows 98 license, but does not check for one" + echo " devenum MS devenum.dll (from DirectX 9 user redistributable)" echo " dinput8 MS dinput8.dll (from DirectX 9 user redistributable)" - echo " dirac0.8 the obsolete Dirac 0.8 directshow filter" + echo " dirac the Dirac directshow filter" echo " directmusic MS DirectMusic (from DirectX 9 user redistributable)" echo " directplay MS DirectPlay (from DirectX 9 user redistributable)" echo " directx9 MS DirectX 9 user redistributable (not recommended! use d3dx9 instead)" @@ -206,6 +220,8 @@ usage() { echo " dotnet30 MS .NET 3.0 (requires Windows license, but does not check for one, might not work yet)" echo " droid Droid fonts (on LCD, looks better with fontsmooth-rgb)" echo " dxsdk_nov2006 DirectX Software Development Kit, November 2006 version" + echo " eadm EA Download Manager" + echo " eufonts Updated fonts for Romanian and Bulgarian" echo " ffdshow ffdshow video codecs" echo " firefox Firefox web browser" echo " flash Adobe Flash Player ActiveX and firefox plugins" @@ -218,12 +234,16 @@ usage() { echo " gdiplus MS gdiplus.dll" echo " gecko-dbg The HTML rendering Engine (Mozilla), with debugging symbols" echo " gecko The HTML rendering Engine (Mozilla)" + echo " gfw MS Game For Windows Live (xlive.dll)" + echo " glut The glut utility library" echo " hosts Adds empty C:\windows\system32\drivers\etc\{hosts,services} files" echo " ie6 Microsoft Internet Explorer 6.0" echo " ie7 Microsoft Internet Explorer 7.0" + echo " ie8 Microsoft Internet Explorer 8.0" echo " jet40 MS Jet 4.0 Service Pack 8" echo " kde KDE for Windows installer" echo " liberation Red Hat Liberation fonts (Sans, Serif, Mono)" + echo " lucida MS Lucida Console font" echo " mdac25 MS MDAC 2.5: Microsoft ODBC drivers, etc." echo " mdac27 MS MDAC 2.7" echo " mdac28 MS MDAC 2.8" @@ -231,21 +251,18 @@ usage() { echo " mfc42 MS mfc42 (same as vcrun6 below)" echo " mingw-gdb GDB for MinGW" echo " mingw Minimalist GNU for Windows, including GCC for Windows!" - echo " mono20 mono-2.0.1" - echo " mono22 mono-2.2" - echo " mono24 mono-2.4" echo " mono26 mono-2.6" echo " mozillabuild Mozilla build environment" echo " mpc Media Player Classic" - echo " mshflxgd MS Hierarchical Flex Grid Control" - echo " msi2 MS Installer 2.0" + echo " mshflxgd MS Hierarchical FlexGrid Control" + echo " msi2 MS Windows Installer 2.0" echo " msls31 MS Line Services 3.1 (needed by native riched?)" echo " msmask MS Masked Edit Control" echo " mspaint MS Paint (gotta draw stick figures somehow...)" - echo " msscript MS Script Control" - echo " msxml3 MS XML version 3" - echo " msxml4 MS XML version 4" - echo " msxml6 MS XML version 6" + echo " msscript MS Windows Script Control" + echo " msxml3 MS XML Core Services 3.0" + echo " msxml4 MS XML Core Services 4.0" + echo " msxml6 MS XML Core Services 6.0" echo " ogg ogg filters/codecs: flac, theora, speex, vorbis, schroedinger" echo " ole2 MS 16 bit OLE" echo " openwatcom Open Watcom C/C++ compiler (can compile win16 code!)" @@ -258,9 +275,11 @@ usage() { echo " python-comtypes Python 0.6.1-1 comtypes package" echo " quartz quartz.dll (from Directx 9 user redistributable)" echo " quicktime72 Apple Quicktime 7.2" - echo " riched20 MS riched20 and riched32" - echo " riched30 MS riched30" + echo " riched20 MS RichEdit Control, riched20 and riched32" + echo " riched30 MS RichEdit Control, riched30" echo " richtx32 MS Rich TextBox Control 6.0" + echo " safari Apple Safari web browser" + echo " secur32 MS secur32" echo " shockwave Adobe Shockwave Player" echo " steam Steam Client App from Valve" echo " tahoma MS Tahoma font (not part of corefonts)" @@ -280,12 +299,14 @@ usage() { echo " vcrun2003 MS Visual C++ 2003 libraries (mfc71,msvcp71,msvcr71)" echo " vcrun2005 MS Visual C++ 2005 sp1 libraries (mfc80,msvcp80,msvcr80)" echo " vcrun2008 MS Visual C++ 2008 libraries (mfc90,msvcp90,msvcr90)" + echo " vcrun2010 MS Visual C++ 2010 libraries (mfc100,msvcp100,msvcr100)" echo " vcrun6 MS Visual C++ 6 sp4 libraries (mfc42, msvcp60, msvcrt)" echo " vcrun6sp6 MS Visual C++ 6 sp6 libraries (mfc42, msvcp60, msvcrt; 64 MB download)" echo " vjrun20 MS Visual J# 2.0 SE libraries (requires dotnet20)" echo " vlc VLC media player" echo " wenquanyi WenQuanYi CJK font (on LCD looks better with fontsmooth-rgb)" echo " windowscodecs MS Windows Imaging Component" + echo " winhttp MS winhttp.dll (requires Windows license, but does not check for one)" echo " wininet MS wininet.dll (requires Windows license, but does not check for one)" echo " wme9 MS Windows Media Encoder 9 (requires Windows license, but does not check for one)" echo " wmp10 MS Windows Media Player 10 (requires Windows license, but does not check for one)" @@ -298,12 +319,11 @@ usage() { echo "Pseudopackages:" echo " alldlls=builtin Force use of builtin dlls (even if loaded with absolute path) (except for msvcp80 and d3dx9_*)" echo " alldlls=default Remove all DLL overrides" - echo " allfonts All listed fonts (corefonts, tahoma, liberation)" + echo " allfonts All listed fonts (corefonts, droid, eufonts, liberation, lucida, tahoma, wenquanyi)" echo " allcodecs All listed codecs (xvid, ffdshow)" echo " ddr=gdi Set DirectDrawRenderer to GDI (default)" echo " ddr=opengl Set DirectDrawRenderer to OpenGL" echo " dsoundbug9612 Use DirectSound MaxShadowSize=0 workaround for bug #9612" - echo " fakeie6 Set registry to claim IE6sp1 is installed" echo " forcemono Force using mono instead of .Net (for debugging)" echo " glsl-disable Disable GLSL use by Wine Direct3D" echo " glsl-enable Enable GLSL use by Wine Direct3D (default)" @@ -341,9 +361,9 @@ usage() { echo " win7 Set windows version to Windows 7" echo " winver= Set windows version to default (winxp)" echo " volnum Rename drive_c to harddiskvolume0 (needed by some installers)" - echo " mwo=force Set MouseWarpOverride to force (needded by some games" + echo " mwo=force Set MouseWarpOverride to force (needed by some games)" echo " mwo=enabled Set MouseWarpOverride to enabled (default)" - echo " mwo=disabled Set MouseWarpOverride to disabled" + echo " mwo=disable Set MouseWarpOverride to disable" echo " npm-repack Set NonPower2Mode to repack" echo " psm=on Set PixelShaderMode to enabled" echo " psm=off Set PixelShaderMode to disabled" @@ -398,7 +418,7 @@ showmenu() { case $MENU in zenity) - echo "zenity --title 'Select a package to install' --text 'Install?' --list --checklist --column '' --column Package --column Description --height 440 --width 600 \\" > "$WINETRICKS_TMP"/zenity.sh + echo "zenity --title 'Winetricks' --text 'Select packages to install' --list --checklist --column '' --column Package --column Description --height 440 --width 600 \\" > "$WINETRICKS_TMP"/zenity.sh usage | grep '^ [0-9a-z]' | sed 's/^ \([^ ]*\) *\(.*\)/FALSE "\1" '"'\2'/" | sed 's/$/ \\/' >> $WINETRICKS_TMP/zenity.sh todo="`sh "$WINETRICKS_TMP"/zenity.sh | tr '|' ' '`" ;; @@ -492,7 +512,7 @@ verify_sha1sum() { wantsum=$1 file=$2 - gotsum=`$SHA1SUM < $file | sed 's/ .*//'` + gotsum=`$SHA1SUM < "$file" | sed 's/(stdin)= //;s/ .*//'` if [ "$gotsum"x != "$wantsum"x ] then die "sha1sum mismatch! Rename $file and try again." @@ -907,14 +927,14 @@ _EOF_ append_path() { # Prepend $1 to the windows path in the registry. Caller must use single quotes and double backslashes in argument. NEW_PATH="$1" - WIN_PATH="`WINEDEBUG= $WINE cmd.exe /c echo "%PATH%" | sed 's,\\\\,\\\\\\\\,g'`" + WIN_PATH="`WINEDEBUG= $WINE cmd.exe /c echo "%PATH%" | tr -d '\r' | sed 's,\\\\,\\\\\\\\,g'`" - cat > "$WINETRICKS_TMP"/path.reg <<_EOF_ + sed 's/$/\r/' > "$WINETRICKS_TMP"/path.reg <<_EOF_ REGEDIT4 [HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Environment] +"PATH"="$NEW_PATH;$WIN_PATH" _EOF_ - echo '"PATH"="'"$NEW_PATH;$WIN_PATH\"" | sed "s/\\\\/\\\\\\\\/g" >> "$WINETRICKS_TMP"/path.reg try_regedit "$WINETRICKS_TMP_WIN"\\path.reg rm -f "$WINETRICKS_TMP"/path.reg @@ -943,10 +963,11 @@ load_adobeair() { # corefonts is necessary to avoid an installer crash. load_corefonts - # Adobe AIR 1.5.3 runtime + # Adobe AIR 2.0.2 runtime # 2010-02-02: sha1sum 5c95f51a680f8c175a92755238127be4ad22c53b # 2010-02-20: sha1sum 6f03e723bd855abbe00eb8fdf22da54fb49c62db - download . http://airdownload.adobe.com/air/win/download/1.5.3/AdobeAIRInstaller.exe 6f03e723bd855abbe00eb8fdf22da54fb49c62db + # 2010-07-29: sha1sum 7b93aedaf48ad7854940e7a4e7d9394a255e888b + download . http://airdownload.adobe.com/air/win/download/2.0.2/AdobeAIRInstaller.exe 7b93aedaf48ad7854940e7a4e7d9394a255e888b try $WINE "$WINETRICKS_CACHE"/AdobeAIRInstaller.exe $WINETRICKS_UNIXSILENT } @@ -1004,8 +1025,8 @@ load_cc580() { #---------------------------------------------------------------- load_cmake() { - download . http://www.cmake.org/files/v2.6/cmake-2.6.4-win32-x86.exe 00bd502423546b8bce19ffc180ea78e0e2f396cf - try $WINE "$WINETRICKS_CACHE"/cmake-2.6.4-win32-x86.exe + download . http://www.cmake.org/files/v2.8/cmake-2.8.2-win32-x86.exe 2c46f4e804787b231c2f45e1b43f1838462e8dfe + try $WINE "$WINETRICKS_CACHE"/cmake-2.8.2-win32-x86.exe } #---------------------------------------------------------------- @@ -1032,10 +1053,19 @@ load_colorprofile() { #---------------------------------------------------------------- +load_comdlg32ocx() { + download . http://activex.microsoft.com/controls/vb6/comdlg32.cab d4f3e193c6180eccd73bad53a8500beb5b279cbf + try_cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/comdlg32.cab + try cp "$WINETRICKS_TMP"/comdlg32.ocx "$WINDIR"/system32/comdlg32.ocx + try $WINE regsvr32 comdlg32.ocx +} + +#---------------------------------------------------------------- + load_controlpad() { # http://msdn.microsoft.com/en-us/library/ms968493.aspx # Fixes error "Failed to load UniText..." - load_wsh56 + load_wsh57 download . http://download.microsoft.com/download/activexcontrolpad/install/4.0.0.950/win98mexp/en-us/setuppad.exe 8921e0f52507ca6a373c94d222777c750fb48af7 try_cabextract --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/setuppad.exe echo "If setup says 'Unable to start DDE ...', press Ignore" @@ -1136,6 +1166,16 @@ load_corefonts() { register_font Webdings.TTF "Webdings (TrueType)" } +#---------------------------------------------------------------- + +load_crypt32() { + # https://www.microsoft.com/downloads/en/details.aspx?FamilyID=3d733ddd-1182-4d46-87c1-3357ca3fed28&DisplayLang=en + download . http://download.microsoft.com/download/1/6/2/1629d13a-dc5e-4dc6-a2a4-a6784942b94e/Q823182_XPE_SP2_X86_ENU.EXE c3e0aa35ab5197ede0d495c0edc242cf0fade54a + try_cabextract -d "$WINDIR"/system32 "$WINETRICKS_CACHE"/Q823182_XPE_SP2_X86_ENU.EXE -F rep/329115_crypt32.dll + override_dlls native crypt32 +} + + #---------------------------------------------------------------- load_cygwin() { @@ -1221,6 +1261,19 @@ load_d3dxof() { #---------------------------------------------------------------- +load_devenum() { + helper_directx_dl + + try_cabextract -d "$WINETRICKS_TMP" -L -F 'dxnt.cab' "$WINETRICKS_CACHE/$DIRECTX_NAME" + try_cabextract -d "$WINDIR"/system32 -L -F 'devenum.dll' "$WINETRICKS_TMP/dxnt.cab" + + try $WINE regsvr32 devenum + + override_dlls native devenum +} + +#---------------------------------------------------------------- + load_dinput8() { helper_directx_dl @@ -1234,9 +1287,9 @@ load_dinput8() { #---------------------------------------------------------------- -load_dirac08() { - download . http://codecpack.nl/dirac_dsfilter_080.exe aacfcddf6b2636de5f0a50422ba9155e395318af - try $WINE "$WINETRICKS_CACHE"/dirac_dsfilter_080.exe $WINETRICKS_SILENT +load_dirac() { + download . $SOURCEFORGE/dirac/Dirac%20Directshow%20Filter/Diract%20Direct%20Show%20Filter%201.0.2/DiracDirectShowFilter-1.0.2.exe c912d30a8fa500c7841444559feb1f49301611c4 + try $WINE "$WINETRICKS_CACHE"/DiracDirectShowFilter-1.0.2.exe } #---------------------------------------------------------------- @@ -1357,8 +1410,9 @@ load_divx() { # 7.0.? ad420bf8bf72e924e658c9c6ad6bba76b848fb79 as of 23 Sep 2009 as http://download.divx.com/divx/DivXInstaller.exe # 7.0.? 3385aa8f6ba64ae32e06f651bbbea247bcc1a44d as of 12 Dec 2009 as http://download.divx.com/divx/DivXInstaller.exe # d59422969a72790e92b6795e24e332f91ffacf94 as of 26 May 2010 as http://download.divx.com/divx/DivXInstaller.exe - - download divx-7 http://download.divx.com/divx/DivXInstaller.exe d59422969a72790e92b6795e24e332f91ffacf94 + # 3a2fe8ff2f9c5b5e527662af3badb42b460f6e62 as of 29 July 2010 as http://download.divx.com/divx/DivXInstaller.exe + # c105e92e2c329e281bdecfc3eecafd99a29cc0d5 as of 16 Sep 2010 as http://download.divx.com/divx/DivXInstaller.exe + download divx-7 http://download.divx.com/divx/DivXInstaller.exe c105e92e2c329e281bdecfc3eecafd99a29cc0d5 try $WINE "$WINETRICKS_CACHE"/divx-7/DivXInstaller } @@ -1414,6 +1468,10 @@ load_dotnet11() { # need corefonts, else installer crashes load_corefonts + # Wine tries to help Mono, which breaks .Net. Can't we all just play nice... + try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework\policy\v2.0" /f + try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework" /v InstallRoot /f + # http://www.microsoft.com/downloads/details.aspx?FamilyId=262D25E3-F589-4842-8157-034D1E7CF3A3 download dotnet11 http://download.microsoft.com/download/a/a/c/aac39226-8825-44ce-90e3-bf8203e74006/dotnetfx.exe 16a354a2207c4c8846b617cbc78f7b7c1856340e if [ $WINETRICKS_QUIET ] @@ -1457,6 +1515,10 @@ load_dotnet20() { download dotnet20 http://kegel.com/wine/l_intl.nls 0d2e3f025bcdf852b192c9408a361ac2659fa249 try cp -f "$WINETRICKS_CACHE"/dotnet20/l_intl.nls "$WINDIR/system32/" + # Wine tries to help Mono, which breaks .Net. Can't we all just play nice... + try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework\policy\v2.0" /f + try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework" /v InstallRoot /f + # http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5 download dotnet20 http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe a3625c59d7a2995fb60877b5f5324892a1693b2a if [ "$WINETRICKS_QUIET"x = ""x ] @@ -1479,6 +1541,10 @@ load_dotnet20sp2() { download dotnet20 http://kegel.com/wine/l_intl.nls 0d2e3f025bcdf852b192c9408a361ac2659fa249 try cp -f "$WINETRICKS_CACHE"/dotnet20/l_intl.nls "$WINDIR/system32/" + # Wine tries to help Mono, which breaks .Net. Can't we all just play nice... + try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework\policy\v2.0" /f + try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework" /v InstallRoot /f + # http://www.microsoft.com/downloads/details.aspx?familyid=5B2C0358-915B-4EB5-9B1D-10E506DA9D0F download dotnet20 http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe 22d776d4d204863105a5db99e8b8888be23c61a7 if [ "$WINETRICKS_QUIET"x = ""x ] @@ -1527,6 +1593,11 @@ load_dotnet30() { ln -sf "${WINDIR}/system32/spupdsvc.exe" "${LANGPACKS_BASE_PATH}/dotnetfx3langpack${lang}.exe" done + # Don't do this for dotnet30! See http://bugs.winehq.org/show_bug.cgi?id=24349#c4 + # Wine tries to help Mono, which breaks .Net. Can't we all just play nice... + #try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework\policy\v2.0" /f + #try $WINE reg delete "HKLM\Software\Microsoft\.NETFramework" /v InstallRoot /f + if [ "$WINETRICKS_QUIET"x = ""x ] then try $WINE "$WINETRICKS_CACHE"/dotnet30/dotnetfx3.exe @@ -1566,7 +1637,7 @@ load_droid() { DROID_URL='http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=data/fonts/' do_droid DroidSans-Bold.ttf "Droid Sans Bold" ada4e79c592f3c54546b7587b48f2b232d95ce2f - do_droid DroidSansFallback.ttf "Droid Sans Fallback" 2f8a266389a8e22f68f402b775731eec6b760334 + do_droid DroidSansFallback.ttf "Droid Sans Fallback" 5065cce92e8420232db95ab3ba421e462b09b965 do_droid DroidSansJapanese.ttf "Droid Sans Japanese" b3a248c11692aa88a30eb25df425b8910fe05dc5 do_droid DroidSansMono.ttf "Droid Sans Mono" f0815c6f36c72be1d0f2f5e2b82fa85c8bf95655 do_droid DroidSans.ttf "Droid Sans" da5b3c7758a2c8fbc4775beb69d7150493c7d312 @@ -1582,7 +1653,7 @@ load_dxsdk_nov2006() { download . http://download.microsoft.com/download/9/e/5/9e5bfc66-a621-4e0d-8bfe-6688058c3f00/dxsdk_aug2006.exe load_vcrun6 # for mfc42u echo "Be patient, the 'installing new services' step at the end takes about five minutes" - try $WINE "$WINETRICKS_CACHE"/dxsdk_aug2006.exe + try $WINE "$WINETRICKS_CACHE"/dxsdk_aug2006.exe $WINETRICKS_QUIET } #---------------------------------------------------------------- @@ -1601,53 +1672,47 @@ _EOF_ #---------------------------------------------------------------- -# Fake IE per workaround in http://bugs.winehq.org/show_bug.cgi?id=3453 -# Just the first registry key works for most apps. -# The App Paths part is required by a few apps, like Quickbooks Pro; -# see http://windowsxp.mvps.org/ie/qbooks.htm -set_fakeie6() { +load_eadm() { + download . http://akamai.cdn.ea.com/eamaster/u/f/eaonline/eadm/eadm-installer.exe 6b3d1a328af2d44033c24b84444992f56107b27f + load_adobeair + try $WINE "$WINETRICKS_CACHE"/eadm-installer.exe $WINETRICKS_S +} - cat > "$WINETRICKS_TMP"/fakeie6.reg <<"_EOF_" -REGEDIT4 +#---------------------------------------------------------------- -[HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer] -"Version"="6.0.2900.2180" +load_eufonts() { + # https://www.microsoft.com/downloads/details.aspx?FamilyID=0ec6f335-c3de-44c5-a13d-a1e7cea5ddea&displaylang=en + download . http://download.microsoft.com/download/a/1/8/a180e21e-9c2b-4b54-9c32-bf7fd7429970/EUupdate.EXE 9b076c40cb63aa0d8512aa8e610ba11d3466e441 + try_cabextract -q --directory="$WINETRICKS_TMP" "$WINETRICKS_CACHE"/EUupdate.EXE + try cp -f "$WINETRICKS_TMP"/*.ttf "$winefontsdir" -[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE] -_EOF_ + register_font ArialBI.ttf "Arial Bold Italic (TrueType)" + register_font ArialI.ttf "Arial Italic (TrueType)" + register_font Arial.ttf "Arial (TrueType)" + register_font TimesBd.ttf "Times New Roman Bold (TrueType)" + register_font TimesBI.ttf "Times New Roman Bold Italic (TrueType)" + register_font TimesI.ttf "Times New Roman Italic (TrueType)" + register_font Times.ttf "Times New Roman (TrueType)" + register_font trebucbd.ttf "Trebuchet Bold (TrueType)" + register_font trebucbi.ttf "Trebuchet Bold Italic (TrueType)" + register_font trebucit.ttf "Trebuchet Italic (TrueType)" + register_font trebuc.ttf "Trebuchet (TrueType)" + register_font Verdanab.ttf "Verdana Bold (TrueType)" + register_font Verdanai.ttf "Verdana Italian (TrueType)" + register_font Verdana.ttf "Verdana (TrueType)" + register_font Verdanaz.ttf "Verdana Bold Italic (TrueType)" - echo -n '@="' >>"$WINETRICKS_TMP"/fakeie6.reg - echo -n "${programfilesdir_win}" | sed "s/\\\\/\\\\\\\\/" >>"$WINETRICKS_TMP"/fakeie6.reg - echo '\\\\Internet Explorer\\\\iexplore.exe"' >>"$WINETRICKS_TMP"/fakeie6.reg - - echo -n '"PATH"="' >>"$WINETRICKS_TMP"/fakeie6.reg - echo -n "${programfilesdir_win}" | sed "s/\\\\/\\\\\\\\/" >>"$WINETRICKS_TMP"/fakeie6.reg - echo '\\\\Internet Explorer"' >>"$WINETRICKS_TMP"/fakeie6.reg - - try_regedit "$WINETRICKS_TMP_WIN"\\fakeie6.reg - - # On old wineprefixes iexplore.exe is not created. Create a fake dll using - # shdocvw.dll that should have similar VERSIONINFO. - if [ ! -f "$programfilesdir_unix/Internet Explorer/iexplore.exe" ] - then - echo "You have an old wineprefix without iexplore.exe. Will create a fake now" - if [ ! -d "$programfilesdir_unix/Internet Explorer/iexplore.exe" ] - then - try mkdir "$programfilesdir_unix/Internet Explorer"; - fi - try cp -f "$WINDIR/system32/shdocvw.dll" "$programfilesdir_unix/Internet Explorer/iexplore.exe" - fi } #---------------------------------------------------------------- load_firefox() { - download . "http://releases.mozilla.org//pub/mozilla.org/firefox/releases/3.6.3/win32/en-US/Firefox%20Setup%203.6.3.exe" d9b028293fe56ff32f2c596fe9f2841100e701b6 "Firefox Setup 3.6.3.exe" + download . "http://releases.mozilla.org//pub/mozilla.org/firefox/releases/3.6.10/win32/en-US/Firefox%20Setup%203.6.10.exe" b1be5982250d1f3009d597d58b7e06009d716cee "Firefox Setup 3.6.10.exe" if [ "$WINETRICKS_QUIET"x = ""x ] then - try $WINE "$WINETRICKS_CACHE"/"Firefox Setup 3.6.3.exe" + try $WINE "$WINETRICKS_CACHE"/"Firefox Setup 3.6.10.exe" else - try $WINE "$WINETRICKS_CACHE"/"Firefox Setup 3.6.3.exe" -ms + try $WINE "$WINETRICKS_CACHE"/"Firefox Setup 3.6.10.exe" -ms fi } @@ -1683,9 +1748,15 @@ load_flash() { # 2009-12-09: sha1sum f4ec0e95099e354fd01cd3bb27c202f54932dc70 # 2010-02-20: sha1sum e05ca1999e820b3fa2ca16fc27bc65183d275681 # 2010-03-15: sha1sum 901b53ebe26c62c0bd7fc7dc400552ce335685bb - - download . http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_ax.exe 901b53ebe26c62c0bd7fc7dc400552ce335685bb - try $WINE "$WINETRICKS_CACHE"/install_flash_player_ax.exe $WINETRICKS_S + # 2010-06-24: sha1sum 6de519569137ec2ba3a4eed59f4052c4d944869c + # 2010-08-11: sha1sum bd3a91fe450a800dbbc8d070159dc0a599043652 + download . http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_ax.exe bd3a91fe450a800dbbc8d070159dc0a599043652 + if [ $WINETRICKS_QUIET ] + then + try $WINE "$WINETRICKS_CACHE"/install_flash_player_ax.exe /install + else + try $WINE "$WINETRICKS_CACHE"/install_flash_player_ax.exe + fi # Mozilla / Firefox plugin # 2008-07-22: sha1sum 1e6f7627784a5b791e99ae9ad63133dc11c7940b @@ -1695,9 +1766,15 @@ load_flash() { # 2009-12-09: sha1sum ccb4811b1cc26721c4abb2e5a080868acdee7b87 # 2010-02-20: sha1sum f1df1ab84b61e7f2c3eea0a959d2115dd001816b # 2010-03-16: sha1sum e2fe55927c4068b0a07636742814682c0a2aa0fe - - download . http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player.exe e2fe55927c4068b0a07636742814682c0a2aa0fe - try $WINE "$WINETRICKS_CACHE"/install_flash_player.exe $WINETRICKS_S + # 2010-06-24: sha1sum a419339ada03076ea0a197b28011b87055c45478 + # 2010-08-11: sha1sum cb011ab4c74d222c8ddb48171a8aa3b5380f8d5a + download . http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player.exe cb011ab4c74d222c8ddb48171a8aa3b5380f8d5a + if [ $WINETRICKS_QUIET ] + then + try $WINE "$WINETRICKS_CACHE"/install_flash_player.exe /install + else + try $WINE "$WINETRICKS_CACHE"/install_flash_player.exe + fi } #---------------------------------------------------------------- @@ -1836,12 +1913,18 @@ load_gecko() { GECKO_VERSION=0.9.1 GECKO_SHA1SUM=9a49fc691740596517e381b47096a4bdf19a87d8 ;; - *) + wine-1.1.2[789]*|wine-1.1.[34]*|wine-1.2*|wine-1.3|wine-1.3.[01]|wine-1.3.[0]-*) GECKO_DIR="$WINDIR/system32" GECKO_VERSION=1.0.0 GECKO_ARCH=-x86 GECKO_SHA1SUM=afa22c52bca4ca77dcb9edb3c9936eb23793de01 ;; + *) + GECKO_DIR="$WINDIR/system32" + GECKO_VERSION=1.1.0 + GECKO_ARCH=-x86 + GECKO_SHA1SUM=1b6c637207b6f032ae8a52841db9659433482714 + ;; esac # If this is just a dependency check, don't re-install @@ -1851,7 +1934,8 @@ load_gecko() { return fi - WINEDIR="`dirname $WINE`" + THEWINE=`which $WINE` + WINEDIR="`dirname $THEWINE`" GECKOCAB="wine_gecko-$GECKO_VERSION$GECKO_ARCH.cab" for candidate in "$WINEDIR/../share/wine/gecko/$GECKOCAB" "$WINEDIR/../gecko/$GECKOCAB" @@ -1919,25 +2003,35 @@ load_gecko_dbg() { wine-1.1.1[234]*) GECKO_DIR="$WINDIR" GECKO_VERSION=0.9.0 + GECKO_EXTENSION=cab GECKO_SHA1SUM=23e354a82d7b7e61a6abe0384cc44669fbf92f86 ;; wine-1.1.1[56789]*|wine-1.1.2[0123456]*) GECKO_DIR="$WINDIR" GECKO_VERSION=0.9.1 + GECKO_EXTENSION=cab GECKO_SHA1SUM=a9b58d3330f8c78524fe4683f348302bfce96ff4 ;; - *) + wine-1.1.2[789]*|wine-1.1.[34]*|wine-1.2*|wine-1.3|wine-1.3.[01]|wine-1.3.[01]-*) GECKO_DIR="$WINDIR/system32" GECKO_VERSION=1.0.0 GECKO_ARCH=-x86 + GECKO_EXTENSION=cab GECKO_SHA1SUM=2de16b443826295f646cd5d54313ca421fd71210 ;; + *) + GECKO_DIR="$WINDIR/system32" + GECKO_VERSION=1.1.0 + GECKO_ARCH=-x86 + GECKO_EXTENSION=tar.bz2 + GECKO_SHA1SUM=647a488b306f3865527ce03df3c16c06afce1677 + ;; esac - if test ! -f "$WINETRICKS_CACHE"/wine_gecko-$GECKO_VERSION$GECKO_ARCH-dbg.cab + if test ! -f "$WINETRICKS_CACHE"/wine_gecko-$GECKO_VERSION$GECKO_ARCH-dbg.$GECKO_EXTENSION then # FIXME: busted if using curl! - download . "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH-dbg.cab" $GECKO_SHA1SUM wine_gecko-$GECKO_VERSION$GECKO_ARCH-dbg.cab + download . "http://downloads.sourceforge.net/wine/wine_gecko-$GECKO_VERSION$GECKO_ARCH-dbg.$GECKO_EXTENSION" $GECKO_SHA1SUM wine_gecko-$GECKO_VERSION$GECKO_ARCH-dbg.$GECKO_EXTENSION fi cat > "$WINETRICKS_TMP"/geckopath.reg <<_EOF_ @@ -1947,17 +2041,34 @@ REGEDIT4 _EOF_ printf '"GeckoPath"="' >>"$WINETRICKS_TMP"/geckopath.reg - if [ ! "$GECKO_VERSION" = "1.0.0" ] - then - printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' | sed "s/\\\\/\\\\\\\\/g" >>"$WINETRICKS_TMP"/geckopath.reg - else - printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' | sed "s/\\\\/\\\\\\\\/g" >>"$WINETRICKS_TMP"/geckopath.reg - fi + case $GECKO_VERSION in + 0.*) + printf 'c:\\windows\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' | + sed "s/\\\\/\\\\\\\\/g" >> "$WINETRICKS_TMP"/geckopath.reg + ;; + 1.*) + printf 'c:\\windows\\system32\\gecko\\'$GECKO_VERSION'\\wine_gecko\\"' | + sed "s/\\\\/\\\\\\\\/g" >> "$WINETRICKS_TMP"/geckopath.reg + ;; + esac # extract the files mkdir -p "$GECKO_DIR/gecko/$GECKO_VERSION" cd "$GECKO_DIR/gecko/$GECKO_VERSION" - try_cabextract $WINETRICKS_UNIXQUIET "$WINETRICKS_CACHE"/wine_gecko-$GECKO_VERSION$GECKO_ARCH-dbg.cab + if [ "$GECKO_EXTENSION" = "cab" ] + then + try_cabextract $WINETRICKS_UNIXQUIET "$WINETRICKS_CACHE"/wine_gecko-$GECKO_VERSION$GECKO_ARCH-dbg.cab + elif [ "$GECKO_EXTENSION" = "tar.bz2" ] + then + bunzip2 -cd "$WINETRICKS_CACHE"/wine_gecko-$GECKO_VERSION$GECKO_ARCH-dbg.tar.bz2 | tar -xf - + if test $? -ne 0 + then + die Gecko debug redistributable extraction failed + fi + else + die unrecognized Gecko debug redistributable extension + fi + cd "$olddir" # set install-path @@ -1985,6 +2096,26 @@ load_gdiplus() { #---------------------------------------------------------------- +load_gfw() { + # http://www.microsoft.com/games/en-us/live/pages/livejoin.aspx + download . http://download.microsoft.com/download/5/5/8/55846E20-4A46-4EF8-B272-7F988BC9090A/gfwlivesetupmin.exe 6f9e0ba052c68c8b51bb0e3ce6024d0e1c7b20b2 + + # FIXME: Depends on .Net 20, but is it really needed? For now, skip it. + try $WINE "$WINETRICKS_CACHE"/gfwlivesetupmin.exe /nodotnet $WINETRICKS_QUIET + + # Now get msasn1.dll, which xlive.dll depends on: + # http://www.microsoft.com/downloads/details.aspx?FamilyID=1001AAF1-749F-49F4-8010-297BD6CA33A0&displaylang=en + # FIXME: This is a huge download for a single dll. + download . http://download.microsoft.com/download/E/6/A/E6A04295-D2A8-40D0-A0C5-241BFECD095E/W2KSP4_EN.EXE fadea6d94a014b039839fecc6e6a11c20afa4fa8 + cd "$WINETRICKS_TMP" + try_cabextract "$WINETRICKS_CACHE"/W2KSP4_EN.EXE i386/msasn1.dl_ + try cp msasn1.dll "$WINDIR"/system32 + try rm -rf i386 + cd "$olddir" +} + +#---------------------------------------------------------------- + load_glsl_disable() { echo "Disabling GLSL" cat > "$WINETRICKS_TMP"/disableglsl.reg <<_EOF_ @@ -2013,6 +2144,15 @@ _EOF_ #---------------------------------------------------------------- +load_glut() { + download . http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip fb4731885c05b3cf2c79e85aabe8fc9949616ef4 + try_unzip -o $WINETRICKS_UNIXQUIET -d "$DRIVE_C" "$WINETRICKS_CACHE"/glut-3.7.6-bin.zip + try cp "$DRIVE_C"/glut-3.7.6-bin/glut32.dll "$WINDIR"/system32 + warn "If you want to compile glut programs, add c:/glut-3.7.6-bin to LIB and INCLUDE" +} + +#---------------------------------------------------------------- + load_hosts() { # Create fake system32\drivers\etc\hosts and system32\drivers\etc\services files. # The hosts file is used to map network names to IP addresses without DNS. @@ -2057,7 +2197,10 @@ load_ie6() { load_msls31 # Unregister Wine IE - try $WINE iexplore -unregserver + if [ ! -f "$WINDIR"/system32/plugin.ocx ] + then + try $WINE iexplore -unregserver + fi # Change the override to the native so we are sure we use and register them override_dlls native,builtin iexplore.exe itircl itss jscript mlang mshtml msimtf shdoclc shdocvw shlwapi urlmon @@ -2128,8 +2271,11 @@ load_ie6() { load_ie7() { # Unregister Wine IE - try $WINE iexplore -unregserver - + if [ ! -f "$WINDIR"/system32/plugin.ocx ] + then + try $WINE iexplore -unregserver + fi + # Change the override to the native so we are sure we use and register them override_dlls native,builtin iexplore.exe itircl itss jscript mshtml msimtf shdoclc shdocvw shlwapi urlmon xmllite @@ -2189,6 +2335,79 @@ load_ie7() { #---------------------------------------------------------------- +load_ie8() { + # Unregister Wine IE + if [ ! -f "$WINDIR"/system32/plugin.ocx ] + then + try $WINE iexplore -unregserver + fi + + load_msls31 + + # Change the override to the native so we are sure we use and register them + override_dlls native,builtin iexplore.exe itircl itss jscript msctf mshtml shdoclc shdocvw shlwapi urlmon xmllite + + # Bundled updspapi cannot work on wine + override_dlls builtin updspapi + + # Remove the fake dlls from the existing WINEPREFIX + for dll in browseui.dll inseng.dll itircl itss jscript msctf mshtml shdoclc shdocvw shlwapi urlmon + do + test -f "$WINDIR"/system32/$dll.dll && + mv "$WINDIR"/system32/$dll.dll "$WINDIR"/system32/$dll.dll.bak + done + + # See http://bugs.winehq.org/show_bug.cgi?id=16013 + # Find instructions to create this file in dlls/wintrust/tests/crypt.c + download . http://winezeug.googlecode.com/svn/trunk/winetricks_files/winetest.cat ac8f50dd54d011f3bb1dd79240dae9378748449f + + # Put a dummy catalog file in place + mkdir -p "$WINDIR"/system32/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295ee\} + try cp -f "$WINETRICKS_CACHE"/winetest.cat "$WINDIR"/system32/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295ee\}/oem0.cat + + # FIXME: According to http://www.wine-reviews.net/wine-reviews/microsoft/internet-explorer-8-on-linux-with-wine.html + # may also need native msctf, msimtf, and uxtheme + + # Install + download . http://download.microsoft.com/download/C/C/0/CC0BD555-33DD-411E-936B-73AC6F95AE11/IE8-WindowsXP-x86-ENU.exe e489483e5001f95da04e1ebf3c664173baef3e26 + if [ $WINETRICKS_QUIET ] + then + # FIXME: There's an option for /updates-noupdates to disable checking for updates, but that + # forces the install to fail on Wine. Not sure if it's an IE8 or Wine bug... + $WINE "$WINETRICKS_CACHE"/IE8-WindowsXP-x86-ENU.exe /quiet /forcerestart + else + $WINE "$WINETRICKS_CACHE"/IE8-WindowsXP-x86-ENU.exe + fi + + # Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed + # FIXME: whittle down this list + cd "$WINDIR"/system32/ + for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \ + dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \ + imgutil.dll inetcomm.dll isetup.dll jscript.dll laprxy.dll \ + mlang.dll msctf.dll mshtml.dll mshtmled.dll msi.dll msimtf.dll msident.dll \ + msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \ + ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \ + rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \ + shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \ + wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \ + plugin.ocx proctexe.ocx tdc.ocx uxtheme.dll webcheck.dll wshom.ocx + do + $WINE regsvr32 /i $i > /dev/null 2>&1 + done + + # Seeing is believing + if [ "$WINETRICKS_QUIET" = "" ] + then + warn "Starting ie8. To start it later, use the command $WINE '${programfilesdir_win}\\\\Internet Explorer\\\\iexplore'" + $WINE "${programfilesdir_win}\\Internet Explorer\\iexplore" http://www.winehq.org/ > /dev/null 2>&1 & + else + warn "To start ie8, use the command $WINE '${programfilesdir_win}\\\\Internet Explorer\\\\iexplore'. It doesn't work well yet though, see: http://bugs.winehq.org/show_bug.cgi?id=12433" + fi +} + +#---------------------------------------------------------------- + load_jet40() { # http://support.microsoft.com/kb/239114 # See also http://bugs.winehq.org/show_bug.cgi?id=6085 @@ -2230,6 +2449,14 @@ load_liberation() { #---------------------------------------------------------------- +load_lucida() { + download . ftp://ftp.microsoft.com/bussys/winnt/winnt-public/fixes/usa/NT40TSE/hotfixes-postSP3/Euro-fix/eurofixi.exe 64c47ad92265f6f10b0fd909a703d4fd1b05b2d5 + try_cabextract -d "$winefontsdir" -L -F 'lucon.ttf' "$WINETRICKS_CACHE"/eurofixi.exe + register_font lucon.ttf "Lucida Console" +} + +#---------------------------------------------------------------- + set_native_mdac() { # Set those overrides globally so user programs get MDAC's odbc # instead of wine's unixodbc @@ -2303,16 +2530,16 @@ load_mingw_min() { fi # See http://mingw.org/wiki/Getting_Started - download . http://sourceforge.net/projects/mingw/files/GNU%20Binutils/binutils-2.19.1-mingw32-bin.tar.gz 1ab72f3af3fe96d08c3c9bff60c47913704d5774 - download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-core-4.4.0-mingw32-bin.tar.gz b88b8f3644ca0cdf2c41cd03f820bf7823a8eabb - download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gcc-core-4.4.0-mingw32-dll.tar.gz 0372ecf4caf75d0d9fe4a7739ca234f1a3de831b - download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/gmp-4.2.4-mingw32-dll.tar.gz a14dd928382f093f67cb3cd57c140625b1b265bb - download . http://sourceforge.net/projects/mingw/files/MinGW%20libiconv/libiconv-1.13.1-1-mingw32-dll-2.tar.lzma 5b60ce4d9ec9cf91aee437915a2469b915e1235f - download . http://sourceforge.net/projects/mingw/files/MinGW%20Runtime/mingwrt-3.16-mingw32-dev.tar.gz 770ff5001989d8a9a1ec4f3621d8f264a24e178f - download . http://sourceforge.net/projects/mingw/files/MinGW%20Runtime/mingwrt-3.16-mingw32-dll.tar.gz b8032e97c79e16a3c540043f0f39821df1531ae9 - download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/mpfr-2.4.1-mingw32-dll.tar.gz 43b7ecb2c0c785c44321ff6c4376f51375713a7b - download . http://sourceforge.net/projects/mingw/files/GCC%20Version%204/pthreads-w32-2.8.0-mingw32-dll.tar.gz f922f8c0c42921fd4482a3d2e6f779d6384040c1 - download . http://sourceforge.net/projects/mingw/files/MinGW%20API%20for%20MS-Windows/w32api-3.13-mingw32-dev.tar.gz 5eb7d8ec0fe032a92bea3a2c8282a78df2f1793c + download . http://sourceforge.net/projects/mingw/files/binutils-2.19.1-mingw32-bin.tar.gz 1ab72f3af3fe96d08c3c9bff60c47913704d5774 + download . http://sourceforge.net/projects/mingw/files/gcc-core-4.4.0-mingw32-bin.tar.gz b88b8f3644ca0cdf2c41cd03f820bf7823a8eabb + download . http://sourceforge.net/projects/mingw/files/gcc-core-4.4.0-mingw32-dll.tar.gz 0372ecf4caf75d0d9fe4a7739ca234f1a3de831b + download . http://sourceforge.net/projects/mingw/files/gmp-4.2.4-mingw32-dll.tar.gz a14dd928382f093f67cb3cd57c140625b1b265bb + download . http://sourceforge.net/projects/mingw/files/libiconv-1.13.1-1-mingw32-dll-2.tar.lzma 5b60ce4d9ec9cf91aee437915a2469b915e1235f + download . http://sourceforge.net/projects/mingw/files/mingwrt-3.16-mingw32-dev.tar.gz 770ff5001989d8a9a1ec4f3621d8f264a24e178f + download . http://sourceforge.net/projects/mingw/files/mingwrt-3.16-mingw32-dll.tar.gz b8032e97c79e16a3c540043f0f39821df1531ae9 + download . http://sourceforge.net/projects/mingw/files/mpfr-2.4.1-mingw32-dll.tar.gz 43b7ecb2c0c785c44321ff6c4376f51375713a7b + download . http://sourceforge.net/projects/mingw/files/pthreads-w32-2.8.0-mingw32-dll.tar.gz f922f8c0c42921fd4482a3d2e6f779d6384040c1 + download . http://sourceforge.net/projects/mingw/files/w32api-3.13-mingw32-dev.tar.gz 5eb7d8ec0fe032a92bea3a2c8282a78df2f1793c mkdir "$DRIVE_C"/MinGW cd "$DRIVE_C"/MinGW @@ -2336,7 +2563,7 @@ load_mingw_gdb() { # See http://mingw.org/wiki/Getting_Started load_mingw_min - download . $SOURCEFORGE/mingw/GNU%20Source-Level%20Debugger/GDB-7.0/gdb-7.0-2-mingw32-bin.tar.gz a560cb0e3980d0ed853994c84038260212f58925 + download . $SOURCEFORGE/mingw/GNU%20Source-Level%20Debugger/gdb-7.0-2-mingw32-bin.tar.gz a560cb0e3980d0ed853994c84038260212f58925 cd "$DRIVE_C"/MinGW gzip -d -c "$WINETRICKS_CACHE"/gdb-7.0-2-mingw32-bin.tar.gz | tar x @@ -2344,75 +2571,10 @@ load_mingw_gdb() { #---------------------------------------------------------------- -load_mono20() { - # Load Mono, have it handle all .net requests - download . ftp://ftp.novell.com/pub/mono/archive/2.0.1/windows-installer/1/mono-2.0.1-gtksharp-2.10.4-win32-1.exe ccb67ac41b59522846e47d0c423836b9d334c088 - try $WINE "$WINETRICKS_CACHE"/mono-2.0.1-gtksharp-2.10.4-win32-1.exe $WINETRICKS_SILENT - - cat > "$WINETRICKS_TMP"/mono_2.0.reg <<_EOF_ -REGEDIT4 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727] -"Install"=dword:00000001 -"SP"=dword:00000001 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\policy\v2.0] -"4322"="3706-4322" -_EOF_ - try_regedit "$WINETRICKS_TMP_WIN"\\mono_2.0.reg - rm -f "$WINETRICKS_TMP"/mono_2.0.reg -} - -#---------------------------------------------------------------- - -load_mono22() { - # Load Mono, have it handle all .net requests - download . ftp://ftp.novell.com/pub/mono/archive/2.2/windows-installer/5/mono-2.2-gtksharp-2.12.7-win32-5.exe be977dfa9c49deea1be02ba4a2228e343f1e5840 - try $WINE "$WINETRICKS_CACHE"/mono-2.2-gtksharp-2.12.7-win32-5.exe $WINETRICKS_SILENT - - # FIXME: what should this be for mono 2.2? - cat > "$WINETRICKS_TMP"/mono_2.0.reg <<_EOF_ -REGEDIT4 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727] -"Install"=dword:00000001 -"SP"=dword:00000001 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\policy\v2.0] -"4322"="3706-4322" -_EOF_ - try_regedit "$WINETRICKS_TMP_WIN"\\mono_2.0.reg - rm -f "$WINETRICKS_TMP"/mono_2.0.reg -} - -#---------------------------------------------------------------- - -load_mono24() { - # Load Mono, have it handle all .net requests - download . http://ftp.novell.com/pub/mono/archive/2.4.2.3/windows-installer/3/mono-2.4.2.3-gtksharp-2.12.9-win32-3.exe 4f0d051bcedd7668e63c12903310be0ea38f9654 - try $WINE "$WINETRICKS_CACHE"/mono-2.4.2.3-gtksharp-2.12.9-win32-3.exe $WINETRICKS_SILENT - - # FIXME: what should this be for mono 2.4? - cat > "$WINETRICKS_TMP"/mono_2.0.reg <<_EOF_ -REGEDIT4 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727] -"Install"=dword:00000001 -"SP"=dword:00000001 - -[HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\policy\v2.0] -"4322"="3706-4322" -_EOF_ - try_regedit "$WINETRICKS_TMP_WIN"\\mono_2.0.reg - rm -f "$WINETRICKS_TMP"/mono_2.0.reg -} - -#---------------------------------------------------------------- - load_mono26() { # Load Mono, have it handle all .net requests - download . http://ftp.novell.com/pub/mono/archive/2.6.4/windows-installer/3/mono-2.6.4-gtksharp-2.12.10-win32-3.exe 08be379d1fe34c9ae1d389e60647506950cb07ba - try $WINE "$WINETRICKS_CACHE"/mono-2.6.4-gtksharp-2.12.10-win32-3.exe $WINETRICKS_SILENT + download . http://ftp.novell.com/pub/mono/archive/2.6.7/windows-installer/2/mono-2.6.7-gtksharp-2.12.10-win32-2.exe c31c06063aa82006dff2f8df22dcc6ba046afbc2 + try $WINE "$WINETRICKS_CACHE"/mono-2.6.7-gtksharp-2.12.10-win32-2.exe $WINETRICKS_SILENT # FIXME: what should this be for mono 2.6? cat > "$WINETRICKS_TMP"/mono_2.0.reg <<_EOF_ @@ -2581,18 +2743,14 @@ load_msxml6() { load_ogg() { # flac, ogg, speex, vorbis, ogm source, ogg source - download . http://cross-lfs.org/~mlankhorst/oggcodecs_0.81.2.exe c9d10a8f1b65b9f3824e227333d66247e14fad4c - #try $WINE "$WINETRICKS_CACHE"/oggcodecs_0.81.2.exe $WINETRICKS_QUIET - # oh, and the new schroedinger direct show filter, too # see following URLs for more info + # http://xiph.org/dshow/ # http://www.diracvideo.org/ # http://cross-lfs.org/~mlankhorst/direct-schro.txt # http://www.diracvideo.org/git?p=direct-schro.git;a=summary - # Requires wine-1.1.1 - download . http://cross-lfs.org/~mlankhorst/direct-schro.dll - try cp "$WINETRICKS_CACHE"/direct-schro.dll "$WINDIR"/system32/direct-schro.dll - # This is currently broken. Maarten's not sure why. - try $WINE regsvr32 direct-schro.dll + + download . http://downloads.xiph.org/releases/oggdsf/opencodecs_0.84.17338.exe 6151ab79e6ae246208cdf707e080f01c93d95deb + try $WINE "$WINETRICKS_CACHE"/opencodecs_0.84.17338.exe $WINETRICKS_S } #---------------------------------------------------------------- @@ -2871,6 +3029,45 @@ load_richtx32() { try $WINE regsvr32 RichTx32.ocx } +#---------------------------------------------------------------- + +load_secur32(){ + # http://www.microsoft.com/downloads/details.aspx?familyid=c4e408d7-6716-4a12-ad3a-8029667f5c84 + download . http://download.microsoft.com/download/6/9/5/69501788-B62F-44D8-933F-B6FAA576CA87/Windows2000-KB959426-x86-ENU.EXE bf930a4d2982165a0793465bb255d494ba5b4cf7 + try_cabextract "$WINETRICKS_CACHE"/Windows2000-KB959426-x86-ENU.EXE -d "$WINDIR"/system32 -F secur32.dll + override_dlls native,builtin secur32 +} + +#---------------------------------------------------------------- + +load_safari() { + + download . http://appldnld.apple.com.edgesuite.net/content.info.apple.com/Safari5/061-7138.20100607.Y7U87/SafariSetup.exe e56d5d79d9cfbb85ac46ac78aa497d7f3d8dbc3d + cd "$WINETRICKS_CACHE" + # Workaround http://bugs.winehq.org/show_bug.cgi?id=21146 + # FIXME: is this localized? + try mkdir -p "$DRIVE_C/users/$USER/Application Data/Apple Computer/Preferences" + cat > "$DRIVE_C/users/$USER/Application Data/Apple Computer/Preferences/com.apple.Safari.plist" <<_EOF_ + + + + + LastDisplayedWelcomePageVersionString + 4.0 + + +_EOF_ + + if test "$WINETRICKS_QUIET" + then + warn "Safari's silent install is broken under wine. See http://bugs.winehq.org/show_bug.cgi?id=23493. You should do a regular install if you want to use Safari." + try $WINE SafariSetup.exe /qn + else + try $WINE SafariSetup.exe + fi +} + + #---------------------------------------------------------------- load_shockwave() { @@ -2882,8 +3079,9 @@ load_shockwave() { # 2009-12-13 sha1sum: d35649883bf13cb1a86f5650e1050d15533ac0f4 # 2010-01-23 sha1sum: 4a837d238c28c5f345d73f105711f20c6d059273 # 2010-05-15 sha1sum: bdce02afc82233801e84137e78c2c5fe574db253 + # 2010-09-02 sha1sum: fed20eccc29fec2f64162b7265343514d43884bc - download . http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/sw_lic_full_installer.msi bdce02afc82233801e84137e78c2c5fe574db253 + download . http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/sw_lic_full_installer.msi fed20eccc29fec2f64162b7265343514d43884bc try $WINE msiexec /i "$WINETRICKS_CACHE"/sw_lic_full_installer.msi $WINETRICKS_QUIET } @@ -2892,7 +3090,11 @@ load_shockwave() { load_steam() { download . http://storefront.steampowered.com/download/SteamInstall.msi a0ca8791b7b2e96665ee059e03eebbfb3d95be55 try $WINE msiexec /i "$WINETRICKS_CACHE"/SteamInstall.msi $WINETRICKS_QUIET - warn "Before running Steam, make sure you have corefonts installed, or it may crash; see wine bug 22751" + if ! test -f "$WINDIR/Fonts/Times.TTF" + then + warn "Installing corefonts to prvent a Steam crash; see wine bug 22751" + load_corefonts + fi warn "Once Steam is running, disable player notifications and in-game chat in Settings, or games will crash on launch; see wine bug 22053" } @@ -3156,6 +3358,18 @@ load_vcrun2008() { #---------------------------------------------------------------- +load_vcrun2010() { + # Load the Visual C++ 2010 runtime libraries + # See http://www.microsoft.com/downloads/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84 + download vcrun2010 http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe 372d9c1670343d3fb252209ba210d4dc4d67d358 + override_dlls native,builtin msvcr100 + # Workaround Wine bug http://bugs.winehq.org/show_bug.cgi?id=23427 + load_msxml3 + try $WINE "$WINETRICKS_CACHE"/vcrun2010/vcredist_x86.exe $WINETRICKS_QUIET +} + +#---------------------------------------------------------------- + load_vjrun20() { load_dotnet20 # See http://www.microsoft.com/downloads/details.aspx?FamilyId=E9D87F37-2ADC-4C32-95B3-B5E3A21BAB2C @@ -3581,8 +3795,8 @@ load_vc2008sp1() #---------------------------------------------------------------- load_vlc() { - download . http://www.videolan.org/mirror-geo-redirect.php?file=vlc/0.8.6f/win32/vlc-0.8.6f-win32.exe b83558e4232c47a385dbc93ebdc2e6b942fbcfbf - try $WINE "$WINETRICKS_CACHE"/vlc-0.8.6f-win32.exe $WINETRICKS_S + download . $SOURCEFORGE/vlc/vlc-1.1.0-win32.exe 501b6cb12d4916ed11ec9dac9e394add9227b3be + try $WINE "$WINETRICKS_CACHE"/vlc-1.1.0-win32.exe $WINETRICKS_S } #---------------------------------------------------------------- @@ -3600,6 +3814,16 @@ load_windowscodecs() { try $WINE "$WINETRICKS_CACHE"/wic_x86_enu.exe /passive } + +#---------------------------------------------------------------- + +load_winhttp() { + # See https://www.microsoft.com/downloads/en/details.aspx?FamilyID=3ee866a0-3a09-4fdf-8bdb-c906850ab9f2 + download . http://download.microsoft.com/download/5/d/8/5d802926-6bab-45fa-b96e-bee15413523b/Windows2000-KB842773-x86-ENU.EXE e676d47e065a314bbf1d15b096a67aede6b0539a + try_cabextract -d "$WINDIR"/system32/ -L -F winhttp.dll "$WINETRICKS_CACHE"/Windows2000-KB842773-x86-ENU.EXE + override_dlls native,builtin winhttp +} + #---------------------------------------------------------------- load_wininet() { @@ -3627,7 +3851,7 @@ load_wmp9() { # Not really expected to work well yet; see # http://appdb.winehq.org/appview.php?versionId=1449 - load_wsh56 + load_wsh57 set_winver win2k @@ -3655,7 +3879,7 @@ load_wmp9() { load_wmp10() { # See http://appdb.winehq.org/appview.php?iVersionId=3212 - load_wsh56 + load_wsh57 # See also http://www.microsoft.com/windows/windowsmedia/player/10 download . http://download.microsoft.com/download/1/2/A/12A31F29-2FA9-4F50-B95D-E45EF7013F87/MP10Setup.exe 69862273a5d9d97b4a2e5a3bd93898d259e86657 @@ -3694,9 +3918,9 @@ load_wenquanyi() { load_wsh57() { # If this is just a dependency check, don't re-install - if test $PACKAGE != wsh56 && test -f "$WINDIR"/system32/wscript.exe + if test $PACKAGE != wsh56 && test $PACKAGE != wsh57 && test -f "$WINDIR"/system32/scrrun.dll then - echo "prerequisite wsh56 already installed, skipping" + echo "prerequisite wsh57 already installed, skipping" return fi @@ -3712,14 +3936,6 @@ load_wsh57() { #---------------------------------------------------------------- -load_wsh56() { - - load_wsh57 - -} - -#---------------------------------------------------------------- - load_wsh56js() { # This installs jscript 5.6 (but not vbscript) # See also http://www.microsoft.com/downloads/details.aspx?FamilyID=16dd21a1-c4ee-4eca-8b80-7bd1dfefb4f8&DisplayLang=en @@ -3784,7 +4000,7 @@ esac case "$1" in -V|--version) - echo "Winetricks version $VERSION. (C) 2007-2009 Dan Kegel et al. LGPL." + echo "Winetricks version $VERSION. (C) 2007-2010 Dan Kegel et al. LGPL." exit 0 ;; esac @@ -3889,18 +4105,22 @@ do cmake) load_cmake;; comctl32.ocx) load_comctl32ocx;; comctl32|cc580) load_cc580;; + comdlg32.ocx) load_comdlg32ocx;; colorprofile) load_colorprofile;; controlpad|fm20) load_controlpad;; corefonts) load_corefonts;; + crypt32) load_crypt32;; cygwin) load_cygwin;; d3dx9) load_d3dx9;; + d3dx9_26) load_d3dx9_xx 26;; d3dx9_28) load_d3dx9_xx 28;; d3dx9_36) load_d3dx9_xx 36;; d3dx10) load_d3dx10;; d3dxof) load_d3dxof;; dcom98) load_dcom98;; + devenum) load_devenum;; dinput8) load_dinput8;; - dirac|dirac0.8) load_dirac08;; + dirac) load_dirac;; directmusic) load_directmusic;; directplay|dxplay|dplay) load_directplay;; directx9) DIRECTX_WINDOWS=win2k ; load_directx9;; @@ -3915,6 +4135,8 @@ do dotnet35) load_dotnet35; load_fontfix;; droid) load_droid;; dxsdk_nov2006) load_dxsdk_nov2006;; + eadm) load_eadm;; + eufonts) load_eufonts;; ffdshow) load_ffdshow;; firefox|firefox3) load_firefox;; flash) load_flash;; @@ -3926,23 +4148,24 @@ do gdiplus) load_gdiplus;; gecko) load_gecko;; gecko-dbg|geckodbg|gecko_dbg|geckodebug|gecko_debug|gecko-debug) load_gecko_dbg;; + gfw|xlive) load_gfw;; glsl-disable) load_glsl_disable;; glsl-enable) load_glsl_enable;; + glut) load_glut;; hosts) load_hosts;; ie6) load_ie6;; ie7) load_ie7;; + ie8) load_ie8;; jet40) load_jet40;; kde) load_kde;; liberation) load_liberation;; + lucida) load_lucida;; mdac25) load_mdac25;; - mdac27) load_mdac27;; + mdac26|mdac27) load_mdac27;; mdac28) load_mdac28;; mfc40) load_mfc40;; mingw|mingw-min|mingw_min) load_mingw_min;; mingw-gdb|mingw_gdb) load_mingw_gdb;; - mono19|mono20) load_mono20;; - mono22) load_mono22;; - mono24) load_mono24;; mono26) load_mono26;; mozillabuild) load_mozillabuild;; mpc) load_mpc;; @@ -3970,6 +4193,8 @@ do riched20) load_riched20;; riched30) load_riched30;; richtx32) load_richtx32;; + safari) load_safari;; + secur32) load_secur32;; shockwave) load_shockwave;; steam) load_steam;; tahoma) load_tahoma;; @@ -3996,28 +4221,29 @@ do vcrun2003) load_vcrun2003;; vcrun2005|vcrun2005sp1) load_vcrun2005;; vcrun2008|vcrun2008sp1) load_vcrun2008;; + vcrun2010) load_vcrun2010;; vjrun20) load_vjrun20;; vlc) load_vlc;; wenquanyi) load_wenquanyi;; windowscodecs|wic) load_windowscodecs;; + winhttp) load_winhttp;; wininet) load_wininet;; wme9) load_wme9;; wmp9) load_wmp9;; wmp10) load_wmp10;; wsh56|wsh57) load_wsh57;; - wsh56js) load_wsh56js;; + jscript|wsh56js) load_wsh56js;; wsh56vb) load_wsh56vb;; - xact|xactengine|x3daudio) load_xact;; + xact|xactengine|x3daudio|xapofx) load_xact;; xvid) load_xvid;; allcodecs|allvcodecs) load_vcrun6; load_ffdshow; load_xvid;; - allfonts) load_corefonts; load_tahoma; load_liberation; load_droid; load_wenquanyi;; + allfonts) load_corefonts; load_droid; load_eufonts; load_liberation; load_lucida; load_tahoma; load_wenquanyi;; alldlls=builtin) override_all_dlls;; alldlls=default) override_no_dlls;; ddr=gdi) set_ddr gdi;; ddr=opengl) set_ddr opengl;; dsoundbug9612) load_dsoundbug9612;; - fakeie6) set_fakeie6;; forcemono|force_mono) load_forcemono;; heapcheck) set_heapcheck;; mmdevapi=builtin) set_mmdevapi builtin ;; @@ -4054,7 +4280,7 @@ do videomemorysize=default) set_videomemorysize default;; volnum) volnum;; mwo=force)set_mwo force;; - mwo=disabled) set_mwo disabled;; + mwo=disable|mwo=disabled) set_mwo disable;; mwo=enabled) set_mwo enabled;; npm-repack) npm_repack;; psm=on) set_psm enabled;; @@ -4067,6 +4293,7 @@ do winver=winxp|winxp) set_winver winxp;; winver=vista|vista) set_winver vista;; winver=) unset_winver;; + *=disabled) arg=`echo $PACKAGE | sed 's/=.*//'`; override_dlls disabled $arg ;; *) echo Unknown arg $1; usage ; exit 1;; esac # Provide a bit of feedback diff --git a/wisotool b/wisotool index c526ea6..92eb093 100644 --- a/wisotool +++ b/wisotool @@ -12,7 +12,7 @@ #---- Constants ------------------------------------------------- # Name of this version of wisotool (YYYYMMDD) -VERSION=20100618 +VERSION=20100731 early_wine() { @@ -28,12 +28,15 @@ case "$OS" in /) HOME="" ;; esac WINE="" + WINESERVER=true WINEPREFIX="${WINEPREFIX:-$HOME/.wine}" DRIVE_C="C:/" XXXPATH=cygpath ;; *) WINE=${WINE:-wine} + WINEVERSION=`$WINE --version` + WINESERVER=${WINESERVER:-wineserver} WINEPREFIX="${WINEPREFIX:-$HOME/.wine}" DRIVE_C="$WINEPREFIX/dosdevices/c:" XXXPATH="early_wine winepath" @@ -63,8 +66,8 @@ rm -rf "$WISOTOOL_TMP" mkdir -p "$WISOTOOL_TMP" # Handle case where z: doesn't exist -if test "$WISOTOOL_CACHE_WIN" = "" -then +case "$WISOTOOL_CACHE_WIN" in +""|*\?\\unix*) # WISOTOOL_CACHE isn't accessible via a drive letter mapping, so make one, # but be sure to clean it up later. for letter in y x w v u t s r q @@ -76,7 +79,8 @@ then break fi done -fi + ;; +esac USERNAME=${USERNAME:-$LOGNAME} @@ -304,6 +308,7 @@ cabextract() { # At some point, make the return value controllable by a global # commandline option so we can see if we still need the workaround. +# Usage: workaround_wine_bug bugnumber [good-wineversion-shell-pattern] workaround_wine_bug() { if test "$WINE" = "" @@ -311,6 +316,19 @@ workaround_wine_bug() echo No need to work around wine bug $1 on windows return 1 fi + echo "Checking $WINEVERSION against $2" + if test "$2" != "" + then + # Using shell patterns in a variable with case is tricky, need to use eval + checkcode=" + case $WINEVERSION in + $2) echo No need to work around wine bug $1 in wine $WINEVERSION + return 1 + ;; + esac + " + eval "$checkcode" + fi case $1 in "$WISOTOOL_BLACKLIST") echo wine bug $1 workaround blacklisted, skipping @@ -489,6 +507,13 @@ iso_mount() my_img="$1" iso_umount + # FIXME: Should we check somehow that the user put in the right disk? + if [ ! -f "$my_img" ] + then + warn "You don't seem to have an iso in $WISOTOOL_CACHE/$PACKAGE. Please insert the disk so I can prepare one for you." + load_iso dd + fi + if test "$WINE" = "" then load_vcdmount @@ -514,6 +539,7 @@ iso_mount() done else # Linux + # FIXME: use fuseiso when posible to avoid needing sudo case "$SUDO" in gksudo) try $SUDO "mkdir -p $ISO_MOUNT_ROOT" @@ -698,7 +724,7 @@ load_iso() { pid=$! ;; ddrescue) - if test `which ddrescue` = "" + if test "`which ddrescue`" = "" then die "Please install ddrescue first." fi @@ -755,6 +781,16 @@ load_autohotkey() #---------------------------------------------------------------- +load_gecko() +{ + if ! test -f "$windir/system32/gecko/1.0.0/wine_gecko/nspr4.dll" + then + try sh "$WINETRICKS" gecko + fi +} + +#---------------------------------------------------------------- + verblist_init() { # Must call this before first call to verblist_add @@ -765,8 +801,7 @@ verblist_init() verblist_finish() { - # Must follow last call to verblist_add - file_map="$file_map esac" + : # Now a no-op } # Add a verb's description to the menu @@ -816,7 +851,7 @@ verblist_is_legal_verb() # Given a file, output the verb it belongs to map_file_to_verb() { - eval $file_map + eval "$file_map esac" } # Output a list of the verbs for which the needed files are in the cache @@ -1085,6 +1120,182 @@ __EOF__ #---------------------------------------------------------------- +verblist_add algodoo_demo "Algodoo Demo (Algoryx, 2009) [download]" Algodoo_1_7_1-Win32.exe + +load_algodoo_demo() { + load_autohotkey + download $PACKAGE http://www.algodoo.com/download/Algodoo_1_7_1-Win32.exe + + cd "$WISOTOOL_CACHE/$PACKAGE" + ahk_do " + run, Algodoo_1_7_1-Win32.exe + SetTitleMatchMode, 2 + winwait, Algodoo + send {Enter} + winwait, Algodoo, License + send {Tab}a{Space}{Enter} + winwait, Algodoo, Destination + send {Enter} + winwait, Algodoo, shortcuts + send {Enter} + winwait, Algodoo, Select Additional Tasks + send {Enter} + winwait, Algodoo, Ready to Install + send {Enter} + winwait, Algodoo, Completing + send {Space}{Tab}{Space}{Tab}{Space}{Enter} ; decline to run app or view tutorials + " + cd "$olddir" + + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Algodoo" +algodoo +__EOF__ +} + +#---------------------------------------------------------------- + +verblist_add aa3 "Americas Army 3 (U.S. Army, Ubisoft, 2009) [download]" aa3.tar + +load_aa3() { + # This verb is special. It's forked from load_steam_app(), for two reasons: + # A) the installer has an extra window to accept the EULA + # B) the game doesn't actually need Steam to run. Once it's installed with Steam, + # you can move the $steam_dir/steamapps/common/america's army 3 folder to C:\aa3 + # and it'll run fine (after installing the necessary winetricks workarounds). + # So, we'll install with Steam if the files aren't cached, then tar them up. Future + # 'installs', will unpack the tar to C:\aa3 (and winetricks/create .bat file). + + if [ ! -f "$WISOTOOL_CACHE/$PACKAGE/$PACKAGE.tar" ] + then + if [ ! "$STEAM_USER" -a ! -f "$WISOTOOL_CACHE"/STEAM_USER ] + then + die "You need to set STEAM_USER variable in your environment or put it in "$WISOTOOL_CACHE"/STEAM_USER" + elif [ ! "$STEAM_USER" -a -f "$WISOTOOL_CACHE"/STEAM_USER ] + then + STEAM_USER=`cat "$WISOTOOL_CACHE"/STEAM_USER` + fi + + if [ ! "$STEAM_PASS" -a ! -f "$WISOTOOL_CACHE"/STEAM_PASS ] + then + die "You need to set STEAM_PASS variable in your environment or put it in "$WISOTOOL_CACHE"/STEAM_PASS" + elif [ ! "$STEAM_PASS" -a -f "$WISOTOOL_CACHE"/STEAM_PASS ] + then + STEAM_PASS=`cat "$WISOTOOL_CACHE"/STEAM_PASS` + fi + + steam_dir="$programfilesdir_unix/Steam" + + load_autohotkey + test -f "$steam_dir/Steam.exe" || try sh $WINETRICKS -q steam + + app_id="13140" + game_title="America's Army 3" + game_cache_file="aa3_public_client.ncf" + game_folder="america's army 3" + + cd "$steam_dir" + sleep 5 + ahk_do " + run, Steam.exe -login $STEAM_USER $STEAM_PASS + Winwait, Steam - Updating,,60 + Loop + { + SetTitleMatchMode, Slow + IfWinExist, Steam - Updating + sleep 10000 + IfWinNotExist, Steam - Updating + break + } + sleep 30000 + run, steam://install/$app_id + + ; Info screen, disk space required, etc. + winwait, Install - $game_title + winactivate, Install - $game_title + ; FIXME: How long should this take? + sleep 10000 + send {enter} + sleep 10000 + + ; Install shortcuts? + winwait, Install - $game_title + winactivate, Install - $game_title + ; FIXME: How long should this take? + sleep 10000 + send {enter} + sleep 10000 + + ; Accept EULA? + winwait, Install - $game_title + winactivate, Install - $game_title + ; FIXME: How long should this take? + sleep 10000 + send {enter} + sleep 10000 + + ; Here, it's getting the .gcf/.ncf files. This is normally quick, but can take a long time. + ; Most finish in a few seconds, but the Total War demos takes a couple minutes. + ; So, we'll exit AHK, then wait for all the game files to be present, + ; before continuing the install. + exit + " + + # FIXME: Is this a long enough sleep? + sleep 30 + + ahk_do " + winwait, Install - $game_title + winactivate, Install - $game_title + ; FIXME: How long should this take? + sleep 10000 + send {enter} + " + + dl_log="$steam_dir/logs/download_log.txt" + while true + do + grep "SetHasAllLocalContent(true) called for $app_id" "$dl_log" && break + sleep 15 + done + + sleep 30 + $WINE Steam.exe -shutdown + mkdir -p "$WISOTOOL_CACHE/$PACKAGE" + cd "steamapps/common/$game_folder" + tar -cf "$WISOTOOL_CACHE/$PACKAGE/$PACKAGE.tar" . + cd .. + mv "$game_folder" "$DRIVE_C/aa3" + else + mkdir -p "$DRIVE_C/$PACKAGE" + cd "$DRIVE_C/$PACKAGE" + tar -xf "$WISOTOOL_CACHE/$PACKAGE/$PACKAGE.tar" + fi + +if workaround_wine_bug 17630 +then + sh "$WINETRICKS" -q d3dx10 +fi + +if workaround_wine_bug 22501 +then + sh "$WINETRICKS" -q vcrun2005 +fi + +if workaround_wine_bug 23660 +then + sh "$WINETRICKS" -q d3dx9 +fi + +cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "c:\\aa3\\Binaries" +AA3Game.exe +__EOF__ + +} + +#---------------------------------------------------------------- + verblist_add msaoe_demo "Age of Empires Demo (Microsoft, 1997) [download]" MSAoE.exe load_msaoe_demo() { @@ -1114,6 +1325,70 @@ __EOF__ #---------------------------------------------------------------- +verblist_add apb "APB: All Points Bulletin (Electronic Arts, 2010)" APB_North_America_Installer.exe + +load_apb() { + load_autohotkey + + download $PACKAGE http://rtworlds.http.internapcdn.net/rtworlds/NA/APB/BETA/INSTALLER/1.1.0.538715/APB_North_America_Installer.exe c40071616096becb72f10a2e7721ef340c48ad4e + + sh "$WINETRICKS" -q dotnet20 + + cd "$WISOTOOL_CACHE/$PACKAGE" + + if workaround_wine_bug 23527 + then + sh "$WINETRICKS" -q gdiplus + fi + + ahk_do " + SetTitleMatchMode, 2 + run, APB_North_America_Installer.exe + winwait, Installer language, Please select the language you would like the installer to run in + sleep 1000 + controlclick, Button1, Installer language, Please select the language you would like the installer to run in + winwait, APB North America v1.1.0.538715, Welcome to the APB All Points Bulletin Setup Wizard + sleep 1000 + controlclick, Button2, APB North America v1.1.0.538715, Welcome to the APB All Points Bulletin Setup Wizard + winwait, APB North America v1.1.0.538715, Please review the license terms before installing APB All Points Bulletin. + sleep 1000 + controlclick, Button4, APB North America v1.1.0.538715, Please review the license terms before installing APB All Points Bulletin. + sleep 1000 + controlclick, Button2, APB North America v1.1.0.538715, Please review the license terms before installing APB All Points Bulletin. + winwait, APB North America v1.1.0.538715, Third Party Library List + sleep 1000 + controlclick, Button5, APB North America v1.1.0.538715, Third Party Library List + sleep 1000 + controlclick, Button2, APB North America v1.1.0.538715, Third Party Library List + winwait, APB North America v1.1.0.538715, System Check + sleep 1000 + controlclick, Button2, APB North America v1.1.0.538715, System Check + winwait, APB North America v1.1.0.538715, Results of the system scan. + sleep 1000 + controlclick, Button2, APB North America v1.1.0.538715, Results of the system scan. + winwait, APB North America v1.1.0.538715, Choose the folder in which to install APB All Points Bulletin. + sleep 1000 + controlclick, Button2, APB North America v1.1.0.538715, Choose the folder in which to install APB All Points Bulletin. + winwait, APB North America v1.1.0.538715, APB All Points Bulletin will be installed in C:\Program Files\Realtime Worlds\APB North America. Is this okay? + sleep 1000 + controlclick, Button1, APB North America v1.1.0.538715, APB All Points Bulletin will be installed in C:\Program Files\Realtime Worlds\APB North America. Is this okay? + winwait, APB North America v1.1.0.538715, Choose a Start Menu folder for the APB All Points Bulletin shortcuts. + sleep 1000 + controlclick, Button2, APB North America v1.1.0.538715, Choose a Start Menu folder for the APB All Points Bulletin shortcuts. + winwait, APB North America v1.1.0.538715, Setup was completed successfully. + sleep 1000 + controlclick, Button2, APB North America v1.1.0.538715, Setup was completed successfully. + winwait, APB North America v1.1.0.538715, The APB Launcher has been installed. + sleep 1000 + controlclick, Button2, APB North America v1.1.0.538715, The APB Launcher has been installed. + ; Runs after install. However, also crashes in current (1.2-rc6) wine. For now, kill both, just in case... + process, close, APBLauncher.exe + process, close, BugReport.exe + " +} + +#---------------------------------------------------------------- + verblist_add assassinscreed "Assassins Creed (Ubisoft, 2008)" a62112860423b32bf3ea77df6f5fe0b60c772de2.iso load_assassinscreed() { @@ -1175,11 +1450,13 @@ load_avatar_demo() try sh winetricks -q vcrun2005 fi + mkdir -p "$WISOTOOL_TMP/$PACKAGE" cd "$WISOTOOL_CACHE/$PACKAGE" ahk_do " SetTitleMatchMode, 2 run, Avatar_The_Game_Demo.exe winwait, WinRAR, Install + send $WISOTOOL_TMP_WIN\\$PACKAGE controlclick, Button2 winwaitclose, WinRAR sleep 1000 @@ -1391,6 +1668,10 @@ load_bfbc2() { then warn "If you get a Securom 'No CD/DVD error', check your mount settings. See http://bugs.winehq.org/show_bug.cgi?id=22961 for more info." fi + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Electronic Arts\\Battlefield Bad Company 2" +BFBC2Game.exe +__EOF__ } #---------------------------------------------------------------- @@ -1636,8 +1917,13 @@ load_braid_demo() " cd "$olddir" + if workaround_wine_bug 22161 + then + try sh "$WINETRICKS" -q d3dx9_36 + fi + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ -cd "$programfilesdir_x86_win\Braid" +cd "$programfilesdir_x86_win\\Braid" braid.exe __EOF__ } @@ -1678,12 +1964,17 @@ load_braid() controlclick, TButton3 " - # Enter the key + if workaround_wine_bug 22161 + then + try sh "$WINETRICKS" -q d3dx9_36 + fi + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ cd "$programfilesdir_x86_win\Braid\" "braid.exe" __EOF__ + # Enter the key cd "$DRIVE_C" ls ahk_do " @@ -1711,7 +2002,7 @@ load_codmw2() { warn "This verb isn't quite ready for prime time." load_autohotkey - test -f "$programfilesdir_x86_unix"/Steam/Steam.exe || sh $WINETRICKS -q steam + test -f "$programfilesdir_x86_unix"/Steam/Steam.exe || try sh $WINETRICKS -q steam # Get user's key CODMW2_KEY=`cat "$WISOTOOL_CACHE"/$PACKAGE/6f572261ed954733806daf5b42edf92b3127cd14.txt | tr -d -` @@ -1771,6 +2062,86 @@ load_codmw2() #---------------------------------------------------------------- +verblist_add cnc3_demo "Command and Conquer 3 Demo (EA, 2007) [download]" CnC3Demo.exe + +load_cnc3_demo() +{ + load_autohotkey + + if ! test -f "$WISOTOOL_CACHE/$PACKAGE/CnC3Demo.exe" + then + download $PACKAGE http://largedownloads.ea.com/pub/demos/CommandandConquer3/CnC3Demo.exe f6af21eba2d17eb6d8bb6a131b501b41c3a7eaf7 + fi + + cd "$WISOTOOL_CACHE/$PACKAGE" + ahk_do " + SetTitleMatchMode, 2 + run, CnC3Demo.exe + winwait, Conquer 3, free space to install + sleep 1000 + send y + winwait, WinZip, After installation + sleep 1000 + send s + winwait, Conquer 3, InstallShield + sleep 3000 + controlclick, Button1 + winwait, Conquer 3, license + controlclick, Button3 + controlclick, Button5 + winwait, Conquer 3, setup type + controlclick, Button5 + winwait, Conquer 3, EA Link + controlclick, Button1 + winwait, Conquer 3, GameSpy + controlclick, Button1 + winwait, Conquer 3, Launch the program + controlclick, Button1 + " + cd "$olddir" + + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Electronic Arts\\Command & Conquer 3 Tiberium Wars Demo" +CNC3Demo.exe +__EOF__ +} + +#---------------------------------------------------------------- + +verblist_add cnc4 "Command and Conquer 4 (EA, 2010) [broken-wine-drm]" f3308e6d3a93e7b5dd2643631404e97b66a0c262.iso + +load_cnc4() +{ + load_autohotkey + + iso_mount "$WISOTOOL_CACHE"/$PACKAGE/f3308e6d3a93e7b5dd2643631404e97b66a0c262.iso + + cd "$WISOTOOL_CACHE/$PACKAGE" + ahk_do " + SetTitleMatchMode, 2 + run, ${ISO_MOUNT_LETTER}:EASetup.exe + winwait, Tiberian Twilight, License + controlclick, Button1 + controlclick, Button2 + winwait, Tiberian Twilight, Standard Installation + controlclick, Button1 + winwait, Tiberian Twilight, to exit the Setup + controlclick, Button5 + controlclick, Button1 + " + cd "$olddir" + iso_umount + + # Bypass the game's launcher: see AppDB + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +"$programfilesdir_x86_win\\Electronic Arts\\Command & Conquer 4 Tiberian Twilight\\Data\\CNC4.game" -config "$programfilesdir_x86_win\\Electronic Arts\\Command & Conquer 4 Tiberian Twilight\\CNC4_English.SkuDef" +__EOF__ + + # Doesn't work on Wine yet because of DRM? +} + +#---------------------------------------------------------------- + verblist_add darknesswithin2_demo "Darkness Within 2 Demo (Zoetrope Interactive, 2010) [download]" DarknessWithin2Demo.exe load_darknesswithin2_demo() @@ -1822,6 +2193,190 @@ cd "$programfilesdir_x86_win\Iceberg Interactive\Darkness Within 2 Demo" __EOF__ } +#---------------------------------------------------------------- + +verblist_add daytona_usa_evolutions "Daytona USA Evolutions (Sega, 1997)" daytonev.exe + +# http://appdb.winehq.org/objectManager.php?sClass=application&iId=1136 +load_daytona_usa_evolutions() { + # Refuses to run on anything newer... + sh "$WINETRICKS" -q win98 + + load_autohotkey + + download $PACKAGE http://www2.sega.co.jp/download/pc/daytonae/daytonev.exe 65c51766e01b582c15200afb0fd569e0ec5ca1ac + + # Installer starts by extracting files, but doesn't seem to be a zip file or a cab file. I tried a few cli arguments, + # but had no luck. It's only 60 MB extracted, so just extract it fresh each time. + cd "$WISOTOOL_CACHE/$PACKAGE" + ahk_do " + SetTitleMatchMode, 2 + run, daytonev.exe + winwait, WinSFX32 V2.16.2.6, Install &Directory: + sleep 1000 + controlclick, Button2, WinSFX32 V2.16.2.6, Install &Directory: + loop + { + ifwinexist, WinSFX32 V2.16.2.6, Install &Directory: + sleep 5000 + else + break + } + " + cd daytonev + # There's a lot of unknown characters (presumably Japanese). Should this require user to run in + # a Japanese locale? + ahk_do " + SetTitleMatchMode, 2 + run, Setup.exe + winwait, Welcome, ???? DAYTONA USA Evolution ? ! + sleep 1000 + controlclick, Button1, Welcome, ???? DAYTONA USA Evolution ? ! + winwait, ???????????, ???????? PATH ?????????? + sleep 1000 + controlclick, Button1, ???????????, ???????? PATH ?????????? + winwait, Setup, ?????????????????????? + sleep 1000 + controlclick, Button1, Setup, ?????????????????????? + winwait, DirectX Install + sleep 1000 + ; Damned if you do, damned if you don't...directx install fails if you attempt install, but if you don't, 'joystick.reg setup' fails. + controlclick, Button2, DirectX Install + sleep 1000 + winwait, Setup, Joystick.reg setup failed. + sleep 1000 + controlclick, Button1, Setup, Joystick.reg setup failed. + winwait, Setup, ??????????????? + sleep 1000 + controlclick, Button1, Setup, ??????????????? + " + cd "$olddir" + + warn "Gives an error when closing the game, seems safe to ignore." + + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$DRIVE_C\SEGA\DAYTONA USA Evolution Demo CD" +"DAYTONA USA Evolution Demo CD.exe" +__EOF__ + +} + +#---------------------------------------------------------------- + +verblist_add dc2ba "Doras Carnival 2: Boardwalk Adventure (Nickelodeon, 2008)" InstallDorasCarnival2BoardwalkAdventure.exe +load_dc2ba() { + load_autohotkey + + # http://www.nickjr.com/games/p-doras-carnival-2-adventure.jhtml + download $PACKAGE http://downloadcdn.shockwave.com/pub/doras-carnival-2-boardwalk-adventure/InstallDorasCarnival2BoardwalkAdventure.exe a02559c4d8236581f2ee0e51a1a11f67a901eaba + + if workaround_wine_bug 23749 + then + sh "$WINETRICKS" -q ie6 + fi + + cd "$WISOTOOL_CACHE/$PACKAGE" + ahk_do " + SetTitleMatchMode, 2 + run InstallDorasCarnival2BoardwalkAdventure.exe + winwait, Welcome + sleep 1000 + controlclick, Button1, Welcome + sleep 1000 + winwait, End User License + sleep 1000 + controlclick, Button1, End User License + winwait, Choose Destination Location + sleep 1000 + controlclick, Button1, Choose Destination Location + winwait, FREE Toolbar + sleep 1000 + controlclick, Button5, FREE Toolbar + sleep 1000 + controlclick, Button1, FREE Toolbar + winwait, Start Installation + sleep 1000 + controlclick, Button1, Start Installation + winwait, Installation Complete + sleep 1000 + controlclick, Button1, Installation Complete + " + sleep 5 + killall winefile.exe + +cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Shockwave.com\\Dora's Carnival 2 - Boardwalk Adventure" +"Dora's Carnival 2 - Boardwalk Adventure.exe" +__EOF__ + + # Workarounds needed by the game but not the installer should come at end of verb + if workaround_wine_bug 13496 + then + sh "$WINETRICKS" -q vcrun6 + fi +} + +#---------------------------------------------------------------- + +verblist_add deadspace "Dead Space (EA, 2008)" \ + abf250df77bfa96c74e7bcd0343d381a4f327a26.iso + +load_deadspace() { + load_autohotkey + DEADSPACEKEY=`cat "$WISOTOOL_CACHE"/$PACKAGE/abf250df77bfa96c74e7bcd0343d381a4f327a26.txt | tr -d -` + + if workaround_wine_bug 23324 + then + msvcrun_me_harder=" + winwait, Microsoft + controlclick, Button1 + " + else + msvcrun_me_harder="" + fi + + iso_mount "$WISOTOOL_CACHE"/$PACKAGE/abf250df77bfa96c74e7bcd0343d381a4f327a26.iso + ahk_do " + SetTitleMatchMode, 2 + ; note: if this is the second run, the installer skips the registration code prompt + run, ${ISO_MOUNT_LETTER}:EASetup.exe + winwait, Dead + send {Enter} + winwait, Dead, Registration Code + send {RAW}$DEADSPACEKEY + Sleep 1000 + controlclick, Button2 + $msvcrun_me_harder + winwait, Setup, License + Sleep 1000 + controlclick, Button1 + Sleep 1000 + send {Enter} + winwait, Setup, License + Sleep 1000 + controlclick, Button1 + Sleep 1000 + send {Enter} + winwait, Setup, Destination + Sleep 1000 + controlclick, Button1 + winwait, Setup, begin + Sleep 1000 + controlclick, Button1 + winwait, Setup, Finish + Sleep 1000 + controlclick, Button5 + controlclick, Button1 + " + iso_umount + + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Electronic Arts\\Dead Space" +Dead Space.exe +__EOF__ +} + + #---------------------------------------------------------------- verblist_add diablo2 "Diablo II (Blizzard, 2000)" \ @@ -1901,7 +2456,7 @@ __EOF__ #---------------------------------------------------------------- -verblist_add dragonage "Dragon Age: Origins (Bioware, 2009)" 705a6b06d0dd807bf62b4391d278649d728ebda4.iso +verblist_add dragonage "Dragon Age: Origins (Bioware / EA, 2009)" 705a6b06d0dd807bf62b4391d278649d728ebda4.iso load_dragonage() { load_autohotkey @@ -1921,8 +2476,11 @@ load_dragonage() { winwait, Dragon Age: Origins Setup ControlClick Next, Dragon Age: Origins Setup winwait, Dragon Age: Origins Setup, End User License - ControlClick Button4, Dragon Age: Origins Setup - ControlClick I agree, Dragon Age: Origins Setup + sleep 1000 + ;ControlClick Button4, Dragon Age: Origins Setup ; agree + send {Tab}a ; agree + ;ControlClick I agree, Dragon Age: Origins Setup + send {Enter} ; continue SetTitleMatchMode, 1 winwait, Dragon Age: Origins, Registration send $DRAGONAGEKEY @@ -1939,17 +2497,331 @@ load_dragonage() { " iso_umount + if workaround_wine_bug 22307 + then + warn "Turn off frame buffer effects to avoid blurry cut scenes. See http://bugs.winehq.org/show_bug.cgi?id=22307" + fi if workaround_wine_bug 22383 then try "$WINETRICKS" -q strictdrawordering=enabled fi + if workaround_wine_bug 23730 + then + warn "Run with WINEDEBUG=-all to reduce flickering." + fi + if workaround_wine_bug 23081 + then + warn "If you still see flickering, try applying the patch from http://bugs.winehq.org/show_bug.cgi?id=23081" + fi cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ -cd "$programfilesdir_x86_win\Dragon Age" -bin_ship\daorigins.exe +cd "$programfilesdir_x86_win\\Dragon Age" +bin_ship\\daorigins.exe __EOF__ } +#---------------------------------------------------------------- + +verblist_add fallout3_goty "Fallout 3: Game of the Year Edition (Bethesda, 2009)" 379e2daa9bdd1aaf1cb152c1d9f8181f8f24e01b.iso \ + f131e45dba66ed2c98dd7a1e04cc1114b7c5e4b6.iso + +load_fallout3_goty() { +# http://appdb.winehq.org/objectManager.php?sClass=version&iId=14322 + load_autohotkey + + iso_mount "$WISOTOOL_CACHE"/$PACKAGE/379e2daa9bdd1aaf1cb152c1d9f8181f8f24e01b.iso + + ahk_do " + Run, ${ISO_MOUNT_LETTER}:Setup.exe + SetTitleMatchMode, 2 + winwait, Fallout 3 - InstallShield Wizard, Welcome to the InstallShield Wizard for Fallout 3 + sleep 1000 + controlclick, Button1, Fallout 3 - InstallShield Wizard, Welcome to the InstallShield Wizard for Fallout 3 + winwait, Fallout 3 - InstallShield Wizard, Please read the following license agreement carefully. + sleep 1000 + controlclick, Button3, Fallout 3 - InstallShield Wizard, Please read the following license agreement carefully. + sleep 1000 + controlclick, Button1, Fallout 3 - InstallShield Wizard, Please read the following license agreement carefully. + winwait, Fallout 3 - InstallShield Wizard, Please select a setup type. + sleep 1000 + controlclick, Button4, Fallout 3 - InstallShield Wizard, Please select a setup type. + winwait, Fallout 3 - InstallShield Wizard, Click Install to begin the installation. + sleep 1000 + controlclick, Button1, Fallout 3 - InstallShield Wizard, Click Install to begin the installation. + winwait, Fallout 3 - InstallShield Wizard, InstallShield Wizard Complete + sleep 1000 + controlclick, Button1, Fallout 3 - InstallShield Wizard, InstallShield Wizard Complete + sleep 1000 + controlclick, Button2, Fallout 3 - InstallShield Wizard, InstallShield Wizard Complete + sleep 1000 + controlclick, Button3, Fallout 3 - InstallShield Wizard, InstallShield Wizard Complete + " + + iso_mount "$WISOTOOL_CACHE"/$PACKAGE/f131e45dba66ed2c98dd7a1e04cc1114b7c5e4b6.iso + + ahk_do " + Run, ${ISO_MOUNT_LETTER}:EN_Fallout_3_DLC.EXE + SetTitleMatchMode, 2 + winwait, Fallout 3 - DLC EN - InstallShield Wizard, Welcome to the InstallShield Wizard for Fallout 3 - DLC EN + sleep 1000 + controlclick, Button1, Fallout 3 - DLC EN - InstallShield Wizard, Welcome to the InstallShield Wizard for Fallout 3 - DLC EN + winwait, Fallout 3 - DLC EN - InstallShield Wizard, Please read the following license agreement carefully. + sleep 1000 + controlclick, Button5, Fallout 3 - DLC EN - InstallShield Wizard, Please read the following license agreement carefully. + sleep 1000 + controlclick, Button2, Fallout 3 - DLC EN - InstallShield Wizard, Please read the following license agreement carefully. + winwait, Fallout 3 - DLC EN - InstallShield Wizard, Click Install to begin the installation. + sleep 1000 + controlclick, Button1, Fallout 3 - DLC EN - InstallShield Wizard, Click Install to begin the installation. + winwait, Fallout 3 - DLC EN - InstallShield Wizard, InstallShield Wizard Complete + sleep 1000 + controlclick, Button4, Fallout 3 - DLC EN - InstallShield Wizard, InstallShield Wizard Complete + " + + if workaround_wine_bug 23532 + then + try "$WINETRICKS" -q xlive + fi + +cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Bethesda Softworks\\Fallout 3" +"Fallout3.exe" +__EOF__ + +} + +#---------------------------------------------------------------- + +verblist_add fifa10 "Fifa 10 (EA, 2009)" 2038b86319862e1177912949e9f826f333571c48.iso + +load_fifa10() { +# http://appdb.winehq.org/objectManager.php?sClass=version&iId=14322 + load_autohotkey + + iso_mount "$WISOTOOL_CACHE"/$PACKAGE/2038b86319862e1177912949e9f826f333571c48.iso + + # Get user's key + fifakey=`cat "$WISOTOOL_CACHE"/$PACKAGE/2038b86319862e1177912949e9f826f333571c48.txt | tr -d -` + + if workaround_wine_bug 23433 'wine-1.2-422*|wine-1.2.*' + then + fifatitle="DisplayName from default.wxl" + else + # FIXME: What is it on Windows? + fifatitle="FIFA 10" + fi + + + ahk_do " + Run, ${ISO_MOUNT_LETTER}:AutoRun.exe + SetTitleMatchMode, 2 + winwait, FIFA 10, View the readme file + sleep 1000 + controlclick, Button1, FIFA 10, View the readme file + winwait, FIFA 10, Please enter the entire Registration Code found either + sleep 1000 + send $fifakey + send {Enter} + winwait, Microsoft Visual C++ 2005, Please read the following license agreement + sleep 1000 + controlclick, Button1, Microsoft Visual C++ 2005, Please read the following license agreement + winwait, $fifatitle, I &accept the terms in the End User License Agreement + sleep 1000 + controlclick, Button1, $fifatitle, I &accept the terms in the End User License Agreement + sleep 1000 + controlclick, Button3, $fifatitle, I &accept the terms in the End User License Agreement + ; There are two license agreements...one is for Directx + winwait, $fifatitle, I &accept the terms in the End User License Agreement + sleep 1000 + controlclick, Button1, $fifatitle, I &accept the terms in the End User License Agreement + sleep 1000 + controlclick, Button3, $fifatitle, I &accept the terms in the End User License Agreement + winwait, $fifatitle, Ready to install $fifatitle + sleep 1000 + controlclick, Button1, $fifatitle, Ready to install $fifatitle + winwait, $fifatitle, Click the Finish button to exit the Setup Wizard. + sleep 1000 + controlclick, Button5, $fifatitle, Click the Finish button to exit the Setup Wizard. + sleep 1000 + controlclick, Button1, $fifatitle, Click the Finish button to exit the Setup Wizard. + winwait, Product Registration, Please log into your EA Master Account to continue. + sleep 1000 + controlclick, Button14, Product Registration, Please log into your EA Master Account to continue. + " + +cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\EA Sports\\FIFA 10" +"FIFA10.exe" +__EOF__ + +} + +#---------------------------------------------------------------- + + +verblist_add fifaonline3_beta "FIFA Online 3 Beta (EA Sports, 2010) [download]" FIFAOnlineSetup.exe + +load_fifaonline3_beta() +{ + load_autohotkey + if ! test -f "$WISOTOOL_CACHE/$PACKAGE/FIFAOnlineSetup.exe" + then + mkdir -p "$WISOTOOL_CACHE"/$PACKAGE + die "Download the FIFAOnlineSetup.exe from http://fifa-online.easports.com/web/beta/welcome \ + and place it in $WISOTOOL_CACHE/$PACKAGE" + fi + + cd "$WISOTOOL_CACHE/$PACKAGE" + ahk_do " + SetTitleMatchMode, 2 + run, FIFAOnlineSetup.exe + winwait, C++, License + controlclick, Yes + winwait, FIFA, Testing Agreement + controlclick, Button1 + controlclick, Button3 + winwait, FIFA, Punk + controlclick, Button1 + controlclick, Button3 + winwait, FIFA, Destination + controlclick, Button1 + winwait, Setup, Please wait + sleep 1000 + winwaitclose, Setup, Please wait + sleep 10000 + send {Right} + sleep 1000 + send {Space} + sleep 1000 + send {Right} + sleep 1000 + send {Space} + " + # Wait for download to finish and game to start + while [ `ps a | grep NFE.exe | grep -v grep | wc -l` != "1" ] + do + sleep 5 + done + + # Dont kill game immediately + sleep 10 + killall "NFE.exe" + + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +c: +cd \Program Files\\EA Sports\\FIFA Online +Launch.exe +__EOF__ + +} + +#---------------------------------------------------------------- + +verblist_add fifa10_demo "Fifa 10 Demo (EA, 2009)" fifa10_pc_demo_ec.exe + +load_fifa10_demo() { + load_autohotkey + + download $PACKAGE "http://gamedaily.newaol.com/pub/fifa10_pc_demo_ec.exe" 96200d4962fd6c34715c448ba22f00edd3d70cd6 + + # The installer is a self extracting rar file. Make cleanups easy by using $WISOTOOL_TMP + mkdir "$WISOTOOL_TMP/fifa10" + cd "$WISOTOOL_TMP/fifa10" + + if workaround_wine_bug 23433 'wine-1.2-422*|wine-1.2.*' + then + fifatitle="DisplayName from default.wxl" + else + fifatitle="FIFA 10 - Demo" + fi + + mkdir -p "$WISOTOOL_TMP/$PACKAGE" + cd "$WISOTOOL_CACHE/$PACKAGE" + ahk_do " + Run fifa10_pc_demo_ec.exe + winwait, FIFA 10 PC Demo + send $WISOTOOL_TMP_WIN\\${PACKAGE}{ENTER} + winwait, FIFA 10 - Demo, View the readme file + sleep 1000 + controlclick, Button1, FIFA 10 - Demo, View the readme file + sleep 1000 + ; FIXME: make this block optional so we dont hang if wine vc2005 runtime passes the check and the game does not show this dialog + winwait, Microsoft Visual C++ 2005 Redistributable Package (x86) + sleep 1000 + controlclick, Button1, Microsoft Visual C++ 2005 Redistributable Package (x86) + sleep 1000 + winwait, $fifatitle Setup, I &accept the terms in the End User License Agreement + sleep 1000 + controlclick, Button1, $fifatitle Setup, Please read the End User License Agreement for $fifatitle + sleep 1000 + controlclick, Button3, $fifatitle Setup, Please read the End User License Agreement for $fifatitle + sleep 1000 + winwait, $fifatitle Setup, Please read the following End User License Agreement carefully + sleep 1000 + controlclick, Button1, $fifatitle Setup, Please read the following End User License Agreement carefully + sleep 1000 + controlclick, Button3, $fifatitle Setup, Please read the following End User License Agreement carefully + sleep 1000 + winwait, $fifatitle Setup, Ready to install $fifatitle + sleep 1000 + controlclick, Button1, $fifatitle Setup, Ready to install $fifatitle + ; Very slow installer... + winwait, $fifatitle Setup, Click the Finish button to exit the Setup Wizard. + sleep 1000 + controlclick, Button1, $fifatitle Setup, Click the Finish button to exit the Setup Wizard. + " +cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\EA Sports\\FIFA 10 - Demo" +FIFA10Demo.exe +__EOF__ +} + +#---------------------------------------------------------------- + +verblist_add ffxivbench "Final Fantasy XIV Benchmark (Square Enix, 2010)" FFXIVBenchmark.zip + +load_ffxivbench() { + download $PACKAGE http://uk.download.nvidia.com/nzone/international/benchmarks/ffxiv/FFXIVBenchmark.zip 9c2406540306575bdc738c439e59f54eb44304a8 + + cd "$programfilesdir_x86_unix" + try unzip "$WISOTOOL_CACHE/$PACKAGE/FFXIVBenchmark.zip" + +# Setup two batch files, one for high res, one for low res: +cat > FFXIVBenchmark/data/config.low <<__EOF__ +[FFXIV_BENCHMARK] +LANGUAGE=1 +CHARACTER=0 +RESOLUTION=1 +LOOP=0 +__EOF__ + +cat > FFXIVBenchmark/data/config.high <<__EOF__ +[FFXIV_BENCHMARK] +LANGUAGE=1 +CHARACTER=0 +RESOLUTION=0 +LOOP=0 +__EOF__ + +cat > "$DRIVE_C/run-$PACKAGE-low.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\FFXIVBenchmark\\data" +copy config.low config.ini /y +FFXivWinBenchmark.exe +__EOF__ + +cat > "$DRIVE_C/run-$PACKAGE-high.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\FFXIVBenchmark\\data" +copy config.high config.ini /y +FFXivWinBenchmark.exe +__EOF__ + +if workaround_wine_bug 22555 +then + try "$WINETRICKS" -q d3dx9_36 +fi + +} + #---------------------------------------------------------------- verblist_add gta_vc "Grand Theft Auto: Vice City (Rockstar, 2003) " \ @@ -2084,6 +2956,10 @@ verblist_add hphbp_demo "Harry Potter & The Half Blood Prince Demo (EA, 2009) load_hphbp_demo() { + case "$LANG" in + ""|"C") die "Harry Potter won't install in the Posix locale; please do 'export LANG=en_US.UTF-8' or something like that" ;; + esac + load_autohotkey if ! test -f "$WISOTOOL_CACHE/$PACKAGE/$hbpdemoexe" @@ -2116,7 +2992,7 @@ load_hphbp_demo() # Have to "cd pc" as next command, or the wildcard expansion fails on wine? # Have to be in the pc directory for the app to find its files. cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ -cd "$programfilesdir_x86_win\Electronic Arts\Harry Potter and the Half-Blood Prince* Demo" +cd $programfilesdir_x86_win\\Electronic Arts\\Harry Potter and the Half-Blood Prince* Demo cd pc hp6_demo.exe __EOF__ @@ -2124,6 +3000,47 @@ __EOF__ #---------------------------------------------------------------- +verblist_add hphbp "Harry Potter & The Half Blood Prince (EA, 2009)" 9590f4c4bf2d5e819014cd9b03a5d5408ae2cd7d.iso + +load_hphbp() +{ + case "$LANG" in + ""|"C") die "Harry Potter won't install in the Posix locale; please do 'export LANG=en_US.UTF-8' or something like that" ;; + esac + + load_autohotkey + iso_mount "$WISOTOOL_CACHE"/$PACKAGE/9590f4c4bf2d5e819014cd9b03a5d5408ae2cd7d.iso + HPHBP_KEY=`cat "$WISOTOOL_CACHE"/$PACKAGE/9590f4c4bf2d5e819014cd9b03a5d5408ae2cd7d.txt | tr -d -` + ahk_do " + SetTItleMatchMode, 2 + run, ${ISO_MOUNT_LETTER}:EASetup.exe + winwait, Harry Potter + send {RAW}$HPHBP_KEY + controlclick, Button2 + winwait, Setup, License + controlclick, Button1 + controlclick, Button3 + winwait, Setup, License + controlclick, Button1 + controlclick, Button3 + winwait, Setup, Destination + controlclick, Button1 + winwait, Setup, begin + controlclick, Button1 + winwait, Setup, Finish + controlclick, Button1 + " + $WINESERVER -w + iso_umount + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd $programfilesdir_x86_win\Electronic Arts\Harry Potter and the Half-Blood Prince* +cd pc +hp6.exe +__EOF__ +} + +#---------------------------------------------------------------- + verblist_add hegemonypom_demo "Hegemony: Philip of Macedon Demo (Longbow Games, 2010) [download]" Hegemony_Philip_of_Macedon_Installer.exe load_hegemonypom_demo() @@ -2211,6 +3128,134 @@ __EOF__ #---------------------------------------------------------------- +verblist_add hod3_jp_demo "The House of the Dead 3 - Japanese - Demo (SEGA, 2005) [download]" hod3_trial.exe + +load_hod3_jp_demo() { + load_autohotkey + if ! test -f "$WISOTOOL_CACHE/$PACKAGE/hod3_trial.exe" + then + download $PACKAGE http://www2.sega.co.jp/download/pc/hod3/hod3_trial.exe f616ac945bcbb5b897d24f3ce568c0f528801d05 + fi + cd "$WISOTOOL_CACHE/$PACKAGE" + ahk_do " + SetTitleMatchMode, 2 + ; Use slow matching because otherwise autohotkey cant find the 1-2-12 in the Asian text + SetTitleMatchMode, slow + run hod3_trial.exe + winwait, THE HOUSE OF THE DEAD 3,Windows + send {Enter} + winwait, THE HOUSE OF THE DEAD 3,1-2-12 + Send {Up} + Send {Space} + send {Enter} + winwait, THE HOUSE OF THE DEAD 3,SEGA + send {Enter} + winwaitclose + winwait, THE HOUSE OF THE DEAD 3 + send {Enter} + ; Installer crashes before putting up finished dialog, but app seems okay anyway + " + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\SEGA\\THE HOUSE OF THE DEAD3_JP_TRIAL" +hod3launch.exe +__EOF__ +} + +#---------------------------------------------------------------- + +verblist_add lhp_demo "LEGO Harry Potter Demo [Years 1-4] (Travellers Tales / WB, 2010) [download]" LEGOHarryPotterDEMO.exe + +load_lhp_demo() +{ + load_autohotkey + + case "$LANG" in + *UTF-8*) ;; + *) die "This installer fails in non-utf-8 locales. Try doing export LANG=en_US.UTF-8" + esac + + if ! test -f "$WISOTOOL_CACHE/$PACKAGE/LEGOHarryPotterDEMO.exe" + then + download $PACKAGE http://static.kidswb.com/legoharrypottergame/LEGOHarryPotterDEMO.exe bb0a30ad9a7cc51c80e1bb1f3eec22e6ccc1a706 + fi + + cd "$WISOTOOL_CACHE/$PACKAGE" + ahk_do " + SetTitleMatchMode, 2 + run, LEGOHarryPotterDEMO.exe + winwait, LEGO, language + controlclick, Button1 + winwait, LEGO, License + controlclick, Button1 + controlclick, Button2 + winwait, LEGO, installation method + controlclick, Button2 + winwait, LEGO, Finish + controlclick, Button1 + " + cd "$olddir" + + if workaround_wine_bug 23397 + then + warn "If you have sound problems, try switching to OSS sound in winecfg" + fi + + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\WB Games\\LEGO*" +LEGOHarryPotterDEMO.exe +__EOF__ +} + +#---------------------------------------------------------------- + +verblist_add lotsn "Launch of the Screaming Narwhal (Telltale Games / Lucasarts, 2009)" LaunchOfTheScreamingNarwhal_Setup.exe + +load_lotsn() +{ + load_autohotkey + + if ! test -f "${WISOTOOL_CACHE}/${PACKAGE}/LaunchOfTheScreamingNarwhal_Setup.exe" + then + download ${PACKAGE} http://www.telltalegames.com/demo/launchofthescreamingnarwhal 8a9292d89fd5e7efe58e63dcfc84a05bf08ff1d6 LaunchOfTheScreamingNarwhal_Setup.exe + fi + + load_gecko + + cd "${WISOTOOL_CACHE}/${PACKAGE}" + chmod +x LaunchOfTheScreamingNarwhal_Setup.exe + ahk_do " + SetTitleMatchMode, 2 + run, LaunchOfTheScreamingNarwhal_Setup.exe + WinWait, Setup + ControlClick Button2 ; Next + WinWait, Setup, Checking DirectX + ControlClick Button5 ; Don't check + ControlClick Button2 ; Next + WinWait, Setup, License + ControlClick Button2 ; Agree + WinWait, Setup, Location + ControlClick Button2 ; Install + WinWait, Setup, has been installed + ControlClick Button4 ; uncheck Play Now + ControlClick Button2 ; Finish + WinWaitClose + " + cd "${olddir}" + + cat > "${DRIVE_C}/run-${PACKAGE}.bat" << __EOF__ +cd "${programfilesdir_x86_win}\\Telltale Games\\Tales of Monkey Island\\Launch of the Screaming Narwhal" +MonkeyIsland101.exe +__EOF__ + + if workaround_wine_bug 22161 + then + # Crashes on startup without this + sh "$WINETRICKS" -q d3dx9_36 + fi +} + +#---------------------------------------------------------------- + verblist_add lswcs "Lego Star Wars Complete Saga (Lucasarts, 2009)" dc5db10e2ad2892ba40015d3856d1d29dc55893a.iso load_lswcs() { @@ -2302,7 +3347,7 @@ load_masseffect2() { winwait, Installer Language send {Enter} winwait, Mass Effect - ControlClick, Button2 + send {Enter} winwait, Mass Effect, License ControlClick, Button4 ControlClick, Button2 @@ -2316,7 +3361,12 @@ load_masseffect2() { sleep 5 iso_mount "$WISOTOOL_CACHE"/$PACKAGE/49d1f9b85203049d52a8e34b92cd7d4b96e0c8be.iso ahk_do " - ControlClick, Button4, Insert Disc + SetTitleMatchMode, 2 + winwait, Insert Disc + ControlClick, Button4 + ; on windows, the first click doesn't seem to do it, so press enter, too + sleep 1000 + send {Enter} ; Some installs may not get to this point due to an installer hang/crash (bug 22919) ; The hang/crash happens after the Physx install but does not seem to affect gameplay ; TODO: work around this by waiting in some other way for install to finish @@ -2336,6 +3386,224 @@ __EOF__ #---------------------------------------------------------------- +verblist_add masseffect2_demo "Mass Effect 2 (BioWare, 2010)" MassEffect2DemoEN.exe + +load_masseffect2_demo() { + load_autohotkey + + file="$WISOTOOL_CACHE/$PACKAGE/MassEffect2DemoEN.exe" + if ! test -f "$file" + then + download ${PACKAGE} http://masseffect.bioware.com/cdn/A/ME2_DEMO/MassEffect2DemoEN.exe cda9a25387a98e29772b3ccdcf609f87188285e2 + fi + + if workaround_wine_bug 22091 + then + warn "Will probably hang at end of installer. If a crash dialog comes up, you can kill it, it's done." + #try sh "$WINETRICKS" -q nocrashdialog + fi + + if workaround_wine_bug 23126 + then + try sh "$WINETRICKS" -q vcrun2005 + fi + if workaround_wine_bug 23125 + then + try sh "$WINETRICKS" d3dx10 + fi + if workaround_wine_bug 22919 + then + try sh "$WINETRICKS" -q physx + fi + + mkdir -p "$WISOTOOL_TMP/$PACKAGE" + # FIXME: use ln -fs on linux, cp on windows + cp "$WISOTOOL_CACHE/$PACKAGE/MassEffect2DemoEN.exe" "$WISOTOOL_TMP" + ahk_do " + SetTitleMatchMode, 2 + run, $WISOTOOL_TMP_WIN\\MassEffect2DemoEN.exe + winwait, Mass Effect 2 Demo + Sleep 1000 + send {Enter} + winwait, Mass Effect 2 Demo, conflicts + Sleep 1000 + send {Enter} + winwait, Mass Effect, License + ControlClick, Button4 + ;ControlClick, Button2 + send {Enter} + winwait, Mass Effect, Install Type + ControlClick, Button2 + ; Some installs may not get to this point due to an installer hang/crash (bug 22919) + ; The hang/crash happens after the Physx install but does not seem to affect gameplay + ; TODO: work around this by waiting in some other way for install to finish + winwait, Mass Effect 2 Demo, Finish + winkill + " + if workaround_wine_bug 6971 + then + echo "See http://appdb.winehq.org/objectManager.php?sClass=version&iId=19125 for info on how to patch wine to work around bug 6971" + fi + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Mass Effect 2 Demo\\Binaries" +MassEffect2.EXE +__EOF__ + +} + +#---------------------------------------------------------------- + +verblist_add metro2033 "Metro 2033 (THQ, 2010)" 3de89e07449c2573cd4a334b0cd7da012a98f97c.iso + +load_metro2033() { + warn "You'll need to have STEAM_USER/STEAM_PASS set in your environment or in $WISOTOOL_CACHE. You'll also need your cd-key for Metro 2033 already added to your Steam Account." + + if [ ! "$STEAM_USER" -a ! -f "$WISOTOOL_CACHE"/STEAM_USER ] + then + die "You need to set STEAM_USER variable in your environment or put it in "$WISOTOOL_CACHE"/STEAM_USER" + elif [ ! "$STEAM_USER" -a -f "$WISOTOOL_CACHE"/STEAM_USER ] + then + STEAM_USER=`cat "$WISOTOOL_CACHE"/STEAM_USER` + fi + + if [ ! "$STEAM_PASS" -a ! -f "$WISOTOOL_CACHE"/STEAM_PASS ] + then + die "You need to set STEAM_PASS variable in your environment or put it in "$WISOTOOL_CACHE"/STEAM_PASS" + elif [ ! "$STEAM_PASS" -a -f "$WISOTOOL_CACHE"/STEAM_PASS ] + then + STEAM_PASS=`cat "$WISOTOOL_CACHE"/STEAM_PASS` + fi + + steam_dir="$programfilesdir_unix/Steam" + + load_autohotkey + + # Game uses Steam to install itself + try sh $WINETRICKS -q steam + + iso_mount "$WISOTOOL_CACHE"/$PACKAGE/3de89e07449c2573cd4a334b0cd7da012a98f97c.iso + METRO_KEY=`cat "$WISOTOOL_CACHE"/$PACKAGE/3de89e07449c2573cd4a334b0cd7da012a98f97c.txt | tr -d -` + + cd "$steam_dir" + + # Run Steam, let it update. Then, in a separate thread, run the installer. + ahk_do " + SetTitleMatchMode, 2 + SetControlDelay -1 + run, Steam.exe -login $STEAM_USER $STEAM_PASS + Winwait, Steam - Update News + ; Close all windows, prevent conflicts with later controlclick's + winclose, Steam - Update News + winclose, Steam + " + + ahk_do " + Run, Steam.exe -install I:\\ + ; Install Metro 2033 + winwait, Install - Metro 2033 + send, {Enter} + ; Shortcuts + sleep 10000 + winwait, Install - Metro 2033 + send, {Enter} + ; Installing... + sleep 10000 + winwait, Install - Metro 2033 + send, {Enter} + " + + # Wait for install to finish + dl_log="$steam_dir/logs/download_log.txt" + while true + do + grep "SetHasAllLocalContent(true) called for 43110" "$dl_log" && break + sleep 15 + done + + ahk_do " + send {Enter} + sleep 1000 + run, Steam.exe -shutdown + " + + warn "You'll need the Xinput2 patch from http://bugs2.winehq.org/attachment.cgi?id=29313 to be able to use the mouse." + +cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Steam" +Steam.exe -login $STEAM_USER $STEAM_PASS -applaunch 43110 +__EOF__ + +} + +#---------------------------------------------------------------- + +verblist_add moh_beta "Medal of Honor: Beta (EA, 2010) [download]" MOHMP_Beta_PC_Client_R2_550504_Installer.zip + +load_moh_beta() +{ + load_autohotkey + + # Archive SHA1SUM 7585700202ec305017038be4f1cb8ee1b43c24a2 + file="$WISOTOOL_CACHE/$PACKAGE/MOHMP_Beta_PC_Client_R2_550504_Installer.zip" + test -f "$file" || file="$WISOTOOL_CACHE/$PACKAGE/MOH-MPBetaClient_R2550504_Installer.zip" + if ! test -f "$file" + then + mkdir -p "$WISOTOOL_CACHE/$PACKAGE" + die "Download the beta from http://medalofhonor.com/beta or http://www.fileplanet.com/213429/210000/fileinfo/Medal-of-Honor---Multiplayer-Beta-Client and place in $WISOTOOL_CACHE/$PACKAGE" + fi + + mkdir -p "$WISOTOOL_TMP/$PACKAGE" + try unzip -o "$file" -d "$WISOTOOL_TMP/$PACKAGE" + cd "$WISOTOOL_TMP/$PACKAGE" + ahk_do " + SetTitleMatchMode, 2 + run, setup.exe + winwait, Medal of Honor, will install + controlclick, Button1 + winwait, Medal of Honor, License + controlclick, Button1 + controlclick, Button3 + winwait, Medal of Honor, License + controlclick, Button1 + controlclick, Button3 + winwait, Medal of Honor, shortcuts + controlclick, Button1 + winwait, Medal of Honor, Before continuing + controlclick, Button1 + winwait, Medal of Honor, Finish + controlclick, Button1 + " + + # Game defaults to Dx10. Must force DxVersion=9 + # This is identical to the BFBC2 bug. Should I file an app specific bug? + if workaround_wine_bug 22762 + then + cd "$DRIVE_C/users/$USERNAME/My Documents" + if test -f "Medal of Honor MP Beta"/settings.ini + then + mv "Medal of Honor MP Beta"/settings.ini "Medal of Honor MP Beta"/oldsettings.ini + sed 's,DxVersion=auto,DxVersion=9,; + s,Fullscreen=true,Fullscreen=false,' "Medal of Honor MP Beta"/oldsettings.ini > "Medal of Honor MP Beta"/settings.ini + else + mkdir -p "Medal of Honor MP Beta" + echo "[Graphics]" > "Medal of Honor MP Beta"/settings.ini + echo "DxVersion=9" >> "Medal of Honor MP Beta"/settings.ini + fi + fi + + cd "$olddir" + + # fixme: Try to find a way to script this? + warn "After you sign up at http://medalofhonor.com/beta, you will receive a beta key which you will need to enter the first time you run the game." + + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Electronic Arts\\Medal of Honor MP Beta" +MoHMPGame.exe +__EOF__ +} + +#---------------------------------------------------------------- + verblist_add morrowind "The Elder Scrolls III: Morrowind (Bethesda, 2002)" \ c8368ed30d3f3fcd7fccf8bffcfcdf0a6d4cb68b.iso @@ -2380,7 +3648,7 @@ load_morrowind() { ; The text box is split into two lines separately, not using word wrap, hence the weird sentence.. winwait, Question, Would you like to register Morrowind online now? Make sure sleep 1000 - controlclick, Button7 + controlclick, Button2 ; Sometimes finicky here, short sleep here works around it Sleep 10000 winwait, The Elder Scrolls III: Morrowind Setup, Setup has finished installing Morrowind on your computer. @@ -2399,6 +3667,39 @@ load_morrowind() { #---------------------------------------------------------------- +mnbw_demo_exe=mb_warband_setup_1113.exe +verblist_add mnbw_demo "Mount & Blade Warband Demo (Taleworlds, 2010) [download]" ${mnbw_demo_exe} + +load_mnbw_demo() +{ + load_autohotkey + if ! test -f "${WISOTOOL_CACHE}/${PACKAGE}/${mnbw_demo_exe}" + then + download ${PACKAGE} http://download.taleworlds.com/${mnbw_demo_exe} + fi + cd "${WISOTOOL_CACHE}/${PACKAGE}" + chmod +x ${mnbw_demo_exe} + ahk_do " + SetTitleMatchMode, 2 + run, ${mnbw_demo_exe} + WinWait, Warband + ControlClick, Button2, Warband + WinWait, Warband + ControlClick, Button2, Warband + WinWait, Warband, Finish + ControlClick, Button4, Warband + ControlClick, Button2, Warband + " + cd "${olddir}" + cat > "${DRIVE_C}/run-${PACKAGE}.bat" << __EOF__ +cd "${programfilesdir_x86_win}\\Mount&Blade Warband" +mb_warband.exe +__EOF__ + +} + +#---------------------------------------------------------------- + verblist_add nfsps_demo "Need For Speed: Pro Street Demo (EA, 2007)" nfsps_pcdemo.exe load_nfsps_demo() @@ -2410,11 +3711,13 @@ load_nfsps_demo() download $PACKAGE http://largedownloads.ea.com/pub/demos/NFS/prostreet/nfsps_pcdemo.exe 9cf74563d28c29a40920e0c0644c2da6e8e2a888 fi + mkdir -p "$WISOTOOL_TMP/$PACKAGE" cd "$WISOTOOL_CACHE/$PACKAGE" ahk_do " SetTitleMatchMode, 2 run, nfsps_pcdemo.exe winwait, ProStreet, folder + send $WISOTOOL_TMP_WIN\\$PACKAGE controlclick, Button2 winwait, ProStreet, View the readme controlclick, Button1 @@ -2436,13 +3739,199 @@ load_nfsps_demo() " cd "$olddir" cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ -cd "$programfilesdir_x86_win\Electronic Arts\Need for Speed ProStreet Demo" +cd "$programfilesdir_x86_win\\Electronic Arts\\Need for Speed ProStreet Demo" nfsdemo.exe __EOF__ } #---------------------------------------------------------------- +verblist_add nfsshift "Need For Speed: Shift (EA, 2009)" 83d3b7499742ccf77da11fc2613de422c6f30572.iso + +load_nfsshift() +{ + load_autohotkey + + if workaround_wine_bug 23324 + then + msvcrun_me_harder=" + winwait, Microsoft + controlclick, Button1 + " + else + msvcrun_me_harder="" + fi + + NFSSHIFT_KEY=`cat "$WISOTOOL_CACHE"/$PACKAGE/83d3b7499742ccf77da11fc2613de422c6f30572.txt | tr -d -` + iso_mount "$WISOTOOL_CACHE/$PACKAGE/83d3b7499742ccf77da11fc2613de422c6f30572.iso" + ahk_do " + SetTitleMatchMode, 2 + ; note: if this is the second run, the installer skips the registration code prompt + run, ${ISO_MOUNT_LETTER}:EASetup.exe + ; Not sure which of two or three dialogs happens next + loop + { + if winexist, SHIFT, Registration Code + { + send {RAW}$NFSSHIFT_KEY + Sleep 1000 + ;controlclick, Button2 + send {Enter} + break + } + if winexist, Microsoft + break + if winexist, Setup, License + break + sleep 1000 + } + $msvcrun_me_harder + winwait, Setup, License + Sleep 1000 + ;controlclick, Button1 ; Accept Doesn't work on vista + send a ; Accept + Sleep 1000 + send {Enter} + winwait, Setup, License + Sleep 1000 + controlclick, Button1 + Sleep 1000 + send {Enter} + winwait, Setup, Destination + Sleep 1000 + controlclick, Button1 + winwait, Setup, begin + Sleep 1000 + controlclick, Button1 + winwait, Setup, Finish + Sleep 1000 + controlclick, Button5 + ;controlclick, Button1 ; Finish + send {Enter} ; Finish doesn't respond to click on vista? + " + iso_umount + + download $PACKAGE http://cdn.needforspeed.com/data/downloads/shift/SHIFTPCPATCHV1.02_NA.exe 3ec2bf46aeb223c369ffcb0b57c080fba67d5dd9 + + cd "$WISOTOOL_CACHE/$PACKAGE" + ahk_do " + SetTitleMatchMode, 2 + run SHIFTPCPATCHV1.02_NA.exe + WinWait Updating + WinWaitClose Updating + " + + # Need path on shift.exe, see bug 23319 + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Electronic Arts\\Need for Speed SHIFT" +.\shift.exe +__EOF__ +} + +#---------------------------------------------------------------- + +verblist_add nfsshift_demo "Need For Speed: SHIFT Demo (EA, 2009) [download]" NFSSHIFTPCDEMO.exe + +load_nfsshift_demo() +{ + load_autohotkey + + if ! test -f "$WISOTOOL_CACHE/$PACKAGE/NFSSHIFTPCDEMO.exe" + then + download $PACKAGE http://cdn.needforspeed.com/data/downloads/shift/NFSSHIFTPCDEMO.exe 7b267654d08c54f15813f2917d9d74ec40905db7 + fi + + mkdir -p "$WISOTOOL_TMP/$PACKAGE" + # FIXME: use ln -s on Linux (in case user has run 'winetricks sandbox'), + # but run the package from the cache on Windows + cp "$WISOTOOL_CACHE/$PACKAGE/NFSSHIFTPCDEMO.exe" "$WISOTOOL_TMP" + ahk_do " + SetTitleMatchMode, 2 + SetTitleMatchMode, slow + run, $WISOTOOL_TMP_WIN\\NFSSHIFTPCDEMO.exe + winwait, WinRAR + send $WISOTOOL_TMP_WIN\\$PACKAGE + ControlClick, Button2 + winwait, SHIFT, View the readme + controlclick, Button1 + ; Not all systems need the Visual C++ runtime + loop + { + ifwinexist, Visual C++ + { + controlclick, Button1 + break + } + ifwinexist, Setup, SHIFT Demo License + { + break + } + sleep 1000 + } + winwait, Setup, SHIFT Demo License + Sleep 1000 + send {Space} + Sleep 1000 + send {Enter} + winwait, Setup, DirectX + Sleep 1000 + send {Space} + Sleep 1000 + send {Enter} + winwait, Setup, Destination + Sleep 1000 + send {Enter} + winwait, Setup, begin + Sleep 1000 + controlclick, Button1 + winwait, Setup, Finish + Sleep 1000 + controlclick, Button5 + controlclick, Button1 + " + cd "$olddir" + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Electronic Arts\\Need for Speed SHIFT Demo" +shiftdemo.exe +__EOF__ +} + +#---------------------------------------------------------------- + +verblist_add oblivion "Elder Scrolls: Oblivion (Bethesda Game Studios, 2006)" 0c6826d55029e7b64150ebe804220284962657e1.iso + +load_oblivion() +{ + load_autohotkey + + iso_mount "$WISOTOOL_CACHE"/$PACKAGE/0c6826d55029e7b64150ebe804220284962657e1.iso + + ahk_do " + SetTitleMatchMode, 2 + run, ${ISO_MOUNT_LETTER}:Setup.exe + winwait, Oblivion, Welcome to the + controlclick, Button1 + winwait, Oblivion, License Agreement + controlclick, Button3 + controlclick, Button1 + winwait, Oblivion, Choose Destination + controlclick, Button1 + winwait, Oblivion, Ready to Install + controlclick, Button1 + winwait, Oblivion, Complete + controlclick, Button1 + controlclick, Button2 + controlclick, Button3 + " + iso_umount + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Bethesda Softworks Oblivion\\Oblivion" +Oblivion.exe +__EOF__ +} + +#---------------------------------------------------------------- + verblist_add orangebox "Orange Box (Valve, 2007) " \ 976f67eec4b84331de8f6695272bc9192466da6a.iso \ b86c9297cc4c56e98f8c3f3e489091ffa4b4a11d.iso @@ -2450,7 +3939,7 @@ verblist_add orangebox "Orange Box (Valve, 2007) " \ load_orangebox() { load_autohotkey - test -f "$programfilesdir_x86_unix"/Steam/Steam.exe || sh $WINETRICKS -q steam + test -f "$programfilesdir_x86_unix"/Steam/Steam.exe || try sh $WINETRICKS -q steam # Have to log in before you can install orangebox! $WINE 'c:\Program Files\Steam\Steam' -login $STEAMUSER $STEAMPW # Now, um, let it log in for a few seconds. Anyone know how to tell when it's done? @@ -3153,6 +4642,69 @@ load_quake3() { #---------------------------------------------------------------- +verblist_add sega_rally_2 "Sega Rally 2 (Sega, 1999)" rally2.exe + +# http://appdb.winehq.org/objectManager.php?sClass=application&iId=6961 +load_sega_rally_2() { + load_autohotkey + + download $PACKAGE http://www2.sega.co.jp/download/pc/rally2/rally2.exe 1c0560c9f7d22343511a8ad46dbe606c6c7417c9 + + # Installer starts by extracting files, but doesn't seem to be a zip file or a cab file. I tried a few cli arguments, + # but had no luck. It's only 60 MB extracted, so just extract it fresh each time. + cd "$WISOTOOL_CACHE/$PACKAGE" + ahk_do " + SetTitleMatchMode, 2 + run, rally2.exe + winwait, WinSFX32 V2.16.2.6, Install &Directory: + sleep 1000 + controlclick, Button2, WinSFX32 V2.16.2.6, Install &Directory: + loop + { + ifwinexist, WinSFX32 V2.16.2.6, Install &Directory: + sleep 5000 + else + break + } + " + cd rally2/JP_DEMO + # There's a lot of unknown characters (presumably Japanese). Should this require user to run in + # a Japanese locale? + ahk_do " + SetTitleMatchMode, 2 + run, RALLY2DEMO.EXE + winwait, ????, SEGA RALLY 2 DEMO ??????? + sleep 1000 + controlclick, Button1, ????, SEGA RALLY 2 DEMO ??????? + winwait, ??????????, ???????????????? SEGA RALLY 2 DEMO ??????????? + sleep 1000 + controlclick, Button1, ??????????, ???????????????? SEGA RALLY 2 DEMO ??????????? + winwait, ??????? ????????, ??????????????????? ????????????? ????????????????????????????????????????????????????[??]??????????????? + sleep 1000 + controlclick, Button2, ??????? ????????, ??????????????????? ????????????? ????????????????????????????????????????????????????[??]??????????????? + winwait, ??????????, SEGA RALLY 2 DEMO + sleep 1000 + controlclick, Button4, ??????????, SEGA RALLY 2 DEMO + ; Automatically runs the game after install. Kill it. + sleep 3000 + process, close, LAUNCH.exe + " + cd "$olddir" + + if workaround_wine_bug 22668 + then + warn "The game is unplayable due to http://bugs.winehq.org/show_bug.cgi?id=22668. No known workaround." + fi + +cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\Sega\SEGA RALLY 2 DEMO" +"SEGA RALLY 2 DEMO.exe" +__EOF__ + +} + +#---------------------------------------------------------------- + verblist_add 7million "7Million (Deep Silver, 2009) [download] [broken on wine]" 7Million_0_17_0-full.exe load_7million() { @@ -3196,6 +4748,33 @@ __EOF__ #---------------------------------------------------------------- +verblist_add secondlife_beta "Second Life Viewer - Beta [Download]" Second_Life_2-1-0-207030_Setup.exe + +load_secondlife_beta() { + load_autohotkey + download $PACKAGE http://download.cloud.secondlife.com/Viewer-2-1/Second_Life_2-1-0-207030_Setup.exe + + cd "$WISOTOOL_CACHE/$PACKAGE" + ahk_do " + SetTitleMatchMode, 2 + run, Second_Life_2-1-0-207030_Setup.exe + winwait, Installer Language + send {Enter} + winwait, Installation Folder + send {Enter} + winwait, Second Life, Start Second Life now + send {Tab}{Enter} + " + cd "$olddir" + + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd $programfilesdir_x86_win\\SecondLifeViewer2 +SecondLife.exe +__EOF__ +} + +#---------------------------------------------------------------- + verblist_add sims3 "The Sims 3 (EA, 2009)" 8a82a067f3bb8f68d034a06954e9a16ea381958a.iso load_sims3() { @@ -3208,7 +4787,7 @@ load_sims3() { if workaround_wine_bug 21517 then - try sh "$WINETRICKS" -q d3dx9 + try sh "$WINETRICKS" -q d3dx9_36 fi # Get user's key @@ -3262,13 +4841,88 @@ load_sims3() { # FIXME: apply next patch, too cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ -cd "$programfilesdir_x86_win\Electronic Arts\The Sims 3\Game\Bin" +cd "$programfilesdir_x86_win\\Electronic Arts\\The Sims 3\\Game\\Bin" TS3.EXE __EOF__ } #---------------------------------------------------------------- +verblist_add singularity "Singularity (Activision, 2010)" cfbba29fa8db1b9f87a90ea2f54c63026757c13d.iso + +load_singularity() { + load_autohotkey + + # Get user's key + KEY=`cat "$WISOTOOL_CACHE"/$PACKAGE/cfbba29fa8db1b9f87a90ea2f54c63026757c13d.txt | tr -d -` + + echo KEY is $KEY + iso_mount "$WISOTOOL_CACHE"/$PACKAGE/cfbba29fa8db1b9f87a90ea2f54c63026757c13d.iso + ahk_do " + run ${ISO_MOUNT_LETTER}:setup.exe + winwait, Activision(R) - InstallShield, Select the language for the installation from the choices below. + sleep 1000 + controlclick, Button1, Activision(R) - InstallShield, Select the language for the installation from the choices below. + sleep 1000 + winwait, Singularity(TM), Keycode Check + sleep 1000 + Send $KEY + sleep 1000 + Send {Enter} + ; Well this is annoying... + Winwait, Keycode Check, The Keycode you entered appears to be valid. + sleep 1000 + Send {Enter} + winwait, Singularity(TM), The InstallShield Wizard will install Singularity(TM) on your computer + sleep 1000 + controlclick, Button1, Singularity(TM), The InstallShield Wizard will install Singularity(TM) on your computer + winwait, Singularity(TM), Please read the following license agreement carefully + sleep 1000 + controlclick, Button5, Singularity(TM), Please read the following license agreement carefully + sleep 1000 + controlclick, Button2, Singularity(TM), Please read the following license agreement carefully + winwait, Singularity(TM), Minimum System Requirements + sleep 1000 + controlclick, Button1, Singularity(TM), Minimum System Requirements + winwait, Singularity(TM), Select the setup type to install + controlclick, Button4, Singularity(TM), Select the setup type to install + sleep 5000 + Loop + { + ifwinexist, Singularity(TM) + sleep 15000 + else + break + } + " + iso_umount + + if workaround_wine_bug 6971 + then + sh "$WINETRICKS" -q mwo=force + fi + + if workaround_wine_bug 22548 + then + echo "Disabling \'depth of field\'" + cat > "$WISOTOOL_TMP"/dof.reg <<_EOF_ +REGEDIT4 + +[HKEY_CURRENT_USER\Software\Activision\Singularity] +"DepthOfField"=dword:00000000 + +_EOF_ + try_regedit "$WISOTOOL_TMP_WIN"\\dof.reg + fi + +cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Activision\Singularity(TM)\Binaries" +Singularity.exe +__EOF__ +} + +#---------------------------------------------------------------- + verblist_add splitsecond_demo "Split Second Demo (Black Rock Studios, 2010) [wine bug 22865]" SplitSecond_Demo.exe load_splitsecond_demo() @@ -3297,7 +4951,8 @@ load_splitsecond_demo() SetTitleMatchMode, 2 run, "$exe" winwait, Split, Language - ControlClick, Next, Split, Language + ;ControlClick, Next, Split, Language ; does not quite work, have to use {Enter} instead + Send {Enter} winwait, Split, game installation ControlClick, Button1, Split, game installation winwait, Split, license @@ -3317,6 +4972,12 @@ load_splitsecond_demo() ControlClick, Button4, Split, completed " cd "$olddir" + + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Disney Interactive Studios\\Split Second Demo" +SplitSecondDEMO.exe +__EOF__ + } #---------------------------------------------------------------- @@ -3348,7 +5009,8 @@ load_splitsecond() SetTitleMatchMode, 2 run setup.exe winwait, Split, Language - ControlClick, Next, Split, Language + ;ControlClick, Next, Split, Language ; does not quite work, have to use {Enter} instead + Send {Enter} winwait, Split, game installation ControlClick, Button1, Split, game installation winwait, Split, license @@ -3368,6 +5030,12 @@ load_splitsecond() ControlClick, Button4, Split " iso_umount + + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Disney Interactive Studios\\Split Second" +SplitSecond.exe +__EOF__ + } #---------------------------------------------------------------- @@ -3399,7 +5067,8 @@ load_spore() winwait, SPORE, begin controlclick, Button1 winwait, Question - controlclick, Button7 + ; download managers are usually a pain, so always say no to such questions + controlclick, Button2 winwait, SPORE, complete controlclick, Button1 controlclick, Button2 @@ -3407,13 +5076,64 @@ load_spore() " iso_umount cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ -cd "$programfilesdir_x86_win\Electronic Arts\SPORE\Sporebin" +cd "$programfilesdir_x86_win\\Electronic Arts\\SPORE\\Sporebin" SporeApp.exe __EOF__ } #---------------------------------------------------------------- +verblist_add ssdd2 "SpongeBob SquarePants Diner Dash 2 (Nickelodeon/Big Fish, 2007) [download]" InstallSpongeBobDinerDash2.exe + +load_ssdd2() +{ + load_autohotkey + # Main page: http://arcade.nick.com/nick/gameinfo.jsp?s=SpongeBobDinerDash2 + download $PACKAGE http://nickdownloads.shockwave.com/InstallSpongeBobDinerDash2.exe 8407dae2c062ce62b38408eeac3a9f95be202b96 + + if workaround_wine_bug 23749 + then + sh "$WINETRICKS" -q ie6 + fi + + cd "$WISOTOOL_CACHE/$PACKAGE" + ahk_do " + SetTitleMatchMode, 2 + run InstallSpongeBobDinerDash2.exe + winwait, Welcome + sleep 1000 + controlclick, Button1, Welcome + sleep 1000 + winwait, End User License + sleep 1000 + controlclick, Button1, End User License + winwait, Choose Destination Location + sleep 1000 + controlclick, Button1, Choose Destination Location + winwait, FREE Toolbar + sleep 1000 + controlclick, Button5, FREE Toolbar + sleep 1000 + controlclick, Button1, FREE Toolbar + winwait, Start Installation + sleep 1000 + controlclick, Button1, Start Installation + winwait, Installation Complete + sleep 1000 + controlclick, Button1, Installation Complete + " + sleep 5 + killall winefile.exe + +cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\Nick Arcade\\SpongeBob SquarePants Diner Dash 2" +"SpongeBob SquarePants Diner Dash 2.exe" +__EOF__ + +} + +#---------------------------------------------------------------- + verblist_add starcraft "Starcraft Battle Chest (Blizzard, 1998)" 8d6cc11bc76b8af22868a95e17e0282277e9c53c.iso 966bae1f2e2035e066139e78137e623c92838254.iso load_starcraft() { @@ -3456,32 +5176,28 @@ load_starcraft() { #---------------------------------------------------------------- -verblist_add starcraft2 "Starcraft II beta (Blizzard, 2010)" "StarCraft II Beta enUS 13891 Installer/Installer.exe" +verblist_add starcraft2 "Starcraft II (Blizzard, 2010)" 044bf7a83b0fc7086a4f89b44ea44d74af320059.iso + +# http://appdb.winehq.org/objectManager.php?sClass=version&iId=20882 load_starcraft2() { load_autohotkey + load_gecko - if test -d "$programfilesdir_unix/StarCraft II Beta" + # Force clean-ish install + test -d "$programfilesdir_unix/StarCraft II" && rm -rf "$programfilesdir_unix/StarCraft II" + + iso_mount "$WISOTOOL_CACHE"/$PACKAGE/044bf7a83b0fc7086a4f89b44ea44d74af320059.iso + + if workaround_wine_bug 23824 then - warn "$PACKAGE already installed, skipping." - return 0 + warn "The installer may not run, see http://bugs.winehq.org/show_bug.cgi?id=23824. No known workaround yet." fi - if ! test -f "$WISOTOOL_CACHE/$PACKAGE/StarCraft II Beta enUS 13891 Installer/Installer.exe" - then - die "You must have run the downloader and told it to save in $WISOTOOL_CACHE/$PACKAGE" - fi - - if ! test -f "$WINDIR"/system32/plugin.ocx && workaround_wine_bug 22089 - then - try sh "$WINETRICKS" -q ie6 - fi - - cd "$WISOTOOL_CACHE/$PACKAGE/StarCraft II Beta enUS 13891 Installer" ahk_do " SetTitleMatchMode, 2 - run Installer.exe - winwait, StarCraft II Beta Installer + run ${ISO_MOUNT_LETTER}:Installer.exe + winwait, StarCraft II Installer ControlClick, x300 y200 winwait, End User License Agreement winactivate @@ -3489,14 +5205,19 @@ load_starcraft2() { Click WheelDown, 70 Sleep, 1000 ControlClick, Agree - winwait, Installation Destination Directory - send {Enter} + winwait, StarCraft II Installer + sleep 1000 + ControlClick, x800 y500 + winwait, StarCraft II Activation + sleep 1000 + ; Skip activation + controlclick, Button2, StarCraft II Activation winwait, StarCraft II v, update was successful winclose " - cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ -cd "$programfilesdir_x86_win\StarCraft II Beta" +cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\StarCraft II" "StarCraft II.exe" __EOF__ } @@ -3614,6 +5335,206 @@ __EOF__ #---------------------------------------------------------------- +verblist_add sf4bench "Street Fighter 4: Benchmark (CAPCOM, 2009) [download]" StreetFighterIV_Benchmark.exe + +load_sf4bench() +{ + load_autohotkey + + if ! test -f "$WISOTOOL_CACHE/$PACKAGE/StreetFighterIV_Benchmark.exe" + then + download $PACKAGE http://gamedaily.newaol.com/pub/StreetFighterIV_Benchmark.exe f7754210308b3a0ff2bb3be3a62b22767519ca62 + fi + + cd "$WISOTOOL_CACHE"/$PACKAGE + + ahk_do " + SetTitleMatchmode, 2 + run, StreetFighterIV_Benchmark.exe + winwait, Choose + controlclick, Button1 + winwait, STREET, To continue, click Next + controlclick, Button1 + winwait, STREET, license agreement + controlclick, Button3 + controlclick, Button5 + winwait, STREET, Destination Folder + controlclick, Button1 + winwait, STREET, ready to begin + controlclick, Button1 + winwait, STREET, successfully installed + controlclick, Button1 + + " + + # The game has a flickering graphics problem when parallel rendering is enabled. + # You can disable it and tweak benchmark settings via the config.ini file. + if workaround_wine_bug 23647 + then + cd "$DRIVE_C/users/$USERNAME/Local Settings/Application Data" + if test -f CAPCOM/STREETFIGHTERIVBENCHMARK/config.ini + then + cd CAPCOM/STREETFIGHTERIVBENCHMARK + mv config.ini config.ini.old + sed 's,RenderingThread=ON,RenderingThread=OFF,' config.ini.old > config.ini + else + mkdir -p "CAPCOM/STREETFIGHTERIVBENCHMARK" + cd "CAPCOM/STREETFIGHTERIVBENCHMARK" + cat > config.ini <<__EOF__ +[SYSTEM] +RenderingThread=OFF +[DISPLAY] +Resolution=1024x768 +RefreshRate=60Hz +FullScreen=YES +VSync=OFF +FrameRate=VARIABLE +Aspect=AUTO +[GRAPHICS] +MSAA=NONE +TextureFilter=DEFAULT +ModelQuality=HIGH +StageQuality=HIGH +SoftShadowQuality=LOW +SelfShadowQuality=LOW +MotionBlurQuality=LOW +ParticleQuality=MIDDLE +ExtraTouch=OFF +Brightness=50 +[BENCHMARK] +Type=BATTLE+DEMO +Loop=OFF +[GAME] +FPS=ON +__EOF__ + fi + fi + + cd "$olddir" + +cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\CAPCOM\\STREETFIGHTERIV_BENCHMARK" +StreetFighterIV_Benchmark.exe +__EOF__ +} + +verblist_add smbx "Super Mario Bros. X (Indie, 2009) [download]" smbx122.exe + +load_smbx() { + load_autohotkey + + # Download URL embedded in http://www.supermariobrothers.org/downloads/smbx122.html + download $PACKAGE http://www.tehgamez.com/a/smbx122.exe 269eb60d502e57fdfae9c3601ad9ee22801cb5d1 + + # This winetricks verb doesn't work on Windows yet, but that's ok-ish, Windows comes with vb6 runtime + sh "$WINETRICKS" -q vb6run + + if workaround_wine_bug 23821 + then + # http://www.supermariobrothers.org/forums/viewtopic.php?f=8&t=6711 + # claims this works + sh "$WINETRICKS" -q quartz + fi + + cd "$WISOTOOL_CACHE/$PACKAGE" + + ahk_do " + SetTitleMatchMode, 2 + run smbx122.exe + + WinWait, Setup - Super Mario Bros. X, Welcome + Send {Enter} + WinWait, Setup - Super Mario Bros. X, Information + Send {Enter} + WinWait, Setup - Super Mario Bros. X, Select Destination Location + Send {Enter} + WinWait, Setup - Super Mario Bros. X, Select Start Menu Folder + Send {Enter} + WinWait, Setup - Super Mario Bros. X, Additional Tasks + Send {Enter} + WinWait, Setup - Super Mario Bros. X, Recommended by + MouseMove, 36,274 + Click ; Don't install recommended (Ad) software + Send {Enter} + WinWait, Setup - Super Mario Bros. X, Ready to Install + Send {Enter} + WinWait, Setup - Super Mario Bros. X, Information + Send {Enter} + WinWait, Setup - Super Mario Bros. X, Completing + Send {Space} ; Don't run game + Send {Enter} + " + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd C:\\SMBX +smbx.exe +__EOF__ +} + +#---------------------------------------------------------------- + +verblist_add twfc "Transformers: War for Cybertron (Activision, 2010)" d96a2ebbd15c3d03286d1b8b5601e7038cab46b1.iso + +load_twfc() { + load_autohotkey + + iso_mount "$WISOTOOL_CACHE"/$PACKAGE/d96a2ebbd15c3d03286d1b8b5601e7038cab46b1.iso + + KEY=`cat "$WISOTOOL_CACHE"/$PACKAGE/d96a2ebbd15c3d03286d1b8b5601e7038cab46b1.txt | tr -d -` + + ahk_do " + run ${ISO_MOUNT_LETTER}:setup.exe + SetTitleMatchMode, 2 + winwait, Activision, Select the language for the installation + sleep 1000 + controlclick, Button1, Activision, Select the language for the installation + winwait, Transformers, Press NEXT to verify your key + sleep 1000 + send $KEY + send {Enter} + winwait, Keycode Check, The Keycode you entered appears to be valid + sleep 1000 + send {Enter} + winwait, Transformers, The InstallShield Wizard will install Transformers + sleep 1000 + controlclick, Button1, Transformers, The InstallShield Wizard will install Transformers + winwait, Transformers, License Agreement + sleep 1000 + controlclick, Button5, Transformers, License Agreement + sleep 1000 + controlclick, Button2, Transformers, License Agreement + winwait, Transformers, Minimum System Requirements + sleep 1000 + controlclick, Button1, Transformers, Minimum System Requirements + winwait, Transformers, Select the setup type to install + sleep 1000 + controlclick, Button4, Transformers, Select the setup type to install + + ; Installer exits silently. Prevent an early umount: + sleep 5000 + Loop + { + ifwinexist, Transformers + sleep 15000 + else + break + } + " + iso_umount + + if workaround_wine_bug 6971 + then + sh "$WINETRICKS" mwo=force + fi + +cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\Activision\Transformers - War for Cybertron\Binaries" +TWFC.exe +__EOF__ + +} + +#---------------------------------------------------------------- + verblist_add unigine_heaven "Unigen Heaven 2 Benchmark (Unigen, 2010) [download]" Unigine_Heaven-2.0.msi load_unigine_heaven() { @@ -3690,14 +5611,15 @@ load_wog() { ahk_do " run WorldOfGooDemo.1.0.exe winwait, World of Goo Setup, License Agreement - send {Enter} + sleep 1000 + send {Enter} winwait, World of Goo Setup, Choose Components - send {Enter} + send {Enter} winwait, World of Goo Setup, Choose Install Location - send {Enter} + send {Enter} winwait, World of Goo Setup, Thank you - ControlClick, Make me dirty right now, World of Goo Setup, Thank you - send {Enter} + ControlClick, Make me dirty right now, World of Goo Setup, Thank you + send {Enter} " cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ cd "$programfilesdir_x86_win\WorldOfGooDemo" @@ -3707,6 +5629,36 @@ __EOF__ #---------------------------------------------------------------- +verblist_add wowtrial "World of Warcraft trial(Blizzard, 2009)" TryWoW.exe + +load_wowtrial() { + load_autohotkey + + download $PACKAGE https://www.worldofwarcraft.com/downloads/files/pc/enUS/TryWoW.exe 832866b591ea20fa2e5d30c36dcca92aec9ea36a + + ahk_do " + SetTitleMatchMode, slow + run "$WISOTOOL_CACHE/$PACKAGE/TryWoW.exe" + winwait, World of Warcraft Trial v2.0.0.373 + sleep 1000 + controlclick, Button2, World of Warcraft Trial v2.0.0.373 + winwait, World of Warcraft Trial v2.0.0.373, &Agree + sleep 1000 + controlclick, Static2, World of Warcraft Trial v2.0.0.373 + sleep 1000 + controlclick, Button3, World of Warcraft Trial v2.0.0.373 + winwait, World of Warcraft Trial v2.0.0.373, C:\Program Files\World of Warcraft Trial + sleep 1000 + controlclick, Button2, World of Warcraft Trial v2.0.0.373, C:\Program Files\World of Warcraft Trial + ; FIXME: What does the success window look like? + winwait, Launcher, Launcher requires write permission + sleep 1000 + controlclick, Button1, Launcher + " +} + +#---------------------------------------------------------------- + verblist_add wowbc "World of Warcraft: Battle Chest (Blizzard, 2008)" \ c874f5bc676eef8e60d3d232fe6db185c4632fb3.iso @@ -3720,26 +5672,27 @@ load_wowbc() { esac # Torrent file URLs found on http://www.wowwiki.com/Patch_mirrors - # Patch 3.3.2.11403-to-3.3.3.11685-enUS-patch.exe is downloaded from http://alexsmith.im/wow-patches/enus-patches + # Patches 3.3.2.11403-to-3.3.3.11685-enUS-patch.exe up to 3.3.5 are downloaded from http://alexsmith.im/wow-patches/enus-patches download $PACKAGE "http://a.wirebrain.de/wow/torrent/WoW-3.x.x.x-3.2.0.10192-x86-Win-enUS.torrent" f9e96e7b4edc6a4c22faad084eef147853e3ebb5 download $PACKAGE "http://a.wirebrain.de/wow/torrent/WoW-3.2.0.10192-3.3.0.10958-x86-Win-enUS.torrent" 33bdf8749b3c3781451b5f6ac2a59ba29d6c61bd download $PACKAGE "http://a.wirebrain.de/wow/torrent/WoW-3.3.0.10958-3.3.0.11159-x86-Win-enUS.torrent" b7ad37a75713f6d8e578558ca1e321927192c6c6 download $PACKAGE "http://a.wirebrain.de/wow/torrent/WoW-3.3.0.11159-to-3.3.2.11403-enUS-patch.torrent" f73763541197fecdcca9b9f8cf91e83cde989a49 download $PACKAGE "http://uk1.files.alexsmith.im/enUS/WoW-3.3.2.11403-to-3.3.3.11685-enUS-patch.exe" ce73a0a8aa9f6eaf00b5e7cd0a34eb928738fd36 - download $PACKAGE "http://server1.fiberdownload.com/7_kituri/World-of-Warcraft.zip" 76d3c7f1c034e5533132e610b2e1b8f376893fdc + download $PACKAGE "http://uk1.files.alexsmith.im/enUS/WoW-3.3.3.11685-to-3.3.3.11723-enUS-patch.exe" + download $PACKAGE "http://uk1.files.alexsmith.im/enUS/WoW-3.3.3.11723-to-3.3.5.12213-enUS-patch.exe" cd "$WISOTOOL_CACHE/$PACKAGE" - try unzip -quo World-of-Warcraft.zip patch1=`stat -Lc%s WoW-3.2.0-enUS-patch.exe` patch2=`stat -Lc%s WoW-3.2.0.10192-to-3.3.0.10958-enUS-patch.exe` patch3=`stat -Lc%s WoW-3.3.0.10958-to-3.3.0.11159-enUS-patch.exe` patch4=`stat -Lc%s WoW-3.3.0.11159-to-3.3.2.11403-enUS-patch.exe` patch5=`stat -Lc%s WoW-3.3.2.11403-to-3.3.3.11685-enUS-patch.exe` patch6=`stat -Lc%s WoW-3.3.3.11685-to-3.3.3.11723-enUS-patch.exe` + patch7=`stat -Lc%s WoW-3.3.3.11723-to-3.3.5.12213-enUS-patch.exe` - if [ $patch5 -ne 128600432 ] || [ $patch6 -ne 4959280 ] + if [ $patch5 -ne 128600432 ] || [ $patch6 -ne 4959280 ] || [ $patch7 -ne 24886168 ] then - die "Failed to download patch 3.3.3.11685 or patch 3.3.3.11723" + die "Failed to download patch 3.3.3.11685, or patch 3.3.3.11723, or patch 3.3.5.12213" fi if [ $patch1 -eq 1323316774 ] && [ $patch2 -eq 572045930 ] && [ $patch3 -eq 5101376 ] && [ $patch4 -eq 167050587 ] @@ -3756,8 +5709,18 @@ load_wowbc() { ahk_do " SetTitleMatchMode, 2 winwait, Torrent + sleep 3000 + ;App doesnt remember the set as default setting winwait, Torrent, default - controlclick, Button7, Torrent, default + send n + sleep 3000 + ;Cancels bandwidth test on first run of uTorrent + ifwinactive, Torrent, Bandwidth + { + controlclick, Button5, Torrent, Bandwidth + } + sleep 1000 + ;Sets paramater to close uTorrent once all downloads are complete send !o send a{Down}{Enter} winwaitclose, Torrent @@ -3765,19 +5728,19 @@ load_wowbc() { fi cd "$olddir" - if ! test -d "$WISOTOOL_CACHE"/$PACKAGE/tempcd + if ! test -d "$WISOTOOL_TMP"/$PACKAGE/tempcd then - try mkdir -p "$WISOTOOL_CACHE"/$PACKAGE/tempcd + try mkdir -p "$WISOTOOL_TMP"/$PACKAGE/tempcd iso_mount "$WISOTOOL_CACHE"/$PACKAGE/c874f5bc676eef8e60d3d232fe6db185c4632fb3.iso sleep 5 - try cp -r "$ISO_MOUNT_ROOT"/* "$WISOTOOL_CACHE"/$PACKAGE/tempcd + try cp -r "$ISO_MOUNT_ROOT"/* "$WISOTOOL_TMP"/$PACKAGE/tempcd fi # Checks if WoW is installed. If so, skips primary install and proceeds to applying patches if ! test -d "$DRIVE_C/Program Files/World of Warcraft" then ahk_do " - run "$WISOTOOL_CACHE"/$PACKAGE/tempcd/Installer.exe + run "$WISOTOOL_TMP_WIN"/$PACKAGE/tempcd/Installer.exe SetTitleMatchMode, 2 winwait, Burning Crusade Installer sleep 4000 @@ -3813,7 +5776,9 @@ load_wowbc() { WoW-3.3.0.10958-to-3.3.0.11159-enUS-patch.exe\ WoW-3.3.0.11159-to-3.3.2.11403-enUS-patch.exe\ WoW-3.3.2.11403-to-3.3.3.11685-enUS-patch.exe\ - WoW-3.3.3.11685-to-3.3.3.11723-enUS-patch.exe + WoW-3.3.3.11685-to-3.3.3.11723-enUS-patch.exe\ + WoW-3.3.3.11723-to-3.3.5.12213-enUS-patch.exe + do ahk_do " @@ -3840,7 +5805,7 @@ load_wowbc() { } else { - ; Don't let it download the next patch + ; Dont let it download the next patch winwait, World of Warcraft, Estimated time winkill, World of Warcraft, Estimated time } @@ -3849,6 +5814,10 @@ load_wowbc() { echo "Patched $file" sleep 5 done + cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\\World of Warcraft" +Wow.exe +__EOF__ } #---------------------------------------------------------------- @@ -4351,6 +6320,305 @@ load_beneath_a_steel_sky_gog() #---------------------------------------------------------------- +# Generic Steam installer +# Usage: app_id game_title game_folder +# app_id +# Application ID. See http://developer.valvesoftware.com/wiki/Steam_Application_IDs for list. +# game_title +# Used for AutoHotKey. FIXME: is this guaranteed to match the wiki? +# game_cache_file +# .gcf or .ncf file name. Note: Does _NOT_ always match the game folder name below. +# game_folder +# Folder where files are stored under $STEAMDIR/steamapps/common/ +# game_extra_files +# Most games/demos come with one .gcf or .ncf file, then everything else in the +# $STEAMDIR/steamapps/common/$game_folder directory. Some (Total War demos) have several +# more .gcf/.ncf files. This should be a list, separated by commas. +# +# +# Note: Requires $STEAMUSER $STEAMPASS to be set in your environment or in +# "$WISOTOOL_CACHE"/STEAM_USER" and in "$WISOTOOL_CACHE"/STEAM_PASS" + +_load_steam_app() +{ + if [ ! "$STEAM_USER" -a ! -f "$WISOTOOL_CACHE"/STEAM_USER ] + then + die "You need to set STEAM_USER variable in your environment or put it in "$WISOTOOL_CACHE"/STEAM_USER" + elif [ ! "$STEAM_USER" -a -f "$WISOTOOL_CACHE"/STEAM_USER ] + then + STEAM_USER=`cat "$WISOTOOL_CACHE"/STEAM_USER` + fi + + if [ ! "$STEAM_PASS" -a ! -f "$WISOTOOL_CACHE"/STEAM_PASS ] + then + die "You need to set STEAM_PASS variable in your environment or put it in "$WISOTOOL_CACHE"/STEAM_PASS" + elif [ ! "$STEAM_PASS" -a -f "$WISOTOOL_CACHE"/STEAM_PASS ] + then + STEAM_PASS=`cat "$WISOTOOL_CACHE"/STEAM_PASS` + fi + + steam_dir="$programfilesdir_unix/Steam" + + load_autohotkey + test -f "$steam_dir/Steam.exe" || try sh $WINETRICKS -q steam + + app_id="$1" + game_title="$2" + game_cache_file="$3" + game_folder="$4" + game_extra_files="$5" + + # If files are already cached, skipped downloading/installing and just restore from cache: + if [ ! -f "$WISOTOOL_CACHE/$PACKAGE/$game_cache_file" ] + then + cd "$steam_dir" + sleep 5 + ahk_do " + ; Originally used: + ; run, Steam.exe -login $STEAM_USER $STEAM_PASS -applaunch $app_id + ; but that doesn't work for all programs. Some would silently fail to start. + + ; Instead, run steam in the background, sleep for 30s to give it enough time + ; to start, then use the steam:// prototol to install: + run, Steam.exe -login $STEAM_USER $STEAM_PASS + ; FIXME: should detect steam running properly... + ; + ; Give Steam up to a minute to update itself. Once it is, let it update. + ; Then give it 30 more seconds. + ; FIXME: perhaps there's a log/file showing if steam is up to date... + Winwait, Steam - Updating,,60 + Loop + { + SetTitleMatchMode, Slow + IfWinExist, Steam - Updating + sleep 10000 + IfWinNotExist, Steam - Updating + break + } + sleep 30000 + run, steam://install/$app_id + + ; Info screen, disk space required, etc. + winwait, Install - $game_title + winactivate, Install - $game_title + ; FIXME: How long should this take? + sleep 10000 + send {enter} + sleep 10000 + + ; Install shortcuts? + winwait, Install - $game_title + winactivate, Install - $game_title + ; FIXME: How long should this take? + sleep 10000 + send {enter} + sleep 10000 + + ; Here, it's getting the .gcf/.ncf files. This is normally quick, but can take a long time. + ; Most finish in a few seconds, but the Total War demos takes a couple minutes. + ; So, we'll exit AHK, then wait for all the game files to be present, + ; before continuing the install. + exit + " + + if test ! "$game_extra_files" = "" + then + # FIXME: Should we perhaps sha1sum? That would get messy... + cd steamapps + IFS=$',' + for x in $game_extra_files + do + while true + do + if test -f $x + then + break + else + sleep 5 + fi + done + done + unset IFS + cd .. + fi + + # FIXME: Is this a long enough sleep? + sleep 30 + + ahk_do " + winwait, Install - $game_title + winactivate, Install - $game_title + ; FIXME: How long should this take? + sleep 10000 + send {enter} + " + + # now wait for the download to complete. We're lucky, Steam has some nice logging + # so we wait until Steam reports the download is complete. Then, to be safe, sleep + # and extra 30 seconds, shutdown steam nicely, and finally, cache everything. + # These are the lines I found for success: + # + # $steam_dir/logs/download_log.txt + # [2010-06-17 00:53:06]: Got eSteamNotifyAppDownloadingPaused for AppID 6110 + # [2010-06-17 00:53:06]: AppID 6110 is now marked not downloading + # [2010-06-17 00:53:06]: Got eSteamNotifyCacheLoadingCompleted for AppID 6110 + # [2010-06-17 00:53:06]: SetHasAllLocalContent(true) called for 6110 + # FIXME: are any of these safe to use? + + dl_log="$steam_dir/logs/download_log.txt" + while true + do + grep "SetHasAllLocalContent(true) called for $app_id" "$dl_log" && break + sleep 15 + done + + sleep 30 + $WINE Steam.exe -shutdown + mkdir -p "$WISOTOOL_CACHE/$PACKAGE" + cp -r "$steam_dir/steamapps/common/$game_folder" "$WISOTOOL_CACHE/$PACKAGE" + cp -r "$steam_dir/steamapps/$game_cache_file" "$WISOTOOL_CACHE/$PACKAGE" + if test ! "$game_extra_files" = "" + then + IFS=$',' + for x in $game_extra_files + do + cp "$steam_dir/steamapps/$x" "$WISOTOOL_CACHE/$PACKAGE" + done + unset IFS + fi + else + mkdir -p "$steam_dir/steamapps/common" + cp -r "$WISOTOOL_CACHE/$PACKAGE/$game_folder" "$steam_dir/steamapps/common" + cp -r "$WISOTOOL_CACHE/$PACKAGE/$game_cache_file" "$steam_dir/steamapps" + if test ! "$game_extra_files" = "" + then + IFS=$',' + for x in $game_extra_files + do + cp "$WISOTOOL_CACHE/$PACKAGE/$x" "$steam_dir/steamapps" + done + unset IFS + fi + fi + + +cat > "$DRIVE_C/run-$PACKAGE.bat" <<__EOF__ +cd "$programfilesdir_x86_win\Steam" +.\Steam.exe -login $STEAM_USER $STEAM_PASS -applaunch $app_id +__EOF__ + +} + +# Sorted by app_id: + +verblist_add multiwinia_demo_steam "Multiwinia: Demo (Steam, 2008)" "multiwinia content.ncf" + +load_multiwinia_demo_steam() +{ + _load_steam_app "1540" "Multiwinia Demo" "multiwinia content.ncf" "multiwinia" +} + +verblist_add arx_fatalis_demo_steam "Arx Fatalis Demo (Steam, 2008)" "arx fatalis base.ncf" + +load_arx_fatalis_demo_steam() +{ + _load_steam_app "1710" "Arx Fatalis" "arx fatalis base.ncf" "arx fatalis" +} + +verblist_add painkiller_demo_steam "Painkiller Demo (Steam, 2004)" "painkiller demo content.ncf" + +load_painkiller_demo_steam() +{ + _load_steam_app "3210" "Painkiller Demo" "painkiller demo content.ncf" "painkiller demo" +} + +verblist_add bookworm_adventures_deluxe_demo_steam "Bookworm Adventures Deluxe Demo (Steam, 2007)" "bookworm adventures deluxe content.ncf" + +load_bookworm_adventures_deluxe_demo_steam() +{ + _load_steam_app "3270" "Bookworm Adventures Deluxe Demo" "bookworm adventures deluxe content.ncf" "bookworm adventures deluxe" +} + +verblist_add zen_of_sudoku_demo_steam "Zen of Sudoku Demo (Steam, 2006)" "zenofsudoku.ncf" + +load_zen_of_sudoku_demo_steam() +{ + _load_steam_app "4910" "Zen of Sudoku Demo" "zenofsudoku.ncf" "zen of sudoku" +} + +verblist_add eets_demo_steam "Eets Demo (Steam, 2006)" "eets content.ncf" + +load_eets_demo_steam() +{ + _load_steam_app "6110" "Eets Demo" "eets content.ncf" "eets" +} + +verblist_add longest_journey_demo_steam "The Longest Journey Demo (Steam, 2000)" "the longest journey demo content.ncf" + +load_longest_journey_demo_steam() +{ + _load_steam_app "6320" "The Longest Journey Demo" "the longest journey demo content.ncf" "the longest journey demo" +} + +verblist_add joint_task_force_demo_steam "Joint Task Force Demo (Steam, 2006)" "joint task force demo content.ncf" + +load_joint_task_force_demo_steam() +{ + _load_steam_app "6410" "Joint Task Force Demo" "joint task force demo content.ncf" "joint task force demo" +} + +verblist_add lost_planet_dx9_demo_steam "Lost Planet Extreme Condition Demo (Steam, 2007)" "lost planet demo dx9 content.ncf" + +load_lost_planet_dx9_demo_steam() +{ + _load_steam_app "6530" "Lost Planet Extreme Condition Demo" "lost planet demo dx9 content.ncf" "lost planet demo" +} + +verblist_add lost_planet_dx10_demo_steam "Lost Planet Extreme Condition DX10 Demo (Steam, 2007)" "lost planet demo dx10 content.ncf" + +load_lost_planet_dx10_demo_steam() +{ + _load_steam_app "6540" "Lost Planet Extreme Condition DX10 Demo" "lost planet demo dx10 content.ncf" "lost planet dx10 demo" +} + +verblist_add total_war_and_empire_demo_steam "Empire: Total War Demo (Steam, 2009)" "empire total war demo main.ncf" + +load_total_war_and_empire_demo_steam() +{ + _load_steam_app "10620" "Empire: Total War" "empire total war demo main.ncf" "empire total war demo" "empire total war demo english.ncf,empire total war demo executable.ncf,empire total war demo redist.ncf" + + if workaround_wine_bug 18490 + then + warn "You'll probably want the patch from http://bugs.winehq.org/show_bug.cgi?id=18490. Otherwise, the game will crash when starting a battle." + fi + +} + +verblist_add napoleon_total_war_demo_steam "Napoleon: Total War Demo (Steam, 2010)" "napoleon total war demo english.ncf" + +load_napoleon_total_war_demo_steam() +{ + _load_steam_app "34050" "Napoleon: Total War" "napoleon total war demo english.ncf" "napoleon total war demo" "napoleon total war demo data_34052.ncf,napoleon total war demo exe_34051.ncf,napoleon total war demo redist_34053.ncf" + + if workaround_wine_bug 23126 + then + try sh "$WINETRICKS" -q vcrun2005 + fi + + if workaround_wine_bug 23356 + then + try sh "$WINETRICKS" -q d3dx9 + fi + + if workaround_wine_bug 18490 + then + warn "You'll probably want the patch from http://bugs.winehq.org/show_bug.cgi?id=18490. Otherwise, the game will crash when starting a battle." + fi + +} + +#---------------------------------------------------------------- + print_version() { echo "$VERSION" } @@ -4499,6 +6767,14 @@ do migrate) migrate_files;; version) print_version;; + *.verb) + case $1 in + */*) . $1 ;; + *) . ./$1 ;; + esac + PACKAGE=`echo $1 | sed 's,.*/,,;s,.verb,,'` + load_$PACKAGE + ;; *) if verblist_is_legal_verb $PACKAGE then load_$PACKAGE @@ -4519,6 +6795,7 @@ do # Source it so the script can call download() if needed. if [ -f "$WISOTOOL_POST"/$PACKAGE/$PACKAGE-postinstall.sh ] then + chmod +x "$WISOTOOL_POST/$PACKAGE/$PACKAGE-postinstall.sh" ( . "$WISOTOOL_POST"/$PACKAGE/$PACKAGE-postinstall.sh ) fi done