winetricks.old 648 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086
  1. #!/bin/sh
  2. # Name of this version of winetricks (YYYYMMDD)
  3. # (This doesn't change often, use the sha1sum of the file when reporting problems)
  4. WINETRICKS_VERSION=20160329
  5. # This is a utf-8 file
  6. # You should see an o with two dots over it here [ö]
  7. # You should see a micro (u with a tail) here [µ]
  8. # You should see a trademark symbol here [™]
  9. #--------------------------------------------------------------------
  10. #
  11. # Winetricks is a package manager for win32 dlls and applications on posix.
  12. # Features:
  13. # - Consists of a single shell script - no installation required
  14. # - Downloads packages automatically from original trusted sources
  15. # - Points out and works around known wine bugs automatically
  16. # - Both commandline and GUI operation
  17. # - Can install many packages in silent (unattended) mode
  18. # - Multiplatform; written for Linux, but supports MacOSX and Cygwin, too
  19. #
  20. # Uses the following non-Posix system tools:
  21. # - wine is used to execute win32 apps except on cygwin.
  22. # - cabextract, unrar, unzip, and 7z are needed by some verbs.
  23. # - aria2c, wget, or curl is needed for downloading.
  24. # - sha1sum or openssl is needed for verifying downloads.
  25. # - zenity is needed by the GUI, though it can limp along somewhat with kdialog.
  26. # - xdg-open (if present) or open (for Mac OSX) is used to open download pages
  27. # for the user when downloads cannot be fully automated.
  28. # - sudo is used to mount .iso images if the user cached them with -k option.
  29. # - perl is used to munge steam config files
  30. # On ubuntu, the following lines can be used to install all the prereqs:
  31. # sudo add-apt-repository ppa:ubuntu-wine/ppa
  32. # sudo apt-get update
  33. # sudo apt-get install cabextract p7zip unrar unzip wget wine1.7 zenity
  34. #
  35. # See http://winetricks.org for documentation and tutorials, including
  36. # how to contribute changes to winetricks.
  37. #
  38. #--------------------------------------------------------------------
  39. #
  40. # Copyright
  41. # Copyright (C) 2007-2014 Dan Kegel <dank!kegel.com>
  42. # Copyright (C) 2008-2016 Austin English <austinenglish!gmail.com>
  43. # Copyright (C) 2010-2011 Phil Blankenship <phillip.e.blankenship!gmail.com>
  44. # Copyright (C) 2010-2015 Shannon VanWagner <shannon.vanwagner!gmail.com>
  45. # Copyright (C) 2010 Belhorma Bendebiche <amro256!gmail.com>
  46. # Copyright (C) 2010 Eleazar Galano <eg.galano!gmail.com>
  47. # Copyright (C) 2010 Travis Athougies <iammisc!gmail.com>
  48. # Copyright (C) 2010 Andrew Nguyen
  49. # Copyright (C) 2010 Detlef Riekenberg
  50. # Copyright (C) 2010 Maarten Lankhorst
  51. # Copyright (C) 2010 Rico Schüller
  52. # Copyright (C) 2011 Scott Jackson <sjackson2!gmx.com>
  53. # Copyright (C) 2011 Trevor Johnson
  54. # Copyright (C) 2011 Franco Junio
  55. # Copyright (C) 2011 Craig Sanders
  56. # Copyright (C) 2011 Matthew Bauer <mjbauer95>
  57. # Copyright (C) 2011 Giuseppe Dia
  58. # Copyright (C) 2011 Łukasz Wojniłowicz
  59. # Copyright (C) 2011 Matthew Bozarth
  60. # Copyright (C) 2013-2014 Andrey Gusev <andrey.goosev!gmail.com>
  61. # Copyright (C) 2013-2015 Hillwood Yang <hillwood!opensuse.org>
  62. # Copyright (C) 2013,2016 André Hentschel <nerv!dawncrow.de>
  63. #
  64. # License
  65. # This program is free software; you can redistribute it and/or
  66. # modify it under the terms of the GNU Lesser General Public
  67. # License as published by the Free Software Foundation; either
  68. # version 2 of the License, or (at your option) any later
  69. # version.
  70. # This program is distributed in the hope that it will be useful,
  71. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  72. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  73. # GNU Lesser General Public License for more details.
  74. # You should have received a copy of the GNU Lesser General Public
  75. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  76. #
  77. #--------------------------------------------------------------------
  78. # Coding standards:
  79. #
  80. # Portability:
  81. # - Portability matters, as this script is run on many operating systems
  82. # - No bash, zsh, or csh extensions; only use features from
  83. # the Posix standard shell and utilities; see
  84. # http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
  85. # - 'checkbashisms -p -x winetricks' should show no warnings (per Debian policy)
  86. # - Prefer classic sh idioms as described in e.g.
  87. # "Portable Shell Programming" by Bruce Blinn, ISBN: 0-13-451494-7
  88. # - If there is no universally available program for a needed function,
  89. # support the two most frequently available programs.
  90. # e.g. fall back to wget if curl is not available; likewise, support
  91. # both sha1sum and openssl.
  92. # - When using unix commands like cp, put options before filenames so it will
  93. # work on systems like MacOSX. e.g. "rm -f foo.dat", not "rm foo.dat -f"
  94. #
  95. # Formatting:
  96. # - Your terminal and editor must be configured for utf-8
  97. # If you do not see an o with two dots over it here [ö], stop!
  98. # - Do not use tabs in this file or any verbs.
  99. # - Indent 4 spaces.
  100. # - Try to keep line length below 80 (makes printing easier)
  101. # - Open curly braces ('{') and 'then' at beginning of line,
  102. # close curlies ('}') and 'fi' should line up with the matching { or if,
  103. # cases aligned with 'case' and 'esac'. For instance,
  104. #
  105. # if test "$FOO" = "bar"
  106. # then
  107. # echo "FOO is bar"
  108. # fi
  109. # case "$FOO" of
  110. # bar) echo "FOO is still bar" ;;
  111. # esac
  112. #
  113. # Commenting:
  114. # - Comments should explain intent in English
  115. # - Keep functions short and well named to reduce need for comments
  116. #
  117. # Naming:
  118. # Public things defined by this script, for use by verbs:
  119. # - Variables have uppercase names starting with W_
  120. # - Functions have lowercase names starting with w_
  121. #
  122. # Private things internal to this script, not for use by verbs:
  123. # - Local variables have lowercase names starting with uppercase _W_
  124. # - Global variables have uppercase names starting with WINETRICKS_
  125. # - Functions have lowercase names starting with winetricks_
  126. # FIXME: A few verbs still use winetricks-private functions or variables.
  127. #
  128. # Internationalization / localization:
  129. # - Important or frequently used message should be internationalized
  130. # so translations can be easily added. For example:
  131. # case $LANG in
  132. # de*) echo "Das ist die deutsche Meldung" ;;
  133. # *) echo "This is the English message" ;;
  134. # esac
  135. #
  136. #--------------------------------------------------------------------
  137. XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
  138. XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
  139. W_PREFIXES_ROOT="${WINE_PREFIXES:-$XDG_DATA_HOME/wineprefixes}"
  140. # For temp files before $WINEPREFIX is available:
  141. if [ -x "`which mktemp 2>/dev/null`" ]
  142. then
  143. W_TMP_EARLY="`mktemp -d "${TMPDIR:-/tmp}/winetricks.XXXXXXXX"`"
  144. W_TMP_EARLY_CLEAN=1
  145. elif [ -w "$TMPDIR" ]
  146. then
  147. W_TMP_EARLY="$TMPDIR"
  148. else
  149. W_TMP_EARLY="/tmp"
  150. fi
  151. #---- Public Functions ----
  152. # Ask permission to continue
  153. w_askpermission()
  154. {
  155. echo "------------------------------------------------------"
  156. echo "$@"
  157. echo "------------------------------------------------------"
  158. if test $W_OPT_UNATTENDED
  159. then
  160. _W_timeout="--timeout 5"
  161. fi
  162. case $WINETRICKS_GUI in
  163. zenity) $WINETRICKS_GUI $_W_timeout --question --title=winetricks --text="`echo $@ | sed 's,\\\\,\\\\\\\\,g'`" --no-wrap;;
  164. kdialog) $WINETRICKS_GUI --title winetricks --warningcontinuecancel "$@" ;;
  165. none) printf %s "Press Y or N, then Enter: " ; read response ; test "$response" = Y || test "$response" = y;;
  166. esac
  167. if test $? -ne 0
  168. then
  169. w_die "Operation cancelled, quitting."
  170. exec false
  171. fi
  172. unset _W_timeout
  173. }
  174. # Display info message. Time out quickly if user doesn't click.
  175. w_info()
  176. {
  177. echo "------------------------------------------------------"
  178. echo "$@"
  179. echo "------------------------------------------------------"
  180. _W_timeout="--timeout 3"
  181. case $WINETRICKS_GUI in
  182. zenity) $WINETRICKS_GUI $_W_timeout --info --title=winetricks --text="`echo $@ | sed 's,\\\\,\\\\\\\\,g'`" --no-wrap;;
  183. kdialog) $WINETRICKS_GUI --title winetricks --msgbox "$@" ;;
  184. none) ;;
  185. esac
  186. unset _W_timeout
  187. }
  188. # Display warning message to stderr (since it is called inside redirected code)
  189. w_warn()
  190. {
  191. echo "------------------------------------------------------" >&2
  192. echo "$@" >&2
  193. echo "------------------------------------------------------" >&2
  194. if test $W_OPT_UNATTENDED
  195. then
  196. _W_timeout="--timeout 5"
  197. fi
  198. case $WINETRICKS_GUI in
  199. zenity) $WINETRICKS_GUI $_W_timeout --error --title=winetricks --text="`echo $@ | sed 's,\\\\,\\\\\\\\,g'`";;
  200. kdialog) $WINETRICKS_GUI --title winetricks --error "$@" ;;
  201. none) ;;
  202. esac
  203. unset _W_timeout
  204. }
  205. # Display warning message to stderr (since it is called inside redirected code)
  206. # And give gui user option to cancel (for when used in a loop)
  207. # If user cancels, exit status is 1
  208. w_warn_cancel()
  209. {
  210. echo "------------------------------------------------------" >&2
  211. echo "$@" >&2
  212. echo "------------------------------------------------------" >&2
  213. if test $W_OPT_UNATTENDED
  214. then
  215. _W_timeout="--timeout 5"
  216. fi
  217. # Zenity has no cancel button, but will set status to 1 if you click the go-away X
  218. case $WINETRICKS_GUI in
  219. zenity) $WINETRICKS_GUI $_W_timeout --error --title=winetricks --text="`echo $@ | sed 's,\\\\,\\\\\\\\,g'`";;
  220. kdialog) $WINETRICKS_GUI --title winetricks --warningcontinuecancel "$@" ;;
  221. none) ;;
  222. esac
  223. # can't unset, it clears status
  224. }
  225. # Display fatal error message and terminate script
  226. w_die()
  227. {
  228. w_warn "$@"
  229. exit 1
  230. }
  231. # Kill all instances of a process in a safe way (Solaris killall kills _everything_)
  232. w_killall()
  233. {
  234. kill -s KILL `pgrep $1`
  235. }
  236. # Execute with error checking
  237. # Put this in front of any command that might fail
  238. w_try()
  239. {
  240. # "VAR=foo w_try cmd" fails to put VAR in the environment
  241. # with some versions of bash if w_try is a shell function?!
  242. # This is a problem when trying to pass environment variables to e.g. wine.
  243. # Adding an explicit export here works around it, so add any we use.
  244. export WINEDLLOVERRIDES
  245. printf '%s\n' "Executing $*"
  246. # On Vista, we need to jump through a few hoops to run commands in cygwin.
  247. # First, .exe's need to have the executable bit set.
  248. # Second, only cmd can run setup programs (presumably for security).
  249. # If $1 ends in .exe, we know we're running on real windows, otherwise
  250. # $1 would be 'wine'.
  251. case "$1" in
  252. *.exe)
  253. chmod +x "$1" || true # don't care if it fails
  254. cmd /c "$@"
  255. ;;
  256. *)
  257. "$@"
  258. ;;
  259. esac
  260. status=$?
  261. if test $status -ne 0
  262. then
  263. w_die "Note: command '$@' returned status $status. Aborting."
  264. fi
  265. }
  266. w_try_7z()
  267. {
  268. # $1 - directory to extract to
  269. # $2 - file to extract
  270. # Not always installed, use Windows 7-zip as a fallback:
  271. if test -x "`which 7z 2>/dev/null`"
  272. then
  273. w_try 7z x "$2" -o"$1"
  274. else
  275. w_warn "Cannot find 7z. Using Windows 7-zip instead. (You can avoid this by installing 7z, e.g. 'sudo apt-get install p7zip-full' or 'sudo yum install p7zip p7zip-plugins')."
  276. WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip
  277. # errors out if there is a space between -o and path
  278. w_try "$WINE" "$W_PROGRAMS_X86_WIN\\7-Zip\\7z.exe" x "`w_pathconv -w $2`" -o"`w_pathconv -w $1`"
  279. fi
  280. }
  281. w_try_cabextract()
  282. {
  283. # Not always installed, but shouldn't be fatal unless it's being used
  284. if test ! -x "`which cabextract 2>/dev/null`"
  285. then
  286. w_die "Cannot find cabextract. Please install it (e.g. 'sudo apt-get install cabextract' or 'sudo yum install cabextract')."
  287. fi
  288. w_try cabextract -q "$@"
  289. }
  290. w_try_msiexec64()
  291. {
  292. if test "$W_ARCH" != "win64"
  293. then
  294. w_die "bug: 64-bit msiexec called from a $W_ARCH prefix."
  295. fi
  296. w_try "$WINE" start /wait "$W_SYSTEM64_DLLS_WIN32/msiexec.exe" $W_UNATTENDED_SLASH_Q "$@"
  297. }
  298. w_try_regedit()
  299. {
  300. # on windows, doesn't work without cmd /c
  301. case "$OS" in
  302. "Windows_NT") cmdc="cmd /c";;
  303. *) unset cmdc ;;
  304. esac
  305. w_try winetricks_early_wine $cmdc regedit $W_UNATTENDED_SLASH_S "$@"
  306. }
  307. w_try_regsvr()
  308. {
  309. w_try "$WINE" regsvr32 $W_UNATTENDED_SLASH_S $@
  310. }
  311. w_try_unrar()
  312. {
  313. # $1 - zipfile to extract (keeping internal paths, in cwd)
  314. # Not always installed, use Windows 7-zip as a fallback:
  315. if test -x "`which unrar 2>/dev/null`"
  316. then
  317. w_try unrar x "$@"
  318. else
  319. w_warn "Cannot find unrar. Using Windows 7-zip instead. (You can avoid this by installing unrar, e.g. 'sudo apt-get install unrar' or 'sudo yum install unrar')."
  320. WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip
  321. w_try "$WINE" "$W_PROGRAMS_X86_WIN\\7-Zip\\7z.exe" x "`w_pathconv -w $1`"
  322. fi
  323. }
  324. w_try_unzip()
  325. {
  326. # $1 - directory to extract to
  327. # $2 - zipfile to extract
  328. # $3 .. $n - files to extract from the archive
  329. destdir="$1"
  330. zipfile="$2"
  331. shift 2
  332. # Not always installed, use Windows 7-zip as a fallback:
  333. if test -x "`which unzip 2>/dev/null`"
  334. then
  335. # FreeBSD ships unzip, but it doesn't support self compressed executables
  336. # If it fails ,fall back to 7-zip:
  337. unzip -o -q -d"$destdir" "$zipfile" "$@"
  338. ret=$?
  339. case $ret in
  340. 0) return ;;
  341. 1|*) w_warn "Unzip failed, trying Windows 7-zip instead." ;;
  342. esac
  343. else
  344. w_warn "Cannot find unzip. Using Windows 7-zip instead. (You can avoid this by installing unzip, e.g. 'sudo apt-get install unzip' or 'sudo yum install unzip')."
  345. fi
  346. WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip
  347. # errors out if there is a space between -o and path
  348. w_try "$WINE" "$W_PROGRAMS_X86_WIN\\7-Zip\\7z.exe" x "`w_pathconv -w $zipfile`" -o"`w_pathconv -w $destdir`" "$@"
  349. }
  350. w_read_key()
  351. {
  352. if test ! "$W_OPT_UNATTENDED"
  353. then
  354. W_KEY=dummy_to_make_autohotkey_happy
  355. return 0
  356. fi
  357. mkdir -p "$W_CACHE/$W_PACKAGE"
  358. # backwards compatible location
  359. # Auth doesn't belong in cache, since restoring it requires user input
  360. _W_keyfile="$W_CACHE/$W_PACKAGE/key.txt"
  361. if ! test -f "$_W_keyfile"
  362. then
  363. _W_keyfile="$WINETRICKS_AUTH/$W_PACKAGE/key.txt"
  364. fi
  365. if ! test -f "$_W_keyfile"
  366. then
  367. # read key from user
  368. case $LANG in
  369. da*) _W_keymsg="Angiv venligst registrerings-nøglen for pakken '$_PACKAGE'"
  370. _W_nokeymsg="Ingen nøgle angivet"
  371. ;;
  372. de*) _W_keymsg="Bitte einen Key für Paket '$W_PACKAGE' eingeben"
  373. _W_nokeymsg="Keinen Key eingegeben?"
  374. ;;
  375. pl*) _W_keymsg="Proszę podać klucz dla programu '$W_PACKAGE'"
  376. _W_nokeymsg="Nie podano klucza"
  377. ;;
  378. ru*) _W_keymsg="Пожалуйста, введите ключ для приложения '$W_PACKAGE'"
  379. _W_nokeymsg="Ключ не введён"
  380. ;;
  381. uk*) _W_keymsg="Будь ласка, введіть ключ для додатка '$W_PACKAGE'"
  382. _W_nokeymsg="Ключ не надано"
  383. ;;
  384. zh_CN*) _W_keymsg="按任意键为 '$W_PACKAGE'"
  385. _W_nokeymsg="No key given"
  386. ;;
  387. zh_TW*|zh_HK*) _W_keymsg="按任意鍵為 '$W_PACKAGE'"
  388. _W_nokeymsg="No key given"
  389. ;;
  390. *) _W_keymsg="Please enter the key for app '$W_PACKAGE'"
  391. _W_nokeymsg="No key given"
  392. ;;
  393. esac
  394. case $WINETRICKS_GUI in
  395. *zenity) W_KEY=`zenity --entry --text "$_W_keymsg"` ;;
  396. *kdialog) W_KEY=`kdialog --inputbox "$_W_keymsg"` ;;
  397. *xmessage) w_die "sorry, can't read key from gui with xmessage" ;;
  398. none) printf %s "$_W_keymsg": ; read W_KEY ;;
  399. esac
  400. if test "$W_KEY" = ""
  401. then
  402. w_die "$_W_nokeymsg"
  403. fi
  404. echo "$W_KEY" > "$_W_keyfile"
  405. fi
  406. W_RAW_KEY=`cat "$_W_keyfile"`
  407. W_KEY=`echo $W_RAW_KEY | tr -d '[:blank:][=-=]'`
  408. unset _W_keyfile _W_keymsg _W_nokeymsg
  409. }
  410. # Convert a Windows path to a Unix path quickly.
  411. # $1 is an absolute Windows path starting with c:\ or C:/
  412. # with no funny business, so we can use the simplest possible
  413. # algorithm.
  414. winetricks_wintounix()
  415. {
  416. _W_winp_="$1"
  417. # Remove drive letter and colon
  418. _W_winp="${_W_winp_#??}"
  419. # Prepend the location of drive c
  420. printf %s "$WINEPREFIX"/dosdevices/c:
  421. # Change backslashes to slashes
  422. echo $_W_winp | sed 's,\\,/,g'
  423. }
  424. # Convert between Unix path and Windows path
  425. # Usage is lowest common denominator of cygpath/winepath
  426. # so -u to convert to unix, and -w to convert to windows
  427. w_pathconv()
  428. {
  429. case "$OS" in
  430. "Windows_NT")
  431. # for some reason, cygpath turns some spaces into newlines?!
  432. cygpath "$@" | tr '\012' '\040' | sed 's/ $//'
  433. ;;
  434. *)
  435. case "$@" in
  436. -u?c:\\*|-u?C:\\*|-u?c:/*|-u?C:/*) winetricks_wintounix "$2" ;;
  437. *) winetricks_early_wine winepath "$@" ;;
  438. esac
  439. ;;
  440. esac
  441. }
  442. # Expand an environment variable and print it to stdout
  443. w_expand_env()
  444. {
  445. winetricks_early_wine cmd.exe /c echo "%$1%"
  446. }
  447. # get sha1sum string and set $_W_gotsum to it
  448. w_get_sha1sum()
  449. {
  450. local _W_file="$1"
  451. _W_gotsum=`$WINETRICKS_SHA1SUM < "$_W_file" | sed 's/(stdin)= //;s/ .*//'`
  452. }
  453. # verify an sha1sum
  454. w_verify_sha1sum()
  455. {
  456. _W_vs_wantsum=$1
  457. _W_vs_file=$2
  458. w_get_sha1sum "$_W_vs_file"
  459. if [ "$_W_gotsum"x != "$_W_vs_wantsum"x ]
  460. then
  461. w_die "sha1sum mismatch! Rename $_W_vs_file and try again."
  462. fi
  463. unset _W_vs_wantsum _W_vs_file _W_gotsum
  464. }
  465. # wget outputs progress messages that look like this:
  466. # 0K .......... .......... .......... .......... .......... 0% 823K 40s
  467. # This function replaces each such line with the pair of lines
  468. # 0%
  469. # # Downloading... 823K (40s)
  470. # It uses minimal buffering, so each line is output immediately
  471. # and the user can watch progress as it happens.
  472. winetricks_parse_wget_progress()
  473. {
  474. # Parse a percentage, a size, and a time into $1, $2 and $3
  475. # then use them to create the output line.
  476. perl -p -e \
  477. '$| = 1; s/^.* +([0-9]+%) +([0-9,.]+[GMKB]) +([0-9hms,.]+).*$/\1\n# Downloading... \2 (\3)/'
  478. }
  479. # Execute wget, and if in gui mode, also show a graphical progress bar
  480. winetricks_wget_progress()
  481. {
  482. case $WINETRICKS_GUI in
  483. zenity)
  484. # Usa a subshell so if the user clicks 'Cancel',
  485. # the --auto-kill kills the subshell, not the current shell
  486. (
  487. ${torify} wget "$@" 2>&1 |
  488. winetricks_parse_wget_progress | \
  489. $WINETRICKS_GUI --progress --width 400 --title="$_W_file" --auto-kill --auto-close
  490. )
  491. err=$?
  492. if test $err -gt 128
  493. then
  494. # 129 is 'killed by SIGHUP'
  495. # Sadly, --auto-kill only applies to parent process,
  496. # which was the subshell, not all the elements of the pipeline...
  497. # have to go find and kill the wget.
  498. # If we ran wget in the background, we could kill it more directly, perhaps...
  499. if pid=`ps augxw | grep ."$_W_file" | grep -v grep | awk '{print $2}'`
  500. then
  501. echo User aborted download, killing wget
  502. kill $pid
  503. fi
  504. fi
  505. return $err
  506. ;;
  507. *) ${torify} wget "$@" ;;
  508. esac
  509. }
  510. w_dotnet_verify()
  511. {
  512. case $1 in
  513. dotnet11) version="1.1" ;;
  514. dotnet11sp1) version="1.1 SP1" ;;
  515. dotnet20) version="2.0" ;;
  516. dotnet20sp1) version="2.0 SP1" ;;
  517. dotnet20sp2) version="2.0 SP2" ;;
  518. dotnet30) version="3.0" ;;
  519. dotnet30sp1) version="3.0 SP1" ;;
  520. dotnet35) version="3.5" ;;
  521. dotnet35sp1) version="3.5 SP1" ;;
  522. dotnet40) version="4 Client" ;;
  523. dotnet45) version="4.5" ;;
  524. dotnet452) version="4.5.2" ;;
  525. *) echo error ; exit 1 ;;
  526. esac
  527. w_call dotnet_verifier
  528. # FIXME: The logfile may be useful somewhere (or at least print the location)
  529. w_ahk_do "
  530. SetTitleMatchMode, 2
  531. ; FIXME; this only works the first time? Check if it's already verified somehow..
  532. run, netfx_setupverifier.exe /q:a /c:"setupverifier2.exe"
  533. winwait, Verification Utility
  534. ControlClick, Button1
  535. Control, ChooseString, NET Framework $version, ComboBox1
  536. ControlClick, Button1 ; Verify
  537. loop, 60
  538. {
  539. sleep 1000
  540. process, exist, setupverifier2.exe
  541. dn_pid=%ErrorLevel%
  542. if dn_pid = 0
  543. {
  544. break
  545. }
  546. ifWinExist, Verification Utility, Product verification failed
  547. {
  548. process, close, setupverifier2.exe
  549. exit 1
  550. }
  551. ifWinExist, Verification Utility, Product verification succeeded
  552. {
  553. process, close, setupverifier2.exe
  554. break
  555. }
  556. }
  557. "
  558. dn_status=$?
  559. }
  560. # Checks if the user can run the self-update/rollback commands
  561. winetricks_check_update_availability()
  562. {
  563. # Prevents the development file overwrite:
  564. if test -d "../.git"
  565. then
  566. w_warn "You're running in a dev environment. Please make a copy of the file before running this command."
  567. exit;
  568. fi
  569. # Checks read/write permissions on update directories
  570. if ! (test -r $0 && test -w $0 && test -w ${0%/*} && test -x ${0%/*})
  571. then
  572. w_warn "You don't have the proper permissions to run this command. Try again with sudo or as root."
  573. exit;
  574. fi
  575. }
  576. winetricks_selfupdate()
  577. {
  578. winetricks_check_update_availability
  579. _W_filename="${0##*/}"
  580. _W_rollback_file="${0}.bak"
  581. _W_update_file="${0}.update"
  582. _W_tmpdir=${TMPDIR:-/tmp}
  583. _W_tmpdir="`mktemp -d "$_W_tmpdir/$_W_filename.XXXXXXXX"`"
  584. w_download_to $_W_tmpdir https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
  585. w_try mv $_W_tmpdir/$_W_filename $_W_update_file.gz
  586. w_try gunzip $_W_update_file.gz
  587. w_try rmdir $_W_tmpdir
  588. w_try cp $0 $_W_rollback_file
  589. w_try chmod -x $_W_rollback_file
  590. w_try mv $_W_update_file $0
  591. w_try chmod +x $0
  592. w_warn "Update finished! The current version is '`$0 -V`'. Use 'winetricks --update-rollback' to return to the previous version."
  593. exit;
  594. }
  595. winetricks_selfupdate_rollback()
  596. {
  597. winetricks_check_update_availability
  598. _W_rollback_file="${0}.bak"
  599. if test -f $_W_rollback_file
  600. then
  601. w_try mv $_W_rollback_file $0
  602. w_try chmod +x $0
  603. w_warn "Rollback finished! The current version is '`$0 -V`'."
  604. else
  605. w_warn "Nothing to rollback."
  606. fi
  607. exit;
  608. }
  609. # Download a file
  610. # Usage: w_download_to packagename url [sha1sum [filename [cookie jar]]]
  611. # Caches downloads in winetrickscache/$packagename
  612. w_download_to()
  613. {
  614. _W_packagename="$1"
  615. _W_url="$2"
  616. _W_sum="$3"
  617. _W_file="$4"
  618. _W_cookiejar="$5"
  619. case $_W_packagename in
  620. .) w_die "bug: please do not download packages to top of cache" ;;
  621. esac
  622. if echo "$_W_url" | grep ' '
  623. then
  624. w_die "bug: please use %20 instead of literal spaces in urls, curl rejects spaces, and they make life harder for linkcheck.sh"
  625. fi
  626. if [ "$_W_file"x = ""x ]
  627. then
  628. _W_file=`basename "$_W_url"`
  629. fi
  630. _W_cache="$W_CACHE/$_W_packagename"
  631. if test ! -d "$_W_cache"
  632. then
  633. w_try mkdir -p "$_W_cache"
  634. fi
  635. # Try download twice
  636. checksum_ok=""
  637. tries=0
  638. while test $tries -lt 2
  639. do
  640. tries=`expr $tries + 1`
  641. if test -s "$_W_cache/$_W_file"
  642. then
  643. if test "$3"
  644. then
  645. if test $tries = 1
  646. then
  647. # The cache was full. If the file is larger than 500MB,
  648. # don't checksum it, that just annoys the user.
  649. if test `du -k "$_W_cache/$_W_file" | cut -f1` -gt 500000
  650. then
  651. checksum_ok=1
  652. break
  653. fi
  654. fi
  655. # If checksum matches, declare success and exit loop
  656. w_get_sha1sum "$_W_cache/$_W_file"
  657. if [ "$_W_gotsum"x = "$3"x ]
  658. then
  659. checksum_ok=1
  660. break
  661. fi
  662. if test ! "$WINETRICKS_CONTINUE_DOWNLOAD"
  663. then
  664. w_warn "Checksum for $_W_cache/$_W_file did not match, retrying download"
  665. mv -f "$_W_cache/$_W_file" "$_W_cache/$_W_file".bak
  666. fi
  667. else
  668. # file exists, no checksum known, declare success and exit loop
  669. break
  670. fi
  671. elif test -f "$_W_cache/$_W_file"
  672. then
  673. # zero length file, just delete before retrying
  674. rm "$_W_cache/$_W_file"
  675. fi
  676. _W_dl_olddir=`pwd`
  677. cd "$_W_cache"
  678. # Mac folks tend to have curl rather than wget
  679. # On Mac, 'which' doesn't return good exit status
  680. # Need to jam in --header "Accept-Encoding: gzip,deflate" else
  681. # redhat.com decompresses liberation-fonts.tar.gz!
  682. # Note: this causes other sites to compress downloads, hence
  683. # the kludge further down. See http://code.google.com/p/winezeug/issues/detail?id=77
  684. echo Downloading $_W_url to $_W_cache
  685. # For sites that prefer mozilla in the useragent, set W_BROWSERAGENT=1
  686. case "$W_BROWSERAGENT" in
  687. 1) _W_agent="Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)" ;;
  688. *) _W_agent= ;;
  689. esac
  690. case "$WINETRICKS_OPT_TORIFY" in
  691. 1) torify=torify ; if [ ! -x "$(which torify 2>/dev/null)" ] ; then
  692. w_die "--torify was used, but torify is not installed, please install it." ; exit 1 ; fi ;;
  693. *) torify= ;;
  694. esac
  695. if [ -x "$(which aria2c 2>/dev/null)" ]
  696. then
  697. # (Slightly fancy) aria2c support
  698. # See https://github.com/Winetricks/winetricks/issues/612
  699. # --daemon=false --enable-rpc=false to ensure aria2c doesnt go into the background after starting
  700. # and prevent any attempts to rebind on the RPC interface specified in someone's config.
  701. # --input-file='' if the user config has a input-file specified then aria2 will read it and
  702. # attempt to download everything in that input file again.
  703. # --save-session='' if the user has specified save-session in their config, their session will be
  704. # ovewritten by the new aria2 process
  705. # http-accept-gzip=true (still needed) ?
  706. # torify needs --async-dns=false, see https://github.com/tatsuhiro-t/aria2/issues/613
  707. case $WINETRICKS_OPT_TORIFY in
  708. 1) torify aria2c --async-dns=false --continue --daemon=false --dir "$_W_cache" --enable-rpc=false --input-file='' \
  709. --max-connection-per-server=5 --out "$_W_file" --save-session='' --stream-piece-selector=geom "$_W_url" ;;
  710. *) aria2c --continue --daemon=false --dir "$_W_cache" --enable-rpc=false --input-file='' \
  711. --max-connection-per-server=5 --out "$_W_file" --save-session='' --stream-piece-selector=geom "$_W_url" ;;
  712. esac
  713. elif [ -x "`which wget 2>/dev/null`" ]
  714. then
  715. # Use -nd to insulate ourselves from people who set -x in WGETRC
  716. # [*] --retry-connrefused works around the broken sf.net mirroring
  717. # system when downloading corefonts
  718. # [*] --read-timeout is useful on the adobe server that doesn't
  719. # close the connection unless you tell it to (control-C or closing
  720. # the socket)
  721. winetricks_wget_progress \
  722. -O "$_W_file" -nd \
  723. -c --read-timeout=300 --retry-connrefused \
  724. --header "Accept-Encoding: gzip,deflate" \
  725. ${_W_cookiejar:+--load-cookies "$_W_cookiejar"} \
  726. ${_W_agent:+--user-agent="$_W_agent"} \
  727. "$_W_url"
  728. elif [ -x "`which curl 2>/dev/null`" ]
  729. then
  730. # curl doesn't get filename from the location given by the server!
  731. # fortunately, we know it
  732. $torify curl -L -o "$_W_file" -C - \
  733. --header "Accept-Encoding: gzip,deflate" \
  734. ${_W_cookiejar:+--cookie "$_W_cookiejar"} \
  735. ${_W_agent:+--user-agent "$_W_agent"} \
  736. "$_W_url"
  737. else
  738. w_die "Please install wget or aria2c (or, if those aren't available, curl)"
  739. fi
  740. if test $? = 0
  741. then
  742. # Need to decompress .exe's that are compressed, else cygwin fails
  743. # Also affects ttf files on github
  744. _W_filetype=`which file 2>/dev/null`
  745. case $_W_filetype-$_W_file in
  746. /*-*.exe|/*-*.ttf|/*-*.zip)
  747. case `file "$_W_file"` in
  748. *:*gzip*) mv "$_W_file" "$_W_file.gz"; gunzip < "$_W_file.gz" > "$_W_file";;
  749. esac
  750. esac
  751. # On cygwin, .exe's must be marked +x
  752. case "$_W_file" in
  753. *.exe) chmod +x "$_W_file" ;;
  754. esac
  755. cd "$_W_dl_olddir"
  756. unset _W_dl_olddir
  757. elif test $tries = 2
  758. then
  759. test -f "$_W_file" && rm "$_W_file"
  760. w_die "Downloading $_W_url failed"
  761. fi
  762. # Download from the Wayback Machine on second try
  763. _W_url="https://web.archive.org/web/$_W_url"
  764. done
  765. if test "$3" && test ! "$checksum_ok"
  766. then
  767. w_verify_sha1sum $3 "$_W_cache/$_W_file"
  768. fi
  769. }
  770. # Open a folder for the user in the specified directory
  771. # Usage: w_open_folder directory
  772. w_open_folder()
  773. {
  774. for _W_cmd in xdg-open open cygstart true
  775. do
  776. _W_cmdpath=`which $_W_cmd`
  777. if test -n "$_W_cmdpath"
  778. then
  779. break
  780. fi
  781. done
  782. $_W_cmd "$1" &
  783. unset _W_cmd _W_cmdpath
  784. }
  785. # Open a web browser for the user to the given page
  786. # Usage: w_open_webpage url
  787. w_open_webpage()
  788. {
  789. # See http://www.dwheeler.com/essays/open-files-urls.html
  790. for _W_cmd in xdg-open sdtwebclient cygstart open firefox true
  791. do
  792. _W_cmdpath=`which $_W_cmd`
  793. if test -n "$_W_cmdpath"
  794. then
  795. break
  796. fi
  797. done
  798. $_W_cmd "$1" &
  799. unset _W_cmd _W_cmdpath
  800. }
  801. # Download a file
  802. # Usage: w_download url [sha1sum [filename [cookie jar]]]
  803. # Caches downloads in winetrickscache/$W_PACKAGE
  804. w_download()
  805. {
  806. w_download_to $W_PACKAGE "$@"
  807. }
  808. # Download one or more files via bittorrent
  809. # Usage: w_download_torrent [foo.torrent]
  810. # Caches downloads in $W_CACHE/$W_PACKAGE, torrent files are assumed to be there
  811. # If no foo.torrent is given, will add ALL .torrent files in $W_CACHE/$W_PACKAGE
  812. w_download_torrent()
  813. {
  814. # FIXME: figure out how to extract the filename from the .torrent file
  815. # so callers don't need to check if the files are already downloaded.
  816. w_call utorrent
  817. UT_WINPATH="$W_CACHE_WIN\\$W_PACKAGE"
  818. cd "$W_CACHE/$W_PACKAGE"
  819. if [ "$2"x != ""x ] # foo.torrent parameter supplied
  820. then
  821. w_try "$WINE" utorrent "/DIRECTORY" "$UT_WINPATH" "$UT_WINPATH\\$2" &
  822. else # grab all torrents
  823. for torrent in `ls *.torrent`
  824. do
  825. w_try "$WINE" utorrent "/DIRECTORY" "$UT_WINPATH" "$UT_WINPATH\\$torrent" &
  826. done
  827. fi
  828. # Start uTorrent, have it wait until all downloads are finished
  829. w_ahk_do "
  830. SetTitleMatchMode, 2
  831. winwait, Torrent
  832. Loop
  833. {
  834. sleep 6000
  835. ifwinexist, Torrent, default
  836. {
  837. ;should uTorrent be the default torrent app?
  838. controlclick, Button1, Torrent, default ; yes
  839. continue
  840. }
  841. ifwinexist, Torrent, already
  842. {
  843. ;torrent already registered, fine
  844. controlclick, Button1, Torrent, default ; yes
  845. continue
  846. }
  847. ifwinexist, Torrent, Bandwidth
  848. {
  849. ;Cancels bandwidth test on first run of uTorrent
  850. controlclick, Button5, Torrent, Bandwidth
  851. continue
  852. }
  853. ifwinexist, Torrent, version
  854. {
  855. ;Decline upgrade to newer version
  856. controlclick, Button3, Torrent, version
  857. controlclick, Button2, Torrent, version
  858. continue
  859. }
  860. break
  861. }
  862. ;Sets parameter to close uTorrent once all downloads are complete
  863. winactivate, Torrent 2.0
  864. send !o
  865. send a{Down}{Enter}
  866. winwaitclose, Torrent 2.0
  867. "
  868. }
  869. w_download_manual_to()
  870. {
  871. _W_packagename="$1"
  872. _W_url="$2"
  873. _W_file="$3"
  874. _W_sha1sum="$4"
  875. case "$media" in
  876. "download")
  877. w_info "FAIL: bug: media type is download, but w_download_manual was called. Programmer, please change verb's media type to manual_download."
  878. ;;
  879. esac
  880. case $LANG in
  881. da*) _W_dlmsg="Hent venligst filen $_W_file fra $_W_url og placér den i $W_CACHE/$_W_packagename, kør derefter dette skript.";;
  882. de*) _W_dlmsg="Bitte laden Sie $_W_file von $_W_url runter, stellen Sie's in $W_CACHE/$_W_packagename, dann wiederholen Sie dieses Kommando.";;
  883. pl*) _W_dlmsg="Proszę pobrać plik $_W_file z $_W_url, następnie umieścić go w $W_CACHE/$_W_packagename, a na końcu uruchomić ponownie ten skrypt.";;
  884. ru*) _W_dlmsg="Пожалуйста, скачайте файл $_W_file по адресу $_W_url, и поместите его в $W_CACHE/$_W_packagename, а затем запустите winetricks заново.";;
  885. uk*) _W_dlmsg="Будь ласка, звантажте $_W_file з $_W_url, розташуйте в $W_CACHE/$_W_packagename, потім запустіть скрипт знову.";;
  886. zh_CN*) _W_dlmsg="请从 $_W_url 下载 $_W_file,并置放于 $W_CACHE/$_W_packagename, 然后重新运行 winetricks.";;
  887. zh_TW*|zh_HK*) _W_dlmsg="請從 $_W_url 下載 $_W_file,并置放於 $W_CACHE/$_W_packagename, 然后重新執行 winetricks.";;
  888. *) _W_dlmsg="Please download $_W_file from $_W_url, place it in $W_CACHE/$_W_packagename, then re-run this script.";;
  889. esac
  890. if ! test -f "$W_CACHE/$_W_packagename/$_W_file"
  891. then
  892. mkdir -p "$W_CACHE/$_W_packagename"
  893. w_open_folder "$W_CACHE/$_W_packagename"
  894. w_open_webpage "$_W_url"
  895. sleep 3 # give some time for browser to open
  896. w_die "$_W_dlmsg"
  897. # FIXME: wait in loop until file is finished?
  898. fi
  899. if test "$_W_sha1sum"
  900. then
  901. w_verify_sha1sum $_W_sha1sum "$W_CACHE/$_W_packagename/$_W_file"
  902. fi
  903. unset _W_url _W_file _W_sha1sum _W_dlmsg
  904. }
  905. w_download_manual()
  906. {
  907. w_download_manual_to $W_PACKAGE "$@"
  908. }
  909. # Turn off news, overlays, and friend interaction in steam
  910. # Run from inside c:\Program Files\Steam
  911. w_steam_safemode()
  912. {
  913. cat > "$W_TMP/steamconfig.pl" <<"_EOF_"
  914. #!/usr/bin/env perl
  915. # Parse steam's localconfig.vcf, add settings to it, and write it out again
  916. # The file is a recursive dictionary
  917. #
  918. # FILE :== CONTAINER
  919. #
  920. # VALUE :== "name" "value" NEWLINE
  921. #
  922. # CONTAINER :== "name" NEWLINE "{" NEWLINE ( VALUE | CONTAINER ) * "}" NEWLINE
  923. #
  924. # We load it into a recursive hash.
  925. use strict;
  926. use warnings;
  927. sub read_into_container{
  928. my( $pcontainer ) = @_;
  929. $_ = <FILE> || w_die "Can't read first line of container";
  930. /{/ || w_die "First line of container was not {";
  931. while (<FILE>) {
  932. chomp;
  933. if (/"([^"]*)"\s*"([^"]*)"$/) {
  934. ${$pcontainer}{$1} = $2;
  935. } elsif (/"([^"]*)"$/) {
  936. my( %newcon, $name );
  937. $name = $1;
  938. read_into_container(\%newcon);
  939. ${$pcontainer}{$name} = \%newcon;
  940. } elsif (/}/) {
  941. return;
  942. } else {
  943. w_die "huh?";
  944. }
  945. }
  946. }
  947. sub dump_container{
  948. my( $pcontainer, $indent ) = @_;
  949. foreach (sort(keys(%{$pcontainer}))) {
  950. my( $val ) = ${$pcontainer}{$_};
  951. if (ref $val eq 'HASH') {
  952. print "${indent}\"$_\"\n";
  953. print "${indent}{\n";
  954. dump_container($val, "$indent\t");
  955. print "${indent}}\n";
  956. } else {
  957. print "${indent}\"${_}\"\t\t\"$val\"\n";
  958. }
  959. }
  960. }
  961. # Disable anything unsafe or annoying
  962. sub disable_notifications{
  963. my( $pcontainer ) = @_;
  964. ${$pcontainer}{"friends"}{"PersonaStateDesired"} = "1";
  965. ${$pcontainer}{"friends"}{"Notifications_ShowIngame"} = "0";
  966. ${$pcontainer}{"friends"}{"Sounds_PlayIngame"} = "0";
  967. ${$pcontainer}{"friends"}{"Notifications_ShowOnline"} = "0";
  968. ${$pcontainer}{"friends"}{"Sounds_PlayOnline"} = "0";
  969. ${$pcontainer}{"friends"}{"Notifications_ShowMessage"} = "0";
  970. ${$pcontainer}{"friends"}{"Sounds_PlayMessage"} = "0";
  971. ${$pcontainer}{"friends"}{"AutoSignIntoFriends"} = "0";
  972. ${$pcontainer}{"News"}{"NotifyAvailableGames"} = "0";
  973. ${$pcontainer}{"system"}{"EnableGameOverlay"} = "0";
  974. }
  975. # Read the file
  976. my(%top);
  977. open FILE, $ARGV[0] || w_die "can't open ".$ARGV[0];
  978. my($line);
  979. $line = <FILE> || w_die "Could not read first line from ".$ARGV[0];
  980. $line =~ /"UserLocalConfigStore"/ || w_die "this is not a localconfig.vdf file";
  981. read_into_container(\%top);
  982. # Modify it
  983. disable_notifications(\%top);
  984. # Write modified file
  985. print "\"UserLocalConfigStore\"\n";
  986. print "{\n";
  987. dump_container(\%top, "\t");
  988. print "}\n";
  989. _EOF_
  990. for file in userdata/*/config/localconfig.vdf
  991. do
  992. cp "$file" "$file.old"
  993. perl "$W_TMP"/steamconfig.pl "$file.old" > "$file"
  994. done
  995. }
  996. w_question()
  997. {
  998. case $WINETRICKS_GUI in
  999. *zenity) $WINETRICKS_GUI --entry --text "$1" ;;
  1000. *kdialog) $WINETRICKS_GUI --inputbox "$1" ;;
  1001. *xmessage) w_die "sorry, can't ask question with xmessage" ;;
  1002. none) echo -n "$1" >&2 ; read W_ANSWER ; echo $W_ANSWER; unset W_ANSWER;;
  1003. esac
  1004. }
  1005. # Reads steam username and password from environment, cache, or user
  1006. # If had to ask user, cache answer.
  1007. w_steam_getid()
  1008. {
  1009. #TODO: Translate
  1010. _W_steamidmsg="Please enter your Steam login ID (not email)"
  1011. _W_steampasswordmsg="Please enter your Steam password"
  1012. if test ! "$W_STEAM_ID"
  1013. then
  1014. if test -f "$W_CACHE"/steam_userid.txt
  1015. then
  1016. W_STEAM_ID=`cat "$W_CACHE"/steam_userid.txt`
  1017. else
  1018. W_STEAM_ID=`w_question "$_W_steamidmsg"`
  1019. echo "$W_STEAM_ID" > "$W_CACHE"/steam_userid.txt
  1020. chmod 600 "$W_CACHE"/steam_userid.txt
  1021. fi
  1022. fi
  1023. if test ! "$W_STEAM_PASSWORD"
  1024. then
  1025. if test -f "$W_CACHE"/steam_password.txt
  1026. then
  1027. W_STEAM_PASSWORD=`cat "$W_CACHE"/steam_password.txt`
  1028. else
  1029. W_STEAM_PASSWORD=`w_question "$_W_steampasswordmsg"`
  1030. echo "$W_STEAM_PASSWORD" > "$W_CACHE"/steam_password.txt
  1031. chmod 600 "$W_CACHE"/steam_password.txt
  1032. fi
  1033. fi
  1034. }
  1035. # Usage:
  1036. # w_steam_install_game steamidnum windowtitle
  1037. w_steam_install_game()
  1038. {
  1039. _W_steamid=$1
  1040. _W_steamtitle="$2"
  1041. w_steam_getid
  1042. # Install the steam runtime
  1043. WINETRICKS_OPT_SHAREDPREFIX=1 w_call steam
  1044. # Steam puts up a bunch of windows. Here's the sequence:
  1045. # "Steam - Updating" - wait for it to close. May appear twice in a row.
  1046. # "Steam - Login" - wait for it to close (credentials already given on cmdline)
  1047. # "Steam" (small window) - connecting, wait for it to close
  1048. # "Steam" (large window) - the main window
  1049. # "Steam - Updates News" - close it forcefully
  1050. # "Install - $title" - send enter, click a couple checkboxes, send enter again
  1051. # "Updating $title" - small download progress dialog
  1052. # "Steam - Ready" game install done. (Only comes up if main window not up.)
  1053. cd "$W_PROGRAMS_X86_UNIX/Steam"
  1054. w_ahk_do "
  1055. SetTitleMatchMode 2
  1056. SetWinDelay 500
  1057. ; Run steam once until it finishes its initial update.
  1058. ; For me, this exits at 26%.
  1059. run steam.exe -applaunch $_W_steamid -login $W_STEAM_ID $W_STEAM_PASSWORD
  1060. Loop
  1061. {
  1062. ifWinExist, Steam - Updating
  1063. {
  1064. winwaitclose, Steam
  1065. process close, Steam.exe
  1066. sleep 1000
  1067. ; Run a second time; let it finish updating, then kill it.
  1068. run steam.exe
  1069. winwait Steam - Updating
  1070. winwaitclose
  1071. process close, Steam.exe
  1072. ; Run a third time, have it log in, wait until it has finished connecting
  1073. run steam.exe -applaunch $_W_steamid -login $W_STEAM_ID $W_STEAM_PASSWORD
  1074. }
  1075. ifWinExist, Steam Login
  1076. {
  1077. break
  1078. }
  1079. sleep 500
  1080. }
  1081. ; wait for login window to close
  1082. winwaitclose
  1083. winwait Steam ; wait for small <<connecting>> window
  1084. winwaitclose
  1085. "
  1086. if [ "$STEAM_DVD" = "TRUE" ]
  1087. then
  1088. w_ahk_do "
  1089. ; Run a fourth time, have it install the app.
  1090. run steam.exe -install ${W_ISO_MOUNT_LETTER}:\\
  1091. "
  1092. else
  1093. w_ahk_do "
  1094. ; Run a fourth time, have it install the app.
  1095. run steam.exe -applaunch $_W_steamid
  1096. "
  1097. fi
  1098. w_ahk_do "
  1099. winwait Install - $_W_steamtitle
  1100. if ( w_opt_unattended > 0 ) {
  1101. send {enter} ; next (for 1st of 3 pages of install dialog)
  1102. sleep 1000
  1103. click 32, 91 ; uncheck create menu item?
  1104. click 32, 119 ; check create desktop icon?
  1105. send {enter} ; next (for 2nd of 3 pages of install dialog)
  1106. ; dismiss any news dialogs, and click 'next' on third page of install dialog
  1107. loop
  1108. {
  1109. sleep 1000
  1110. ifwinexist Steam - Updates News
  1111. {
  1112. winclose
  1113. continue
  1114. }
  1115. ifwinexist Install - $_W_steamtitle
  1116. {
  1117. winactivate
  1118. send {enter} ; next (for 3rd of 3 pages of install dialog)
  1119. }
  1120. ifwinnotexist Install - $_W_steamtitle
  1121. {
  1122. sleep 1000
  1123. ifwinnotexist Install - $_W_steamtitle
  1124. break
  1125. }
  1126. }
  1127. }
  1128. "
  1129. if [ "$STEAM_DVD" = "TRUE" ]
  1130. then
  1131. # Wait for install to finish
  1132. while true
  1133. do
  1134. grep "SetHasAllLocalContent(true) called for $_W_steamid" "$W_PROGRAMS_X86_UNIX/Steam/logs/download_log.txt" && break
  1135. sleep 5
  1136. done
  1137. fi
  1138. w_ahk_do "
  1139. ; For DVD's: theoretically, it should be installed now, but most games want to download updates. Do that now.
  1140. ; For regular downloads: relaunch to coax steam into showing its nice small download progress dialog
  1141. process close, Steam.exe
  1142. run steam.exe -login $W_STEAM_ID $W_STEAM_PASSWORD -applaunch $_W_steamid
  1143. winwait Ready -
  1144. process close, Steam.exe
  1145. "
  1146. # Not all users need this disabled, but let's play it safe for now
  1147. if w_workaround_wine_bug 22053 "Disabling ingame notifications to prevent game crashes on some machines."
  1148. then
  1149. w_steam_safemode
  1150. fi
  1151. unset _W_steamid _W_steamtitle
  1152. }
  1153. #----------------------------------------------------------------
  1154. # Generic GOG.com installer
  1155. # Usage: game_id game_title [other_files,size [reader_control [run_command [download_id [install_dir [installer_size_and_sha1]]]]]]
  1156. # game_id
  1157. # Used for main installer name and download url.
  1158. # game_title
  1159. # Used for AutoHotKey and installation path in bat script.
  1160. # other_files
  1161. # Extra installer files, in one string, space-separated.
  1162. # reader_control
  1163. # If set, the control id of the configuration panel checkbox controling
  1164. # Adobe Reader installation.
  1165. # Some games don't have it, some games do with different ids.
  1166. # run_command
  1167. # Used for bat script, relative to installation path.
  1168. # download_id
  1169. # For games which download url doesn't match their game_id
  1170. # install_dir
  1171. # If different from game_title
  1172. # installer_size_and_sha1
  1173. # exe file SHA1.
  1174. winetricks_load_gog()
  1175. {
  1176. game_id="$1"
  1177. game_title="$2"
  1178. other_files="$3"
  1179. reader_control="$4"
  1180. run_command="$5"
  1181. download_id="$6"
  1182. install_dir="$7"
  1183. installer_size_and_sha1="$8"
  1184. if [ "$download_id"x = ""x ]
  1185. then
  1186. download_id="$game_id"
  1187. fi
  1188. if [ "$install_dir"x = ""x ]
  1189. then
  1190. install_dir="$game_title"
  1191. fi
  1192. installer_path="$W_CACHE/$W_PACKAGE"
  1193. mkdir -p "$installer_path"
  1194. installer="setup_$game_id.exe"
  1195. if test "$installer_size_and_sha1"x = ""x
  1196. then
  1197. files="$installer $other_files"
  1198. else
  1199. files="$installer,$installer_size_and_sha1 $other_files"
  1200. fi
  1201. file_id=0
  1202. for file_and_size_and_sha1 in $files
  1203. do
  1204. case "$file_and_size_and_sha1" in
  1205. *,*,*)
  1206. sha1sum=`echo $file_and_size_and_sha1 | sed "s/.*,//"`
  1207. minsize=`echo $file_and_size_and_sha1 | sed 's/[^,]*,\([^,]*\),.*/\1/'`
  1208. file=`echo $file_and_size_and_sha1 | sed 's/,.*//'`
  1209. ;;
  1210. *,*)
  1211. sha1sum=""
  1212. minsize=`echo $file_and_size_and_sha1 | sed 's/.*,//'`
  1213. file=`echo $file_and_size_and_sha1 | sed 's/,.*//'`
  1214. ;;
  1215. *)
  1216. sha1sum=""
  1217. minsize=1
  1218. file=$file_and_size_and_sha1
  1219. ;;
  1220. esac
  1221. file_path="$installer_path/$file"
  1222. if ! test -s "$file_path" || test `stat -Lc%s "$file_path"` -lt $minsize
  1223. then
  1224. # FIXME: bring back automated download
  1225. w_info "You have to be logged in to gog, and you have to own the game, for the following URL to work. Otherwise it gets a 404."
  1226. w_download_manual "https://www.gog.com/en/download/game/$download_id/$file_id" "$file"
  1227. check_sha1=1
  1228. filesize=`stat -Lc%s "$file_path"`
  1229. if test $minsize -gt 1 && test $filesize -ne $minsize
  1230. then
  1231. check_sha1=""
  1232. w_warn "Expected file size $minsize, please report new size $filesize."
  1233. fi
  1234. if test "$check_sha1" != "" && test "$sha1sum"x != ""x
  1235. then
  1236. w_verify_sha1sum "$sha1sum" "$file_path"
  1237. fi
  1238. fi
  1239. file_id=`expr $file_id + 1`
  1240. done
  1241. cd "$installer_path"
  1242. w_ahk_do "
  1243. run $installer
  1244. WinWait, Setup - $game_title, Start installation
  1245. ControlGet, checkbox_state, Checked,, TCheckBox1 ; EULA
  1246. if (checkbox_state != 1) {
  1247. ControlClick, TCheckBox1
  1248. }
  1249. if (\"$reader_control\") {
  1250. ControlClick, TMCoPShadowButton1 ; Options
  1251. Loop, 10
  1252. {
  1253. ControlGet, visible, Visible,, $reader_control
  1254. if (visible)
  1255. {
  1256. break
  1257. }
  1258. Sleep, 1000
  1259. }
  1260. ControlGet, checkbox_state, Checked,, $reader_control ; Unckeck Adobe/Foxit Reader
  1261. if (checkbox_state != 0) {
  1262. ControlClick, $reader_control
  1263. }
  1264. }
  1265. ControlClick, TMCoPShadowButton2 ; Start Installation
  1266. WinWait, Setup - $game_title, Exit Installer
  1267. ControlClick, TMCoPShadowButton1 ; Exit Installer
  1268. "
  1269. }
  1270. #----------------------------------------------------------------
  1271. # Usage: w_mount "volume name" [filename-to-check [discnum]]
  1272. # Some games have two volumes with identical volume names.
  1273. # For these, please specify discnum 1 for first disc, discnum 2 for 2nd, etc.,
  1274. # else caching can't work.
  1275. # FIXME: should take mount option 'unhide' for poorly mastered discs
  1276. w_mount()
  1277. {
  1278. if test "$3"
  1279. then
  1280. WINETRICKS_IMG="$W_CACHE/$W_PACKAGE/$1-$3.iso"
  1281. else
  1282. WINETRICKS_IMG="$W_CACHE/$W_PACKAGE/$1.iso"
  1283. fi
  1284. mkdir -p "$W_CACHE/$W_PACKAGE"
  1285. if test -f "$WINETRICKS_IMG"
  1286. then
  1287. winetricks_mount_cached_iso
  1288. else
  1289. if test "$WINETRICKS_OPT_KEEPISOS" = 0 || test "$2"
  1290. then
  1291. while true
  1292. do
  1293. winetricks_mount_real_volume "$1"
  1294. if test "$2" = "" || test -f "$W_ISO_MOUNT_ROOT/$2"
  1295. then
  1296. break
  1297. else
  1298. w_warn "Wrong disc inserted, $2 not found"
  1299. fi
  1300. done
  1301. fi
  1302. case "$WINETRICKS_OPT_KEEPISOS" in
  1303. 1)
  1304. winetricks_cache_iso "$1"
  1305. winetricks_mount_cached_iso
  1306. ;;
  1307. esac
  1308. fi
  1309. }
  1310. w_umount()
  1311. {
  1312. if test "$WINE" = ""
  1313. then
  1314. # Windows
  1315. winetricks_load_vcdmount
  1316. cd "$VCD_DIR"
  1317. w_try vcdmount.exe /u
  1318. else
  1319. echo "Running $WINETRICKS_SUDO umount $W_ISO_MOUNT_ROOT"
  1320. case "$WINETRICKS_SUDO" in
  1321. gksudo)
  1322. # -l lazy unmount in case executable still running
  1323. $WINETRICKS_SUDO "umount -l $W_ISO_MOUNT_ROOT"
  1324. w_try $WINETRICKS_SUDO "rm -rf $W_ISO_MOUNT_ROOT"
  1325. ;;
  1326. *)
  1327. $WINETRICKS_SUDO umount -l $W_ISO_MOUNT_ROOT
  1328. w_try $WINETRICKS_SUDO rm -rf $W_ISO_MOUNT_ROOT
  1329. ;;
  1330. esac
  1331. "$WINE" eject ${W_ISO_MOUNT_LETTER}:
  1332. rm -f "$WINEPREFIX"/dosdevices/${W_ISO_MOUNT_LETTER}:
  1333. rm -f "$WINEPREFIX"/dosdevices/${W_ISO_MOUNT_LETTER}::
  1334. fi
  1335. }
  1336. w_ahk_do()
  1337. {
  1338. if ! test -f "$W_CACHE/ahk/AutoHotkey.exe"
  1339. then
  1340. W_BROWSERAGENT=1 \
  1341. w_download_to ahk http://www.autohotkey.com/download/AutoHotkey104805.zip b3981b13fbc45823131f69d125992d6330212f27
  1342. w_try_unzip "$W_CACHE/ahk" "$W_CACHE/ahk/AutoHotkey104805.zip" AutoHotkey.exe AU3_Spy.exe
  1343. chmod +x "$W_CACHE/ahk/AutoHotkey.exe"
  1344. fi
  1345. _W_CR=`printf \\\\r`
  1346. cat <<_EOF_ | sed "s/\$/$_W_CR/" > "$W_TMP"/tmp.ahk
  1347. w_opt_unattended = ${W_OPT_UNATTENDED:-0}
  1348. $@
  1349. _EOF_
  1350. w_try "$WINE" "$W_CACHE_WIN\\ahk\\AutoHotkey.exe" "$W_TMP_WIN"\\tmp.ahk
  1351. unset _W_CR
  1352. }
  1353. # Function to protect wine-specific sections of code.
  1354. # Outputs a message to console explaining what's being skipped.
  1355. # Usage:
  1356. # if w_skip_windows name-of-operation
  1357. # then
  1358. # return
  1359. # fi
  1360. # ... do something that doesn't make sense on windows ...
  1361. w_skip_windows()
  1362. {
  1363. case "$OS" in
  1364. "Windows_NT")
  1365. echo "Skipping operation '$1' on Windows"
  1366. return 0
  1367. ;;
  1368. esac
  1369. return 1
  1370. }
  1371. w_override_dlls()
  1372. {
  1373. w_skip_windows w_override_dlls && return
  1374. _W_mode=$1
  1375. case $_W_mode in
  1376. *=*)
  1377. w_die "w_override_dlls: unknown mode $_W_mode.
  1378. Usage: 'w_override_dlls mode[,mode] dll ...'." ;;
  1379. disabled)
  1380. _W_mode="" ;;
  1381. esac
  1382. shift
  1383. echo Using $_W_mode override for following DLLs: $@
  1384. cat > "$W_TMP"/override-dll.reg <<_EOF_
  1385. REGEDIT4
  1386. [HKEY_CURRENT_USER\Software\Wine\DllOverrides]
  1387. _EOF_
  1388. while test "$1" != ""
  1389. do
  1390. case "$1" in
  1391. comctl32)
  1392. rm -rf "$W_WINDIR_UNIX"/winsxs/manifests/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest
  1393. ;;
  1394. esac
  1395. if [ "$_W_mode" = default ]
  1396. then
  1397. # To delete a registry key, give an unquoted dash as value
  1398. echo "\"*$1\"=-" >> "$W_TMP"/override-dll.reg
  1399. else
  1400. # Note: if you want to override even DLLs loaded with an absolute
  1401. # path, you need to add an asterisk:
  1402. echo "\"*$1\"=\"$_W_mode\"" >> "$W_TMP"/override-dll.reg
  1403. #echo "\"$1\"=\"$_W_mode\"" >> "$W_TMP"/override-dll.reg
  1404. fi
  1405. shift
  1406. done
  1407. w_try_regedit "$W_TMP_WIN"\\override-dll.reg
  1408. unset _W_mode
  1409. }
  1410. w_override_no_dlls()
  1411. {
  1412. w_skip_windows override && return
  1413. "$WINE" regedit /d 'HKEY_CURRENT_USER\Software\Wine\DllOverrides'
  1414. }
  1415. w_override_all_dlls()
  1416. {
  1417. # Disable all known native Microsoft DLLs in favor of Wine's builtin ones
  1418. # Generated with
  1419. # find ~/wine-git/dlls -maxdepth 1 -type d -print | sed 's,.*/,,' | sort | fmt -50 | sed 's/$/ \\/'
  1420. # Last updated: 2015-09-28
  1421. w_override_dlls builtin \
  1422. acledit aclui activeds actxprxy adsiid advapi32 \
  1423. advpack amstream api-ms-win-core-com-l1-1-0 \
  1424. api-ms-win-core-console-l1-1-0 \
  1425. api-ms-win-core-datetime-l1-1-0 \
  1426. api-ms-win-core-datetime-l1-1-1 \
  1427. api-ms-win-core-debug-l1-1-0 \
  1428. api-ms-win-core-debug-l1-1-1 \
  1429. api-ms-win-core-errorhandling-l1-1-0 \
  1430. api-ms-win-core-errorhandling-l1-1-1 \
  1431. api-ms-win-core-errorhandling-l1-1-2 \
  1432. api-ms-win-core-fibers-l1-1-0 \
  1433. api-ms-win-core-fibers-l1-1-1 \
  1434. api-ms-win-core-file-l1-1-0 \
  1435. api-ms-win-core-file-l1-2-0 \
  1436. api-ms-win-core-file-l2-1-0 \
  1437. api-ms-win-core-file-l2-1-1 \
  1438. api-ms-win-core-handle-l1-1-0 \
  1439. api-ms-win-core-heap-l1-1-0 \
  1440. api-ms-win-core-heap-l1-2-0 \
  1441. api-ms-win-core-heap-obsolete-l1-1-0 \
  1442. api-ms-win-core-interlocked-l1-1-0 \
  1443. api-ms-win-core-interlocked-l1-2-0 \
  1444. api-ms-win-core-io-l1-1-1 \
  1445. api-ms-win-core-kernel32-legacy-l1-1-0 \
  1446. api-ms-win-core-libraryloader-l1-1-0 \
  1447. api-ms-win-core-libraryloader-l1-1-1 \
  1448. api-ms-win-core-localization-l1-2-0 \
  1449. api-ms-win-core-localization-l1-2-1 \
  1450. api-ms-win-core-localization-obsolete-l1-1-0 \
  1451. api-ms-win-core-localregistry-l1-1-0 \
  1452. api-ms-win-core-memory-l1-1-0 \
  1453. api-ms-win-core-memory-l1-1-1 \
  1454. api-ms-win-core-misc-l1-1-0 \
  1455. api-ms-win-core-namedpipe-l1-1-0 \
  1456. api-ms-win-core-namedpipe-l1-2-0 \
  1457. api-ms-win-core-processenvironment-l1-1-0 \
  1458. api-ms-win-core-processenvironment-l1-2-0 \
  1459. api-ms-win-core-processthreads-l1-1-0 \
  1460. api-ms-win-core-processthreads-l1-1-1 \
  1461. api-ms-win-core-processthreads-l1-1-2 \
  1462. api-ms-win-core-profile-l1-1-0 \
  1463. api-ms-win-core-psapi-l1-1-0 \
  1464. api-ms-win-core-registry-l1-1-0 \
  1465. api-ms-win-core-rtlsupport-l1-1-0 \
  1466. api-ms-win-core-rtlsupport-l1-2-0 \
  1467. api-ms-win-core-shlwapi-legacy-l1-1-0 \
  1468. api-ms-win-core-string-l1-1-0 \
  1469. api-ms-win-core-synch-l1-1-0 \
  1470. api-ms-win-core-synch-l1-2-0 \
  1471. api-ms-win-core-sysinfo-l1-1-0 \
  1472. api-ms-win-core-sysinfo-l1-2-0 \
  1473. api-ms-win-core-sysinfo-l1-2-1 \
  1474. api-ms-win-core-threadpool-legacy-l1-1-0 \
  1475. api-ms-win-core-timezone-l1-1-0 \
  1476. api-ms-win-core-url-l1-1-0 \
  1477. api-ms-win-core-util-l1-1-0 \
  1478. api-ms-win-core-winrt-error-l1-1-0 \
  1479. api-ms-win-core-winrt-error-l1-1-1 \
  1480. api-ms-win-core-winrt-l1-1-0 \
  1481. api-ms-win-core-winrt-string-l1-1-0 \
  1482. api-ms-win-core-xstate-l2-1-0 \
  1483. api-ms-win-crt-conio-l1-1-0 \
  1484. api-ms-win-crt-convert-l1-1-0 \
  1485. api-ms-win-crt-environment-l1-1-0 \
  1486. api-ms-win-crt-filesystem-l1-1-0 \
  1487. api-ms-win-crt-heap-l1-1-0 \
  1488. api-ms-win-crt-locale-l1-1-0 \
  1489. api-ms-win-crt-math-l1-1-0 \
  1490. api-ms-win-crt-multibyte-l1-1-0 \
  1491. api-ms-win-crt-private-l1-1-0 \
  1492. api-ms-win-crt-process-l1-1-0 \
  1493. api-ms-win-crt-runtime-l1-1-0 \
  1494. api-ms-win-crt-stdio-l1-1-0 \
  1495. api-ms-win-crt-string-l1-1-0 \
  1496. api-ms-win-crt-time-l1-1-0 \
  1497. api-ms-win-crt-utility-l1-1-0 \
  1498. api-ms-win-downlevel-advapi32-l1-1-0 \
  1499. api-ms-win-downlevel-advapi32-l2-1-0 \
  1500. api-ms-win-downlevel-normaliz-l1-1-0 \
  1501. api-ms-win-downlevel-ole32-l1-1-0 \
  1502. api-ms-win-downlevel-shell32-l1-1-0 \
  1503. api-ms-win-downlevel-shlwapi-l1-1-0 \
  1504. api-ms-win-downlevel-shlwapi-l2-1-0 \
  1505. api-ms-win-downlevel-user32-l1-1-0 \
  1506. api-ms-win-downlevel-version-l1-1-0 \
  1507. api-ms-win-eventing-provider-l1-1-0 \
  1508. api-ms-win-ntuser-dc-access-l1-1-0 \
  1509. api-ms-win-security-base-l1-1-0 \
  1510. api-ms-win-security-base-l1-2-0 \
  1511. api-ms-win-security-sddl-l1-1-0 \
  1512. api-ms-win-service-core-l1-1-1 \
  1513. api-ms-win-service-management-l1-1-0 \
  1514. api-ms-win-service-winsvc-l1-2-0 apphelp \
  1515. appwiz.cpl atl atl100 atl110 atl80 atl90 authz \
  1516. avicap32 avifil32 avifile.dll16 avrt bcrypt \
  1517. browseui cabinet capi2032 cards cfgmgr32 clusapi \
  1518. combase comcat comctl32 comdlg32 commdlg.dll16 \
  1519. comm.drv16 compobj.dll16 compstui comsvcs connect \
  1520. credui crtdll crypt32 cryptdlg cryptdll cryptext \
  1521. cryptnet cryptui ctapi32 ctl3d32 ctl3d.dll16 \
  1522. ctl3dv2.dll16 d2d1 d3d10 d3d10_1 d3d10core \
  1523. d3d11 d3d8 d3d9 d3dcompiler_33 d3dcompiler_34 \
  1524. d3dcompiler_35 d3dcompiler_36 d3dcompiler_37 \
  1525. d3dcompiler_38 d3dcompiler_39 d3dcompiler_40 \
  1526. d3dcompiler_41 d3dcompiler_42 d3dcompiler_43 \
  1527. d3dcompiler_46 d3dcompiler_47 d3dim d3drm \
  1528. d3dx10_33 d3dx10_34 d3dx10_35 d3dx10_36 d3dx10_37 \
  1529. d3dx10_38 d3dx10_39 d3dx10_40 d3dx10_41 d3dx10_42 \
  1530. d3dx10_43 d3dx11_42 d3dx11_43 d3dx9_24 d3dx9_25 \
  1531. d3dx9_26 d3dx9_27 d3dx9_28 d3dx9_29 d3dx9_30 \
  1532. d3dx9_31 d3dx9_32 d3dx9_33 d3dx9_34 d3dx9_35 \
  1533. d3dx9_36 d3dx9_37 d3dx9_38 d3dx9_39 d3dx9_40 \
  1534. d3dx9_41 d3dx9_42 d3dx9_43 d3dxof davclnt \
  1535. dbgeng dbghelp dciman32 ddeml.dll16 ddraw \
  1536. ddrawex devenum dhcpcsvc difxapi dinput \
  1537. dinput8 dispdib.dll16 dispex display.drv16 \
  1538. dlls dmband dmcompos dmime dmloader dmscript \
  1539. dmstyle dmsynth dmusic dmusic32 dnsapi dplay \
  1540. dplayx dpnaddr dpnet dpnhpast dpnlobby dpvoice \
  1541. dpwsockx drmclien dsound dssenh dswave dwmapi \
  1542. dwrite dxdiagn dxerr8 dxerr9 dxgi dxguid dxva2 \
  1543. evr explorerframe ext-ms-win-gdi-devcaps-l1-1-0 \
  1544. faultrep fltlib fntcache fontsub fusion fwpuclnt \
  1545. gameux gdi32 gdi.exe16 gdiplus glu32 gphoto2.ds \
  1546. gpkcsp hal hhctrl.ocx hid hidclass.sys hlink \
  1547. hnetcfg httpapi iccvid icmp ieframe ifsmgr.vxd \
  1548. imaadp32.acm imagehlp imm32 imm.dll16 inetcomm \
  1549. inetcpl.cpl inetmib1 infosoft initpki inkobj \
  1550. inseng iphlpapi itircl itss joy.cpl jscript \
  1551. jsproxy kernel32 keyboard.drv16 krnl386.exe16 \
  1552. ksuser ktmw32 loadperf localspl localui lz32 \
  1553. lzexpand.dll16 mapi32 mapistub mciavi32 mcicda \
  1554. mciqtz32 mciseq mciwave mf mfplat mfreadwrite \
  1555. mgmtapi midimap mlang mmcndmgr mmdevapi \
  1556. mmdevldr.vxd mmsystem.dll16 monodebg.vxd \
  1557. mountmgr.sys mouse.drv16 mpr mprapi msacm32 \
  1558. msacm32.drv msacm.dll16 msadp32.acm msasn1 \
  1559. mscat32 mscms mscoree msctf msctfp msdaps \
  1560. msdmo msftedit msg711.acm msgsm32.acm mshtml \
  1561. mshtml.tlb msi msident msimg32 msimsg msimtf \
  1562. msisip msisys.ocx msls31 msnet32 mspatcha msrle32 \
  1563. msscript.ocx mssign32 mssip32 mstask msvcirt \
  1564. msvcm80 msvcm90 msvcp100 msvcp110 msvcp120 \
  1565. msvcp120_app msvcp60 msvcp70 msvcp71 msvcp80 \
  1566. msvcp90 msvcr100 msvcr110 msvcr120 msvcr120_app \
  1567. msvcr70 msvcr71 msvcr80 msvcr90 msvcrt msvcrt20 \
  1568. msvcrt40 msvcrtd msvfw32 msvidc32 msvideo.dll16 \
  1569. mswsock msxml msxml2 msxml3 msxml4 msxml6 \
  1570. nddeapi ndis.sys netapi32 netcfgx netprofm \
  1571. newdev normaliz npmshtml npptools ntdll ntdsapi \
  1572. ntoskrnl.exe ntprint objsel odbc32 odbccp32 \
  1573. odbccu32 ole2conv.dll16 ole2disp.dll16 ole2.dll16 \
  1574. ole2nls.dll16 ole2prox.dll16 ole2thk.dll16 \
  1575. ole32 oleacc oleaut32 olecli32 olecli.dll16 \
  1576. oledb32 oledlg olepro32 olesvr32 olesvr.dll16 \
  1577. olethk32 openal32 opencl opengl32 packager pdh \
  1578. photometadatahandler pidgen powrprof printui \
  1579. prntvpt propsys psapi pstorec qcap qedit qmgr \
  1580. qmgrprxy quartz query rasapi16.dll16 rasapi32 \
  1581. rasdlg regapi resutils riched20 riched32 \
  1582. rpcrt4 rsabase rsaenh rstrtmgr rtutils \
  1583. samlib sane.ds scarddlg sccbase schannel \
  1584. schedsvc scrrun scsiport.sys secur32 security \
  1585. sensapi serialui setupapi setupx.dll16 sfc \
  1586. sfc_os shdoclc shdocvw shell32 shell.dll16 \
  1587. shfolder shlwapi slbcsp slc snmpapi softpub \
  1588. sound.drv16 spoolss stdole2.tlb stdole32.tlb \
  1589. sti storage.dll16 stress.dll16 strmbase strmiids \
  1590. svrapi sxs system.drv16 t2embed tapi32 taskschd \
  1591. toolhelp.dll16 traffic twain_32 twain.dll16 \
  1592. typelib.dll16 ucrtbase unicows updspapi url \
  1593. urlmon usbd.sys user32 userenv user.exe16 usp10 \
  1594. uuid uxtheme vbscript vcomp vcomp100 vcomp110 \
  1595. vcomp90 vdhcp.vxd vdmdbg ver.dll16 version \
  1596. vmm.vxd vnbt.vxd vnetbios.vxd vssapi vtdapi.vxd \
  1597. vwin32.vxd w32skrnl w32sys.dll16 wbemdisp \
  1598. wbemprox webservices wer wevtapi wiaservc \
  1599. win32s16.dll16 win87em.dll16 winaspi.dll16 \
  1600. windebug.dll16 windowscodecs windowscodecsext \
  1601. winealsa.drv winecoreaudio.drv winecrt0 wined3d \
  1602. winegstreamer winejoystick.drv winemac.drv \
  1603. winemapi winemp3.acm wineoss.drv wineps16.drv16 \
  1604. wineps.drv wineqtdecoder winex11.drv wing32 \
  1605. wing.dll16 winhttp wininet winmm winnls32 \
  1606. winnls.dll16 winscard winsock.dll16 winspool.drv \
  1607. winsta wintab32 wintab.dll16 wintrust wlanapi \
  1608. wldap32 wmi wmiutils wmp wmvcore wnaspi32 wow32 \
  1609. wpcap ws2_32 wshom.ocx wsnmp32 wsock32 wtsapi32 \
  1610. wuapi wuaueng x3daudio1_1 x3daudio1_2 x3daudio1_3 \
  1611. x3daudio1_4 x3daudio1_5 x3daudio1_6 x3daudio1_7 \
  1612. xapofx1_1 xapofx1_3 xapofx1_4 xapofx1_5 xaudio2_7 \
  1613. xaudio2_8 xinput1_1 xinput1_2 xinput1_3 xinput1_4 \
  1614. xinput9_1_0 xmllite xolehlp xpsprint xpssvcs \
  1615. # blank line so you don't have to remove the extra trailing \
  1616. }
  1617. w_override_app_dlls()
  1618. {
  1619. w_skip_windows w_override_app_dlls && return
  1620. _W_app=$1
  1621. shift
  1622. _W_mode=$1
  1623. shift
  1624. # Fixme: handle comma-separated list of modes
  1625. case $_W_mode in
  1626. b|builtin) _W_mode=builtin ;;
  1627. n|native) _W_mode=native ;;
  1628. default) _W_mode=default ;;
  1629. d|disabled)
  1630. _W_mode="" ;;
  1631. *)
  1632. w_die "w_override_app_dlls: unknown mode $_W_mode. (want native, builtin, default, or disabled)
  1633. Usage: 'w_override_app_dlls app mode dll ...'." ;;
  1634. esac
  1635. echo Using $_W_mode override for following DLLs when running $_W_app: $@
  1636. (
  1637. echo REGEDIT4
  1638. echo ""
  1639. echo "[HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\$_W_app\\DllOverrides]"
  1640. ) > "$W_TMP"/override-dll.reg
  1641. while test "$1" != ""
  1642. do
  1643. case "$1" in
  1644. comctl32)
  1645. rm -rf "$W_WINDIR_UNIX"/winsxs/manifests/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest
  1646. ;;
  1647. esac
  1648. if [ "$_W_mode" = default ]
  1649. then
  1650. # To delete a registry key, give an unquoted dash as value
  1651. echo "\"*$1\"=-" >> "$W_TMP"/override-dll.reg
  1652. else
  1653. # Note: if you want to override even DLLs loaded with an absolute
  1654. # path, you need to add an asterisk:
  1655. echo "\"*$1\"=\"$_W_mode\"" >> "$W_TMP"/override-dll.reg
  1656. #echo "\"$1\"=\"$_W_mode\"" >> "$W_TMP"/override-dll.reg
  1657. fi
  1658. shift
  1659. done
  1660. w_try_regedit "$W_TMP_WIN"\\override-dll.reg
  1661. rm "$W_TMP"/override-dll.reg
  1662. unset _W_app _W_mode
  1663. }
  1664. # Has to be set in a few places...
  1665. w_set_winver()
  1666. {
  1667. w_skip_windows w_set_winver && return
  1668. # FIXME: This should really be done with winecfg, but it has no CLI options.
  1669. # First, delete any lingering version info, otherwise it may conflict:
  1670. (
  1671. "$WINE" reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion" /v SubVersionNumber /f || true
  1672. "$WINE" reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion" /v VersionNumber /f || true
  1673. "$WINE" reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v CSDVersion /f || true
  1674. "$WINE" reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v CurrentBuildNumber /f || true
  1675. "$WINE" reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion /f || true
  1676. "$WINE" reg delete "HKLM\System\CurrentControlSet\Control\ProductOptions" /v ProductType /f || true
  1677. "$WINE" reg delete "HKLM\System\CurrentControlSet\Control\ServiceCurrent" /v OS /f || true
  1678. "$WINE" reg delete "HKLM\System\CurrentControlSet\Control\Windows" /v CSDVersion /f || true
  1679. "$WINE" reg delete "HKCU\Software\Wine" /v Version /f || true
  1680. "$WINE" reg delete "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /f || true
  1681. ) > /dev/null 2>&1
  1682. case $1 in
  1683. win31)
  1684. echo "Setting Windows version to $1"
  1685. cat > "$W_TMP"/set-winver.reg <<_EOF_
  1686. REGEDIT4
  1687. [HKEY_USERS\S-1-5-4\Software\Wine]
  1688. "Version"="win31"
  1689. _EOF_
  1690. w_try_regedit "$W_TMP_WIN"\\set-winver.reg
  1691. return
  1692. ;;
  1693. win95)
  1694. # This key is only used for win 95/98:
  1695. echo "Setting Windows version to $1"
  1696. cat > "$W_TMP"/set-winver.reg <<_EOF_
  1697. REGEDIT4
  1698. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion]
  1699. "ProductName"="Microsoft Windows 95"
  1700. "SubVersionNumber"=""
  1701. "VersionNumber"="4.0.950"
  1702. _EOF_
  1703. w_try_regedit "$W_TMP_WIN"\\set-winver.reg
  1704. return
  1705. ;;
  1706. win98)
  1707. # This key is only used for win 95/98:
  1708. echo "Setting Windows version to $1"
  1709. cat > "$W_TMP"/set-winver.reg <<_EOF_
  1710. REGEDIT4
  1711. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion]
  1712. "ProductName"="Microsoft Windows 98"
  1713. "SubVersionNumber"=" A "
  1714. "VersionNumber"="4.10.2222"
  1715. _EOF_
  1716. w_try_regedit "$W_TMP_WIN"\\set-winver.reg
  1717. return
  1718. ;;
  1719. nt40)
  1720. # Similar to modern version, but sets two extra keys:
  1721. echo "Setting Windows version to $1"
  1722. cat > "$W_TMP"/set-winver.reg <<_EOF_
  1723. REGEDIT4
  1724. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion]
  1725. "CSDVersion"="Service Pack 6a"
  1726. "CurrentBuildNumber"="1381"
  1727. "CurrentVersion"="4.0"
  1728. [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ProductOptions]
  1729. "ProductType"="WinNT"
  1730. [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ServiceCurrent]
  1731. "OS"="Windows_NT"
  1732. [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Windows]
  1733. "CSDVersion"=dword:00000600
  1734. _EOF_
  1735. w_try_regedit "$W_TMP_WIN"\\set-winver.reg
  1736. return
  1737. ;;
  1738. win2k)
  1739. csdversion="Service Pack 4"
  1740. currentbuildnumber="2195"
  1741. currentversion="5.0"
  1742. csdversion_hex=dword:00000400
  1743. ;;
  1744. winxp)
  1745. csdversion="Service Pack 3"
  1746. currentbuildnumber="2600"
  1747. currentversion="5.1"
  1748. csdversion_hex=dword:00000300
  1749. ;;
  1750. win2k3)
  1751. csdversion="Service Pack 2"
  1752. currentbuildnumber="3790"
  1753. currentversion="5.2"
  1754. csdversion_hex=dword:00000200
  1755. "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "ServerNT" /f
  1756. ;;
  1757. vista)
  1758. csdversion="Service Pack 2"
  1759. currentbuildnumber="6002"
  1760. currentversion="6.0"
  1761. csdversion_hex=dword:00000200
  1762. "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "WinNT" /f
  1763. ;;
  1764. win7)
  1765. csdversion="Service Pack 1"
  1766. currentbuildnumber="7601"
  1767. currentversion="6.1"
  1768. csdversion_hex=dword:00000100
  1769. "$WINE" reg add "HKLM\\System\\CurrentControlSet\\Control\\ProductOptions" /v ProductType /d "WinNT" /f
  1770. ;;
  1771. *)
  1772. w_die "Invalid Windows version given."
  1773. ;;
  1774. esac
  1775. echo "Setting Windows version to $1"
  1776. cat > "$W_TMP"/set-winver.reg <<_EOF_
  1777. REGEDIT4
  1778. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion]
  1779. "CSDVersion"="$csdversion"
  1780. "CurrentBuildNumber"="$currentbuildnumber"
  1781. "CurrentVersion"="$currentversion"
  1782. [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Windows]
  1783. "CSDVersion"=$csdversion_hex
  1784. _EOF_
  1785. w_try_regedit "$W_TMP_WIN"\\set-winver.reg
  1786. }
  1787. w_unset_winver()
  1788. {
  1789. w_set_winver winxp
  1790. }
  1791. # Present app $1 with the Windows personality $2
  1792. w_set_app_winver()
  1793. {
  1794. w_skip_windows w_set_app_winver && return
  1795. _W_app="$1"
  1796. _W_version="$2"
  1797. echo "Setting $_W_app to $_W_version mode"
  1798. (
  1799. echo REGEDIT4
  1800. echo ""
  1801. echo "[HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\$_W_app]"
  1802. echo "\"Version\"=\"$_W_version\""
  1803. ) > "$W_TMP"/set-winver.reg
  1804. w_try_regedit "$W_TMP_WIN"\\set-winver.reg
  1805. rm "$W_TMP"/set-winver.reg
  1806. unset _W_app
  1807. }
  1808. # Usage: w_wine_version OP VALUE
  1809. # All the integer comparison operators of 'test' are supported, since 'test' does the work.
  1810. # Example:
  1811. # if w_wine_version -gt 1.3.2
  1812. # then
  1813. # ...
  1814. # fi
  1815. w_wine_version()
  1816. {
  1817. # Parse major/minor/micro/nano fields of VALUE. Ignore nano. Abort if major is not 1.
  1818. case $2 in
  1819. 0*|1.0|1.0.*) w_die "bug: $2 is before 1.1, we don't bother with bugs fixed that long ago" ;;
  1820. 1.1.*) _W_minor=1; _W_micro=`echo $2 | sed 's/.*\.//'`;;
  1821. 1.2) _W_minor=2; _W_micro=0;;
  1822. 1.2.*) _W_minor=2; _W_micro=`echo $2 | sed 's/.*\.//'`;;
  1823. 1.3.*) _W_minor=3; _W_micro=`echo $2 | sed 's/.*\.//'`;;
  1824. 1.4) _W_minor=4; _W_micro=0;;
  1825. 1.4.*) _W_minor=4; _W_micro=`echo $2 | sed 's/.*\.//'`;;
  1826. 1.5.*) _W_minor=5; _W_micro=`echo $2 | sed 's/.*\.//'`;;
  1827. 1.6|1.6-rc*) _W_minor=6; _W_micro=0;;
  1828. 1.6.*) _W_minor=6; _W_micro=`echo $2 | sed 's/.*\.//'`;;
  1829. 1.7.*) _W_minor=7; _W_micro=`echo $2 | sed 's/.*\.//'`;;
  1830. 1.8.*) _W_minor=8; _W_micro=`echo $2 | sed 's/.*\.//'`;;
  1831. *) w_die "bug: unrecognized version $2";;
  1832. esac
  1833. # Comparing current wine version 1.$WINETRICKS_WINE_MINOR.$WINETRICKS_WINE_MICRO against 1.$_W_minor.$_W_micro
  1834. if test $WINETRICKS_WINE_MINOR = $_W_minor
  1835. then
  1836. test $WINETRICKS_WINE_MICRO $1 $_W_micro || return 1
  1837. else
  1838. test $WINETRICKS_WINE_MINOR $1 $_W_minor || return 1
  1839. fi
  1840. }
  1841. # Built-in self test for w_wine_version
  1842. #echo Verify that version 1.3.4 is equal to itself
  1843. #WINETRICKS_WINE_MINOR=3 WINETRICKS_WINE_MICRO=4 w_wine_version -eq 1.3.4 || w_die "fail test case wine-1.3.4 = 1.3.4"
  1844. #echo Verify that version 1.3.4 is greater than 1.2
  1845. #WINETRICKS_WINE_MINOR=3 WINETRICKS_WINE_MICRO=4 w_wine_version -gt 1.2 || w_die "fail test case wine-1.3.4 > wine-1.2"
  1846. #echo Verify that version 1.6 is greater than 1.2
  1847. #WINETRICKS_WINE_MINOR=6 WINETRICKS_WINE_MICRO=0 w_wine_version -gt 1.2 || w_die "fail test case wine-1.6 > wine-1.2"
  1848. # Usage: w_wine_version_in range ...
  1849. # True if wine version in any of the given ranges
  1850. # 'range' can be
  1851. # val1, (for >= val1)
  1852. # ,val2 (for <= val2)
  1853. # val1,val2 (for >= val1 && <= val2)
  1854. w_wine_version_in()
  1855. {
  1856. for _W_range
  1857. do
  1858. _W_val1=`echo $_W_range | sed 's/,.*//'`
  1859. _W_val2=`echo $_W_range | sed 's/.*,//'`
  1860. # If in this range, return true
  1861. case $_W_range in
  1862. ,*) w_wine_version -le "$_W_val2" && unset _W_range _W_val1 _W_val2 && return 0;;
  1863. *,) w_wine_version -ge "$_W_val1" && unset _W_range _W_val1 _W_val2 && return 0;;
  1864. *) w_wine_version -ge "$_W_val1" && w_wine_version -le "$_W_val2" && unset _W_range _W_val1 _W_val2 && return 0;;
  1865. esac
  1866. done
  1867. unset _W_range _W_val1 _W_val2
  1868. return 1
  1869. }
  1870. # Built-in self test for w_wine_version_in
  1871. #w_wine_version_in_test()
  1872. #{
  1873. # WINETRICKS_WINE_MINOR=$1 WINETRICKS_WINE_MICRO=$2 w_wine_version_in $3 $4 $5 $6 || w_die "fail test case wine-1.$1.$2 in $3 $4 $5 $6"
  1874. #}
  1875. #w_wine_version_not_in_test()
  1876. #{
  1877. # WINETRICKS_WINE_MINOR=$1 WINETRICKS_WINE_MICRO=$2 w_wine_version_in $3 $4 $5 $6 && w_die "fail test case wine-1.$1.$2 in $3 $4 $5 $6"
  1878. #}
  1879. #echo Verify that version 1.2.0 is in the range 1.2,
  1880. #w_wine_version_in_test 2 0 1.2,
  1881. #echo Verify that version 1.3.4 is in the range 1.2,
  1882. #w_wine_version_in_test 3 4 1.2,
  1883. #echo Verify that version 1.3 is not in the range ,1.2
  1884. #w_wine_version_not_in_test 3 0 ,1.2
  1885. #echo Verify that version 1.6-rc1 is in the range 1.2,
  1886. #w_wine_version_in_test 6 0 1.2,
  1887. #echo test passed
  1888. # Usage: workaround_wine_bug bugnumber [message] [good-wine-version-range ...]
  1889. # Returns true and outputs given msg if the workaround needs to be applied.
  1890. # For debugging: if you want to skip a bug's workaround, put the bug number in
  1891. # the environment variable WINETRICKS_BLACKLIST to disable it.
  1892. w_workaround_wine_bug()
  1893. {
  1894. if test "$WINE" = ""
  1895. then
  1896. echo No need to work around wine bug $1 on windows
  1897. return 1
  1898. fi
  1899. case "$2" in
  1900. [0-9]*) w_die "bug: want message in w_workaround_wine_bug arg 2, got $2" ;;
  1901. "") _W_msg="";;
  1902. *) _W_msg="-- $2";;
  1903. esac
  1904. if test "$3" && w_wine_version_in $3 $4 $5 $6
  1905. then
  1906. echo Current wine does not have wine bug $1, so not applying workaround
  1907. return 1
  1908. fi
  1909. case $1 in
  1910. "$WINETRICKS_BLACKLIST")
  1911. echo wine bug $1 workaround blacklisted, skipping
  1912. return 1
  1913. ;;
  1914. esac
  1915. case $LANG in
  1916. da*) w_warn "Arbejder uden om wine-fejl ${1} $_W_msg" ;;
  1917. de*) w_warn "Wine-Fehler ${1} wird umgegangen $_W_msg" ;;
  1918. pl*) w_warn "Obchodzenie błędu w wine ${1} $_W_msg" ;;
  1919. ru*) w_warn "Обход ошибки ${1} $_W_msg" ;;
  1920. uk*) w_warn "Обхід помилки ${1} $_W_msg" ;;
  1921. zh_CN*) w_warn "绕过 wine bug ${1} $_W_msg" ;;
  1922. zh_TW*|zh_HK*) w_warn "繞過 wine bug ${1} $_W_msg" ;;
  1923. *) w_warn "Working around wine bug ${1} $_W_msg" ;;
  1924. esac
  1925. winetricks_stats_log_command w_workaround_wine_bug-$1
  1926. return 0
  1927. }
  1928. # Function for verbs to register themselves so they show up in the menu.
  1929. # Example:
  1930. # w_metadata wog games \
  1931. # title="World of Goo Demo" \
  1932. # pub="2D Boy" \
  1933. # year="2008" \
  1934. # media="download" \
  1935. # file1="WorldOfGooDemo.1.0.exe"
  1936. w_metadata()
  1937. {
  1938. case $WINETRICKS_OPT_VERBOSE in
  1939. 2) set -x ;;
  1940. *) set +x ;;
  1941. esac
  1942. if test "$installed_exe1" || test "$installed_file1" || test "$publisher" || test "$year"
  1943. then
  1944. w_die "bug: stray metadata tags set: somebody forgot a backslash in a w_metadata somewhere. Run with sh -x to see where."
  1945. fi
  1946. if winetricks_metadata_exists $1
  1947. then
  1948. w_die "bug: a verb named $1 already exists."
  1949. fi
  1950. _W_md_cmd="$1"
  1951. _W_category=$2
  1952. file="$WINETRICKS_METADATA/$_W_category/$1.vars"
  1953. shift
  1954. shift
  1955. # Echo arguments to file, with double quotes around the values.
  1956. # Used to use perl here, but that was too slow on cygwin.
  1957. for arg
  1958. do
  1959. case "$arg" in
  1960. installed_exe1=/*)
  1961. w_die "bug: w_metadata $_W_md_cmd has a unix path for installed_exe1, should be a windows path";;
  1962. installed_file1=/*)
  1963. w_die "bug: w_metadata $_W_md_cmd has a unix path for installed_file1, should be a windows path";;
  1964. media=download_manual)
  1965. w_die "bug: verb $_W_md_cmd has media=download_manual, should be manual_download" ;;
  1966. esac
  1967. # Use longest match when stripping value,
  1968. # and shortest match when stripping name,
  1969. # so descriptions can have embedded equals signs
  1970. # FIXME: backslashes get interpreted here. This screws up
  1971. # installed_file1 fairly often. Fortunately, we can use forward
  1972. # slashes in that variable instead of backslashes.
  1973. echo ${arg%%=*}=\"${arg#*=}\"
  1974. done > "$file"
  1975. echo category='"'$_W_category'"' >> "$file"
  1976. # If the problem described above happens, you'd see errors like this:
  1977. # /tmp/w.dank.4650/metadata/dlls/comctl32.vars: 6: Syntax error: Unterminated quoted string
  1978. # so check for lines that aren't properly quoted.
  1979. # Do sanity check unless running on cygwin, where it's way too slow.
  1980. case "$OS" in
  1981. "Windows_NT")
  1982. ;;
  1983. *)
  1984. if grep '[^"]$' "$file"
  1985. then
  1986. w_die "bug: w_metadata $_W_md_cmd corrupt, might need forward slashes?"
  1987. fi
  1988. ;;
  1989. esac
  1990. unset _W_md_cmd
  1991. # Restore verbosity:
  1992. case $WINETRICKS_OPT_VERBOSE in
  1993. 1|2) set -x ;;
  1994. *) set +x ;;
  1995. esac
  1996. }
  1997. # Function for verbs to register their main executable [or, if name is given, other executables]
  1998. # Deprecated. No-op for backwards compatibility
  1999. w_declare_exe()
  2000. {
  2001. w_warn "w_declare_exe is deprecated, now a noop"
  2002. }
  2003. # Checks that a conflicting verb is not already installed in the prefix
  2004. # Usage: w_conflicts verb_to_install conflicts
  2005. w_conflicts()
  2006. {
  2007. for x in $2
  2008. do
  2009. if grep -qw "$x" "$WINEPREFIX/winetricks.log"
  2010. then
  2011. w_die "error: $1 conflicts with $x, which is already installed."
  2012. fi
  2013. done
  2014. }
  2015. # Call a verb, don't let it affect environment
  2016. # Hope that subshell passes through exit status
  2017. # Usage: w_do_call foo [bar] (calls load_foo bar)
  2018. # Or: w_do_call foo=bar (also calls load_foo bar)
  2019. # Or: w_do_call foo (calls load_foo)
  2020. w_do_call()
  2021. {
  2022. (
  2023. # Hack..
  2024. if test $cmd = vd
  2025. then
  2026. load_vd $arg
  2027. _W_status=$?
  2028. test "$W_OPT_NOCLEAN" = 1 || rm -rf "$W_TMP"
  2029. mkdir -p "$W_TMP"
  2030. return $_W_status
  2031. fi
  2032. case $1 in
  2033. *=*) arg=`echo $1 | sed 's/.*=//'`; cmd=`echo $1 | sed 's/=.*//'`;;
  2034. *) cmd=$1; arg=$2 ;;
  2035. esac
  2036. # Kludge: use Temp instead of temp to avoid \t expansion in w_try
  2037. # but use temp in unix path because that's what wine creates, and having both temp and Temp
  2038. # causes confusion (e.g. makes vc2005trial fail)
  2039. # FIXME: W_TMP is also set in winetricks_set_wineprefix, can we avoid the duplication?
  2040. W_TMP="$W_DRIVE_C/windows/temp/_$1"
  2041. W_TMP_WIN="C:\\windows\\Temp\\_$1"
  2042. test "$W_OPT_NOCLEAN" = 1 || rm -rf "$W_TMP"
  2043. mkdir -p "$W_TMP"
  2044. # Unset all known used metadata values, in case this is a nested call
  2045. unset conflicts installed_file1 installed_exe1
  2046. if winetricks_metadata_exists $1
  2047. then
  2048. . "$WINETRICKS_METADATA"/*/$1.vars
  2049. elif winetricks_metadata_exists $cmd
  2050. then
  2051. . "$WINETRICKS_METADATA"/*/$cmd.vars
  2052. elif test $cmd = native || test $cmd = disabled || test $cmd = builtin || test $cmd = default
  2053. then
  2054. # ugly special case - can't have metadata for these verbs until we allow arbitrary parameters
  2055. w_override_dlls $cmd $arg
  2056. _W_status=$?
  2057. test "$W_OPT_NOCLEAN" = 1 || rm -rf "$W_TMP"
  2058. mkdir -p "$W_TMP"
  2059. return $_W_status
  2060. else
  2061. w_die "No such verb $1"
  2062. fi
  2063. # If needed, set the app's wineprefix
  2064. case "$OS" in
  2065. Windows_NT)
  2066. ;;
  2067. *)
  2068. case "$category"-"$WINETRICKS_OPT_SHAREDPREFIX" in
  2069. apps-0|benchmarks-0|games-0)
  2070. winetricks_set_wineprefix "$cmd"
  2071. # If it's a new wineprefix, give it metadata
  2072. if test ! -f "$WINEPREFIX"/wrapper.cfg
  2073. then
  2074. echo ww_name=\"$title\" > "$WINEPREFIX"/wrapper.cfg
  2075. fi
  2076. ;;
  2077. esac
  2078. ;;
  2079. esac
  2080. test "$W_OPT_NOCLEAN" = 1 || rm -rf "$W_TMP"
  2081. mkdir -p "$W_TMP"
  2082. # Don't install if already installed
  2083. if test "$WINETRICKS_FORCE" != 1 && winetricks_is_installed $1
  2084. then
  2085. echo "$1 already installed, skipping"
  2086. return 0
  2087. fi
  2088. # Don't install if a conflicting verb is already installed:
  2089. if test "$WINETRICKS_FORCE" != 1 && test "$conflicts" && test -f "$WINEPREFIX/winetricks.log"
  2090. then
  2091. for x in $conflicts
  2092. do
  2093. w_conflicts $1 $x
  2094. done
  2095. fi
  2096. # We'd like to get rid of W_PACKAGE, but for now, just set it as late as possible.
  2097. W_PACKAGE=$1
  2098. w_try load_$cmd $arg
  2099. winetricks_stats_log_command $*
  2100. # User-specific postinstall hook.
  2101. # Source it so the script can call w_download() if needed.
  2102. postfile="$WINETRICKS_POST/$1/$1-postinstall.sh"
  2103. if test -f "$postfile"
  2104. then
  2105. chmod +x "$postfile"
  2106. . "$postfile"
  2107. fi
  2108. # Verify install
  2109. if test "$installed_exe1" || test "$installed_file1"
  2110. then
  2111. if ! winetricks_is_installed $1
  2112. then
  2113. w_die "$1 install completed, but installed file $_W_file_unix not found"
  2114. fi
  2115. fi
  2116. # If the user specified --verify, also run gui tests:
  2117. if test "$WINETRICKS_VERIFY" = 1 && type verify_$cmd 2> /dev/null
  2118. then
  2119. w_try verify_$cmd
  2120. fi
  2121. # Clean up after this verb
  2122. test "$W_OPT_NOCLEAN" = 1 || rm -rf "$W_TMP"
  2123. mkdir -p "$W_TMP"
  2124. # Calling subshell must explicitly propagate error code with exit $?
  2125. ) || exit $?
  2126. }
  2127. # If you want to check exit status yourself, use w_do_call
  2128. w_call()
  2129. {
  2130. w_try w_do_call $@
  2131. }
  2132. w_register_font()
  2133. {
  2134. file=$1
  2135. shift
  2136. font=$1
  2137. case "$file" in
  2138. *.TTF|*.ttf) font="$font (TrueType)";;
  2139. esac
  2140. # Kludge: use _r to avoid \r expansion in w_try
  2141. cat > "$W_TMP"/_register-font.reg <<_EOF_
  2142. REGEDIT4
  2143. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Fonts]
  2144. "$font"="$file"
  2145. _EOF_
  2146. # too verbose
  2147. w_try_regedit "$W_TMP_WIN"\\_register-font.reg
  2148. cp "$W_TMP"/*.reg "$W_TMP_EARLY"/_reg$$.reg
  2149. # Wine also updates the win9x fonts key, so let's do that, too
  2150. cat > "$W_TMP"/_register-font.reg <<_EOF_
  2151. REGEDIT4
  2152. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Fonts]
  2153. "$font"="$file"
  2154. _EOF_
  2155. w_try_regedit "$W_TMP_WIN"\\_register-font.reg
  2156. cp "$W_TMP"/*.reg "$W_TMP_EARLY"/_reg$$-2.reg
  2157. }
  2158. w_register_font_replacement()
  2159. {
  2160. _W_alias=$1
  2161. shift
  2162. _W_font=$1
  2163. # Kludge: use _r to avoid \r expansion in w_try
  2164. cat > "$W_TMP"/_register-font-replacements.reg <<_EOF_
  2165. REGEDIT4
  2166. [HKEY_CURRENT_USER\Software\Wine\Fonts\Replacements]
  2167. "$_W_alias"="$_W_font"
  2168. _EOF_
  2169. w_try_regedit "$W_TMP_WIN"\\_register-font-replacements.reg
  2170. unset _W_alias _W_font
  2171. }
  2172. w_append_path()
  2173. {
  2174. # Prepend $1 to the windows path in the registry.
  2175. # Use printf %s to avoid interpreting backslashes.
  2176. _W_NEW_PATH="`printf %s $1| sed 's,\\\\,\\\\\\\\,g'`"
  2177. _W_WIN_PATH="`w_expand_env PATH | sed 's,\\\\,\\\\\\\\,g'`"
  2178. sed 's/$/\r/' > "$W_TMP"/path.reg <<_EOF_
  2179. REGEDIT4
  2180. [HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Environment]
  2181. "PATH"="$_W_NEW_PATH;$_W_WIN_PATH"
  2182. _EOF_
  2183. w_try_regedit "$W_TMP_WIN"\\path.reg
  2184. rm -f "$W_TMP"/path.reg
  2185. unset _W_NEW_PATH _W_WIN_PATH
  2186. }
  2187. #---- Private Functions ----
  2188. winetricks_get_sha1sum_prog() {
  2189. # Mac folks tend to not have sha1sum, but we can make do with openssl
  2190. if [ -x "`which sha1sum 2>/dev/null`" ]
  2191. then
  2192. WINETRICKS_SHA1SUM="sha1sum"
  2193. elif [ -x "`which openssl 2>/dev/null`" ]
  2194. then
  2195. WINETRICKS_SHA1SUM="openssl dgst -sha1"
  2196. else
  2197. w_die "No sha1sum utility available."
  2198. fi
  2199. }
  2200. winetricks_print_version() {
  2201. # normally done by winetricks_init, but we don't want to set up the WINEPREFIX
  2202. # just to get the winetricks version:
  2203. winetricks_get_sha1sum_prog
  2204. w_get_sha1sum $0
  2205. echo "$WINETRICKS_VERSION - sha1sum: $_W_gotsum"
  2206. }
  2207. # Run a small wine command for internal use
  2208. # Handy place to put small workarounds
  2209. winetricks_early_wine()
  2210. {
  2211. # The sed works around http://bugs.winehq.org/show_bug.cgi?id=25838
  2212. # which unfortunately got released in wine-1.3.12
  2213. # We would like to use DISPLAY= to prevent virtual desktops from
  2214. # popping up, but that causes autohotkey's tray icon to not show up.
  2215. # We used to use WINEDLLOVERRIDES=mshtml= here to suppress the gecko
  2216. # autoinstall, but that yielded wineprefixes that *never* autoinstalled
  2217. # gecko (winezeug bug 223).
  2218. # The tr removes carriage returns so expanded variables don't have crud on the end
  2219. # The grep works around using new wineprefixes with old wine
  2220. WINEDEBUG=-all "$WINE" "$@" 2> "$W_TMP_EARLY"/early_wine.err.txt | ( sed 's/.*1h.=//' | tr -d '\r' | grep -v "Module not found" || true)
  2221. }
  2222. winetricks_detect_gui()
  2223. {
  2224. if test -x "`which zenity 2>/dev/null`"
  2225. then
  2226. WINETRICKS_GUI=zenity
  2227. WINETRICKS_MENU_HEIGHT=500
  2228. WINETRICKS_MENU_WIDTH=1010
  2229. elif test -x "`which kdialog 2>/dev/null`"
  2230. then
  2231. echo "Zenity not found! Using kdialog as poor substitute."
  2232. WINETRICKS_GUI=kdialog
  2233. else
  2234. echo "No arguments given, so tried to start GUI, but zenity not found."
  2235. echo "Please install zenity if you want a graphical interface, or "
  2236. echo "run with --help for more options."
  2237. exit 1
  2238. fi
  2239. }
  2240. # Detect which sudo to use
  2241. winetricks_detect_sudo()
  2242. {
  2243. WINETRICKS_SUDO=sudo
  2244. if test "$WINETRICKS_GUI" = "none"
  2245. then
  2246. return
  2247. fi
  2248. if test x"$DISPLAY" != x""
  2249. then
  2250. if test -x "`which gksudo 2>/dev/null`"
  2251. then
  2252. WINETRICKS_SUDO=gksudo
  2253. elif test -x "`which kdesudo 2>/dev/null`"
  2254. then
  2255. WINETRICKS_SUDO=kdesudo
  2256. # fall back to the su versions if sudo isn't available (Fedora, etc.):
  2257. elif test -x "`which gksu 2>/dev/null`"
  2258. then
  2259. WINETRICKS_SUDO=gksu
  2260. elif test -x "`which kdesu 2>/dev/null`"
  2261. then
  2262. WINETRICKS_SUDO=kdesu
  2263. fi
  2264. fi
  2265. }
  2266. winetricks_get_prefix_var()
  2267. {
  2268. (
  2269. . "$W_PREFIXES_ROOT/$p/wrapper.cfg"
  2270. # The cryptic sed is there to turn ' into '\''
  2271. eval echo \$ww_$1 | sed "s/'/'\\\''/"
  2272. )
  2273. }
  2274. # Display prefix menu, get which wineprefix the user wants to work with
  2275. winetricks_prefixmenu()
  2276. {
  2277. case $LANG in
  2278. ru*) _W_msg_title="Winetricks - выберите путь wine (wineprefix)"
  2279. _W_msg_body='Что вы хотите сделать?'
  2280. _W_msg_apps='Установить программу'
  2281. _W_msg_games='Установить игру'
  2282. _W_msg_benchmarks='Установить приложение для оценки производительности'
  2283. _W_msg_default="Выберите путь для wine по умолчанию"
  2284. _W_msg_unattended0="Отключить автоматическую установку"
  2285. _W_msg_unattended1="Включить автоматическую установку"
  2286. _W_msg_showbroken0="Спрятать нерабочие программы (например, использующие DRM)"
  2287. _W_msg_showbroken1="Отобразить нерабочие программы (например, использующие DRM)"
  2288. _W_msg_help="Просмотр справки (в веб браузере)"
  2289. ;;
  2290. uk*) _W_msg_title="Winetricks - виберіть wineprefix"
  2291. _W_msg_body='Що Ви хочете зробити?'
  2292. _W_msg_apps='Встановити додаток'
  2293. _W_msg_games='Встановити гру'
  2294. _W_msg_benchmarks='Встановити benchmark'
  2295. _W_msg_default="Вибрати wineprefix за замовчуванням"
  2296. _W_msg_unattended0="Вимкнути автоматичну установку"
  2297. _W_msg_unattended1="Включити автоматичну установку"
  2298. _W_msg_showbroken0="Сховати нестабільні додатки (наприклад з проблемами з DRM)"
  2299. _W_msg_showbroken1="Показати нестабільні додатки (наприклад з проблемами з DRM)"
  2300. _W_msg_help="Переглянути довідку"
  2301. ;;
  2302. zh_CN*) _W_msg_title="Windows 应用安装向导 - 选择一个 wine 容器"
  2303. _W_msg_body='君欲何为?'
  2304. _W_msg_apps='安装一个 windows 应用'
  2305. _W_msg_games='安装一个游戏'
  2306. _W_msg_benchmarks='安装一个基准测试软件'
  2307. _W_msg_default="选择默认的 wine 容器"
  2308. _W_msg_unattended0="禁用静默安装"
  2309. _W_msg_unattended1="启用静默安装"
  2310. _W_msg_showbroken0="隐藏有问题的程序 (例如那些有数字版权问题)"
  2311. _W_msg_showbroken1="有问题的程序 (例如那些有数字版权问题)"
  2312. _W_msg_help="查看帮助"
  2313. ;;
  2314. zh_TW*|zh_HK*) _W_msg_title="Windows 應用安裝向導 - 選取一個 wine 容器"
  2315. _W_msg_body='君欲何為?'
  2316. _W_msg_apps='安裝一個 windows 應用'
  2317. _W_msg_games='安裝一個游戲'
  2318. _W_msg_benchmarks='安裝一個基准測試軟體'
  2319. _W_msg_default="選取預設的 wine 容器"
  2320. _W_msg_unattended0="禁用靜默安裝"
  2321. _W_msg_unattended1="啟用靜默安裝"
  2322. _W_msg_showbroken0="隱藏有問題的程式 (例如那些有數字版權問題)"
  2323. _W_msg_showbroken1="有問題的程式 (例如那些有數字版權問題)"
  2324. _W_msg_help="檢視輔助說明"
  2325. ;;
  2326. de*) _W_msg_title="Winetricks - wineprefix auswählen"
  2327. _W_msg_body='Was möchten Sie tun?'
  2328. _W_msg_apps='Eine Programm installieren'
  2329. _W_msg_games='Ein Spiel installieren'
  2330. _W_msg_benchmarks='Ein Benchmark installieren'
  2331. _W_msg_default="Standard wineprefix auswählen"
  2332. _W_msg_unattended0="Automatische Installation deaktivieren"
  2333. _W_msg_unattended1="Automatische Installation aktivieren"
  2334. _W_msg_showbroken0="Defekte Programme nicht anzeigen (z.B. solche mit DRM Problemen)"
  2335. _W_msg_showbroken1="Defekte Programme anzeigen (z.B. solche mit DRM Problemen)"
  2336. _W_msg_help="Hilfe anzeigen"
  2337. ;;
  2338. *) _W_msg_title="Winetricks - choose a wineprefix"
  2339. _W_msg_body='What do you want to do?'
  2340. _W_msg_apps='Install an application'
  2341. _W_msg_games='Install a game'
  2342. _W_msg_benchmarks='Install a benchmark'
  2343. _W_msg_default="Select the default wineprefix"
  2344. _W_msg_unattended0="Disable silent install"
  2345. _W_msg_unattended1="Enable silent install"
  2346. _W_msg_showbroken0="Hide broken apps (e.g. those with DRM problems)"
  2347. _W_msg_showbroken1="Show broken apps (e.g. those with DRM problems)"
  2348. _W_msg_help="View help"
  2349. ;;
  2350. esac
  2351. case "$W_OPT_UNATTENDED" in
  2352. 1) _W_cmd_unattended=attended; _W_msg_unattended="$_W_msg_unattended0" ;;
  2353. *) _W_cmd_unattended=unattended; _W_msg_unattended="$_W_msg_unattended1" ;;
  2354. esac
  2355. case "$W_OPT_SHOWBROKEN" in
  2356. 1) _W_cmd_showbroken=hidebroken; _W_msg_showbroken="$_W_msg_showbroken0" ;;
  2357. *) _W_cmd_showbroken=showbroken; _W_msg_showbroken="$_W_msg_showbroken1" ;;
  2358. esac
  2359. case $WINETRICKS_GUI in
  2360. zenity)
  2361. printf %s "zenity \
  2362. --title '$_W_msg_title' \
  2363. --text '$_W_msg_body' \
  2364. --list \
  2365. --radiolist \
  2366. --column '' \
  2367. --column '' \
  2368. --column '' \
  2369. --height $WINETRICKS_MENU_HEIGHT \
  2370. --width $WINETRICKS_MENU_WIDTH \
  2371. --hide-column 2 \
  2372. FALSE help '$_W_msg_help' \
  2373. FALSE apps '$_W_msg_apps' \
  2374. FALSE benchmarks '$_W_msg_benchmarks' \
  2375. FALSE games '$_W_msg_games' \
  2376. TRUE main '$_W_msg_default' \
  2377. " \
  2378. > "$WINETRICKS_WORKDIR"/zenity.sh
  2379. if ls -d $W_PREFIXES_ROOT/*/dosdevices > /dev/null 2>&1
  2380. then
  2381. for prefix in "$W_PREFIXES_ROOT"/*/dosdevices
  2382. do
  2383. q="${prefix%%/dosdevices}"
  2384. p="${q##*/}"
  2385. if test -f "$W_PREFIXES_ROOT/$p/wrapper.cfg"
  2386. then
  2387. _W_msg_name="$p (`winetricks_get_prefix_var name`)"
  2388. else
  2389. _W_msg_name="$p"
  2390. fi
  2391. case $LANG in
  2392. zh_CN*) printf %s " FALSE prefix='$p' '选择管理 $_W_msg_name' " ;;
  2393. zh_TW*|zh_HK*) printf %s " FALSE prefix='$p' '選擇管理 $_W_msg_name' " ;;
  2394. de*) printf %s " FALSE prefix='$p' '$_W_msg_name auswählen' " ;;
  2395. *) printf %s " FALSE prefix='$p' 'Select $_W_msg_name' " ;;
  2396. esac
  2397. done >> "$WINETRICKS_WORKDIR"/zenity.sh
  2398. fi
  2399. printf %s " FALSE $_W_cmd_unattended '$_W_msg_unattended'" >> "$WINETRICKS_WORKDIR"/zenity.sh
  2400. printf %s " FALSE $_W_cmd_showbroken '$_W_msg_showbroken'" >> "$WINETRICKS_WORKDIR"/zenity.sh
  2401. sh "$WINETRICKS_WORKDIR"/zenity.sh | tr '|' ' '
  2402. ;;
  2403. kdialog)
  2404. (
  2405. printf %s "kdialog \
  2406. --geometry 600x400+100+100 \
  2407. --title '$_W_msg_title' \
  2408. --separate-output \
  2409. --radiolist '$_W_msg_body' \
  2410. help '$_W_msg_help' off \
  2411. games '$_W_msg_games' off \
  2412. benchmarks '$_W_msg_benchmarks' off \
  2413. apps '$_W_msg_apps' off \
  2414. main '$_W_msg_default' on "
  2415. if ls -d "$W_PREFIXES_ROOT"/*/dosdevices > /dev/null 2>&1
  2416. then
  2417. for prefix in "$W_PREFIXES_ROOT"/*/dosdevices
  2418. do
  2419. q="${prefix%%/dosdevices}"
  2420. p="${q##*/}"
  2421. if test -f "$W_PREFIXES_ROOT/$p/wrapper.cfg"
  2422. then
  2423. _W_msg_name="$p (`winetricks_get_prefix_var name`)"
  2424. else
  2425. _W_msg_name="$p"
  2426. fi
  2427. printf %s "prefix='$p' 'Select $_W_msg_name' off "
  2428. done
  2429. fi
  2430. ) > "$WINETRICKS_WORKDIR"/kdialog.sh
  2431. sh "$WINETRICKS_WORKDIR"/kdialog.sh
  2432. ;;
  2433. esac
  2434. unset _W_msg_help _W_msg_body _W_msg_title _W_msg_new _W_msg_default _W_msg_name
  2435. }
  2436. # Display main menu, get which submenu the user wants
  2437. winetricks_mainmenu()
  2438. {
  2439. case $LANG in
  2440. da*) _W_msg_title='Vælg en pakke-kategori'
  2441. _W_msg_body='Hvad ønsker du at gøre?'
  2442. _W_msg_dlls="Install a Windows DLL"
  2443. _W_msg_fonts='Install a font'
  2444. _W_msg_settings='Change Wine settings'
  2445. _W_msg_winecfg='Run winecfg'
  2446. _W_msg_regedit='Run regedit'
  2447. _W_msg_taskmgr='Run taskmgr'
  2448. _W_msg_uninstaller='Run uninstaller'
  2449. _W_msg_shell='Run a commandline shell (for debugging)'
  2450. _W_msg_folder='Browse files'
  2451. _W_msg_annihilate="Delete ALL DATA AND APPLICATIONS INSIDE THIS WINEPREFIX"
  2452. ;;
  2453. de*) _W_msg_title='Pakettyp auswählen'
  2454. _W_msg_body='Was möchten Sie tun?'
  2455. _W_msg_dlls="Windows-DLL installieren"
  2456. _W_msg_fonts='Schriftart installieren'
  2457. _W_msg_settings='Wine Einstellungen ändern'
  2458. _W_msg_winecfg='winecfg starten'
  2459. _W_msg_regedit='regedit starten'
  2460. _W_msg_taskmgr='taskmgr starten'
  2461. _W_msg_uninstaller='uninstaller starten'
  2462. _W_msg_shell='Eine Kommandozeile zum debuggen starten'
  2463. _W_msg_folder='Ordner durchsuchen'
  2464. _W_msg_annihilate="ALLE DATEIEN UND PROGRAMME IN DIESEM WINEPREFIX Löschen"
  2465. ;;
  2466. pl*) _W_msg_title="Winetricks - obecny prefiks to \"$WINEPREFIX\""
  2467. _W_msg_body='What would you like to do to this wineprefix?'
  2468. _W_msg_dlls="Zainstaluj Windowsową bibliotekę DLL lub komponent"
  2469. _W_msg_fonts='Zainstaluj czcionkę'
  2470. _W_msg_settings='Zmień ustawienia'
  2471. _W_msg_winecfg='Uruchom winecfg'
  2472. _W_msg_regedit='Uruchom regedit'
  2473. _W_msg_taskmgr='Uruchom taskmgr'
  2474. _W_msg_uninstaller='Run uninstaller'
  2475. _W_msg_shell='Uruchom powłokę wiersza poleceń (dla debugowania)'
  2476. _W_msg_folder='Przeglądaj pliki'
  2477. _W_msg_annihilate="Usuń WSZYSTKIE DANE I APLIKACJE WEWNĄTRZ TEGO WINEPREFIXA"
  2478. ;;
  2479. ru*) _W_msg_title="Winetricks - текущий путь для wine (wineprefix) \"$WINEPREFIX\""
  2480. _W_msg_body='Что вы хотите сделать с этим wineprefix?'
  2481. _W_msg_dlls="Установить DLL библиотеку или компонент Windows"
  2482. _W_msg_fonts='Установить шрифт'
  2483. _W_msg_settings='Поменять настройки'
  2484. _W_msg_winecfg='Запустить winecfg (редактор настроек wine)'
  2485. _W_msg_regedit='Запустить regedit (редактор рееста)'
  2486. _W_msg_taskmgr='Запустить taskmgr (менеджер задач)'
  2487. _W_msg_uninstaller='Запустить uninstaller (деинсталятор)'
  2488. _W_msg_shell='Запустить графический терминал (для отладки)'
  2489. _W_msg_folder='Проводник файлов'
  2490. _W_msg_annihilate="Удалить ВСЕ ДАННЫЕ И ПРИЛОЖЕНИЯ В ЭТОМ WINEPREFIX"
  2491. ;;
  2492. uk*) _W_msg_title="Winetricks - поточний prefix \"$WINEPREFIX\""
  2493. _W_msg_body='Що Ви хочете зробити для цього wineprefix?'
  2494. _W_msg_dlls="Встановити Windows DLL чи компонент(и)"
  2495. _W_msg_fonts='Встановити шрифт'
  2496. _W_msg_settings='Змінити налаштування'
  2497. _W_msg_winecfg='Запустити winecfg'
  2498. _W_msg_regedit='Запустити regedit'
  2499. _W_msg_taskmgr='Запустити taskmgr'
  2500. _W_msg_uninstaller='Run uninstaller'
  2501. _W_msg_shell='Запуск командної оболонки (для налагодження)'
  2502. _W_msg_folder='Перегляд файлів'
  2503. _W_msg_annihilate="Видалити УСІ ДАНІ ТА ПРОГРАМИ З ЦЬОГО WINEPREFIX"
  2504. ;;
  2505. zh_CN*) _W_msg_title="Windows 应用安装向导 - 当前容器路径是 \"$WINEPREFIX\""
  2506. _W_msg_body='管理当前容器'
  2507. _W_msg_dlls="安装 Windows DLL 或组件"
  2508. _W_msg_fonts='安装字体'
  2509. _W_msg_settings='修改设置'
  2510. _W_msg_winecfg='运行 winecfg'
  2511. _W_msg_regedit='运行注册表'
  2512. _W_msg_taskmgr='运行任务管理器'
  2513. _W_msg_uninstaller='运行卸载程序'
  2514. _W_msg_shell='运行命令提示窗口 (作为调试)'
  2515. _W_msg_folder='浏览容器中的文件'
  2516. _W_msg_annihilate="删除当前容器所有相关文件,包括启动器,完全卸载"
  2517. ;;
  2518. zh_TW*|zh_HK*) _W_msg_title="Windows 應用裝載向導 - 目前容器路徑是 \"$WINEPREFIX\""
  2519. _W_msg_body='管理目前容器'
  2520. _W_msg_dlls="裝載 Windows DLL 或套件"
  2521. _W_msg_fonts='裝載字型'
  2522. _W_msg_settings='修改設定'
  2523. _W_msg_winecfg='執行 winecfg'
  2524. _W_msg_regedit='執行註冊表'
  2525. _W_msg_taskmgr='執行工作管理者'
  2526. _W_msg_uninstaller='執行反安裝程式'
  2527. _W_msg_shell='執行指令輔助說明視窗 (作為除錯)'
  2528. _W_msg_folder='瀏覽容器中的檔案'
  2529. _W_msg_annihilate="移除目前容器所有相依檔案,包括啟動器,完全卸載"
  2530. ;;
  2531. *) _W_msg_title="Winetricks - current prefix is \"$WINEPREFIX\""
  2532. _W_msg_body='What would you like to do to this wineprefix?'
  2533. _W_msg_dlls="Install a Windows DLL or component"
  2534. _W_msg_fonts='Install a font'
  2535. _W_msg_settings='Change settings'
  2536. _W_msg_winecfg='Run winecfg'
  2537. _W_msg_regedit='Run regedit'
  2538. _W_msg_taskmgr='Run taskmgr'
  2539. _W_msg_uninstaller='Run uninstaller'
  2540. _W_msg_shell='Run a commandline shell (for debugging)'
  2541. _W_msg_folder='Browse files'
  2542. _W_msg_annihilate="Delete ALL DATA AND APPLICATIONS INSIDE THIS WINEPREFIX"
  2543. ;;
  2544. esac
  2545. case $WINETRICKS_GUI in
  2546. zenity)
  2547. (
  2548. printf %s "zenity \
  2549. --title '$_W_msg_title' \
  2550. --text '$_W_msg_body' \
  2551. --list \
  2552. --radiolist \
  2553. --column '' \
  2554. --column '' \
  2555. --column '' \
  2556. --height $WINETRICKS_MENU_HEIGHT \
  2557. --width $WINETRICKS_MENU_WIDTH \
  2558. --hide-column 2 \
  2559. FALSE dlls '$_W_msg_dlls' \
  2560. FALSE fonts '$_W_msg_fonts' \
  2561. FALSE settings '$_W_msg_settings' \
  2562. FALSE winecfg '$_W_msg_winecfg' \
  2563. FALSE regedit '$_W_msg_regedit' \
  2564. FALSE taskmgr '$_W_msg_taskmgr' \
  2565. FALSE uninstaller '$_W_msg_uninstaller' \
  2566. FALSE shell '$_W_msg_shell' \
  2567. FALSE folder '$_W_msg_folder' \
  2568. FALSE annihilate '$_W_msg_annihilate' \
  2569. "
  2570. ) > "$WINETRICKS_WORKDIR"/zenity.sh
  2571. sh "$WINETRICKS_WORKDIR"/zenity.sh | tr '|' ' '
  2572. ;;
  2573. kdialog)
  2574. $WINETRICKS_GUI --geometry 600x400+100+100 \
  2575. --title "$_W_msg_title" \
  2576. --separate-output \
  2577. --radiolist \
  2578. "$_W_msg_body"\
  2579. dlls "$_W_msg_dlls" off \
  2580. fonts "$_W_msg_fonts" off \
  2581. settings "$_W_msg_settings" off \
  2582. winecfg "$_W_msg_winecfg" off \
  2583. regedit "$_W_msg_regedit" off \
  2584. taskmgr "$_W_msg_taskmgr" off \
  2585. uninstaller "$_W_msg_uninstaller" off \
  2586. shell "$_W_msg_shell" off \
  2587. folder "$_W_msg_folder" off \
  2588. annihilate "$_W_msg_annihilate" off \
  2589. $_W_cmd_unattended "$_W_msg_unattended" off \
  2590. ;;
  2591. esac
  2592. unset _W_msg_body _W_msg_title _W_msg_apps _W_msg_benchmarks _W_msg_dlls _W_msg_games _W_msg_settings
  2593. }
  2594. winetricks_settings_menu()
  2595. {
  2596. # FIXME: these translations should really be centralized/reused:
  2597. case $LANG in
  2598. da*) _W_msg_title='Vælg en pakke'
  2599. _W_msg_body='Which settings would you like to change?'
  2600. ;;
  2601. de*) _W_msg_title="Winetricks - Aktueller Prefix ist \"$WINEPREFIX\""
  2602. _W_msg_body='Welche Einstellungen möchten Sie ändern?'
  2603. ;;
  2604. pl*) _W_msg_title="Winetricks - obecny prefiks to \"$WINEPREFIX\""
  2605. _W_msg_body='Which settings would you like to change?'
  2606. ;;
  2607. ru*) _W_msg_title="Winetricks - текущий путь wine (wineprefix) \"$WINEPREFIX\""
  2608. _W_msg_body='Какие настройки вы хотите изменить?'
  2609. ;;
  2610. uk*) _W_msg_title="Winetricks - поточний prefix \"$WINEPREFIX\""
  2611. _W_msg_body='Які налаштування Ви хочете змінити?'
  2612. ;;
  2613. zh_CN*) _W_msg_title="Windows 应用安装向导 - 当前容器路径是 \"$WINEPREFIX\""
  2614. _W_msg_body='君欲更改哪项设置?'
  2615. ;;
  2616. zh_TW*|zh_HK*) _W_msg_title="Windows 應用裝載向導 - 目前容器路徑是 \"$WINEPREFIX\""
  2617. _W_msg_body='君欲變更哪項設定?'
  2618. ;;
  2619. *) _W_msg_title="Winetricks - current prefix is \"$WINEPREFIX\""
  2620. _W_msg_body='Which settings would you like to change?'
  2621. ;;
  2622. esac
  2623. case $WINETRICKS_GUI in
  2624. zenity)
  2625. case $LANG in
  2626. da*) printf %s "zenity \
  2627. --title '$_W_msg_title' \
  2628. --text '$_W_msg_body' \
  2629. --list \
  2630. --checklist \
  2631. --column '' \
  2632. --column Pakke \
  2633. --column Navn \
  2634. --height $WINETRICKS_MENU_HEIGHT \
  2635. --width $WINETRICKS_MENU_WIDTH \
  2636. "
  2637. ;;
  2638. de*) printf %s "zenity \
  2639. --title '$_W_msg_title' \
  2640. --text '$_W_msg_body' \
  2641. --list \
  2642. --checklist \
  2643. --column '' \
  2644. --column Einstellung \
  2645. --column Name \
  2646. --height $WINETRICKS_MENU_HEIGHT \
  2647. --width $WINETRICKS_MENU_WIDTH \
  2648. "
  2649. ;;
  2650. pl*) printf %s "zenity \
  2651. --title '$_W_msg_title' \
  2652. --text '$_W_msg_body' \
  2653. --list \
  2654. --checklist \
  2655. --column '' \
  2656. --column Ustawienie \
  2657. --column Nazwa \
  2658. --height $WINETRICKS_MENU_HEIGHT \
  2659. --width $WINETRICKS_MENU_WIDTH \
  2660. "
  2661. ;;
  2662. ru*) printf %s "zenity \
  2663. --title '$_W_msg_title' \
  2664. --text '$_W_msg_body' \
  2665. --list \
  2666. --checklist \
  2667. --column '' \
  2668. --column Установка \
  2669. --column Имя \
  2670. --height $WINETRICKS_MENU_HEIGHT \
  2671. --width $WINETRICKS_MENU_WIDTH \
  2672. "
  2673. ;;
  2674. uk*) printf %s "zenity \
  2675. --title '$_W_msg_title' \
  2676. --text '$_W_msg_body' \
  2677. --list \
  2678. --checklist \
  2679. --column '' \
  2680. --column Установка \
  2681. --column Назва \
  2682. --height $WINETRICKS_MENU_HEIGHT \
  2683. --width $WINETRICKS_MENU_WIDTH \
  2684. "
  2685. ;;
  2686. zh_CN*) printf %s "zenity \
  2687. --title '$_W_msg_title' \
  2688. --text '$_W_msg_body' \
  2689. --list \
  2690. --checklist \
  2691. --column '' \
  2692. --column 设置 \
  2693. --column 标题 \
  2694. --height $WINETRICKS_MENU_HEIGHT \
  2695. --width $WINETRICKS_MENU_WIDTH \
  2696. "
  2697. ;;
  2698. zh_TW*|zh_HK*) printf %s "zenity \
  2699. --title '$_W_msg_title' \
  2700. --text '$_W_msg_body' \
  2701. --list \
  2702. --checklist \
  2703. --column '' \
  2704. --column 設定 \
  2705. --column 標題 \
  2706. --height $WINETRICKS_MENU_HEIGHT \
  2707. --width $WINETRICKS_MENU_WIDTH \
  2708. "
  2709. ;;
  2710. *) printf %s "zenity \
  2711. --title '$_W_msg_title' \
  2712. --text '$_W_msg_body' \
  2713. --list \
  2714. --checklist \
  2715. --column '' \
  2716. --column Setting \
  2717. --column Title \
  2718. --height $WINETRICKS_MENU_HEIGHT \
  2719. --width $WINETRICKS_MENU_WIDTH \
  2720. "
  2721. ;;
  2722. esac > "$WINETRICKS_WORKDIR"/zenity.sh
  2723. for metadatafile in "$WINETRICKS_METADATA"/$WINETRICKS_CURMENU/*.vars
  2724. do
  2725. code=`winetricks_metadata_basename "$metadatafile"`
  2726. (
  2727. title='?'
  2728. author='?'
  2729. . "$metadatafile"
  2730. # Begin 'title' strings localization code
  2731. case $LANG in
  2732. uk*) case "$title_uk" in
  2733. "") ;;
  2734. *) title="$title_uk";;
  2735. esac
  2736. esac
  2737. # End of code
  2738. printf "%s %s %s %s" " " FALSE \
  2739. $code \
  2740. "\"$title\""
  2741. )
  2742. done >> "$WINETRICKS_WORKDIR"/zenity.sh
  2743. sh "$WINETRICKS_WORKDIR"/zenity.sh | tr '|' ' '
  2744. ;;
  2745. kdialog)
  2746. (
  2747. printf %s "kdialog --geometry 600x400+100+100 --title '$_W_msg_title' --separate-output --checklist '$_W_msg_body' "
  2748. winetricks_list_all | sed 's/\([^ ]*\) *\(.*\)/\1 "\1 - \2" off /' | tr '\012' ' '
  2749. ) > "$WINETRICKS_WORKDIR"/kdialog.sh
  2750. sh "$WINETRICKS_WORKDIR"/kdialog.sh
  2751. ;;
  2752. esac
  2753. unset _W_msg_body _W_msg_title
  2754. }
  2755. # Display the current menu, output list of verbs to execute to stdout
  2756. winetricks_showmenu()
  2757. {
  2758. case $LANG in
  2759. da*) _W_msg_title='Vælg en pakke'
  2760. _W_msg_body='Vilken pakke vil du installere?'
  2761. _W_cached="cached"
  2762. ;;
  2763. de*) _W_msg_title="Winetricks - Aktueller Prefix ist \"$WINEPREFIX\""
  2764. _W_msg_body='Welche Paket(e) möchten Sie installieren?'
  2765. _W_cached="gecached"
  2766. ;;
  2767. pl*) _W_msg_title="Winetricks - obecny prefiks to \"$WINEPREFIX\""
  2768. _W_msg_body='Które paczki chesz zainstalować?'
  2769. _W_cached="zarchiwizowane"
  2770. ;;
  2771. ru*) _W_msg_title="Winetricks - текущий путь wine (wineprefix) \"$WINEPREFIX\""
  2772. _W_msg_body='Какое приложение(я) вы хотите установить?'
  2773. _W_cached="в кэше"
  2774. ;;
  2775. uk*) _W_msg_title="Winetricks - поточний prefix \"$WINEPREFIX\""
  2776. _W_msg_body='Які пакунки Ви хочете встановити?'
  2777. _W_cached="кешовано"
  2778. ;;
  2779. zh_CN*) _W_msg_title="Windows 应用安装向导 - 当前容器路径是 \"$WINEPREFIX\""
  2780. _W_msg_body='君欲安装何种应用?'
  2781. _W_cached="已缓存"
  2782. ;;
  2783. zh_TW*|zh_HK*) _W_msg_title="Windows 應用裝載向導 - 目前容器路徑是 \"$WINEPREFIX\""
  2784. _W_msg_body='君欲裝載何種應用?'
  2785. _W_cached="已緩存"
  2786. ;;
  2787. *) _W_msg_title="Winetricks - current prefix is \"$WINEPREFIX\""
  2788. _W_msg_body='Which package(s) would you like to install?'
  2789. _W_cached="cached"
  2790. ;;
  2791. esac
  2792. case $WINETRICKS_GUI in
  2793. zenity)
  2794. case $LANG in
  2795. da*) printf %s "zenity \
  2796. --title '$_W_msg_title' \
  2797. --text '$_W_msg_body' \
  2798. --list \
  2799. --checklist \
  2800. --column '' \
  2801. --column Pakke \
  2802. --column Navn \
  2803. --column Udgiver \
  2804. --column År \
  2805. --column Medie \
  2806. --column Status \
  2807. --column 'Size (MB)' \
  2808. --column 'Time (sec)' \
  2809. --height $WINETRICKS_MENU_HEIGHT \
  2810. --width $WINETRICKS_MENU_WIDTH \
  2811. "
  2812. ;;
  2813. de*) printf %s "zenity \
  2814. --title '$_W_msg_title' \
  2815. --text '$_W_msg_body' \
  2816. --list \
  2817. --checklist \
  2818. --column '' \
  2819. --column Paket \
  2820. --column Name \
  2821. --column Herausgeber \
  2822. --column Jahr \
  2823. --column Media \
  2824. --column Status \
  2825. --column 'Größe (MB)' \
  2826. --column 'Zeit (sec)' \
  2827. --height $WINETRICKS_MENU_HEIGHT \
  2828. --width $WINETRICKS_MENU_WIDTH \
  2829. "
  2830. ;;
  2831. pl*) printf %s "zenity \
  2832. --title '$_W_msg_title' \
  2833. --text '$_W_msg_body' \
  2834. --list \
  2835. --checklist \
  2836. --column '' \
  2837. --column Paczka \
  2838. --column Nazwa \
  2839. --column Wydawca \
  2840. --column Rok \
  2841. --column Media \
  2842. --column Status \
  2843. --column 'Rozmiar (MB)' \
  2844. --column 'Czas (sek)' \
  2845. --height $WINETRICKS_MENU_HEIGHT \
  2846. --width $WINETRICKS_MENU_WIDTH \
  2847. "
  2848. ;;
  2849. ru*) printf %s "zenity \
  2850. --title '$_W_msg_title' \
  2851. --text '$_W_msg_body' \
  2852. --list \
  2853. --checklist \
  2854. --column '' \
  2855. --column Пакет \
  2856. --column Название \
  2857. --column Издатель \
  2858. --column Год \
  2859. --column Источник \
  2860. --column Статус \
  2861. --column 'Размер (МБ)' \
  2862. --column 'Время (сек)' \
  2863. --height $WINETRICKS_MENU_HEIGHT \
  2864. --width $WINETRICKS_MENU_WIDTH \
  2865. "
  2866. ;;
  2867. uk*) printf %s "zenity \
  2868. --title '$_W_msg_title' \
  2869. --text '$_W_msg_body' \
  2870. --list \
  2871. --checklist \
  2872. --column '' \
  2873. --column Пакунок \
  2874. --column Назва \
  2875. --column Видавець \
  2876. --column Рік \
  2877. --column Медіа \
  2878. --column Статус \
  2879. --column 'Розмір (МБ)' \
  2880. --column 'Час (сек)' \
  2881. --height $WINETRICKS_MENU_HEIGHT \
  2882. --width $WINETRICKS_MENU_WIDTH \
  2883. "
  2884. ;;
  2885. zh_CN*) printf %s "zenity \
  2886. --title '$_W_msg_title' \
  2887. --text '$_W_msg_body' \
  2888. --list \
  2889. --checklist \
  2890. --column '' \
  2891. --column 包名 \
  2892. --column 软件名 \
  2893. --column 发行商 \
  2894. --column 发行年 \
  2895. --column 媒介 \
  2896. --column 状态 \
  2897. --column '文件大小 (MB)' \
  2898. --column '时间 (秒)' \
  2899. --height $WINETRICKS_MENU_HEIGHT \
  2900. --width $WINETRICKS_MENU_WIDTH \
  2901. "
  2902. ;;
  2903. zh_TW*|zh_HK*) printf %s "zenity \
  2904. --title '$_W_msg_title' \
  2905. --text '$_W_msg_body' \
  2906. --list \
  2907. --checklist \
  2908. --column '' \
  2909. --column 包名 \
  2910. --column 軟體名 \
  2911. --column 發行商 \
  2912. --column 發行年 \
  2913. --column 媒介 \
  2914. --column 狀態 \
  2915. --column '檔案大小 (MB)' \
  2916. --column '時間 (秒)' \
  2917. --height $WINETRICKS_MENU_HEIGHT \
  2918. --width $WINETRICKS_MENU_WIDTH \
  2919. "
  2920. ;;
  2921. *) printf %s "zenity \
  2922. --title '$_W_msg_title' \
  2923. --text '$_W_msg_body' \
  2924. --list \
  2925. --checklist \
  2926. --column '' \
  2927. --column Package \
  2928. --column Title \
  2929. --column Publisher \
  2930. --column Year \
  2931. --column Media \
  2932. --column Status \
  2933. --column 'Size (MB)' \
  2934. --column 'Time (sec)' \
  2935. --height $WINETRICKS_MENU_HEIGHT \
  2936. --width $WINETRICKS_MENU_WIDTH \
  2937. "
  2938. ;;
  2939. esac > "$WINETRICKS_WORKDIR"/zenity.sh
  2940. > "$WINETRICKS_WORKDIR"/installed.txt
  2941. for metadatafile in "$WINETRICKS_METADATA"/$WINETRICKS_CURMENU/*.vars
  2942. do
  2943. code=`winetricks_metadata_basename "$metadatafile"`
  2944. (
  2945. title='?'
  2946. author='?'
  2947. . "$metadatafile"
  2948. if test "$W_OPT_SHOWBROKEN" = 1 || test "$wine_showstoppers" = ""
  2949. then
  2950. # Compute cached and downloadable flags
  2951. flags=""
  2952. winetricks_is_cached $code && flags="$_W_cached"
  2953. installed=FALSE
  2954. if winetricks_is_installed $code
  2955. then
  2956. installed=TRUE
  2957. echo $code >> "$WINETRICKS_WORKDIR"/installed.txt
  2958. fi
  2959. printf %s " $installed \
  2960. $code \
  2961. \"$title\" \
  2962. \"$publisher\" \
  2963. \"$year\" \
  2964. \"$media\" \
  2965. \"$flags\" \
  2966. \"$size_MB\" \
  2967. \"$time_sec\" \
  2968. "
  2969. fi
  2970. )
  2971. done >> "$WINETRICKS_WORKDIR"/zenity.sh
  2972. # Filter out any verb that's already installed
  2973. sh "$WINETRICKS_WORKDIR"/zenity.sh |
  2974. tr '|' '\012' |
  2975. fgrep -v -x -f "$WINETRICKS_WORKDIR"/installed.txt |
  2976. tr '\012' ' '
  2977. ;;
  2978. kdialog)
  2979. (
  2980. printf %s "kdialog --geometry 600x400+100+100 --title '$_W_msg_title' --separate-output --checklist '$_W_msg_body' "
  2981. winetricks_list_all | sed 's/\([^ ]*\) *\(.*\)/\1 "\1 - \2" off /' | tr '\012' ' '
  2982. ) > "$WINETRICKS_WORKDIR"/kdialog.sh
  2983. sh "$WINETRICKS_WORKDIR"/kdialog.sh
  2984. ;;
  2985. esac
  2986. unset _W_msg_body _W_msg_title
  2987. }
  2988. # Converts a metadata abolute path to its app code
  2989. winetricks_metadata_basename()
  2990. {
  2991. # Classic, but too slow on cygwin
  2992. #basename $1 .vars
  2993. # first, remove suffix .vars
  2994. _W_mb_tmp=${1%.vars}
  2995. # second, remove any directory prefix
  2996. echo ${_W_mb_tmp##*/}
  2997. unset _W_mb_tmp
  2998. }
  2999. # Returns true if given verb has been registered
  3000. winetricks_metadata_exists()
  3001. {
  3002. test -f "$WINETRICKS_METADATA"/*/$1.vars
  3003. }
  3004. # Returns true if given verb has been cached
  3005. # You must have already loaded its metadata before calling
  3006. winetricks_is_cached()
  3007. {
  3008. # FIXME: also check file2... if given
  3009. _W_path="$W_CACHE/$1/$file1"
  3010. case "$_W_path" in
  3011. *..*)
  3012. # Remove /foo/.. so verbs that don't have their own cache directories
  3013. # can refer to siblings
  3014. _W_path="`echo $_W_path | sed 's,/[^/]*/\.\.,,'`"
  3015. ;;
  3016. esac
  3017. if test -f "$_W_path"
  3018. then
  3019. unset _W_path
  3020. return 0
  3021. fi
  3022. unset _W_path
  3023. return 1
  3024. }
  3025. # Returns true if given verb has been installed
  3026. # You must have already loaded its metadata before calling
  3027. winetricks_is_installed()
  3028. {
  3029. unset _W_file _W_file_unix
  3030. if test "$installed_exe1"
  3031. then
  3032. _W_file="$installed_exe1"
  3033. elif test "$installed_file1"
  3034. then
  3035. _W_file="$installed_file1"
  3036. else
  3037. return 1 # not installed
  3038. fi
  3039. case "$OS" in
  3040. Windows_NT)
  3041. # On Windows, there's no wineprefix, just check if file's there
  3042. _W_file_unix="`w_pathconv -u "$_W_file"`"
  3043. if test -f "$_W_file_unix"
  3044. then
  3045. unset _W_file _W_file_unix _W_prefix
  3046. return 0 # installed
  3047. fi
  3048. ;;
  3049. *)
  3050. # Compute wineprefix for this app
  3051. case "$category"-"$WINETRICKS_OPT_SHAREDPREFIX" in
  3052. apps-0|benchmarks-0|games-0)
  3053. _W_prefix="$W_PREFIXES_ROOT/$1"
  3054. ;;
  3055. *)
  3056. _W_prefix="$WINEPREFIX"
  3057. ;;
  3058. esac
  3059. if test -d "$_W_prefix/dosdevices"
  3060. then
  3061. # 'win7 vcrun2005' creates different file than 'winxp vcrun2005'
  3062. # so let it specify multiple, separated by |
  3063. _W_IFS="$IFS"
  3064. IFS='|'
  3065. for _W_file_ in $_W_file
  3066. do
  3067. _W_file_unix="`WINEPREFIX="$_W_prefix" w_pathconv -u "$_W_file_"`"
  3068. if test -f "$_W_file_unix" && ! grep -q "Wine placeholder DLL" "$_W_file_unix"
  3069. then
  3070. IFS="$_W_IFS"
  3071. unset _W_file _W_file_ _W_file_unix _W_prefix _W_IFS
  3072. return 0 # installed
  3073. fi
  3074. done
  3075. IFS="$_W_IFS"
  3076. fi
  3077. ;;
  3078. esac
  3079. unset _W_file _W_prefix # leak _W_file_unix for caller. Is this wise?
  3080. unset _W_IFS _W_file_
  3081. return 1 # not installed
  3082. }
  3083. # List verbs which are already fully cached locally
  3084. winetricks_list_cached()
  3085. {
  3086. for _W_metadatafile in "$WINETRICKS_METADATA"/*/*.vars
  3087. do
  3088. # Use a subshell to avoid putting metadata in global space
  3089. # If this is too slow, we can unset known metadata by hand
  3090. (
  3091. code=`winetricks_metadata_basename "$_W_metadatafile"`
  3092. . "$_W_metadatafile"
  3093. if winetricks_is_cached $code
  3094. then
  3095. echo $code
  3096. fi
  3097. )
  3098. done | sort
  3099. unset _W_metadatafile
  3100. }
  3101. # List verbs which are automatically downloadable, regardless of whether they're cached yet
  3102. winetricks_list_download()
  3103. {
  3104. cd "$WINETRICKS_METADATA"
  3105. grep -l 'media=.download' */*.vars | sed 's,.*/,,;s/\.vars//' | sort -u
  3106. }
  3107. # List verbs which are downloadable with user intervention, regardless of whether they're cached yet
  3108. winetricks_list_manual_download()
  3109. {
  3110. cd "$WINETRICKS_METADATA"
  3111. grep -l 'media=.manual_download' */*.vars | sed 's,.*/,,;s/\.vars//' | sort -u
  3112. }
  3113. winetricks_list_installed()
  3114. {
  3115. (
  3116. # Jump through a couple hoops to evaluate the verbs in alphabetical order
  3117. # Assume that no filename contains '|'
  3118. cd "$WINETRICKS_METADATA"
  3119. for _W_metadatafile in `ls */*.vars | sed 's,^\(.*\)/,\1|,' | sort -t\| -k 2 | tr '|' /`
  3120. do
  3121. # Use a subshell to avoid putting metadata in global space
  3122. # If this is too slow, we can unset known metadata by hand
  3123. (
  3124. code=`winetricks_metadata_basename "$_W_metadatafile"`
  3125. . "$_W_metadatafile"
  3126. if winetricks_is_installed $code
  3127. then
  3128. echo $code
  3129. fi
  3130. )
  3131. done
  3132. )
  3133. unset _W_metadatafile
  3134. }
  3135. # Helper for adding a string to a list of flags
  3136. winetricks_append_to_flags()
  3137. {
  3138. if test "$flags"
  3139. then
  3140. flags="$flags,"
  3141. fi
  3142. flags="${flags}$1"
  3143. }
  3144. # List all verbs in category WINETRICKS_CURMENU verbosely
  3145. # Format is "verb title (publisher, year) [flags]"
  3146. winetricks_list_all()
  3147. {
  3148. # Note: doh123 relies on 'winetricks list' to list main menu categories
  3149. case $WINETRICKS_CURMENU in
  3150. prefix|main) echo "$WINETRICKS_CATEGORIES" | tr ' ' '\012' ; return;;
  3151. esac
  3152. case $LANG in
  3153. da*) _W_cached="cached" ; _W_download="kan hentes" ;;
  3154. de*) _W_cached="gecached" ; _W_download="herunterladbar";;
  3155. pl*) _W_cached="zarchiwizowane" ; _W_download="do pobrania" ;;
  3156. ru*) _W_cached="в кэше" ; _W_download="доступно для скачивания" ;;
  3157. uk*) _W_cached="кешовано" ; _W_download="завантажуване" ;;
  3158. zh_CN*) _W_cached="已缓存" ; _W_download="可下载" ;;
  3159. zh_TW*|zh_HK*) _W_cached="已緩存" ; _W_download="可下載" ;;
  3160. *) _W_cached="cached" ; _W_download="downloadable" ;;
  3161. esac
  3162. for _W_metadatafile in "$WINETRICKS_METADATA"/$WINETRICKS_CURMENU/*.vars
  3163. do
  3164. # Use a subshell to avoid putting metadata in global space
  3165. # If this is too slow, we can unset known metadata by hand
  3166. (
  3167. code=`winetricks_metadata_basename "$_W_metadatafile"`
  3168. . "$_W_metadatafile"
  3169. # Compute cached and downloadable flags
  3170. flags=""
  3171. test "$media" = "download" && winetricks_append_to_flags "$_W_download"
  3172. winetricks_is_cached $code && winetricks_append_to_flags "$_W_cached"
  3173. test "$flags" && flags="[$flags]"
  3174. if ! test "$year" && ! test "$publisher"
  3175. then
  3176. printf "%-24s %s %s\n" $code "$title" "$flags"
  3177. else
  3178. printf "%-24s %s (%s, %s) %s\n" $code "$title" "$publisher" "$year" "$flags"
  3179. fi
  3180. )
  3181. done
  3182. unset _W_cached _W_metadatafile
  3183. }
  3184. # Abort if user doesn't own the given directory (or its parent, if it doesn't exist yet)
  3185. winetricks_die_if_user_not_dirowner()
  3186. {
  3187. if test -d "$1"
  3188. then
  3189. _W_checkdir="$1"
  3190. else
  3191. # fixme: quoting problem?
  3192. _W_checkdir=`dirname "$1"`
  3193. fi
  3194. _W_nuser=`id -u`
  3195. _W_nowner=`ls -l -n -d -L "$_W_checkdir" | awk '{print $3}'`
  3196. if test x$_W_nuser != x$_W_nowner
  3197. then
  3198. w_die "You (`id -un`) don't own $_W_checkdir. Don't run this tool as another user!"
  3199. fi
  3200. }
  3201. # See
  3202. # http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-119.pdf (iso9660)
  3203. # http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-167.pdf
  3204. # http://www.osta.org/specs/pdf/udf102.pdf
  3205. # http://www.ecma-international.org/publications/techreports/E-TR-071.htm
  3206. # Usage: read_bytes offset count device
  3207. winetricks_read_bytes()
  3208. {
  3209. dd status=noxfer if=$3 bs=1 skip=$1 count=$2 2>/dev/null
  3210. }
  3211. # Usage: read_hex offset count device
  3212. winetricks_read_hex()
  3213. {
  3214. od -j $1 -N $2 -t x1 $3 | # offset $1, count $2, single byte hex format, file $3
  3215. sed 's/^[^ ]* //' | # remove address
  3216. sed '$d' # remove final line which is just final offset
  3217. }
  3218. # Usage: read_decimal offset device
  3219. # Reads single four byte word, outputs in decimal.
  3220. # Uses default endianness.
  3221. # udf uses little endian words, so this only works on little endian machines.
  3222. winetricks_read_decimal()
  3223. {
  3224. od -j $1 -N 4 -t u4 $2 | # offset $1, byte count 4, four byte decimal format, file $2
  3225. sed 's/^[^ ]* //' | # remove address
  3226. sed '$d' # remove final line which is just final offset
  3227. }
  3228. winetricks_read_udf_volume_name()
  3229. {
  3230. # "Anchor volume descriptor pointer" starts at sector 256
  3231. # AVDP Layout (ECMA-167 3/10.2):
  3232. # size offset contents
  3233. # 16 0 descriptor tag (id = 2)
  3234. # 16 8 main (primary?) volume descriptor sequence extent
  3235. # ...
  3236. # descriptor tag layout (ECMA-167 3/7.2):
  3237. # size offset contents
  3238. # 2 0 TagIdentifier
  3239. # ...
  3240. # extent layout (ECMA-167 3/7.1):
  3241. # size offset contents
  3242. # 4 0 length (in bytes)
  3243. # 8 4 location (in 2k sectors)
  3244. # primary volume descriptor layout (ECMA-167 3/10.1):
  3245. # size offset contents
  3246. # 16 0 descriptor tag (id = 1)
  3247. # ...
  3248. # 32 24 volume identifier (dstring)
  3249. # 1. check the 16 bit TagIdentifier of the descriptor tag, make sure it's 2
  3250. tagid=`winetricks_read_hex 524288 2 $1`
  3251. : echo tagid is $tagid
  3252. case "$tagid" in
  3253. "02 00") : echo Found AVDP ;;
  3254. *) echo "Did not find AVDP (tagid was $tagid)"; exit 1;;
  3255. esac
  3256. # 2. read the location of the main volume descriptor:
  3257. offset=`winetricks_read_decimal 524308 $1`
  3258. : echo MVD is at sector $offset
  3259. offset=`expr $offset \* 2048`
  3260. : echo MVD is at byte $offset
  3261. # 3. check the TagIdentifier of the MVD's descriptor tag, make sure it's 1
  3262. tagid=`winetricks_read_hex $offset 2 $1`
  3263. : echo tagid is $tagid
  3264. case "$tagid" in
  3265. "01 00") : echo Found MVD ;;
  3266. *) echo Did not find MVD; exit 1;;
  3267. esac
  3268. # 4. Read whether the name is in 8 or 16 bit chars
  3269. offset=`expr $offset + 24`
  3270. width=`winetricks_read_hex $offset 1 $1`
  3271. offset=`expr $offset + 1`
  3272. # 5. Profit!
  3273. case $width in
  3274. 08) winetricks_read_bytes $offset 30 $1 | sed 's/ *$//' ;;
  3275. 10) winetricks_read_bytes $offset 30 $1 | tr -d '\000' | sed 's/ *$//' ;;
  3276. *) echo "Unhandled dvd volname character width '$width'"; exit 1;;
  3277. esac
  3278. echo ""
  3279. }
  3280. winetricks_read_iso9660_volume_name()
  3281. {
  3282. winetricks_read_bytes 32808 30 $1 | sed 's/ *$//'
  3283. }
  3284. winetricks_read_volume_name()
  3285. {
  3286. # ECMA-119 says that CD-ROMs have sector size 2k, and at sector 16 have:
  3287. # size offset contents
  3288. # 1 0 Volume descriptor type (1 for primary volume descriptor)
  3289. # 5 1 Standard identifier ("CD001" for iso9660)
  3290. # ECMA-167, section 9.1.2, has a table of standard identifiers:
  3291. # "BEA01": ecma-167 9.2, Beginning Extended Area Descriptor
  3292. # "CD001": ecma-119
  3293. # "CDW02": ecma-168
  3294. std_id=`winetricks_read_bytes 32769 5 $1`
  3295. : echo std_id is $std_id
  3296. case $std_id in
  3297. CD001) winetricks_read_iso9660_volume_name $1 ;;
  3298. BEA01) winetricks_read_udf_volume_name $1; ;;
  3299. *) echo "Unrecognized disk type $std_id"; exit 1 ;;
  3300. esac
  3301. }
  3302. winetricks_volname()
  3303. {
  3304. x=`volname $1 2> /dev/null| sed 's/ *$//'`
  3305. if test "x$x" = "x"
  3306. then
  3307. # UDF? See https://bugs.launchpad.net/bugs/678419
  3308. x=`winetricks_read_volume_name $1`
  3309. fi
  3310. echo $x
  3311. }
  3312. # Really, should take a volume name as argument, and use 'mount' to get
  3313. # mount point if system automounted it.
  3314. winetricks_detect_optical_drive()
  3315. {
  3316. case "$WINETRICKS_DEV" in
  3317. "") ;;
  3318. *) return ;;
  3319. esac
  3320. for WINETRICKS_DEV in /dev/cdrom /dev/dvd /dev/sr0
  3321. do
  3322. test -b $WINETRICKS_DEV && break
  3323. done
  3324. case "$WINETRICKS_DEV" in
  3325. "x") w_die "can't find cd/dvd drive" ;;
  3326. esac
  3327. }
  3328. winetricks_cache_iso()
  3329. {
  3330. # WINETRICKS_IMG has already been set by w_mount
  3331. _W_expected_volname="$1"
  3332. winetricks_die_if_user_not_dirowner "$W_CACHE"
  3333. winetricks_detect_optical_drive
  3334. # Horrible hack for Gentoo - make sure we can read from the drive
  3335. if ! test -r $WINETRICKS_DEV
  3336. then
  3337. case "$WINETRICKS_SUDO" in
  3338. gksudo) $WINETRICKS_SUDO "chmod 666 $WINETRICKS_DEV" ;;
  3339. *) $WINETRICKS_SUDO chmod 666 $WINETRICKS_DEV ;;
  3340. esac
  3341. fi
  3342. while true
  3343. do
  3344. # Wait for user to insert disc.
  3345. # Sleep long to make it less likely to close the drive during insertion.
  3346. while ! dd if=$WINETRICKS_DEV of=/dev/null count=1
  3347. do
  3348. sleep 5
  3349. done
  3350. # Some distros automount discs in /media, take advantage of that
  3351. if test -d "/media/_W_expected_volname"
  3352. then
  3353. break
  3354. fi
  3355. # Otherwise try and read it straight from unmounted volume
  3356. _W_volname=`winetricks_volname $WINETRICKS_DEV`
  3357. if test "$_W_expected_volname" != "$_W_volname"
  3358. then
  3359. case $LANG in
  3360. da*) w_warn "Forkert disk [$_W_volname] indsat. Indsæt venligst disken [$_W_expected_volname]" ;;
  3361. de*) w_warn "Falsche Disk [$_W_volname] eingelegt. Bitte legen Sie Disk [$_W_expected_volname] ein!" ;;
  3362. pl*) w_warn "Włożono zły dysk [$_W_volname]. Proszę włożyć dysk [$_W_expected_volname]" ;;
  3363. ru*) w_warn "Неверный диск [$_W_volname]. Пожалуйста, вставьте диск [$_W_expected_volname]" ;;
  3364. uk*) w_warn "Неправильний диск [$_W_volname]. Будь ласка, вставте диск [$_W_expected_volname]" ;;
  3365. zh_CN*) w_warn " [$_W_volname] 光盘插入错误,请插入光盘 [$_W_expected_volname]" ;;
  3366. zh_TW*|zh_HK*) w_warn " [$_W_volname] 光碟插入錯誤,請插入光碟 [$_W_expected_volname]" ;;
  3367. *) w_warn "Wrong disc [$_W_volname] inserted. Please insert disc [$_W_expected_volname]" ;;
  3368. esac
  3369. sleep 10
  3370. else
  3371. break
  3372. fi
  3373. done
  3374. # Copy disc to .iso file, display progress every 5 seconds
  3375. # Use conv=noerror,sync to replace unreadable blocks with zeroes
  3376. case $WINETRICKS_OPT_DD in
  3377. dd)
  3378. $WINETRICKS_OPT_DD if=$WINETRICKS_DEV of="$W_CACHE"/temp.iso bs=2048 conv=noerror,sync &
  3379. WINETRICKS_DD_PID=$!
  3380. ;;
  3381. ddrescue)
  3382. if test "`which ddrescue`" = ""
  3383. then
  3384. w_die "Please install ddrescue first."
  3385. fi
  3386. $WINETRICKS_OPT_DD -v -b 2048 $WINETRICKS_DEV "$W_CACHE"/temp.iso &
  3387. WINETRICKS_DD_PID=$!
  3388. ;;
  3389. esac
  3390. echo $WINETRICKS_DD_PID > "$WINETRICKS_WORKDIR"/dd-pid
  3391. # Note: if user presses ^C, winetricks_cleanup will call winetricks_iso_cleanup
  3392. # FIXME: add progress bar for kde, too
  3393. case $WINETRICKS_GUI in
  3394. none|kdialog)
  3395. while ps -p $WINETRICKS_DD_PID > /dev/null 2>&1
  3396. do
  3397. sleep 5
  3398. ls -l "$W_CACHE"/temp.iso
  3399. done
  3400. ;;
  3401. zenity)
  3402. while ps -p $WINETRICKS_DD_PID > /dev/null 2>&1
  3403. do
  3404. echo 1
  3405. sleep 2
  3406. done | $WINETRICKS_GUI --title "Copying to $_W_expected_volname.iso" --progress --pulsate --auto-kill
  3407. ;;
  3408. esac
  3409. rm "$WINETRICKS_WORKDIR"/dd-pid
  3410. mv "$W_CACHE"/temp.iso "$WINETRICKS_IMG"
  3411. eject $WINETRICKS_DEV || true # punt if eject not found (as on cygwin)
  3412. }
  3413. winetricks_load_vcdmount()
  3414. {
  3415. if test "$WINE" != ""
  3416. then
  3417. return
  3418. fi
  3419. # Call only on real Windows.
  3420. # Sets VCD_DIR and W_ISO_MOUNT_ROOT
  3421. # The only free mount tool I know for Windows Vista is Virtual CloneDrive,
  3422. # which can be downloaded at
  3423. # http://www.slysoft.com/en/virtual-clonedrive.html
  3424. # FIXME: actually install it here
  3425. # Locate vcdmount.exe.
  3426. VCD_DIR="Elaborate Bytes/VirtualCloneDrive"
  3427. if test ! -x "$W_PROGRAMS_UNIX/$VCD_DIR/vcdmount.exe" && test ! -x "$W_PROGRAMS_X86_UNIX/$VCD_DIR/vcdmount.exe"
  3428. then
  3429. w_warn "Installing Virtual CloneDrive"
  3430. w_download_to vcd http://static.slysoft.com/SetupVirtualCloneDrive.exe
  3431. # have to use cmd else vista won't let cygwin run .exe's?
  3432. chmod +x "$W_CACHE"/vcd/SetupVirtualCloneDrive.exe
  3433. cd "$W_CACHE/vcd"
  3434. cmd /c SetupVirtualCloneDrive.exe
  3435. fi
  3436. if test -x "$W_PROGRAMS_UNIX/$VCD_DIR/vcdmount.exe"
  3437. then
  3438. VCD_DIR="$W_PROGRAMS_UNIX/$VCD_DIR"
  3439. elif test -x "$W_PROGRAMS_X86_UNIX/$VCD_DIR/vcdmount.exe"
  3440. then
  3441. VCD_DIR="$W_PROGRAMS_X86_UNIX/$VCD_DIR"
  3442. else
  3443. w_die "can't find Virtual CloneDrive?"
  3444. fi
  3445. # FIXME: Use WMI to locate the drive named
  3446. # "ELBY CLONEDRIVE..." using WMI as described in
  3447. # http://delphihaven.wordpress.com/2009/07/05/using-wmi-to-get-a-drive-friendly-name/
  3448. }
  3449. winetricks_mount_cached_iso()
  3450. {
  3451. # On entry, WINETRICKS_IMG is already set
  3452. w_umount
  3453. if test "$WINE" = ""
  3454. then
  3455. winetricks_load_vcdmount
  3456. my_img_win="`w_pathconv -w $WINETRICKS_IMG | tr '\012' ' ' | sed 's/ $//'`"
  3457. cd "$VCD_DIR"
  3458. w_try vcdmount.exe /l=$letter "$my_img_win"
  3459. tries=0
  3460. while test $tries -lt 20
  3461. do
  3462. for W_ISO_MOUNT_LETTER in e f g h i j k
  3463. do
  3464. # let user blacklist drive letters
  3465. echo "$WINETRICKS_MOUNT_LETTER_IGNORE" | grep -q "$W_ISO_MOUNT_LETTER" && continue
  3466. W_ISO_MOUNT_ROOT=/cygdrive/$W_ISO_MOUNT_LETTER
  3467. if find $W_ISO_MOUNT_ROOT -iname 'setup*' -o -iname '*.exe' -o -iname '*.msi'
  3468. then
  3469. break 2
  3470. fi
  3471. done
  3472. tries=`expr $tries + 1`
  3473. echo "Waiting for mount to finish mounting"
  3474. sleep 1
  3475. done
  3476. else
  3477. # Linux
  3478. # FIXME: find a way to mount or copy from image without sudo
  3479. _W_USERID=`id -u`
  3480. case "$WINETRICKS_SUDO" in
  3481. gksudo)
  3482. w_try $WINETRICKS_SUDO "mkdir -p $W_ISO_MOUNT_ROOT"
  3483. w_try $WINETRICKS_SUDO "mount -o ro,loop,uid=$_W_USERID,unhide $WINETRICKS_IMG $W_ISO_MOUNT_ROOT"
  3484. ;;
  3485. *)
  3486. w_try $WINETRICKS_SUDO mkdir -p $W_ISO_MOUNT_ROOT
  3487. w_try $WINETRICKS_SUDO mount -o ro,loop,uid=$_W_USERID,unhide "$WINETRICKS_IMG" $W_ISO_MOUNT_ROOT
  3488. ;;
  3489. esac
  3490. echo "Mounting as drive ${W_ISO_MOUNT_LETTER}:"
  3491. # Gotta provide a symlink to the raw disc, else installers that check volume names will fail
  3492. rm -f "$WINEPREFIX/dosdevices/${W_ISO_MOUNT_LETTER}:"*
  3493. ln -sf "$WINETRICKS_IMG" "$WINEPREFIX/dosdevices/${W_ISO_MOUNT_LETTER}::"
  3494. ln -sf "$W_ISO_MOUNT_ROOT" "$WINEPREFIX/dosdevices/${W_ISO_MOUNT_LETTER}:"
  3495. unset _W_USERID
  3496. fi
  3497. }
  3498. # List the currently mounted udf or iso9660 filesystems that match the given pattern
  3499. # Output format:
  3500. # dev mountpoint
  3501. # dev mountpoint
  3502. # ...
  3503. # Mountpoints may contain spaces.
  3504. winetricks_list_mounts()
  3505. {
  3506. mount | egrep 'udf|iso9660' | sed 's,^\([^ ]*\) on \(.*\) type .*,\1 \2,'| grep "$1\$"
  3507. }
  3508. # Return success and set _W_dev _W_mountpoint if volume $1 is mounted
  3509. # Note: setting variables as a way of returning results from a
  3510. # shell function exposed several bugs in most shells (except ksh!)
  3511. # related to implicit subshells. It would be better to output
  3512. # one string to stdout instead.
  3513. winetricks_is_mounted()
  3514. {
  3515. # First, check for matching mountpoint
  3516. _W_tmp="`winetricks_list_mounts "$1"`"
  3517. if test "$_W_tmp"
  3518. then
  3519. _W_dev=`echo $_W_tmp | sed 's/ .*//'`
  3520. _W_mountpoint="`echo $_W_tmp | sed 's/^[^ ]* //'`"
  3521. # Volume found!
  3522. return 0
  3523. fi
  3524. # If that fails, read volume name the hard way for each volume
  3525. # Have to use file to return results from implicit subshell
  3526. rm -f "$W_TMP_EARLY/_W_tmp.$LOGNAME"
  3527. winetricks_list_mounts . | while true
  3528. do
  3529. IFS= read _W_tmp
  3530. _W_dev=`echo $_W_tmp | sed 's/ .*//'`
  3531. test "$_W_dev" || break
  3532. _W_mountpoint="`echo $_W_tmp | sed 's/^[^ ]* //'`"
  3533. _W_volname=`winetricks_volname $_W_dev`
  3534. if test "$1" = "$_W_volname"
  3535. then
  3536. # Volume found! Want to return from function here, but can't
  3537. echo "$_W_tmp" > "$W_TMP_EARLY/_W_tmp.$LOGNAME"
  3538. break
  3539. fi
  3540. done
  3541. if test -f "$W_TMP_EARLY/_W_tmp.$LOGNAME"
  3542. then
  3543. # Volume found! Return from function.
  3544. _W_dev=`cat "$W_TMP_EARLY/_W_tmp.$LOGNAME" | sed 's/ .*//'`
  3545. _W_mountpoint="`cat "$W_TMP_EARLY/_W_tmp.$LOGNAME" | sed 's/^[^ ]* //'`"
  3546. rm -f "$W_TMP_EARLY/_W_tmp.$LOGNAME"
  3547. return 0
  3548. fi
  3549. # Volume not found
  3550. unset _W_dev _W_mountpoint _W_volname
  3551. return 1
  3552. }
  3553. winetricks_mount_real_volume()
  3554. {
  3555. _W_expected_volname="$1"
  3556. # Wait for user to insert disc.
  3557. case $LANG in
  3558. da*)_W_mountmsg="Indsæt venligst disken '$_W_expected_volname' (krævet af pakken '$_PACKAGE')" ;;
  3559. de*)_W_mountmsg="Bitte Disk '$_W_expected_volname' einlegen (für Paket '$W_PACKAGE')" ;;
  3560. pl*) _W_mountmsg="Proszę włożyć dysk '$_W_expected_volname' (potrzebny paczce '$W_PACKAGE')" ;;
  3561. ru*) _W_mountmsg="Пожалуйста, вставьте том '$_W_expected_volname' (требуется для пакета '$W_PACKAGE')" ;;
  3562. uk*) _W_mountmsg="Будь ласка, вставте том '$_W_expected_volname' (потрібний для пакунка '$W_PACKAGE')" ;;
  3563. zh_CN*) _W_mountmsg="请插入卷 '$_W_expected_volname' (为包 '$W_PACKAGE 所需')" ;;
  3564. zh_TW*|zh_HK*) _W_mountmsg="請插入卷 '$_W_expected_volname' (為包 '$W_PACKAGE 所需')" ;;
  3565. *) _W_mountmsg="Please insert volume '$_W_expected_volname' (needed for package '$W_PACKAGE')" ;;
  3566. esac
  3567. if test "$WINE" = ""
  3568. then
  3569. # Assume already mounted, just get drive letter
  3570. W_ISO_MOUNT_LETTER=`awk '/iso/ {print $1}' < /proc/mounts | tr -d :`
  3571. W_ISO_MOUNT_ROOT=`awk '/iso/ {print $2}' < /proc/mounts`
  3572. else
  3573. while ! winetricks_is_mounted "$_W_expected_volname"
  3574. do
  3575. w_try w_warn_cancel "$_W_mountmsg"
  3576. # In non-gui case, give user two seconds to futz with disc drive before spamming him again
  3577. sleep 2
  3578. done
  3579. WINETRICKS_DEV=$_W_dev
  3580. W_ISO_MOUNT_ROOT="$_W_mountpoint"
  3581. # Gotta provide a symlink to the raw disc, else installers that check volume names will fail
  3582. rm -f "$WINEPREFIX/dosdevices/${W_ISO_MOUNT_LETTER}:"*
  3583. ln -sf "$WINETRICKS_DEV" "$WINEPREFIX/dosdevices/${W_ISO_MOUNT_LETTER}::"
  3584. ln -sf "$W_ISO_MOUNT_ROOT" "$WINEPREFIX/dosdevices/${W_ISO_MOUNT_LETTER}:"
  3585. fi
  3586. # FIXME: need to remount some discs with unhide option,
  3587. # add that as option to w_mount
  3588. unset _W_mountmsg
  3589. }
  3590. winetricks_cleanup()
  3591. {
  3592. # We don't want to run this multiple times, so unfortunately we have to run it here:
  3593. if test "$W_NGEN_CMD"
  3594. then
  3595. "$W_NGEN_CMD"
  3596. fi
  3597. set +e
  3598. if test -f "$WINETRICKS_WORKDIR/dd-pid"
  3599. then
  3600. kill `cat "$WINETRICKS_WORKDIR/dd-pid"`
  3601. fi
  3602. test "$WINETRICKS_CACHE_SYMLINK" && rm -f "$WINETRICKS_CACHE_SYMLINK"
  3603. test "$W_OPT_NOCLEAN" = 1 || rm -rf "$WINETRICKS_WORKDIR"
  3604. # if $W_TMP_EARLY was created by mktemp, remove it:
  3605. test "$W_OPT_NOCLEAN" = 1 || test "$W_TMP_EARLY_CLEAN" = 1 && rm -rf "$W_TMP_EARLY"
  3606. }
  3607. winetricks_set_unattended()
  3608. {
  3609. # We shouldn't use all these extra variables. Instead, we should
  3610. # use ${foo:+bar} to jam in commandline options for silent install
  3611. # only if W_OPT_UNATTENDED is nonempty. See
  3612. # http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
  3613. # So in attended mode, W_OPT_UNATTENDED should be empty.
  3614. case $1 in
  3615. 1)
  3616. W_OPT_UNATTENDED=1
  3617. # Might want to trim our stable of variables here a bit...
  3618. W_UNATTENDED_DASH_Q="-q"
  3619. W_UNATTENDED_SLASH_Q="/q"
  3620. W_UNATTENDED_SLASH_QB="/qb"
  3621. W_UNATTENDED_SLASH_QN="/qn"
  3622. W_UNATTENDED_SLASH_QNT="/qnt"
  3623. W_UNATTENDED_SLASH_QT="/qt"
  3624. W_UNATTENDED_SLASH_QUIET="/quiet"
  3625. W_UNATTENDED_SLASH_S="/S"
  3626. W_UNATTENDED_DASH_SILENT="-silent"
  3627. W_UNATTENDED_SLASH_SILENT="/silent"
  3628. ;;
  3629. *)
  3630. W_OPT_UNATTENDED=""
  3631. W_UNATTENDED_DASH_Q=""
  3632. W_UNATTENDED_SLASH_Q=""
  3633. W_UNATTENDED_SLASH_QB=""
  3634. W_UNATTENDED_SLASH_QN=""
  3635. W_UNATTENDED_SLASH_QNT=""
  3636. W_UNATTENDED_SLASH_QT=""
  3637. W_UNATTENDED_SLASH_QUIET=""
  3638. W_UNATTENDED_SLASH_S=""
  3639. W_UNATTENDED_DASH_SILENT=""
  3640. W_UNATTENDED_SLASH_SILENT=""
  3641. ;;
  3642. esac
  3643. }
  3644. # Usage: winetricks_set_wineprefix [bottlename]
  3645. # Bottlename must not contain spaces, slashes, or other special characters
  3646. # If bottlename is omitted, the default bottle (~/.wine) is used.
  3647. winetricks_set_wineprefix()
  3648. {
  3649. if ! test "$1"
  3650. then
  3651. WINEPREFIX="$WINETRICKS_ORIGINAL_WINEPREFIX"
  3652. else
  3653. WINEPREFIX="$W_PREFIXES_ROOT/$1"
  3654. fi
  3655. export WINEPREFIX
  3656. #echo "WINEPREFIX is now $WINEPREFIX" >&2
  3657. mkdir -p "`dirname "$WINEPREFIX"`"
  3658. # Run wine here to force creation of the wineprefix so it's there when we want to make the cache symlink a bit later.
  3659. # The folder-name is localized!
  3660. W_PROGRAMS_WIN="`w_expand_env ProgramFiles`"
  3661. case "$W_PROGRAMS_WIN" in
  3662. "") w_die "$WINE cmd.exe /c echo '%ProgramFiles%' returned empty string, error message \"`cat $W_TMP_EARLY/early_wine.err.txt`\" ";;
  3663. %*) w_die "$WINE cmd.exe /c echo '%ProgramFiles%' returned unexpanded string '$W_PROGRAMS_WIN' ... this can be caused by a corrupt wineprefix, by an old wine, or by not owning $WINEPREFIX" ;;
  3664. *unknown*) w_die "$WINE cmd.exe /c echo '%ProgramFiles%' returned a string containing the word 'unknown', as if a voice had cried out in terror, and was suddenly silenced." ;;
  3665. esac
  3666. case "$OS" in
  3667. "Windows_NT")
  3668. W_DRIVE_C="/cygdrive/c" ;;
  3669. *)
  3670. W_DRIVE_C="$WINEPREFIX/dosdevices/c:" ;;
  3671. esac
  3672. # Kludge: use Temp instead of temp to avoid \t expansion in w_try
  3673. # but use temp in unix path because that's what wine creates, and having both temp and Temp
  3674. # causes confusion (e.g. makes vc2005trial fail)
  3675. if ! test "$1"
  3676. then
  3677. W_TMP="$W_DRIVE_C/windows/temp"
  3678. W_TMP_WIN="C:\\windows\\Temp"
  3679. else
  3680. # Verbs can rely on W_TMP being empty at entry, deleted after return, and a subdir of C:
  3681. W_TMP="$W_DRIVE_C/windows/temp/_$1"
  3682. W_TMP_WIN="C:\\windows\\Temp\\_$1"
  3683. fi
  3684. case "$OS" in
  3685. "Windows_NT")
  3686. W_CACHE_WIN="`w_pathconv -w $W_CACHE`"
  3687. ;;
  3688. *)
  3689. # For case where z: doesn't exist or / is writable (!),
  3690. # make a drive letter for W_CACHE. Clean it up on exit.
  3691. test "$WINETRICKS_CACHE_SYMLINK" && rm -f "$WINETRICKS_CACHE_SYMLINK"
  3692. for letter in y x w v u t s r q p o n m
  3693. do
  3694. if ! test -d "$WINEPREFIX"/dosdevices/${letter}:
  3695. then
  3696. mkdir -p "$WINEPREFIX"/dosdevices
  3697. WINETRICKS_CACHE_SYMLINK="$WINEPREFIX"/dosdevices/${letter}:
  3698. ln -sf "$W_CACHE" "$WINETRICKS_CACHE_SYMLINK"
  3699. break
  3700. fi
  3701. done
  3702. W_CACHE_WIN="${letter}:"
  3703. ;;
  3704. esac
  3705. # FIXME wrong on 64 bit windows for now
  3706. W_COMMONFILES_X86_WIN="`w_expand_env CommonProgramFiles`"
  3707. W_WINDIR_UNIX="$W_DRIVE_C/windows"
  3708. # FIXME: move that tr into w_pathconv, if it's still needed?
  3709. W_PROGRAMS_UNIX="`w_pathconv -u "$W_PROGRAMS_WIN"`"
  3710. # 64 bit windows has a second directory for program files
  3711. W_PROGRAMS_X86_WIN="${W_PROGRAMS_WIN} (x86)"
  3712. W_PROGRAMS_X86_UNIX="${W_PROGRAMS_UNIX} (x86)"
  3713. if ! test -d "$W_PROGRAMS_X86_UNIX"
  3714. then
  3715. W_PROGRAMS_X86_WIN="${W_PROGRAMS_WIN}"
  3716. W_PROGRAMS_X86_UNIX="${W_PROGRAMS_UNIX}"
  3717. fi
  3718. W_APPDATA_WIN="`w_expand_env AppData`"
  3719. W_APPDATA_UNIX="`w_pathconv -u "$W_APPDATA_WIN"`"
  3720. # FIXME: get fonts path from SHGetFolderPath
  3721. # See also http://blogs.msdn.com/oldnewthing/archive/2003/11/03/55532.aspx
  3722. W_FONTSDIR_WIN="c:\\windows\\Fonts"
  3723. # FIXME: just convert path from windows to unix?
  3724. # Did the user rename Fonts to fonts?
  3725. if test ! -d "$W_WINDIR_UNIX"/Fonts && test -d "$W_WINDIR_UNIX"/fonts
  3726. then
  3727. W_FONTSDIR_UNIX="$W_WINDIR_UNIX"/fonts
  3728. else
  3729. W_FONTSDIR_UNIX="$W_WINDIR_UNIX"/Fonts
  3730. fi
  3731. mkdir -p "${W_FONTSDIR_UNIX}"
  3732. # Win(e) 32/64?
  3733. # Using the variable W_SYSTEM32_DLLS instead of SYSTEM32 because some stuff does go under system32 for both arch's
  3734. # e.g., spool/drivers/color
  3735. if test -d "$W_DRIVE_C/windows/syswow64"
  3736. then
  3737. W_ARCH=win64
  3738. W_SYSTEM32_DLLS="$W_WINDIR_UNIX/syswow64"
  3739. W_SYSTEM32_DLLS_WIN="C:\\windows\\syswow64"
  3740. W_SYSTEM64_DLLS="$W_WINDIR_UNIX/system32"
  3741. W_SYSTEM64_DLLS_WIN32="C:\\windows\\sysnative" # path to access 64-bit dlls from 32-bit apps
  3742. W_SYSTEM64_DLLS_WIN64="C:\\windows\\system32" # path to access 64-bit dlls from 64-bit apps
  3743. # 64-bit prefixes still have plenty of issues:
  3744. w_warn "You are using a 64-bit WINEPREFIX. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug."
  3745. else
  3746. W_ARCH=win32
  3747. W_SYSTEM32_DLLS="$W_WINDIR_UNIX/system32"
  3748. W_SYSTEM32_DLLS_WIN="C:\\windows\\system32"
  3749. fi
  3750. }
  3751. winetricks_annihilate_wineprefix()
  3752. {
  3753. w_skip_windows "No wineprefix to delete on windows" && return
  3754. w_askpermission "Delete $WINEPREFIX, its apps, icons, and menu items?"
  3755. rm -rf "$WINEPREFIX"/*
  3756. rm -rf "$WINEPREFIX"
  3757. # Also remove menu items.
  3758. find $XDG_DATA_HOME/applications/wine -type f -name '*.desktop' -exec grep -q -l "$WINEPREFIX" '{}' ';' -exec rm '{}' ';'
  3759. # Also remove desktop items.
  3760. # Desktop might be synonym for home directory, so only go one level
  3761. # deep to avoid extreme slowdown if user has lots of files
  3762. (
  3763. if ! test "$XDG_DESKTOP_DIR" && test -f $XDG_CONFIG_HOME/user-dirs.dirs
  3764. then
  3765. . $XDG_CONFIG_HOME/user-dirs.dirs
  3766. fi
  3767. find "$XDG_DESKTOP_DIR" -maxdepth 1 -type f -name '*.desktop' -exec grep -q -l "$WINEPREFIX" '{}' ';' -exec rm '{}' ';'
  3768. )
  3769. # FIXME: recover more nicely. At moment, have to restart to avoid trouble.
  3770. exit 0
  3771. }
  3772. winetricks_init()
  3773. {
  3774. #---- Private Variables ----
  3775. if ! test "$USERNAME"
  3776. then
  3777. # Posix only requires LOGNAME to be defined, and sure enough, when
  3778. # logging in via console and startx in ubuntu 11.04, USERNAME isn't set!
  3779. # And even normal logins in Ubuntu 13.04 doesn't set it.
  3780. # I tried using only LOGNAME in this script, but it's so easy to slip
  3781. # and use USERNAME, so define it here if needed.
  3782. USERNAME="$LOGNAME"
  3783. fi
  3784. # Ephemeral files for this run
  3785. WINETRICKS_WORKDIR="$W_TMP_EARLY/w.$LOGNAME.$$"
  3786. test "$W_OPT_NOCLEAN" = 1 || rm -rf "$WINETRICKS_WORKDIR"
  3787. # Registering a verb creates a file in WINETRICKS_METADATA
  3788. WINETRICKS_METADATA="$WINETRICKS_WORKDIR/metadata"
  3789. # The list of categories is also hardcoded in winetricks_mainmenu() :-(
  3790. WINETRICKS_CATEGORIES="apps benchmarks dlls fonts games settings"
  3791. for _W_cat in $WINETRICKS_CATEGORIES
  3792. do
  3793. mkdir -p "$WINETRICKS_METADATA"/$_W_cat
  3794. done
  3795. # Which subdirectory of WINETRICKS_METADATA is currently active (or main, if none)
  3796. WINETRICKS_CURMENU=prefix
  3797. # Delete work directory after each run, on exit either graceful or abrupt
  3798. trap winetricks_cleanup EXIT HUP INT QUIT ABRT
  3799. # Whether to always cache cached iso's (1) or only use cache if present (0)
  3800. # Can be inherited from environment or set via -k, defaults to off
  3801. WINETRICKS_OPT_KEEPISOS=${WINETRICKS_OPT_KEEPISOS:-0}
  3802. # what program to use to make disc image (dd or ddrescue)
  3803. WINETRICKS_OPT_DD=${WINETRICKS_OPT_DD:-dd}
  3804. # whether to use shared wineprefix (1) or unique wineprefix for each app (0)
  3805. WINETRICKS_OPT_SHAREDPREFIX=${WINETRICKS_OPT_SHAREDPREFIX:-0}
  3806. WINETRICKS_SOURCEFORGE=http://downloads.sourceforge.net
  3807. winetricks_get_sha1sum_prog
  3808. #---- Public Variables ----
  3809. # Where application installers are cached
  3810. # See http://standards.freedesktop.org/basedir-spec/latest/ar01s03.html
  3811. if test -d "$HOME/Library/Caches"
  3812. then
  3813. # MacOSX
  3814. XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/Library/Caches}"
  3815. else
  3816. XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
  3817. fi
  3818. if test "$WINETRICKS_DIR"
  3819. then
  3820. # For backwards compatibility
  3821. W_CACHE="${W_CACHE:-$WINETRICKS_DIR/cache}"
  3822. WINETRICKS_POST="${WINETRICKS_POST:-$WINETRICKS_DIR/postinstall}"
  3823. else
  3824. W_CACHE="${W_CACHE:-$XDG_CACHE_HOME/winetricks}"
  3825. WINETRICKS_POST="${WINETRICKS_POST:-$XDG_DATA_HOME/winetricks/postinstall}"
  3826. fi
  3827. test -d "$W_CACHE" || mkdir -p "$W_CACHE"
  3828. WINETRICKS_AUTH="${WINETRICKS_AUTH:-$XDG_DATA_HOME/winetricks/auth}"
  3829. # System-specific variables
  3830. case "$OS" in
  3831. "Windows_NT")
  3832. WINE=""
  3833. WINESERVER=""
  3834. W_DRIVE_C="C:/"
  3835. ;;
  3836. *)
  3837. WINE="${WINE:-wine}"
  3838. # Find wineserver.
  3839. # Some distros (Debian before wine 1.8-2) don't have it on the path.
  3840. for x in \
  3841. "$WINESERVER" \
  3842. "${WINE}server" \
  3843. "`which wineserver 2> /dev/null`" \
  3844. "`dirname $WINE`/server/wineserver" \
  3845. /usr/bin/wineserver-development \
  3846. /usr/lib/wine/wineserver \
  3847. /usr/lib/i386-kfreebsd-gnu/wine/wineserver \
  3848. /usr/lib/i386-linux-gnu/wine/wineserver \
  3849. /usr/lib/powerpc-linux-gnu/wine/wineserver \
  3850. /usr/lib/i386-kfreebsd-gnu/wine/bin/wineserver \
  3851. /usr/lib/i386-linux-gnu/wine/bin/wineserver \
  3852. /usr/lib/powerpc-linux-gnu/wine/bin/wineserver \
  3853. /usr/lib/x86_64-linux-gnu/wine/bin/wineserver \
  3854. /usr/lib/i386-kfreebsd-gnu/wine-development/wineserver \
  3855. /usr/lib/i386-linux-gnu/wine-development/wineserver \
  3856. /usr/lib/powerpc-linux-gnu/wine-development/wineserver \
  3857. /usr/lib/x86_64-linux-gnu/wine-development/wineserver \
  3858. file-not-found
  3859. do
  3860. if test -x "$x"
  3861. then
  3862. case "$x" in
  3863. /usr/lib/*/wine-development/wineserver|/usr/bin/wineserver-development)
  3864. if test -x /usr/bin/wine-development
  3865. then
  3866. WINE="/usr/bin/wine-development"
  3867. fi
  3868. ;;
  3869. esac
  3870. break
  3871. fi
  3872. done
  3873. case "$x" in
  3874. file-not-found)
  3875. w_die "wineserver not found!" ;;
  3876. *)
  3877. WINESERVER="$x" ;;
  3878. esac
  3879. if test "$WINEPREFIX"
  3880. then
  3881. WINETRICKS_ORIGINAL_WINEPREFIX="$WINEPREFIX"
  3882. else
  3883. WINETRICKS_ORIGINAL_WINEPREFIX="$HOME/.wine"
  3884. fi
  3885. _abswine="`which "$WINE" 2>/dev/null`"
  3886. if ! test -x "$_abswine" || ! test -f "$_abswine"
  3887. then
  3888. w_die "WINE is $WINE, which is neither on the path nor an executable file"
  3889. fi
  3890. case "$WINETRICKS_OPT_VERBOSE" in
  3891. 1|2) echo -n "Wine is '$WINE'; Wine version is "
  3892. "$WINE" --version || w_die "Can't get wine version"
  3893. echo "winetricks is $0 ; winetricks version is $WINETRICKS_VERSION"
  3894. ;;
  3895. esac
  3896. unset _abswine
  3897. ;;
  3898. esac
  3899. winetricks_set_wineprefix $1
  3900. # FIXME: don't hardcode
  3901. W_PROGRAMS_DRIVE=c
  3902. # Whether to automate installs (0=no, 1=yes)
  3903. winetricks_set_unattended ${W_OPT_UNATTENDED:-0}
  3904. # Overridden for windows
  3905. W_ISO_MOUNT_ROOT=/mnt/winetricks
  3906. W_ISO_MOUNT_LETTER=i
  3907. WINETRICKS_WINE_VERSION=`winetricks_early_wine --version | sed 's/.*wine/wine/'`
  3908. # A small hack...
  3909. case "$WINETRICKS_WINE_VERSION" in
  3910. wine-1.4-*) WINETRICKS_WINE_VERSION="wine-1.4.40"; export WINETRICKS_WINE_VERSION;;
  3911. wine-1.4) WINETRICKS_WINE_VERSION="wine-1.4.0"; export WINETRICKS_WINE_VERSION;;
  3912. wine-1.6-*) WINETRICKS_WINE_VERSION="wine-1.6.0"; export WINETRICKS_WINE_VERSION;;
  3913. wine-1.6) WINETRICKS_WINE_VERSION="wine-1.6.0"; export WINETRICKS_WINE_VERSION;;
  3914. wine-1.8-*) WINETRICKS_WINE_VERSION="wine-1.8.0"; export WINETRICKS_WINE_VERSION;;
  3915. wine-1.8) WINETRICKS_WINE_VERSION="wine-1.8.0"; export WINETRICKS_WINE_VERSION;;
  3916. esac
  3917. WINETRICKS_WINE_MINOR=`echo $WINETRICKS_WINE_VERSION | sed 's/wine-1\.\([0-9]*\)\..*/\1/'`
  3918. WINETRICKS_WINE_MICRO=`echo $WINETRICKS_WINE_VERSION | sed 's/wine-1.[0-9][0-9]*\.\([0-9]*\).*/\1/'`
  3919. }
  3920. winetricks_usage()
  3921. {
  3922. case $LANG in
  3923. da*)
  3924. cat <<_EOF_
  3925. Brug: $0 [tilvalg] [verbum|sti-til-verbum] ...
  3926. Kører de angivne verber. Hvert verbum installerer et program eller ændrer en indstilling.
  3927. Tilvalg:
  3928. -k|--keep_isos: lagr iso'er lokalt (muliggør senere installation uden disk)
  3929. -q|--unattended: stil ingen spørgsmål, installér bare automatisk
  3930. -r|--ddrescue: brug alternativ disk-tilgangsmetode (hjælper i tilfælde af en ridset disk)
  3931. -t|--torify: Run downloads under torify, if available
  3932. -v|--verbose: vis alle kommandoer som de bliver udført
  3933. -V|--version: vis programversionen og afslut
  3934. -h|--help: vis denne besked og afslut
  3935. Diverse verber:
  3936. list: vis en liste over alle verber
  3937. list-cached: vis en liste over verber for allerede-hentede installationsprogrammer
  3938. list-download: vis en liste over verber for programmer der kan hentes
  3939. list-manual-download: list applications which can be downloaded with some help from the user
  3940. list-installed: list already-installed applications
  3941. _EOF_
  3942. ;;
  3943. de*)
  3944. cat <<_EOF_
  3945. Benutzung: $0 [options] [Kommando|Verb|Pfad-zu-Verb] ...
  3946. Angegebene Verben ausführen.
  3947. Jedes Verb installiert eine Anwendung oder ändert eine Einstellung.
  3948. Optionen:
  3949. --force Nicht prüfen ob Pakete bereits installiert wurden
  3950. --gui GUI Diagnosen anzeigen, auch wenn von der Kommandozeile gestartet
  3951. --isolate Jedes Programm oder Spiel in eigener Bottle (WINEPREFIX) installieren
  3952. -k, --keep_isos ISOs local speichern (erlaubt spätere Installation ohne Disk)
  3953. --no-clean Temp Verzeichnisse nicht löschen (nützlich beim debuggen)
  3954. -q, --unattended Keine Fragen stellen, alles automatisch installieren
  3955. -r, --ddrescue Alternativer Zugriffsmodus (hilft bei zerkratzten Disks)
  3956. --showbroken Auch Verben anzeigen die momentan in Wine nicht funktionieren
  3957. -t --torify Run downloads under torify, if available
  3958. --verify Wenn Möglisch automatische GUI Tests für Verben starten
  3959. -v, --verbose Alle ausgeführten Kommandos anzeigen
  3960. -h, --help Diese Hilfemeldung anzeigen
  3961. -V, --version Programmversion anzeigen und Beenden
  3962. Kommandos:
  3963. list Kategorien auflisten
  3964. list-all Alle Kategorien und deren Verben auflisten
  3965. apps list Verben der Kategorie 'Anwendungen' auflisten
  3966. benchmarks list Verben der Kategorie 'Benchmarks' auflisten
  3967. dlls list Verben der Kategorie 'DLLs' auflisten
  3968. games list Verben der Kategorie 'Spiele' auflisten
  3969. settings list Verben der Kategorie 'Einstellungen' auflisten
  3970. list-cached Verben für bereits gecachte Installers auflisten
  3971. list-download Verben für automatisch herunterladbare Anwendungen auflisten
  3972. list-manual-download Verben für vom Benutzer herunterladbare Anwendungen auflisten
  3973. list-installed Bereits installierte Verben auflisten
  3974. prefix=foobar WINEPREFIX=$W_PREFIXES_ROOT/foobar auswählen
  3975. _EOF_
  3976. ;;
  3977. *)
  3978. cat <<_EOF_
  3979. Usage: $0 [options] [command|verb|path-to-verb] ...
  3980. Executes given verbs. Each verb installs an application or changes a setting.
  3981. Options:
  3982. --force Don't check whether packages were already installed
  3983. --gui Show gui diagnostics even when driven by commandline
  3984. --isolate Install each app or game in its own bottle (WINEPREFIX)
  3985. --self-update Update this application to the last version
  3986. --update-rollback Rollback the last self update
  3987. -k, --keep_isos Cache isos (allows later installation without disc)
  3988. --no-clean Don't delete temp directories (useful during debugging)
  3989. -q, --unattended Don't ask any questions, just install automatically
  3990. -r, --ddrescue Retry hard when caching scratched discs
  3991. --showbroken Even show verbs that are currently broken in wine
  3992. -t --torify Run downloads under torify, if available
  3993. --verify Run (automated) GUI tests for verbs, if available
  3994. -v, --verbose Echo all commands as they are executed
  3995. -h, --help Display this message and exit
  3996. -V, --version Display version and exit
  3997. Commands:
  3998. list list categories
  3999. list-all list all categories and their verbs
  4000. apps list list verbs in category 'applications'
  4001. benchmarks list list verbs in category 'benchmarks'
  4002. dlls list list verbs in category 'dlls'
  4003. games list list verbs in category 'games'
  4004. settings list list verbs in category 'settings'
  4005. list-cached list cached-and-ready-to-install verbs
  4006. list-download list verbs which download automatically
  4007. list-manual-download list verbs which download with some help from the user
  4008. list-installed list already-installed verbs
  4009. prefix=foobar select WINEPREFIX=$W_PREFIXES_ROOT/foobar
  4010. _EOF_
  4011. ;;
  4012. esac
  4013. }
  4014. winetricks_handle_option()
  4015. {
  4016. case "$1" in
  4017. -r|--ddrescue) WINETRICKS_OPT_DD=ddrescue ;;
  4018. -k|--keep_isos) WINETRICKS_OPT_KEEPISOS=1 ;;
  4019. -q|--unattended) winetricks_set_unattended 1 ;;
  4020. -t|--torify) WINETRICKS_OPT_TORIFY=1 ;;
  4021. -v|--verbose) WINETRICKS_OPT_VERBOSE=1 ; set -x;;
  4022. -vv|--really-verbose) WINETRICKS_OPT_VERBOSE=2 ; set -x ;;
  4023. -V|--version) winetricks_print_version ; exit 0;;
  4024. --verify) WINETRICKS_VERIFY=1 ;;
  4025. -h|--help) winetricks_usage ; exit 0 ;;
  4026. --self-update) winetricks_selfupdate;;
  4027. --update-rollback) winetricks_selfupdate_rollback;;
  4028. --isolate) WINETRICKS_OPT_SHAREDPREFIX=0 ;;
  4029. --no-isolate) WINETRICKS_OPT_SHAREDPREFIX=1 ;;
  4030. --no-clean) W_OPT_NOCLEAN=1 ;;
  4031. --force) WINETRICKS_FORCE=1;;
  4032. --gui) winetricks_detect_gui;;
  4033. --showbroken) W_OPT_SHOWBROKEN=1 ;;
  4034. --optin) WINETRICKS_STATS_REPORT=1;;
  4035. --optout) WINETRICKS_STATS_REPORT=0;;
  4036. -*) w_die "unknown option $1" ;;
  4037. *) return 1 ;;
  4038. esac
  4039. return 0
  4040. }
  4041. # Must initialize variables before calling w_metadata
  4042. if ! test "$WINETRICKS_LIB"
  4043. then
  4044. WINETRICKS_SRCDIR=`dirname "$0"`
  4045. WINETRICKS_SRCDIR=`cd "$WINETRICKS_SRCDIR"; pwd`
  4046. # Which GUI helper to use (none/zenity/kdialog). See winetricks_detect_gui.
  4047. WINETRICKS_GUI=none
  4048. # Default to a shared prefix:
  4049. WINETRICKS_OPT_SHAREDPREFIX=${WINETRICKS_OPT_SHAREDPREFIX:-1}
  4050. # Handle options before init, to avoid starting wine for --help or --version
  4051. while winetricks_handle_option $1
  4052. do
  4053. shift
  4054. done
  4055. # Workaround for https://github.com/Winetricks/winetricks/issues/599
  4056. # If --isolate is used, pass verb to winetricks_init, so it can set the wineprefix using winetricks_set_wineprefix()
  4057. # Otherwise, an arch mismatch between ${WINEPREFIX:-$HOME/.wine} and the prefix to be made for the isolated app would cause it to fail
  4058. case $WINETRICKS_OPT_SHAREDPREFIX in
  4059. 0) winetricks_init $1 ;;
  4060. *) winetricks_init ;;
  4061. esac
  4062. fi
  4063. winetricks_install_app()
  4064. {
  4065. case $LANG in
  4066. da*) fail_msg="Installationen af pakken $1 fejlede" ;;
  4067. de*) fail_msg="Installieren von Paket $1 gescheitert" ;;
  4068. pl*) fail_msg="Niepowodzenie przy instalacji paczki $1" ;;
  4069. ru*) fail_msg="Ошибка установки пакета $1" ;;
  4070. uk*) fail_msg="Помилка встановлення пакунка $1" ;;
  4071. zh_CN*) fail_msg="$1 安装失败" ;;
  4072. zh_TW*|zh_HK*) fail_msg="$1 安裝失敗" ;;
  4073. *) fail_msg="Failed to install package $1" ;;
  4074. esac
  4075. # FIXME: initialize a new wineprefix for this app, set lots of global variables
  4076. if ! w_do_call $1 $2
  4077. then
  4078. w_die "$fail_msg"
  4079. fi
  4080. }
  4081. #---- Builtin Verbs ----
  4082. #----------------------------------------------------------------
  4083. # Runtimes
  4084. #----------------------------------------------------------------
  4085. #----- common download for several verbs
  4086. helper_directx_dl()
  4087. {
  4088. # February 2010 DirectX 9c User Redistributable
  4089. # http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=0cef8180-e94a-4f56-b157-5ab8109cb4f5
  4090. # FIXME: none of the verbs that use this will show download status right
  4091. # until file1 metadata is extended to handle common cache dir
  4092. w_download_to directx9 http://download.microsoft.com/download/E/E/1/EE17FF74-6C45-4575-9CF4-7FC2597ACD18/directx_feb2010_redist.exe a97c820915dc20929e84b49646ec275760012a42
  4093. DIRECTX_NAME=directx_feb2010_redist.exe
  4094. }
  4095. helper_directx_Jun2010()
  4096. {
  4097. # June 2010 DirectX 9c User Redistributable
  4098. # http://www.microsoft.com/downloads/en/details.aspx?FamilyID=3b170b25-abab-4bc3-ae91-50ceb6d8fa8d
  4099. w_download_to directx9 http://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe
  4100. DIRECTX_NAME=directx_Jun2010_redist.exe
  4101. }
  4102. helper_d3dx9_xx()
  4103. {
  4104. dllname=d3dx9_$1
  4105. helper_directx_dl
  4106. # Even kinder, less invasive directx - only extract and override d3dx9_xx.dll
  4107. w_try_cabextract -d "$W_TMP" -L -F "*$dllname*x86*" "$W_CACHE"/directx9/$DIRECTX_NAME
  4108. for x in "$W_TMP"/*.cab
  4109. do
  4110. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F "$dllname.dll" "$x"
  4111. done
  4112. if test "$W_ARCH" = "win64"
  4113. then
  4114. w_try_cabextract -d "$W_TMP" -L -F "*$dllname*x64*" "$W_CACHE"/directx9/$DIRECTX_NAME
  4115. for x in "$W_TMP"/*x64.cab
  4116. do
  4117. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F "$dllname.dll" "$x"
  4118. done
  4119. fi
  4120. w_override_dlls native $dllname
  4121. }
  4122. helper_win2ksp4()
  4123. {
  4124. filename=$1
  4125. # http://www.microsoft.com/downloads/details.aspx?FamilyID=1001AAF1-749F-49F4-8010-297BD6CA33A0&displaylang=en
  4126. w_download_to win2ksp4 http://download.microsoft.com/download/E/6/A/E6A04295-D2A8-40D0-A0C5-241BFECD095E/W2KSP4_EN.EXE fadea6d94a014b039839fecc6e6a11c20afa4fa8
  4127. w_try_cabextract -d "$W_TMP" -L -F $filename "$W_CACHE"/win2ksp4/W2KSP4_EN.EXE
  4128. }
  4129. helper_xpsp3()
  4130. {
  4131. filename=$1
  4132. # http://www.microsoft.com/en-us/download/details.aspx?id=24
  4133. w_download_to xpsp3 http://download.microsoft.com/download/d/3/0/d30e32d8-418a-469d-b600-f32ce3edf42d/WindowsXP-KB936929-SP3-x86-ENU.exe c81472f7eeea2eca421e116cd4c03e2300ebfde4
  4134. w_try_cabextract -d "$W_TMP" -L -F $filename "$W_CACHE"/xpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe
  4135. }
  4136. helper_win7sp1()
  4137. {
  4138. filename=$1
  4139. # https://www.microsoft.com/en-us/download/details.aspx?id=5842
  4140. w_download_to win7sp1 http://download.microsoft.com/download/0/A/F/0AFB5316-3062-494A-AB78-7FB0D4461357/windows6.1-KB976932-X86.exe c3516bc5c9e69fee6d9ac4f981f5b95977a8a2fa
  4141. w_try_cabextract -d "$W_TMP" -L -F $filename "$W_CACHE"/win7sp1/windows6.1-KB976932-X86.exe
  4142. }
  4143. #---------------------------------------------------------
  4144. w_metadata adobeair dlls \
  4145. title="Adobe AIR 20.x" \
  4146. publisher="Adobe" \
  4147. year="2015" \
  4148. media="download" \
  4149. file1="AdobeAIRInstaller.exe" \
  4150. installed_file1="$W_COMMONFILES_X86_WIN/Adobe AIR/Versions/1.0/Adobe AIR.dll" \
  4151. homepage="http://www.adobe.com/products/air/"
  4152. load_adobeair()
  4153. {
  4154. # 2010-02-02: sha1sum 5c95f51a680f8c175a92755238127be4ad22c53b
  4155. # 2010-02-20: sha1sum 6f03e723bd855abbe00eb8fdf22da54fb49c62db
  4156. # 2010-07-29: 2.0.2 sha1sum 7b93aedaf48ad7854940e7a4e7d9394a255e888b
  4157. # 2010-12-08: 2.5.1 sha1sum 2664207ca8e836f5070ee356064829a39785a92e
  4158. # 2011-04-13: 2.6 sha1sum 3d9c2f9d8f3533424cfea84d61fcb9464278d9fc
  4159. # 2011-10-26: 2.7 sha1sum dfa337d4b53e9d924356febc116450190fa183dd
  4160. # 2014-03-01: 4.0 sha1sum 0034bdd4e0b2ce0fa6198b0b715fba85754d9a57
  4161. # http://helpx.adobe.com/en/flash-player/release-note/fp_12_air_4_release_notes.html
  4162. # 2014-09-30: 15.0 sha1sum 46341f1358bc6e0b9ddeae3591662a2ac68dc360
  4163. # 2014-11-24: 15.0.0.356 sha1sum c0e6b8b1ed5ffa282945d21b21f8a5e03febc904
  4164. # 2015-11-06: 19.x sha1sum 3bc2a568204a3a9b59ca347ab49585f0c5fab279
  4165. # 2015-12-27: 20.0 sha1sum 9c10b7be43771869c381c73197c9a0fcd1b727cf
  4166. # 2015-12-29: 20.0.0.233 (had to check with strings on Adobe AIR.dll) sha1sum 7161fb8b47721485882f52720f8b41dbfe3b69d0
  4167. # 2016-02-17: 20.0.0.260 (strings 'Adobe AIR.dll' | grep 20\\. ) sha1sum 2fdd561556fe881c4e5538d4ee37f523871befd3
  4168. w_download http://airdownload.adobe.com/air/win/download/20.0/AdobeAIRInstaller.exe 2fdd561556fe881c4e5538d4ee37f523871befd3
  4169. cd "$W_CACHE/$W_PACKAGE"
  4170. w_try "$WINE" AdobeAIRInstaller.exe $W_UNATTENDED_DASH_SILENT
  4171. }
  4172. #----------------------------------------------------------------
  4173. w_metadata amstream dlls \
  4174. title="MS amstream.dll" \
  4175. publisher="Microsoft" \
  4176. year="2010" \
  4177. media="download" \
  4178. file1="../directx9/directx_feb2010_redist.exe" \
  4179. installed_file1="$W_SYSTEM32_DLLS_WIN/amstream.dll"
  4180. load_amstream()
  4181. {
  4182. helper_directx_dl
  4183. mkdir "$W_CACHE"/amstream # kludge so test -f $file1 works
  4184. w_try_cabextract -d "$W_TMP" -L -F dxnt.cab "$W_CACHE"/directx9/$DIRECTX_NAME
  4185. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'amstream.dll' "$W_TMP/dxnt.cab"
  4186. w_try_regsvr amstream.dll
  4187. w_override_dlls native amstream
  4188. }
  4189. #----------------------------------------------------------------
  4190. w_metadata art2kmin dlls \
  4191. title="MS Access 2007 runtime" \
  4192. publisher="Microsoft" \
  4193. year="2007" \
  4194. media="download" \
  4195. file1="AccessRuntime.exe" \
  4196. installed_file1="$W_COMMONFILES_X86_WIN/Microsoft Shared/OFFICE12/ACEES.DLL"
  4197. load_art2kmin()
  4198. {
  4199. # See http://www.microsoft.com/downloads/details.aspx?familyid=d9ae78d9-9dc6-4b38-9fa6-2c745a175aed&displaylang=en
  4200. w_download http://download.microsoft.com/download/D/2/A/D2A2FC8B-0447-491C-A5EF-E8AA3A74FB98/AccessRuntime.exe 571811b7536e97cf4e4e53bbf8260cddd69f9b2d
  4201. cd "$W_CACHE/$W_PACKAGE"
  4202. w_try "$WINE" AccessRuntime.exe $W_UNATTENDED_SLASH_Q
  4203. }
  4204. #----------------------------------------------------------------
  4205. w_metadata atmlib dlls \
  4206. title="Adobe Type Manager" \
  4207. publisher="Adobe" \
  4208. year="2009" \
  4209. media="download" \
  4210. file1="../win2ksp4/W2KSP4_EN.EXE" \
  4211. installed_file1="$W_SYSTEM32_DLLS_WIN/atmlib.dll"
  4212. load_atmlib()
  4213. {
  4214. helper_win2ksp4 i386/atmlib.dl_
  4215. w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/atmlib.dl_
  4216. }
  4217. #----------------------------------------------------------------
  4218. w_metadata avifil32 dlls \
  4219. title="MS avifil32" \
  4220. publisher="Microsoft" \
  4221. year="2004" \
  4222. media="download" \
  4223. file1="../xpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  4224. installed_file1="$W_SYSTEM32_DLLS_WIN/avifil32.dll"
  4225. load_avifil32()
  4226. {
  4227. helper_xpsp3 i386/avifil32.dl_
  4228. w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/avifil32.dl_
  4229. w_override_dlls native avifil32
  4230. }
  4231. #----------------------------------------------------------------
  4232. w_metadata cabinet dlls \
  4233. title="Microsoft cabinet.dll" \
  4234. publisher="Microsoft" \
  4235. year="2002" \
  4236. media="download" \
  4237. file1="mdac_typ.exe" \
  4238. installed_file1="$W_SYSTEM32_DLLS_WIN/cabinet.dll"
  4239. load_cabinet()
  4240. {
  4241. # http://www.microsoft.com/downloads/en/details.aspx?FamilyId=9AD000F2-CAE7-493D-B0F3-AE36C570ADE8&displaylang=en
  4242. w_download http://download.microsoft.com/download/3/b/f/3bf74b01-16ba-472d-9a8c-42b2b4fa0d76/mdac_typ.exe f68594d1f578c3b47bf0639c46c11c5da161feee
  4243. w_try_cabextract --directory="$W_TMP" "$W_CACHE"/cabinet/$file1
  4244. w_try cp "$W_TMP"/cabinet.dll "$W_SYSTEM32_DLLS"/cabinet.dll
  4245. w_override_dlls native,builtin cabinet
  4246. }
  4247. #----------------------------------------------------------------
  4248. w_metadata cmd dlls \
  4249. title="MS cmd.exe" \
  4250. publisher="Microsoft" \
  4251. year="2004" \
  4252. media="download" \
  4253. file1="Q811493_W2K_SP4_X86_EN.exe" \
  4254. installed_file1="$W_SYSTEM32_DLLS_WIN/cmd.exe"
  4255. load_cmd()
  4256. {
  4257. w_download ftp://ftp.sunet.se/pub/security/vendor/microsoft/win2000/Security_Bulletins/Q811493_W2K_SP4_X86_EN.exe ac6e28cfd12942e74aa08bddf7715705edb85b6b
  4258. w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_CACHE/$W_PACKAGE/$file1" -F cmd.exe
  4259. w_override_dlls native,builtin cmd.exe
  4260. }
  4261. #----------------------------------------------------------------
  4262. w_metadata comctl32 dlls \
  4263. title="MS common controls 5.80" \
  4264. publisher="Microsoft" \
  4265. year="2001" \
  4266. media="download" \
  4267. file1="cc32inst.exe" \
  4268. installed_file1="$W_SYSTEM32_DLLS_WIN/comctl32.dll"
  4269. load_comctl32()
  4270. {
  4271. # 2011-01-17: http://www.microsoft.com/downloads/details.aspx?familyid=6f94d31a-d1e0-4658-a566-93af0d8d4a1e
  4272. # 2012-08-11: w_download http://download.microsoft.com/download/platformsdk/redist/5.80.2614.3600/w9xnt4/en-us/cc32inst.exe 94c3c494258cc54bd65d2f0153815737644bffde
  4273. # 2016/01/07: w_download ftp://ftp.ie.debian.org/disk1/download.sourceforge.net/pub/sourceforge/p/po/pocmin/Win%2095_98%20Controls/Win%2095_98%20Controls/CC32inst.exe
  4274. w_download ftp://ftp.ie.debian.org/disk1/download.sourceforge.net/pub/sourceforge/p/po/pocmin/Win%2095_98%20Controls/Win%2095_98%20Controls/CC32inst.exe 94c3c494258cc54bd65d2f0153815737644bffde cc32inst.exe
  4275. w_try "$WINE" "$W_CACHE"/comctl32/cc32inst.exe "/T:$W_TMP_WIN" /c $W_UNATTENDED_SLASH_Q
  4276. w_try_unzip "$W_TMP" "$W_TMP"/comctl32.exe
  4277. w_try "$WINE" "$W_TMP"/x86/50ComUpd.Exe "/T:$W_TMP_WIN" /c $W_UNATTENDED_SLASH_Q
  4278. w_try cp "$W_TMP"/comcnt.dll "$W_SYSTEM32_DLLS"/comctl32.dll
  4279. w_override_dlls native,builtin comctl32
  4280. # some builtin apps don't like native comctl32
  4281. w_override_app_dlls winecfg.exe builtin comctl32
  4282. w_override_app_dlls explorer.exe builtin comctl32
  4283. w_override_app_dlls iexplore.exe builtin comctl32
  4284. }
  4285. #----------------------------------------------------------------
  4286. w_metadata comctl32ocx dlls \
  4287. title="MS comctl32.ocx and mscomctl.ocx, comctl32 wrappers for VB6" \
  4288. publisher="Microsoft" \
  4289. year="2009" \
  4290. media="download" \
  4291. file1="VisualBasic6-KB896559-v1-ENU.exe" \
  4292. file2="mscomct2.cab" \
  4293. installed_file1="$W_SYSTEM32_DLLS_WIN/mscomctl.ocx"
  4294. load_comctl32ocx()
  4295. {
  4296. # http://www.microsoft.com/downloads/details.aspx?FamilyID=25437D98-51D0-41C1-BB14-64662F5F62FE
  4297. w_download http://download.microsoft.com/download/3/a/5/3a5925ac-e779-4b1c-bb01-af67dc2f96fc/VisualBasic6-KB896559-v1-ENU.exe f52cf2034488235b37a1da837d1c40eb2a1bad84
  4298. # More ActiveX controls. See https://support.microsoft.com/kb/297381
  4299. w_download http://activex.microsoft.com/controls/vb6/mscomct2.cab 766f9ccf8849a04d757faee379da54d635c8ac71
  4300. w_try_cabextract --directory="$W_TMP" "$W_CACHE"/comctl32ocx/VisualBasic6-KB896559-v1-ENU.exe
  4301. w_try cp "$W_TMP"/mscomctl.ocx "$W_SYSTEM32_DLLS"/mscomctl.ocx
  4302. w_try cp "$W_TMP"/comctl32.ocx "$W_SYSTEM32_DLLS"/comctl32.ocx
  4303. w_try_regsvr comctl32.ocx
  4304. w_try_regsvr mscomctl.ocx
  4305. w_try_cabextract --directory="$W_TMP" "$W_CACHE"/comctl32ocx/mscomct2.cab
  4306. w_try cp "$W_TMP"/mscomct2.ocx "$W_SYSTEM32_DLLS"/mscomct2.ocx
  4307. w_try_regsvr mscomct2.ocx
  4308. }
  4309. #----------------------------------------------------------------
  4310. w_metadata comdlg32ocx dlls \
  4311. title="Common Dialog ActiveX Control for VB6" \
  4312. publisher="Microsoft" \
  4313. year="2009" \
  4314. media="download" \
  4315. file1="ComDlg32.cab" \
  4316. installed_file1="$W_SYSTEM32_DLLS_WIN/comdlg32.ocx"
  4317. load_comdlg32ocx()
  4318. {
  4319. # By analogy with vb5 version in http://support.microsoft.com/kb/168917
  4320. w_download http://activex.microsoft.com/controls/vb6/ComDlg32.cab d4f3e193c6180eccd73bad53a8500beb5b279cbf
  4321. w_try_cabextract --directory="$W_TMP" "$W_CACHE"/comdlg32ocx/${file1}
  4322. w_try cp "$W_TMP"/comdlg32.ocx "$W_SYSTEM32_DLLS"/comdlg32.ocx
  4323. w_try_regsvr comdlg32.ocx
  4324. }
  4325. #----------------------------------------------------------------
  4326. w_metadata crypt32 dlls \
  4327. title="MS crypt32" \
  4328. publisher="Microsoft" \
  4329. year="2004" \
  4330. media="download" \
  4331. file1="../xpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  4332. installed_file1="$W_SYSTEM32_DLLS_WIN/crypt32.dll"
  4333. load_crypt32()
  4334. {
  4335. w_call msasn1
  4336. helper_xpsp3 i386/crypt32.dl_
  4337. w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/crypt32.dl_
  4338. w_override_dlls native crypt32
  4339. }
  4340. #----------------------------------------------------------------
  4341. w_metadata binkw32 dlls \
  4342. title="RAD Game Tools binkw32.dll" \
  4343. publisher="RAD Game Tools, Inc." \
  4344. year="2000" \
  4345. media="download" \
  4346. file1="__32-binkw32.dll3.0.0.0.zip" \
  4347. installed_file1="$W_SYSTEM32_DLLS_WIN/binkw32.dll"
  4348. load_binkw32()
  4349. {
  4350. # Mirror: http://www.dlldump.com/download-dll-files_new.php/dllfiles/B/binkw32.dll/1.0q/download.html
  4351. # Sha1sum of the decompressed file: 613f81f82e12131e86ae60dd318941f40db2200f
  4352. #
  4353. # Zip sha1sum:
  4354. # 2015-03-28: 991f77e8df513ccb8663dc4a2753fbf90338ef5c
  4355. # 2015-12-27: 6a30900885390ef361dbb67444a7944143db36bf
  4356. w_download http://www.down-dll.com/dll/b/__32-binkw32.dll3.0.0.0.zip 6a30900885390ef361dbb67444a7944143db36bf
  4357. w_try_unzip "$W_TMP" "$W_CACHE"/binkw32/__32-binkw32.dll3.0.0.0.zip
  4358. w_try cp "$W_TMP"/binkw32.dll "$W_SYSTEM32_DLLS"/binkw32.dll
  4359. w_override_dlls native binkw32
  4360. }
  4361. #----------------------------------------------------------------
  4362. w_metadata d3dcompiler_43 dlls \
  4363. title="MS d3dcompiler_43.dll" \
  4364. publisher="Microsoft" \
  4365. year="2010" \
  4366. media="download" \
  4367. file1="../directx9/directx_Jun2010_redist.exe" \
  4368. installed_file1="$W_SYSTEM32_DLLS_WIN/d3dcompiler_43.dll" \
  4369. wine_showstoppers="24013" # list a showstopper to hide this from average users for now
  4370. load_d3dcompiler_43()
  4371. {
  4372. dllname=d3dcompiler_43
  4373. helper_directx_Jun2010
  4374. w_try_cabextract -d "$W_TMP" -L -F "*$dllname*x86*" "$W_CACHE"/directx9/$DIRECTX_NAME
  4375. for x in "$W_TMP"/*.cab
  4376. do
  4377. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F "$dllname.dll" "$x"
  4378. done
  4379. if test "$W_ARCH" = "win64"
  4380. then
  4381. w_try_cabextract -d "$W_TMP" -L -F "*$dllname*x64*" "$W_CACHE"/directx9/$DIRECTX_NAME
  4382. for x in "$W_TMP"/*x64.cab
  4383. do
  4384. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F "$dllname.dll" "$x"
  4385. done
  4386. fi
  4387. w_override_dlls native $dllname
  4388. }
  4389. #----------------------------------------------------------------
  4390. w_metadata d3drm dlls \
  4391. title="MS d3drm.dll" \
  4392. publisher="Microsoft" \
  4393. year="2010" \
  4394. media="download" \
  4395. file1="../directx9/directx_feb2010_redist.exe" \
  4396. installed_file1="$W_SYSTEM32_DLLS_WIN/d3drm.dll"
  4397. load_d3drm()
  4398. {
  4399. helper_directx_dl
  4400. w_try_cabextract -d "$W_TMP" -L -F "dxnt.cab" "$W_CACHE"/directx9/$DIRECTX_NAME
  4401. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F "d3drm.dll" "$W_TMP/dxnt.cab"
  4402. w_override_dlls native d3drm
  4403. }
  4404. #----------------------------------------------------------------
  4405. w_metadata d3dx9 dlls \
  4406. title="MS d3dx9_??.dll from DirectX 9 redistributable" \
  4407. publisher="Microsoft" \
  4408. year="2010" \
  4409. media="download" \
  4410. file1="../directx9/directx_Jun2010_redist.exe" \
  4411. installed_file1="$W_SYSTEM32_DLLS_WIN/d3dx9_43.dll"
  4412. load_d3dx9()
  4413. {
  4414. helper_directx_Jun2010
  4415. # Kinder, less invasive directx - only extract and override d3dx9_??.dll
  4416. w_try_cabextract -d "$W_TMP" -L -F '*d3dx9*x86*' "$W_CACHE"/directx9/$DIRECTX_NAME
  4417. for x in "$W_TMP"/*.cab
  4418. do
  4419. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'd3dx9*.dll' "$x"
  4420. done
  4421. if test "$W_ARCH" = "win64"
  4422. then
  4423. w_try_cabextract -d "$W_TMP" -L -F '*d3dx9*x64*' "$W_CACHE"/directx9/$DIRECTX_NAME
  4424. for x in "$W_TMP"/*x64.cab
  4425. do
  4426. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F 'd3dx9*.dll' "$x"
  4427. done
  4428. fi
  4429. # For now, not needed, but when Wine starts preferring our builtin dll over native it will be.
  4430. w_override_dlls native d3dx9_24 d3dx9_25 d3dx9_26 d3dx9_27 d3dx9_28 d3dx9_29 d3dx9_30
  4431. w_override_dlls native d3dx9_31 d3dx9_32 d3dx9_33 d3dx9_34 d3dx9_35 d3dx9_36 d3dx9_37
  4432. w_override_dlls native d3dx9_38 d3dx9_39 d3dx9_40 d3dx9_41 d3dx9_42 d3dx9_43
  4433. }
  4434. #----------------------------------------------------------------
  4435. w_metadata d3dx9_26 dlls \
  4436. title="MS d3dx9_26.dll" \
  4437. publisher="Microsoft" \
  4438. year="2010" \
  4439. media="download" \
  4440. file1="../directx9/directx_feb2010_redist.exe" \
  4441. installed_file1="$W_SYSTEM32_DLLS_WIN/d3dx9_26.dll"
  4442. load_d3dx9_26()
  4443. {
  4444. helper_d3dx9_xx 26
  4445. }
  4446. #----------------------------------------------------------------
  4447. w_metadata d3dx9_28 dlls \
  4448. title="MS d3dx9_28.dll" \
  4449. publisher="Microsoft" \
  4450. year="2010" \
  4451. media="download" \
  4452. file1="../directx9/directx_feb2010_redist.exe" \
  4453. installed_file1="$W_SYSTEM32_DLLS_WIN/d3dx9_28.dll"
  4454. load_d3dx9_28()
  4455. {
  4456. helper_d3dx9_xx 28
  4457. }
  4458. #----------------------------------------------------------------
  4459. w_metadata d3dx9_31 dlls \
  4460. title="MS d3dx9_31.dll" \
  4461. publisher="Microsoft" \
  4462. year="2010" \
  4463. media="download" \
  4464. file1="../directx9/directx_feb2010_redist.exe" \
  4465. installed_file1="$W_SYSTEM32_DLLS_WIN/d3dx9_31.dll"
  4466. load_d3dx9_31()
  4467. {
  4468. helper_d3dx9_xx 31
  4469. }
  4470. #----------------------------------------------------------------
  4471. w_metadata d3dx9_35 dlls \
  4472. title="MS d3dx9_35.dll" \
  4473. publisher="Microsoft" \
  4474. year="2010" \
  4475. media="download" \
  4476. file1="../directx9/directx_feb2010_redist.exe" \
  4477. installed_file1="$W_SYSTEM32_DLLS_WIN/d3dx9_35.dll"
  4478. load_d3dx9_35()
  4479. {
  4480. helper_d3dx9_xx 35
  4481. }
  4482. #----------------------------------------------------------------
  4483. w_metadata d3dx9_36 dlls \
  4484. title="MS d3dx9_36.dll" \
  4485. publisher="Microsoft" \
  4486. year="2010" \
  4487. media="download" \
  4488. file1="../directx9/directx_feb2010_redist.exe" \
  4489. installed_file1="$W_SYSTEM32_DLLS_WIN/d3dx9_36.dll"
  4490. load_d3dx9_36()
  4491. {
  4492. helper_d3dx9_xx 36
  4493. }
  4494. #----------------------------------------------------------------
  4495. w_metadata d3dx9_39 dlls \
  4496. title="MS d3dx9_39.dll" \
  4497. publisher="Microsoft" \
  4498. year="2010" \
  4499. media="download" \
  4500. file1="../directx9/directx_feb2010_redist.exe" \
  4501. installed_file1="$W_SYSTEM32_DLLS_WIN/d3dx9_39.dll"
  4502. load_d3dx9_39()
  4503. {
  4504. helper_d3dx9_xx 39
  4505. }
  4506. #----------------------------------------------------------------
  4507. w_metadata d3dx9_42 dlls \
  4508. title="MS d3dx9_42.dll" \
  4509. publisher="Microsoft" \
  4510. year="2010" \
  4511. media="download" \
  4512. file1="../directx9/directx_feb2010_redist.exe" \
  4513. installed_file1="$W_SYSTEM32_DLLS_WIN/d3dx9_42.dll"
  4514. load_d3dx9_42()
  4515. {
  4516. helper_d3dx9_xx 42
  4517. }
  4518. #----------------------------------------------------------------
  4519. w_metadata d3dx9_43 dlls \
  4520. title="MS d3dx9_43.dll" \
  4521. publisher="Microsoft" \
  4522. year="2010" \
  4523. media="download" \
  4524. file1="../directx9/directx_Jun2010_redist.exe" \
  4525. installed_file1="$W_SYSTEM32_DLLS_WIN/d3dx9_43.dll"
  4526. load_d3dx9_43()
  4527. {
  4528. dllname=d3dx9_43
  4529. helper_directx_Jun2010
  4530. w_try_cabextract -d "$W_TMP" -L -F "*$dllname*x86*" "$W_CACHE"/directx9/$DIRECTX_NAME
  4531. for x in "$W_TMP"/*.cab
  4532. do
  4533. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F "$dllname.dll" "$x"
  4534. done
  4535. if test "$W_ARCH" = "win64"
  4536. then
  4537. w_try_cabextract -d "$W_TMP" -L -F "*$dllname*x64*" "$W_CACHE"/directx9/$DIRECTX_NAME
  4538. for x in "$W_TMP"/*x64.cab
  4539. do
  4540. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F "$dllname.dll" "$x"
  4541. done
  4542. fi
  4543. w_override_dlls native $dllname
  4544. }
  4545. #----------------------------------------------------------------
  4546. w_metadata d3dx11_42 dlls \
  4547. title="MS d3dx11_42.dll" \
  4548. publisher="Microsoft" \
  4549. year="2010" \
  4550. media="download" \
  4551. file1="../directx9/directx_Jun2010_redist.exe" \
  4552. installed_file1="$W_SYSTEM32_DLLS_WIN/d3dx11_42.dll"
  4553. load_d3dx11_42()
  4554. {
  4555. dllname=d3dx11_42
  4556. helper_directx_Jun2010
  4557. w_try_cabextract -d "$W_TMP" -L -F "*$dllname*x86*" "$W_CACHE"/directx9/$DIRECTX_NAME
  4558. for x in "$W_TMP"/*.cab
  4559. do
  4560. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F "$dllname.dll" "$x"
  4561. done
  4562. if test "$W_ARCH" = "win64"
  4563. then
  4564. w_try_cabextract -d "$W_TMP" -L -F "*$dllname*x64*" "$W_CACHE"/directx9/$DIRECTX_NAME
  4565. for x in "$W_TMP"/*x64.cab
  4566. do
  4567. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F "$dllname.dll" "$x"
  4568. done
  4569. fi
  4570. w_override_dlls native $dllname
  4571. }
  4572. #----------------------------------------------------------------
  4573. w_metadata d3dx11_43 dlls \
  4574. title="MS d3dx11_43.dll" \
  4575. publisher="Microsoft" \
  4576. year="2010" \
  4577. media="download" \
  4578. file1="../directx9/directx_Jun2010_redist.exe" \
  4579. installed_file1="$W_SYSTEM32_DLLS_WIN/d3dx11_43.dll"
  4580. load_d3dx11_43()
  4581. {
  4582. dllname=d3dx11_43
  4583. helper_directx_Jun2010
  4584. w_try_cabextract -d "$W_TMP" -L -F "*$dllname*x86*" "$W_CACHE"/directx9/$DIRECTX_NAME
  4585. for x in "$W_TMP"/*.cab
  4586. do
  4587. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F "$dllname.dll" "$x"
  4588. done
  4589. if test "$W_ARCH" = "win64"
  4590. then
  4591. w_try_cabextract -d "$W_TMP" -L -F "*$dllname*x64*" "$W_CACHE"/directx9/$DIRECTX_NAME
  4592. for x in "$W_TMP"/*x64.cab
  4593. do
  4594. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F "$dllname.dll" "$x"
  4595. done
  4596. fi
  4597. w_override_dlls native $dllname
  4598. }
  4599. #----------------------------------------------------------------
  4600. w_metadata d3dx10 dlls \
  4601. title="MS d3dx10_??.dll from DirectX user redistributable" \
  4602. publisher="Microsoft" \
  4603. year="2010" \
  4604. media="download" \
  4605. file1="../directx9/directx_Jun2010_redist.exe" \
  4606. installed_file1="$W_SYSTEM32_DLLS_WIN/d3dx10_33.dll"
  4607. load_d3dx10()
  4608. {
  4609. helper_directx_Jun2010
  4610. # Kinder, less invasive directx10 - only extract and override d3dx10_??.dll
  4611. w_try_cabextract -d "$W_TMP" -L -F '*d3dx10*x86*' "$W_CACHE"/directx9/$DIRECTX_NAME
  4612. for x in "$W_TMP"/*.cab
  4613. do
  4614. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'd3dx10*.dll' "$x"
  4615. done
  4616. if test "$W_ARCH" = "win64"
  4617. then
  4618. w_try_cabextract -d "$W_TMP" -L -F '*d3dx10*x64*' "$W_CACHE"/directx9/$DIRECTX_NAME
  4619. for x in "$W_TMP"/*x64.cab
  4620. do
  4621. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F 'd3dx10*.dll' "$x"
  4622. done
  4623. fi
  4624. # For now, not needed, but when Wine starts preferring our builtin dll over native it will be.
  4625. w_override_dlls native d3dx10_33 d3dx10_34 d3dx10_35 d3dx10_36 d3dx10_37
  4626. w_override_dlls native d3dx10_38 d3dx10_39 d3dx10_40 d3dx10_41 d3dx10_42 d3dx10_43
  4627. }
  4628. #----------------------------------------------------------------
  4629. w_metadata d3dxof dlls \
  4630. title="MS d3dxof.dll from DirectX user redistributable" \
  4631. publisher="Microsoft" \
  4632. year="2010" \
  4633. media="download" \
  4634. file1="../directx9/directx_feb2010_redist.exe" \
  4635. installed_file1="$W_SYSTEM32_DLLS_WIN/d3dxof.dll"
  4636. load_d3dxof()
  4637. {
  4638. helper_directx_dl
  4639. w_try_cabextract -d "$W_TMP" -L -F 'dxnt.cab' "$W_CACHE"/directx9/$DIRECTX_NAME
  4640. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'd3dxof.dll' "$W_TMP/dxnt.cab"
  4641. w_override_dlls native d3dxof
  4642. }
  4643. #----------------------------------------------------------------
  4644. w_metadata dbghelp dlls \
  4645. title="MS dbghelp" \
  4646. publisher="Microsoft" \
  4647. year="2008" \
  4648. media="download" \
  4649. file1="../xpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  4650. installed_file1="$W_SYSTEM32_DLLS_WIN/dbghelp.dll"
  4651. load_dbghelp()
  4652. {
  4653. helper_xpsp3 i386/dbghelp.dll
  4654. w_try cp -f "$W_TMP"/i386/dbghelp.dll "$W_SYSTEM32_DLLS"
  4655. w_override_dlls native dbghelp
  4656. }
  4657. #----------------------------------------------------------------
  4658. w_metadata devenum dlls \
  4659. title="MS devenum.dll from DirectX user redistributable" \
  4660. publisher="Microsoft" \
  4661. year="2010" \
  4662. media="download" \
  4663. file1="../directx9/directx_feb2010_redist.exe" \
  4664. installed_file1="$W_SYSTEM32_DLLS_WIN/devenum.dll"
  4665. load_devenum()
  4666. {
  4667. helper_directx_dl
  4668. w_try_cabextract -d "$W_TMP" -L -F 'dxnt.cab' "$W_CACHE/directx9/$DIRECTX_NAME"
  4669. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'devenum.dll' "$W_TMP/dxnt.cab"
  4670. w_try_regsvr devenum.dll
  4671. w_override_dlls native devenum
  4672. }
  4673. #----------------------------------------------------------------
  4674. w_metadata dinput dlls \
  4675. title="MS dinput.dll; breaks mouse, use only on Rayman 2 etc." \
  4676. publisher="Microsoft" \
  4677. year="2010" \
  4678. media="download" \
  4679. file1="../directx9/directx_feb2010_redist.exe" \
  4680. installed_file1="$W_SYSTEM32_DLLS_WIN/dinput.dll"
  4681. load_dinput()
  4682. {
  4683. helper_directx_dl
  4684. w_try_cabextract -d "$W_TMP" -L -F 'dxnt.cab' "$W_CACHE"/directx9/$DIRECTX_NAME
  4685. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dinput.dll' "$W_TMP/dxnt.cab"
  4686. w_try_regsvr dinput
  4687. w_override_dlls native dinput
  4688. }
  4689. #----------------------------------------------------------------
  4690. w_metadata dinput8 dlls \
  4691. title="MS DirectInput 8 from DirectX user redistributable" \
  4692. publisher="Microsoft" \
  4693. year="2010" \
  4694. media="download" \
  4695. file1="../directx9/directx_feb2010_redist.exe" \
  4696. installed_file1="$W_SYSTEM32_DLLS_WIN/dinput8.dll"
  4697. load_dinput8()
  4698. {
  4699. helper_directx_dl
  4700. w_try_cabextract -d "$W_TMP" -L -F 'dxnt.cab' "$W_CACHE"/directx9/$DIRECTX_NAME
  4701. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dinput8.dll' "$W_TMP/dxnt.cab"
  4702. w_try_regsvr dinput8
  4703. w_override_dlls native dinput8
  4704. }
  4705. #----------------------------------------------------------------
  4706. w_metadata directmusic dlls \
  4707. title="MS DirectMusic from DirectX user redistributable" \
  4708. publisher="Microsoft" \
  4709. year="2010" \
  4710. media="download" \
  4711. file1="../directx9/directx_feb2010_redist.exe" \
  4712. installed_file1="$W_SYSTEM32_DLLS_WIN/dmusic.dll"
  4713. load_directmusic()
  4714. {
  4715. # Untested. Based off http://bugs.winehq.org/show_bug.cgi?id=4805 and http://bugs.winehq.org/show_bug.cgi?id=24911
  4716. w_call dsound
  4717. helper_directx_dl
  4718. w_try_cabextract -d "$W_TMP" -L -F dxnt.cab "$W_CACHE"/directx9/$DIRECTX_NAME
  4719. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'devenum.dll' "$W_TMP/dxnt.cab"
  4720. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dmband.dll' "$W_TMP/dxnt.cab"
  4721. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dmcompos.dll' "$W_TMP/dxnt.cab"
  4722. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dmime.dll' "$W_TMP/dxnt.cab"
  4723. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dmloader.dll' "$W_TMP/dxnt.cab"
  4724. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dmscript.dll' "$W_TMP/dxnt.cab"
  4725. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dmstyle.dll' "$W_TMP/dxnt.cab"
  4726. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dmsynth.dll' "$W_TMP/dxnt.cab"
  4727. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dmusic.dll' "$W_TMP/dxnt.cab"
  4728. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dmusic32.dll' "$W_TMP/dxnt.cab"
  4729. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dswave.dll' "$W_TMP/dxnt.cab"
  4730. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'streamci.dll' "$W_TMP/dxnt.cab"
  4731. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'quartz.dll' "$W_TMP/dxnt.cab"
  4732. w_try_regsvr devenum.dll
  4733. w_try_regsvr dmband.dll
  4734. w_try_regsvr dmcompos.dll
  4735. w_try_regsvr dmime.dll
  4736. w_try_regsvr dmloader.dll
  4737. w_try_regsvr dmscript.dll
  4738. w_try_regsvr dmstyle.dll
  4739. w_try_regsvr dmsynth.dll
  4740. w_try_regsvr dmusic.dll
  4741. w_try_regsvr dswave.dll
  4742. w_try_regsvr quartz.dll
  4743. w_override_dlls native devenum dmband dmcompos dmime dmloader dmscript dmstyle dmsynth dmusic dmusic32 dswave streamci quartz
  4744. }
  4745. #----------------------------------------------------------------
  4746. w_metadata directplay dlls \
  4747. title="MS DirectPlay from DirectX user redistributable" \
  4748. publisher="Microsoft" \
  4749. year="2010" \
  4750. media="download" \
  4751. file1="../directx9/directx_feb2010_redist.exe" \
  4752. installed_file1="$W_SYSTEM32_DLLS_WIN/dplayx.dll"
  4753. load_directplay()
  4754. {
  4755. helper_directx_dl
  4756. w_try_cabextract -d "$W_TMP" -L -F dxnt.cab "$W_CACHE"/directx9/$DIRECTX_NAME
  4757. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dplaysvr.exe' "$W_TMP/dxnt.cab"
  4758. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dplayx.dll' "$W_TMP/dxnt.cab"
  4759. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dpnet.dll' "$W_TMP/dxnt.cab"
  4760. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dpnhpast.dll' "$W_TMP/dxnt.cab"
  4761. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dpnsvr.exe' "$W_TMP/dxnt.cab"
  4762. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dpwsockx.dll' "$W_TMP/dxnt.cab"
  4763. w_override_dlls native dplayx dpnet dpnhpast dpnsvr.exe dpwsockx
  4764. w_try_regsvr dplayx.dll
  4765. w_try_regsvr dpnet.dll
  4766. w_try_regsvr dpnhpast.dll
  4767. }
  4768. #----------------------------------------------------------------
  4769. w_metadata directx9 dlls \
  4770. title="MS DirectX 9 (Usually overkill. Try d3dx9_36 first)" \
  4771. publisher="Microsoft" \
  4772. year="2010" \
  4773. media="download" \
  4774. file1="directx_feb2010_redist.exe" \
  4775. installed_file1="$W_SYSTEM32_DLLS_WIN/d3dx10_33.dll"
  4776. load_directx9()
  4777. {
  4778. helper_directx_dl
  4779. w_warn "You probably shouldn't be using this. d3dx9 or, better, d3dx9_36 usually suffice."
  4780. # Stefan suggested that, when installing, one should override as follows:
  4781. # 1) use builtin wintrust (we don't run native properly somehow?)
  4782. # 2) disable mscoree (else if it's present some module misbehaves?)
  4783. # 3) override native any directx DLL whose Wine version doesn't register itself well yet
  4784. # For #3, I have no idea which DLLs don't register themselves well yet,
  4785. # so I'm just listing a few of the basic ones. Let's whittle that
  4786. # list down as soon as we can.
  4787. # Setting windows version to win2k apparently crashes the installer on OS X.
  4788. # See http://code.google.com/p/winezeug/issues/detail?id=71
  4789. w_set_winver winxp
  4790. cd "$W_CACHE/$W_PACKAGE"
  4791. WINEDLLOVERRIDES="wintrust=b,mscoree=,ddraw,d3d8,d3d9,dsound,dinput=n" \
  4792. w_try "$WINE" $DIRECTX_NAME /t:"$W_TMP_WIN" $W_UNATTENDED_SLASH_Q
  4793. # How many of these do we really need?
  4794. # We should probably remove most of these...?
  4795. w_override_dlls native d3dim d3drm d3dx8 d3dx9_24 d3dx9_25 d3dx9_26 d3dx9_27 d3dx9_28 d3dx9_29
  4796. w_override_dlls native d3dx9_30 d3dx9_31 d3dx9_32 d3dx9_33 d3dx9_34 d3dx9_35 d3dx9_36 d3dx9_37
  4797. w_override_dlls native d3dx9_38 d3dx9_39 d3dx9_40 d3dx9_41 d3dx9_42 d3dx9_43 d3dxof
  4798. w_override_dlls native dciman32 ddrawex devenum dmband dmcompos dmime dmloader dmscript dmstyle
  4799. w_override_dlls native dmsynth dmusic dmusic32 dnsapi dplay dplayx dpnaddr dpnet dpnhpast dpnlobby
  4800. w_override_dlls native dswave dxdiagn msdmo qcap quartz streamci
  4801. w_override_dlls native dxdiag.exe
  4802. w_override_dlls builtin d3d8 d3d9 dinput dinput8 dsound
  4803. w_try "$WINE" "$W_TMP_WIN"\\DXSETUP.exe $W_UNATTENDED_SLASH_SILENT
  4804. }
  4805. #----------------------------------------------------------------
  4806. w_metadata dpvoice dlls \
  4807. title="Microsoft dpvoice dpvvox dpvacm Audio dlls" \
  4808. publisher="Microsoft" \
  4809. year="2002" \
  4810. media="download" \
  4811. file1="../directx9/directx_feb2010_redist.exe" \
  4812. installed_file1="$W_SYSTEM32_DLLS_WIN/dpvoice.dll" \
  4813. installed_file2="$W_SYSTEM32_DLLS_WIN/dpvvox.dll" \
  4814. installed_file2="$W_SYSTEM32_DLLS_WIN/dpvacm.dll"
  4815. load_dpvoice()
  4816. {
  4817. helper_directx_dl
  4818. w_try_cabextract -d "$W_TMP" -L -F 'dxnt.cab' "$W_CACHE"/directx9/$DIRECTX_NAME
  4819. for x in "$W_TMP"/*.cab
  4820. do
  4821. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dpvoice.dll' "$x"
  4822. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dpvvox.dll' "$x"
  4823. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dpvacm.dll' "$x"
  4824. done
  4825. w_try_regsvr dpvoice.dll
  4826. w_try_regsvr dpvvox.dll
  4827. w_try_regsvr dpvacm.dll
  4828. w_override_dlls native dpvoice
  4829. w_override_dlls native dpvvox
  4830. w_override_dlls native dpvacm
  4831. }
  4832. #----------------------------------------------------------------
  4833. w_metadata dsdmo dlls \
  4834. title="MS dsdmo.dll" \
  4835. publisher="Microsoft" \
  4836. year="2010" \
  4837. media="download" \
  4838. file1="../directx9/directx_feb2010_redist.exe" \
  4839. installed_file1="$W_SYSTEM32_DLLS_WIN/dsdmo.dll"
  4840. load_dsdmo()
  4841. {
  4842. helper_directx_dl
  4843. mkdir "$W_CACHE"/dsdmo # kludge so test -f $file1 works
  4844. w_try_cabextract -d "$W_TMP" -L -F dxnt.cab "$W_CACHE"/directx9/$DIRECTX_NAME
  4845. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dsdmo.dll' "$W_TMP/dxnt.cab"
  4846. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dsdmoprp.dll' "$W_TMP/dxnt.cab"
  4847. w_try_regsvr dsdmo.dll
  4848. w_try_regsvr dsdmoprp.dll
  4849. }
  4850. #----------------------------------------------------------------
  4851. w_metadata dxsdk_nov2006 dlls \
  4852. title="MS DirectX SDK, November 2006 (developers only)" \
  4853. publisher="Microsoft" \
  4854. year="2006" \
  4855. media="download" \
  4856. file1="dxsdk_aug2006.exe" \
  4857. installed_file1="$W_PROGRAMS_X86_WIN/Microsoft DirectX SDK (August 2006)/Lib/x86/d3d10.lib"
  4858. load_dxsdk_nov2006()
  4859. {
  4860. w_download http://download.microsoft.com/download/9/e/5/9e5bfc66-a621-4e0d-8bfe-6688058c3f00/dxsdk_aug2006.exe 1e9cdbef391ebfbf781e6c87a375138d8c195c57
  4861. # dxview.dll uses mfc42u while registering
  4862. w_call mfc42
  4863. w_try_cabextract "$W_CACHE"/dxsdk_nov2006/dxsdk_aug2006.exe
  4864. w_try_unzip "$W_TMP" dxsdk.exe
  4865. cd "$W_TMP"
  4866. w_try "$WINE" msiexec /i Microsoft_DirectX_SDK.msi $W_UNATTENDED_SLASH_Q
  4867. }
  4868. #----------------------------------------------------------------
  4869. w_metadata dxsdk_jun2010 dlls \
  4870. title="MS DirectX SDK, June 2010 (developers only)" \
  4871. publisher="Microsoft" \
  4872. year="2010" \
  4873. media="download" \
  4874. file1="DXSDK_Jun10.exe" \
  4875. installed_file1="$W_PROGRAMS_X86_WIN/Microsoft DirectX SDK (June 2010)/Lib/x86/d3d11.lib"
  4876. load_dxsdk_jun2010()
  4877. {
  4878. w_download http://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe 8fe98c00fde0f524760bb9021f438bd7d9304a69
  4879. # Without dotnet20, install aborts halfway through
  4880. w_call dotnet20
  4881. cd "$W_TMP"
  4882. w_try "$WINE" "$W_CACHE"/dxsdk_jun2010/DXSDK_Jun10.exe ${W_OPT_UNATTENDED:+/U}
  4883. }
  4884. #----------------------------------------------------------------
  4885. w_metadata dmsynth dlls \
  4886. title="MS midi synthesizer from DirectX user redistributable" \
  4887. publisher="Microsoft" \
  4888. year="2010" \
  4889. media="download" \
  4890. file1="../directx9/directx_feb2010_redist.exe" \
  4891. installed_file1="$W_SYSTEM32_DLLS_WIN/dmsynth.dll"
  4892. load_dmsynth()
  4893. {
  4894. helper_directx_dl
  4895. w_try_cabextract -d "$W_TMP" -L -F dxnt.cab "$W_CACHE"/directx9/$DIRECTX_NAME
  4896. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dmsynth.dll' "$W_TMP/dxnt.cab"
  4897. w_try_regsvr dmsynth.dll
  4898. w_override_dlls native dmsynth
  4899. }
  4900. #----------------------------------------------------------------
  4901. w_metadata dotnet11 dlls \
  4902. title="MS .NET 1.1" \
  4903. publisher="Microsoft" \
  4904. year="2003" \
  4905. media="download" \
  4906. conflicts="dotnet20 dotnet20sdk dotnet20sp1 dotnet20sp2 dotnet30 dotnet30sp1 dotnet35 dotnet35sp1 vjrun20" \
  4907. file1="dotnetfx.exe" \
  4908. installed_file1="c:/windows/Microsoft.NET/Framework/v1.1.4322/ndpsetup.ico"
  4909. load_dotnet11()
  4910. {
  4911. if [ $W_ARCH = win64 ]
  4912. then
  4913. w_die "This package does not work on a 64-bit installation"
  4914. fi
  4915. # http://www.microsoft.com/downloads/details.aspx?FamilyId=262D25E3-F589-4842-8157-034D1E7CF3A3
  4916. w_download http://download.microsoft.com/download/a/a/c/aac39226-8825-44ce-90e3-bf8203e74006/dotnetfx.exe 16a354a2207c4c8846b617cbc78f7b7c1856340e
  4917. w_call remove_mono
  4918. w_call corefonts
  4919. w_call fontfix
  4920. w_try cd "$W_CACHE/dotnet11"
  4921. # Use builtin regsvcs.exe to work around https://bugs.winehq.org/show_bug.cgi?id=25120
  4922. if test $W_OPT_UNATTENDED
  4923. then
  4924. WINEDLLOVERRIDES="regsvcs.exe=b" w_ahk_do "
  4925. SetTitleMatchMode, 2
  4926. run, dotnetfx.exe /q /C:\"install /q\"
  4927. Loop
  4928. {
  4929. sleep 1000
  4930. ifwinexist, Fatal error, Failed to delay load library
  4931. {
  4932. WinClose, Fatal error, Failed to delay load library
  4933. continue
  4934. }
  4935. Process, exist, dotnetfx.exe
  4936. dotnet_pid = %ErrorLevel% ; Save the value immediately since ErrorLevel is often changed.
  4937. if dotnet_pid = 0
  4938. {
  4939. break
  4940. }
  4941. }
  4942. "
  4943. else
  4944. WINEDLLOVERRIDES="regsvcs.exe=b" w_try "$WINE" dotnetfx.exe
  4945. fi
  4946. W_NGEN_CMD="w_try $WINE $DRIVE_C/windows/Microsoft.NET/Framework/v1.1.4322/ngen.exe executequeueditems"
  4947. }
  4948. verify_dotnet11()
  4949. {
  4950. w_dotnet_verify dotnet11
  4951. }
  4952. #----------------------------------------------------------------
  4953. w_metadata dotnet11sp1 dlls \
  4954. title="MS .NET 1.1 SP1" \
  4955. publisher="Microsoft" \
  4956. year="2004" \
  4957. media="download" \
  4958. file1="NDP1.1sp1-KB867460-X86.exe" \
  4959. installed_file1="c:/windows/Microsoft.NET/Framework/v1.1.4322/CONFIG/web_hightrust.config.default"
  4960. load_dotnet11sp1()
  4961. {
  4962. w_download http://download.microsoft.com/download/8/b/4/8b4addd8-e957-4dea-bdb8-c4e00af5b94b/NDP1.1sp1-KB867460-X86.exe 74a5b25d65a70b8ecd6a9c301a0aea10d8483a23
  4963. w_call remove_mono
  4964. w_call dotnet11
  4965. w_try cd "$W_CACHE/dotnet11sp1"
  4966. # Use builtin regsvcs.exe to work around http://bugs.winehq.org/show_bug.cgi?id=25120
  4967. if test $W_OPT_UNATTENDED
  4968. then
  4969. WINEDLLOVERRIDES="regsvcs.exe=b" w_ahk_do "
  4970. SetTitleMatchMode, 2
  4971. run, NDP1.1sp1-KB867460-X86.exe /q /C:"install /q"
  4972. Loop
  4973. {
  4974. sleep 1000
  4975. ifwinexist, Fatal error, Failed to delay load library
  4976. {
  4977. WinClose, Fatal error, Failed to delay load library
  4978. continue
  4979. }
  4980. Process, exist, dotnetfx.exe
  4981. dotnet_pid = %ErrorLevel% ; Save the value immediately since ErrorLevel is often changed.
  4982. if dotnet_pid = 0
  4983. {
  4984. break
  4985. }
  4986. }
  4987. "
  4988. else
  4989. WINEDLLOVERRIDES="regsvcs.exe=b" w_try "$WINE" "$W_CACHE"/dotnet11sp1/NDP1.1sp1-KB867460-X86.exe
  4990. fi
  4991. W_NGEN_CMD="w_try $WINE $DRIVE_C/windows/Microsoft.NET/Framework/v1.1.4322/ngen.exe executequeueditems"
  4992. }
  4993. verify_dotnet11sp1()
  4994. {
  4995. w_dotnet_verify dotnet11sp1
  4996. }
  4997. #----------------------------------------------------------------
  4998. w_metadata dotnet20 dlls \
  4999. title="MS .NET 2.0" \
  5000. publisher="Microsoft" \
  5001. year="2006" \
  5002. media="download" \
  5003. conflicts="dotnet11" \
  5004. file1="dotnetfx.exe" \
  5005. installed_file1="c:/windows/Microsoft.NET/Framework/v2.0.50727/Microsoft .NET Framework 2.0/install.exe"
  5006. load_dotnet20()
  5007. {
  5008. # http://www.microsoft.com/downloads/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5
  5009. w_download http://download.lenovo.com/ibmdl/pub/pc/pccbbs/thinkvantage_en/dotnetfx.exe a3625c59d7a2995fb60877b5f5324892a1693b2a
  5010. w_call remove_mono
  5011. w_call fontfix
  5012. # Recipe from http://bugs.winehq.org/show_bug.cgi?id=10467#c57
  5013. # and http://bugs.winehq.org/show_bug.cgi?id=30845#c10
  5014. w_set_winver win2k
  5015. # FIXME: verify on pristine windows XP:
  5016. if w_workaround_wine_bug 34803
  5017. then
  5018. "$WINE" reg delete 'HKLM\Software\Microsoft\.NETFramework\v2.0.50727\SBSDisabled' /f
  5019. fi
  5020. cd "$W_CACHE"/"$W_PACKAGE"
  5021. w_try "$WINE" dotnetfx.exe ${W_OPT_UNATTENDED:+/q /c:"install.exe /q"}
  5022. w_unset_winver
  5023. # We can't stop installing dotnet20 in win2K mode until wine supports
  5024. # reparse/junction points
  5025. # (see http://bugs.winehq.org/show_bug.cgi?id=10467#c57 )
  5026. # so for now just remove the bogus msvc*80.dll files it installs.
  5027. # See also http://bugs.winehq.org/show_bug.cgi?id=16577
  5028. # This affects Victoria 2 demo, see http://forum.paradoxplaza.com/forum/showthread.php?p=11523967
  5029. rm -f "$W_SYSTEM32_DLLS"/msvc?80.dll
  5030. W_NGEN_CMD="w_try $WINE $DRIVE_C/windows/Microsoft.NET/Framework/v2.0.50727/ngen.exe executequeueditems"
  5031. }
  5032. verify_dotnet20()
  5033. {
  5034. w_dotnet_verify dotnet20
  5035. }
  5036. #----------------------------------------------------------------
  5037. w_metadata dotnet20sdk dlls \
  5038. title="MS .NET 2.0 SDK" \
  5039. publisher="Microsoft" \
  5040. year="2006" \
  5041. media="download" \
  5042. conflicts="dotnet11 dotnet20sp1 dotnet20sp2 dotnet30 dotnet40" \
  5043. file1="setup.exe" \
  5044. installed_file1="$W_PROGRAMS_X86_WIN/Microsoft.NET/SDK/v2.0/Bin/cordbg.exe"
  5045. load_dotnet20sdk()
  5046. {
  5047. # http://www.microsoft.com/en-us/download/details.aspx?id=19988
  5048. w_download http://download.microsoft.com/download/c/4/b/c4b15d7d-6f37-4d5a-b9c6-8f07e7d46635/setup.exe 4e4b1072b5e65e855358e2028403f2dc52a62ab4
  5049. w_call remove_mono
  5050. w_call dotnet20
  5051. cd "$W_CACHE/$W_PACKAGE"
  5052. w_ahk_do "
  5053. SetTitleMatchMode, 2
  5054. run, setup.exe ${W_OPT_UNATTENDED:+/q /c:"install.exe /q"}
  5055. Loop
  5056. {
  5057. sleep 1000
  5058. ifwinexist, Microsoft Document Explorer, Application Data folder
  5059. {
  5060. WinClose, Microsoft Document Explorer, Application Data folder
  5061. continue
  5062. }
  5063. ifwinexist, Microsoft CLR Debugger, Application Data folder
  5064. {
  5065. WinClose, Microsoft CLR Debugger, Application Data folder
  5066. continue
  5067. }
  5068. ; FIXME: only appears if dotnet30sp1 is run first?
  5069. ifwinexist, Microsoft .NET Framework 2.0 SDK Setup, This wizard will guide
  5070. {
  5071. ControlClick, Button22, Microsoft .NET Framework 2.0 SDK Setup
  5072. Winwait, Microsoft .NET Framework 2.0 SDK Setup, By clicking
  5073. sleep 100
  5074. ControlClick, Button21
  5075. sleep 100
  5076. ControlClick, Button18
  5077. WinWait, Microsoft .NET Framework 2.0 SDK Setup, Select from
  5078. sleep 100
  5079. ControlClick, Button12
  5080. WinWait, Microsoft .NET Framework 2.0 SDK Setup, Type the path
  5081. sleep 100
  5082. ControlClick, Button8
  5083. WinWait, Microsoft .NET Framework 2.0 SDK Setup, successfully installed
  5084. sleep 100
  5085. ControlClick, Button2
  5086. sleep 100
  5087. }
  5088. Process, exist, setup.exe
  5089. dotnet_pid = %ErrorLevel%
  5090. if dotnet_pid = 0
  5091. {
  5092. break
  5093. }
  5094. }
  5095. "
  5096. }
  5097. #----------------------------------------------------------------
  5098. w_metadata dotnet20sp1 dlls \
  5099. title="MS .NET 2.0 SP1 (experimental)" \
  5100. publisher="Microsoft" \
  5101. year="2008" \
  5102. media="download" \
  5103. conflicts="dotnet11 dotnet20sp2 dotnet35sp1" \
  5104. file1="NetFx20SP1_x86.exe" \
  5105. installed_file1="c:/windows/winsxs/manifests/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5cf844d2.cat"
  5106. load_dotnet20sp1()
  5107. {
  5108. # FIXME: URL?
  5109. w_download http://download.microsoft.com/download/0/8/c/08c19fa4-4c4f-4ffb-9d6c-150906578c9e/NetFx20SP1_x86.exe eef5a36924cdf0c02598ccf96aa4f60887a49840
  5110. w_call remove_mono
  5111. w_call dotnet20
  5112. WINEDLLOVERRIDES=
  5113. w_warn "Setting windows version so installer works"
  5114. # Stop services
  5115. # Recipe from http://bugs.winehq.org/show_bug.cgi?id=16956
  5116. $WINESERVER -k
  5117. # Fight a race condition, see bug 16956 comment 43
  5118. w_set_winver win2k
  5119. $WINESERVER -w
  5120. WINEDLLOVERRIDES=ngen.exe,regsvcs.exe,mscorsvw.exe=b
  5121. export WINEDLLOVERRIDES
  5122. # FIXME: still needed?
  5123. # Workaround Wine/Mono integration:
  5124. "$WINE" reg add "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v2.0.50727" /v Version /t REG_SZ /d "2.0.50727" /f
  5125. cd "$W_CACHE/$W_PACKAGE"
  5126. "$WINE" NetFx20SP1_x86.exe ${W_OPT_UNATTENDED:+/q}
  5127. status=$?
  5128. case $status in
  5129. 0) ;;
  5130. 105) echo "exit status $status - normal, user selected 'restart now'" ;;
  5131. 194) echo "exit status $status - normal, user selected 'restart later'" ;;
  5132. *) w_die "exit status $status - $W_PACKAGE installation failed" ;;
  5133. esac
  5134. # We can't stop installing dotnet20sp1 in win2K mode until wine supports
  5135. # reparse/junction points
  5136. # (see http://bugs.winehq.org/show_bug.cgi?id=10467#c57 )
  5137. # so for now just remove the bogus msvc*80.dll files it installs.
  5138. # See also http://bugs.winehq.org/show_bug.cgi?id=16577
  5139. # This affects Victoria 2 demo, see http://forum.paradoxplaza.com/forum/showthread.php?p=11523967
  5140. rm -f "$W_SYSTEM32_DLLS"/msvc?80.dll
  5141. w_unset_winver
  5142. W_NGEN_CMD="w_try $WINE $DRIVE_C/windows/Microsoft.NET/Framework/v2.0.50727/ngen.exe executequeueditems"
  5143. }
  5144. verify_dotnet20sp1()
  5145. {
  5146. w_dotnet_verify dotnet20sp1
  5147. }
  5148. #----------------------------------------------------------------
  5149. w_metadata dotnet20sp2 dlls \
  5150. title="MS .NET 2.0 SP2 (experimental)" \
  5151. publisher="Microsoft" \
  5152. year="2009" \
  5153. media="download" \
  5154. conflicts="dotnet11" \
  5155. file1="NetFx20SP2_x86.exe" \
  5156. installed_file1="c:/windows/winsxs/manifests/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.3053_x-ww_b80fa8ca.cat"
  5157. load_dotnet20sp2()
  5158. {
  5159. # http://www.microsoft.com/downloads/details.aspx?familyid=5B2C0358-915B-4EB5-9B1D-10E506DA9D0F
  5160. w_download http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe 22d776d4d204863105a5db99e8b8888be23c61a7
  5161. w_call remove_mono
  5162. w_call dotnet20
  5163. # FIXME: verify on pristine windows XP:
  5164. if w_workaround_wine_bug 34803
  5165. then
  5166. "$WINE" reg delete 'HKLM\Software\Microsoft\.NETFramework\v2.0.50727\SBSDisabled' /f
  5167. fi
  5168. cd "$W_CACHE/$W_PACKAGE"
  5169. w_ahk_do "
  5170. SetTitleMatchMode, 2
  5171. run, NetFx20SP2_x86.exe ${W_OPT_UNATTENDED:+ /q /c:"install.exe /q"}
  5172. Loop
  5173. {
  5174. sleep 1000
  5175. ifwinexist,, cannot be uninstalled
  5176. {
  5177. WinClose,, cannot be uninstalled
  5178. continue
  5179. }
  5180. Process, exist, NetFx20SP2_x86.exe
  5181. dotnet_pid = %ErrorLevel%
  5182. if dotnet_pid = 0
  5183. {
  5184. break
  5185. }
  5186. }
  5187. "
  5188. status=$?
  5189. case $status in
  5190. 0) ;;
  5191. 105) echo "exit status $status - normal, user selected 'restart now'" ;;
  5192. 194) echo "exit status $status - normal, user selected 'restart later'" ;;
  5193. *) w_die "exit status $status - $W_PACKAGE installation failed" ;;
  5194. esac
  5195. w_unset_winver
  5196. W_NGEN_CMD="w_try $WINE $DRIVE_C/windows/Microsoft.NET/Framework/v2.0.50727/ngen.exe executequeueditems"
  5197. }
  5198. verify_dotnet20sp2()
  5199. {
  5200. w_dotnet_verify dotnet20sp2
  5201. }
  5202. #----------------------------------------------------------------
  5203. w_metadata dotnet30 dlls \
  5204. title="MS .NET 3.0" \
  5205. publisher="Microsoft" \
  5206. year="2006" \
  5207. media="download" \
  5208. conflicts="dotnet11 dotnet20sp1 dotnet20sp2 dotnet30sp1 dotnet35 dotnet35sp1 dotnet45 dotnet452" \
  5209. file1="dotnetfx3.exe" \
  5210. installed_file1="c:/windows/Microsoft.NET/Framework/v3.0/Microsoft .NET Framework 3.0/logo.bmp"
  5211. load_dotnet30()
  5212. {
  5213. # http://msdn.microsoft.com/en-us/netframework/bb264589.aspx
  5214. w_download http://download.microsoft.com/download/3/F/0/3F0A922C-F239-4B9B-9CB0-DF53621C57D9/dotnetfx3.exe f3d2c3c7e4c0c35450cf6dab1f9f2e9e7ff50039
  5215. w_call remove_mono
  5216. if test -f /proc/sys/kernel/yama/ptrace_scope
  5217. then
  5218. case `cat /proc/sys/kernel/yama/ptrace_scope` in
  5219. 0) ;;
  5220. *) w_warn "If install fails, set /proc/sys/kernel/yama/ptrace_scope to 0. See http://bugs.winehq.org/show_bug.cgi?id=30410" ;;
  5221. esac
  5222. fi
  5223. case "$OS" in
  5224. "Windows_NT")
  5225. osver=`cmd /c ver`
  5226. case "$osver" in
  5227. *Version?6*) w_die "Vista and up bundle .net 3.0, so you can't install it like this" ;;
  5228. esac
  5229. ;;
  5230. esac
  5231. w_call dotnet20
  5232. w_warn "Installing .net 3.0 runtime takes 3 minutes on a very fast machine, and the Finished dialog may hide in the taskbar."
  5233. # AF's workaround to avoid long pause
  5234. LANGPACKS_BASE_PATH="${W_WINDIR_UNIX}/SYSMSICache/Framework/v3.0"
  5235. test -d "${LANGPACKS_BASE_PATH}" || mkdir -p "${LANGPACKS_BASE_PATH}"
  5236. for lang in ar cs da de el es fi fr he it jp ko nb nl pl pt-BR pt-PT ru \
  5237. sv tr zh-CHS zh-CHT
  5238. do
  5239. ln -sf "${W_SYSTEM32_DLLS}/spupdsvc.exe" "${LANGPACKS_BASE_PATH}/dotnetfx3langpack${lang}.exe"
  5240. done
  5241. w_set_winver winxp
  5242. # Delete FontCache 3.0 service, it's in Wine for Mono, breaks native .NET
  5243. # OK if this fails, that just means you have an older wine.
  5244. "$WINE" sc delete "FontCache3.0.0.0"
  5245. WINEDLLOVERRIDES="ngen.exe,mscorsvw.exe=b;$WINEDLLOVERRIDES"
  5246. cd "$W_CACHE/$W_PACKAGE"
  5247. w_try "$WINE" $file1 ${W_OPT_UNATTENDED:+ /q /c:"install.exe /q"}
  5248. # Doesn't install any ngen.exe
  5249. # W_NGEN_CMD=""
  5250. }
  5251. verify_dotnet30()
  5252. {
  5253. w_dotnet_verify dotnet30
  5254. }
  5255. #----------------------------------------------------------------
  5256. w_metadata dotnet30sp1 dlls \
  5257. title="MS .NET 3.0 SP1" \
  5258. publisher="Microsoft" \
  5259. year="2007" \
  5260. media="download" \
  5261. conflicts="dotnet11 dotnet20sdk dotnet20sp1 dotnet20sp2" \
  5262. file1="NetFx30SP1_x86.exe" \
  5263. installed_file1="c:/windows/system32/XpsFilt.dll" # we're cheating a bit here
  5264. load_dotnet30sp1()
  5265. {
  5266. # FIXME: URL?
  5267. w_download http://download.microsoft.com/download/8/F/E/8FEEE89D-9E4F-4BA3-993E-0FFEA8E21E1B/NetFx30SP1_x86.exe 8d779e337920b097aa0c01859912950606e9fc12
  5268. # Recipe from http://bugs.winehq.org/show_bug.cgi?id=25060#c10
  5269. w_download http://download.microsoft.com/download/2/5/2/2526f55d-32bc-410f-be18-164ba67ae07d/XPSEP%20XP%20and%20Server%202003%2032%20bit.msi 5d332ebd1025e294adafe72030fe33db707b2c82 "XPSEP XP and Server 2003 32 bit.msi"
  5270. w_call remove_mono
  5271. w_call dotnet30
  5272. $WINESERVER -w
  5273. w_call dotnet20sp1
  5274. $WINESERVER -w
  5275. cd "$W_CACHE/$W_PACKAGE"
  5276. "$WINE" reg add "HKLM\\Software\\Microsoft\\Net Framework Setup\\NDP\\v3.0" /v Version /t REG_SZ /d "3.0" /f
  5277. "$WINE" reg add "HKLM\\Software\\Microsoft-\\Net Framework Setup\\NDP\\v3.0" /v SP /t REG_DWORD /d 0001 /f
  5278. w_try "$WINE" msiexec /i "XPSEP XP and Server 2003 32 bit.msi" ${W_UNATTENDED_SLASH_QB}
  5279. "$WINE" sc delete FontCache3.0.0.0
  5280. "$WINE" $file1 ${W_OPT_UNATTENDED:+/q}
  5281. status=$?
  5282. w_info $file1 exited with status $status
  5283. # Doesn't install any ngen.exe
  5284. # W_NGEN_CMD=""
  5285. }
  5286. verify_dotnet30sp1()
  5287. {
  5288. w_dotnet_verify dotnet30sp1
  5289. }
  5290. #----------------------------------------------------------------
  5291. w_metadata dotnet35 dlls \
  5292. title="MS .NET 3.5" \
  5293. publisher="Microsoft" \
  5294. year="2007" \
  5295. media="download" \
  5296. conflicts="dotnet11 dotnet20 dotnet20sdk dotnet20sp1 dotnet20sp2" \
  5297. file1="dotnetfx35.exe" \
  5298. installed_file1="c:/windows/Microsoft.NET/Framework/v3.5/MSBuild.exe"
  5299. load_dotnet35()
  5300. {
  5301. case "$OS" in
  5302. "Windows_NT") ;;
  5303. *) w_warn "dotnet35 does not yet fully work or install on wine. Caveat emptor." ;;
  5304. esac
  5305. # http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6
  5306. w_download http://download.microsoft.com/download/6/0/f/60fc5854-3cb8-4892-b6db-bd4f42510f28/dotnetfx35.exe 0a271bb44531aadef902829f98dfad66e4a57586
  5307. w_call remove_mono
  5308. w_call dotnet30sp1
  5309. $WINESERVER -w
  5310. if w_workaround_wine_bug 33450 "Installing msxml3" ,1.5.28
  5311. then
  5312. w_call msxml3
  5313. fi
  5314. "$WINE" reg delete "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v3.5" /f
  5315. # See also http://blogs.msdn.com/astebner/archive/2008/07/17/8745415.aspx
  5316. cd "$W_TMP"
  5317. w_try_cabextract $W_UNATTENDED_DASH_Q "$W_CACHE"/dotnet35/dotnetfx35.exe
  5318. cd wcu/dotNetFramework
  5319. "$WINE" dotNetFx35setup.exe /lang:ENU $W_UNATTENDED_SLASH_Q
  5320. # Doesn't install any ngen.exe
  5321. # W_NGEN_CMD=""
  5322. }
  5323. verify_dotnet35()
  5324. {
  5325. w_dotnet_verify dotnet35
  5326. }
  5327. #----------------------------------------------------------------
  5328. w_metadata dotnet35sp1 dlls \
  5329. title="MS .NET 3.5 SP1" \
  5330. publisher="Microsoft" \
  5331. year="2008" \
  5332. media="download" \
  5333. conflicts="dotnet11 dotnet20sp1 dotnet20sp2" \
  5334. file1="dotnetfx35.exe" \
  5335. installed_file1="c:/windows/Microsoft.NET/Framework/v3.5/Microsoft .NET Framework 3.5 SP1/logo.bmp"
  5336. load_dotnet35sp1()
  5337. {
  5338. case "$OS" in
  5339. "Windows_NT") ;;
  5340. *) w_warn "dotnet35sp1 does not yet fully work or install on wine. Caveat emptor." ;;
  5341. esac
  5342. # http://www.microsoft.com/download/en/details.aspx?id=25150
  5343. w_download http://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe 3dce66bae0dd71284ac7a971baed07030a186918
  5344. w_call remove_mono
  5345. w_call dotnet35
  5346. $WINESERVER -w
  5347. w_call dotnet20sp2
  5348. $WINESERVER -w
  5349. # Work around hang in http://bugs.winehq.org/show_bug.cgi?id=25060#c19
  5350. WINEDLLOVERRIDES=ngen.exe,mscorsvw.exe=b
  5351. export WINEDLLOVERRIDES
  5352. cd "$W_CACHE/$W_PACKAGE"
  5353. w_ahk_do "
  5354. SetTitleMatchMode, 2
  5355. run, dotnetfx35.exe /lang:ENU $W_UNATTENDED_SLASH_Q
  5356. Loop
  5357. {
  5358. sleep 1000
  5359. ifwinexist,, cannot be uninstalled
  5360. {
  5361. WinClose,, cannot be uninstalled
  5362. continue
  5363. }
  5364. Process, exist, dotnetfx35.exe
  5365. dotnet_pid = %ErrorLevel%
  5366. if dotnet_pid = 0
  5367. {
  5368. break
  5369. }
  5370. }
  5371. "
  5372. # Doesn't install any ngen.exe
  5373. # W_NGEN_CMD=""
  5374. }
  5375. verify_dotnet35sp1()
  5376. {
  5377. w_dotnet_verify dotnet35sp1
  5378. }
  5379. #----------------------------------------------------------------
  5380. w_metadata dotnet40 dlls \
  5381. title="MS .NET 4.0" \
  5382. publisher="Microsoft" \
  5383. year="2011" \
  5384. media="download" \
  5385. conflicts="dotnet20sdk" \
  5386. file1="dotNetFx40_Full_x86_x64.exe" \
  5387. installed_file1="c:/windows/Microsoft.NET/Framework/v4.0.30319/ngen.exe"
  5388. load_dotnet40()
  5389. {
  5390. if [ $W_ARCH = win64 ]
  5391. then
  5392. w_die "This package does not work on a 64-bit installation"
  5393. fi
  5394. case "$OS" in
  5395. "Windows_NT") ;;
  5396. *) w_warn "dotnet40 does not yet fully work or install on wine. Caveat emptor." ;;
  5397. esac
  5398. # http://www.microsoft.com/download/en/details.aspx?id=17718
  5399. w_download http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe 58da3d74db353aad03588cbb5cea8234166d8b99
  5400. w_call remove_mono
  5401. # Remove Mono registry entry:
  5402. "$WINE" reg delete "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4" /f
  5403. w_try rm -f "$W_WINDIR_UNIX/system32/mscoree.dll"
  5404. cd "$W_CACHE/$W_PACKAGE"
  5405. WINEDLLOVERRIDES=fusion=b "$WINE" dotNetFx40_Full_x86_x64.exe ${W_OPT_UNATTENDED:+/q /c:"install.exe /q"} || true
  5406. w_override_dlls native mscoree
  5407. "$WINE" reg add "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full" /v Install /t REG_DWORD /d 0001 /f
  5408. "$WINE" reg add "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full" /v Version /t REG_SZ /d "4.0.30319" /f
  5409. W_NGEN_CMD="$WINE $WINEPREFIX/drive_c/windows/Microsoft.NET/Framework/v4.0.30319/ngen.exe executequeueditems"
  5410. }
  5411. verify_dotnet40()
  5412. {
  5413. w_dotnet_verify dotnet40
  5414. }
  5415. #----------------------------------------------------------------
  5416. w_metadata dotnet45 dlls \
  5417. title="MS .NET 4.5" \
  5418. publisher="Microsoft" \
  5419. year="2012" \
  5420. media="download" \
  5421. conflicts="dotnet20 dotnet20sdk dotnet20sp1 dotnet20sp2 dotnet35sp1 dotnet40 vjrun20" \
  5422. file1="dotnetfx45_full_x86_x64.exe" \
  5423. installed_file1="c:/windows/Microsoft.NET/Framework/v4.0.30319/Microsoft.Windows.ApplicationServer.Applications.45.man"
  5424. load_dotnet45()
  5425. {
  5426. if [ $W_ARCH = win64 ]
  5427. then
  5428. w_warn "This package may not work on a 64-bit installation"
  5429. fi
  5430. # http://www.microsoft.com/download/en/details.aspx?id=17718
  5431. w_download http://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe b2ff712ca0947040ca0b8e9bd7436a3c3524bb5d
  5432. w_call remove_mono
  5433. # Remove Mono registry entry:
  5434. "$WINE" reg delete "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4" /f
  5435. w_try rm -f "$W_WINDIR_UNIX/system32/mscoree.dll"
  5436. # See https://appdb.winehq.org/objectManager.php?sClass=version&iId=25478 for Focht's recipe
  5437. w_call dotnet35
  5438. w_call dotnet40
  5439. w_set_winver win7
  5440. cd "$W_CACHE/$W_PACKAGE"
  5441. WINEDLLOVERRIDES=fusion=b "$WINE" dotnetfx45_full_x86_x64.exe ${W_OPT_UNATTENDED:+/q /c:"install.exe /q"}
  5442. status=$?
  5443. case $status in
  5444. 0) ;;
  5445. 105) echo "exit status $status - normal, user selected 'restart now'" ;;
  5446. 194) echo "exit status $status - normal, user selected 'restart later'" ;;
  5447. *) w_die "exit status $status - $W_PACKAGE installation failed" ;;
  5448. esac
  5449. w_override_dlls native mscoree
  5450. w_warn "Setting Windows version to 2003, otherwise applications using .NET 4.5 will subtly fail"
  5451. w_set_winver win2k3
  5452. }
  5453. verify_dotnet45()
  5454. {
  5455. w_dotnet_verify dotnet45
  5456. }
  5457. #----------------------------------------------------------------
  5458. w_metadata dotnet452 dlls \
  5459. title="MS .NET 4.5.2" \
  5460. publisher="Microsoft" \
  5461. year="2012" \
  5462. media="download" \
  5463. conflicts="dotnet20 dotnet20sdk dotnet20sp1 dotnet20sp2 dotnet35sp1 dotnet40 dotnet45 vjrun20" \
  5464. file1="dotnetfx45_full_x86_x64.exe" \
  5465. installed_file1="c:/windows/Microsoft.NET/Framework/v4.0.30319/Microsoft.Windows.ApplicationServer.Applications.45.man"
  5466. load_dotnet452()
  5467. {
  5468. if [ $W_ARCH = win64 ]
  5469. then
  5470. w_warn "This package may not work on a 64-bit installation"
  5471. fi
  5472. # http://www.microsoft.com/download/en/details.aspx?id=17718
  5473. w_download http://download.microsoft.com/download/E/2/1/E21644B5-2DF2-47C2-91BD-63C560427900/NDP452-KB2901907-x86-x64-AllOS-ENU.exe 89f86f9522dc7a8a965facce839abb790a285a63
  5474. w_call remove_mono
  5475. # Remove Mono registry entry:
  5476. "$WINE" reg delete "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4" /f
  5477. w_try rm -f "$W_WINDIR_UNIX/system32/mscoree.dll"
  5478. # See https://appdb.winehq.org/objectManager.php?sClass=version&iId=25478 for Focht's recipe
  5479. w_call dotnet35
  5480. w_call dotnet40
  5481. w_set_winver win7
  5482. cd "$W_CACHE/$W_PACKAGE"
  5483. WINEDLLOVERRIDES=fusion=b "$WINE" NDP452-KB2901907-x86-x64-AllOS-ENU.exe ${W_OPT_UNATTENDED:+/q /c:"install.exe /q"}
  5484. status=$?
  5485. case $status in
  5486. 0) ;;
  5487. 105) echo "exit status $status - normal, user selected 'restart now'" ;;
  5488. 194) echo "exit status $status - normal, user selected 'restart later'" ;;
  5489. *) w_die "exit status $status - $W_PACKAGE installation failed" ;;
  5490. esac
  5491. w_override_dlls native mscoree
  5492. w_warn "Setting Windows version to 2003, otherwise applications using .NET 4.5 will subtly fail"
  5493. w_set_winver win2k3
  5494. }
  5495. verify_dotnet452()
  5496. {
  5497. w_dotnet_verify dotnet452
  5498. }
  5499. #----------------------------------------------------------------
  5500. w_metadata dotnet_verifier dlls \
  5501. title="MS .NET Verifier" \
  5502. publisher="Microsoft" \
  5503. year="2012" \
  5504. media="download" \
  5505. file1="netfx_5F00_setupverifier_5F00_new.zip" \
  5506. installed_file1="$W_SYSTEM32_DLLS_WIN/netfx_setupverifier.exe"
  5507. load_dotnet_verifier()
  5508. {
  5509. # http://blogs.msdn.com/b/astebner/archive/2008/10/13/8999004.aspx
  5510. # 2013/03/28: sha1sum 0eba832a0733cd47b7639463dd5a22a41e95ee6e
  5511. # 2014/01/23: sha1sum 8818f3460826145e2a66bb91727afa7cd531037b
  5512. # 2014/11/22: sha1sum 47de0b849c4c3d354df23588c709108e7816d788
  5513. # 2015/07/31: sha1sum 32f24526a5716737281dc260451b60a641b23c7e
  5514. # 2015/12/27: sha1sum b9712da2943e057668f21f68c473657a205c5cb8
  5515. w_download http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Components-PostAttachments/00-08-99-90-04/netfx_5F00_setupverifier_5F00_new.zip b9712da2943e057668f21f68c473657a205c5cb8
  5516. cd "$W_CACHE/$W_PACKAGE"
  5517. w_try_unzip "$W_SYSTEM32_DLLS" netfx_5F00_setupverifier_5F00_new.zip netfx_setupverifier.exe
  5518. }
  5519. #----------------------------------------------------------------
  5520. w_metadata dxdiagn dlls \
  5521. title="DirectX Diagnostic Library" \
  5522. publisher="Microsoft" \
  5523. year="2010" \
  5524. media="download" \
  5525. file1="../directx9/directx_feb2010_redist.exe" \
  5526. installed_file1="$W_SYSTEM32_DLLS_WIN/dxdiagn.dll"
  5527. load_dxdiagn()
  5528. {
  5529. helper_directx_dl
  5530. w_try_cabextract -d "$W_TMP" -L -F dxnt.cab "$W_CACHE"/directx9/$DIRECTX_NAME
  5531. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F dxdiagn.dll "$W_TMP/dxnt.cab"
  5532. w_override_dlls native dxdiagn
  5533. }
  5534. #----------------------------------------------------------------
  5535. w_metadata dsound dlls \
  5536. title="MS DirectSound from DirectX user redistributable" \
  5537. publisher="Microsoft" \
  5538. year="2010" \
  5539. media="download" \
  5540. file1="../directx9/directx_feb2010_redist.exe" \
  5541. installed_file1="$W_SYSTEM32_DLLS_WIN/dsound.dll"
  5542. load_dsound()
  5543. {
  5544. helper_directx_dl
  5545. w_try_cabextract -d "$W_TMP" -L -F dxnt.cab "$W_CACHE"/directx9/$DIRECTX_NAME
  5546. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'dsound.dll' "$W_TMP/dxnt.cab"
  5547. w_try_regsvr dsound.dll
  5548. w_override_dlls native dsound
  5549. }
  5550. #----------------------------------------------------------------
  5551. w_metadata esent dlls \
  5552. title="MS Extensible Storage Engine" \
  5553. publisher="Microsoft" \
  5554. year="2011" \
  5555. media="download" \
  5556. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  5557. installed_file1="$W_SYSTEM32_DLLS_WIN/esent.dll"
  5558. load_esent()
  5559. {
  5560. helper_win7sp1 x86_microsoft-windows-e..estorageengine-isam_31bf3856ad364e35_6.1.7601.17514_none_f3ebb0cc8a4dd814/esent.dll
  5561. w_try cp "$W_TMP/x86_microsoft-windows-e..estorageengine-isam_31bf3856ad364e35_6.1.7601.17514_none_f3ebb0cc8a4dd814/esent.dll" "$W_SYSTEM32_DLLS/esent.dll"
  5562. w_override_dlls native,builtin esent
  5563. }
  5564. #----------------------------------------------------------------
  5565. # FIXME: update winetricks_is_installed to look at installed_file2..n
  5566. w_metadata flash dlls \
  5567. title="Flash Player 14" \
  5568. publisher="Adobe" \
  5569. year="2014" \
  5570. media="download" \
  5571. file1="install_flash_player.exe" \
  5572. file2="install_flash_player_ax.exe" \
  5573. file3="flashplayer_14_sa.exe" \
  5574. installed_file1="$W_SYSTEM32_DLLS_WIN/Macromed/Flash/FlashUtil32_14_0_0_179_Plugin.exe" \
  5575. installed_file2="$W_SYSTEM32_DLLS_WIN/Macromed/Flash/FlashUtil32_14_0_0_176_ActiveX.exe" \
  5576. installed_file3="$W_SYSTEM32_DLLS_WIN/Macromed/Flash/flashplayer_14_sa.exe" \
  5577. homepage="http://www.adobe.com/products/flashplayer/"
  5578. load_flash()
  5579. {
  5580. # As of July 9, 2013, Flash 10 is no longer supported.
  5581. # And as of June 24, 2013, Flash 10.3 won't even install for me,
  5582. # it tells you to go get a newer version!
  5583. # See
  5584. # http://blogs.adobe.com/psirt/
  5585. # http://get.adobe.com/de/flashplayer/otherversions/
  5586. # Now, we install older versions by using zipfiles at
  5587. # http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html
  5588. # Active X plugin
  5589. # 2013-03-28
  5590. #w_download http://fpdownload.macromedia.com/get/flashplayer/pdc/11.6.602.180/install_flash_player_ax.exe 359f231d7007c17b419f777125e0f28fffc2e6a1
  5591. # 2013-06-24
  5592. # w_download http://fpdownload.macromedia.com/get/flashplayer/pdc/11.7.700.224/install_flash_player_ax.exe fdadce901fc7da7a175f71cc8f1f2dd0db78ec8e
  5593. # 2014-01-21
  5594. #w_download http://fpdownload.macromedia.com/get/flashplayer/pdc/12.0.0.38/install_flash_player_ax.exe 8deb33bcbbbbecfcbcbeb0f861d2c7492599da2b
  5595. # 2014-08-17
  5596. #w_download https://fpdownload.macromedia.com/get/flashplayer/pdc/14.0.0.176/install_flash_player_ax.exe 16231b509d8e689dc34ae36597d41c4fb1b3a67e
  5597. # 2014-10-02
  5598. w_download http://download.macromedia.com/pub/flashplayer/installers/archive/fp_14.0.0.176_archive.zip 40df72ab2c22bcd4442aa35eb586000776129982
  5599. w_try_unzip "$W_TMP" "$W_CACHE"/flash/fp_14.0.0.176_archive.zip fp_14.0.0.176_archive/14_0_r0_176/flashplayer14_0r0_176_winax.exe
  5600. cd "$W_TMP"/fp_14.0.0.176_archive/14_0_r0_176
  5601. w_try "$WINE" flashplayer14_0r0_176_winax.exe ${W_OPT_UNATTENDED:+ /install}
  5602. # Mozilla / Firefox plugin
  5603. # 2013-03-28
  5604. #w_download http://fpdownload.macromedia.com/get/flashplayer/pdc/11.6.602.180/install_flash_player.exe bf44990ade52aa92078495ec39035d8489ff6e05
  5605. # 2013-06-24
  5606. #w_download http://fpdownload.macromedia.com/get/flashplayer/pdc/11.7.700.224/install_flash_player.exe 9c519fd5a7202c43b5713f9f6b083d970810112e
  5607. # 2014-01-21
  5608. #w_download http://fpdownload.macromedia.com/get/flashplayer/pdc/12.0.0.43/install_flash_player.exe 5a68f7aa21c4217cf801a46616fe724d601f773a
  5609. # 2014-08-17
  5610. #w_download https://fpdownload.macromedia.com/get/flashplayer/pdc/14.0.0.179/install_flash_player.exe 1d5725fd0d50eb1361213179ffae9ee24944755a
  5611. # 2014-10-02
  5612. w_download http://download.macromedia.com/pub/flashplayer/installers/archive/fp_14.0.0.179_archive.zip b94860ca0eff3e1420c24f9647a5f9f5e610ce34
  5613. w_try_unzip "$W_TMP" "$W_CACHE"/flash/fp_14.0.0.179_archive.zip fp_14.0.0.179_archive/14_0_r0_179/flashplayer14_0r0_179_win.exe
  5614. cd "$W_TMP"/fp_14.0.0.179_archive/14_0_r0_179
  5615. w_try "$WINE" flashplayer14_0r0_179_win.exe ${W_OPT_UNATTENDED:+ /install}
  5616. # Projector (standalone player)
  5617. # 2015-07-06
  5618. w_download http://download.macromedia.com/pub/flashplayer/updaters/14/flashplayer_14_sa.exe 62e5bc2e88b50091847408b9d473ee4a6c185167
  5619. w_try cp "${W_CACHE}/${W_PACKAGE}/${file3}" "$W_SYSTEM32_DLLS/Macromed/Flash"
  5620. # After updating the above, you should carry the following steps out by
  5621. # hand to verify that plugin works. (Ideally you'd also do it on
  5622. # wine-1.5.6 to make sure the new version still uses vcrun2005 and
  5623. # not something newer.)
  5624. # rm -rf ~/.cache/winetricks/flash
  5625. # cd ~/winetricks/src
  5626. # rm -rf ~/.wine
  5627. # sh winetricks -q flash ie7
  5628. # cd ~/".wine/drive_c/Program Files/Internet Explorer"
  5629. # wine iexplore.exe http://www.adobe.com/software/flash/about
  5630. # Verify that the version of flash shows up and that you're not prompted
  5631. # to install flash again
  5632. #
  5633. # cd ~/winetricks/src
  5634. # rm -rf ~/.wine
  5635. # sh winetricks -q flash firefox
  5636. # cd ~/.wine/drive_c/Program\ Files/Mozilla\ Firefox
  5637. # wine firefox.exe http://www.adobe.com/software/flash/about
  5638. # Verify that the version of flash shows up and that you're not prompted
  5639. # to install flash again
  5640. }
  5641. #----------------------------------------------------------------
  5642. w_metadata gdiplus dlls \
  5643. title="MS GDI+" \
  5644. publisher="Microsoft" \
  5645. year="2011" \
  5646. media="download" \
  5647. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  5648. installed_file1="$W_SYSTEM32_DLLS_WIN/gdiplus.dll"
  5649. load_gdiplus()
  5650. {
  5651. # gdiplus has changed in win7. See http://bugs.winehq.org/show_bug.cgi?id=32163#c3
  5652. helper_win7sp1 x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_72d18a4386696c80/gdiplus.dll
  5653. w_try cp "$W_TMP/x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_72d18a4386696c80/gdiplus.dll" "$W_SYSTEM32_DLLS/gdiplus.dll"
  5654. # For some reason, native,builtin isn't good enough...?
  5655. w_override_dlls native gdiplus
  5656. }
  5657. #----------------------------------------------------------------
  5658. w_metadata gdiplus_winxp dlls \
  5659. title="MS GDI+" \
  5660. publisher="Microsoft" \
  5661. year="2004" \
  5662. media="manual_download" \
  5663. file1="NDP1.0sp2-KB830348-X86-Enu.exe" \
  5664. installed_file1="$W_SYSTEM32_DLLS_WIN/gdiplus.dll"
  5665. load_gdiplus_winxp()
  5666. {
  5667. w_download_manual http://download.cnet.com/NET-Framework-1-0-GDIPLUS-DLL-Security-Update/3000-10250_4-10732223.html NDP1.0sp2-KB830348-X86-Enu.exe 6113cd89d77525958295ccbd73b5fb8b89abd0aa
  5668. cd "$W_CACHE/$W_PACKAGE"
  5669. w_try_cabextract -d "$W_TMP" -F FL_gdiplus_dll_____X86.3643236F_FC70_11D3_A536_0090278A1BB8 "$W_CACHE/${W_PACKAGE}/$file1"
  5670. w_try cp "$W_TMP/FL_gdiplus_dll_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" "$W_SYSTEM32_DLLS/gdiplus.dll"
  5671. # For some reason, native,builtin isn't good enough...?
  5672. w_override_dlls native gdiplus
  5673. }
  5674. #----------------------------------------------------------------
  5675. w_metadata glidewrapper dlls \
  5676. title="GlideWrapper" \
  5677. publisher="Rolf Neuberger" \
  5678. year="2005" \
  5679. media="download" \
  5680. file1="GlideWrapper084c.exe" \
  5681. installed_file1="c:/windows/glide3x.dll"
  5682. load_glidewrapper()
  5683. {
  5684. w_download http://www.zeckensack.de/glide/archive/GlideWrapper084c.exe 7a9d60a18b660473742b476465e9aea7bd5ab6f8
  5685. cd "$W_CACHE/$W_PACKAGE"
  5686. # The installer opens its README in a web-browser, really annoying when doing make check/test:
  5687. # FIXME: maybe we should back up this key first?
  5688. if test ${W_OPT_UNATTENDED}
  5689. then
  5690. cat > "$W_TMP"/disable-browser.reg <<_EOF_
  5691. REGEDIT4
  5692. [HKEY_CURRENT_USER\Software\Wine\WineBrowser]
  5693. "Browsers"=""
  5694. _EOF_
  5695. w_try_regedit "$W_TMP_WIN"\\disable-browser.reg
  5696. fi
  5697. # NSIS installer
  5698. w_try "$WINE" $file1 ${W_OPT_UNATTENDED:+ /S}
  5699. if test ${W_OPT_UNATTENDED}
  5700. then
  5701. "$WINE" reg delete "HKEY_CURRENT_USER\Software\Wine\WineBrowser" /v Browsers /f || true
  5702. fi
  5703. }
  5704. #----------------------------------------------------------------
  5705. w_metadata gfw dlls \
  5706. title="MS Games For Windows Live (xlive.dll)" \
  5707. publisher="Microsoft" \
  5708. year="2008" \
  5709. media="download" \
  5710. file1="gfwlivesetupmin.exe" \
  5711. installed_file1="$W_SYSTEM32_DLLS_WIN/xlive.dll"
  5712. load_gfw()
  5713. {
  5714. # http://www.microsoft.com/games/en-us/live/pages/livejoin.aspx
  5715. # http://www.next-gen.biz/features/should-games-for-windows-live-die
  5716. w_download http://download.microsoft.com/download/5/5/8/55846E20-4A46-4EF8-B272-7F988BC9090A/gfwlivesetupmin.exe 6f9e0ba052c68c8b51bb0e3ce6024d0e1c7b20b2
  5717. # FIXME: Depends on .Net 20, but is it really needed? For now, skip it.
  5718. cd "$W_CACHE/$W_PACKAGE"
  5719. w_try "$WINE" gfwlivesetupmin.exe /nodotnet $W_UNATTENDED_SLASH_Q
  5720. w_call msasn1
  5721. }
  5722. #----------------------------------------------------------------
  5723. w_metadata glut dlls \
  5724. title="The glut utility library for OpenGL" \
  5725. publisher="Mark J. Kilgard" \
  5726. year="2001" \
  5727. media="download" \
  5728. file1="glut-3.7.6-bin.zip" \
  5729. installed_file1="c:/glut-3.7.6-bin/glut32.lib"
  5730. load_glut()
  5731. {
  5732. w_download http://press.liacs.nl/researchdownloads/glut.win32/glut-3.7.6-bin.zip fb4731885c05b3cf2c79e85aabe8fc9949616ef4
  5733. # FreeBSD unzip rm -rf's inside the target dir before extracting:
  5734. w_try_unzip "$W_TMP" "$W_CACHE"/glut/glut-3.7.6-bin.zip
  5735. w_try mv "$W_TMP/glut-3.7.6-bin" "$W_DRIVE_C"
  5736. w_try cp "$W_DRIVE_C"/glut-3.7.6-bin/glut32.dll "$W_SYSTEM32_DLLS"
  5737. w_warn "If you want to compile glut programs, add c:/glut-3.7.6-bin to LIB and INCLUDE"
  5738. }
  5739. #----------------------------------------------------------------
  5740. w_metadata gmdls dlls \
  5741. title="General MIDI DLS Collection" \
  5742. publisher="Microsoft / Roland" \
  5743. year="1999" \
  5744. media="download" \
  5745. file1="../directx8/DX81Redist.exe" \
  5746. installed_file1="$W_SYSTEM32_DLLS_WIN/drivers/gm.dls"
  5747. load_gmdls()
  5748. {
  5749. w_download_to directx8 http://download.microsoft.com/download/whistler/Update/8.1/W982KMeXP/EN-US/DX81Redist.exe ea2345f602741343e97a5ece5d1d2c3cc44296c3
  5750. w_try_unzip "$W_TMP" "$W_CACHE"/directx8/DX81Redist.exe "*/*/DirectX.cab"
  5751. w_try_cabextract -d "$W_TMP" -F gm16.dls "$W_TMP"/*/*/DirectX.cab
  5752. w_try mv "$W_TMP"/gm16.dls "$W_SYSTEM32_DLLS"/drivers/gm.dls
  5753. if test "$W_ARCH" = "win64"
  5754. then
  5755. w_try cd "$W_SYSTEM64_DLLS"/drivers
  5756. w_try ln -s ../../syswow64/drivers/gm.dls
  5757. fi
  5758. }
  5759. #----------------------------------------------------------------
  5760. # um, codecs are kind of clustered here. They probably deserve their own real category.
  5761. w_metadata allcodecs dlls \
  5762. title="All codecs (dirac, ffdshow, icodecs, l3codecx, xvid) except wmp" \
  5763. publisher="various" \
  5764. year="1998-2009" \
  5765. media="download"
  5766. load_allcodecs()
  5767. {
  5768. w_call dirac
  5769. w_call l3codecx
  5770. w_call ffdshow
  5771. w_call icodecs
  5772. w_call xvid
  5773. }
  5774. #----------------------------------------------------------------
  5775. w_metadata dirac dlls \
  5776. title="The Dirac directshow filter v1.0.2" \
  5777. publisher="Dirac" \
  5778. year="2009" \
  5779. media="download" \
  5780. file1="DiracDirectShowFilter-1.0.2.exe" \
  5781. installed_file1="$W_PROGRAMS_X86_WIN/Dirac/DiracDecoder.dll"
  5782. load_dirac()
  5783. {
  5784. w_download $WINETRICKS_SOURCEFORGE/dirac/DiracDirectShowFilter-1.0.2.exe c912d30a8fa500c7841444559feb1f49301611c4
  5785. # Avoid mfc90 not found error. (DiracSplitter-libschroedinger.ax needs mfc90 to register itself, I think.)
  5786. w_call vcrun2008
  5787. cd "$W_CACHE/$W_PACKAGE"
  5788. w_ahk_do "
  5789. SetTitleMatchMode, 2
  5790. run DiracDirectShowFilter-1.0.2.exe
  5791. WinWait, Dirac, Welcome
  5792. if ( w_opt_unattended > 0 ) {
  5793. ControlClick, Button2
  5794. WinWait, Dirac, License
  5795. ControlClick, Button2
  5796. WinWait, Dirac, Location
  5797. ControlClick, Button2
  5798. WinWait, Dirac, Components
  5799. ControlClick, Button2
  5800. WinWait, Dirac, environment
  5801. ControlCLick, Button1
  5802. WinWait, Dirac, installed
  5803. ControlClick, Button2
  5804. }
  5805. WinWaitClose
  5806. "
  5807. }
  5808. #----------------------------------------------------------------
  5809. w_metadata ffdshow dlls \
  5810. title="ffdshow video codecs" \
  5811. publisher="doom9 folks" \
  5812. year="2010" \
  5813. media="download" \
  5814. file1="ffdshow_beta7_rev3154_20091209.exe" \
  5815. installed_file1="$W_PROGRAMS_X86_WIN/ffdshow/ff_liba52.dll" \
  5816. homepage="http://ffdshow-tryout.sourceforge.net"
  5817. load_ffdshow()
  5818. {
  5819. w_download $WINETRICKS_SOURCEFORGE/ffdshow-tryout/ffdshow_beta7_rev3154_20091209.exe 8534c31489e51df70ee9583438d6211e6f0696d0
  5820. cd "$W_CACHE/$W_PACKAGE"
  5821. w_try "$WINE" ffdshow_beta7_rev3154_20091209.exe $W_UNATTENDED_SLASH_SILENT
  5822. }
  5823. #----------------------------------------------------------------
  5824. w_metadata hid dlls \
  5825. title="MS hid" \
  5826. publisher="Microsoft" \
  5827. year="2003" \
  5828. media="download" \
  5829. file1="../win2ksp4/W2KSP4_EN.EXE" \
  5830. installed_file1="$W_SYSTEM32_DLLS_WIN/hid.dll"
  5831. load_hid()
  5832. {
  5833. helper_win2ksp4 i386/hid.dl_
  5834. w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/hid.dl_
  5835. w_override_dlls native hid
  5836. }
  5837. #----------------------------------------------------------------
  5838. w_metadata icodecs dlls \
  5839. title="Indeo codecs" \
  5840. publisher="Intel" \
  5841. year="1998" \
  5842. media="download" \
  5843. file1="codinstl.exe" \
  5844. installed_file1="$W_SYSTEM32_DLLS_WIN/ir50_32.dll"
  5845. load_icodecs()
  5846. {
  5847. # Note: this codec is insecure, see
  5848. # http://support.microsoft.com/kb/954157
  5849. # Original source, ftp://download.intel.com/support/createshare/camerapack/codinstl.exe, had same checksum
  5850. # 2010-11-14: http://codec.alshow.co.kr/Down/codinstl.exe
  5851. # 2014-04-11: http://www.cucusoft.com/codecdownload/codinstl.exe (linked from http://www.cucusoft.com/codec.asp)
  5852. w_download "http://www.cucusoft.com/codecdownload/codinstl.exe" 2c5d64f472abe3f601ce352dcca75b4f02996f8a
  5853. cd "$W_CACHE/$W_PACKAGE"
  5854. w_ahk_do "
  5855. SetTitleMatchMode, 2
  5856. run codinstl.exe
  5857. winwait, Welcome
  5858. if ( w_opt_unattended > 0 ) {
  5859. sleep 1000
  5860. controlclick, Button1 ; Next
  5861. winwait, Software License Agreement
  5862. sleep 1000
  5863. controlclick, Button2 ; Yes
  5864. }
  5865. winwait, Setup Complete
  5866. if ( w_opt_unattended > 0 ) {
  5867. sleep 1000
  5868. controlclick, Button4 ; Finish
  5869. }
  5870. winwaitclose
  5871. "
  5872. # Work around bug in codec's installer?
  5873. # http://support.britannica.com/other/touchthesky/win/issues/TSTUw_150.htm
  5874. # http://appdb.winehq.org/objectManager.php?sClass=version&iId=7091
  5875. w_try_regsvr ir50_32.dll
  5876. }
  5877. #----------------------------------------------------------------
  5878. w_metadata jet40 dlls \
  5879. title="MS Jet 4.0 Service Pack 8" \
  5880. publisher="Microsoft" \
  5881. year="2003" \
  5882. media="download" \
  5883. file1="jet40sp8_9xnt.exe" \
  5884. installed_file1="$W_COMMONFILES_X86_WIN/Microsoft Shared/dao/dao360.dll"
  5885. load_jet40()
  5886. {
  5887. w_call mdac27
  5888. w_call wsh57
  5889. # http://support.microsoft.com/kb/239114
  5890. # See also http://bugs.winehq.org/show_bug.cgi?id=6085
  5891. # FIXME: "failed with error 2"
  5892. w_download http://www.autoxplorer.com/exe/Jet40SP8_9xNT.exe 8cd25342030857969ede2d8fcc34f3f7bcc2d6d4
  5893. cd "$W_CACHE/$W_PACKAGE"
  5894. w_try "$WINE" jet40sp8_9xnt.exe $W_UNATTENDED_SLASH_Q
  5895. }
  5896. #----------------------------------------------------------------
  5897. w_metadata ie8_kb2936068 dlls \
  5898. title="Cumulative Security Update for Internet Explorer 8" \
  5899. publisher="Microsoft" \
  5900. year="2014" \
  5901. media="download" \
  5902. file1="IE8-WindowsXP-KB2936068-x86-ENU.exe" \
  5903. installed_file1="c:/windows/KB2936068-IE8.log"
  5904. load_ie8_kb2936068()
  5905. {
  5906. w_call ie8
  5907. w_download https://download.microsoft.com/download/3/8/C/38CE0ABB-01FD-4C0A-A569-BC5E82C34A17/IE8-WindowsXP-KB2936068-x86-ENU.exe 1bdeb741085b8f1ef6efc83f8615121373107347
  5908. if [ $W_UNATTENDED_SLASH_Q ]
  5909. then
  5910. quiet="$W_UNATTENDED_SLASH_QUIET /forcerestart"
  5911. else
  5912. quiet=""
  5913. fi
  5914. cd "$W_CACHE"/"$W_PACKAGE"
  5915. "$WINE" IE8-WindowsXP-KB2936068-x86-ENU.exe $quiet
  5916. status=$?
  5917. case $status in
  5918. 0|194) ;;
  5919. *) w_die "$W_PACKAGE installation failed"
  5920. esac
  5921. }
  5922. #----------------------------------------------------------------
  5923. w_metadata kde apps \
  5924. title="KDE on Windows" \
  5925. publisher="various" \
  5926. year="2013" \
  5927. media="download" \
  5928. file1="kdewin-installer-gui-1.0.0.exe" \
  5929. installed_exe1="$W_PROGRAMS_WIN/kde/etc/installer.ini" \
  5930. homepage="http://windows.kde.org" \
  5931. unattended="no"
  5932. load_kde()
  5933. {
  5934. w_download http://mirrors.mit.edu/kde/stable/kdewin/installer/kdewin-installer-gui-1.0.0.exe 0d798facb7fbf11529e7ecd067e875d76adb9d78
  5935. mkdir -p "$W_PROGRAMS_UNIX/kde"
  5936. w_try cp "$W_CACHE/kde/${file1}" "$W_PROGRAMS_UNIX/kde"
  5937. cd "$W_PROGRAMS_UNIX/kde"
  5938. # There's no unattended option, probably because there are so many choices,
  5939. # it's like cygwin
  5940. w_try "$WINE" "${file1}"
  5941. }
  5942. #----------------------------------------------------------------
  5943. w_metadata kindle apps \
  5944. title="Amazon Kindle" \
  5945. publisher="Amazon" \
  5946. year="2016" \
  5947. media="download" \
  5948. file1="KindleForPC-installer-1.15.43061.exe" \
  5949. installed_exe1="$W_PROGRAMS_WIN/Amazon/Kindle/Kindle.exe" \
  5950. homepage="http://www.amazon.com/gp/feature.html/?docId=1000426311"
  5951. load_kindle()
  5952. {
  5953. w_download http://kindleforpc.amazon.com/43061/KindleForPC-installer-1.15.43061.exe 27364a6867aac562426494312c2b3f4b673f13e2
  5954. cd "$W_CACHE/$W_PACKAGE"
  5955. w_try "$WINE" $file1 ${W_OPT_UNATTENDED:+ /S}
  5956. if w_workaround_wine_bug 32859
  5957. then
  5958. w_warn "You may need to run with taskset -c 0 to avoid a libX11 crash"
  5959. fi
  5960. }
  5961. #----------------------------------------------------------------
  5962. w_metadata l3codecx dlls \
  5963. title="MPEG Layer-3 Audio Codec for Microsoft DirectShow" \
  5964. publisher="Microsoft" \
  5965. year="2010" \
  5966. media="download" \
  5967. file1="../directx9/directx_feb2010_redist.exe" \
  5968. installed_file1="$W_SYSTEM32_DLLS_WIN/l3codecx.ax"
  5969. load_l3codecx()
  5970. {
  5971. helper_directx_dl
  5972. w_try_cabextract -d "$W_TMP" -L -F dxnt.cab "$W_CACHE"/directx9/$DIRECTX_NAME
  5973. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'l3codecx.ax' "$W_TMP/dxnt.cab"
  5974. w_try_regsvr l3codecx.ax
  5975. }
  5976. #----------------------------------------------------------------
  5977. # FIXME: installed location is
  5978. # $W_PROGRAMS_X86_WIN/Gemeinsame Dateien/System/ADO/msado26.tlb
  5979. # in German... need a variable W_COMMONFILES or something like that
  5980. w_metadata mdac27 dlls \
  5981. title="Microsoft Data Access Components 2.7 sp1" \
  5982. publisher="Microsoft" \
  5983. year="2006" \
  5984. media="download" \
  5985. file1="mdac_typ.exe" \
  5986. installed_file1="$W_COMMONFILES_X86_WIN/System/ADO/msado26.tlb"
  5987. load_mdac27()
  5988. {
  5989. if test $W_ARCH = win64
  5990. then
  5991. w_die "Installer doesn't support 64-bit architecture."
  5992. fi
  5993. # http://www.microsoft.com/downloads/en/details.aspx?FamilyId=9AD000F2-CAE7-493D-B0F3-AE36C570ADE8&displaylang=en
  5994. w_download http://download.microsoft.com/download/3/b/f/3bf74b01-16ba-472d-9a8c-42b2b4fa0d76/mdac_typ.exe f68594d1f578c3b47bf0639c46c11c5da161feee
  5995. load_native_mdac
  5996. w_set_winver nt40
  5997. cd "$W_CACHE"/"$W_PACKAGE"
  5998. w_try "$WINE" mdac_typ.exe ${W_OPT_UNATTENDED:+ /q /C:"setup $W_UNATTENDED_SLASH_QNT"}
  5999. w_unset_winver
  6000. }
  6001. #----------------------------------------------------------------
  6002. w_metadata mdac28 dlls \
  6003. title="Microsoft Data Access Components 2.8 sp1" \
  6004. publisher="Microsoft" \
  6005. year="2005" \
  6006. media="download" \
  6007. file1="MDAC_TYP.EXE" \
  6008. installed_file1="$W_COMMONFILES_X86_WIN/System/ADO/msado27.tlb"
  6009. load_mdac28()
  6010. {
  6011. # http://www.microsoft.com/downloads/en/details.aspx?familyid=78cac895-efc2-4f8e-a9e0-3a1afbd5922e
  6012. w_download http://download.microsoft.com/download/4/a/a/4aafff19-9d21-4d35-ae81-02c48dcbbbff/MDAC_TYP.EXE 4fbc272c79da59e38818924d8575accb0af776fb
  6013. load_native_mdac
  6014. w_set_winver nt40
  6015. cd "$W_CACHE"/"$W_PACKAGE"
  6016. w_try "$WINE" mdac_typ.exe ${W_OPT_UNATTENDED:+ /q /C:"setup $W_UNATTENDED_SLASH_QNT"}
  6017. w_unset_winver
  6018. }
  6019. #----------------------------------------------------------------
  6020. w_metadata mdx dlls \
  6021. title="Managed DirectX" \
  6022. publisher="Microsoft" \
  6023. year="2006" \
  6024. media="download" \
  6025. file1="../directx9/directx_feb2010_redist.exe" \
  6026. installed_file1="C:/windows/assembly/GAC/microsoft.directx/1.0.2902.0__31bf3856ad364e35/microsoft.directx.dll"
  6027. load_mdx()
  6028. {
  6029. helper_directx_dl
  6030. cd "$W_TMP"
  6031. w_try_cabextract -F "*MDX*" "$W_CACHE"/directx9/$DIRECTX_NAME
  6032. w_try_cabextract -F "*.cab" *Archive.cab
  6033. # Install assemblies
  6034. w_try_cabextract -d "$W_WINDIR_UNIX/Microsoft.NET/DirectX for Managed Code/1.0.2902.0" -F "microsoft.directx*" *MDX1_x86.cab
  6035. for file in mdx_*.cab
  6036. do
  6037. ver="${file%%_x86.cab}"
  6038. ver="${ver##mdx_}"
  6039. w_try_cabextract -d "$W_WINDIR_UNIX/Microsoft.NET/DirectX for Managed Code/$ver" -F "microsoft.directx*" "$file"
  6040. done
  6041. w_try_cabextract -d "$W_WINDIR_UNIX/Microsoft.NET/DirectX for Managed Code/1.0.2911.0" -F "microsoft.directx.direct3dx*" *MDX1_x86.cab
  6042. # Add them to GAC
  6043. cd "$W_WINDIR_UNIX/Microsoft.NET/DirectX for Managed Code"
  6044. for ver in *
  6045. do
  6046. cd "$ver"
  6047. for asm in *.dll
  6048. do
  6049. name="${asm%%.dll}"
  6050. w_try mkdir -p "$W_WINDIR_UNIX/assembly/GAC/$name/${ver}__31bf3856ad364e35"
  6051. w_try cp "$asm" "$W_WINDIR_UNIX/assembly/GAC/$name/${ver}__31bf3856ad364e35"
  6052. done
  6053. cd -
  6054. done
  6055. # AssemblyFolders
  6056. cat > "$W_TMP"/asmfolders.reg <<_EOF_
  6057. REGEDIT4
  6058. [HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders\DX_1.0.2902.0]
  6059. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2902.0\\\\"
  6060. [HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders\DX_1.0.2903.0]
  6061. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2903.0\\\\"
  6062. [HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders\DX_1.0.2904.0]
  6063. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2904.0\\\\"
  6064. [HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders\DX_1.0.2905.0]
  6065. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2905.0\\\\"
  6066. [HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders\DX_1.0.2906.0]
  6067. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2906.0\\\\"
  6068. [HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders\DX_1.0.2907.0]
  6069. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2907.0\\\\"
  6070. [HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders\DX_1.0.2908.0]
  6071. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2908.0\\\\"
  6072. [HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders\DX_1.0.2909.0]
  6073. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2909.0\\\\"
  6074. [HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders\DX_1.0.2910.0]
  6075. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2910.0\\\\"
  6076. [HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\AssemblyFolders\DX_1.0.2911.0]
  6077. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2911.0\\\\"
  6078. _EOF_
  6079. w_try_regedit "$W_TMP_WIN"\\asmfolders.reg
  6080. }
  6081. #----------------------------------------------------------------
  6082. w_metadata mf dlls \
  6083. title="MS Media Foundation" \
  6084. publisher="Microsoft" \
  6085. year="2011" \
  6086. media="download" \
  6087. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  6088. installed_file1="$W_SYSTEM32_DLLS_WIN/mf.dll"
  6089. load_mf()
  6090. {
  6091. helper_win7sp1 x86_microsoft-windows-mediafoundation_31bf3856ad364e35_6.1.7601.17514_none_9e6699276b03c38e/mf.dll
  6092. w_try cp "$W_TMP/x86_microsoft-windows-mediafoundation_31bf3856ad364e35_6.1.7601.17514_none_9e6699276b03c38e/mf.dll" "$W_SYSTEM32_DLLS/mf.dll"
  6093. w_override_dlls native,builtin mf
  6094. }
  6095. #----------------------------------------------------------------
  6096. w_metadata mfc40 dlls \
  6097. title="MS mfc40 (Microsoft Foundation Classes from Visual C++ 4.0)" \
  6098. publisher="Microsoft" \
  6099. year="1999" \
  6100. media="download" \
  6101. file1="mfc40.cab" \
  6102. installed_file1="$W_SYSTEM32_DLLS_WIN/mfc40.dll"
  6103. load_mfc40()
  6104. {
  6105. w_download http://activex.microsoft.com/controls/vc/mfc40.cab 53c570e2c811674d6e4fa46cff5a3a04cd0ffc24
  6106. w_try_cabextract -d "$W_TMP" "$W_CACHE"/mfc40/mfc40.cab
  6107. w_try_cabextract -d "$W_SYSTEM32_DLLS" -F *40.dll "$W_TMP"/mfc40.exe
  6108. }
  6109. #----------------------------------------------------------------
  6110. w_metadata mozillabuild apps \
  6111. title="Mozilla build environment" \
  6112. publisher="The Mozilla Foundation" \
  6113. year="2015" \
  6114. media="download" \
  6115. file1="MozillaBuildSetup-2.0.0.exe" \
  6116. installed_file1="c:/mozilla-build/moztools/bin/nsinstall.exe" \
  6117. homepage="https://wiki.mozilla.org/MozillaBuild"
  6118. load_mozillabuild()
  6119. {
  6120. w_download http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-2.0.0.exe daba4bc03ae9014c68611fd36b05dcc4083c6fdb
  6121. cd "$W_CACHE/$W_PACKAGE"
  6122. w_try "$WINE" MozillaBuildSetup-2.0.0.exe $W_UNATTENDED_SLASH_S
  6123. }
  6124. #----------------------------------------------------------------
  6125. w_metadata msacm32 dlls \
  6126. title="MS ACM32" \
  6127. publisher="Microsoft" \
  6128. year="2003" \
  6129. media="download" \
  6130. file1="../xpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  6131. installed_file1="$W_SYSTEM32_DLLS_WIN/msacm32.dll"
  6132. load_msacm32()
  6133. {
  6134. helper_xpsp3 i386/msacm32.dl_
  6135. w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/msacm32.dl_
  6136. w_override_dlls native,builtin msacm32
  6137. }
  6138. #----------------------------------------------------------------
  6139. w_metadata msasn1 dlls \
  6140. title="MS ASN1" \
  6141. publisher="Microsoft" \
  6142. year="2003" \
  6143. media="download" \
  6144. file1="../win2ksp4/W2KSP4_EN.EXE" \
  6145. installed_file1="$W_SYSTEM32_DLLS_WIN/msasn1.dll"
  6146. load_msasn1()
  6147. {
  6148. helper_win2ksp4 i386/msasn1.dl_
  6149. w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/msasn1.dl_
  6150. }
  6151. #----------------------------------------------------------------
  6152. w_metadata msctf dlls \
  6153. title="MS Text Service Module" \
  6154. publisher="Microsoft" \
  6155. year="2003" \
  6156. media="download" \
  6157. file1="../xpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  6158. installed_file1="$W_SYSTEM32_DLLS_WIN/msctf.dll"
  6159. load_msctf()
  6160. {
  6161. helper_xpsp3 i386/msctf.dl_
  6162. w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/msctf.dl_
  6163. w_override_dlls native,builtin msctf
  6164. }
  6165. #----------------------------------------------------------------
  6166. w_metadata msdxmocx dlls \
  6167. title="MS Windows Media Player 2 ActiveX control for VB6" \
  6168. publisher="Microsoft" \
  6169. year="1999" \
  6170. media="download" \
  6171. file1="mpfull.exe" \
  6172. installed_file1="$W_SYSTEM32_DLLS_WIN/msdxm.ocx"
  6173. load_msdxmocx()
  6174. {
  6175. # Previously at http://www.oldapps.com/windows_media_player.php?old_windows_media_player=3?download
  6176. # (2015/12/01) Iceweasel gave a security warning (!), but clamscan and virustotal.com report it as clean
  6177. #
  6178. # (2016/02/18) Since then, oldapps.com removed it. It's on a Finnish mirror, where it's been since 2001/10/20
  6179. # Found using http://www.filewatcher.com/m/mpfull.exe.3593680-0.html
  6180. # The sha1sum is different. Perhaps Iceweasel was right. This one is also clean according to clamscan/virustotal.com
  6181. w_download ftp://www.define.fi/Pub/Fixes/Microsoft/Windows%2095/mpfull.exe 99691df6ac455233230faac7514bdea781ba0ce3
  6182. w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_CACHE/$W_PACKAGE/${file1}"
  6183. w_try_regsvr msdxm.ocx
  6184. }
  6185. #----------------------------------------------------------------
  6186. w_metadata msflxgrd dlls \
  6187. title="MS FlexGrid Control (msflxgrd.ocx)" \
  6188. publisher="Microsoft" \
  6189. year="2009" \
  6190. media="download" \
  6191. file1="MsFlxGrd.cab" \
  6192. installed_file1="$W_SYSTEM32_DLLS_WIN/MSFLXGRD.OCX"
  6193. load_msflxgrd()
  6194. {
  6195. # http://msdn.microsoft.com/en-us/library/aa240864(VS.60).aspx
  6196. # may 2011: f497c3b390cd80d5bcd1f13d5c0c68b206369aa7
  6197. # 2015/11/09: Removed from Microsoft.com, archive.org has an older copy:
  6198. # 2015/11/09: 3d6c04e923781d4ce0d3ab62189b8de352ab25d5
  6199. w_download http://activex.microsoft.com/controls/vb6/MsFlxGrd.cab 3d6c04e923781d4ce0d3ab62189b8de352ab25d5
  6200. w_try_cabextract --directory="$W_TMP" "$W_CACHE"/msflxgrd/${file1}
  6201. w_try cp -f "$W_TMP"/[Mm][Ss][Ff][Ll][Xx][Gg][Rr][Dd].[Oo][Cc][Xx] "$W_SYSTEM32_DLLS"
  6202. w_try_regsvr MSFLXGRD.OCX
  6203. }
  6204. #----------------------------------------------------------------
  6205. w_metadata mshflxgd dlls \
  6206. title="MS Hierarchical FlexGrid Control (mshflxgd.ocx)" \
  6207. publisher="Microsoft" \
  6208. year="2009" \
  6209. media="download" \
  6210. file1="MSHFLXGD.CAB" \
  6211. installed_file1="$W_SYSTEM32_DLLS_WIN/MSHFLXGD.OCX"
  6212. load_mshflxgd()
  6213. {
  6214. # http://msdn.microsoft.com/en-us/library/aa240864(VS.60).aspx
  6215. # orig: 5f9c7a81022949bfe39b50f2bbd799c448bb7377
  6216. # Jan 2009: 7ad74e589d5eefcee67fa14e65417281d237a6b6
  6217. # May 2009: bd8aa796e16e5f213414af78931e0379d9cbe292
  6218. # 2015/11/09: Removed from Microsoft.com, archive.org has the original copy:
  6219. # 2015/11/09: 5f9c7a81022949bfe39b50f2bbd799c448bb7377
  6220. w_download http://activex.microsoft.com/controls/vb6/MSHFLXGD.CAB 5f9c7a81022949bfe39b50f2bbd799c448bb7377
  6221. w_try_cabextract --directory="$W_TMP" "$W_CACHE"/mshflxgd/MSHFLXGD.CAB
  6222. w_try cp -f "$W_TMP"/[Mm][Ss][Hh][Ff][Ll][Xx][Gg][Dd].[Oo][Cc][Xx] "$W_SYSTEM32_DLLS"
  6223. w_try_regsvr MSHFLXGD.OCX
  6224. }
  6225. #----------------------------------------------------------------
  6226. w_metadata mspatcha dlls \
  6227. title="MS mspatcha" \
  6228. publisher="Microsoft" \
  6229. year="2004" \
  6230. media="download" \
  6231. file1="../win2ksp4/W2KSP4_EN.EXE" \
  6232. installed_exe1="$W_SYSTEM32_DLLS_WIN/mspatcha.dll"
  6233. load_mspatcha()
  6234. {
  6235. helper_win2ksp4 i386/mspatcha.dl_
  6236. w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/mspatcha.dl_
  6237. w_override_dlls native,builtin mspatcha
  6238. }
  6239. #----------------------------------------------------------------
  6240. w_metadata msscript dlls \
  6241. title="MS Windows Script Control" \
  6242. publisher="Microsoft" \
  6243. year="2004" \
  6244. media="download" \
  6245. file1="sct10en.exe" \
  6246. installed_file1="$W_SYSTEM32_DLLS_WIN/msscript.ocx"
  6247. load_msscript()
  6248. {
  6249. # http://msdn.microsoft.com/scripting/scriptcontrol/x86/sct10en.exe
  6250. # http://www.microsoft.com/downloads/details.aspx?familyid=d7e31492-2595-49e6-8c02-1426fec693ac
  6251. w_download http://download.microsoft.com/download/d/2/a/d2a7430c-6d5b-48e9-96c4-3c751be7bffe/sct10en.exe fd9f2f23357ab11ae70682d6864f7e9f188adf2a
  6252. w_try_cabextract --directory="$W_TMP" "$W_CACHE"/msscript/sct10en.exe
  6253. w_try cp -f "$W_TMP"/msscript.ocx "$W_SYSTEM32_DLLS"
  6254. w_try_regsvr msscript.ocx
  6255. }
  6256. #----------------------------------------------------------------
  6257. w_metadata msls31 dlls \
  6258. title="MS Line Services" \
  6259. publisher="Microsoft" \
  6260. year="2001" \
  6261. media="download" \
  6262. file1="InstMsiW.exe" \
  6263. installed_file1="$W_SYSTEM32_DLLS_WIN/msls31.dll"
  6264. load_msls31()
  6265. {
  6266. # Needed by native richedit and internet explorer
  6267. w_download http://download.microsoft.com/download/WindowsInstaller/Install/2.0/NT45/EN-US/InstMsiW.exe 4fc3bf0dc96b5cf5ab26430fac1c33c5c50bd142
  6268. w_try_cabextract --directory="$W_TMP" "$W_CACHE"/msls31/InstMsiW.exe
  6269. w_try cp -f "$W_TMP"/msls31.dll "$W_SYSTEM32_DLLS"
  6270. }
  6271. #----------------------------------------------------------------
  6272. w_metadata msmask dlls \
  6273. title="MS Masked Edit Control" \
  6274. publisher="Microsoft" \
  6275. year="2009" \
  6276. media="download" \
  6277. file1="MSMASK32.CAB" \
  6278. installed_file1="$W_SYSTEM32_DLLS_WIN/msmask32.ocx"
  6279. load_msmask()
  6280. {
  6281. # http://msdn.microsoft.com/en-us/library/11405hcf(VS.71).aspx
  6282. # http://bugs.winehq.org/show_bug.cgi?id=2934
  6283. # old: 3c6b26f68053364ea2e09414b615dbebafb9d5c3
  6284. # May 2009: 30e55679e4a13fe4d9620404476f215f93239292
  6285. # 2015/11/09: Removed from Microsoft.com, archive.org has an older copy:
  6286. # 2015/11/09: bdd2bb3a32d18926a048f302aff18b1e6d250d9d
  6287. w_download http://activex.microsoft.com/controls/vb6/MSMASK32.CAB bdd2bb3a32d18926a048f302aff18b1e6d250d9d
  6288. w_try_cabextract --directory="$W_TMP" "$W_CACHE"/msmask/MSMASK32.CAB
  6289. w_try cp -f "$W_TMP"/[Mm][Ss][Mm][Aa][Ss][Kk]32.[Oo][Cc][Xx] "$W_SYSTEM32_DLLS"/msmask32.ocx
  6290. w_try_regsvr msmask32.ocx
  6291. }
  6292. #----------------------------------------------------------------
  6293. w_metadata msftedit dlls \
  6294. title="Microsoft RichEdit Control" \
  6295. publisher="Microsoft" \
  6296. year="2011" \
  6297. media="download" \
  6298. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  6299. installed_file1="$W_SYSTEM32_DLLS_WIN/msftedit.dll"
  6300. load_msftedit()
  6301. {
  6302. helper_win7sp1 x86_microsoft-windows-msftedit_31bf3856ad364e35_6.1.7601.17514_none_d7d862f19573a5ff/msftedit.dll
  6303. w_try cp "$W_TMP/x86_microsoft-windows-msftedit_31bf3856ad364e35_6.1.7601.17514_none_d7d862f19573a5ff/msftedit.dll" "$W_SYSTEM32_DLLS/msftedit.dll"
  6304. w_override_dlls native,builtin mstfedit
  6305. }
  6306. #----------------------------------------------------------------
  6307. w_metadata msxml3 dlls \
  6308. title="MS XML Core Services 3.0" \
  6309. publisher="Microsoft" \
  6310. year="2005" \
  6311. media="download" \
  6312. file1="msxml3.msi" \
  6313. installed_file1="$W_SYSTEM32_DLLS_WIN/msxml3.dll"
  6314. load_msxml3()
  6315. {
  6316. # Service Pack 5
  6317. #w_download http://download.microsoft.com/download/a/5/e/a5e03798-2454-4d4b-89a3-4a47579891d8/msxml3.msi
  6318. # Service Pack 7
  6319. w_download http://download.microsoft.com/download/8/8/8/888f34b7-4f54-4f06-8dac-fa29b19f33dd/msxml3.msi d4c2178dfb807e1a0267fce0fd06b8d51106d913
  6320. # it won't install on top of wine's msxml3, which has a pretty high version number, so delete wine's fake dll
  6321. rm "$W_SYSTEM32_DLLS"/msxml3.dll
  6322. w_override_dlls native msxml3
  6323. cd "$W_CACHE/$W_PACKAGE"
  6324. w_try "$WINE" msiexec /i msxml3.msi $W_UNATTENDED_SLASH_Q
  6325. }
  6326. #----------------------------------------------------------------
  6327. w_metadata msxml4 dlls \
  6328. title="MS XML Core Services 4.0" \
  6329. publisher="Microsoft" \
  6330. year="2009" \
  6331. media="download" \
  6332. file1="msxml.msi" \
  6333. installed_file1="$W_SYSTEM32_DLLS_WIN/msxml4.dll"
  6334. load_msxml4()
  6335. {
  6336. # MS06-071: http://www.microsoft.com/downloads/details.aspx?familyid=24B7D141-6CDF-4FC4-A91B-6F18FE6921D4
  6337. # w_download http://download.microsoft.com/download/e/2/e/e2e92e52-210b-4774-8cd9-3a7a0130141d/msxml4-KB927978-enu.exe d364f9fe80c3965e79f6f64609fc253dfeb69c25
  6338. # MS07-042: http://www.microsoft.com/downloads/details.aspx?FamilyId=021E12F5-CB46-43DF-A2B8-185639BA2807
  6339. # w_download http://download.microsoft.com/download/9/4/2/9422e6b6-08ee-49cb-9f05-6c6ee755389e/msxml4-KB936181-enu.exe 73d75d7b41f8a3d49f272e74d4f73bb5e82f1acf
  6340. # SP3 (2009): http://www.microsoft.com/downloads/details.aspx?familyid=7F6C0CB4-7A5E-4790-A7CF-9E139E6819C0
  6341. w_download http://download.microsoft.com/download/A/2/D/A2D8587D-0027-4217-9DAD-38AFDB0A177E/msxml.msi aa70c5c1a7a069af824947bcda1d9893a895318b
  6342. w_override_dlls native,builtin msxml4
  6343. cd "$W_CACHE/$W_PACKAGE"
  6344. w_try "$WINE" msiexec /i msxml.msi $W_UNATTENDED_SLASH_Q
  6345. }
  6346. #----------------------------------------------------------------
  6347. w_metadata msxml6 dlls \
  6348. title="MS XML Core Services 6.0 sp1" \
  6349. publisher="Microsoft" \
  6350. year="2007" \
  6351. media="download" \
  6352. file1="msxml6_x86.msi" \
  6353. installed_file1="$W_SYSTEM32_DLLS_WIN/msxml6.dll"
  6354. load_msxml6()
  6355. {
  6356. # Service Pack 1
  6357. # http://www.microsoft.com/downloads/details.aspx?familyid=D21C292C-368B-4CE1-9DAB-3E9827B70604
  6358. if [ $W_ARCH = win64 ]
  6359. then
  6360. w_download http://download.microsoft.com/download/e/a/f/eafb8ee7-667d-4e30-bb39-4694b5b3006f/msxml6_x64.msi ca0c0814a9c7024583edb997296aad7cb0a3cbf7
  6361. else
  6362. w_download http://download.microsoft.com/download/e/a/f/eafb8ee7-667d-4e30-bb39-4694b5b3006f/msxml6_x86.msi 5125220e985b33c946bbf9f60e2b222c7570bfa2
  6363. fi
  6364. w_override_dlls native,builtin msxml6
  6365. rm -f "$W_SYSTEM32_DLLS/msxml6.dll"
  6366. if [ $W_ARCH = win64 ]
  6367. then
  6368. rm -f "$W_SYSTEM64_DLLS/msxml6.dll"
  6369. w_try_msiexec64 /i "$W_CACHE"/msxml6/msxml6_x64.msi
  6370. else
  6371. w_try "$WINE" msiexec /i "$W_CACHE"/msxml6/msxml6_x86.msi $W_UNATTENDED_SLASH_Q
  6372. fi
  6373. }
  6374. #----------------------------------------------------------------
  6375. w_metadata nuget dlls \
  6376. title="NuGet Package manager" \
  6377. publisher="Outercurve Foundation" \
  6378. year="2013" \
  6379. media="download" \
  6380. file1="nuget.exe" \
  6381. installed_file1="$W_SYSTEM32_DLLS_WIN/nuget.exe" \
  6382. homepage="https://nuget.org"
  6383. load_nuget()
  6384. {
  6385. w_call dotnet40
  6386. # 2014-01-22: d4082afc4f89df195fa1e83ee1cf02bce3dd2f13
  6387. # 2014-02-26: 9bc98ced9c2d2b51ab687f86b5580913c025b8b0
  6388. # 2014-04-17: 3210cc9a2e575384d59b0604c892bccce760e9b6
  6389. # probably changes too rapidly to check
  6390. w_download https://nuget.org/nuget.exe
  6391. w_try cp "$W_CACHE/$W_PACKAGE"/nuget.exe "$W_SYSTEM32_DLLS"
  6392. w_warn "To run nuget, use the commandline \"$WINE nuget\"."
  6393. }
  6394. #----------------------------------------------------------------
  6395. w_metadata ogg dlls \
  6396. title="OpenCodecs 0.85: flac, speex, theora, vorbis, WebM" \
  6397. publisher="xiph.org" \
  6398. year="2011" \
  6399. media="download" \
  6400. file1="opencodecs_0.85.17777.exe" \
  6401. installed_file1="$W_PROGRAMS_X86_WIN/Xiph.Org/Open Codecs/AxPlayer.dll" \
  6402. homepage="http://xiph.org/dshow"
  6403. load_ogg()
  6404. {
  6405. w_download http://downloads.xiph.org/releases/oggdsf/opencodecs_0.85.17777.exe 386cf7cd29ffcbf8705eff8c8233de448ecf33ab
  6406. cd "$W_CACHE/$W_PACKAGE"
  6407. w_try "$WINE" $file1 $W_UNATTENDED_SLASH_S
  6408. }
  6409. #----------------------------------------------------------------
  6410. w_metadata ollydbg110 apps \
  6411. title="OllyDbg" \
  6412. publisher="ollydbg.de" \
  6413. year="2004" \
  6414. media="download" \
  6415. file1="odbg110.zip" \
  6416. installed_file1="c:/ollydbg110/OLLYDBG.EXE" \
  6417. homepage="http://ollydbg.de"
  6418. load_ollydbg110()
  6419. {
  6420. # the graphical user interface is unreadable without having corefonts installed
  6421. w_call corefonts
  6422. w_download http://www.ollydbg.de/odbg110.zip 8403d8049a0841887c16cf64889596ad52b84da8
  6423. w_try_unzip "$W_DRIVE_C/ollydbg110" "$W_CACHE/$W_PACKAGE"/odbg110.zip
  6424. }
  6425. #----------------------------------------------------------------
  6426. w_metadata ollydbg200 apps \
  6427. title="OllyDbg" \
  6428. publisher="ollydbg.de" \
  6429. year="2010" \
  6430. media="download" \
  6431. file1="odbg200.zip" \
  6432. installed_file1="c:/ollydbg200/ollydbg.exe" \
  6433. homepage="http://ollydbg.de"
  6434. load_ollydbg200()
  6435. {
  6436. # the graphical user interface is unreadable without having corefonts installed
  6437. w_call corefonts
  6438. w_download http://www.ollydbg.de/odbg200.zip 68e572d94a0555e8f14516b55b6b96b879900fe9
  6439. w_try_unzip "$W_DRIVE_C/ollydbg200" "$W_CACHE/$W_PACKAGE"/odbg200.zip
  6440. }
  6441. #----------------------------------------------------------------
  6442. w_metadata ollydbg201 apps \
  6443. title="OllyDbg" \
  6444. publisher="ollydbg.de" \
  6445. year="2013" \
  6446. media="download" \
  6447. file1="odbg201.zip" \
  6448. installed_file1="c:/ollydbg201/ollydbg.exe" \
  6449. homepage="http://ollydbg.de"
  6450. load_ollydbg201()
  6451. {
  6452. # the graphical user interface is unreadable without having corefonts installed
  6453. w_call corefonts
  6454. w_download http://www.ollydbg.de/odbg201.zip d41fe77a2801d38476f20468ab61ddce14c3abb8
  6455. w_try_unzip "$W_DRIVE_C/ollydbg201" "$W_CACHE/$W_PACKAGE"/odbg201.zip
  6456. # ollydbg201 is affected by wine bug 36012 if debug symbols are available.
  6457. # As a workaround native 'dbghelp' can be installed. We don't do this automatically
  6458. # because for some people it might work even without additional workarounds.
  6459. # Older versions of OllyDbg were not affected by this bug.
  6460. }
  6461. #----------------------------------------------------------------
  6462. w_metadata openwatcom apps \
  6463. title="Open Watcom C/C++ compiler (can compile win16 code!)" \
  6464. publisher="Watcom" \
  6465. year="2010" \
  6466. media="download" \
  6467. file1="open-watcom-c-win32-1.9.exe" \
  6468. installed_file1="c:/WATCOM/owsetenv.bat" \
  6469. homepage="http://www.openwatcom.org"
  6470. load_openwatcom()
  6471. {
  6472. # 2016/03/11: upstream http://www.openwatcom.org appears dead (404)
  6473. w_download "http://openwatcom.mirror.fr/open-watcom-c-win32-1.9.exe" 236ac33ebd463006be4ecd83d7ebea1c026eb55a
  6474. if [ $W_UNATTENDED_SLASH_Q ]
  6475. then
  6476. # Options documented at http://bugzilla.openwatcom.org/show_bug.cgi?id=898
  6477. # But they don't seem to work on wine, so jam them into setup.inf
  6478. # Pick smallest installation that supports 16 bit C and C++
  6479. cd "$W_TMP"
  6480. cp "$W_CACHE"/openwatcom/open-watcom-c-win32-1.9.exe .
  6481. w_try_unzip . open-watcom-c-win32-1.9.exe setup.inf
  6482. sed -i 's/tools16=.*/tools16=true/' setup.inf
  6483. w_try zip -f open-watcom-c-win32-1.9.exe
  6484. w_try "$WINE" open-watcom-c-win32-1.9.exe -s
  6485. else
  6486. cd "$W_CACHE/$W_PACKAGE"
  6487. w_try "$WINE" open-watcom-c-win32-1.9.exe
  6488. fi
  6489. if test ! -f "$W_DRIVE_C"/WATCOM/binnt/wcc.exe
  6490. then
  6491. w_warn "c:/watcom/binnt/wcc.exe not found; you probably didn't select 16 bit tools, and won't be able to buld win16test"
  6492. fi
  6493. }
  6494. #----------------------------------------------------------------
  6495. w_metadata pdh dlls \
  6496. title="MS pdh.dll (Performance Data Helper)" \
  6497. publisher="Microsoft" \
  6498. year="2001" \
  6499. media="download" \
  6500. file1="pdhinst.exe" \
  6501. installed_file1="$W_SYSTEM32_DLLS_WIN/pdh.dll"
  6502. load_pdh()
  6503. {
  6504. # http://support.microsoft.com/kb/284996
  6505. w_download http://download.microsoft.com/download/platformsdk/Redist/5.0.2195.2668/NT4/EN-US/pdhinst.exe f42448660def8cd7f42b34aa7bc7264745f4425e
  6506. w_try_cabextract --directory="$W_TMP" "$W_CACHE"/pdh/pdhinst.exe
  6507. w_try_unzip "$W_TMP" "$W_TMP"/pdh.exe
  6508. w_try cp -f "$W_TMP"/x86/Pdh.Dll "$W_SYSTEM32_DLLS"/pdh.dll
  6509. }
  6510. #----------------------------------------------------------------
  6511. w_metadata physx dlls \
  6512. title="PhysX" \
  6513. publisher="NVidia" \
  6514. year="2014" \
  6515. media="download" \
  6516. file1="PhysX-9.14.0702-SystemSoftware.msi" \
  6517. installed_file1="$W_PROGRAMS_WIN/NVIDIA Corporation/PhysX/Engine/v2.8.3/PhysXCore.dll"
  6518. load_physx()
  6519. {
  6520. # Has a minor issue, see bug report http://bugs.winehq.org/show_bug.cgi?id=34167
  6521. w_download http://uk.download.nvidia.com/Windows/9.14.0702/PhysX-9.14.0702-SystemSoftware.msi 81e2d38e2356e807ad80cdf150ed5acfff839c8b
  6522. cd "$W_CACHE/$W_PACKAGE"
  6523. w_try "$WINE" msiexec /i PhysX-9.14.0702-SystemSoftware.msi $W_UNATTENDED_SLASH_Q
  6524. }
  6525. #----------------------------------------------------------------
  6526. w_metadata pngfilt dlls \
  6527. title="pngfilt.dll (from ie5)" \
  6528. publisher="Microsoft" \
  6529. year="2004" \
  6530. media="download" \
  6531. file1="IE5.01sp4-KB871260-Windows2000sp4-x86-ENU.exe" \
  6532. installed_file1="$W_SYSTEM32_DLLS_WIN/pngfilt.dll"
  6533. load_pngfilt()
  6534. {
  6535. # http://www.microsoft.com/en-us/download/details.aspx?id=3907
  6536. w_download http://download.microsoft.com/download/5/0/c/50c42d0e-07a8-4a2b-befb-1a403bd0df96/IE5.01sp4-KB871260-Windows2000sp4-x86-ENU.exe 6f5db296ebf58e81c49bc667049a3f88a3f1ec3d
  6537. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F pngfilt.dll "$W_CACHE"/pngfilt/IE5.01sp4-KB871260-Windows2000sp4-x86-ENU.exe
  6538. w_try_regsvr pngfilt.dll
  6539. }
  6540. #----------------------------------------------------------------
  6541. w_metadata qdvd dlls \
  6542. title="qdvd.dll (from Directx 9 user redistributable)" \
  6543. publisher="Microsoft" \
  6544. year="2010" \
  6545. media="download" \
  6546. file1="../directx9/directx_feb2010_redist.exe" \
  6547. installed_file1="$W_SYSTEM32_DLLS_WIN/qdvd.dll"
  6548. load_qdvd()
  6549. {
  6550. helper_directx_dl
  6551. w_try_cabextract -d "$W_TMP" -L -F dxnt.cab "$W_CACHE"/directx9/$DIRECTX_NAME
  6552. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F qdvd.dll "$W_TMP/dxnt.cab"
  6553. w_try_regsvr qdvd.dll
  6554. w_override_dlls native qdvd
  6555. }
  6556. #----------------------------------------------------------------
  6557. w_metadata quartz dlls \
  6558. title="quartz.dll (from Directx 9 user redistributable)" \
  6559. publisher="Microsoft" \
  6560. year="2010" \
  6561. media="download" \
  6562. file1="../directx9/directx_feb2010_redist.exe" \
  6563. installed_file1="$W_SYSTEM32_DLLS_WIN/quartz.dll"
  6564. load_quartz()
  6565. {
  6566. helper_directx_dl
  6567. w_try_cabextract -d "$W_TMP" -L -F dxnt.cab "$W_CACHE"/directx9/$DIRECTX_NAME
  6568. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F quartz.dll "$W_TMP/dxnt.cab"
  6569. w_try_regsvr quartz.dll
  6570. w_override_dlls native quartz
  6571. }
  6572. #----------------------------------------------------------------
  6573. w_metadata quicktime72 dlls \
  6574. title="Apple Quicktime 7.2" \
  6575. publisher="Apple" \
  6576. year="2010" \
  6577. media="download" \
  6578. file1="QuickTimeInstaller.exe" \
  6579. installed_file1="c:/windows/Installer/{95A890AA-B3B1-44B6-9C18-A8F7AB3EE7FC}/QTPlayer.ico"
  6580. load_quicktime72()
  6581. {
  6582. # https://support.apple.com/downloads/quicktime
  6583. w_download http://appldnld.apple.com.edgesuite.net/content.info.apple.com/QuickTime/061-2915.20070710.pO94c/QuickTimeInstaller.exe bb89981f10cf21de57b9453e53cf81b9194271a9
  6584. cd "$W_CACHE"/"$W_PACKAGE"
  6585. w_try "$WINE" ${file1} ALLUSERS=1 DESKTOP_SHORTCUTS=0 QTTaskRunFlags=0 QTINFO.BISQTPRO=1 SCHEDULE_ASUW=0 REBOOT_REQUIRED=No $W_UNATTENDED_SLASH_QN > /dev/null 2>&1
  6586. if w_workaround_wine_bug 11681
  6587. then
  6588. # Following advice verified with test movies from
  6589. # http://support.apple.com/kb/HT1425
  6590. # in QuickTimePlayer.
  6591. w_warn "In Quicktime preferences, check Advanced / Safe Mode (gdi), or movies won't play."
  6592. if test "$W_UNATTENDED_SLASH_Q" = ""
  6593. then
  6594. w_try "$WINE" control "$W_PROGRAMS_WIN\\QuickTime\\QTSystem\\QuickTime.cpl"
  6595. else
  6596. # FIXME: script the control panel with autohotkey?
  6597. # We could probably also overwrite QuickTime.qtp but
  6598. # the format isn't known, so we'd have to override all other settings, too.
  6599. :
  6600. fi
  6601. fi
  6602. }
  6603. #----------------------------------------------------------------
  6604. w_metadata quicktime76 dlls \
  6605. title="Apple Quicktime 7.6" \
  6606. publisher="Apple" \
  6607. year="2010" \
  6608. media="download" \
  6609. file1="QuickTimeInstaller.exe" \
  6610. installed_file1="c:/windows/Installer/{57752979-A1C9-4C02-856B-FBB27AC4E02C}/QTPlayer.ico"
  6611. load_quicktime76()
  6612. {
  6613. # http://www.apple.com/quicktime/download/
  6614. w_download http://appldnld.apple.com/QuickTime/041-0025.20101207.Ptrqt/QuickTimeInstaller.exe 1eec8904f041d9e0ad3459788bdb690e45dbc38e
  6615. cd "$W_CACHE"/"$W_PACKAGE"
  6616. w_try "$WINE" QuickTimeInstaller.exe ALLUSERS=1 DESKTOP_SHORTCUTS=0 QTTaskRunFlags=0 QTINFO.BISQTPRO=1 SCHEDULE_ASUW=0 REBOOT_REQUIRED=No $W_UNATTENDED_SLASH_QN > /dev/null 2>&1
  6617. if w_workaround_wine_bug 11681
  6618. then
  6619. # Following advice verified with test movies from
  6620. # http://support.apple.com/kb/HT1425
  6621. # in QuickTimePlayer.
  6622. w_warn "In Quicktime preferences, check Advanced / Safe Mode (gdi), or movies won't play."
  6623. if test "$W_UNATTENDED_SLASH_Q" = ""
  6624. then
  6625. w_try "$WINE" control "$W_PROGRAMS_WIN\\QuickTime\\QTSystem\\QuickTime.cpl"
  6626. else
  6627. # FIXME: script the control panel with autohotkey?
  6628. # We could probably also overwrite QuickTime.qtp but
  6629. # the format isn't known, so we'd have to override all other settings, too.
  6630. :
  6631. fi
  6632. fi
  6633. }
  6634. #----------------------------------------------------------------
  6635. w_metadata remove_mono settings \
  6636. title_uk="Видалити вбудоване wine-mono" \
  6637. title="Remove builtin wine-mono"
  6638. load_remove_mono()
  6639. {
  6640. # FIXME: fold other .NET cleanups here (registry entries).
  6641. # Probably should only do that for wine >= 1.5.6
  6642. mono_uuid="`$WINE uninstaller --list | grep Mono | cut -f1 -d\|`"
  6643. if test "$mono_uuid"
  6644. then
  6645. "$WINE" uninstaller --remove $mono_uuid
  6646. else
  6647. w_warn "Mono does not appear to be installed."
  6648. fi
  6649. }
  6650. #----------------------------------------------------------------
  6651. w_metadata riched20 dlls \
  6652. title="MS RichEdit Control version 2.0 (riched20.dll)" \
  6653. publisher="Microsoft" \
  6654. year="2004" \
  6655. media="download" \
  6656. file1="../win2ksp4/W2KSP4_EN.EXE" \
  6657. installed_file1="$W_SYSTEM32_DLLS_WIN/riched20.dll"
  6658. load_riched20()
  6659. {
  6660. # FIXME: this verb used to also install riched32. Does anyone need that?
  6661. helper_win2ksp4 i386/riched20.dl_
  6662. w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/riched20.dl_
  6663. w_override_dlls native,builtin riched20
  6664. # https://code.google.com/p/winetricks/issues/detail?id=292
  6665. w_call msls31
  6666. }
  6667. #----------------------------------------------------------------
  6668. # Problem - riched20 and riched30 both install riched20.dll!
  6669. # We may need a better way to distinguish between installed files.
  6670. w_metadata riched30 dlls \
  6671. title="MS RichEdit Control version 3.0 (riched20.dll, msls31.dll)" \
  6672. publisher="Microsoft" \
  6673. year="2001" \
  6674. media="download" \
  6675. file1="InstMsiA.exe" \
  6676. installed_file1="$W_SYSTEM32_DLLS_WIN/riched20.dll" \
  6677. installed_file2="$W_SYSTEM32_DLLS_WIN/msls31.dll"
  6678. load_riched30()
  6679. {
  6680. # http://www.novell.com/documentation/nm1/readmeen_web/readmeen_web.html#Akx3j64
  6681. # claims that Groupwise Messenger's View / Text Size command
  6682. # only works with riched30, and recommends getting it by installing
  6683. # msi 2, which just happens to come with riched30 version of riched20
  6684. # (though not with a corresponding riched32, which might be a problem)
  6685. # http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=CEBBACD8-C094-4255-B702-DE3BB768148F
  6686. w_download http://download.microsoft.com/download/WindowsInstaller/Install/2.0/W9XMe/EN-US/InstMsiA.exe e739c40d747e7c27aacdb07b50925b1635ee7366
  6687. w_try_cabextract --directory="$W_TMP" "$W_CACHE"/riched30/InstMsiA.exe
  6688. w_try cp -f "$W_TMP"/riched20.dll "$W_SYSTEM32_DLLS"
  6689. w_try cp -f "$W_TMP"/msls31.dll "$W_SYSTEM32_DLLS"
  6690. w_override_dlls native,builtin riched20
  6691. }
  6692. #----------------------------------------------------------------
  6693. w_metadata richtx32 dlls \
  6694. title="MS Rich TextBox Control 6.0" \
  6695. publisher="Microsoft" \
  6696. year="2009" \
  6697. media="download" \
  6698. file1="richtx32.cab" \
  6699. installed_file1="$W_SYSTEM32_DLLS_WIN/RichTx32.Ocx"
  6700. load_richtx32()
  6701. {
  6702. w_download http://activex.microsoft.com/controls/vb6/richtx32.cab da404b566df3ad74fe687c39404a36c3e7cadc07
  6703. w_try_cabextract "$W_CACHE"/richtx32/richtx32.cab -d "$W_SYSTEM32_DLLS" -F RichTx32.ocx
  6704. w_try_regsvr RichTx32.ocx
  6705. }
  6706. #----------------------------------------------------------------
  6707. w_metadata sdl dlls \
  6708. title="Simple DirectMedia Layer" \
  6709. publisher="Sam Lantinga" \
  6710. year="2009" \
  6711. media="download" \
  6712. file1="SDL-1.2.14-win32.zip" \
  6713. installed_file1="$W_SYSTEM32_DLLS_WIN/SDL.dll"
  6714. load_sdl()
  6715. {
  6716. # http://www.libsdl.org/download-1.2.php
  6717. w_download http://www.libsdl.org/release/SDL-1.2.14-win32.zip d22c71d1c2bdf283548187c4b0bd7ef9d0c1fb23
  6718. w_try_unzip "$W_SYSTEM32_DLLS" "$W_CACHE"/sdl/SDL-1.2.14-win32.zip SDL.dll
  6719. }
  6720. #----------------------------------------------------------------
  6721. w_metadata secur32 dlls \
  6722. title="MS Security Support Provider Interface" \
  6723. publisher="Microsoft" \
  6724. year="2009" \
  6725. media="download" \
  6726. file1="Windows2000-KB959426-x86-ENU.EXE" \
  6727. installed_file1="$W_SYSTEM32_DLLS_WIN/secur32.dll"
  6728. load_secur32()
  6729. {
  6730. # http://www.microsoft.com/downloads/details.aspx?familyid=c4e408d7-6716-4a12-ad3a-8029667f5c84
  6731. w_download http://download.microsoft.com/download/6/9/5/69501788-B62F-44D8-933F-B6FAA576CA87/Windows2000-KB959426-x86-ENU.EXE bf930a4d2982165a0793465bb255d494ba5b4cf7
  6732. w_try_cabextract "$W_CACHE"/secur32/Windows2000-KB959426-x86-ENU.EXE -d "$W_SYSTEM32_DLLS" -F secur32.dll
  6733. w_override_dlls native,builtin secur32
  6734. }
  6735. #----------------------------------------------------------------
  6736. w_metadata setupapi dlls \
  6737. title="MS Setup API" \
  6738. publisher="Microsoft" \
  6739. year="2004" \
  6740. media="download" \
  6741. file1="../xpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  6742. installed_file1="$W_SYSTEM32_DLLS_WIN/setupapi.dll"
  6743. load_setupapi()
  6744. {
  6745. helper_xpsp3 i386/setupapi.dl_
  6746. w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/setupapi.dl_
  6747. w_override_dlls native,builtin setupapi
  6748. }
  6749. #----------------------------------------------------------------
  6750. w_metadata shockwave dlls \
  6751. title="Shockwave" \
  6752. publisher="Adobe" \
  6753. year="2010" \
  6754. media="download" \
  6755. file1="sw_lic_full_installer.msi" \
  6756. installed_file1="$W_SYSTEM32_DLLS_WIN/Adobe/Shockwave 12/shockwave_Projector_Loader.dcr"
  6757. load_shockwave() {
  6758. # Not silent enough, use msi instead
  6759. #w_download http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/Shockwave_Installer_Full.exe 840e34e9b067cf247bfa9092665b8966158f38e3
  6760. #w_try "$WINE" "$W_CACHE"/Shockwave_Installer_Full.exe $W_UNATTENDED_SLASH_S
  6761. # old sha1sum: 6a91a9da4b54c3fdc97130a15e1a173117e5f4ff
  6762. # 2009-07-31 sha1sum: 0bb506ef67a268e8d3fb6c7ce556320ee10b9da5
  6763. # 2009-12-13 sha1sum: d35649883bf13cb1a86f5650e1050d15533ac0f4
  6764. # 2010-01-23 sha1sum: 4a837d238c28c5f345d73f105711f20c6d059273
  6765. # 2010-05-15 sha1sum: bdce02afc82233801e84137e78c2c5fe574db253
  6766. # 2010-09-02 sha1sum: fed20eccc29fec2f64162b7265343514d43884bc
  6767. # 2010-11-03 sha1sum: 2ff28665543e80f3bd4ff1933ac05ec9314aaac6
  6768. # 2011-02-03 sha1sum: e71ddc4fa42662208b2f52c1bd34a40e7775ad75
  6769. # 2011-06-13 sha1sum: 7fd6cc61bb20d0bef654a44f4501a5a65b55b0c9
  6770. # 2011-11-10 sha1sum: b55974b471c516f13fb032424247c07390baf380
  6771. # 2012-03-07 sha1sum: 3b10f645ba1a6815fa97924a6bde4eda3177ff68
  6772. # 2012-04-26 sha1sum: 48b1a44b2c12c486916d641f3b4e20abffb3d6e4
  6773. # 2012-08-08 sha1sum: 3c4d531ccf0bb5788f1c197c63e9c0aa89885ee6
  6774. # 2013-06-15 sha1sum: 9c02499deaf567bde7d827493705e5680833d02e
  6775. # 2014-01-22 sha1sum: c8f1b2c137a1373d591f7c1d48db9c6baa961caf
  6776. # 2014-02-26 sha1sum: ae2855b729bfaedc766f3addd8c2b74eac576909
  6777. # 2014-04-15 sha1sum: c2ea56450fb4a5bac66cb7d70e3b522431521787
  6778. # 2014-05-21 sha1sum: d95d1a14ee264235b29e093105bd2baa8b06eb12
  6779. # 2014-11-22 sha1sum: 644d3228654ded798eabe40e7044b96b90e742f6
  6780. # 2015-03-30 sha1sum: 9f2d4d929e7210ae9fb633881127b21586ffd8ce
  6781. # 2015-04-27 sha1sum: 244e6a5c5fa2dd26c136bc5b402f6cad588763d7
  6782. # 2015-08-02 sha1sum: e2efa2eb7db0a6de08905cd61bb3efcf58fda994
  6783. # 2015-11-09 sha1sum: d13420a6fdc4f8d9c45c5ee6767974f0f0054cdc
  6784. # 2015-12-27 sha1sum: 3ac6d85e54dffb2940c89fc10e63363a47ec96d0
  6785. # 2016-02-18 sha1sum: 45147a791e3f71bd67ead1622d9120060dd196e5
  6786. # 2016-03-11 sha1sum: 4f955f42984ae69d2f6078d3a3fe9fadc4a25e34
  6787. w_download http://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/sw_lic_full_installer.msi 4f955f42984ae69d2f6078d3a3fe9fadc4a25e34
  6788. cd "$W_CACHE/$W_PACKAGE"
  6789. w_try "$WINE" msiexec /i sw_lic_full_installer.msi $W_UNATTENDED_SLASH_Q
  6790. }
  6791. #----------------------------------------------------------------
  6792. w_metadata speechsdk dlls \
  6793. title="MS Speech SDK 5.1" \
  6794. publisher="Microsoft" \
  6795. year="2009" \
  6796. media="download" \
  6797. file1="SpeechSDK51.exe" \
  6798. installed_file1="$W_PROGRAMS_X86_WIN/Microsoft Speech SDK 5.1/Bin/SAPI51SampleApp.exe"
  6799. load_speechsdk()
  6800. {
  6801. # http://www.microsoft.com/download/en/details.aspx?id=10121
  6802. w_download http://download.microsoft.com/download/B/4/3/B4314928-7B71-4336-9DE7-6FA4CF00B7B3/SpeechSDK51.exe f69efaee8eb47f8c7863693e8b8265a3c12c4f51
  6803. w_try_unzip "$W_TMP" "$W_CACHE"/speechsdk/SpeechSDK51.exe
  6804. # Otherwise it only installs the SDK and not the redistributable:
  6805. w_set_winver win2k
  6806. cd "$W_TMP"
  6807. w_try "$WINE" msiexec /i "Microsoft Speech SDK 5.1.msi" $W_UNATTENDED_SLASH_Q
  6808. w_unset_winver
  6809. }
  6810. #----------------------------------------------------------------
  6811. w_metadata tabctl32 dlls \
  6812. title="Microsoft Tabbed Dialog Control 6.0 (tabctl32.ocx)" \
  6813. publisher="Microsoft" \
  6814. year="2009" \
  6815. media="download" \
  6816. file1="TABCTL32.CAB" \
  6817. installed_file1="$W_SYSTEM32_DLLS_WIN/tabctl32.ocx"
  6818. load_tabctl32()
  6819. {
  6820. # http://msdn.microsoft.com/en-us/library/aa240864(VS.60).aspx
  6821. # Nov 2012: tabctl32
  6822. w_download http://activex.microsoft.com/controls/vb6/TABCTL32.CAB beca51d05924a5466ab80eb0f8d0cdf8bc1ac697
  6823. w_try_cabextract --directory="$W_TMP" "$W_CACHE"/tabctl32/${file1}
  6824. w_try cp -f "$W_TMP"/[Tt][Aa][Bb][Cc][Tt][Ll][3][2].[Oo][Cc][Xx] "$W_SYSTEM32_DLLS"
  6825. w_try_regsvr tabctl32.ocx
  6826. }
  6827. #----------------------------------------------------------------
  6828. w_metadata updspapi dlls \
  6829. title="Windows Update Service API" \
  6830. publisher="Microsoft" \
  6831. year="2004" \
  6832. media="download" \
  6833. file1="../xpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  6834. installed_file1="$W_SYSTEM32_DLLS_WIN/updspapi.dll"
  6835. load_updspapi()
  6836. {
  6837. helper_xpsp3 i386/update/updspapi.dll
  6838. w_try cp -f "$W_TMP"/i386/update/updspapi.dll "$W_SYSTEM32_DLLS"
  6839. w_override_dlls native,builtin updspapi
  6840. }
  6841. #----------------------------------------------------------------
  6842. w_metadata usp10 dlls \
  6843. title="Uniscribe 1.325 " \
  6844. publisher="Microsoft" \
  6845. year="2001" \
  6846. media="download" \
  6847. file1="../msi2/InstMsiA.exe" \
  6848. installed_file1="$W_SYSTEM32_DLLS_WIN/usp10.dll"
  6849. load_usp10()
  6850. {
  6851. # http://en.wikipedia.org/wiki/Uniscribe
  6852. # http://www.microsoft.com/downloads/details.aspx?familyid=cebbacd8-c094-4255-b702-de3bb768148f
  6853. w_download_to msi2 http://download.microsoft.com/download/WindowsInstaller/Install/2.0/W9XMe/EN-US/InstMsiA.exe e739c40d747e7c27aacdb07b50925b1635ee7366
  6854. w_try_cabextract --directory="$W_TMP" "$W_CACHE"/msi2/InstMsiA.exe
  6855. w_try cp -f "$W_TMP"/usp10.dll "$W_SYSTEM32_DLLS"
  6856. w_override_dlls native,builtin usp10
  6857. }
  6858. #----------------------------------------------------------------
  6859. w_metadata vb2run dlls \
  6860. title="MS Visual Basic 2 runtime" \
  6861. publisher="Microsoft" \
  6862. year="1993" \
  6863. media="download" \
  6864. file1="VBRUN200.EXE" \
  6865. installed_file1="$W_SYSTEM32_DLLS_WIN/VBRUN200.DLL"
  6866. load_vb2run()
  6867. {
  6868. # Not referenced on MS web anymore, but the old Microsoft Software Library FTP still has it.
  6869. # See ftp://ftp.microsoft.com/Softlib/index.txt
  6870. # 2014/05/31: Microsoft FTP is down ftp://$ftp_microsoft_com/Softlib/MSLFILES/VBRUN200.EXE
  6871. # 2015/08/10: chatnfiles is down, conradshome.com is up (and has a LOT of old MS installers archived!)
  6872. w_download http://www.conradshome.com/win31/archive/softlib/vbrun200.exe ac0568b73ee375408778e9b505df995f79ab907e
  6873. w_try_unzip "$W_TMP" "$W_CACHE"/vb2run/VBRUN200.EXE
  6874. w_try cp -f "$W_TMP/VBRUN200.DLL" "$W_SYSTEM32_DLLS"
  6875. }
  6876. #----------------------------------------------------------------
  6877. w_metadata vb3run dlls \
  6878. title="MS Visual Basic 3 runtime" \
  6879. publisher="Microsoft" \
  6880. year="1998" \
  6881. media="download" \
  6882. file1="vb3run.exe" \
  6883. installed_file1="$W_SYSTEM32_DLLS_WIN/Vbrun300.dll"
  6884. load_vb3run()
  6885. {
  6886. # See http://support.microsoft.com/kb/196285
  6887. w_download http://download.microsoft.com/download/vb30/utility/1/w9xnt4/en-us/vb3run.exe 518fcfefde9bf680695cadd06512efadc5ac2aa7
  6888. w_try_unzip "$W_TMP" "$W_CACHE"/vb3run/vb3run.exe
  6889. w_try cp -f "$W_TMP/Vbrun300.dll" "$W_SYSTEM32_DLLS"
  6890. }
  6891. #----------------------------------------------------------------
  6892. w_metadata vb4run dlls \
  6893. title="MS Visual Basic 4 runtime" \
  6894. publisher="Microsoft" \
  6895. year="1998" \
  6896. media="download" \
  6897. file1="vb4run.exe" \
  6898. installed_file1="$W_SYSTEM32_DLLS_WIN/Vb40032.dll"
  6899. load_vb4run()
  6900. {
  6901. # See http://support.microsoft.com/kb/196286
  6902. w_download http://download.microsoft.com/download/vb40ent/sample27/1/w9xnt4/en-us/vb4run.exe 83e968063272e97bfffd628a73bf0ff5f8e1023b
  6903. w_try_unzip "$W_TMP" "$W_CACHE"/vb4run/vb4run.exe
  6904. w_try cp -f "$W_TMP/Vb40032.dll" "$W_SYSTEM32_DLLS"
  6905. w_try cp -f "$W_TMP/Vb40016.dll" "$W_SYSTEM32_DLLS"
  6906. }
  6907. #----------------------------------------------------------------
  6908. w_metadata vb5run dlls \
  6909. title="MS Visual Basic 5 runtime" \
  6910. publisher="Microsoft" \
  6911. year="2001" \
  6912. media="download" \
  6913. file1="msvbvm50.exe" \
  6914. installed_file1="$W_SYSTEM32_DLLS_WIN/msvbvm50.dll"
  6915. load_vb5run()
  6916. {
  6917. w_download http://download.microsoft.com/download/vb50pro/utility/1/win98/en-us/msvbvm50.exe 28bfaf09b8ac32cf5ffa81252f3e2fadcb3a8f27
  6918. cd "$W_CACHE/$W_PACKAGE"
  6919. w_try "$WINE" msvbvm50.exe $W_UNATTENDED_SLASH_Q
  6920. }
  6921. #----------------------------------------------------------------
  6922. w_metadata vb6run dlls \
  6923. title="MS Visual Basic 6 runtime sp6" \
  6924. publisher="Microsoft" \
  6925. year="2004" \
  6926. media="download" \
  6927. file1="vbrun60sp6.exe" \
  6928. installed_file1="$W_SYSTEM32_DLLS_WIN/MSVBVM60.DLL"
  6929. load_vb6run()
  6930. {
  6931. # http://support.microsoft.com/kb/290887
  6932. if test ! -f "$W_CACHE"/vb6run/vbrun60sp6.exe
  6933. then
  6934. w_download http://download.microsoft.com/download/5/a/d/5ad868a0-8ecd-4bb0-a882-fe53eb7ef348/VB6.0-KB290887-X86.exe 73ef177008005675134d2f02c6f580515ab0d842
  6935. w_try "$WINE" "$W_CACHE"/vb6run/VB6.0-KB290887-X86.exe "/T:$W_TMP_WIN" /c $W_UNATTENDED_SLASH_Q
  6936. if test ! -f "$W_TMP"/vbrun60sp6.exe
  6937. then
  6938. w_die vbrun60sp6.exe not found
  6939. fi
  6940. w_try mv "$W_TMP"/vbrun60sp6.exe "$W_CACHE"/vb6run
  6941. fi
  6942. # Delete some fake DLLs to ensure that the installer overwrites them.
  6943. rm -f "$W_SYSTEM32_DLLS"/comcat.dll
  6944. rm -f "$W_SYSTEM32_DLLS"/oleaut32.dll
  6945. rm -f "$W_SYSTEM32_DLLS"/olepro32.dll
  6946. rm -f "$W_SYSTEM32_DLLS"/stdole2.tlb
  6947. cd "$W_CACHE/$W_PACKAGE"
  6948. # Exits with status 43 for some reason?
  6949. "$WINE" vbrun60sp6.exe $W_UNATTENDED_SLASH_Q
  6950. status=$?
  6951. case $status in
  6952. 0|43) ;;
  6953. *) w_die $W_PACKAGE installation failed
  6954. esac
  6955. }
  6956. #----------------------------------------------------------------
  6957. winetricks_vcrun6_helper() {
  6958. if test ! -f "$W_CACHE"/vcrun6/vcredist.exe
  6959. then
  6960. w_download_to vcrun6 http://download.microsoft.com/download/vc60pro/Update/2/W9XNT4/EN-US/VC6RedistSetup_deu.exe a8c4dd33e281c166488846a10edf97ff0ce37044
  6961. w_try "$WINE" "$W_CACHE"/vcrun6/vc6redistsetup_deu.exe "/T:$W_TMP_WIN" /c $W_UNATTENDED_SLASH_Q
  6962. if test ! -f "$W_TMP"/vcredist.exe
  6963. then
  6964. w_die vcredist.exe not found
  6965. fi
  6966. mv "$W_TMP"/vcredist.exe "$W_CACHE"/vcrun6
  6967. fi
  6968. }
  6969. w_metadata vcrun6 dlls \
  6970. title="Visual C++ 6 sp4 libraries (mfc42, msvcp60, msvcirt)" \
  6971. publisher="Microsoft" \
  6972. year="2000" \
  6973. media="download" \
  6974. file1="vc6redistsetup_deu.exe" \
  6975. installed_file1="$W_SYSTEM32_DLLS_WIN/mfc42.dll"
  6976. load_vcrun6()
  6977. {
  6978. # Load the Visual C++ 6 runtime libraries, including the elusive mfc42u.dll
  6979. winetricks_vcrun6_helper
  6980. # Delete some fake dlls to avoid vcredist installer warnings
  6981. rm -f "$W_SYSTEM32_DLLS"/comcat.dll
  6982. rm -f "$W_SYSTEM32_DLLS"/msvcrt.dll
  6983. rm -f "$W_SYSTEM32_DLLS"/oleaut32.dll
  6984. rm -f "$W_SYSTEM32_DLLS"/olepro32.dll
  6985. rm -f "$W_SYSTEM32_DLLS"/stdole2.tlb
  6986. "$WINE" "$W_CACHE"/vcrun6/vcredist.exe
  6987. status=$?
  6988. case $status in
  6989. 0|43) ;;
  6990. *) w_die vcrun6 installation failed
  6991. esac
  6992. # And then some apps need mfc42u.dll, dunno what right way
  6993. # is to get it, vcredist doesn't install it by default?
  6994. load_mfc42
  6995. }
  6996. w_metadata mfc42 dlls \
  6997. title="Visual C++ 6 sp4 mfc42 library; part of vcrun6" \
  6998. publisher="Microsoft" \
  6999. year="2000" \
  7000. media="download" \
  7001. file1="../vcrun6/vc6redistsetup_deu.exe" \
  7002. installed_file1="$W_SYSTEM32_DLLS_WIN/mfc42u.dll"
  7003. load_mfc42()
  7004. {
  7005. winetricks_vcrun6_helper
  7006. w_try_cabextract "$W_CACHE"/vcrun6/vcredist.exe -d "$W_SYSTEM32_DLLS" -F "mfc42*.dll"
  7007. }
  7008. w_metadata msvcirt dlls \
  7009. title="Visual C++ 6 sp4 msvcirt library; part of vcrun6" \
  7010. publisher="Microsoft" \
  7011. year="2000" \
  7012. media="download" \
  7013. file1="../vcrun6/vc6redistsetup_deu.exe" \
  7014. installed_file1="$W_SYSTEM32_DLLS_WIN/msvcirt.dll"
  7015. load_msvcirt()
  7016. {
  7017. winetricks_vcrun6_helper
  7018. w_try_cabextract "$W_CACHE"/vcrun6/vcredist.exe -d "$W_SYSTEM32_DLLS" -F msvcirt.dll
  7019. }
  7020. #----------------------------------------------------------------
  7021. # FIXME: we don't currently have an install check that can distinguish
  7022. # between sp4 and sp6, it would have to check size or version of a file,
  7023. # or maybe a registry key.
  7024. w_metadata vcrun6sp6 dlls \
  7025. title="Visual C++ 6 sp6 libraries (with fixes in atl and mfc)" \
  7026. publisher="Microsoft" \
  7027. year="2004" \
  7028. media="download" \
  7029. file1="Vs6sp6.exe" \
  7030. installed_file1="$W_SYSTEM32_DLLS_WIN/mfc42.dll"
  7031. load_vcrun6sp6()
  7032. {
  7033. w_download http://download.microsoft.com/download/1/9/f/19fe4660-5792-4683-99e0-8d48c22eed74/Vs6sp6.exe 2292437a8967349261c810ae8b456592eeb76620
  7034. # No EULA is presented when passing command-line extraction arguments,
  7035. # so we'll simplify extraction with cabextract.
  7036. w_try_cabextract "$W_CACHE"/vcrun6sp6/Vs6sp6.exe -d "$W_TMP" -F vcredist.exe
  7037. cd "$W_TMP"
  7038. # Delete some fake dlls to avoid vcredist installer warnings
  7039. w_try rm -f "$W_SYSTEM32_DLLS"/comcat.dll
  7040. w_try rm -f "$W_SYSTEM32_DLLS"/msvcrt.dll
  7041. w_try rm -f "$W_SYSTEM32_DLLS"/oleaut32.dll
  7042. w_try rm -f "$W_SYSTEM32_DLLS"/olepro32.dll
  7043. w_try rm -f "$W_SYSTEM32_DLLS"/stdole2.tlb
  7044. # vcredist still exits with status 43. Anyone know why?
  7045. "$WINE" vcredist.exe
  7046. status=$?
  7047. case $status in
  7048. 0|43) ;;
  7049. *) w_die $W_PACKAGE installation failed
  7050. esac
  7051. # And then some apps need mfc42u.dll, dunno what right way
  7052. # is to get it, vcredist doesn't install it by default?
  7053. w_try_cabextract vcredist.exe -d "$W_SYSTEM32_DLLS" -F mfc42u.dll
  7054. # Should the mfc42 verb install this one instead?
  7055. }
  7056. #----------------------------------------------------------------
  7057. w_metadata vcrun2003 dlls \
  7058. title="Visual C++ 2003 libraries (mfc71,msvcp71,msvcr71)" \
  7059. publisher="Microsoft" \
  7060. year="2003" \
  7061. media="download" \
  7062. file1="BZEditW32_1.6.5.exe" \
  7063. installed_file1="$W_SYSTEM32_DLLS_WIN/msvcp71.dll"
  7064. load_vcrun2003()
  7065. {
  7066. # Load the Visual C++ 2003 runtime libraries
  7067. # Sadly, I know of no Microsoft URL for these
  7068. echo "Installing BZFlag (which comes with the Visual C++ 2003 runtimes)"
  7069. # winetricks-test can't handle ${file1} in url since it does a raw parsing :/
  7070. w_download https://sourceforge.net/projects/bzflag/files/bzedit%20win32/1.6.5/BZEditW32_1.6.5.exe bdd1b32c4202fd77e6513fd507c8236888b09121
  7071. w_try "$WINE" "$W_CACHE"/vcrun2003/${file1} $W_UNATTENDED_SLASH_S
  7072. w_try cp "$W_PROGRAMS_X86_UNIX/BZEdit1.6.5"/m*71* "$W_SYSTEM32_DLLS"
  7073. }
  7074. #----------------------------------------------------------------
  7075. # Temporary fix for bug 169
  7076. # The | symbol in installed_file1 means "or".
  7077. # (Adding an installed_file2 would mean 'and'.)
  7078. # Perhaps we should test for one if winxp mode, and the other if win7 mode;
  7079. # if that becomes important to get right, we'll do something like
  7080. # "if installed_file1 is just the single char @, call test_installed_$verb"
  7081. # and then define that function here.
  7082. w_metadata vcrun2005 dlls \
  7083. title="Visual C++ 2005 libraries (mfc80,msvcp80,msvcr80)" \
  7084. publisher="Microsoft" \
  7085. year="2011" \
  7086. media="download" \
  7087. file1="vcredist_x86.EXE" \
  7088. installed_file1="c:/windows/winsxs/x86_Microsoft.VC80.MFC_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_150c9e8b/mfc80.dll|c:/windows/winsxs/x86_microsoft.vc80.mfc_1fc8b3b9a1e18e3b_8.0.50727.6195_none_deadbeef/mfc80.dll"
  7089. load_vcrun2005()
  7090. {
  7091. # June 2011 security update, see
  7092. # http://www.microsoft.com/technet/security/bulletin/MS11-025.mspx or
  7093. # http://support.microsoft.com/kb/2538242
  7094. w_download http://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x86.EXE b8fab0bb7f62a24ddfe77b19cd9a1451abd7b847
  7095. cd "$W_CACHE/$W_PACKAGE"
  7096. w_override_dlls native,builtin atl80 msvcm80 msvcp80 msvcr80 vcomp
  7097. w_try "$WINE" $file1 $W_UNATTENDED_SLASH_Q
  7098. }
  7099. #----------------------------------------------------------------
  7100. w_metadata vcrun2008 dlls \
  7101. title="Visual C++ 2008 libraries (mfc90,msvcp90,msvcr90)" \
  7102. publisher="Microsoft" \
  7103. year="2011" \
  7104. media="download" \
  7105. file1="vcredist_x86.exe" \
  7106. installed_file1="$W_PROGRAMS_X86_WIN/Common Files/Microsoft Shared/VC/msdia90.dll"
  7107. load_vcrun2008()
  7108. {
  7109. # June 2011 security update, see
  7110. # http://www.microsoft.com/technet/security/bulletin/MS11-025.mspx or
  7111. # http://support.microsoft.com/kb/2538242
  7112. w_download http://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe 470640aa4bb7db8e69196b5edb0010933569e98d
  7113. w_override_dlls native,builtin atl90 msvcm90 msvcp90 msvcr90 vcomp90
  7114. cd "$W_CACHE/$W_PACKAGE"
  7115. w_try "$WINE" $file1 $W_UNATTENDED_SLASH_Q
  7116. }
  7117. #----------------------------------------------------------------
  7118. w_metadata vcrun2010 dlls \
  7119. title="Visual C++ 2010 libraries (mfc100,msvcp100,msvcr100)" \
  7120. publisher="Microsoft" \
  7121. year="2010" \
  7122. media="download" \
  7123. file1="vcredist_x86.exe" \
  7124. installed_file1="$W_SYSTEM32_DLLS_WIN/mfc100.dll"
  7125. load_vcrun2010()
  7126. {
  7127. # See http://www.microsoft.com/downloads/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84
  7128. w_download http://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe 372d9c1670343d3fb252209ba210d4dc4d67d358
  7129. w_override_dlls native,builtin msvcp100 msvcr100 vcomp100 atl100
  7130. cd "$W_CACHE/$W_PACKAGE"
  7131. w_try "$WINE" vcredist_x86.exe $W_UNATTENDED_SLASH_Q
  7132. case "$W_ARCH" in
  7133. win64)
  7134. # Also install the 64 bit version
  7135. # http://www.microsoft.com/en-us/download/details.aspx?id=13523
  7136. w_download http://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe 027d0c2749ec5eb21b031f46aee14c905206f482
  7137. if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"
  7138. then
  7139. w_try_cabextract --directory="$W_TMP" vcredist_x64.exe -F '*.cab'
  7140. w_try_cabextract --directory="$W_TMP" "$W_TMP"/vc_red.cab
  7141. cp "$W_TMP"/F_CENTRAL_mfc100_x64 "$W_SYSTEM64_DLLS"/mfc100.dll
  7142. cp "$W_TMP"/F_CENTRAL_mfc100u_x64 "$W_SYSTEM64_DLLS"/mfc100u.dll
  7143. cp "$W_TMP"/F_CENTRAL_msvcr100_x64 "$W_SYSTEM64_DLLS"/msvcr100.dll
  7144. cp "$W_TMP"/F_CENTRAL_msvcp100_x64 "$W_SYSTEM64_DLLS"/msvcp100.dll
  7145. cp "$W_TMP"/F_CENTRAL_vcomp100_x64 "$W_SYSTEM64_DLLS"/vcomp100.dll
  7146. cp "$W_TMP"/F_CENTRAL_atl100_x64 "$W_SYSTEM64_DLLS"/atl100.dll
  7147. else
  7148. w_try "$WINE" vcredist_x64.exe $W_UNATTENDED_SLASH_Q
  7149. fi
  7150. ;;
  7151. esac
  7152. }
  7153. #----------------------------------------------------------------
  7154. w_metadata vcrun2012 dlls \
  7155. title="Visual C++ 2012 libraries (atl110,mfc110,mfc110u,msvcp110,msvcr110,vcomp110)" \
  7156. publisher="Microsoft" \
  7157. year="2012" \
  7158. media="download" \
  7159. file1="vcredist_x86.exe" \
  7160. installed_file1="$W_SYSTEM32_DLLS_WIN/mfc110.dll"
  7161. load_vcrun2012()
  7162. {
  7163. # http://www.microsoft.com/download/details.aspx?id=30679
  7164. w_download http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe 96b377a27ac5445328cbaae210fc4f0aaa750d3f
  7165. w_override_dlls native,builtin atl110 msvcp110 msvcr110 vcomp110
  7166. cd "$W_CACHE"/"$W_PACKAGE"
  7167. w_try "$WINE" vcredist_x86.exe $W_UNATTENDED_SLASH_Q
  7168. case "$W_ARCH" in
  7169. win64)
  7170. # Also install the 64 bit version
  7171. # 2015/10/19: 1a5d93dddbc431ab27b1da711cd3370891542797
  7172. w_download http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe 1a5d93dddbc431ab27b1da711cd3370891542797
  7173. if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"
  7174. then
  7175. rm -f "$W_TMP"/* # Avoid permission error
  7176. w_try_cabextract --directory="$W_TMP" vcredist_x64.exe
  7177. w_try_cabextract --directory="$W_TMP" "$W_TMP/a2"
  7178. w_try_cabextract --directory="$W_TMP" "$W_TMP/a3"
  7179. cp "$W_TMP"/F_CENTRAL_atl110_x64 "$W_SYSTEM64_DLLS"/atl110.dll
  7180. cp "$W_TMP"/F_CENTRAL_mfc110_x64 "$W_SYSTEM64_DLLS"/mfc110.dll
  7181. cp "$W_TMP"/F_CENTRAL_mfc110u_x64 "$W_SYSTEM64_DLLS"/mfc110u.dll
  7182. cp "$W_TMP"/F_CENTRAL_msvcp110_x64 "$W_SYSTEM64_DLLS"/msvcp110.dll
  7183. cp "$W_TMP"/F_CENTRAL_msvcr110_x64 "$W_SYSTEM64_DLLS"/msvcr110.dll
  7184. cp "$W_TMP"/F_CENTRAL_vcomp110_x64 "$W_SYSTEM64_DLLS"/vcomp110.dll
  7185. else
  7186. w_try "$WINE" vcredist_x64.exe $W_UNATTENDED_SLASH_Q
  7187. fi
  7188. ;;
  7189. esac
  7190. }
  7191. #----------------------------------------------------------------
  7192. w_metadata vcrun2013 dlls \
  7193. title="Visual C++ 2013 libraries (mfc120,mfc120u,msvcp120,msvcr120,vcomp120)" \
  7194. publisher="Microsoft" \
  7195. year="2013" \
  7196. media="download" \
  7197. file1="vcredist_x86.exe" \
  7198. installed_file1="$W_SYSTEM32_DLLS_WIN/mfc120.dll"
  7199. load_vcrun2013()
  7200. {
  7201. # http://www.microsoft.com/en-us/download/details.aspx?id=40784
  7202. # 2014/07/26: 18f81495bc5e6b293c69c28b0ac088a96debbab2
  7203. # 2015/01/14: df7f0a73bfa077e483e51bfb97f5e2eceedfb6a3
  7204. w_download http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe df7f0a73bfa077e483e51bfb97f5e2eceedfb6a3
  7205. w_override_dlls native,builtin atl120 msvcp120 msvcr120 vcomp120
  7206. cd "$W_CACHE"/"$W_PACKAGE"
  7207. w_try "$WINE" vcredist_x86.exe $W_UNATTENDED_SLASH_Q
  7208. case "$W_ARCH" in
  7209. win64)
  7210. # Also install the 64 bit version
  7211. # 2015/10/19: 8bf41ba9eef02d30635a10433817dbb6886da5a2
  7212. w_download http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe 8bf41ba9eef02d30635a10433817dbb6886da5a2
  7213. if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"
  7214. then
  7215. rm -f "$W_TMP"/* # Avoid permission error
  7216. w_try_cabextract --directory="$W_TMP" vcredist_x64.exe
  7217. w_try_cabextract --directory="$W_TMP" "$W_TMP/a2"
  7218. w_try_cabextract --directory="$W_TMP" "$W_TMP/a3"
  7219. cp "$W_TMP"/F_CENTRAL_mfc120_x64 "$W_SYSTEM64_DLLS"/mfc120.dll
  7220. cp "$W_TMP"/F_CENTRAL_mfc120u_x64 "$W_SYSTEM64_DLLS"/mfc120u.dll
  7221. cp "$W_TMP"/F_CENTRAL_msvcp120_x64 "$W_SYSTEM64_DLLS"/msvcp120.dll
  7222. cp "$W_TMP"/F_CENTRAL_msvcr120_x64 "$W_SYSTEM64_DLLS"/msvcr120.dll
  7223. cp "$W_TMP"/F_CENTRAL_vcomp120_x64 "$W_SYSTEM64_DLLS"/vcomp120.dll
  7224. else
  7225. w_try "$WINE" vcredist_x64.exe $W_UNATTENDED_SLASH_Q
  7226. fi
  7227. ;;
  7228. esac
  7229. }
  7230. #----------------------------------------------------------------
  7231. w_metadata vcrun2015 dlls \
  7232. title="Visual C++ 2015 libraries (concrt140.dll,mfc140.dll,mfc140u.dll,mfcm140.dll,mfcm140u.dll,msvcp140.dll,vcamp140.dll,vccorlib140.dll,vcomp140.dll,vcruntime140.dll)" \
  7233. publisher="Microsoft" \
  7234. year="2015" \
  7235. media="download" \
  7236. file1="vc_redist.x86.exe" \
  7237. installed_file1="$W_SYSTEM32_DLLS_WIN/mfc140.dll"
  7238. load_vcrun2015()
  7239. {
  7240. # https://www.microsoft.com/en-us/download/details.aspx?id=48145
  7241. # 2015/10/12: bfb74e498c44d3a103ca3aa2831763fb417134d1
  7242. w_download https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x86.exe bfb74e498c44d3a103ca3aa2831763fb417134d1
  7243. if w_workaround_wine_bug 37781
  7244. then
  7245. w_warn "This may fail in non-XP mode, see https://bugs.winehq.org/show_bug.cgi?id=37781"
  7246. fi
  7247. w_override_dlls native,builtin atl140 msvcp140 msvcr140 vcomp140
  7248. cd "$W_CACHE"/"$W_PACKAGE"
  7249. w_try "$WINE" vc_redist.x86.exe $W_UNATTENDED_SLASH_Q
  7250. case "$W_ARCH" in
  7251. win64)
  7252. # Also install the 64 bit version
  7253. # 2015/10/12: 3155cb0f146b927fcc30647c1a904cd162548c8c
  7254. w_download https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe 3155cb0f146b927fcc30647c1a904cd162548c8c
  7255. if w_workaround_wine_bug 30713 "Manually extracting the 64-bit dlls"
  7256. then
  7257. rm -f "$W_TMP"/* # Avoid permission error
  7258. w_try_cabextract --directory="$W_TMP" vc_redist.x64.exe
  7259. w_try_cabextract --directory="$W_TMP" "$W_TMP/a10"
  7260. w_try_cabextract --directory="$W_TMP" "$W_TMP/a11"
  7261. cp "$W_TMP"/concrt140.dll "$W_SYSTEM64_DLLS"/concrt140.dll
  7262. cp "$W_TMP"/mfc140.dll "$W_SYSTEM64_DLLS"/mfc140.dll
  7263. cp "$W_TMP"/mfc140u.dll "$W_SYSTEM64_DLLS"/mfc140u.dll
  7264. cp "$W_TMP"/mfcm140.dll "$W_SYSTEM64_DLLS"/mfcm140.dll
  7265. cp "$W_TMP"/mfcm140u.dll "$W_SYSTEM64_DLLS"/mfcm140u.dll
  7266. cp "$W_TMP"/msvcp140.dll "$W_SYSTEM64_DLLS"/msvcp140.dll
  7267. cp "$W_TMP"/vcamp140.dll "$W_SYSTEM64_DLLS"/vcamp140.dll
  7268. cp "$W_TMP"/vccorlib140.dll "$W_SYSTEM64_DLLS"/vccorlib140.dll
  7269. cp "$W_TMP"/vcomp140.dll "$W_SYSTEM64_DLLS"/vcomp140.dll
  7270. cp "$W_TMP"/vcruntime140.dll "$W_SYSTEM64_DLLS"/vcruntime140.dll
  7271. w_override_dlls native,builtin api-ms-win-crt-conio-l1-1-0 api-ms-win-crt-heap-l1-1-0 api-ms-win-crt-locale-l1-1-0 api-ms-win-crt-math-l1-1-0.dll api-ms-win-crt-runtime-l1-1-0 api-ms-win-crt-stdio-l1-1-0 ucrtbase vcruntime140
  7272. cp "$W_TMP"/api_ms_win_crt_conio_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-conio-l1-1-0.dll
  7273. cp "$W_TMP"/api_ms_win_crt_heap_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-heap-l1-1-0.dll
  7274. cp "$W_TMP"/api_ms_win_crt_locale_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-locale-l1-1-0.dll
  7275. cp "$W_TMP"/api_ms_win_crt_math_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-math-l1-1-0.dll
  7276. cp "$W_TMP"/api_ms_win_crt_runtime_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-runtime-l1-1-0.dll
  7277. cp "$W_TMP"/api_ms_win_crt_stdio_l1_1_0.dll "$W_SYSTEM64_DLLS"/api-ms-win-crt-stdio-l1-1-0.dll
  7278. cp "$W_TMP"/ucrtbase.dll "$W_SYSTEM64_DLLS"/ucrtbase.dll
  7279. else
  7280. w_try "$WINE" vc_redist.x64.exe $W_UNATTENDED_SLASH_Q
  7281. fi
  7282. ;;
  7283. esac
  7284. }
  7285. #----------------------------------------------------------------
  7286. w_metadata vjrun20 dlls \
  7287. title="MS Visual J# 2.0 SE libraries (requires dotnet20)" \
  7288. publisher="Microsoft" \
  7289. year="2007" \
  7290. media="download" \
  7291. conflicts="dotnet11 dotnet20sp1 dotnet20sp2" \
  7292. file1="vjredist.exe" \
  7293. installed_file1="c:/windows/Microsoft.NET/Framework/VJSharp/VJSharpSxS10.dll"
  7294. load_vjrun20()
  7295. {
  7296. if [ $W_ARCH = win64 ]
  7297. then
  7298. w_warn "vjrun20 depends on dotnet20, which doesn't work on 64-bit wine yet. Skipping."
  7299. return
  7300. fi
  7301. w_call dotnet20
  7302. # See http://www.microsoft.com/downloads/details.aspx?FamilyId=E9D87F37-2ADC-4C32-95B3-B5E3A21BAB2C
  7303. w_download http://download.microsoft.com/download/9/2/3/92338cd0-759f-4815-8981-24b437be74ef/vjredist.exe 80a098e36b90d159da915aebfbfbacf35f302bd8
  7304. cd "$W_CACHE"/"$W_PACKAGE"
  7305. w_try "$WINE" vjredist.exe ${W_OPT_UNATTENDED:+ /q /C:"install $W_UNATTENDED_SLASH_QNT"}
  7306. }
  7307. #----------------------------------------------------------------
  7308. # FIXME: two exe's, one for win64, one for win32..
  7309. w_metadata windowscodecs dlls \
  7310. title="MS Windows Imaging Component" \
  7311. publisher="Microsoft" \
  7312. year="2006" \
  7313. media="download" \
  7314. file1="wic_x86_enu.exe" \
  7315. installed_file1="$W_SYSTEM32_DLLS_WIN/WindowsCodecs.dll"
  7316. load_windowscodecs()
  7317. {
  7318. # separate 32/64 bit installers:
  7319. if [ "$W_ARCH" = "win32" ] ; then
  7320. # https://www.microsoft.com/en-us/download/details.aspx?id=32
  7321. w_download http://download.microsoft.com/download/f/f/1/ff178bb1-da91-48ed-89e5-478a99387d4f/wic_x86_enu.exe 53c18652ac2f8a51303deb48a1b7abbdb1db427f
  7322. EXE="wic_x86_enu.exe"
  7323. else
  7324. # https://www.microsoft.com/en-us/download/details.aspx?id=1385
  7325. w_download https://download.microsoft.com/download/6/4/5/645FED5F-A6E7-44D9-9D10-FE83348796B0/wic_x64_enu.exe 4bdbf76a7bc96453306c893b4a7b2b8ae6127f67
  7326. EXE="wic_x64_enu.exe"
  7327. fi
  7328. # Avoid a file existence check.
  7329. w_try rm -f "$W_SYSTEM32_DLLS"/windowscodecs.dll "$W_SYSTEM32_DLLS"/windowscodecsext.dll "$W_SYSTEM32_DLLS"/photometadatahandler.dll
  7330. if [ "$W_ARCH" = "win64" ]
  7331. then
  7332. w_try rm -f "$W_SYSTEM64_DLLS"/windowscodecs.dll "$W_SYSTEM64_DLLS"/windowscodecsext.dll "$W_SYSTEM64_DLLS"/photometadatahandler.dll
  7333. fi
  7334. # AF says in appdb entry for .net 3.0 that windowscodecs has to be native only
  7335. w_override_dlls native windowscodecs windowscodecsext
  7336. # Always run the WIC installer in passive mode.
  7337. # See http://bugs.winehq.org/show_bug.cgi?id=16876 and
  7338. # http://bugs.winehq.org/show_bug.cgi?id=23232
  7339. cd "$W_CACHE/$W_PACKAGE"
  7340. if test -x /usr/bin/taskset && w_workaround_wine_bug 32859 "Working around possibly broken libX11"
  7341. then
  7342. TASKSET="taskset -c 0"
  7343. else
  7344. TASKSET=""
  7345. fi
  7346. w_try $TASKSET "$WINE" "$EXE" /passive
  7347. }
  7348. #----------------------------------------------------------------
  7349. w_metadata winhttp dlls \
  7350. title="MS Windows HTTP Services" \
  7351. publisher="Microsoft" \
  7352. year="2005" \
  7353. media="download" \
  7354. file1="../win2ksp4/W2KSP4_EN.EXE" \
  7355. installed_file1="$W_SYSTEM32_DLLS_WIN/winhttp.dll"
  7356. load_winhttp()
  7357. {
  7358. helper_win2ksp4 i386/new/winhttp.dl_
  7359. w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/new/winhttp.dl_
  7360. w_override_dlls native,builtin winhttp
  7361. }
  7362. #----------------------------------------------------------------
  7363. w_metadata wininet dlls \
  7364. title="MS Windows Internet API" \
  7365. publisher="Microsoft" \
  7366. year="2008" \
  7367. media="download" \
  7368. file1="../win2ksp4/W2KSP4_EN.EXE" \
  7369. installed_file1="$W_SYSTEM32_DLLS_WIN/wininet.dll"
  7370. load_wininet()
  7371. {
  7372. helper_win2ksp4 i386/wininet.dl_
  7373. w_try_cabextract --directory="$W_SYSTEM32_DLLS" "$W_TMP"/i386/wininet.dl_
  7374. w_override_dlls native,builtin wininet
  7375. }
  7376. #----------------------------------------------------------------
  7377. w_metadata wmi dlls \
  7378. title="Windows Management Instrumentation (aka WBEM) Core 1.5" \
  7379. publisher="Microsoft" \
  7380. year="2000" \
  7381. media="download" \
  7382. file1="wmi9x.exe" \
  7383. installed_file1="$W_SYSTEM32_DLLS_WIN/wbem/wbemcore.dll"
  7384. load_wmi()
  7385. {
  7386. if test $W_ARCH = win64
  7387. then
  7388. w_die "Installer doesn't support 64-bit architecture."
  7389. fi
  7390. # WMI for NT4.0 need validation: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c174cfb1-ef67-471d-9277-4c2b1014a31e
  7391. # See also http://www.microsoft.com/downloads/en/details.aspx?FamilyId=98A4C5BA-337B-4E92-8C18-A63847760EA5
  7392. w_download http://download.microsoft.com/download/platformsdk/wmi9x/1.5/W9X/EN-US/wmi9x.exe 62752e9c1b879688c26f205eebf07d3783906c3e
  7393. w_set_winver win98
  7394. w_override_dlls native,builtin wbemprox wmiutils
  7395. # Note: there is a crash in the background towards the end, doesn't seem to hurt; see http://bugs.winehq.org/show_bug.cgi?id=7920
  7396. cd "$W_CACHE/$W_PACKAGE"
  7397. w_try "$WINE" wmi9x.exe $W_UNATTENDED_SLASH_S
  7398. w_unset_winver
  7399. }
  7400. #----------------------------------------------------------------
  7401. w_metadata wsh56js dlls \
  7402. title="MS Windows scripting 5.6, jscript only, no cscript" \
  7403. publisher="Microsoft" \
  7404. year="2006" \
  7405. media="download" \
  7406. file1="Windows2000-KB917344-56-x86-enu.exe" \
  7407. installed_file1="c:/windows/inf/jscren.inf"
  7408. load_wsh56js()
  7409. {
  7410. # This installs jscript 5.6 (but not vbscript)
  7411. # See also http://www.microsoft.com/downloads/details.aspx?FamilyID=16dd21a1-c4ee-4eca-8b80-7bd1dfefb4f8&DisplayLang=en
  7412. w_download http://download.microsoft.com/download/b/c/3/bc3a0c36-fada-497d-a3de-8b0139766f3b/Windows2000-KB917344-56-x86-enu.exe add5f74c5bd4da6cfae47f8306de213ec6ed52c8
  7413. cd "$W_CACHE/$W_PACKAGE"
  7414. w_override_dlls native,builtin jscript
  7415. # setupapi looks at the versions in new and original jscript.dll, and wine's original is newer than wsh56js's, so have to nuke the original
  7416. w_try rm "$W_SYSTEM32_DLLS/jscript.dll"
  7417. w_try "$WINE" Windows2000-KB917344-56-x86-enu.exe $W_UNATTENDED_SLASH_Q
  7418. }
  7419. #----------------------------------------------------------------
  7420. w_metadata wsh56vb dlls \
  7421. title="MS Windows scripting 5.6, vbscript only, no cscript" \
  7422. publisher="Microsoft" \
  7423. year="2007" \
  7424. media="download" \
  7425. file1="vbs56men.exe" \
  7426. installed_file1="$W_SYSTEM32_DLLS_WIN/vbscript.dll"
  7427. load_wsh56vb()
  7428. {
  7429. # This installs vbscript 5.6 (but not jscript)
  7430. # See also http://www.microsoft.com/downloads/details.aspx?familyid=4F728263-83A3-464B-BCC0-54E63714BC75
  7431. w_download http://download.microsoft.com/download/IE60/Patch/Q318089/W9XNT4Me/EN-US/vbs56men.exe 48f14a93db33caff271da0c93f334971f9d7cb22
  7432. cd "$W_CACHE/$W_PACKAGE"
  7433. w_override_dlls native,builtin vbscript
  7434. # setupapi looks at the versions in new and original vbscript.dll, and wine's original is newer than wsh56vb's, so have to nuke the original
  7435. w_try rm "$W_SYSTEM32_DLLS/vbscript.dll"
  7436. w_try "$WINE" vbs56men.exe $W_UNATTENDED_SLASH_Q
  7437. }
  7438. #----------------------------------------------------------------
  7439. w_metadata wsh57 dlls \
  7440. title="MS Windows Scripting Host 5.7" \
  7441. publisher="Microsoft" \
  7442. year="2007" \
  7443. media="download" \
  7444. file1="scripten.exe" \
  7445. installed_file1="$W_SYSTEM32_DLLS_WIN/scrrun.dll"
  7446. load_wsh57()
  7447. {
  7448. # See also http://www.microsoft.com/downloads/details.aspx?FamilyID=47809025-D896-482E-A0D6-524E7E844D81&displaylang=en
  7449. w_download http://download.microsoft.com/download/4/4/d/44de8a9e-630d-4c10-9f17-b9b34d3f6417/scripten.exe b15c6a834b7029e2dfed22127cf905b06857e6f5
  7450. w_try_cabextract -d "$W_SYSTEM32_DLLS" "$W_CACHE"/wsh57/scripten.exe
  7451. # Wine doesn't provide the other dll's (yet?)
  7452. w_override_dlls native,builtin jscript scrrun vbscript cscript.exe wscript.exe
  7453. w_try_regsvr dispex.dll jscript.dll scrobj.dll scrrun.dll vbscript.dll wshcon.dll wshext.dll
  7454. }
  7455. #----------------------------------------------------------------
  7456. w_metadata xact dlls \
  7457. title="MS XACT Engine" \
  7458. publisher="Microsoft" \
  7459. year="2010" \
  7460. media="download" \
  7461. file1="../directx9/directx_feb2010_redist.exe" \
  7462. installed_file1="$W_SYSTEM32_DLLS_WIN/xactengine2_0.dll"
  7463. load_xact()
  7464. {
  7465. helper_directx_dl
  7466. # Extract xactengine?_?.dll, X3DAudio?_?.dll, xaudio?_?.dll, xapofx?_?.dll
  7467. w_try_cabextract -d "$W_TMP" -L -F '*_xact_*x86*' "$W_CACHE"/directx9/$DIRECTX_NAME
  7468. w_try_cabextract -d "$W_TMP" -L -F '*_x3daudio_*x86*' "$W_CACHE"/directx9/$DIRECTX_NAME
  7469. w_try_cabextract -d "$W_TMP" -L -F '*_xaudio_*x86*' "$W_CACHE"/directx9/$DIRECTX_NAME
  7470. for x in "$W_TMP"/*.cab
  7471. do
  7472. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'xactengine*.dll' "$x"
  7473. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'xaudio*.dll' "$x"
  7474. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'x3daudio*.dll' "$x"
  7475. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'xapofx*.dll' "$x"
  7476. done
  7477. if test "$W_ARCH" = "win64"
  7478. then
  7479. w_try_cabextract -d "$W_TMP" -L -F '*_xact_*x64*' "$W_CACHE"/directx9/$DIRECTX_NAME
  7480. w_try_cabextract -d "$W_TMP" -L -F '*_x3daudio_*x64*' "$W_CACHE"/directx9/$DIRECTX_NAME
  7481. w_try_cabextract -d "$W_TMP" -L -F '*_xaudio_*x64*' "$W_CACHE"/directx9/$DIRECTX_NAME
  7482. for x in "$W_TMP"/*x64.cab
  7483. do
  7484. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F 'xactengine*.dll' "$x"
  7485. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F 'xaudio*.dll' "$x"
  7486. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F 'x3daudio*.dll' "$x"
  7487. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F 'xapofx*.dll' "$x"
  7488. done
  7489. fi
  7490. # Register xactengine?_?.dll
  7491. for x in "$W_SYSTEM32_DLLS"/xactengine*
  7492. do
  7493. w_try_regsvr `basename "$x"`
  7494. done
  7495. # and xaudio?_?.dll, but not xaudio2_8 (unsupported)
  7496. for x in 0 1 2 3 4 5 6 7
  7497. do
  7498. w_try_regsvr `basename "$W_SYSTEM32_DLLS/xaudio2_${x}"`
  7499. done
  7500. }
  7501. #----------------------------------------------------------------
  7502. w_metadata xact_jun2010 dlls \
  7503. title="MS XACT Engine" \
  7504. publisher="Microsoft" \
  7505. year="2010" \
  7506. media="download" \
  7507. file1="../directx9/directx_Jun2010_redist.exe" \
  7508. installed_file1="$W_SYSTEM32_DLLS_WIN/xactengine2_0.dll"
  7509. load_xact_jun2010()
  7510. {
  7511. helper_directx_Jun2010
  7512. # Extract xactengine?_?.dll, X3DAudio?_?.dll, xaudio?_?.dll, xapofx?_?.dll
  7513. w_try_cabextract -d "$W_TMP" -L -F '*_xact_*x86*' "$W_CACHE"/directx9/$DIRECTX_NAME
  7514. w_try_cabextract -d "$W_TMP" -L -F '*_x3daudio_*x86*' "$W_CACHE"/directx9/$DIRECTX_NAME
  7515. w_try_cabextract -d "$W_TMP" -L -F '*_xaudio_*x86*' "$W_CACHE"/directx9/$DIRECTX_NAME
  7516. for x in "$W_TMP"/*.cab
  7517. do
  7518. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'xactengine*.dll' "$x"
  7519. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'xaudio*.dll' "$x"
  7520. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'x3daudio*.dll' "$x"
  7521. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'xapofx*.dll' "$x"
  7522. done
  7523. if test "$W_ARCH" = "win64"
  7524. then
  7525. w_try_cabextract -d "$W_TMP" -L -F '*_xact_*x64*' "$W_CACHE"/directx9/$DIRECTX_NAME
  7526. w_try_cabextract -d "$W_TMP" -L -F '*_x3daudio_*x64*' "$W_CACHE"/directx9/$DIRECTX_NAME
  7527. w_try_cabextract -d "$W_TMP" -L -F '*_xaudio_*x64*' "$W_CACHE"/directx9/$DIRECTX_NAME
  7528. for x in "$W_TMP"/*x64.cab
  7529. do
  7530. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F 'xactengine*.dll' "$x"
  7531. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F 'xaudio*.dll' "$x"
  7532. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F 'x3daudio*.dll' "$x"
  7533. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F 'xapofx*.dll' "$x"
  7534. done
  7535. fi
  7536. # Register xactengine?_?.dll
  7537. for x in "$W_SYSTEM32_DLLS"/xactengine*
  7538. do
  7539. w_try_regsvr `basename "$x"`
  7540. done
  7541. # and xaudio?_?.dll, but not xaudio2_8 (unsupported)
  7542. for x in 0 1 2 3 4 5 6 7
  7543. do
  7544. w_try_regsvr `basename "$W_SYSTEM32_DLLS/xaudio2_${x}"`
  7545. done
  7546. }
  7547. #----------------------------------------------------------------
  7548. w_metadata xinput dlls \
  7549. title="Microsoft XInput (Xbox controller support)" \
  7550. publisher="Microsoft" \
  7551. year="2010" \
  7552. media="download" \
  7553. file1="../directx9/directx_feb2010_redist.exe" \
  7554. installed_file1="$W_SYSTEM32_DLLS_WIN/xinput1_1.dll"
  7555. load_xinput()
  7556. {
  7557. helper_directx_dl
  7558. w_try_cabextract -d "$W_TMP" -L -F '*_xinput_*x86*' "$W_CACHE"/directx9/$DIRECTX_NAME
  7559. for x in "$W_TMP"/*.cab
  7560. do
  7561. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F 'xinput*.dll' "$x"
  7562. done
  7563. if test "$W_ARCH" = "win64"
  7564. then
  7565. w_try_cabextract -d "$W_TMP" -L -F '*_xinput_*x64*' "$W_CACHE"/directx9/$DIRECTX_NAME
  7566. for x in "$W_TMP"/*x64.cab
  7567. do
  7568. w_try_cabextract -d "$W_SYSTEM64_DLLS" -L -F 'xinput*.dll' "$x"
  7569. done
  7570. fi
  7571. w_override_dlls native xinput1_1
  7572. w_override_dlls native xinput1_2
  7573. w_override_dlls native xinput1_3
  7574. w_override_dlls native xinput9_1_0
  7575. }
  7576. #----------------------------------------------------------------
  7577. # FIXME: extend metadata to allow file1_en, file1_fr, etc.
  7578. w_metadata xmllite dlls \
  7579. title="MS xmllite dll" \
  7580. publisher="Microsoft" \
  7581. year="2006" \
  7582. media="download" \
  7583. installed_file1="$W_SYSTEM32_DLLS_WIN/xmllite.dll"
  7584. load_xmllite()
  7585. {
  7586. case $LANG in
  7587. en*) w_download http://download.microsoft.com/download/f/9/6/f964059a-3747-4ed8-9326-ba1e639031b1/WindowsXP-KB915865-v11-x86-ENU.exe 226d246a1c64e693791de5c727509002d089b0d5 ;;
  7588. fr*) w_download http://download.microsoft.com/download/4/1/d/41de58a0-6715-4d3e-99e7-ff0c11283d1b/WindowsXP-KB915865-v11-x86-FRA.exe abb70b6a96be7dce453b00877739e90c6f3efba0 ;;
  7589. de*) w_download http://download.microsoft.com/download/9/b/6/9b67efdb-cce3-4247-a2e0-386673859a1b/WindowsXP-KB915865-v11-x86-DEU.exe a03a325815acf9d624db58ab94a140a5586e64c8 ;;
  7590. ja*) w_download http://download.microsoft.com/download/f/5/c/f5cf73b7-4dc4-4042-815d-29d2fd24ae6f/WindowsXP-KB915865-v11-x86-JPN.exe eaf443d04d9b13cb86f927f8a7fe372268386395 ;;
  7591. *) w_die "sorry, xmllite install not yet implemented for language $LANG" ;;
  7592. esac
  7593. # Doesn't install in newer versions:
  7594. w_set_winver winxp
  7595. cd "$W_CACHE/$W_PACKAGE"
  7596. w_override_dlls native xmllite
  7597. case $LANG in
  7598. en*) w_try "$WINE" WindowsXP-KB915865-v11-x86-ENU.exe $W_UNATTENDED_SLASH_Q ;;
  7599. fr*) w_try "$WINE" WindowsXP-KB915865-v11-x86-FRA.exe $W_UNATTENDED_SLASH_Q ;;
  7600. de*) w_try "$WINE" WindowsXP-KB915865-v11-x86-DEU.exe $W_UNATTENDED_SLASH_Q ;;
  7601. ja*) w_try "$WINE" WindowsXP-KB915865-v11-x86-JPN.exe $W_UNATTENDED_SLASH_Q ;;
  7602. esac
  7603. w_unset_winver
  7604. }
  7605. #----------------------------------------------------------------
  7606. w_metadata xna31 dlls \
  7607. title="MS XNA Framework Redistributable 3.1" \
  7608. publisher="Microsoft" \
  7609. year="2009" \
  7610. media="download" \
  7611. file1="xnafx31_redist.msi" \
  7612. installed_file1="C:/windows/assembly/GAC_32/Microsoft.Xna.Framework.Game/3.1.0.0__6d5c3888ef60e27d/Microsoft.Xna.Framework.Game.dll"
  7613. load_xna31()
  7614. {
  7615. w_call dotnet20sp2
  7616. w_download http://download.microsoft.com/download/5/9/1/5912526C-B950-4662-99B6-119A83E60E5C/xnafx31_redist.msi bdd33b677c9576a63ff2a6f65e12c0563cc116e6
  7617. cd "$W_CACHE/$W_PACKAGE"
  7618. w_try "$WINE" msiexec $W_UNATTENDED_SLASH_QUIET /i $file1
  7619. }
  7620. #----------------------------------------------------------------
  7621. w_metadata xna40 dlls \
  7622. title="MS XNA Framework Redistributable 4.0" \
  7623. publisher="Microsoft" \
  7624. year="2010" \
  7625. media="download" \
  7626. file1="xnafx40_redist.msi" \
  7627. installed_file1="$W_PROGRAMS_X86_WIN/Common Files/Microsoft Shared/XNA/Framework/v4.0/XnaNative.dll"
  7628. load_xna40()
  7629. {
  7630. if w_workaround_bug 30718
  7631. then
  7632. w_warn "$W_PACKAGE may not install properly in wine yet"
  7633. fi
  7634. w_call dotnet45
  7635. # http://www.microsoft.com/en-us/download/details.aspx?id=20914
  7636. w_download http://download.microsoft.com/download/A/C/2/AC2C903B-E6E8-42C2-9FD7-BEBAC362A930/xnafx40_redist.msi 49efdc29f65fc8263c196338552c7009fc96c5de
  7637. cd "$W_CACHE/$W_PACKAGE"
  7638. w_try "$WINE" msiexec $W_UNATTENDED_SLASH_QUIET /i $file1
  7639. }
  7640. #----------------------------------------------------------------
  7641. w_metadata xvid dlls \
  7642. title="Xvid Video Codec" \
  7643. publisher="xvid.org" \
  7644. year="2009" \
  7645. media="download" \
  7646. file1="Xvid-1.3.2-20110601.exe" \
  7647. installed_file1="$W_PROGRAMS_X86_WIN/Xvid/xvid.ico"
  7648. load_xvid()
  7649. {
  7650. w_call vcrun6
  7651. w_download http://www.koepi.info/Xvid-1.3.2-20110601.exe 0a11498a96f75ad019c4c7d06161504140337dc0
  7652. cd "$W_CACHE"/"$W_PACKAGE"
  7653. w_try "$WINE" $file1 ${W_OPT_UNATTENDED:+ --mode unattended --decode_divx 1 --decode_3ivx 1 --decode_other 1}
  7654. }
  7655. #----------------------------------------------------------------
  7656. # Fonts
  7657. #----------------------------------------------------------------
  7658. w_metadata baekmuk fonts \
  7659. title="Baekmuk Korean fonts" \
  7660. publisher="Wooderart Inc. / kldp.net" \
  7661. year="1999" \
  7662. media="download" \
  7663. file1="fonts-baekmuk_2.2.orig.tar.gz" \
  7664. installed_file1="$W_FONTSDIR_WIN/batang.ttf"
  7665. load_baekmuk()
  7666. {
  7667. # See http://kldp.net/projects/baekmuk for project page
  7668. # Need to download from Debian as the project page has unique captcha tokens per visitor
  7669. w_download http://http.debian.net/debian/pool/main/f/fonts-baekmuk/fonts-baekmuk_2.2.orig.tar.gz afdee34f700007de6ea87b43c92a88b7385ba65b
  7670. cd "$W_TMP"
  7671. tar zxvf "$W_CACHE/$W_PACKAGE/$file1" baekmuk-ttf-2.2/ttf
  7672. w_try mv baekmuk-ttf-2.2/ttf/*.ttf "$W_FONTSDIR_UNIX"
  7673. w_register_font batang.ttf "Baekmuk Batang"
  7674. w_register_font gulim.ttf "Baekmuk Gulim"
  7675. w_register_font dotum.ttf "Baekmuk Dotum"
  7676. w_register_font hline.ttf "Baekmuk Headline"
  7677. }
  7678. #----------------------------------------------------------------
  7679. w_metadata cjkfonts fonts \
  7680. title="All Chinese, Japanese, Korean fonts and aliases" \
  7681. publisher="various" \
  7682. date="1999-2010" \
  7683. media="download"
  7684. load_cjkfonts()
  7685. {
  7686. w_call fakechinese
  7687. w_call fakejapanese
  7688. w_call fakekorean
  7689. w_call unifont
  7690. }
  7691. #----------------------------------------------------------------
  7692. w_metadata cambria fonts \
  7693. title="MS Cambria font" \
  7694. publisher="Microsoft" \
  7695. year="2009" \
  7696. media="download" \
  7697. file1="PowerPointViewer.exe" \
  7698. installed_file1="$W_FONTSDIR_WIN/cambria.ttc"
  7699. load_cambria()
  7700. {
  7701. # http://www.microsoft.com/en-us/download/details.aspx?id=13
  7702. w_download_to consolas http://download.microsoft.com/download/E/6/7/E675FFFC-2A6D-4AB0-B3EB-27C9F8C8F696/PowerPointViewer.exe ab48a8ebac88219c84f293c6c1e81f1a0f420da6
  7703. w_try_cabextract -d "$W_TMP" -L -F ppviewer.cab "$W_CACHE"/consolas/PowerPointViewer.exe
  7704. w_try_cabextract -d "$W_FONTSDIR_UNIX" -L -F 'CAMBRIA*.TT*' "$W_TMP"/ppviewer.cab
  7705. w_register_font cambria.ttc "Cambria"
  7706. w_register_font cambriab.ttf "Cambria Bold"
  7707. w_register_font cambriai.ttf "Cambria Italic"
  7708. w_register_font cambriaz.ttf "Cambria Bold Italic"
  7709. }
  7710. #----------------------------------------------------------------
  7711. w_metadata constantia fonts \
  7712. title="MS Constantia font" \
  7713. publisher="Microsoft" \
  7714. year="2009" \
  7715. media="download" \
  7716. file1="PowerPointViewer.exe" \
  7717. installed_file1="$W_FONTSDIR_WIN/constan.ttf"
  7718. load_constantia()
  7719. {
  7720. # http://www.microsoft.com/en-us/download/details.aspx?id=13
  7721. w_download_to consolas http://download.microsoft.com/download/E/6/7/E675FFFC-2A6D-4AB0-B3EB-27C9F8C8F696/PowerPointViewer.exe ab48a8ebac88219c84f293c6c1e81f1a0f420da6
  7722. w_try_cabextract -d "$W_TMP" -L -F ppviewer.cab "$W_CACHE"/consolas/PowerPointViewer.exe
  7723. w_try_cabextract -d "$W_FONTSDIR_UNIX" -L -F 'CONSTAN*.TTF' "$W_TMP"/ppviewer.cab
  7724. w_register_font constan.ttf "Constantia"
  7725. w_register_font constanb.ttf "Constantia Bold"
  7726. w_register_font constani.ttf "Constantia Italic"
  7727. w_register_font constanz.ttf "Constantia Bold Italic"
  7728. }
  7729. #----------------------------------------------------------------
  7730. w_metadata consolas fonts \
  7731. title="MS Consolas Console font" \
  7732. publisher="Microsoft" \
  7733. year="2011" \
  7734. media="download" \
  7735. file1="PowerPointViewer.exe" \
  7736. installed_file1="$W_FONTSDIR_WIN/consola.ttf"
  7737. load_consolas()
  7738. {
  7739. # http://www.microsoft.com/en-us/download/details.aspx?id=13
  7740. w_download http://download.microsoft.com/download/E/6/7/E675FFFC-2A6D-4AB0-B3EB-27C9F8C8F696/PowerPointViewer.exe ab48a8ebac88219c84f293c6c1e81f1a0f420da6
  7741. w_try_cabextract -d "$W_TMP" -L -F ppviewer.cab "$W_CACHE"/consolas/PowerPointViewer.exe
  7742. w_try_cabextract -d "$W_FONTSDIR_UNIX" -L -F 'CONSOL*.TTF' "$W_TMP"/ppviewer.cab
  7743. w_register_font consola.ttf "Consoleas"
  7744. w_register_font consolab.ttf "Consoleas Bold"
  7745. w_register_font consolai.ttf "Consoleas Italic"
  7746. w_register_font consolaz.ttf "Consoleas Bold Italic"
  7747. }
  7748. #----------------------------------------------------------------
  7749. w_metadata corefonts fonts \
  7750. title="MS Arial, Courier, Times fonts" \
  7751. publisher="Microsoft" \
  7752. year="2008" \
  7753. media="download" \
  7754. file1="arial32.exe" \
  7755. installed_file1="$W_FONTSDIR_WIN/Arial.TTF"
  7756. load_corefonts()
  7757. {
  7758. # FIXME: why is this commented out? Should be removed or enabled.
  7759. #w_download ftp://ftp.fi.debian.org/gentoo/distfiles/andale32.exe c4db8cbe42c566d12468f5fdad38c43721844c69
  7760. w_download ftp://ftp.fi.debian.org/gentoo/distfiles/arial32.exe 6d75f8436f39ab2da5c31ce651b7443b4ad2916e
  7761. w_download ftp://ftp.fi.debian.org/gentoo/distfiles/arialb32.exe d45cdab84b7f4c1efd6d1b369f50ed0390e3d344
  7762. w_download ftp://ftp.fi.debian.org/gentoo/distfiles/comic32.exe 2371d0327683dcc5ec1684fe7c275a8de1ef9a51
  7763. w_download ftp://ftp.fi.debian.org/gentoo/distfiles/courie32.exe 06a745023c034f88b4135f5e294fece1a3c1b057
  7764. w_download ftp://ftp.fi.debian.org/gentoo/distfiles/georgi32.exe 90e4070cb356f1d811acb943080bf97e419a8f1e
  7765. w_download ftp://ftp.fi.debian.org/gentoo/distfiles/impact32.exe 86b34d650cfbbe5d3512d49d2545f7509a55aad2
  7766. w_download ftp://ftp.fi.debian.org/gentoo/distfiles/times32.exe 20b79e65cdef4e2d7195f84da202499e3aa83060
  7767. w_download ftp://ftp.fi.debian.org/gentoo/distfiles/trebuc32.exe 50aab0988423efcc9cf21fac7d64d534d6d0a34a
  7768. w_download ftp://ftp.fi.debian.org/gentoo/distfiles/verdan32.exe f5b93cedf500edc67502f116578123618c64a42a
  7769. w_download ftp://ftp.fi.debian.org/gentoo/distfiles/webdin32.exe 2fb4a42c53e50bc70707a7b3c57baf62ba58398f
  7770. # Natively installed versions of these fonts will cause the installers
  7771. # to exit silently. Because there are apps out there that depend on the
  7772. # files being present in the Windows font directory we use cabextract
  7773. # to obtain the files and register the fonts by hand.
  7774. # Andale needs a FontSubstitutes entry
  7775. # w_try_cabextract --directory="$W_TMP" "$W_CACHE"/corefonts/andale32.exe
  7776. # Display EULA
  7777. test x"$W_UNATTENDED_SLASH_Q" = x"" || w_try "$WINE" "$W_CACHE"/corefonts/arial32.exe $W_UNATTENDED_SLASH_Q
  7778. w_try_cabextract -q --directory="$W_TMP" "$W_CACHE"/corefonts/arial32.exe
  7779. w_try cp -f "$W_TMP"/Arial*.TTF "$W_FONTSDIR_UNIX"
  7780. w_register_font Arial.TTF "Arial"
  7781. w_register_font Arialbd.TTF "Arial Bold"
  7782. w_register_font Arialbi.TTF "Arial Bold Italic"
  7783. w_register_font Ariali.TTF "Arial Italic"
  7784. w_try_cabextract -q --directory="$W_TMP" "$W_CACHE"/corefonts/arialb32.exe
  7785. w_try cp -f "$W_TMP"/AriBlk.TTF "$W_FONTSDIR_UNIX"
  7786. w_register_font AriBlk.TTF "Arial Black"
  7787. w_try_cabextract -q --directory="$W_TMP" "$W_CACHE"/corefonts/comic32.exe
  7788. w_try cp -f "$W_TMP"/Comic*.TTF "$W_FONTSDIR_UNIX"
  7789. w_register_font Comic.TTF "Comic Sans MS"
  7790. w_register_font Comicbd.TTF "Comic Sans MS Bold"
  7791. w_try_cabextract -q --directory="$W_TMP" "$W_CACHE"/corefonts/courie32.exe
  7792. w_try cp -f "$W_TMP"/cour*.ttf "$W_FONTSDIR_UNIX"
  7793. w_register_font Cour.TTF "Courier New"
  7794. w_register_font CourBD.TTF "Courier New Bold"
  7795. w_register_font CourBI.TTF "Courier New Bold Italic"
  7796. w_register_font Couri.TTF "Courier New Italic"
  7797. w_try_cabextract -q --directory="$W_TMP" "$W_CACHE"/corefonts/georgi32.exe
  7798. w_try cp -f "$W_TMP"/Georgia*.TTF "$W_FONTSDIR_UNIX"
  7799. w_register_font Georgia.TTF "Georgia"
  7800. w_register_font Georgiab.TTF "Georgia Bold"
  7801. w_register_font Georgiaz.TTF "Georgia Bold Italic"
  7802. w_register_font Georgiai.TTF "Georgia Italic"
  7803. w_try_cabextract -q --directory="$W_TMP" "$W_CACHE"/corefonts/impact32.exe
  7804. w_try cp -f "$W_TMP"/Impact.TTF "$W_FONTSDIR_UNIX"
  7805. w_register_font Impact.TTF "Impact"
  7806. w_try_cabextract -q --directory="$W_TMP" "$W_CACHE"/corefonts/times32.exe
  7807. w_try cp -f "$W_TMP"/Times*.TTF "$W_FONTSDIR_UNIX"
  7808. w_register_font Times.TTF "Times New Roman"
  7809. w_register_font Timesbd.TTF "Times New Roman Bold"
  7810. w_register_font Timesbi.TTF "Times New Roman Bold Italic"
  7811. w_register_font Timesi.TTF "Times New Roman Italic"
  7812. w_try_cabextract -q --directory="$W_TMP" "$W_CACHE"/corefonts/trebuc32.exe
  7813. w_try cp -f "$W_TMP"/[tT]rebuc*.ttf "$W_FONTSDIR_UNIX"
  7814. w_register_font Trebuc.TTF "Trebucet MS"
  7815. w_register_font Trebucbd.TTF "Trebucet MS Bold"
  7816. w_register_font Trebucbi.TTF "Trebucet MS Bold Italic"
  7817. w_register_font Trebucit.TTF "Trebucet MS Italic"
  7818. w_try_cabextract -q --directory="$W_TMP" "$W_CACHE"/corefonts/verdan32.exe
  7819. w_try cp -f "$W_TMP"/Verdana*.TTF "$W_FONTSDIR_UNIX"
  7820. w_register_font Verdana.TTF "Verdana"
  7821. w_register_font Verdanab.TTF "Verdana Bold"
  7822. w_register_font Verdanaz.TTF "Verdana Bold Italic"
  7823. w_register_font Verdanai.TTF "Verdana Italic"
  7824. w_try_cabextract -q --directory="$W_TMP" "$W_CACHE"/corefonts/webdin32.exe
  7825. w_try cp -f "$W_TMP"/Webdings.TTF "$W_FONTSDIR_UNIX"
  7826. w_register_font Webdings.TTF "Webdings"
  7827. }
  7828. #----------------------------------------------------------------
  7829. w_metadata droid fonts \
  7830. title="Droid fonts" \
  7831. publisher="Ascender Corporation" \
  7832. year="2009" \
  7833. media="download" \
  7834. file1="DroidSans-Bold.ttf" \
  7835. installed_file1="$W_FONTSDIR_WIN/DroidSans-Bold.ttf"
  7836. do_droid() {
  7837. w_download ${DROID_URL}$1'?raw=true' $3 $1
  7838. w_try cp -f "$W_CACHE"/droid/$1 "$W_FONTSDIR_UNIX"
  7839. w_register_font $1 "$2"
  7840. }
  7841. load_droid()
  7842. {
  7843. # See http://en.wikipedia.org/wiki/Droid_(font)
  7844. # Old url was http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=data/fonts/'
  7845. # Then it was https://github.com/android/platform_frameworks_base/blob/master/data/fonts/
  7846. # but the fonts are no longer in master. Using an older commit instead:
  7847. DROID_URL='https://github.com/android/platform_frameworks_base/blob/feef9887e8f8eb6f64fc1b4552c02efb5755cdc1/data/fonts/'
  7848. do_droid DroidSans-Bold.ttf "Droid Sans Bold" 560e4bcafdebaf29645fbf92633a2ae0d2f9801f
  7849. do_droid DroidSansFallback.ttf "Droid Sans Fallback" c5e4f11e2f1d0b84e5f268a7ebfd28b54dc6bcdc
  7850. do_droid DroidSansJapanese.ttf "Droid Sans Japanese" b3a248c11692aa88a30eb25df425b8910fe05dc5
  7851. do_droid DroidSansMono.ttf "Droid Sans Mono" 133fb6cf26ea073b456fb557b94ce8c46143b117
  7852. do_droid DroidSans.ttf "Droid Sans" 62f2841f61e4be66a0303cd1567ed2d300b4e31c
  7853. do_droid DroidSerif-BoldItalic.ttf "Droid Serif Bold Italic" 41ce5fef1bd0164caed6958885d7285c841c95f1
  7854. do_droid DroidSerif-Bold.ttf "Droid Serif Bold" 2775e9b8e96a3e9593acb5cf6923abb2e6008187
  7855. do_droid DroidSerif-Italic.ttf "Droid Serif Italic" e91cc6c1ae9a6699683bcee024551cb58d1be790
  7856. do_droid DroidSerif-Regular.ttf "Droid Serif" a689ce25a4063cf501c12d616f832f2235b5b93b
  7857. }
  7858. #----------------------------------------------------------------
  7859. w_metadata eufonts fonts \
  7860. title="Updated fonts for Romanian and Bulgarian" \
  7861. publisher="Microsoft" \
  7862. year="2008" \
  7863. media="download" \
  7864. file1="EUupdate.EXE" \
  7865. installed_file1="$W_FONTSDIR_WIN/trebucbd.ttf"
  7866. load_eufonts()
  7867. {
  7868. # https://www.microsoft.com/downloads/details.aspx?FamilyID=0ec6f335-c3de-44c5-a13d-a1e7cea5ddea&displaylang=en
  7869. w_download http://download.microsoft.com/download/a/1/8/a180e21e-9c2b-4b54-9c32-bf7fd7429970/EUupdate.EXE 9b076c40cb63aa0d8512aa8e610ba11d3466e441
  7870. w_try_cabextract -q --directory="$W_TMP" "$W_CACHE"/eufonts/EUupdate.EXE
  7871. w_try cp -f "$W_TMP"/*.ttf "$W_FONTSDIR_UNIX"
  7872. w_register_font ArialBI.ttf "Arial Bold Italic"
  7873. w_register_font ArialI.ttf "Arial Italic"
  7874. w_register_font Arial.ttf "Arial"
  7875. w_register_font TimesBd.ttf "Times New Roman Bold"
  7876. w_register_font TimesBI.ttf "Times New Roman Bold Italic"
  7877. w_register_font TimesI.ttf "Times New Roman Italic"
  7878. w_register_font Times.ttf "Times New Roman"
  7879. w_register_font trebucbd.ttf "Trebuchet Bold"
  7880. w_register_font trebucbi.ttf "Trebuchet Bold Italic"
  7881. w_register_font trebucit.ttf "Trebuchet Italic"
  7882. w_register_font trebuc.ttf "Trebuchet"
  7883. w_register_font Verdanab.ttf "Verdana Bold"
  7884. w_register_font Verdanai.ttf "Verdana Italian"
  7885. w_register_font Verdana.ttf "Verdana"
  7886. w_register_font Verdanaz.ttf "Verdana Bold Italic"
  7887. }
  7888. #----------------------------------------------------------------
  7889. w_metadata fakechinese fonts \
  7890. title="Creates aliases for Chinese fonts using WenQuanYi fonts" \
  7891. publisher="wenq.org" \
  7892. year="2009"
  7893. load_fakechinese()
  7894. {
  7895. w_call wenquanyi
  7896. # Loads Wenquanyi fonts and sets aliases for Microsoft Chinese fonts
  7897. # Reference : http://en.wikipedia.org/wiki/List_of_Microsoft_Windows_fonts
  7898. w_register_font_replacement "Microsoft JhengHei" "WenQuanYi Micro Hei"
  7899. w_register_font_replacement "Microsoft YaHei" "WenQuanYi Micro Hei"
  7900. w_register_font_replacement "SimHei" "WenQuanYi Micro Hei"
  7901. w_register_font_replacement "DFKai-SB" "WenQuanYi Micro Hei"
  7902. w_register_font_replacement "FangSong" "WenQuanYi Micro Hei"
  7903. w_register_font_replacement "KaiTi" "WenQuanYi Micro Hei"
  7904. w_register_font_replacement "PMingLiU" "WenQuanYi Micro Hei"
  7905. w_register_font_replacement "MingLiU" "WenQuanYi Micro Hei"
  7906. w_register_font_replacement "NSimSun" "WenQuanYi Micro Hei"
  7907. w_register_font_replacement "SimKai" "WenQuanYi Micro Hei"
  7908. w_register_font_replacement "SimSun" "WenQuanYi Micro Hei"
  7909. }
  7910. #----------------------------------------------------------------
  7911. w_metadata fakejapanese fonts \
  7912. title="Creates aliases for Japanese fonts using Takao fonts" \
  7913. publisher="Jun Kobayashi" \
  7914. year="2010"
  7915. load_fakejapanese()
  7916. {
  7917. w_call takao
  7918. # Loads Takao fonts and sets aliases for MS Gothic, MS UI Gothic, and MS PGothic, mainly for Japanese language support
  7919. # Aliases to set:
  7920. # MS Gothic --> TakaoGothic
  7921. # MS UI Gothic --> TakaoGothic
  7922. # MS PGothic --> TakaoPGothic
  7923. # MS Mincho --> TakaoMincho
  7924. # MS PMincho --> TakaoPMincho
  7925. # These aliases were taken from what was listed in Ubuntu's fontconfig definitions.
  7926. w_register_font_replacement "MS Gothic" "TakaoGothic"
  7927. w_register_font_replacement "MS UI Gothic" "TakaoGothic"
  7928. w_register_font_replacement "MS PGothic" "TakaoPGothic"
  7929. w_register_font_replacement "MS Mincho" "TakaoMincho"
  7930. w_register_font_replacement "MS PMincho" "TakaoPMincho"
  7931. }
  7932. #----------------------------------------------------------------
  7933. w_metadata fakejapanese_ipamona fonts \
  7934. title="Creates aliases for Japanese fonts using IPAMona fonts" \
  7935. publisher="Jun Kobayashi" \
  7936. year="2008"
  7937. load_fakejapanese_ipamona()
  7938. {
  7939. w_call ipamona
  7940. # Aliases to set:
  7941. # MS UI Gothic --> IPAMonaUIGothic
  7942. # MS Gothic (MS ゴシック) --> IPAMonaGothic
  7943. # MS PGothic (MS Pゴシック) --> IPAMonaPGothic
  7944. # MS Mincho (MS 明朝) --> IPAMonaMincho
  7945. # MS PMincho (MS P明朝) --> IPAMonaPMincho
  7946. jpname_msgothic="$(echo "MS ゴシック" | iconv -f utf8 -t cp932)"
  7947. jpname_mspgothic="$(echo "MS Pゴシック" | iconv -f utf8 -t cp932)"
  7948. jpname_msmincho="$(echo "MS 明朝" | iconv -f utf8 -t cp932)"
  7949. jpname_mspmincho="$(echo "MS P明朝" | iconv -f utf8 -t cp932)"
  7950. w_register_font_replacement "MS UI Gothic" "IPAMonaUIGothic"
  7951. w_register_font_replacement "MS Gothic" "IPAMonaGothic"
  7952. w_register_font_replacement "MS PGothic" "IPAMonaPGothic"
  7953. w_register_font_replacement "MS Mincho" "IPAMonaMincho"
  7954. w_register_font_replacement "MS PMincho" "IPAMonaPMincho"
  7955. w_register_font_replacement "$jpname_msgothic" "IPAMonaGothic"
  7956. w_register_font_replacement "$jpname_mspgothic" "IPAMonaPGothic"
  7957. w_register_font_replacement "$jpname_msmincho" "IPAMonaMincho"
  7958. w_register_font_replacement "$jpname_mspmincho" "IPAMonaPMincho"
  7959. }
  7960. #----------------------------------------------------------------
  7961. w_metadata fakekorean fonts \
  7962. title="Creates aliases for Korean fonts using Baekmuk fonts" \
  7963. publisher="Wooderart Inc. / kldp.net" \
  7964. year="1999"
  7965. load_fakekorean()
  7966. {
  7967. w_call baekmuk
  7968. # Loads Baekmuk fonts and sets as an alias for Gulim, Dotum, and Batang for Korean language support
  7969. # Aliases to set:
  7970. # Gulim --> Baekmuk Gulim
  7971. # GulimChe --> Baekmuk Gulim
  7972. # Batang --> Baekmuk Batang
  7973. # BatangChe --> Baekmuk Batang
  7974. # Dotum --> Baekmuk Dotum
  7975. # DotumChe --> Baekmuk Dotum
  7976. w_register_font_replacement "Gulim" "Baekmuk Gulim"
  7977. w_register_font_replacement "GulimChe" "Baekmuk Gulim"
  7978. w_register_font_replacement "Batang" "Baekmuk Batang"
  7979. w_register_font_replacement "BatangChe" "Baekmuk Batang"
  7980. w_register_font_replacement "Dotum" "Baekmuk Dotum"
  7981. w_register_font_replacement "DotumChe" "Baekmuk Dotum"
  7982. }
  7983. #----------------------------------------------------------------
  7984. w_metadata fontfix settings \
  7985. title="Check for broken fonts"
  7986. load_fontfix()
  7987. {
  7988. # some versions of ukai.ttf and uming.ttf crash .net and picasa
  7989. # See http://bugs.winehq.org/show_bug.cgi?id=7098#c9
  7990. # Very unlikely to still be around, so downgrade to fatal warning
  7991. if test -f /usr/share/fonts/truetype/arphic/ukai.ttf
  7992. then
  7993. w_get_sha1sum /usr/share/fonts/truetype/arphic/ukai.ttf
  7994. if [ "$_W_gotsum"x = "96e1121f89953e5169d3e2e7811569148f573985"x ]
  7995. then
  7996. w_die "Your installed ukai.ttf is known to be broken. Upgrade your ttf-arphic font package!"
  7997. fi
  7998. fi
  7999. if test -f /usr/share/fonts/truetype/arphic/uming.ttf
  8000. then
  8001. w_get_sha1sum /usr/share/fonts/truetype/arphic/uming.ttf
  8002. if [ "$_W_gotsum"x = "2a4f4a69e343c21c24d044b2cb19fd4f0decc82c"x ]
  8003. then
  8004. w_die "Your installed uming.ttf is known to be broken. Upgrade your ttf-uming font package!"
  8005. fi
  8006. fi
  8007. # Focht says Samyak is bad news, and font substitution isn't a good workaround.
  8008. # I've seen psdkwin7 setup crash because of this; the symptom was a messagebox saying
  8009. # SDKSetup encountered an error: The type initializer for 'Microsoft.WizardFramework.WizardSettings' threw an exception
  8010. # and WINEDEBUG=+relay,+seh shows an exception very quickly after
  8011. # Call KERNEL32.CreateFileW(0c83b36c L"Z:\\USR\\SHARE\\FONTS\\TRUETYPE\\TTF-ORIYA-FONTS\\SAMYAK-ORIYA.TTF",80000000,00000001,00000000,00000003,00000080,00000000) ret=70d44091
  8012. if xlsfonts 2>/dev/null | egrep -i "samyak.*oriya"
  8013. then
  8014. w_die "Please uninstall the Samyak/Oriya font, e.g. 'sudo dpkg -r ttf-oriya-fonts', then log out and log in again. That font causes strange crashes in .net programs."
  8015. fi
  8016. }
  8017. #----------------------------------------------------------------
  8018. w_metadata ipamona fonts \
  8019. title="IPAMona Japanese fonts" \
  8020. publisher="Jun Kobayashi" \
  8021. year="2008" \
  8022. media="download" \
  8023. file1="opfc-ModuleHP-1.1.1_withIPAMonaFonts-1.0.8.tar.gz" \
  8024. installed_file1="$W_FONTSDIR_WIN/ipag-mona.ttf" \
  8025. homepage="http://www.geocities.jp/ipa_mona/"
  8026. load_ipamona()
  8027. {
  8028. w_download http://www.geocities.jp/ipa_mona/$file1 57dd13ab58c0005d3ee2932539e4987ab0242bc7
  8029. cd "$W_TMP"
  8030. gunzip -dc "$W_CACHE/$W_PACKAGE/$file1" | tar -xf -
  8031. w_try mv *IPAMonaFonts*/fonts/*.ttf "$W_FONTSDIR_UNIX"
  8032. w_register_font ipagui-mona.ttf "IPAMonaUIGothic"
  8033. w_register_font ipag-mona.ttf "IPAMonaGothic"
  8034. w_register_font ipagp-mona.ttf "IPAMonaPGothic"
  8035. w_register_font ipam-mona.ttf "IPAMonaMincho"
  8036. w_register_font ipamp-mona.ttf "IPAMonaPMincho"
  8037. }
  8038. #----------------------------------------------------------------
  8039. w_metadata liberation fonts \
  8040. title="Red Hat Liberation fonts (Sans, Serif, Mono)" \
  8041. publisher="Red Hat" \
  8042. year="2008" \
  8043. media="download" \
  8044. file1="liberation-fonts-1.04.tar.gz" \
  8045. installed_file1="$W_FONTSDIR_WIN/LiberationMono-BoldItalic.ttf"
  8046. load_liberation()
  8047. {
  8048. # http://www.redhat.com/promo/fonts/
  8049. case `uname -s` in
  8050. SunOS|Solaris)
  8051. echo "If you get 'ERROR: Certificate verification error for fedorahosted.org: unable to get local issuer certificate':"
  8052. echo "Then you need to add Verisign root certificates to your local keystore."
  8053. echo "OpenSolaris users, see: http://www.linuxtopia.org/online_books/opensolaris_2008/SYSADV1/html/swmgrpatchtasks-14.html"
  8054. echo "Or edit winetricks's download function, and add '--no-check-certificate' to the command."
  8055. ;;
  8056. esac
  8057. w_download https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-1.04.tar.gz 097882c92e3260742a3dc3bf033792120d8635a3
  8058. cd "$W_TMP"
  8059. gunzip -dc "$W_CACHE"/liberation/liberation-fonts-1.04.tar.gz | tar -xf -
  8060. mv liberation-fonts-1.04/*.ttf "$W_FONTSDIR_UNIX"
  8061. w_register_font LiberationMono-BoldItalic.ttf "LiberationMono-BoldItalic"
  8062. w_register_font LiberationMono-Bold.ttf "LiberationMono-Bold"
  8063. w_register_font LiberationMono-Italic.ttf "LiberationMono-Italic"
  8064. w_register_font LiberationMono-Regular.ttf "LiberationMono-Regular"
  8065. w_register_font LiberationSans-BoldItalic.ttf "LiberationSans-BoldItalic"
  8066. w_register_font LiberationSans-Bold.ttf "LiberationSans-Bold"
  8067. w_register_font LiberationSans-Italic.ttf "LiberationSans-Italic"
  8068. w_register_font LiberationSans-Regular.ttf "LiberationSans-Regular"
  8069. w_register_font LiberationSerif-BoldItalic.ttf "LiberationSerif-BoldItalic"
  8070. w_register_font LiberationSerif-Bold.ttf "LiberationSerif-Bold"
  8071. w_register_font LiberationSerif-Italic.ttf "LiberationSerif-Italic"
  8072. w_register_font LiberationSerif-Regular.ttf "LiberationSerif-Regular"
  8073. }
  8074. #----------------------------------------------------------------
  8075. w_metadata lucida fonts \
  8076. title="MS Lucida Console font" \
  8077. publisher="Microsoft" \
  8078. year="1998" \
  8079. media="download" \
  8080. file1="eurofixi.exe" \
  8081. installed_file1="$W_FONTSDIR_WIN/lucon.ttf"
  8082. load_lucida()
  8083. {
  8084. w_download ftp://ftp.fu-berlin.de/pc/security/ms-patches/winnt/usa/NT40TSE/hotfixes-postSP3/Euro-fix/eurofixi.exe 64c47ad92265f6f10b0fd909a703d4fd1b05b2d5
  8085. w_try_cabextract -d "$W_FONTSDIR_UNIX" -L -F 'lucon.ttf' "$W_CACHE"/lucida/eurofixi.exe
  8086. w_register_font lucon.ttf "Lucida Console"
  8087. }
  8088. #----------------------------------------------------------------
  8089. w_metadata opensymbol fonts \
  8090. title="OpenSymbol fonts (replacement for Wingdings)" \
  8091. publisher="OpenOffice.org" \
  8092. year="2014" \
  8093. media="download" \
  8094. file1="fonts-opensymbol_102.6+LibO4.3.3-2+deb8u3_all.deb" \
  8095. installed_file1="$W_FONTSDIR_WIN/opens___.ttf"
  8096. load_opensymbol()
  8097. {
  8098. # The OpenSymbol fonts are a replacement for the Windows Wingdings font from OpenOffice.org.
  8099. # Need to w_download Debian since I can't find a standalone download from OpenOffice
  8100. # Note: The source download package on debian is for _all_ of OpenOffice, which is 266 MB.
  8101. w_download http://security.debian.org/debian-security/pool/updates/main/libr/libreoffice/fonts-opensymbol_102.6+LibO4.3.3-2+deb8u3_all.deb d3e2dd921c6694d24865600e40eceaf2a635d1c6
  8102. cd "$W_TMP"
  8103. w_try ar x "$W_CACHE/$W_PACKAGE/$file1" data.tar.xz
  8104. w_try tar Jvxf data.tar.xz ./usr/share/fonts/truetype/openoffice/opens___.ttf
  8105. w_try mv "$W_TMP/usr/share/fonts/truetype/openoffice/opens___.ttf" "$W_FONTSDIR_UNIX"
  8106. w_register_font opens___.ttf "OpenSymbol"
  8107. }
  8108. #----------------------------------------------------------------
  8109. w_metadata tahoma fonts \
  8110. title="MS Tahoma font (not part of corefonts)" \
  8111. publisher="Microsoft" \
  8112. year="2007" \
  8113. media="download" \
  8114. file1="tahoma32.exe" \
  8115. installed_file1="$W_FONTSDIR_WIN/tahoma.ttf"
  8116. load_tahoma()
  8117. {
  8118. # The tahoma and tahomabd fonts are needed by e.g. Steam
  8119. w_download http://download.microsoft.com/download/office97pro/fonts/1/w95/en-us/tahoma32.exe 888ce7b7ab5fd41f9802f3a65fd0622eb651a068
  8120. w_try_cabextract --directory="$W_TMP" "$W_CACHE"/tahoma/tahoma32.exe
  8121. w_try cp -f "$W_TMP"/Tahoma.TTF "$W_FONTSDIR_UNIX"/tahoma.ttf
  8122. w_try cp -f "$W_TMP"/Tahomabd.TTF "$W_FONTSDIR_UNIX"/tahomabd.ttf
  8123. # FIXME: Wine seems to nuke the registry entries for Tahoma. Why? Font Xplorer always lists it as 'not installed'.
  8124. w_register_font tahoma.ttf "Tahoma"
  8125. w_register_font tahomabd.ttf "Tahoma Bold"
  8126. # ? does some app assume it can overwrite these, or is this a leftover from before we had install checks?
  8127. chmod +w "$W_FONTSDIR_UNIX"/tahoma*.ttf
  8128. }
  8129. #----------------------------------------------------------------
  8130. w_metadata takao fonts \
  8131. title="Takao Japanese fonts" \
  8132. publisher="Jun Kobayashi" \
  8133. year="2010" \
  8134. media="download" \
  8135. file1="takao-fonts-ttf-003.02.01.zip" \
  8136. installed_file1="$W_FONTSDIR_WIN/TakaoGothic.ttf"
  8137. load_takao()
  8138. {
  8139. # The Takao font provides Japanese glyphs. May also be needed with fakejapanese function above.
  8140. # See http://launchpad.net/takao-fonts for project page
  8141. w_download http://launchpad.net/takao-fonts/trunk/003.02.01/+download/takao-fonts-ttf-003.02.01.zip 4f636d5c7c1bc16b96ea723adb16838cfb6df059
  8142. cp -f "$W_CACHE"/takao/takao-fonts-ttf-003.02.01.zip "$W_TMP"
  8143. w_try_unzip "$W_TMP" "$W_TMP"/takao-fonts-ttf-003.02.01.zip
  8144. w_try cp -f "$W_TMP"/takao-fonts-ttf-003.02.01/*.ttf "$W_FONTSDIR_UNIX"
  8145. w_register_font TakaoGothic.ttf "TakaoGothic"
  8146. w_register_font TakaoPGothic.ttf "TakaoPGothic"
  8147. w_register_font TakaoMincho.ttf "TakaoMincho"
  8148. w_register_font TakaoPMincho.ttf "TakaoPMincho"
  8149. w_register_font TakaoExGothic.ttf "TakaoExGothic"
  8150. w_register_font TakaoExMincho.ttf "TakaoExMincho"
  8151. }
  8152. #----------------------------------------------------------------
  8153. w_metadata uff fonts \
  8154. title="Ubuntu Font Family" \
  8155. publisher="Ubuntu" \
  8156. year="2010" \
  8157. media="download" \
  8158. file1="ubuntu-font-family-0.70.1.zip" \
  8159. installed_file1="$W_FONTSDIR_WIN/Ubuntu-R.ttf" \
  8160. homepage="https://launchpad.net/ubuntu-font-family"
  8161. load_uff()
  8162. {
  8163. w_download http://font.ubuntu.com/download/ubuntu-font-family-0.70.1.zip efbab0d5d8cb5cff091307d2360dcb1bfe1ae6e1
  8164. cd "$W_TMP"
  8165. w_try_unzip . "$W_CACHE"/uff/ubuntu-font-family-0.70.1.zip
  8166. mv ubuntu-font-family-0.70.1/*.ttf "$W_FONTSDIR_UNIX"
  8167. w_register_font Ubuntu-R.ttf "Ubuntu"
  8168. w_register_font Ubuntu-I.ttf "Ubuntu Italic"
  8169. w_register_font Ubuntu-B.ttf "Ubuntu Bold"
  8170. w_register_font Ubuntu-BI.ttf "Ubuntu Bold Italic"
  8171. }
  8172. #----------------------------------------------------------------
  8173. w_metadata wenquanyi fonts \
  8174. title="WenQuanYi CJK font" \
  8175. publisher="wenq.org" \
  8176. year="2009" \
  8177. media="download" \
  8178. file1="wqy-microhei-0.2.0-beta.tar.gz" \
  8179. installed_file1="$W_FONTSDIR_WIN/wqy-microhei.ttc"
  8180. load_wenquanyi()
  8181. {
  8182. # See http://wenq.org/enindex.cgi
  8183. # Donate at http://wenq.org/enindex.cgi?Download(en)#MicroHei_Beta if you want to help support free CJK font development
  8184. w_download $WINETRICKS_SOURCEFORGE/wqy/wqy-microhei-0.2.0-beta.tar.gz 28023041b22b6368bcfae076de68109b81e77976
  8185. cd "$W_TMP/"
  8186. gunzip -dc "$W_CACHE/wenquanyi/wqy-microhei-0.2.0-beta.tar.gz" | tar -xf -
  8187. w_try mv wqy-microhei/wqy-microhei.ttc "$W_FONTSDIR_UNIX"
  8188. w_register_font wqy-microhei.ttc "WenQuanYi Micro Hei"
  8189. }
  8190. #----------------------------------------------------------------
  8191. w_metadata unifont fonts \
  8192. title="Unifont alternative to Arial Unicode MS" \
  8193. publisher="Roman Czyborra / GNU" \
  8194. year="2008" \
  8195. media="download" \
  8196. file1="unifont-5.1.20080907.zip" \
  8197. installed_file1="$W_FONTSDIR_WIN/unifont.ttf"
  8198. load_unifont()
  8199. {
  8200. # The GNU Unifont provides glyphs for just about everything in common language. It is intended for multilingual usage.
  8201. # See http://unifoundry.com/unifont.html for project page
  8202. w_download http://unifoundry.com/unifont-5.1.20080907.zip bb8a3960dc0a96aa305de28312ea8a0ab64123d2
  8203. cp -f "$W_CACHE"/unifont/unifont-5.1.20080907.zip "$W_TMP"
  8204. w_try_unzip "$W_TMP" "$W_TMP"/unifont-5.1.20080907.zip
  8205. w_try cp -f "$W_TMP"/unifont-5.1.20080907.ttf "$W_FONTSDIR_UNIX/unifont.ttf"
  8206. w_register_font unifont.ttf "Unifont"
  8207. w_register_font_replacement "Arial Unicode MS" "Unifont"
  8208. }
  8209. #----------------------------------------------------------------
  8210. w_metadata allfonts fonts \
  8211. title="All fonts" \
  8212. publisher="various" \
  8213. year="1998-2010" \
  8214. media="download"
  8215. load_allfonts()
  8216. {
  8217. # This verb uses reflection, should probably do it portably instead, but that would require keeping it up to date
  8218. for file in "$WINETRICKS_METADATA"/fonts/*.vars
  8219. do
  8220. cmd=`basename $file .vars`
  8221. case $cmd in
  8222. allfonts|cjkfonts) ;;
  8223. *) w_call $cmd;;
  8224. esac
  8225. done
  8226. }
  8227. #----------------------------------------------------------------
  8228. # Apps
  8229. #----------------------------------------------------------------
  8230. w_metadata 3m_library apps \
  8231. title="3M Cloud Library" \
  8232. publisher="3M Company" \
  8233. year="2015" \
  8234. media="download" \
  8235. file1="3M-TM-Cloud-Library-PC-App-LIVE-Installer-1.51.735677.exe" \
  8236. installed_exe1="$W_PROGRAMS_X86_WIN/3M(TM) Cloud Library PC App/3MCloudLibrary.exe"
  8237. homepage="http://www.3m.com/us/library/eBook/index.html"
  8238. load_3m_library()
  8239. {
  8240. w_download http://www.3m.com/us/library/eBook/docs/3M-TM-Cloud-Library-PC-App-LIVE-Installer-1.51.735677.exe 810dc5f6b74ab7b34893288ee44ef7dc563a4ee7
  8241. cd "$W_CACHE/$W_PACKAGE"
  8242. w_try "$WINE" 3M-TM-Cloud-Library-PC-App-LIVE-Installer-1.51.735677.exe $W_UNATTENDED_SLASH_S
  8243. }
  8244. #----------------------------------------------------------------
  8245. w_metadata 7zip apps \
  8246. title="7-Zip 15.05 beta" \
  8247. publisher="Igor Pavlov" \
  8248. year="2015" \
  8249. media="download" \
  8250. file1="7z1505.exe" \
  8251. installed_exe1="$W_PROGRAMS_X86_WIN/7-Zip/7zFM.exe"
  8252. load_7zip()
  8253. {
  8254. w_download http://www.7-zip.org/a/7z1505.exe ece8bbd4c8903095d44e99196219c953a1d47bfd
  8255. cd "$W_CACHE/$W_PACKAGE"
  8256. w_try "$WINE" 7z1505.exe $W_UNATTENDED_SLASH_S
  8257. }
  8258. #----------------------------------------------------------------
  8259. w_metadata abiword apps \
  8260. title="AbiWord 2.8.6" \
  8261. publisher="AbiSource" \
  8262. year="2010" \
  8263. media="download" \
  8264. file1="abiword-setup-2.8.6.exe" \
  8265. installed_exe1="$W_PROGRAMS_X86_WIN/AbiWord/bin/AbiWord.exe"
  8266. load_abiword()
  8267. {
  8268. w_download http://www.abisource.com/downloads/abiword/2.8.6/Windows/abiword-setup-2.8.6.exe a91acd3f60e842d23556032d34f1600602768318
  8269. cd "$W_CACHE/$W_PACKAGE"
  8270. w_try "$WINE" abiword-setup-2.8.6.exe $W_UNATTENDED_SLASH_S
  8271. }
  8272. #----------------------------------------------------------------
  8273. w_metadata adobe_diged apps \
  8274. title="Adobe Digital Editions 1.7" \
  8275. publisher="Adobe" \
  8276. year="2011" \
  8277. media="download" \
  8278. file1="setup.exe" \
  8279. installed_exe1="$W_PROGRAMS_X86_WIN/Adobe/Adobe Digital Editions/digitaleditions.exe" \
  8280. homepage="http://www.adobe.com/products/digitaleditions/"
  8281. load_adobe_diged()
  8282. {
  8283. w_download http://kb2.adobe.com/cps/403/kb403051/attachments/setup.exe 4c79685408fa6ca12ef8bb0e0eaa4a846e21f915
  8284. # NSIS installer
  8285. w_try "$WINE" "$W_CACHE"/$W_PACKAGE/setup.exe ${W_OPT_UNATTENDED:+ /S}
  8286. }
  8287. #----------------------------------------------------------------
  8288. w_metadata adobe_diged4 apps \
  8289. title="Adobe Digital Editions 4.5" \
  8290. publisher="Adobe" \
  8291. year="2015" \
  8292. media="download" \
  8293. file1="ADE_4.5_Installer.exe" \
  8294. installed_exe1="$W_PROGRAMS_X86_WIN/Adobe/Adobe Digital Editions 4.5/DigitalEditions.exe" \
  8295. homepage="http://www.adobe.com/products/digitaleditions/"
  8296. load_adobe_diged4()
  8297. {
  8298. w_download http://download.adobe.com/pub/adobe/digitaleditions/ADE_4.5_Installer.exe
  8299. if w_workaround_wine_bug 32323
  8300. then
  8301. w_call corefonts
  8302. fi
  8303. if [ ! -x "`which winbindd 2>/dev/null`" ]
  8304. then
  8305. w_warn "Adobe Digital Editions 4.5 requires winbind (part of samba) to be installed, but winbind was not detected."
  8306. fi
  8307. w_call dotnet40
  8308. #w_call win7
  8309. cd "$W_CACHE/$W_PACKAGE"
  8310. w_ahk_do "
  8311. SetTitleMatchMode, 2
  8312. run, ${file1} ${W_OPT_UNATTENDED:+ /S}
  8313. winwait, Installing Adobe Digital Editions
  8314. ControlClick, Button1 ; Don't install Norton Internet Security
  8315. ControlClick, Static19 ; Next
  8316. "
  8317. }
  8318. #----------------------------------------------------------------
  8319. w_metadata audible apps \
  8320. title="Audible.com Manager / Player" \
  8321. publisher="Audible" \
  8322. year="2011" \
  8323. media="download" \
  8324. file1="ActiveSetupN.exe" \
  8325. installed_exe1="$W_PROGRAMS_X86_WIN/Audible/Bin/Manager.exe" \
  8326. homepage="http://www.audible.com"
  8327. load_audible()
  8328. {
  8329. w_download http://download.audible.com/AM50/ActiveSetupN.exe 49f501471912ccca442bcc1c8f2c69160579f712
  8330. cd "$W_CACHE/$W_PACKAGE"
  8331. # Use exact title match!
  8332. w_ahk_do "
  8333. SetWinDelay 500
  8334. SetTitleMatchMode, 3
  8335. Run, $file1
  8336. WinWait, AudibleManager Setup
  8337. ControlClick, Button3 ; accept
  8338. WinWait, AudibleManager Setup, Start by
  8339. ControlClick, Button6 ; OK
  8340. WinWaitClose
  8341. ; many windows come and go, quite a few of them starting with AudibleManager, so use exact match to get the real mccoy
  8342. WinWait, AudibleManager ; the dang thing starts up
  8343. WinKill
  8344. "
  8345. }
  8346. #----------------------------------------------------------------
  8347. w_metadata audibledm apps \
  8348. title="Audible.com Download Manager" \
  8349. publisher="Audible" \
  8350. year="2011" \
  8351. media="download" \
  8352. file1="AudibleDM_iTunesSetup.exe" \
  8353. installed_exe1="$W_PROGRAMS_X86_WIN/Audible/Bin/AudibleDownloadHelper.exe" \
  8354. homepage="http://www.audible.com"
  8355. load_audibledm()
  8356. {
  8357. w_download http://download.audible.com/AM50/AudibleDM_iTunesSetup.exe 03261d77a59ebbceedf6683b5301c162bc0c7788
  8358. cd "$W_CACHE/$W_PACKAGE"
  8359. w_ahk_do "
  8360. SetWinDelay 500
  8361. SetTitleMatchMode, 2
  8362. Run, AudibleDM_iTunesSetup.exe
  8363. WinWait, Audible Download Manager Setup
  8364. ControlClick, Button2 ; accept
  8365. WinWait, Audible Download Manager Setup, Choose where
  8366. ControlClick, Button1 ; OK
  8367. WinWait, Audible Download Manager Setup, Manage
  8368. ControlClick, Button1 ; OK
  8369. WinWait, Audible Download Manager Setup, success
  8370. ControlClick, Button1 ; OK
  8371. WinWaitClose
  8372. WinWait, Audible Download Manager ; the dang thing starts up
  8373. WinKill
  8374. "
  8375. }
  8376. #----------------------------------------------------------------
  8377. w_metadata autohotkey apps \
  8378. title="Autohotkey" \
  8379. publisher="autohotkey.org" \
  8380. year="2010" \
  8381. media="download" \
  8382. file1="AutoHotkey104805_Install.exe" \
  8383. installed_exe1="$W_PROGRAMS_X86_WIN/AutoHotkey/AutoHotkey.exe"
  8384. load_autohotkey()
  8385. {
  8386. W_BROWSERAGENT=1 \
  8387. w_download http://www.autohotkey.com/download/AutoHotkey104805_Install.exe 13e5a9ca6d5b7705f1cd02560c3af4d38b1904fc
  8388. cd "$W_CACHE/$W_PACKAGE"
  8389. w_try "$WINE" AutoHotkey104805_Install.exe $W_UNATTENDED_SLASH_S
  8390. }
  8391. #----------------------------------------------------------------
  8392. w_metadata cmake apps \
  8393. title="CMake 2.8" \
  8394. publisher="Kitware" \
  8395. year="2013" \
  8396. media="download" \
  8397. file1="cmake-2.8.11.2-win32-x86.exe" \
  8398. installed_exe1="$W_PROGRAMS_X86_WIN/CMake 2.8/bin/cmake-gui.exe"
  8399. load_cmake()
  8400. {
  8401. w_download http://www.cmake.org/files/v2.8/cmake-2.8.11.2-win32-x86.exe d79af5715c0ad48d78bb731cce93b5ad89b16512
  8402. cd "$W_CACHE/$W_PACKAGE"
  8403. w_try "$WINE" cmake-2.8.11.2-win32-x86.exe $W_UNATTENDED_SLASH_S
  8404. }
  8405. #----------------------------------------------------------------
  8406. w_metadata colorprofile apps \
  8407. title="Standard RGB color profile" \
  8408. publisher="Microsoft" \
  8409. year="2005" \
  8410. media="download" \
  8411. file1="ColorProfile.exe" \
  8412. installed_exe1="c:/windows/system32/spool/drivers/color/sRGB Color Space Profile.icm"
  8413. load_colorprofile()
  8414. {
  8415. w_download http://download.microsoft.com/download/whistler/hwdev1/1.0/wxp/en-us/ColorProfile.exe 6b72836b32b343c82d0760dff5cb51c2f47170eb
  8416. w_try_unzip "$W_TMP" "$W_CACHE"/colorprofile/ColorProfile.exe
  8417. # It's in system32 for both win32/win64
  8418. mkdir -p "$W_WINDIR_UNIX"/system32/spool/drivers/color
  8419. w_try cp -f "$W_TMP/sRGB Color Space Profile.icm" "$W_WINDIR_UNIX"/system32/spool/drivers/color
  8420. }
  8421. #----------------------------------------------------------------
  8422. w_metadata controlpad apps \
  8423. title="MS ActiveX Control Pad" \
  8424. publisher="Microsoft" \
  8425. year="1997" \
  8426. media="download" \
  8427. file1="setuppad.exe" \
  8428. installed_exe1="$W_PROGRAMS_X86_WIN/ActiveX Control Pad/PED.EXE"
  8429. load_controlpad()
  8430. {
  8431. # http://msdn.microsoft.com/en-us/library/ms968493.aspx
  8432. w_call wsh57
  8433. w_download http://download.microsoft.com/download/activexcontrolpad/install/4.0.0.950/win98mexp/en-us/setuppad.exe 8921e0f52507ca6a373c94d222777c750fb48af7
  8434. w_try_cabextract --directory="$W_TMP" "$W_CACHE"/controlpad/setuppad.exe
  8435. echo "If setup says 'Unable to start DDE ...', press Ignore"
  8436. cd "$W_TMP"
  8437. w_try "$WINE" setup $W_UNATTENDED_SLASH_QT
  8438. if ! test -f "$W_SYSTEM32_DLLS"/FM20.DLL
  8439. then
  8440. w_die "Install failed. Please report, If you just wanted fm20.dll, try installing art2min instead."
  8441. fi
  8442. }
  8443. #----------------------------------------------------------------
  8444. w_metadata controlspy apps \
  8445. title="Control Spy 2.0 " \
  8446. publisher="Microsoft" \
  8447. year="2005" \
  8448. media="download" \
  8449. file1="ControlSpy.msi" \
  8450. installed_exe1="$W_PROGRAMS_X86_WIN/Microsoft/ControlSpy/ControlSpyV6.exe"
  8451. load_controlspy()
  8452. {
  8453. w_download http://download.microsoft.com/download/a/3/1/a315b133-03a8-4845-b428-ec585369b285/ControlSpy.msi efe33701f78b5853ba73353f028b777b4c849e77
  8454. cd "$W_CACHE/$W_PACKAGE"
  8455. w_try "$WINE" msiexec /i ControlSpy.msi ${W_UNATTENDED_SLASH_QB}
  8456. }
  8457. #----------------------------------------------------------------
  8458. # dxdiag is a system component that one usually adds to an existing wineprefix,
  8459. # so it belongs in 'dlls', not apps.
  8460. w_metadata dxdiag dlls \
  8461. title="DirectX Diagnostic Tool" \
  8462. publisher="Microsoft" \
  8463. year="2010" \
  8464. media="download" \
  8465. file1="../directx9/directx_feb2010_redist.exe" \
  8466. installed_file1="$W_SYSTEM32_DLLS_WIN/dxdiag.exe"
  8467. load_dxdiag()
  8468. {
  8469. helper_directx_dl
  8470. w_call gmdls
  8471. w_try_cabextract -d "$W_TMP" -L -F dxnt.cab "$W_CACHE"/directx9/$DIRECTX_NAME
  8472. w_try_cabextract -d "$W_SYSTEM32_DLLS" -L -F "dxdiag.exe" "$W_TMP/dxnt.cab"
  8473. mkdir -p "$W_WINDIR_UNIX/help"
  8474. w_try_cabextract -d "$W_WINDIR_UNIX/help" -L -F "dxdiag.chm" "$W_TMP/dxnt.cab"
  8475. w_override_dlls native dxdiag.exe
  8476. if w_workaround_wine_bug 1429
  8477. then
  8478. w_call dxdiagn
  8479. fi
  8480. if w_workaround_wine_bug 9027
  8481. then
  8482. w_call directmusic
  8483. fi
  8484. }
  8485. #----------------------------------------------------------------
  8486. w_metadata emu8086 apps \
  8487. title="emu8086" \
  8488. publisher="emu8086.com" \
  8489. year="2015" \
  8490. media="download" \
  8491. file1="emu8086v408r11.zip" \
  8492. installed_exe1="c:/emu8086/emu8086.exe"
  8493. load_emu8086()
  8494. {
  8495. w_download http://www.emu8086.com/files/emu8086v408r11.zip aa71b46ee9259e5b31a300c820277e551969da7b
  8496. w_try_unzip "$W_TMP" "$W_CACHE/$W_PACKAGE"/$file1
  8497. w_try "$WINE" "$W_TMP/Setup.exe" $W_UNATTENDED_SLASH_SILENT
  8498. }
  8499. #----------------------------------------------------------------
  8500. w_metadata ev3 apps \
  8501. title="Lego Mindstorms EV3 Home Edition" \
  8502. publisher="Lego" \
  8503. year="2014" \
  8504. media="download" \
  8505. file1="LMS-EV3-WIN32-ENUS-01-02-01-full-setup.exe" \
  8506. installed_exe1="$W_PROGRAMS_X86_WIN/LEGO Software/LEGO MINDSTORMS EV3 Home Edition/MindstormsEV3.exe"
  8507. load_ev3()
  8508. {
  8509. if w_workaround_wine_bug 40192 "Installing vcrun2005 as Wine does not have MFC80.dll"
  8510. then
  8511. w_call vcrun2005
  8512. fi
  8513. if w_workaround_wine_bug 40193 "Installing IE8 is built-in Gecko is not sufficient"
  8514. then
  8515. w_call ie8
  8516. fi
  8517. w_call dotnet40
  8518. # 2016-02-18: LMS-EV3-WIN32-ENUS-01-01-01-full-setup.exe 855c914d9a3cf0f4793a046872658fd661389671
  8519. # 2016-03-22: LMS-EV3-WIN32-ENUS-01-02-01-full-setup.exe f4f077befd837e8f5716dbd134dc6828d6c4cc77
  8520. w_download http://esd.lego.com.edgesuite.net/digitaldelivery/mindstorms/6ecda7c2-1189-4816-b2dd-440e22d65814/public/LMS-EV3-WIN32-ENUS-01-02-01-full-setup.exe f4f077befd837e8f5716dbd134dc6828d6c4cc77
  8521. if [ $W_UNATTENDED_SLASH_Q ]
  8522. then
  8523. quiet="$W_UNATTENDED_SLASH_QB /AcceptLicenses yes"
  8524. else
  8525. quiet=""
  8526. fi
  8527. cd "$W_CACHE"/"$W_PACKAGE"
  8528. w_try "$WINE" "$file1" ${quiet}
  8529. if w_workaround_wine_bug 40174 "Setting override for urlmon.dll to native to avoid crash"
  8530. then
  8531. w_override_dlls native urlmon
  8532. fi
  8533. if w_workaround_wine_bug 34897 "Installing update KB2936068 to work around bug 34897"
  8534. then
  8535. w_call ie8_kb2936068
  8536. fi
  8537. }
  8538. #----------------------------------------------------------------
  8539. w_metadata firefox apps \
  8540. title="Firefox 39.0" \
  8541. publisher="Mozilla" \
  8542. year="2015" \
  8543. media="download" \
  8544. file1="FirefoxSetup39.0.exe" \
  8545. installed_exe1="$W_PROGRAMS_X86_WIN/Mozilla Firefox/firefox.exe"
  8546. load_firefox()
  8547. {
  8548. w_download "https://download.mozilla.org/?product=firefox-39.0-SSL&os=win&lang=en-US" 75eccbd9b2d44210b551c9a5045f03f01e899528 "$file1"
  8549. cd "$W_CACHE/$W_PACKAGE"
  8550. w_try "$WINE" "$file1" ${W_OPT_UNATTENDED:+ -ms}
  8551. }
  8552. #----------------------------------------------------------------
  8553. w_metadata fontxplorer apps \
  8554. title="Font Xplorer 1.2.2" \
  8555. publisher="Moon Software" \
  8556. year="2001" \
  8557. media="download" \
  8558. file1="Font_Xplorer_122_Free.exe" \
  8559. installed_file1="$W_PROGRAMS_X86_WIN/Font Xplorer/FXplorer.exe" \
  8560. homepage="http://www.moonsoftware.com/fxplorer.asp"
  8561. load_fontxplorer()
  8562. {
  8563. w_download http://www.moonsoftware.com/files/legacy/Font_Xplorer_122_Free.exe 22feb63be28730cbfad5458b139464490a25a68d
  8564. cd "$W_CACHE/fontxplorer"
  8565. w_try "$WINE" Font_Xplorer_122_Free.exe $W_UNATTENDED_SLASH_S
  8566. }
  8567. #----------------------------------------------------------------
  8568. w_metadata foobar2000 apps \
  8569. title="foobar2000 v1.3.6" \
  8570. publisher="Peter Pawlowski" \
  8571. year="2014" \
  8572. media="manual_download" \
  8573. file1="foobar2000_v1.3.6.exe" \
  8574. installed_exe1="$W_PROGRAMS_X86_WIN/foobar2000/foobar2000.exe"
  8575. load_foobar2000()
  8576. {
  8577. w_download_manual http://www.foobar2000.org/download foobar2000_v1.3.6.exe 77d1c3aa766853701d29e46b3018aaf1e1b5dd39
  8578. cd "$W_CACHE/$W_PACKAGE"
  8579. w_try "$WINE" $file1 $W_UNATTENDED_SLASH_S
  8580. }
  8581. #----------------------------------------------------------------
  8582. w_metadata iceweasel apps \
  8583. title="GNU Icecat 31.7.0" \
  8584. publisher="GNU Foundation" \
  8585. year="2015" \
  8586. media="download" \
  8587. file1="icecat-31.7.0.en-US.win32.zip" \
  8588. installed_exe1="$W_PROGRAMS_X86_WIN/icecat/icecat.exe"
  8589. load_iceweasel()
  8590. {
  8591. w_download https://ftp.gnu.org/gnu/gnuzilla/31.7.0/icecat-31.7.0.en-US.win32.zip cf52a728c1af29065b7dc7bdddc9265a79eb5328
  8592. w_try_unzip "${W_PROGRAMS_X86_UNIX}" "${W_CACHE}/${W_PACKAGE}/${file1}"
  8593. }
  8594. #----------------------------------------------------------------
  8595. w_metadata irfanview apps \
  8596. title="Irfanview" \
  8597. publisher="Irfan Skiljan" \
  8598. year="2014" \
  8599. media="download" \
  8600. file1="iview438_setup.exe" \
  8601. installed_file1="$W_PROGRAMS_X86_WIN/IrfanView/i_view32.exe" \
  8602. homepage="http://www.irfanview.com/"
  8603. load_irfanview()
  8604. {
  8605. w_download http://fossies.org/windows/misc/iview438_setup.exe c55c2fd91ac1af03e8063442b110ba771357d42e
  8606. if w_workaround_wine_bug 657 "Installing mfc42"
  8607. then
  8608. w_call mfc42
  8609. fi
  8610. cd "$W_CACHE/$W_PACKAGE"
  8611. if test "$W_OPT_UNATTENDED"
  8612. then
  8613. w_ahk_do "
  8614. SetWinDelay 200
  8615. SetTitleMatchMode, 2
  8616. run $file1
  8617. winwait, Setup, This program will install
  8618. winactivate, Setup, This program will install
  8619. Sleep 900
  8620. ControlClick, Button7 ; Uncheck All
  8621. Sleep 900
  8622. ControlClick, Button11 ; Next
  8623. Sleep 900
  8624. winwait, Setup, version
  8625. Sleep 900
  8626. ControlClick, Button11 ; Next
  8627. Sleep 900
  8628. winwait, Setup, associate extensions
  8629. Sleep 900
  8630. ControlClick, Button1 ; Images Only associations
  8631. Sleep 900
  8632. ControlClick, Button16 ; Next
  8633. Sleep 900
  8634. winwait, Setup, Search
  8635. Sleep 900
  8636. ControlClick, Button1 ; deselect chrome googsrch
  8637. Sleep 900
  8638. ControlClick, Button18 ; Next
  8639. Sleep 1000
  8640. winwait, Setup, INI
  8641. Sleep 1000
  8642. ControlClick, Button23 ; Next
  8643. Sleep 1000
  8644. winwait, Setup, You want to change
  8645. winactivate, Setup, really
  8646. Sleep 900
  8647. ControlClick, Button1 ; Yes
  8648. Sleep 900
  8649. winwait, Setup, successful
  8650. winactivate, Setup, successful
  8651. Sleep 900
  8652. ControlClick, Button2 ; no start irfanview
  8653. Sleep 900
  8654. ControlClick, Button27 ; done
  8655. Sleep 900
  8656. winwaitclose
  8657. "
  8658. else
  8659. w_try "$WINE" $file1
  8660. fi
  8661. }
  8662. #----------------------------------------------------------------
  8663. # FIXME: ie6 always installs to C:/Program Files even if LANG is de_DE.utf-8,
  8664. # so we have to hard code that, but that breaks on 64 bit windows.
  8665. w_metadata ie6 dlls \
  8666. title="Internet Explorer 6" \
  8667. publisher="Microsoft" \
  8668. year="2002" \
  8669. media="download" \
  8670. file1="ie60.exe" \
  8671. installed_file1="c:/Program Files/Internet Explorer/iedetect.dll"
  8672. load_ie6()
  8673. {
  8674. # Installer doesn't support Win64, and I can't find a x64 version on microsoft.com
  8675. if [ $W_ARCH = win64 ]
  8676. then
  8677. w_die "This package does not work on a 64-bit installation"
  8678. fi
  8679. w_download http://download.oldapps.com/Internet_Explorer/ie60.exe 8e483db28ff01a7cabd39147ab6c59753ea1f533
  8680. cd "$W_TMP"
  8681. "$WINE" "$W_CACHE"/"$W_PACKAGE"/$file1
  8682. w_call msls31
  8683. # Unregister Wine IE
  8684. if [ ! -f "$W_SYSTEM32_DLLS"/plugin.ocx ]
  8685. then
  8686. w_override_dlls builtin iexplore.exe
  8687. w_try "$WINE" iexplore -unregserver
  8688. fi
  8689. # Change the override to the native so we are sure we use and register them
  8690. w_override_dlls native,builtin iexplore.exe inetcpl.cpl itircl itss jscript mlang mshtml msimtf shdoclc shdocvw shlwapi
  8691. # Remove the fake dlls, if any
  8692. mv "$W_PROGRAMS_UNIX"/"Internet Explorer"/iexplore.exe "$W_PROGRAMS_UNIX"/"Internet Explorer"/iexplore.exe.bak
  8693. for dll in itircl itss jscript mlang mshtml msimtf shdoclc shdocvw shlwapi
  8694. do
  8695. test -f "$W_SYSTEM32_DLLS"/$dll.dll &&
  8696. mv "$W_SYSTEM32_DLLS"/$dll.dll "$W_SYSTEM32_DLLS"/$dll.dll.bak
  8697. done
  8698. # The installer doesn't want to install iexplore.exe in XP mode.
  8699. w_set_winver win2k
  8700. # Workaround http://bugs.winehq.org/show_bug.cgi?id=21009
  8701. # See also http://code.google.com/p/winezeug/issues/detail?id=78
  8702. rm -f "$W_SYSTEM32_DLLS"/browseui.dll "$W_SYSTEM32_DLLS"/inseng.dll
  8703. # Otherwise regsvr32 crashes later
  8704. rm -f "$W_SYSTEM32_DLLS"/inetcpl.cpl
  8705. # Work around http://bugs.winehq.org/show_bug.cgi?id=25432
  8706. w_try_cabextract -F inseng.dll "$W_TMP/IE 6.0 Full/ACTSETUP.CAB"
  8707. mv inseng.dll "$W_SYSTEM32_DLLS"
  8708. w_override_dlls native inseng
  8709. cd "$W_TMP/IE 6.0 Full"
  8710. if [ $W_UNATTENDED_SLASH_Q ]
  8711. then
  8712. "$WINE" IE6SETUP.EXE /q:a /r:n /c:"ie6wzd /S:""#e"" /q:a /r:n"
  8713. else
  8714. "$WINE" IE6SETUP.EXE
  8715. fi
  8716. # IE6 exits with 194 to signal a reboot
  8717. status=$?
  8718. case $status in
  8719. 0|194) ;;
  8720. *) w_die ie6 installation failed
  8721. esac
  8722. # Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed
  8723. # FIXME: whittle down this list
  8724. cd "$W_SYSTEM32_DLLS"
  8725. for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \
  8726. dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll imgutil.dll \
  8727. inetcomm.dll inetcpl.cpl inseng.dll isetup.dll jscript.dll laprxy.dll \
  8728. mlang.dll mshtml.dll mshtmled.dll msi.dll msident.dll \
  8729. msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \
  8730. ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \
  8731. rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \
  8732. shdocvw.dll shell32.dll vbscript.dll webcheck.dll \
  8733. wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \
  8734. plugin.ocx proctexe.ocx tdc.ocx webcheck.dll wshom.ocx
  8735. do
  8736. "$WINE" regsvr32 /i $i > /dev/null 2>&1
  8737. done
  8738. # Set windows version back to user's default. Leave at win2k for better rendering (is there a bug for that?)
  8739. w_unset_winver
  8740. # the ie6 we use these days lacks pngfilt, so grab that
  8741. w_call pngfilt
  8742. }
  8743. #----------------------------------------------------------------
  8744. w_metadata ie7 dlls \
  8745. title="Internet Explorer 7" \
  8746. publisher="Microsoft" \
  8747. year="2008" \
  8748. media="download" \
  8749. file1="IE7-WindowsXP-x86-enu.exe" \
  8750. installed_file1="c:/windows/ie7.log"
  8751. load_ie7()
  8752. {
  8753. # Unregister Wine IE
  8754. if grep -q -i "wine placeholder" "$W_PROGRAMS_X86_UNIX/Internet Explorer/iexplore.exe"
  8755. then
  8756. w_override_dlls builtin iexplore.exe
  8757. w_try "$WINE" iexplore -unregserver
  8758. fi
  8759. # Change the override to the native so we are sure we use and register them
  8760. w_override_dlls native,builtin itircl itss jscript mshtml msimtf shdoclc shdocvw shlwapi urlmon wininet xmllite
  8761. # IE7 installer will check the version number of iexplore.exe which causes IE7 installer to fail on wine-1.9.0+
  8762. w_override_dlls native iexplore.exe
  8763. # Bundled updspapi cannot work on wine
  8764. w_override_dlls builtin updspapi
  8765. # Remove the fake dlls from the existing WINEPREFIX
  8766. if [ -f "$W_PROGRAMS_X86_UNIX/Internet Explorer/iexplore.exe" ]
  8767. then
  8768. mv "$W_PROGRAMS_X86_UNIX/Internet Explorer/iexplore.exe" "$W_PROGRAMS_X86_UNIX/Internet Explorer/iexplore.exe.bak"
  8769. fi
  8770. for dll in itircl itss jscript mshtml msimtf shdoclc shdocvw shlwapi urlmon
  8771. do
  8772. test -f "$W_SYSTEM32_DLLS"/$dll.dll &&
  8773. mv "$W_SYSTEM32_DLLS"/$dll.dll "$W_SYSTEM32_DLLS"/$dll.dll.bak
  8774. done
  8775. # See http://bugs.winehq.org/show_bug.cgi?id=16013
  8776. # Find instructions to create this file in dlls/wintrust/tests/crypt.c
  8777. w_download https://github.com/Winetricks/winetricks/raw/master/files/winetest.cat ac8f50dd54d011f3bb1dd79240dae9378748449f
  8778. # Put a dummy catalog file in place
  8779. mkdir -p "$W_SYSTEM32_DLLS"/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295ee\}
  8780. w_try cp -f "$W_CACHE"/ie7/winetest.cat "$W_SYSTEM32_DLLS"/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295ee\}/oem0.cat
  8781. # KLUDGE: if / is writable (as on MacOSX?), having a z: mapping to it
  8782. # causes ie7 to put temporary directories on Z:\
  8783. # so hide it temporarily. This is not very robust!
  8784. if test -w /
  8785. then
  8786. rm -f "$WINEPREFIX/dosdevices/z:.bak_wt"
  8787. mv "$WINEPREFIX/dosdevices/z:" "$WINEPREFIX/dosdevices/z:.bak_wt"
  8788. fi
  8789. # Install
  8790. w_download http://download.microsoft.com/download/3/8/8/38889DC1-848C-4BF2-8335-86C573AD86D9/IE7-WindowsXP-x86-enu.exe d39b89c360fbaa9706b5181ae4718100687a5326
  8791. cd "$W_CACHE/$W_PACKAGE"
  8792. "$WINE" IE7-WindowsXP-x86-enu.exe $W_UNATTENDED_SLASH_QUIET
  8793. # IE7 exits with 194 to signal a reboot
  8794. status=$?
  8795. case $status in
  8796. 0) ;;
  8797. 105) echo "exit status $status - normal, user selected 'restart now'" ;;
  8798. 194) echo "exit status $status - normal, user selected 'restart later'" ;;
  8799. *) w_die "exit status $status - $W_PACKAGE installation failed" ;;
  8800. esac
  8801. if test -w /
  8802. then
  8803. # END KLUDGE: restore z:, assuming user didn't kill us
  8804. mv "$WINEPREFIX/dosdevices/z:.bak_wt" "$WINEPREFIX/dosdevices/z:"
  8805. fi
  8806. # Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed
  8807. # FIXME: whittle down this list
  8808. cd "$W_SYSTEM32_DLLS"
  8809. for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \
  8810. dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \
  8811. imgutil.dll inetcomm.dll inseng.dll isetup.dll jscript.dll laprxy.dll \
  8812. mlang.dll mshtml.dll mshtmled.dll msi.dll msident.dll \
  8813. msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \
  8814. ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \
  8815. rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \
  8816. shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \
  8817. wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \
  8818. plugin.ocx proctexe.ocx tdc.ocx webcheck.dll wshom.ocx
  8819. do
  8820. "$WINE" regsvr32 /i $i > /dev/null 2>&1
  8821. done
  8822. # Seeing is believing
  8823. case $WINETRICKS_GUI in
  8824. none)
  8825. w_warn "To start ie7, use the command "$WINE" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore'"
  8826. ;;
  8827. *)
  8828. w_warn "Starting ie7. To start it later, use the command "$WINE" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore'"
  8829. "$WINE" "${W_PROGRAMS_WIN}\\Internet Explorer\\iexplore" http://www.microsoft.com/windows/internet-explorer/ie7/ > /dev/null 2>&1 &
  8830. ;;
  8831. esac
  8832. }
  8833. #----------------------------------------------------------------
  8834. w_metadata ie8 dlls \
  8835. title="Internet Explorer 8" \
  8836. publisher="Microsoft" \
  8837. year="2009" \
  8838. media="download" \
  8839. file1="IE8-WindowsXP-x86-ENU.exe" \
  8840. installed_file1="c:/windows/ie8_main.log"
  8841. load_ie8()
  8842. {
  8843. # Unregister Wine IE
  8844. if grep -q -i "wine placeholder" "$W_PROGRAMS_X86_UNIX/Internet Explorer/iexplore.exe"
  8845. #if [ ! -f "$W_SYSTEM32_DLLS"/plugin.ocx ]
  8846. then
  8847. w_override_dlls builtin iexplore.exe
  8848. w_try "$WINE" iexplore -unregserver
  8849. fi
  8850. w_call msls31
  8851. # Change the override to the native so we are sure we use and register them
  8852. w_override_dlls native,builtin itircl itss jscript msctf mshtml shdoclc shdocvw shlwapi urlmon wininet xmllite
  8853. # IE8 installer will check the version number of iexplore.exe which causes IE8 installer to fail on wine-1.9.0+
  8854. w_override_dlls native iexplore.exe
  8855. # Bundled updspapi cannot work on wine
  8856. w_override_dlls builtin updspapi
  8857. # Remove the fake dlls from the existing WINEPREFIX
  8858. if [ -f "$W_PROGRAMS_X86_UNIX/Internet Explorer/iexplore.exe" ]
  8859. then
  8860. mv "$W_PROGRAMS_X86_UNIX/Internet Explorer/iexplore.exe" "$W_PROGRAMS_X86_UNIX/Internet Explorer/iexplore.exe.bak"
  8861. fi
  8862. for dll in browseui.dll inseng.dll itircl itss jscript msctf mshtml shdoclc shdocvw shlwapi urlmon
  8863. do
  8864. test -f "$W_SYSTEM32_DLLS"/$dll.dll &&
  8865. mv "$W_SYSTEM32_DLLS"/$dll.dll "$W_SYSTEM32_DLLS"/$dll.dll.bak
  8866. done
  8867. # See http://bugs.winehq.org/show_bug.cgi?id=16013
  8868. # Find instructions to create this file in dlls/wintrust/tests/crypt.c
  8869. w_download https://github.com/Winetricks/winetricks/raw/master/files/winetest.cat ac8f50dd54d011f3bb1dd79240dae9378748449f
  8870. # Put a dummy catalog file in place
  8871. mkdir -p "$W_SYSTEM32_DLLS"/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295ee\}
  8872. w_try cp -f "$W_CACHE"/ie8/winetest.cat "$W_SYSTEM32_DLLS"/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295ee\}/oem0.cat
  8873. w_download http://download.microsoft.com/download/C/C/0/CC0BD555-33DD-411E-936B-73AC6F95AE11/IE8-WindowsXP-x86-ENU.exe e489483e5001f95da04e1ebf3c664173baef3e26
  8874. if [ $W_UNATTENDED_SLASH_QUIET ]
  8875. then
  8876. quiet="$W_UNATTENDED_SLASH_QUIET /forcerestart"
  8877. else
  8878. quiet=""
  8879. fi
  8880. cd "$W_CACHE/$W_PACKAGE"
  8881. # KLUDGE: if / is writable, having a z: mapping to it causes ie8 to put temporary directories on Z:\
  8882. # so hide it temporarily. This is not very robust!
  8883. rm -f "$WINEPREFIX/dosdevices/z:.bak_wt"
  8884. mv "$WINEPREFIX/dosdevices/z:" "$WINEPREFIX/dosdevices/z:.bak_wt"
  8885. # FIXME: There's an option for /updates-noupdates to disable checking for updates, but that
  8886. # forces the install to fail on Wine. Not sure if it's an IE8 or Wine bug...
  8887. # FIXME: can't check status, as it always reports failure on wine?
  8888. "$WINE" IE8-WindowsXP-x86-ENU.exe $quiet
  8889. # END KLUDGE: restore z:, assuming user didn't kill us
  8890. mv "$WINEPREFIX/dosdevices/z:.bak_wt" "$WINEPREFIX/dosdevices/z:"
  8891. # Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed
  8892. # FIXME: whittle down this list
  8893. cd "$W_SYSTEM32_DLLS"
  8894. for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \
  8895. dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \
  8896. imgutil.dll inetcomm.dll isetup.dll jscript.dll laprxy.dll \
  8897. mlang.dll msctf.dll mshtml.dll mshtmled.dll msi.dll msimtf.dll msident.dll \
  8898. msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \
  8899. ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \
  8900. rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \
  8901. shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \
  8902. wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \
  8903. plugin.ocx proctexe.ocx tdc.ocx uxtheme.dll webcheck.dll wshom.ocx
  8904. do
  8905. "$WINE" regsvr32 /i $i > /dev/null 2>&1
  8906. done
  8907. if w_workaround_wine_bug 25648 "Setting TabProcGrowth=0 to avoid hang"
  8908. then
  8909. cat > "$W_TMP"/set-tabprocgrowth.reg <<_EOF_
  8910. REGEDIT4
  8911. [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
  8912. "TabProcGrowth"=dword:00000000
  8913. _EOF_
  8914. w_try_regedit "$W_TMP_WIN"\\set-tabprocgrowth.reg
  8915. fi
  8916. # Seeing is believing
  8917. case $WINETRICKS_GUI in
  8918. none)
  8919. w_warn "To start ie8, use the command "$WINE" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore'"
  8920. ;;
  8921. *)
  8922. w_warn "Starting ie8. To start it later, use the command "$WINE" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore'"
  8923. "$WINE" "${W_PROGRAMS_WIN}\\Internet Explorer\\iexplore" http://www.microsoft.com/windows/internet-explorer > /dev/null 2>&1 &
  8924. ;;
  8925. esac
  8926. }
  8927. #----------------------------------------------------------------
  8928. w_metadata kobo apps \
  8929. title="Kobo e-book reader" \
  8930. publisher="Kobo" \
  8931. year="2011" \
  8932. media="download" \
  8933. file1="KoboSetup.exe" \
  8934. installed_exe1="$W_PROGRAMS_X86_WIN/Kobo/Kobo.exe" \
  8935. homepage="http://www.borders.com/online/store/MediaView_ereaderapps"
  8936. load_kobo()
  8937. {
  8938. w_download http://download.kobobooks.com/desktop/1/KoboSetup.exe 31a5f5583edf4b716b9feacb857d2170104cabd9
  8939. cd "$W_CACHE/$W_PACKAGE"
  8940. w_try "$WINE" $file1 ${W_OPT_UNATTENDED:+ /S}
  8941. }
  8942. #----------------------------------------------------------------
  8943. w_metadata mingw apps \
  8944. title="Minimalist GNU for Windows, including GCC for Windows" \
  8945. publisher="GNU" \
  8946. year="2013" \
  8947. media="download" \
  8948. file1="mingw-get-setup.exe" \
  8949. installed_exe1="c:/MinGW/bin/gcc.exe" \
  8950. homepage="http://mingw.org/wiki/Getting_Started"
  8951. load_mingw()
  8952. {
  8953. w_download "$WINETRICKS_SOURCEFORGE/mingw/files/mingw-get-setup.exe" 66f1355f16ac1e328243e877880eb6e45e8b30e2
  8954. cd "$W_CACHE/mingw"
  8955. w_try "$WINE" "$file1"
  8956. w_append_path 'C:\MinGW\bin'
  8957. w_try "$WINE" mingw-get update
  8958. w_try "$WINE" mingw-get install gcc msys-base
  8959. }
  8960. #----------------------------------------------------------------
  8961. w_metadata mpc apps \
  8962. title="Media Player Classic - Home Cinema" \
  8963. publisher="doom9 folks" \
  8964. year="2014" \
  8965. media="download" \
  8966. file1="MPC-HC.1.7.5.x86.exe" \
  8967. installed_file1="$W_PROGRAMS_X86_WIN/MPC-HC/mpc-hc.exe" \
  8968. homepage="http://mpc-hc.sourceforge.net"
  8969. load_mpc()
  8970. {
  8971. w_download $WINETRICKS_SOURCEFORGE/project/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC_v1.7.5_x86/MPC-HC.1.7.5.x86.exe 39f90869929007ae0576ae30dca6cd22ed5a59c2
  8972. cd "$W_CACHE/$W_PACKAGE"
  8973. w_try "$WINE" MPC-HC.1.7.5.x86.exe ${W_OPT_UNATTENDED:+ /VERYSILENT}
  8974. }
  8975. #----------------------------------------------------------------
  8976. w_metadata mspaint apps \
  8977. title="MS Paint" \
  8978. publisher="Microsoft" \
  8979. year="2010" \
  8980. media="download" \
  8981. file1="WindowsXP-KB978706-x86-ENU.exe" \
  8982. installed_file1="c:/windows/mspaint.exe"
  8983. load_mspaint()
  8984. {
  8985. if w_workaround_wine_bug 657 "Native mspaint.exe from XP requires mfc42.dll"
  8986. then
  8987. w_call mfc42
  8988. fi
  8989. w_download http://download.microsoft.com/download/0/A/4/0A40DF5C-2BAE-4C63-802A-84C33B34AC98/WindowsXP-KB978706-x86-ENU.exe f4e076b3867c2f08b6d258316aa0e11d6822b8d7
  8990. w_try $WINE "$W_CACHE"/mspaint/WindowsXP-KB978706-x86-ENU.exe /q /x:"$W_TMP"/WindowsXP-KB978706-x86-ENU
  8991. w_try cp -f "$W_TMP"/WindowsXP-KB978706-x86-ENU/SP3GDR/mspaint.exe "$W_WINDIR_UNIX"/mspaint.exe
  8992. }
  8993. #----------------------------------------------------------------
  8994. w_metadata mt4 apps \
  8995. title="Meta Trader 4" \
  8996. year="2005" \
  8997. media="download" \
  8998. file1="mt4setup.exe"
  8999. load_mt4()
  9000. {
  9001. w_download https://download.mql5.com/cdn/web/metaquotes.software.corp/mt4/mt4setup.exe 07c094fc95916ba2b8d0282795717db3f4a5a9ba
  9002. if w_workaround_wine_bug 7156 "${title} needs wingdings.ttf, installing opensymbol"
  9003. then
  9004. w_call opensymbol
  9005. fi
  9006. # Opens a webpage
  9007. WINEDLLOVERRIDES="winebrowser.exe="
  9008. export WINEDLLOVERRIDES
  9009. # No documented silent install option, unfortunately..
  9010. cd "$W_CACHE/$W_PACKAGE"
  9011. w_ahk_do "
  9012. Run, ${file1}
  9013. WinWait, MetaTrader 4 Setup, license agreement
  9014. ControlClick, Button1
  9015. Sleep 100
  9016. ControlClick, Button3
  9017. WinWait, MetaTrader 4 Setup, Installation successfully completed
  9018. ControlClick, Button4
  9019. Process, Wait, terminal.exe
  9020. Process, Close, terminal.exe
  9021. "
  9022. }
  9023. #----------------------------------------------------------------
  9024. w_metadata nook apps \
  9025. title="Nook for PC (e-book reader)" \
  9026. publisher="Barnes & Noble" \
  9027. year="2011" \
  9028. media="download" \
  9029. file1="bndr2_setup_latest.exe" \
  9030. installed_exe1="$W_PROGRAMS_X86_WIN/Barnes & Noble/BNDesktopReader/BNDReader.exe" \
  9031. homepage="http://www.barnesandnoble.com/u/free-nook-apps/379002321/"
  9032. load_nook()
  9033. {
  9034. # dates from curl --head
  9035. # 10 Feb 2011 sha1sum 4a06a529b93ed33c3518326d874b40d8d7b70e7a
  9036. # 7 Oct 2011 sha1sum 3b0301bd55471cc47cced44501547411fac9fcea
  9037. # 7 Mar 2012 sha1sum e7060a63b9b303ddd820de762d9df254e1c931bc
  9038. w_download http://images.barnesandnoble.com/PResources/download/eReader2/bndr2_setup_latest.exe e7060a63b9b303ddd820de762d9df254e1c931bc
  9039. cd "$W_CACHE/$W_PACKAGE"
  9040. "$WINE" $file1 ${W_OPT_UNATTENDED:+ /S}
  9041. # normally has exit status 199?
  9042. }
  9043. #----------------------------------------------------------------
  9044. w_metadata npp apps \
  9045. title="Notepad++" \
  9046. publisher="Don Ho" \
  9047. year="2015" \
  9048. media="download" \
  9049. file1="npp.6.7.9.2.Installer.exe" \
  9050. installed_exe1="$W_PROGRAMS_X86_WIN/Notepad++/notepad++.exe"
  9051. load_npp()
  9052. {
  9053. w_download https://notepad-plus-plus.org/repository/6.x/6.7.9.2/npp.6.7.9.2.Installer.exe 34574fb2e4e06ff941061bf444b57ce926ce23d7
  9054. cd "$W_CACHE/$W_PACKAGE"
  9055. w_try "$WINE" "${file1}" $W_UNATTENDED_SLASH_S
  9056. }
  9057. #----------------------------------------------------------------
  9058. w_metadata office2003pro apps \
  9059. title="Microsoft Office 2003 Professional" \
  9060. publisher="Microsoft" \
  9061. year="2002" \
  9062. media="cd" \
  9063. file1="setup.exe" \
  9064. installed_exe1="$W_PROGRAMS_X86_WIN/Microsoft Office/Office11/WINWORD.EXE"
  9065. load_office2003pro()
  9066. {
  9067. w_mount OFFICE11
  9068. w_read_key
  9069. w_ahk_do "
  9070. if ( w_opt_unattended > 0 ) {
  9071. run ${W_ISO_MOUNT_LETTER}:setup.exe /EULA_ACCEPT=YES /PIDKEY=$W_KEY
  9072. } else {
  9073. run ${W_ISO_MOUNT_LETTER}:setup.exe
  9074. }
  9075. SetTitleMatchMode, 2
  9076. WinWait,Microsoft Office 2003 Setup, Welcome
  9077. if ( w_opt_unattended > 0 ) {
  9078. Sleep 500
  9079. WinWait,Microsoft Office 2003 Setup,Key
  9080. Sleep 500
  9081. ControlClick Button1 ; Next
  9082. WinWait,Microsoft Office 2003 Setup,Initials
  9083. Sleep 500
  9084. ControlClick Button1 ; Next
  9085. WinWait,Microsoft Office 2003 Setup,End-User
  9086. Sleep 500
  9087. ControlClick Button1 ; I accept
  9088. ControlClick Button2 ; Next
  9089. WinWait,Microsoft Office 2003 Setup,Recommended
  9090. Sleep 500
  9091. ControlClick Button7 ; Next
  9092. WinWait,Microsoft Office 2003 Setup,Summary
  9093. Sleep 500
  9094. ControlClick Button1 ; Install
  9095. }
  9096. WinWait,Microsoft Office 2003 Setup,Completed
  9097. if ( w_opt_unattended > 0 ) {
  9098. Sleep 500
  9099. ControlClick Button2 ; Finish
  9100. }
  9101. WinWaitClose
  9102. "
  9103. }
  9104. #----------------------------------------------------------------
  9105. w_metadata office2007pro apps \
  9106. title="Microsoft Office 2007 Professional" \
  9107. publisher="Microsoft" \
  9108. year="2006" \
  9109. media="cd" \
  9110. file1="setup.exe" \
  9111. installed_file1="$W_PROGRAMS_X86_WIN/Microsoft Office/Office12/WINWORD.EXE"
  9112. load_office2007pro()
  9113. {
  9114. if w_workaround_wine_bug 14980 "Using native riched20"
  9115. then
  9116. w_override_app_dlls winword.exe n riched20
  9117. w_override_app_dlls excel.exe n riched20
  9118. w_override_app_dlls powerpnt.exe n riched20
  9119. w_override_app_dlls msaccess.exe n riched20
  9120. w_override_app_dlls outlook.exe n riched20
  9121. w_override_app_dlls mspub.exe n riched20
  9122. w_override_app_dlls infopath.exe n riched20
  9123. fi
  9124. w_mount OFFICE12
  9125. w_read_key
  9126. if test $W_OPT_UNATTENDED
  9127. then
  9128. # See
  9129. # http://blogs.technet.com/b/office_resource_kit/archive/2009/01/29/configure-a-silent-install-of-the-2007-office-system-with-config-xml.aspx
  9130. # http://www.symantec.com/connect/articles/office-2007-silent-installation-lessons-learned
  9131. cat > "$W_TMP"/config.xml <<__EOF__
  9132. <Configuration Product="ProPlus">
  9133. <Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
  9134. <PIDKEY Value="$W_KEY" />
  9135. </Configuration>
  9136. __EOF__
  9137. "$WINE" ${W_ISO_MOUNT_LETTER}:setup.exe /config "$W_TMP_WIN"\\config.xml
  9138. status=$?
  9139. case $status in
  9140. 0|43) ;;
  9141. 78)
  9142. w_die "Installing $W_PACKAGE failed, product key $W_KEY \
  9143. might be wrong. Try again without -q, or put correct key in \
  9144. $W_CACHE/$W_PACKAGE/key.txt and rerun."
  9145. ;;
  9146. *)
  9147. w_die "Installing $W_PACKAGE failed."
  9148. ;;
  9149. esac
  9150. else
  9151. w_try "$WINE" ${W_ISO_MOUNT_LETTER}:setup.exe
  9152. fi
  9153. }
  9154. #----------------------------------------------------------------
  9155. w_metadata opera apps \
  9156. title="Opera 11" \
  9157. publisher="Opera Software" \
  9158. year="2011" \
  9159. media="download" \
  9160. file1="Opera_1150_en_Setup.exe" \
  9161. installed_exe1="$W_PROGRAMS_X86_WIN/Opera/opera.exe"
  9162. load_opera()
  9163. {
  9164. w_download ftp://ftp.opera.com/pub/opera/win/1150/en/Opera_1150_en_Setup.exe df50c7aed50e92af858e8834f833dd0543014b46
  9165. cd "$W_CACHE"/$W_PACKAGE
  9166. w_try "$WINE" $file1 ${W_OPT_UNATTENDED:+ /silent /launchopera 0 /allusers}
  9167. }
  9168. #----------------------------------------------------------------
  9169. w_metadata picasa39 apps \
  9170. title="Picasa 3.9" \
  9171. publisher="Google" \
  9172. year="2014" \
  9173. file1="picasa39-setup.exe" \
  9174. installed_exe1="$W_PROGRAMS_X86_WIN/Google/Picasa3/Picasa3.exe"
  9175. load_picasa39()
  9176. {
  9177. # 2015/01/17: 39b2df46dbc423e250371e826026a2827f55b956
  9178. # 2015/09/21: 55907fc84b1d9d6a450463869b16927f07737298
  9179. # 2016/01/02: b3f7e2ee168811cb1d924eb34afe2b0d8153f89f
  9180. w_download http://dl.google.com/picasa/picasa39-setup.exe b3f7e2ee168811cb1d924eb34afe2b0d8153f89f
  9181. if w_workaround_wine_bug 29434 "Picasa 3.9 fails to authenticate with Google"
  9182. then
  9183. w_warn "Picasa 3.9 authentication to the Google account is currently broken under wine. See http://bugs.winehq.org/show_bug.cgi?id=29434 for more details."
  9184. fi
  9185. cd "$W_CACHE"/$W_PACKAGE
  9186. w_ahk_do "
  9187. SetTitleMatchMode, 2
  9188. run picasa39-setup.exe
  9189. WinWait, Picasa 3 Setup
  9190. if ( w_opt_unattended > 0 ) {
  9191. Sleep 1000
  9192. ControlClick Button2 ;I Agree - License
  9193. Sleep 1000
  9194. WinWait, Picasa 3 Setup, Choose Install Location
  9195. ControlClick Button2 ;Install
  9196. Sleep 1000
  9197. WinWait, Picasa 3 Setup, Picasa 3 has been installed on your computer
  9198. Sleep 500
  9199. ControlClick Button5 ; Desktop Icon
  9200. Sleep 500
  9201. ControlClick Button6 ; Quick Launch
  9202. Sleep 500
  9203. ControlClick Button7 ; Default search off
  9204. Sleep 500
  9205. ControlClick Button8 ; Usage statistics sent
  9206. Sleep 500
  9207. ControlClick Button4 ; Run Picasa
  9208. Sleep 500
  9209. ControlClick Button2 ; Finish
  9210. }
  9211. WinWaitClose
  9212. "
  9213. }
  9214. #----------------------------------------------------------------
  9215. w_metadata protectionid apps \
  9216. title="Protection ID" \
  9217. publisher="CDKiLLER & TippeX" \
  9218. year="2015" \
  9219. media="download" \
  9220. file1="ProtectionId.670.halloween.2015.rar" \
  9221. installed_file1="$W_SYSTEM32_DLLS_WIN/protection_id.exe"
  9222. load_protectionid()
  9223. {
  9224. w_download http://pid.gamecopyworld.com/dl.php?f=ProtectionId.670.halloween.2015.rar a307e15f28d00959cffddd8fda073aac6df943c8 "$file1"
  9225. cd "$W_SYSTEM32_DLLS"
  9226. w_try_unrar "${W_CACHE}/${W_PACKAGE}/${file1}"
  9227. # ProtectionId.670.halloween.2015 has a different executable name than usual, this may need to be disabled on next update:
  9228. mv Protection_ID.eXe protection_id.exe
  9229. }
  9230. #----------------------------------------------------------------
  9231. w_metadata psdk2003 apps \
  9232. title="MS Platform SDK 2003" \
  9233. publisher="Microsoft" \
  9234. year="2003" \
  9235. media="download" \
  9236. file1="5.2.3790.1830.15.PlatformSDK_Svr2003SP1_rtm.img" \
  9237. installed_file1="$W_PROGRAMS_X86_WIN/Microsoft Platform SDK/SetEnv.Cmd"
  9238. load_psdk2003()
  9239. {
  9240. w_call mfc42
  9241. # http://www.microsoft.com/en-us/download/details.aspx?id=15656
  9242. w_download http://download.microsoft.com/download/7/5/e/75ec7f04-4c8c-4f38-b582-966e76602643/5.2.3790.1830.15.PlatformSDK_Svr2003SP1_rtm.img
  9243. # Unpack ISO (how handy that 7z can do this!)
  9244. # Only the windows version of 7z can handle .img files?
  9245. WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip
  9246. cd "$W_PROGRAMS_X86_UNIX"/7-Zip
  9247. w_try "$WINE" 7z.exe x -y -o"$W_TMP_WIN" "$W_CACHE_WIN\\psdk2003\\5.2.3790.1830.15.PlatformSDK_Svr2003SP1_rtm.img"
  9248. cd "$W_TMP/Setup"
  9249. # Sanity check...
  9250. w_verify_sha1sum 6376ab5394226f426366d0646bf244d26156697b PSDK-x86.msi
  9251. w_try "$WINE" msiexec /i PSDK-x86.msi ${W_UNATTENDED_SLASH_QB}
  9252. }
  9253. #----------------------------------------------------------------
  9254. w_metadata psdkwin7 apps \
  9255. title="MS Windows 7 SDK" \
  9256. publisher="Microsoft" \
  9257. year="2009" \
  9258. media="download" \
  9259. file1="winsdk_web.exe" \
  9260. installed_exe1="C:/Program Files/Microsoft SDKs/Windows/v7.0/Bin/SetEnv.Cmd"
  9261. load_psdkwin7()
  9262. {
  9263. # http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&displaylang=en
  9264. w_call dotnet20
  9265. w_call mfc42 # need mfc42u, or setup will abort
  9266. # don't have a working unattended recipe. Maybe we'll have to
  9267. # do an autohotkey script until msft gets its act together:
  9268. # http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/c053b616-7d5b-405d-9841-ec465a8e21d5
  9269. w_download http://download.microsoft.com/download/7/A/B/7ABD2203-C472-4036-8BA0-E505528CCCB7/winsdk_web.exe a01dcc67a38f461e80ea649edf1353f306582507
  9270. cd "$W_CACHE/$W_PACKAGE"
  9271. if w_workaround_wine_bug 21596
  9272. then
  9273. w_warn "When given a choice, select only C++ compilers and headers, the other options don't work yet. See http://bugs.winehq.org/show_bug.cgi?id=21596"
  9274. fi
  9275. w_try "$WINE" winsdk_web.exe
  9276. if w_workaround_wine_bug 21362
  9277. then
  9278. # Assume user installed in default location
  9279. cat > "$W_TMP"/set-psdk7.reg <<_EOF_
  9280. REGEDIT4
  9281. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs]
  9282. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows]
  9283. "CurrentVersion"="v7.0"
  9284. "CurrentInstallFolder"="C:\\\Program Files\\\Microsoft SDKs\\\Windows\\\v7.0\\\"
  9285. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0]
  9286. "InstallationFolder"="C:\\\Program Files\\\Microsoft SDKs\\\Windows\\\v7.0\\\"
  9287. "ProductVersion"="7.0.7600.16385.40715"
  9288. "ProductName"="Microsoft Windows SDK for Windows 7 (7.0.7600.16385.40715)"
  9289. _EOF_
  9290. w_try_regedit "$W_TMP_WIN"\\set-psdk7.reg
  9291. fi
  9292. }
  9293. #----------------------------------------------------------------
  9294. w_metadata psdkwin71 apps \
  9295. title="MS Windows 7.1 SDK" \
  9296. publisher="Microsoft" \
  9297. year="2010" \
  9298. media="download" \
  9299. file1="winsdk_web.exe" \
  9300. installed_exe1="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin/SetEnv.Cmd"
  9301. load_psdkwin71()
  9302. {
  9303. w_call dotnet20
  9304. w_call dotnet40
  9305. w_call mfc42 # need mfc42u, or setup will abort
  9306. # http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&displaylang=en
  9307. w_download http://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/winsdk_web.exe a8717ebb20a69c7efa85232bcb9899b8b07f98cf
  9308. if w_workaround_wine_bug 21596
  9309. then
  9310. w_warn "When given a choice, select only C++ compilers and headers, the other options don't work yet. See http://bugs.winehq.org/show_bug.cgi?id=21596"
  9311. fi
  9312. # don't have a working unattended recipe. Maybe we'll have to
  9313. # do an autohotkey script until msft gets its act together:
  9314. # http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/c053b616-7d5b-405d-9841-ec465a8e21d5
  9315. cd "$W_CACHE/$W_PACKAGE"
  9316. w_try "$WINE" winsdk_web.exe
  9317. if w_workaround_wine_bug 21362
  9318. then
  9319. # Assume user installed in default location
  9320. cat > "$W_TMP"/set-psdk71.reg <<_EOF_
  9321. REGEDIT4
  9322. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs]
  9323. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows]
  9324. "CurrentVersion"="v7.1"
  9325. "CurrentInstallFolder"="C:\\\Program Files\\\Microsoft SDKs\\\Windows\\\v7.1\\\"
  9326. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1]
  9327. "InstallationFolder"="C:\\\Program Files\\\Microsoft SDKs\\\Windows\\\v7.1\\\"
  9328. "ProductVersion"="7.0.7600.0.30514"
  9329. "ProductName"="Microsoft Windows SDK for Windows 7 (7.0.7600.0.30514)"
  9330. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1\WinSDKBuild]
  9331. "ComponentName"="Microsoft Windows SDK Headers and Libraries"
  9332. "InstallationFolder"="C:\\\Program Files\\\Microsoft SDKs\\\Windows\\\v7.1\\\"
  9333. "ProductVersion"="7.0.7600.0.30514"
  9334. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1\WinSDKTools]
  9335. "ComponentName"="Microsoft Windows SDK Headers and Libraries"
  9336. "InstallationFolder"="C:\\\Program Files\\\Microsoft SDKs\\\Windows\\\v7.1\\\bin\\\"
  9337. "ProductVersion"="7.0.7600.0.30514"
  9338. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1\WinSDKWin32Tools]
  9339. "ComponentName"="Microsoft Windows SDK Utilities for Win32 Development"
  9340. "InstallationFolder"="C:\\\Program Files\\\Microsoft SDKs\\\Windows\\\v7.1\\\bin\\\"
  9341. "ProductVersion"="7.0.7600.0.30514"
  9342. _EOF_
  9343. w_try_regedit "$W_TMP_WIN"\\set-psdk71.reg
  9344. fi
  9345. }
  9346. #----------------------------------------------------------------
  9347. w_metadata python26 dlls \
  9348. title="Python Interpreter, version 2.6.2" \
  9349. publisher="Python Software Foundaton" \
  9350. year="2009" \
  9351. media="download" \
  9352. file1="python-2.6.2.msi" \
  9353. installed_exe1="c:/Python26/python.exe"
  9354. load_python26()
  9355. {
  9356. w_download http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi 2d1503b0e8b7e4c72a276d4d9027cf4856b208b8
  9357. w_download $WINETRICKS_SOURCEFORGE/project/pywin32/pywin32/Build%20214/pywin32-214.win32-py2.6.exe eca58f29b810d8e3e7951277ebb3e35ac35794a3
  9358. if [ "$WINETRICKS_WINE_VERSION" = "wine-1.4.1" ]
  9359. then
  9360. w_die "This installer is broken under $WINETRICKS_WINE_VERSION. Please upgrade Wine. See https://code.google.com/p/winetricks/issues/detail?id=347 for more info."
  9361. fi
  9362. cd "$W_CACHE/$W_PACKAGE"
  9363. w_try "$WINE" msiexec /i python-2.6.2.msi ALLUSERS=1 $W_UNATTENDED_SLASH_Q
  9364. w_ahk_do "
  9365. SetTitleMatchMode, 2
  9366. run pywin32-214.win32-py2.6.exe
  9367. WinWait, Setup, Wizard will install pywin32
  9368. if ( w_opt_unattended > 0 ) {
  9369. ControlClick Button2 ; next
  9370. WinWait, Setup, Python 2.6 is required
  9371. ControlClick Button3 ; next
  9372. WinWait, Setup, Click Next to begin
  9373. ControlClick Button3 ; next
  9374. WinWait, Setup, finished
  9375. ControlClick Button4 ; Finish
  9376. }
  9377. WinWaitClose
  9378. "
  9379. }
  9380. #----------------------------------------------------------------
  9381. w_metadata python26_comtypes dlls \
  9382. title="Comtypes for Python 2.6" \
  9383. publisher="theller" \
  9384. year="2014" \
  9385. media="download" \
  9386. file1="1.1.1.zip" \
  9387. installed_file1="c:/Python26/Lib/site-packages/comtypes-1.1.1-py2.6.egg/EGG-INFO/PKG-INFO" \
  9388. homepage="https://github.com/enthought/comtypes/releases"
  9389. load_python26_comtypes()
  9390. {
  9391. w_call python26
  9392. w_call python26_setuptools
  9393. w_download https://github.com/enthought/comtypes/archive/${file1} 080921ede048063a3be273f5dca3acc469dfe361
  9394. w_try_unzip "$W_TMP" "${W_CACHE}/${W_PACKAGE}/${file1}"
  9395. cd "$W_TMP/comtypes-$(basename ${file1} .zip)"
  9396. w_try "$WINE" "C:\Python26\python.exe" setup.py install
  9397. }
  9398. #----------------------------------------------------------------
  9399. w_metadata python26_setuptools dlls \
  9400. title="Setuptools 18.0.1 for Python 2.6" \
  9401. publisher="Python Packaging Authority" \
  9402. year="2010" \
  9403. media="download" \
  9404. file1="ez_setup.py" \
  9405. installed_file1="c:/Python26/Lib/site-packages/setuptools.pth" \
  9406. homepage="https://pypi.python.org/pypi/setuptools"
  9407. load_python26_setuptools()
  9408. {
  9409. w_call python26
  9410. # Not checking sha1sum, script frequently updates and there aren't stable versions
  9411. w_download https://bootstrap.pypa.io/ez_setup.py
  9412. cd "$W_CACHE/$W_PACKAGE"
  9413. w_try "$WINE" "C:\Python26\python.exe" ${file1}
  9414. }
  9415. #----------------------------------------------------------------
  9416. w_metadata spotify apps \
  9417. title="Spotify - All the music, all the time" \
  9418. publisher="Spotify" \
  9419. year="2011" \
  9420. media="download" \
  9421. file1="SpotifyInstaller.exe" \
  9422. installed_exe1="c:/users/$LOGNAME/Application Data/Spotify/spotify.exe"
  9423. load_spotify()
  9424. {
  9425. # 0.4.9 f26712b576baa1c78112a05474293deef39f7f62
  9426. # 29 Apr 2011 0.4.10 4becb04f8ad08a3ff59d6830bf1d998fcca1815b
  9427. # 7 may 2011 a3c7daecf1051c4aaab544e6b66753617c0706b1
  9428. # updates too frequently to check checksum :-(
  9429. w_download http://www.spotify.com/download/Spotify%20Installer.exe
  9430. cd "$W_CACHE/$W_PACKAGE"
  9431. # w_download doesn't handle renaming for us without a checksum, tsk.
  9432. # And autohotkey thinks % is a variable reference.
  9433. if test ! -f SpotifyInstaller.exe
  9434. then
  9435. cp Spotify%20Installer.exe SpotifyInstaller.exe
  9436. fi
  9437. # Install is silent by default, and always starts app
  9438. # So all we have to do here is close app if we want unattended install
  9439. w_ahk_do "
  9440. SetTitleMatchMode, 2
  9441. run SpotifyInstaller.exe
  9442. WinWait, ahk_class SpotifyMainWindow
  9443. if ( w_opt_unattended > 0 ) {
  9444. WinClose
  9445. }
  9446. WinWaitClose
  9447. sleep 1000
  9448. Process, Close, SpotifyWebHelper.exe
  9449. "
  9450. }
  9451. #----------------------------------------------------------------
  9452. w_metadata safari apps \
  9453. title="Safari" \
  9454. publisher="Apple" \
  9455. year="2010" \
  9456. media="download" \
  9457. file1="SafariSetup.exe" \
  9458. installed_exe1="$W_PROGRAMS_X86_WIN/Safari/Safari.exe"
  9459. load_safari()
  9460. {
  9461. w_download http://appldnld.apple.com.edgesuite.net/content.info.apple.com/Safari5/061-7138.20100607.Y7U87/SafariSetup.exe e56d5d79d9cfbb85ac46ac78aa497d7f3d8dbc3d
  9462. if test $W_OPT_UNATTENDED
  9463. then
  9464. w_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."
  9465. fi
  9466. cd "$W_CACHE"/$W_PACKAGE
  9467. w_try "$WINE" SafariSetup.exe $W_UNATTENDED_SLASH_QN
  9468. }
  9469. #----------------------------------------------------------------
  9470. w_metadata sketchup apps \
  9471. title="Sketchup 8" \
  9472. publisher="Google" \
  9473. year="2012" \
  9474. media="download" \
  9475. file1="GoogleSketchUpWEN.exe" \
  9476. installed_exe1="$W_PROGRAMS_X86_WIN/Google/Google SketchUp 8/SketchUp.exe"
  9477. load_sketchup()
  9478. {
  9479. w_download http://dl.google.com/sketchup/GoogleSketchUpWEN.exe f0628e6f05241f91e4f36d6be3b8685a408ad12b
  9480. cd "$W_CACHE/$W_PACKAGE"
  9481. w_ahk_do "
  9482. SetTitleMatchMode, 2
  9483. run GoogleSketchUpWEN.exe
  9484. WinWait, SketchUp, Welcome
  9485. if ( w_opt_unattended > 0 ) {
  9486. Sleep 4000
  9487. Send {Enter}
  9488. WinWait, SketchUp, License
  9489. Sleep 1000
  9490. ControlClick Button1 ; accept
  9491. Sleep 1000
  9492. ControlClick Button4 ; Next
  9493. WinWait, SketchUp, Destination
  9494. Sleep 1000
  9495. ControlClick Button1 ; Next
  9496. WinWait, SketchUp, Ready
  9497. Sleep 1000
  9498. ControlClick Button1 ; Install
  9499. }
  9500. WinWait, SketchUp, Completed
  9501. if ( w_opt_unattended > 0 ) {
  9502. Sleep 1000
  9503. ControlClick Button1 ; Finish
  9504. }
  9505. WinWaitClose
  9506. "
  9507. }
  9508. #----------------------------------------------------------------
  9509. w_metadata steam apps \
  9510. title="Steam" \
  9511. publisher="Valve" \
  9512. year="2010" \
  9513. media="download" \
  9514. file1="SteamInstall.msi" \
  9515. installed_exe1="$W_PROGRAMS_X86_WIN/Steam/Steam.exe"
  9516. load_steam()
  9517. {
  9518. # 18 Mar 2011 7f2fee9ffeaba8424a6c76d6c95b794735ac9959
  9519. # 29 Nov 2012 fa053c268b6285741d1a1392c25f92c5cb2a6ffb
  9520. # 17 Mar 2014 b2a3fdbe4a662f3bf751f5b8bfc61f8d35e050fe
  9521. # 11 Dec 2014 7ad8fbeffa6c963b821f80129c15c9d8e85f9a4a
  9522. # 6 Jan 2015 e04aefe8bc894f11f211edec8e8a008abe0147d2
  9523. # 21 Jun 2015 0e8046d40c38d817338135ec73a5b217cc340cf5
  9524. # 29 Dec 2015 728e3c82fd57c68cbbdb64965719081ffee6272c
  9525. w_download http://media.steampowered.com/client/installer/SteamSetup.exe 728e3c82fd57c68cbbdb64965719081ffee6272c
  9526. cd "$W_CACHE/$W_PACKAGE"
  9527. # Should be fixed in newer steam versions, since 2012. Commenting out for a while before removing in case users need to revert locally
  9528. #
  9529. # Install corefonts first, so if the user doesn't have cabextract/Wine with cab support, we abort before installing Steam.
  9530. # FIXME: support using Wine's cab support
  9531. #if ! test -f "$W_FONTSDIR_UNIX/Times.TTF" && \
  9532. # w_workaround_wine_bug 22751 "Installing corefonts to prevent a Steam crash"
  9533. #then
  9534. # w_call corefonts
  9535. #fi
  9536. if test $W_OPT_UNATTENDED
  9537. then
  9538. w_ahk_do "
  9539. run, SteamSetup.exe
  9540. SetTitleMatchMode, 2
  9541. WinWait, Steam, Using Steam
  9542. ControlClick, Button2
  9543. WinWait, Steam, Please review
  9544. ControlClick, Button4
  9545. sleep 1000
  9546. ControlClick, Button2
  9547. WinWait, Steam, Select the language
  9548. ControlClick, Button2
  9549. WinWait, Steam, Choose the folder
  9550. ControlClick, Button2
  9551. WinWait, Steam, Steam has been installed
  9552. ControlClick, Button4
  9553. sleep 1000
  9554. ControlClick, Button2
  9555. WinWaitClose
  9556. "
  9557. else
  9558. w_try "$WINE" SteamSetup.exe
  9559. fi
  9560. # Not all users need this disabled, but let's play it safe for now
  9561. if w_workaround_wine_bug 22053 "Disabling gameoverlayrenderer to prevent game crashes on some machines."
  9562. then
  9563. w_override_dlls disabled gameoverlayrenderer
  9564. fi
  9565. }
  9566. #----------------------------------------------------------------
  9567. w_metadata uplay apps \
  9568. title="Uplay" \
  9569. publisher="Ubisoft" \
  9570. year="2013" \
  9571. media="download" \
  9572. file1="UplayInstaller.exe" \
  9573. installed_exe1="$W_PROGRAMS_X86_WIN/Ubisoft/Ubisoft Game Launcher/Uplay.exe"
  9574. load_uplay()
  9575. {
  9576. # 4 June 2013 3.0.1 sha1sum fdb9e736b5b2211fb23b35d30d52deae6f4b32a4
  9577. # 1 July 2013 3.1.0 sha1sum 21a7f469534dd1463eaaab6b2be2fa9084bceea2
  9578. # 11 Nov 2013 4.0 sha1sum 52e287f9f78313e4713d2f070b15734410da0c5a
  9579. # 26 Dec 2013 4.2 sha1sum ada2c11ee62eee19f8b1661bd974862e336623c6
  9580. # 16 Feb 2014 ? sha1sum 19f98632ad1ff330c647f8ff1a3a15b44238c709
  9581. # Changes too frequently, don't check anymore
  9582. w_download http://static3.cdn.ubi.com/orbit/launcher_installer/UplayInstaller.exe
  9583. cd "$W_CACHE/$W_PACKAGE"
  9584. # NSIS installer
  9585. w_try "$WINE" UplayInstaller.exe ${W_OPT_UNATTENDED:+ /S}
  9586. if w_workaround_wine_bug 33673 "Installing gdiplus to work around slow navigation"
  9587. then
  9588. w_call gdiplus
  9589. fi
  9590. }
  9591. #----------------------------------------------------------------
  9592. w_metadata utorrent apps \
  9593. title="µTorrent 2.2.1" \
  9594. publisher="BitTorrent" \
  9595. year="2011" \
  9596. media="manual_download" \
  9597. file1="utorrent_2.2.1.exe" \
  9598. installed_exe1="c:/windows/utorrent.exe"
  9599. load_utorrent()
  9600. {
  9601. # Torrent client supported on Windows,Mac OSX, Linux through WINE
  9602. # Oct 2010 2.0.4 sha1sum 8382b8a7bc625d68b6efe18a7b9e5488dc0119ee
  9603. # Nov 6 2010 2.0.4 sha1sum 263a91693d0976473cd321cd6f1b0103a814f3ad
  9604. # Dev 17 2010 2.2 sha1sum 0c95bdfba07421fe706b30ee2ec6779217c5dce4, hangs, see wine bug 24946
  9605. # Feb 11 2011 2.2.1beta sha1sum 82e81e1484b4e8654b83908509f3777532c6fcb3
  9606. # Mar 28 2011 2.2.1 sha1sum 7049109e4d3f72338d54b42ae37ecf38fafed46f
  9607. # Apr 14 2011 2.2.1 sha1sum b1378d7cbe5d1e1b168ce44def8f59facdc046d5
  9608. # 7 May 2011 sha1sum 2932c9ed1c1225e485f7e3dd2ed267aa7d568c80
  9609. # 14 May 2011 removed checksum, updates too quickly to track :-(
  9610. # 7 Mar 2012 sha1sum c6d9a80c02898139b17194d10293f17ecef054cb
  9611. w_download_manual "http://www.oldapps.com/utorrent.php?old_utorrent=38" utorrent_2.2.1.exe c6d9a80c02898139b17194d10293f17ecef054cb
  9612. w_try cp -f "$W_CACHE/utorrent/$file1" "$W_WINDIR_UNIX"/utorrent.exe
  9613. }
  9614. #----------------------------------------------------------------
  9615. w_metadata utorrent3 apps \
  9616. title="µTorrent 3.1" \
  9617. publisher="BitTorrent" \
  9618. year="2011" \
  9619. media="download" \
  9620. file1="uTorrent.exe" \
  9621. installed_exe1="c:/users/$LOGNAME/Application Data/uTorrent/uTorrent.exe"
  9622. load_utorrent3()
  9623. {
  9624. # 15 Apr 2011: sha1sum a5f198207919e8f2091a9b4459d7d6fc8a63e874
  9625. # 27 Apr 2011: sha1sum d969f0c61cf2b2afaea4121f097ef690dffbf771
  9626. # 7 May 2011: sha1sum 1793a7b15d905a9fa82f9a969a96fa53abaac04c
  9627. # 14 May: removed checksum, changes too often to track
  9628. # 7 Mar 2012: sha1sum 73ba69b5d0004239a709af5db57c88c9d9c8f7b2
  9629. # 28 Jun 2013: sha1sum d2408c8a09a2bd9704af39f818ec7ac9e9cca46e
  9630. w_download http://download-new.utorrent.com/endpoint/utorrent/os/windows/track/stable/ d2408c8a09a2bd9704af39f818ec7ac9e9cca46e uTorrent.exe
  9631. cd "$W_CACHE/$W_PACKAGE"
  9632. # If you don't use /PERFORMINSTALL, it just runs uTorrent
  9633. # FIXME: That's no longer a quiet option, though..
  9634. "$WINE" $file1 /PERFORMINSTALL /NORUN
  9635. # dang installer exits with status 1 on success
  9636. status=$?
  9637. case $status in
  9638. 0|1) ;;
  9639. *) w_die "Note: utorrent installer returned status '$status'. Aborting." ;;
  9640. esac
  9641. }
  9642. #----------------------------------------------------------------
  9643. w_metadata vc2005express apps \
  9644. title="MS Visual C++ 2005 Express" \
  9645. publisher="Microsoft" \
  9646. year="2005" \
  9647. media="download" \
  9648. file1="VC.iso" \
  9649. installed_exe1="$W_PROGRAMS_X86_WIN/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
  9650. load_vc2005express()
  9651. {
  9652. # Thanks to http://blogs.msdn.com/astebner/articles/551674.aspx for the recipe
  9653. w_call dotnet20
  9654. # http://blogs.msdn.com/b/astebner/archive/2006/03/14/551674.aspx
  9655. # http://go.microsoft.com/fwlink/?linkid=57034
  9656. w_download http://download.microsoft.com/download/A/9/1/A91D6B2B-A798-47DF-9C7E-A97854B7DD18/VC.iso 1ae44e4eaf8c61c3a39e573fd6efd9889e940529
  9657. # Unpack ISO (how handy that 7z can do this!)
  9658. w_try_7z "$W_TMP" "$W_CACHE"/vc2005express/VC.iso
  9659. cd "$W_TMP"
  9660. if [ $W_UNATTENDED_SLASH_Q ]
  9661. then
  9662. chmod +x Ixpvc.exe
  9663. # Add /qn after ReallySuppress for a really silent install (but then you won't see any errors)
  9664. w_try "$WINE" Ixpvc.exe /t:"$W_TMP_WIN" /q:a /c:"msiexec /i vcsetup.msi VSEXTUI=1 ADDLOCAL=ALL REBOOT=ReallySuppress"
  9665. else
  9666. w_try "$WINE" setup.exe
  9667. w_ahk_do "
  9668. SetTitleMatchMode, 2
  9669. WinWait, Visual C++ 2005 Express Edition Setup
  9670. WinWaitClose, Visual C++ 2005 Express Edition Setup
  9671. "
  9672. fi
  9673. }
  9674. #----------------------------------------------------------------
  9675. w_metadata vc2005expresssp1 apps \
  9676. title="MS Visual C++ 2005 Express SP1" \
  9677. publisher="Microsoft" \
  9678. year="2007" \
  9679. media="download" \
  9680. file1="VS80sp1-KB926748-X86-INTL.exe"
  9681. load_vc2005expresssp1()
  9682. {
  9683. w_call vc2005express
  9684. # http://www.microsoft.com/downloads/details.aspx?FamilyId=7B0B0339-613A-46E6-AB4D-080D4D4A8C4E
  9685. if w_workaround_wine_bug 37375
  9686. then
  9687. w_warn "Installer currently fails"
  9688. fi
  9689. w_download http://download.microsoft.com/download/7/7/3/7737290f-98e8-45bf-9075-85cc6ae34bf1/VS80sp1-KB926748-X86-INTL.exe 8b9a0172efad64774aa122f29e093ad2043b308d
  9690. w_try $WINE "$W_CACHE"/vc2005expresssp1/VS80sp1-KB926748-X86-INTL.exe
  9691. }
  9692. #----------------------------------------------------------------
  9693. w_metadata vc2005trial apps \
  9694. title="MS Visual C++ 2005 Trial" \
  9695. publisher="Microsoft" \
  9696. year="2005" \
  9697. media="download" \
  9698. file1="En_vs_2005_vsts_180_Trial.img" \
  9699. installed_exe1="$W_PROGRAMS_X86_WIN/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
  9700. load_vc2005trial()
  9701. {
  9702. w_call dotnet20
  9703. # Without mfc42.dll, pidgen.dll won't load, and the app claims "A trial edition is already installed..."
  9704. w_call mfc42
  9705. w_download http://download.microsoft.com/download/6/f/5/6f5f7a01-50bb-422d-8742-c099c8896969/En_vs_2005_vsts_180_Trial.img f66ae07618d67e693ca0524d3582208c20e07823
  9706. # Unpack ISO (how handy that 7z can do this!)
  9707. # Only the windows version of 7z can handle .img files?
  9708. WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip
  9709. cd "$W_PROGRAMS_X86_UNIX"/7-Zip
  9710. w_try "$WINE" 7z.exe x -y -o"$W_TMP_WIN" "$W_CACHE_WIN\\vc2005trial\\En_vs_2005_vsts_180_Trial.img"
  9711. cd "$W_TMP"
  9712. # Sanity check...
  9713. w_verify_sha1sum 15433993ab7573c5154dbea2dcb65450f2adbf5c vs/wcu/runmsi.exe
  9714. cd vs/Setup
  9715. w_ahk_do "
  9716. SetTitleMatchMode 2
  9717. run setup.exe
  9718. winwait, Visual Studio, Setup is loading
  9719. if ( w_opt_unattended > 0 ) {
  9720. winwait, Visual Studio, Loading completed
  9721. controlclick, button2
  9722. winwait, Visual Studio, Select features
  9723. controlclick, button38
  9724. controlclick, button40
  9725. winwait, Visual Studio, You have chosen
  9726. controlclick, button1
  9727. winwait, Visual Studio, Select features
  9728. controlclick, button11
  9729. }
  9730. ;this can take a while
  9731. winwait, Finish Page
  9732. if ( w_opt_unattended > 0 )
  9733. controlclick, button2
  9734. winwaitclose, Finish Page
  9735. "
  9736. }
  9737. #----------------------------------------------------------------
  9738. w_metadata vc2008express apps \
  9739. title="MS Visual C++ 2008 Express" \
  9740. publisher="Microsoft" \
  9741. year="2008" \
  9742. media="download" \
  9743. file1="VS2008ExpressENUX1397868.iso" \
  9744. installed_exe1="$W_PROGRAMS_X86_WIN/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
  9745. load_vc2008express()
  9746. {
  9747. w_call dotnet35
  9748. # This is the version without sp1 baked in. (sp1 requires dotnet35sp1, which doesn't work yet.)
  9749. w_download http://download.microsoft.com/download/8/B/5/8B5804AD-4990-40D0-A6AA-CE894CBBB3DC/VS2008ExpressENUX1397868.iso 76c6d28274a67741da720744026ea991a70867d1
  9750. # Unpack ISO
  9751. w_try_7z "$W_TMP" "$W_CACHE"/vc2008express/VS2008ExpressENUX1397868.iso
  9752. # See also http://blogs.msdn.com/b/astebner/archive/2008/04/25/8425198.aspx
  9753. cd "$W_TMP"/VCExpress
  9754. w_try "$WINE" setup.exe $W_UNATTENDED_SLASH_Q
  9755. }
  9756. #----------------------------------------------------------------
  9757. w_metadata vc2010express apps \
  9758. title="MS Visual C++ 2010 Express" \
  9759. publisher="Microsoft" \
  9760. year="2010" \
  9761. media="download" \
  9762. file1="VS2010Express1.iso" \
  9763. installed_exe1="$W_PROGRAMS_X86_WIN/Microsoft Visual Studio 10.0/Common7/IDE/VCExpress.exe"
  9764. load_vc2010express()
  9765. {
  9766. w_download http://download.microsoft.com/download/1/E/5/1E5F1C0A-0D5B-426A-A603-1798B951DDAE/VS2010Express1.iso adef5e361a1f64374f520b9a2d03c54ee43721c6
  9767. # Unpack ISO
  9768. w_try_7z "$W_TMP" "$W_CACHE"/vc2010express/VS2010Express1.iso
  9769. cd "$W_TMP"/VCExpress
  9770. # dotnet40 leaves winver at win2k, which causes vc2010 to abort on
  9771. # start because it looks for c:\users\$LOGNAME\Application Data
  9772. w_set_winver winxp
  9773. if w_workaround_wine_bug 12501 "Installing mspatcha to work around bug in SQL Server install"
  9774. then
  9775. w_call mspatcha
  9776. fi
  9777. if w_workaround_wine_bug 34627 "Installing Visual C++ 2005 managed runtime to work around bug in SQL Server install"
  9778. then
  9779. w_call vcrun2005
  9780. fi
  9781. w_try $WINE setup.exe $W_UNATTENDED_SLASH_Q
  9782. }
  9783. #----------------------------------------------------------------
  9784. w_metadata vlc apps \
  9785. title="VLC media player 2.2.1" \
  9786. publisher="videolan.org" \
  9787. year="2015" \
  9788. media="download" \
  9789. file1="vlc-2.2.1-win32.exe" \
  9790. installed_file1="$W_PROGRAMS_X86_WIN/VideoLAN/VLC/vlc.exe" \
  9791. homepage="http://www.videolan.org/vlc/"
  9792. load_vlc()
  9793. {
  9794. w_download http://get.videolan.org/vlc/2.2.1/win32/vlc-2.2.1-win32.exe 4cbcea9764b6b657d2147645eeb5b973b642530e
  9795. cd "$W_CACHE/$W_PACKAGE"
  9796. w_try "$WINE" $file1 ${W_OPT_UNATTENDED:+ /S}
  9797. }
  9798. #----------------------------------------------------------------
  9799. w_metadata winamp apps \
  9800. title="Winamp" \
  9801. publisher="Radionomy (AOL (Nullsoft))" \
  9802. year="2013" \
  9803. media="download" \
  9804. file1="winamp5666_full_all_redux.exe" \
  9805. installed_exe1="$W_PROGRAMS_X86_WIN/Winamp/winamp.exe" \
  9806. homepage="http://www.winamp.com"
  9807. load_winamp()
  9808. {
  9809. w_info "may send information while installing, see http://www.microsoft.com/security/portal/Threat/Encyclopedia/Entry.aspx?threatid=159633"
  9810. # 2014 winamp5621_full_emusic-7plus_en-us.exe afc172039db52fdc202114bec7bcf8b5bf2468bb
  9811. w_download http://winampplugins.co.uk/Winamp/winamp5666_full_all_redux.exe 136314be0da42ed399b88a106cb1f43093e2c0c2
  9812. cd "$W_CACHE/$W_PACKAGE"
  9813. if test $W_OPT_UNATTENDED
  9814. then
  9815. w_ahk_do "
  9816. SetWinDelay 500
  9817. SetTitleMatchMode, 2
  9818. Run $file1
  9819. WinWait, Installer Language, Please select
  9820. Sleep 500
  9821. ControlClick, Button1 ; OK
  9822. WinWait, Winamp Installer, Welcome to the Winamp installer
  9823. Sleep 500
  9824. ControlClick, Button2 ; Next
  9825. WinWait, Winamp Installer, License Agreement
  9826. Sleep 500
  9827. ControlClick, Button2 ; I Agree
  9828. WinWait, Winamp Installer, Choose Install Location
  9829. Sleep 500
  9830. ControlClick, Button2 ; Next
  9831. WinWait, Winamp Installer, Choose Components
  9832. Sleep 500
  9833. ControlClick, Button2 ; Next for Full install
  9834. WinWait, Winamp Installer, Choose Start Options
  9835. Sleep 500
  9836. ControlClick, Button4 ; uncheck start menu entry
  9837. Sleep 500
  9838. ControlClick, Button5 ; uncheck ql icon
  9839. Sleep 500
  9840. ControlClick, Button6 ; uncheck deskto icon
  9841. Sleep 500
  9842. ControlClick, Button2 ; Install
  9843. WinWait, Winamp Installer, Installation Complete
  9844. Sleep 500
  9845. ControlClick, Button4 ; uncheck launch when complete
  9846. Sleep 500
  9847. ControlClick, Button2 ; Finish
  9848. WinWaitClose
  9849. "
  9850. else
  9851. w_try "$WINE" "$file1"
  9852. fi
  9853. }
  9854. #----------------------------------------------------------------
  9855. w_metadata wme9 apps \
  9856. title="MS Windows Media Encoder 9 (broken in wine)" \
  9857. publisher="Microsoft" \
  9858. year="2002" \
  9859. media="download" \
  9860. file1="WMEncoder.exe" \
  9861. installed_file1="$W_PROGRAMS_X86_WIN/Windows Media Components/Encoder/wmenc.exe"
  9862. load_wme9()
  9863. {
  9864. if [ $W_ARCH = win64 ]
  9865. then
  9866. w_die "Installer doesn't support 64-bit architecture."
  9867. fi
  9868. # See also http://www.microsoft.com/downloads/details.aspx?FamilyID=5691ba02-e496-465a-bba9-b2f1182cdf24
  9869. w_download http://download.microsoft.com/download/8/1/f/81f9402f-efdd-439d-b2a4-089563199d47/WMEncoder.exe 7a3f8781f3e5705651992ef0150ee30bc1295116
  9870. cd "$W_CACHE/$W_PACKAGE"
  9871. w_try "$WINE" WMEncoder.exe $W_UNATTENDED_SLASH_Q
  9872. }
  9873. #----------------------------------------------------------------
  9874. # helper - not useful by itself
  9875. load_wm9codecs()
  9876. {
  9877. # Note: must install WMP9 or 10 first, or installer will complain and abort.
  9878. # See http://www.microsoft.com/downloads/details.aspx?FamilyID=06fcaab7-dcc9-466b-b0c4-04db144bb601
  9879. # Used by direct calls from load_wmp9, so have to specify cache directory.
  9880. # http://birds.camden.rutgers.edu/
  9881. w_download_to wm9codecs http://birds.camden.rutgers.edu/WM9Codecs9x.exe 8b76bdcbea0057eb12b7966edab4b942ddacc253
  9882. cd "$W_CACHE/wm9codecs"
  9883. w_set_winver win2k
  9884. w_try "$WINE" WM9Codecs9x.exe $W_UNATTENDED_SLASH_Q
  9885. }
  9886. w_metadata wmp9 dlls \
  9887. title="Windows Media Player 9" \
  9888. publisher="Microsoft" \
  9889. year="2003" \
  9890. media="download" \
  9891. file1="MPSetup.exe" \
  9892. installed_file1="$W_SYSTEM32_DLLS_WIN"/l3codeca.acm
  9893. load_wmp9()
  9894. {
  9895. w_skip_windows wmp9 && return
  9896. # Not really expected to work well yet; see
  9897. # http://appdb.winehq.org/appview.php?versionId=1449
  9898. if [ $W_ARCH = win64 ]
  9899. then
  9900. w_die "Installer doesn't support 64-bit architecture."
  9901. fi
  9902. w_call wsh57
  9903. w_set_winver win2k
  9904. # See also http://www.microsoft.com/windows/windowsmedia/player/9series/default.aspx
  9905. w_download http://download.microsoft.com/download/1/b/c/1bc0b1a3-c839-4b36-8f3c-19847ba09299/MPSetup.exe 580536d10657fa3868de2869a3902d31a0de791b
  9906. # remove builtin placeholders to allow update
  9907. rm -f "$W_SYSTEM32_DLLS"/wmvcore.dll "$W_SYSTEM32_DLLS"/wmp.dll
  9908. # need native wmp override to allow update and later checks to succeed
  9909. w_override_dlls native wmp
  9910. # FIXME: should we override quartz? Builtin crashes when you play
  9911. # anything, but maybe that's bug 30557 and only affects new systems?
  9912. # Wine's pidgen is too stubby, crashes, see wine bug 31111
  9913. w_override_app_dlls MPSetup.exe native pidgen
  9914. cd "$W_CACHE"/"$W_PACKAGE"
  9915. w_try "$WINE" MPSetup.exe $W_UNATTENDED_SLASH_Q
  9916. load_wm9codecs
  9917. w_unset_winver
  9918. }
  9919. #----------------------------------------------------------------
  9920. w_metadata wmp10 dlls \
  9921. title="Windows Media Player 10" \
  9922. publisher="Microsoft" \
  9923. year="2006" \
  9924. media="download" \
  9925. file1="MP10Setup.exe" \
  9926. installed_file1="$W_SYSTEM32_DLLS_WIN/l3codecp.acm"
  9927. load_wmp10()
  9928. {
  9929. if [ $W_ARCH = win64 ]
  9930. then
  9931. w_die "Installer doesn't support 64-bit architecture. Use a 32-bit WINEPREFIX instead."
  9932. fi
  9933. # FIXME: what versions of windows are really bundled with wmp10?
  9934. w_skip_windows wmp10 && return
  9935. # See http://appdb.winehq.org/appview.php?iVersionId=3212
  9936. w_call wsh57
  9937. # http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b446ae53-3759-40cf-80d5-cde4bbe07999
  9938. w_download http://download.microsoft.com/download/1/2/a/12a31f29-2fa9-4f50-b95d-e45ef7013f87/MP10Setup.exe 69862273a5d9d97b4a2e5a3bd93898d259e86657
  9939. # Crashes on exit, but otherwise ok; see http://bugs.winehq.org/show_bug.cgi?id=12633
  9940. cd "$W_CACHE/$W_PACKAGE"
  9941. w_try "$WINE" MP10Setup.exe $W_UNATTENDED_SLASH_Q
  9942. # Disable WMP's services, since they depend on unimplemented stuff, they trigger the GUI debugger several times
  9943. w_try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdr4_2K"
  9944. w_try_regedit /D "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Cdralw2k"
  9945. load_wm9codecs
  9946. w_unset_winver
  9947. }
  9948. #----------------------------------------------------------------
  9949. # Benchmarks
  9950. #----------------------------------------------------------------
  9951. w_metadata 3dmark2000 benchmarks \
  9952. title="3DMark2000" \
  9953. publisher="MadOnion.com" \
  9954. year="2000" \
  9955. media="download" \
  9956. file1="3dmark2000_v11_100308.exe" \
  9957. installed_file1="$W_PROGRAMS_X86_WIN/MadOnion.com/3DMark2000/3DMark2000.exe"
  9958. load_3dmark2000()
  9959. {
  9960. # http://www.futuremark.com/download/3dmark2000/
  9961. if ! test -f "$W_CACHE/$W_PACKAGE/3dmark2000_v11_100308.exe"
  9962. then
  9963. w_download http://www.ocinside.de/download/3dmark2000_v11_100308.exe b0400d59cfd45d8c8893d3d4edc58b6285ee1502
  9964. fi
  9965. w_try_unzip "$W_TMP/$W_PACKAGE" "$W_CACHE/$W_PACKAGE"/3dmark2000_v11_100308.exe
  9966. cd "$W_TMP/$W_PACKAGE"
  9967. w_ahk_do "
  9968. SetTitleMatchMode, 2
  9969. run Setup.exe
  9970. WinWait Welcome
  9971. ;ControlClick Button1 ; Next
  9972. Sleep 1000
  9973. Send {Enter} ; Next
  9974. WinWait License
  9975. ;ControlClick Button2 ; Yes
  9976. Sleep 1000
  9977. Send {Enter} ; Yes
  9978. ;WinWaitClose ahk_class #32770 ; License
  9979. WinWait ahk_class #32770, Destination
  9980. ;ControlClick Button1 ; Next
  9981. Sleep 1000
  9982. Send {Enter} ; Next
  9983. ;WinWaitClose ahk_class #32770 ; Destination
  9984. WinWait, Start
  9985. ;ControlClick Button1 ; Next
  9986. Sleep 1000
  9987. Send {Enter} ; Next
  9988. WinWait Registration
  9989. ControlClick Button1 ; Next
  9990. WinWait Complete
  9991. Sleep 1000
  9992. ControlClick Button1 ; Unclick View Readme
  9993. ;ControlClick Button4 ; Finish
  9994. Send {Enter} ; Finish
  9995. WinWaitClose
  9996. "
  9997. }
  9998. #----------------------------------------------------------------
  9999. w_metadata 3dmark2001 benchmarks \
  10000. title="3DMark2001" \
  10001. publisher="MadOnion.com" \
  10002. year="2001" \
  10003. media="download" \
  10004. file1="3dmark2001se_330_100308.exe" \
  10005. installed_file1="$W_PROGRAMS_X86_WIN/MadOnion.com/3DMark2001 SE/3DMark2001SE.exe"
  10006. load_3dmark2001()
  10007. {
  10008. # http://www.futuremark.com/download/3dmark2001/
  10009. if ! test -f "$W_CACHE/$W_PACKAGE"/3dmark2001se_330_100308.exe
  10010. then
  10011. w_download http://www.ocinside.de/download/3dmark2001se_330_100308.exe 643bacbcc1615bb4f46d3b045b1b8d78371a6b54
  10012. fi
  10013. cd "$W_CACHE/$W_PACKAGE"
  10014. w_ahk_do "
  10015. SetWinDelay 1000
  10016. SetTitleMatchMode, 2
  10017. run 3dmark2001se_330_100308.exe
  10018. WinWait ahk_class #32770 ; welcome
  10019. if ( w_opt_unattended > 0 ) {
  10020. ControlClick Button2 ; Next
  10021. sleep 5000
  10022. WinWait ahk_class #32770 ; License
  10023. ControlClick Button2 ; Next
  10024. WinWait ahk_class #32770, Destination
  10025. ControlClick Button1 ; Next
  10026. WinWait ahk_class #32770, Start
  10027. ControlClick Button1 ; Next
  10028. WinWait,, Registration
  10029. ControlClick Button2 ; Next
  10030. }
  10031. WinWait,, Complete
  10032. if ( w_opt_unattended > 0 ) {
  10033. ControlClick Button1 ; Unclick View Readme
  10034. ControlClick Button4 ; Finish
  10035. }
  10036. WinWaitClose
  10037. "
  10038. }
  10039. #----------------------------------------------------------------
  10040. w_metadata 3dmark03 benchmarks \
  10041. title="3D Mark 03" \
  10042. publisher="Futuremark" \
  10043. year="2003" \
  10044. media="manual_download" \
  10045. file1="3DMark03_v360_1901.exe" \
  10046. installed_exe1="$W_PROGRAMS_X86_WIN/Futuremark/3DMark03/3DMark03.exe"
  10047. load_3dmark03()
  10048. {
  10049. # http://www.futuremark.com/benchmarks/3dmark03/download/
  10050. if ! test -f "$W_CACHE/$W_PACKAGE/3DMark03_v360_1901.exe"
  10051. then
  10052. w_download_manual http://www.futuremark.com/download/3dmark03/ 3DMark03_v360_1901.exe 46a439101ddbbe3c9563b5e9651cb61b46ce0619
  10053. fi
  10054. cd "$W_CACHE/$W_PACKAGE"
  10055. w_warn "Don't use mouse while this installer is running. Sorry..."
  10056. # This old installer doesn't seem to be scriptable the usual way, so spray and pray.
  10057. w_ahk_do "
  10058. SetTitleMatchMode, 2
  10059. run 3DMark03_v360_1901.exe
  10060. WinWait 3DMark03 - InstallShield Wizard, Welcome
  10061. if ( w_opt_unattended > 0 ) {
  10062. WinActivate
  10063. Send {Enter}
  10064. Sleep 2000
  10065. WinWait 3DMark03 - InstallShield Wizard, License
  10066. WinActivate
  10067. ; Accept license
  10068. Send a
  10069. Send {Enter}
  10070. Sleep 2000
  10071. ; Choose Destination
  10072. Send {Enter}
  10073. Sleep 2000
  10074. ; Begin install
  10075. Send {Enter}
  10076. ; Wait for install to finish
  10077. WinWait 3DMark03, Registration
  10078. ; Purchase later
  10079. Send {Tab}
  10080. Send {Tab}
  10081. Send {Enter}
  10082. }
  10083. WinWait, 3DMark03 - InstallShield Wizard, Complete
  10084. if ( w_opt_unattended > 0 ) {
  10085. ; Uncheck readme
  10086. Send {Space}
  10087. Send {Tab}
  10088. Send {Tab}
  10089. Send {Enter}
  10090. }
  10091. WinWaitClose, 3DMark03 - InstallShield Wizard, Complete
  10092. "
  10093. }
  10094. #----------------------------------------------------------------
  10095. w_metadata 3dmark05 benchmarks \
  10096. title="3D Mark 05" \
  10097. publisher="Futuremark" \
  10098. year="2005" \
  10099. media="download" \
  10100. file1="3dmark05_v130_1901.exe" \
  10101. installed_exe1="$W_PROGRAMS_X86_WIN/Futuremark/3DMark05/3DMark05.exe"
  10102. load_3dmark05()
  10103. {
  10104. # http://www.futuremark.com/download/3dmark05/
  10105. if ! test -f "$W_CACHE/$W_PACKAGE/3DMark05_v130_1901.exe"
  10106. then
  10107. w_download http://www.ocinside.de/download/3dmark05_v130_1901.exe 8ad6bc2917e22edf5fc95d1fa96cc82515093fb2
  10108. fi
  10109. cd "$W_CACHE/$W_PACKAGE"
  10110. w_ahk_do "
  10111. run 3DMark05_v130_1901.exe
  10112. WinWait ahk_class #32770, Welcome
  10113. if ( w_opt_unattended > 0 ) {
  10114. Send {Enter}
  10115. WinWait, ahk_class #32770, License
  10116. ControlClick Button1 ; Accept
  10117. ControlClick Button4 ; Next
  10118. WinWait, ahk_class #32770, Destination
  10119. ControlClick Button1 ; Next
  10120. WinWait, ahk_class #32770, Install
  10121. ControlClick Button1 ; Install
  10122. WinWait, ahk_class #32770, Purchase
  10123. ControlClick Button4 ; Later
  10124. }
  10125. WinWait, ahk_class #32770, Complete
  10126. if ( w_opt_unattended > 0 ) {
  10127. ControlClick Button1 ; Uncheck view readme
  10128. ControlClick Button3 ; Finish
  10129. }
  10130. WinWaitClose, ahk_class #32770, Complete
  10131. "
  10132. ARGS=""
  10133. if w_workaround_wine_bug 22392
  10134. then
  10135. w_warn "You must run the app with the -nosysteminfo option to avoid a crash on startup"
  10136. ARGS="-nosysteminfo"
  10137. fi
  10138. }
  10139. #----------------------------------------------------------------
  10140. w_metadata 3dmark06 benchmarks \
  10141. title="3D Mark 06" \
  10142. publisher="Futuremark" \
  10143. year="2006" \
  10144. media="manual_download" \
  10145. file1="3DMark06_v121_installer.exe" \
  10146. installed_exe1="$W_PROGRAMS_X86_WIN/Futuremark/3DMark06/3DMark06.exe"
  10147. load_3dmark06()
  10148. {
  10149. w_download_manual http://www.futuremark.com/support/downloads 3DMark06_v121_installer.exe a125a4b0a5649f848292f38cf424c672d8142058
  10150. cd "$W_CACHE/$W_PACKAGE"
  10151. w_ahk_do "
  10152. run $file1
  10153. WinWait ahk_class #32770, Welcome
  10154. if ( w_opt_unattended > 0 ) {
  10155. Send {Enter}
  10156. WinWait, ahk_class #32770, License
  10157. ControlClick Button1 ; Accept
  10158. ControlClick Button4 ; Next
  10159. WinWait, ahk_class #32770, Destination
  10160. ControlClick Button1 ; Next
  10161. WinWait, ahk_class #32770, Install
  10162. ControlClick Button1 ; Install
  10163. WinWait ahk_class OpenAL Installer
  10164. ControlClick Button2 ; OK
  10165. WinWait ahk_class #32770
  10166. ControlClick Button1 ; OK
  10167. }
  10168. WinWait, ahk_class #32770, Complete
  10169. if ( w_opt_unattended > 0 ) {
  10170. ControlClick Button1 ; Uncheck view readme
  10171. ControlClick Button3 ; Finish
  10172. }
  10173. WinWaitClose, ahk_class #32770, Complete
  10174. "
  10175. if w_workaround_wine_bug 24417 "Installing shader compiler..."
  10176. then
  10177. # "Demo" button doesn't work without this. d3dcompiler_43 related.
  10178. w_call d3dx9_28
  10179. w_call d3dx9_36
  10180. fi
  10181. ARGS=""
  10182. if w_workaround_wine_bug 22392
  10183. then
  10184. w_warn "You must run the app with the -nosysteminfo option to avoid a crash on startup"
  10185. ARGS="-nosysteminfo"
  10186. fi
  10187. }
  10188. #----------------------------------------------------------------
  10189. w_metadata unigine_heaven benchmarks \
  10190. title="Unigen Heaven 2.1 Benchmark" \
  10191. publisher="Unigen" \
  10192. year="2010" \
  10193. media="manual_download" \
  10194. file1="Unigine_Heaven-2.1.msi"
  10195. load_unigine_heaven()
  10196. {
  10197. # FIXME: use w_download_torrent()
  10198. w_download_manual http://unigine.com/download/torrents/Unigine_Heaven-2.1.msi.torrent Unigine_Heaven-2.1.msi 3d7b94a3734cdae85f98032b61668e743979c444
  10199. cd "$W_CACHE/$W_PACKAGE"
  10200. w_ahk_do "
  10201. SetWinDelay 1000
  10202. SetTitleMatchMode, 2
  10203. run msiexec /i $file1
  10204. if ( w_opt_unattended > 0 ) {
  10205. WinWait ahk_class MsiDialogCloseClass
  10206. Send {Enter}
  10207. WinWait ahk_class MsiDialogCloseClass, License
  10208. ControlClick Button1 ; Accept
  10209. ControlClick Button3 ; Accept
  10210. WinWait ahk_class MsiDialogCloseClass, Choose
  10211. ControlClick Button1 ; Typical
  10212. WinWait ahk_class MsiDialogCloseClass, Ready
  10213. ControlClick Button2 ; Install
  10214. ; FIXME: on systems with OpenAL already (Win7?), the next four lines
  10215. ; are not needed. We should somehow wait for either OpenAL window
  10216. ; *or* Completed window.
  10217. WinWait ahk_class OpenAL Installer
  10218. ControlClick Button2 ; OK
  10219. WinWait ahk_class #32770
  10220. ControlClick Button1 ; OK
  10221. }
  10222. WinWait ahk_class MsiDialogCloseClass, Completed
  10223. if ( w_opt_unattended > 0 ) {
  10224. ControlClick Button1 ; Finish
  10225. Send {Enter}
  10226. }
  10227. winwaitclose
  10228. "
  10229. }
  10230. #----------------------------------------------------------------
  10231. # Games
  10232. #----------------------------------------------------------------
  10233. w_metadata algodoo_demo games \
  10234. title="Algodoo Demo" \
  10235. publisher="Algoryx" \
  10236. year="2009" \
  10237. media="download" \
  10238. file1="Algodoo_1_7_1-Win32.exe" \
  10239. installed_exe1="$W_PROGRAMS_X86_WIN/Algodoo/Algodoo.exe"
  10240. load_algodoo_demo()
  10241. {
  10242. w_download http://www.algodoo.com/download/Algodoo_1_7_1-Win32.exe caa73e73669a8787652a6bed123bbe2682152f12
  10243. cd "$W_CACHE/$W_PACKAGE"
  10244. w_ahk_do "
  10245. ; This one's funny... on Wine, keyboard works once you click manually, but until then, only ControlClick seems to work.
  10246. run, Algodoo_1_7_1-Win32.exe
  10247. SetTitleMatchMode, 2
  10248. winwait, Algodoo, Welcome
  10249. if ( w_opt_unattended > 0 ) {
  10250. ControlClick, TNewButton1
  10251. winwait, Algodoo, License
  10252. ;send {Tab}a{Space}{Enter}
  10253. ControlClick, TNewRadioButton1 ; Accept
  10254. ControlClick, TNewButton2 ; Next
  10255. winwait, Algodoo, Destination
  10256. ;send {Enter}
  10257. ControlClick, TNewButton3 ; Next
  10258. winwait, Algodoo, Folder
  10259. ;send {Enter}
  10260. ControlClick, TNewButton4 ; Next
  10261. winwait, Algodoo, Select Additional Tasks
  10262. ;send {Enter}
  10263. ControlClick, TNewButton4 ; Next
  10264. winwait, Algodoo, Ready to Install
  10265. ;send {Enter}
  10266. ControlClick, TNewButton4 ; Next
  10267. }
  10268. winwait, Algodoo, Completing
  10269. if ( w_opt_unattended > 0 ) {
  10270. sleep 500
  10271. send {Space}{Tab}{Space}{Tab}{Space}{Enter} ; decline to run app or view tutorials
  10272. }
  10273. WinWaitClose, Algodoo, Completing
  10274. "
  10275. }
  10276. #----------------------------------------------------------------
  10277. w_metadata amnesia_tdd_demo games \
  10278. title="Amnesia: The Dark Descent Demo" \
  10279. publisher="Frictional Games" \
  10280. year="2010" \
  10281. media="manual_download" \
  10282. file1="amnesia_tdd_demo_1.0.1.exe" \
  10283. installed_exe1="$W_PROGRAMS_X86_WIN/Amnesia - The Dark Descent Demo/redist/Amnesia.exe"
  10284. load_amnesia_tdd_demo()
  10285. {
  10286. w_download_manual "http://www.amnesiagame.com/#demo" amnesia_tdd_demo_1.0.1.exe 0bf0bc6e9c8ea76f1c44582d9302a9b22d31d1b6
  10287. cd "$W_CACHE/$W_PACKAGE"
  10288. w_ahk_do "
  10289. SetTitleMatchMode, 2
  10290. Run, amnesia_tdd_demo_1.0.1.exe
  10291. if ( w_opt_unattended > 0 ) {
  10292. WinWait,Select Setup Language, language
  10293. ControlClick, TNewButton1
  10294. WinWait, Amnesia - The Dark Descent Demo, Welcome
  10295. ControlClick, TNewButton1
  10296. WinWait, Amnesia - The Dark Descent Demo, License
  10297. ControlClick, TNewRadioButton1
  10298. ControlClick, TNewButton2
  10299. WinWait, Amnesia - The Dark Descent Demo, installed?
  10300. ControlClick, TNewButton3
  10301. WinWait, Folder Does Not Exist, created
  10302. ControlClick, Button1
  10303. WinWait, Amnesia - The Dark Descent Demo, shortcuts
  10304. ControlClick, TNewButton4
  10305. WinWait, Amnesia - The Dark Descent Demo, additional tasks
  10306. ControlClick, TNewButton4
  10307. WinWait, Amnesia - The Dark Descent Demo, ready to begin installing
  10308. ControlClick, TNewButton4
  10309. WinWait, Amnesia - The Dark Descent Demo, finished
  10310. ControlClick, TNewButton4
  10311. WinWaitClose, Amnesia - The Dark Descent Demo, finished
  10312. }
  10313. "
  10314. }
  10315. #----------------------------------------------------------------
  10316. w_metadata aoe3_demo games \
  10317. title="Age of Empires III Trial" \
  10318. publisher="Microsoft" \
  10319. year="2005" \
  10320. media="download" \
  10321. file1="aoe3trial.exe" \
  10322. installed_exe1="$W_PROGRAMS_X86_WIN/Microsoft Games/Age of Empires III Trial/age3.exe"
  10323. load_aoe3_demo()
  10324. {
  10325. w_download "http://download.microsoft.com/download/a/5/2/a525997e-8423-435b-b694-08118d235064/aoe3trial.exe" 2b0a123243092d79f910db5691d99d469f7c17c3
  10326. cd "$W_CACHE/$W_PACKAGE"
  10327. w_ahk_do "
  10328. SetTitleMatchMode, 2
  10329. run aoe3trial.exe
  10330. WinWait,Empires,Welcome
  10331. if ( w_opt_unattended > 0 ) {
  10332. sleep 1000
  10333. winactivate ; else next button click ignored on vista?
  10334. Sleep 500
  10335. ControlClick Button1 ; Next
  10336. WinWait,Empires,Please
  10337. Sleep 500
  10338. ControlClick Button4 ; Next
  10339. WinWait,Empires,Complete
  10340. Sleep 500
  10341. ControlClick Button4 ; Finish
  10342. }
  10343. WinWaitClose
  10344. "
  10345. if w_workaround_wine_bug 24912
  10346. then
  10347. # kill off lingering installer
  10348. w_ahk_do "
  10349. SetTitleMatchMode, 2
  10350. WinKill,Empires
  10351. "
  10352. # or should we just do $WINESERVER -k, like fable_tlc does?
  10353. PID=`ps augxw | grep IDriver | grep -v grep | awk '{print $2}'`
  10354. kill $PID
  10355. fi
  10356. }
  10357. #----------------------------------------------------------------
  10358. w_metadata aoe_demo games \
  10359. title="Age of Empires Demo" \
  10360. publisher="Microsoft" \
  10361. year="1997" \
  10362. media="download" \
  10363. file1="MSAoE.exe" \
  10364. installed_exe1="$W_PROGRAMS_X86_WIN/Microsoft Games/Age of Empires Trial/empires.exe"
  10365. load_aoe_demo()
  10366. {
  10367. w_download http://download.microsoft.com/download/aoe/Trial/1.0/WIN98/EN-US/MSAoE.exe 23630a65ce4133038107f3175f8fc54a914bc2f3
  10368. cd "$W_CACHE/$W_PACKAGE"
  10369. w_ahk_do "
  10370. run, MSAoE.exe
  10371. SetTitleMatchMode, 2
  10372. winwait, Microsoft Age of Empires Trial Version
  10373. if ( w_opt_unattended > 0 ) {
  10374. sleep 1000
  10375. ControlClick, Button1
  10376. winwait, End User License Agreement
  10377. sleep 1000
  10378. ControlClick, Button1
  10379. winwait, Microsoft Age of Empires Trial Version, Setup will install
  10380. sleep 1000
  10381. ControlClick Button2
  10382. winwait, Microsoft Age of Empires Trial Version, Setup has successfully
  10383. sleep 1000
  10384. ControlClick Button1
  10385. }
  10386. WinWaitClose, Microsoft Age of Empires Trial Version
  10387. "
  10388. }
  10389. #----------------------------------------------------------------
  10390. w_metadata acreedbro games \
  10391. title="Assassin's Creed Brotherhood" \
  10392. publisher="Ubisoft" \
  10393. year="2011" \
  10394. media="dvd" \
  10395. file1="ACB.iso" \
  10396. installed_exe1="$W_PROGRAMS_X86_WIN/Ubisoft/Assassin's Creed Brotherhood/AssassinsCreedBrotherhood.exe"
  10397. load_acreedbro()
  10398. {
  10399. w_mount ACB
  10400. w_read_key
  10401. w_ahk_do "
  10402. SetWinDelay 1000
  10403. SetTitleMatchMode, 2
  10404. run ${W_ISO_MOUNT_LETTER}:setup.exe
  10405. winwait, Brotherhood, Choose
  10406. if ( w_opt_unattended > 0 ) {
  10407. WinActivate
  10408. send {Enter}
  10409. ;ControlClick, Button3 ; Accept default (english)
  10410. winwait, Brotherhood, Welcome
  10411. WinActivate
  10412. send {Enter} ; Next
  10413. winwait, Brotherhood, License
  10414. WinActivate
  10415. send a ; Agree
  10416. sleep 500
  10417. send {Enter} ; Next
  10418. winwait, Brotherhood, begin
  10419. send {Enter} ; Install
  10420. }
  10421. winwait, Brotherhood, Finish
  10422. if ( w_opt_unattended > 0 ) {
  10423. ControlClick Button4
  10424. send {Enter} ; Finish
  10425. }
  10426. WinWaitClose
  10427. "
  10428. w_download http://static3.cdn.ubi.com/ac_brotherhood/ac_brotherhood_1.01_ww.exe a2b76f16616709cc16537b0e98faa4181ca904ce
  10429. # FIXME: figure out why these executables don't exit, and do a proper workaround or fix
  10430. sleep 10
  10431. if ps augxw | grep -i exe | egrep 'winemenubuilder.exe|setup.exe|PnkBstrA.exe | egrep -v egrep'
  10432. then
  10433. w_warn "Killing processes so patcher does not complain about game still running"
  10434. $WINESERVER -k
  10435. sleep 10
  10436. fi
  10437. w_info "Applying patch $W_CACHE/$W_PACKAGE/ac_brotherhood_1.01_ww.exe..."
  10438. cd "$W_CACHE/$W_PACKAGE"
  10439. w_ahk_do "
  10440. SetWinDelay 1000
  10441. SetTitleMatchMode, 2
  10442. run ac_brotherhood_1.01_ww.exe
  10443. WinWait, Choose Setup Language, Select
  10444. if ( w_opt_unattended > 0 ) {
  10445. send {Enter}
  10446. winwait, Brotherhood 1.01, License
  10447. WinActivate
  10448. send a ; Agree
  10449. sleep 500
  10450. send {Enter} ; Next
  10451. winwait, Brotherhood 1.01, Details
  10452. ControlClick Button1 ; Next
  10453. }
  10454. winwait, Brotherhood 1.01, Complete
  10455. if ( w_opt_unattended > 0 ) {
  10456. send {Enter}
  10457. }
  10458. WinWaitClose
  10459. "
  10460. }
  10461. #----------------------------------------------------------------
  10462. w_metadata atmosphir games \
  10463. title="Atmosphir" \
  10464. publisher="Minor Studios" \
  10465. year="2011" \
  10466. media="manual_download" \
  10467. file1="Atmosphir Installer v1.0.0 fixed.exe" \
  10468. installed_exe1="$W_PROGRAMS_X86_WIN/Minor Studios/Atmosphir/Atmosphir.exe" \
  10469. homepage="http://www.atmosphir.com"
  10470. load_atmosphir()
  10471. {
  10472. w_download_manual http://download.cnet.com/Atmosphir/3000-7492_4-75335647.html "Atmosphir Installer v1.0.0 fixed.exe" 3ee46b45ea9a8e4a8888148556efb7e61882f7d0
  10473. cd "$W_CACHE/$W_PACKAGE"
  10474. w_ahk_do "
  10475. run Atmosphir Installer v1.0.0 fixed.exe
  10476. winwait, Atmosphir Setup, Welcome
  10477. if ( w_opt_unattended > 0 ) {
  10478. sleep 1000
  10479. ControlClick Button2
  10480. winwait, Atmosphir Setup, License Agreement
  10481. sleep 1000
  10482. ControlClick Button2
  10483. winwait, Atmosphir Setup, Choose Install Location
  10484. sleep 1000
  10485. ControlClick Button2
  10486. winwait, Atmosphir Setup, Choose Start Menu Folder
  10487. sleep 1000
  10488. ControlClick Button2
  10489. }
  10490. winwait, Atmosphir Setup, Installation complete
  10491. if ( w_opt_unattended > 0 ) {
  10492. sleep 1000
  10493. send {Space} ; ControlClick Button4 # start
  10494. sleep 1000
  10495. ControlClick Button2
  10496. ; Let the launcher do the initial full download
  10497. winwait, Atmosphir Launcher
  10498. winwaitclose
  10499. ; then kill the game when it starts
  10500. winwait, Atmosphir
  10501. ;winkill ; doesn't work, game traps it
  10502. winclose
  10503. }
  10504. winwaitclose
  10505. "
  10506. }
  10507. #----------------------------------------------------------------
  10508. w_metadata avatar_demo games \
  10509. title="James Camerons Avatar: The Game Demo" \
  10510. publisher="Ubisoft" \
  10511. year="2009" \
  10512. media="manual_download" \
  10513. file1="Avatar_The_Game_Demo.exe" \
  10514. installed_exe1="$W_PROGRAMS_X86_WIN/Ubisoft/Demo/James Cameron's AVATAR - THE GAME (Demo)/bin/AvatarDemo.exe"
  10515. load_avatar_demo()
  10516. {
  10517. w_download_manual http://www.fileplanet.com/207386/200000/fileinfo/Avatar:-The-Game-Demo Avatar_The_Game_Demo.exe 8d8e4c82312962706bd2620406d592db4f0fa9c1
  10518. if w_workaround_wine_bug 23094 "Installing Visual C++ 2005 runtime to avoid installer crash"
  10519. then
  10520. w_call vcrun2005
  10521. fi
  10522. cd "$W_TMP"
  10523. w_try_unrar "$W_CACHE/$W_PACKAGE/Avatar_The_Game_Demo.exe"
  10524. w_ahk_do "
  10525. SetTitleMatchMode, 2
  10526. SetWinDelay 500
  10527. run, setup.exe
  10528. winwait, Language
  10529. u = $W_OPT_UNATTENDED
  10530. if ( u > 0 ) {
  10531. WinActivate
  10532. controlclick, Button1
  10533. winwait, AVATAR, Welcome
  10534. controlclick, Button1
  10535. winwait, AVATAR, License
  10536. controlclick, Button5
  10537. controlclick, Button2
  10538. winwait, AVATAR, setup type
  10539. controlclick, Button2
  10540. }
  10541. winwait AVATAR
  10542. if ( u > 0 ) {
  10543. ; Strange CRC error workaround. Will check this out. Stay tuned.
  10544. loop
  10545. {
  10546. ifwinexist, CRC Error
  10547. {
  10548. winactivate, CRC Error
  10549. controlclick, Button3, CRC Error ; ignore
  10550. }
  10551. ifwinexist, AVATAR, Complete
  10552. {
  10553. controlclick, Button4
  10554. break
  10555. }
  10556. sleep 1000
  10557. }
  10558. }
  10559. winwaitclose AVATAR
  10560. "
  10561. }
  10562. #----------------------------------------------------------------
  10563. w_metadata bttf101 games \
  10564. title="Back to the Future Episode 1" \
  10565. publisher="Telltale" \
  10566. year="2011" \
  10567. media="manual_download" \
  10568. file1="bttf_101_setup.exe" \
  10569. installed_exe1="$W_PROGRAMS_X86_WIN/Telltale Games/Back to the Future The Game/Episode 1/BackToTheFuture101.exe"
  10570. load_bttf101()
  10571. {
  10572. w_download_manual http://www.telltalegames.com/bttf bttf_101_setup.exe 9b15e26d9b4d454f714d6559efe509562df9c10b
  10573. cd "$W_CACHE/$W_PACKAGE"
  10574. w_ahk_do "
  10575. SetWinDelay 1000
  10576. SetTitleMatchMode, 2
  10577. run, bttf_101_setup.exe
  10578. winwait, Back to the Future, Welcome
  10579. if ( w_opt_unattended > 0 ) {
  10580. ControlClick, Button2 ; Next
  10581. winwait, Back to the Future, Checking DirectX
  10582. ControlClick, Button5 ; Don't check
  10583. ControlClick, Button2 ; Next
  10584. winwait, Back to the Future, License
  10585. ControlClick, Button2 ; Agree
  10586. winwait, Back to the Future, Location
  10587. ControlClick, Button2 ; Install
  10588. }
  10589. winwait, Back to the Future, has been installed
  10590. if ( w_opt_unattended > 0 ) {
  10591. ControlClick Button4 ; Don't start now
  10592. ControlClick Button2 ; Finish
  10593. }
  10594. WinWaitClose
  10595. "
  10596. }
  10597. #----------------------------------------------------------------
  10598. w_metadata bioshock_demo games \
  10599. title="Bioshock Demo" \
  10600. publisher="2K Games" \
  10601. year="2007" \
  10602. media="download" \
  10603. file1="nzd_BioShockPC.zip" \
  10604. installed_exe1="$W_PROGRAMS_X86_WIN/2K Games/BioShock Demo/Builds/Release/Bioshock.exe"
  10605. load_bioshock_demo()
  10606. {
  10607. w_download http://us.download.nvidia.com/downloads/nZone/demos/nzd_BioShockPC.zip 7a19186602cec5210e4505b58965e8c04945b3cf
  10608. w_info "Unzipping demo, installer will start in about 30 seconds."
  10609. w_try unzip "$W_CACHE/$W_PACKAGE/nzd_BioShockPC.zip" -d "$W_TMP/$W_PACKAGE"
  10610. cd "$W_TMP/$W_PACKAGE/BioShock PC Demo"
  10611. w_ahk_do "
  10612. SetTitleMatchMode, 2
  10613. run setup.exe
  10614. winwait, BioShock Demo - InstallShield Wizard, Choose Setup Language
  10615. if ( w_opt_unattended > 0 ) {
  10616. sleep 2000
  10617. ControlClick, Button3
  10618. ControlClick, Button3
  10619. winwait, BioShock Demo - InstallShield Wizard, Welcome
  10620. sleep 1000
  10621. ControlClick, Button1
  10622. winwait, BioShock Demo - InstallShield Wizard, Please read
  10623. sleep 1000
  10624. ControlClick, Button5
  10625. sleep 1000
  10626. ControlClick, Button2
  10627. winwait, BioShock Demo - InstallShield Wizard, Select the setup type
  10628. sleep 1000
  10629. ControlClick, Button2
  10630. winwait, BioShock Demo - InstallShield Wizard, Click Install to begin
  10631. ControlClick, Button1
  10632. }
  10633. winwait, BioShock Demo - InstallShield Wizard, The InstallShield Wizard has successfully installed BioShock
  10634. if ( w_opt_unattended > 0 ) {
  10635. sleep 1000
  10636. ControlClick, Button2 ; don't launch
  10637. ControlClick, Button6 ; don't show readme
  10638. send {Enter} ; finish
  10639. }
  10640. winwaitclose
  10641. sleep 3000 ; wait for splash screen to close
  10642. "
  10643. }
  10644. #----------------------------------------------------------------
  10645. w_metadata bioshock2 games \
  10646. title="Bioshock 2" \
  10647. publisher="2K Games" \
  10648. year="2010" \
  10649. media="dvd" \
  10650. file1="BIOSHOCK_2.iso" \
  10651. installed_exe1="$W_PROGRAMS_X86_WIN/2K Games/BioShock 2/SP/Builds/Binaries/Bioshock2Launcher.exe" \
  10652. installed_exe2="$W_PROGRAMS_X86_WIN/2K Games/BioShock 2/MP/Builds/Binaries/Bioshock2Launcher.exe"
  10653. load_bioshock2()
  10654. {
  10655. w_mount BIOSHOCK_2
  10656. w_ahk_do "
  10657. SetWinDelay 1000
  10658. SetTitleMatchMode, 2
  10659. run ${W_ISO_MOUNT_LETTER}:setup.exe
  10660. if ( w_opt_unattended > 0 ) {
  10661. winwait BioShock 2, Language
  10662. controlclick Button3
  10663. winwait BioShock 2, Welcome
  10664. controlclick Button1 ; Accept
  10665. winwait BioShock 2, License
  10666. controlclick Button3 ; Accept
  10667. sleep 500
  10668. controlclick Button1 ; Next
  10669. winwait BioShock 2, Setup Type
  10670. controlclick Button4 ; Next
  10671. winwait BioShock 2, Ready to Install
  10672. controlclick Button1 ; Install
  10673. }
  10674. winwait BioShock 2, Complete
  10675. if ( w_opt_unattended > 0 ) {
  10676. controlclick Button4 ; Finish
  10677. }
  10678. "
  10679. }
  10680. #----------------------------------------------------------------
  10681. w_metadata bfbc2 games \
  10682. title="Battlefield Bad Company 2" \
  10683. publisher="EA" \
  10684. year="2010" \
  10685. media="dvd" \
  10686. file1="BFBC2.iso"
  10687. load_bfbc2()
  10688. {
  10689. # Title of installer window gets the TM symbol wrong, even in utf8 locales.
  10690. # Is it like that in Windows, too?
  10691. w_mount BFBC2
  10692. w_read_key
  10693. w_ahk_do "
  10694. SetTitleMatchMode, 2
  10695. run ${W_ISO_MOUNT_LETTER}:setup.exe
  10696. winwait, Bad Company, English
  10697. sleep 500
  10698. ControlClick, Next, Bad Company
  10699. winwait, Bad Company, Registration Code
  10700. sleep 500
  10701. send {RAW}$W_KEY
  10702. ControlClick, Next, Bad Company, Registration Code
  10703. winwait, Bad Company, Setup Wizard will install
  10704. sleep 500
  10705. ControlClick, Button1, Bad Company, Setup Wizard
  10706. winwait, Bad Company, License Agreement
  10707. sleep 500
  10708. ControlClick, Button1, Bad Company, License Agreement
  10709. ControlClick, Button3, Bad Company, License Agreement
  10710. winwait, Bad Company, End-User License Agreement
  10711. sleep 500
  10712. ControlClick, Button1, Bad Company, License Agreement
  10713. ControlClick, Button3, Bad Company, License Agreement
  10714. winwait, Bad Company, Destination Folder
  10715. sleep 500
  10716. ControlClick, Button1, Bad Company, Destination Folder
  10717. winwait, Bad Company, Ready to install
  10718. sleep 500
  10719. ControlClick, Install, Bad Company, Ready to install
  10720. winwait, Authenticate Battlefield
  10721. sleep 500
  10722. ControlClick, Disc authentication, Authenticate Battlefield
  10723. ControlClick, Button4, Authenticate Battlefield
  10724. winwait, Bad Company, PunkBuster
  10725. sleep 500
  10726. ControlClick, Button4, Bad Company, PunkBuster
  10727. ControlClick, Finish, Bad Company
  10728. winwaitclose
  10729. "
  10730. w_warn "Patching to latest version..."
  10731. cd "$W_PROGRAMS_X86_UNIX/Electronic Arts/Battlefield Bad Company 2"
  10732. w_ahk_do "
  10733. SetTitleMatchMode, 2
  10734. run, BFBC2Updater.exe
  10735. winwait, Updater, have to update to
  10736. sleep 500
  10737. ControlClick, Yes, Updater, have to update
  10738. winwait, Updater, successfully updated
  10739. sleep 500
  10740. ControlClick,No, Updater, successfully updated ; Button2
  10741. "
  10742. if w_workaround_wine_bug 22762
  10743. then
  10744. # FIXME: does this directory name change in win7?
  10745. cd "$W_DRIVE_C/users/$LOGNAME/My Documents"
  10746. if test -f BFBC2/settings.ini
  10747. then
  10748. mv BFBC2/settings.ini BFBC2/oldsettings.ini
  10749. sed 's,DxVersion=auto,DxVersion=9,;
  10750. s,Fullscreen=true,Fullscreen=false,' BFBC2/oldsettings.ini > BFBC2/settings.ini
  10751. else
  10752. mkdir -p BFBC2
  10753. echo "[Graphics]" > BFBC2/settings.ini
  10754. echo "DxVersion=9" >> BFBC2/settings.ini
  10755. fi
  10756. fi
  10757. if w_workaround_wine_bug 22961
  10758. then
  10759. w_warn 'If the game says "No CD/DVD error", try "sudo mount -o remount,unhide,uid=`uid -u`". See http://bugs.winehq.org/show_bug.cgi?id=22961 for more info.'
  10760. fi
  10761. }
  10762. #----------------------------------------------------------------
  10763. w_metadata bladekitten_demo games \
  10764. title="Blade Kitten Demo" \
  10765. publisher="Krome Studios" \
  10766. year="2010" \
  10767. media="manual_download" \
  10768. file1="BladeKittenDemoInstall.exe" \
  10769. installed_exe1="$W_PROGRAMS_X86_WIN/Krome Studios/Blade Kitten Demo/BladeKitten_Demo.exe"
  10770. load_bladekitten_demo()
  10771. {
  10772. w_download_manual http://news.bigdownload.com/2010/09/23/download-blade-kitten-demo BladeKittenDemoInstall.exe d3568f94c1ce284b7381e457e9497065bd45001d
  10773. cp "$W_CACHE/$W_PACKAGE"/BladeKittenDemoInstall.exe "$W_TMP"
  10774. cd "$W_TMP"
  10775. w_ahk_do "
  10776. ; This script always gives full window title, so no need to set a different title match mode
  10777. run BladeKittenDemoInstall.exe
  10778. WinWait Blade Kitten Demo Install Package
  10779. if ( w_opt_unattended > 0 ) {
  10780. Sleep 500
  10781. ControlClick Button2 ; Install
  10782. WinWait Blade Kitten Demo, Next
  10783. Sleep 500
  10784. ControlClick Button1
  10785. WinWait Blade Kitten Demo, Cost
  10786. Sleep 500
  10787. ControlClick Button1 ; Next
  10788. WinWait Blade Kitten Demo, ready
  10789. Sleep 500
  10790. ControlClick Button1 ; Next
  10791. ; Note - in older versions of wine, the directx installer may take 6-10 minutes at this point
  10792. }
  10793. WinWaitClose
  10794. WinWait Blade Kitten Demo, Complete
  10795. if ( w_opt_unattended > 0 ) {
  10796. Sleep 500
  10797. ControlClick Button1 ; Close
  10798. }
  10799. WinWaitClose
  10800. "
  10801. }
  10802. #----------------------------------------------------------------
  10803. w_metadata cnc_tiberian_sun games \
  10804. title="Command and Conquer: Tiberian Sun (2010 edition)" \
  10805. publisher="EA" \
  10806. year="1999" \
  10807. media="download" \
  10808. file1="OfficialCnCTiberianSun.rar" \
  10809. installed_exe1="$W_PROGRAMS_X86_WIN\\EA Games\\Command & Conquer The First Decade\\Command & Conquer(tm) Tiberian Sun(tm)\\SUN\\Game.exe"
  10810. load_cnc_tiberian_sun()
  10811. {
  10812. w_download http://lvlt.bioware.cdn.ea.com/u/f/eagames/cnc3/cnc3tv/Classic/$file1 591aabd639fb9f2d2476a2150f3c00b1162674f5
  10813. cd "$W_PROGRAMS_X86_UNIX"
  10814. # FIXME: we need a progress indicator when unpacking large archives
  10815. w_info "Unpacking rar file. This will take a minute."
  10816. w_try_unrar "$W_CACHE/$W_PACKAGE/$file1"
  10817. }
  10818. #----------------------------------------------------------------
  10819. w_metadata cnc3_demo games \
  10820. title="Command and Conquer 3 Demo" \
  10821. publisher="EA" \
  10822. year="2007" \
  10823. media="download" \
  10824. file1="CnC3Demo.exe" \
  10825. installed_exe1="$W_PROGRAMS_X86_WIN/Electronic Arts/Command & Conquer 3 Tiberium Wars Demo/CNC3Demo.exe"
  10826. load_cnc3_demo()
  10827. {
  10828. w_download "http://largedownloads.ea.com/pub/demos/CommandandConquer3/CnC3Demo.exe" f6af21eba2d17eb6d8bb6a131b501b41c3a7eaf7
  10829. cd "$W_CACHE/$W_PACKAGE"
  10830. w_ahk_do "
  10831. SetTitleMatchMode, 2
  10832. run, CnC3Demo.exe
  10833. winwait, Conquer 3, free space to install
  10834. if ( w_opt_unattended > 0 ) {
  10835. controlclick, button1
  10836. winwait, WinZip, After installation
  10837. controlclick, button1
  10838. winwait, Conquer 3, InstallShield
  10839. controlclick, button1
  10840. winwait, Conquer 3, license
  10841. controlclick, button3
  10842. controlclick, button5
  10843. winwait, Conquer 3, setup type
  10844. controlclick, button5
  10845. winwait, Conquer 3, EA Link
  10846. controlclick, button1
  10847. winwait, Conquer 3, GameSpy
  10848. controlclick, button1
  10849. }
  10850. winwait, Conquer 3, Launch the program
  10851. if ( w_opt_unattended > 0 )
  10852. controlclick, button1
  10853. winwaitclose, Conquer 3, Launch the program
  10854. "
  10855. }
  10856. #----------------------------------------------------------------
  10857. w_metadata cnc_redalert3_demo games \
  10858. title="Command & Conquer Red Alert 3 Demo" \
  10859. publisher="EA" \
  10860. year="2008" \
  10861. media="manual_download" \
  10862. file1="RedAlert3Demo.exe" \
  10863. installed_exe1="$W_PROGRAMS_X86_WIN/Electronic Arts/Red Alert 3 Demo/RA3Demo.exe"
  10864. load_cnc_redalert3_demo()
  10865. {
  10866. w_download_manual 'http://www.fileplanet.com/194888/190000/fileinfo/Command-&-Conquer:-Red-Alert-3-Demo' RedAlert3Demo.exe f909b87cc12e386a51be51ede708634348c8af48
  10867. cd "$W_CACHE/$W_PACKAGE"
  10868. if test ! "$W_OPT_UNATTENDED"
  10869. then
  10870. w_try "$WINE" $file1
  10871. else
  10872. w_ahk_do "
  10873. SetWinDelay 1000
  10874. SetTitleMatchMode, 2
  10875. run $file1
  10876. winwait, Demo, readme
  10877. send {enter} ; Install button
  10878. winwait, Demo, Agreement
  10879. ControlFocus, TNewCheckListBox1, accept
  10880. send {space} ; accept license
  10881. sleep 1000
  10882. send N ; Next
  10883. winwait, Demo, Agreement ; DirectX
  10884. ControlFocus, TNewCheckListBox1, accept
  10885. send {space} ; accept license
  10886. sleep 1000
  10887. send N ; Next
  10888. winwait, Demo, Next
  10889. send N ; Next
  10890. winwait, Demo, Install
  10891. send {enter} ; Really install
  10892. winwait, Demo, Finish
  10893. send F ; finish
  10894. WinWaitClose
  10895. "
  10896. fi
  10897. }
  10898. #----------------------------------------------------------------
  10899. # http://appdb.winehq.org/objectManager.php?sClass=version&iId=9320
  10900. w_metadata blobby_volley games \
  10901. title="Blobby Volley" \
  10902. publisher="Daniel Skoraszewsky" \
  10903. year="2000" \
  10904. media="manual_download" \
  10905. file1="blobby.zip" \
  10906. installed_exe1="c:/BlobbyVolley/volley.exe"
  10907. load_blobby_volley()
  10908. {
  10909. w_download_manual http://www.chip.de/downloads/Blobby-Volley_12990993.html blobby.zip c7057c77a5009a88d9d877e17a63b5536ebeb177
  10910. w_try_unzip "$W_DRIVE_C/BlobbyVolley" "$W_CACHE/$W_PACKAGE"/blobby.zip
  10911. }
  10912. #----------------------------------------------------------------
  10913. w_metadata cim_demo games \
  10914. title="Cities In Motion Demo" \
  10915. publisher="Paradox Interactive" \
  10916. year="2010" \
  10917. media="manual_download" \
  10918. file1="cim-demo-1-0-8.exe" \
  10919. installed_exe1="$W_PROGRAMS_X86_WIN/Cities In Motion Demo/Cities In Motion.exe"
  10920. load_cim_demo()
  10921. {
  10922. # 29 Mar 2011 d40408b59bc0e6e33b564e9bbb55dbab6c44c630, Inno Setup installer
  10923. #w_download http://www.pcgamestore.com/games/cities-in-motion-nbsp/trial/cim-demo-1-0-8.exe d40408b59bc0e6e33b564e9bbb55dbab6c44c630
  10924. w_download_manual http://www.fileplanet.com/218762/210000/fileinfo/Cities-in-Motion-Demo cim-demo-1-0-8.exe d40408b59bc0e6e33b564e9bbb55dbab6c44c630
  10925. cd "$W_CACHE/$W_PACKAGE"
  10926. w_try "$WINE" cim-demo-1-0-8.exe ${W_OPT_UNATTENDED:+ /sp- /silent /norestart}
  10927. }
  10928. #----------------------------------------------------------------
  10929. w_metadata cod_demo games \
  10930. title="Call of Duty demo" \
  10931. publisher="Activision" \
  10932. year="2003" \
  10933. media="manual_download" \
  10934. file1="call_of_duty_demo.exe" \
  10935. installed_exe1="$W_PROGRAMS_X86_WIN/Call of Duty Single Player Demo/CoDSP.exe"
  10936. load_cod_demo()
  10937. {
  10938. w_download_manual http://www.gamefront.com/files/968870/call_of_duty_demo_exe Call_Of_Duty_Demo.exe 1c480a1e64a80f7f97fd0acd9582fe190c64ad8e
  10939. cd "$W_CACHE/$W_PACKAGE"
  10940. w_ahk_do "
  10941. SetTitleMatchMode, 2
  10942. run Call_Of_Duty_Demo.exe
  10943. WinWait,Call of Duty Single Player Demo,Welcome
  10944. if ( w_opt_unattended > 0 ) {
  10945. sleep 1000
  10946. ControlClick Button1 ; next
  10947. WinWait,Call of Duty Single Player Demo,License
  10948. sleep 1000
  10949. WinActivate
  10950. send A ; I Agree
  10951. WinWait,Call of Duty Single Player Demo,System
  10952. sleep 1000
  10953. send n ; Next
  10954. WinWait,Call of Duty Single Player Demo,Location
  10955. sleep 1000
  10956. send {Enter}
  10957. WinWait,Call of Duty Single Player Demo,Select
  10958. sleep 1000
  10959. send n
  10960. WinWait,Call of Duty Single Player Demo,Start
  10961. sleep 1000
  10962. send i ; Install
  10963. WinWait,Create Shortcut
  10964. sleep 1000
  10965. send n ; No
  10966. }
  10967. WinWait,Call of Duty Single Player Demo, Complete
  10968. if ( w_opt_unattended > 0 ) {
  10969. sleep 1000
  10970. send {Enter} ; Finish
  10971. }
  10972. WinWaitClose
  10973. "
  10974. if w_workaround_wine_bug 21558
  10975. then
  10976. # Work around a buffer overflow - not really Wine's fault
  10977. setvar="@if not defined %__GL_ExtensionStringVersion% then echo \"If you get a buffer overflow error, set __GL_ExtensionStringVersion=17700 before starting Wine. See http://bugs.winehq.org/show_bug.cgi?id=21558.\""
  10978. else
  10979. setvar=
  10980. fi
  10981. }
  10982. #----------------------------------------------------------------
  10983. w_metadata cod1 games \
  10984. title="Call of Duty" \
  10985. publisher="Activision" \
  10986. year="2003" \
  10987. media="dvd" \
  10988. file1="CoD1.iso" \
  10989. file2="CoD2.iso"
  10990. load_cod1()
  10991. {
  10992. # FIXME: port load_harder from winetricks and use it when caching first disc
  10993. w_mount CoD1
  10994. w_read_key
  10995. __GL_ExtensionStringVersion=17700 w_ahk_do "
  10996. SetTitleMatchMode, 2
  10997. run ${W_ISO_MOUNT_LETTER}:setup.exe
  10998. WinWait, CD Key, enter
  10999. if ( w_opt_unattended > 0 ) {
  11000. send {Raw}$W_KEY
  11001. ControlClick Button1
  11002. WinWait, CD Key, valid
  11003. ControlClick Button1
  11004. WinWait, Call of Duty, Welcome
  11005. ControlClick Button1
  11006. WinWait, Call of Duty, License
  11007. ControlClick Button3
  11008. WinWait, Call of Duty, Minimum
  11009. ControlClick Button4
  11010. WinWait, Call of Duty, Location
  11011. ControlClick Button1
  11012. WinWait, Call of Duty, Folder
  11013. ControlClick Button1
  11014. WinWait, Call of Duty, Start
  11015. ControlClick Button1
  11016. }
  11017. WinWait, Insert CD, Please insert the Call of Duty CD 2
  11018. "
  11019. "$WINE" eject ${W_ISO_MOUNT_LETTER}:
  11020. w_mount CoD2
  11021. w_ahk_do "
  11022. SetTitleMatchMode, 2
  11023. if ( w_opt_unattended > 0 ) {
  11024. Send {Enter} ;continue installation
  11025. }
  11026. WinWait, Insert CD, Please insert the Call of Duty CD 1
  11027. "
  11028. "$WINE" eject ${W_ISO_MOUNT_LETTER}:
  11029. w_mount CoD1
  11030. w_ahk_do "
  11031. SetTitleMatchMode, 2
  11032. if ( w_opt_unattended > 0 ) {
  11033. Send {Enter} ;finalize install
  11034. WinWait, Create Shortcut, Desktop
  11035. ControlClick Button1
  11036. WinWait, DirectX, Call ;directx 9
  11037. ControlClick Button6
  11038. ControlClick Button1
  11039. WinWait, Confirm DX settings, Are
  11040. ControlClick Button2
  11041. }
  11042. ; handle crash here
  11043. WinWait, Installation Complete, Congratulations!
  11044. if ( w_opt_unattended > 0 ) {
  11045. ControlClick Button1
  11046. }
  11047. WinWaitClose
  11048. "
  11049. "$WINE" eject ${W_ISO_MOUNT_LETTER}:
  11050. if w_workaround_wine_bug 21558
  11051. then
  11052. # Work around a buffer overflow - not really Wine's fault
  11053. setvar="@if not defined %__GL_ExtensionStringVersion% then echo \"If you get a buffer overflow error, set __GL_ExtensionStringVersion=17700 before starting Wine. See http://bugs.winehq.org/show_bug.cgi?id=21558.\""
  11054. else
  11055. setvar=
  11056. fi
  11057. w_warn "This game is copy-protected, and requires the real disc in a real drive to run."
  11058. }
  11059. #----------------------------------------------------------------
  11060. w_metadata cod4mw_demo games \
  11061. title="Call of Duty 4 Modern Warfare" \
  11062. publisher="Activision" \
  11063. year="2007" \
  11064. media="manual_download" \
  11065. file1="CoD4MWDemoSetup_v2.exe" \
  11066. installed_exe1="$W_PROGRAMS_X86_WIN/Activision/Call of Duty 4 - Modern Warfare Demo/iw3sp.exe"
  11067. load_cod4mw_demo()
  11068. {
  11069. w_download http://download.cnet.com/Call-of-Duty-4-Modern-Warfare/3000-7441_4-11277584.html CoD4MWDemoSetup_v2.exe 690a5f789a44437ed10784acfdd6418ca4a21886
  11070. cd "$W_CACHE/$W_PACKAGE"
  11071. w_ahk_do "
  11072. SetTitleMatchMode, 2
  11073. run, CoD4MWDemoSetup_v2.exe
  11074. WinWait,Modern Warfare,Welcome
  11075. if ( w_opt_unattended > 0 ) {
  11076. Sleep 500
  11077. ControlClick Button1 ; Next
  11078. WinWait,Modern Warfare, License
  11079. Sleep 500
  11080. ControlClick Button5 ; accept
  11081. Sleep 2000
  11082. ControlClick Button2 ; Next
  11083. WinWait,Modern Warfare, System Requirements
  11084. Sleep 500
  11085. ControlClick Button1 ; Next
  11086. Sleep 500
  11087. ControlClick Button4 ; Next
  11088. WinWait,Modern Warfare, Typical
  11089. Sleep 500
  11090. ControlClick Button4 ; License
  11091. Sleep 500
  11092. ControlClick Button1 ; Next
  11093. WinWait,Question, shortcut
  11094. Sleep 500
  11095. ControlClick Button1 ; Yes
  11096. WinWait,Microsoft DirectX Setup, license
  11097. Sleep 500
  11098. ControlClick Button1 ; Yes
  11099. WinWait,Modern Warfare, finished
  11100. Sleep 500
  11101. ControlClick Button1 ; Finished
  11102. }
  11103. WinWaitClose,WinZip Self-Extractor - CoD4MWDemoSetup_v2
  11104. "
  11105. }
  11106. #----------------------------------------------------------------
  11107. w_metadata cod5_waw games \
  11108. title="Call of Duty 5: World at War" \
  11109. publisher="Activision" \
  11110. year="2008" \
  11111. media="dvd" \
  11112. file1="5330161c7960f0770e6b05f498ab9fd13be4cfad.iso" \
  11113. installed_exe1="$W_PROGRAMS_X86_WIN/Activision/Call of Duty - World at War/CoDWaW.exe"
  11114. load_cod5_waw()
  11115. {
  11116. w_mount CODWAW
  11117. w_read_key
  11118. w_ahk_do "
  11119. SetTitleMatchMode, 2
  11120. run, ${W_ISO_MOUNT_LETTER}:setup.exe
  11121. winwait, Call of Duty, Key Code
  11122. sleep 1000
  11123. Send $W_KEY
  11124. sleep 1000
  11125. ControlClick, Button1, Call of Duty, Key Code
  11126. winwait, Key Code Check
  11127. sleep 1000
  11128. controlclick, Button1, Key Code Check
  11129. winwait, Call of Duty, License Agreement
  11130. sleep 1000
  11131. controlclick, Button5, Call of Duty, License Agreement
  11132. sleep 1000
  11133. controlclick, Button2, Call of Duty, License Agreement
  11134. ; It wants to install PunkBuster here...OH BOY! Luckily, we can say no (see below)
  11135. winwait, PunkBuster, Anti-Cheat software system
  11136. sleep 1000
  11137. controlclick, Button1, PunkBuster, Anti-Cheat software system
  11138. winwait, Call of Duty, install PunkBuster
  11139. sleep 1000
  11140. ; Punkbuster: both are scripted below, so you can toggle which one you want.
  11141. ; No:
  11142. ; controlclick, Button2, Call of Duty, install PunkBuster
  11143. ; Yes:
  11144. controlclick, Button1, Call of Duty, install PunkBuster
  11145. winwait, PunkBuster, License
  11146. sleep 1000
  11147. controlclick, Button5, PunkBuster, License
  11148. sleep 1000
  11149. controlclick, Button2, PunkBuster, License
  11150. ; /end punkbuster
  11151. winwait, Call of Duty, Minimum System
  11152. sleep 1000
  11153. controlclick, Button1, Call of Duty, Minimum System
  11154. winwait, Call of Duty, Setup Type
  11155. sleep 1000
  11156. controlclick, Button1, Call of Duty, Setup Type
  11157. ; Exits silently after install
  11158. ; Need to wait here else next verb will run before this one is done
  11159. winwaitclose, Call of Duty
  11160. "
  11161. # FIXME: Install latest updates
  11162. w_warn "This game is copy-protected, and requires the real disc in a real drive to run."
  11163. }
  11164. #----------------------------------------------------------
  11165. w_metadata cojbib_demo games \
  11166. title="Call of Juarez: Bound in Blood Demo" \
  11167. publisher="Ubisoft" \
  11168. year="2009" \
  11169. media="manual_download" \
  11170. file1="CoJ2PC_20090713_DEMO_16_buy_now_INSTALLER.exe" \
  11171. installed_exe1="$W_PROGRAMS_X86_WIN/Ubisoft/Demo/Techland/Call of Juarez - Bound in Blood SP Demo/CoJBiBDemo_x86.exe"
  11172. load_cojbib_demo()
  11173. {
  11174. w_download_manual http://www.gamefront.com/files/14274183/CoJ2PC-20090713-DEMO-16-buy-now-INSTALLER.exe/ CoJ2PC_20090713_DEMO_16_buy_now_INSTALLER.exe 6426101f6c77bacd57c8449b12a3c76db7f761f0
  11175. cd "$W_CACHE/$W_PACKAGE"
  11176. w_ahk_do "
  11177. SetTitleMatchMode 2
  11178. SetWinDelay 500
  11179. run CoJ2PC_20090713_DEMO_16_buy_now_INSTALLER.exe
  11180. winwait Setup, language
  11181. if ( w_opt_unattended > 0 ) {
  11182. controlclick button1 ; next
  11183. winwait Call of Juarez, Welcome
  11184. controlclick button1 ; next
  11185. winwait Call of Juarez, License
  11186. controlclick button2 ; yes
  11187. winwait Call of Juarez, Location
  11188. controlclick button1 ; next
  11189. winwait Call of Juarez, Start
  11190. controlclick button1 ; next
  11191. }
  11192. winwait Call of Juarez, Complete
  11193. if ( w_opt_unattended > 0 )
  11194. controlclick button2 ; next
  11195. winwaitclose Call of Juarez
  11196. "
  11197. }
  11198. #----------------------------------------------------------------
  11199. w_metadata civ4_demo games \
  11200. title="Civilization IV Demo" \
  11201. publisher="Firaxis Games" \
  11202. year="2005" \
  11203. media="manual_download" \
  11204. file1="Civilization4_Demo.zip" \
  11205. installed_file1="$W_PROGRAMS_X86_WIN/Firaxis Games/Sid Meier's Civilization 4 Demo/Civilization4.exe"
  11206. load_civ4_demo()
  11207. {
  11208. w_download_manual http://download.cnet.com/Civilization-IV-demo/3000-7489_4-10465206.html Civilization4_Demo.zip b54f1e5d0a1c2d1ef456d0c20098c23bbb6a0ea7
  11209. w_try_unzip "$W_TMP" "$W_CACHE/$W_PACKAGE"/Civilization4_Demo.zip
  11210. cd "$W_TMP/$W_PACKAGE"
  11211. chmod +x setup.exe
  11212. w_ahk_do "
  11213. SetTitleMatchMode, 2
  11214. run, setup.exe
  11215. winwait, Choose Setup Language
  11216. if ( w_opt_unattended > 0 ) {
  11217. sleep 1000
  11218. Send {enter}
  11219. winwait, Civilization 4, Welcome
  11220. ControlClick &Next >, Civilization 4
  11221. winwait, Civilization 4, I &accept the terms of the license agreement
  11222. ControlClick I &accept, Civilization 4
  11223. ControlClick &Next >, Civilization 4
  11224. winwait, Civilization 4, Express Install
  11225. ControlClick &Next >, Civilization 4
  11226. winwait, Civilization 4, begin installation
  11227. ControlClick &Install, Civilization 4
  11228. winwait, Civilization 4, InstallShield Wizard Complete
  11229. ControlClick Finish, Civilization 4
  11230. }
  11231. winwaitclose
  11232. "
  11233. }
  11234. #----------------------------------------------------------------
  11235. w_metadata crayonphysics_demo games \
  11236. title="Crayon Physics Deluxe demo" \
  11237. publisher="Kloonigames" \
  11238. year="2011" \
  11239. media="download" \
  11240. file1="crayon_release52demo.exe" \
  11241. installed_exe1="$W_PROGRAMS_WIN/Crayon Physics Deluxe Demo/crayon.exe" \
  11242. homepage="http://crayonphysics.com"
  11243. load_crayonphysics_demo()
  11244. {
  11245. w_download http://crayonphysicsdeluxe.s3.amazonaws.com/crayon_release52demo.exe 4ffd64c630f69e7cf024ef946c2c64c8c4ce4eac
  11246. # Inno Setup installer
  11247. w_try "$WINE" "$W_CACHE/$W_PACKAGE/$file1" ${W_OPT_UNATTENDED:+ /sp- /silent /norestart}
  11248. }
  11249. #----------------------------------------------------------------
  11250. w_metadata crysis2 games \
  11251. title="Crysis 2" \
  11252. publisher="EA" \
  11253. year="2011" \
  11254. media="dvd" \
  11255. file1="Crysis2.exe" \
  11256. installed_file1="$W_PROGRAMS_X86_WIN/Electronic Arts/Crytek/Crysis 2/bin32/Crysis2.exe"
  11257. load_crysis2()
  11258. {
  11259. w_mount "Crysis 2"
  11260. w_ahk_do "
  11261. SetTitleMatchMode, 2
  11262. SetWinDelay, 1000
  11263. run ${W_ISO_MOUNT_LETTER}:EASetup.exe
  11264. if ( w_opt_unattended > 0 ) {
  11265. Loop {
  11266. ; On Windows, this window does not pop up
  11267. ifWinExist, Microsoft Visual C++ 2008 Redistributable Setup
  11268. {
  11269. winwait, Microsoft Visual C++ 2008 Redistributable Setup
  11270. controlclick, Button12 ; Next
  11271. winwait, Visual C++, License
  11272. controlclick, Button11 ; Agree
  11273. controlclick, Button8 ; Install
  11274. winwait, Setup, configuring
  11275. winwaitclose
  11276. winwait, Visual C++, Complete
  11277. controlclick, Button2 ; Finish
  11278. break
  11279. }
  11280. ifWinExist, Setup, Please read the End User
  11281. {
  11282. break
  11283. }
  11284. sleep 1000
  11285. }
  11286. winwait, Setup, Please read the End User
  11287. controlclick, Button1 ; accept
  11288. sleep 500
  11289. ;controlclick, Button3 ; next
  11290. send {Enter}
  11291. ; Again for DirectX
  11292. winwait, Setup, Please read the following End
  11293. ;controlclick, Button1 ; accept
  11294. send a
  11295. sleep 1000
  11296. ;controlclick, Button3 ; next
  11297. send {Enter}
  11298. winwait,Setup, Ready to install
  11299. controlclick, Button1
  11300. }
  11301. winwait, Setup, Click the Finish button
  11302. if ( w_opt_unattended > 0 ) {
  11303. controlclick, Button5 ; Don't install EA Download Manager
  11304. controlclick, Button1 ; Finish
  11305. }
  11306. winwaitclose
  11307. "
  11308. }
  11309. #----------------------------------------------------------------
  11310. w_metadata csi6_demo games \
  11311. title="CSI: Fatal Conspiracy Demo" \
  11312. publisher="Ubisoft" \
  11313. year="2010" \
  11314. media="manual_download" \
  11315. file1="CSI6_PC_Demo_05.exe" \
  11316. installed_exe1="$W_PROGRAMS_X86_WIN/Ubisoft/Telltale Games/CSI - Fatal Conspiracy Demo/CSI6Demo.exe"
  11317. load_csi6_demo()
  11318. {
  11319. w_download_manual http://www.fileplanet.com/217175/download/CSI:-Fatal-Conspiracy-Demo CSI6_PC_Demo_05.exe 28473b4dc9760b659f24a397192b74d170b593bb
  11320. cd "$W_CACHE/$W_PACKAGE"
  11321. w_ahk_do "
  11322. SetWinDelay 1000
  11323. SetTitleMatchMode, 2
  11324. run, CSI6_PC_Demo_05.exe
  11325. winwait, Installer Language, Please select
  11326. if ( w_opt_unattended > 0 ) {
  11327. ControlClick, Button1 ; Accept default (english)
  11328. ;send {Enter} ; Accept default (english)
  11329. winwait, CSI - Fatal Conspiracy Demo Setup
  11330. send {Enter} ; Next
  11331. winwait, CSI - Fatal Conspiracy Demo Setup, License
  11332. send {Enter} ; Agree
  11333. winwait, CSI - Fatal Conspiracy Demo Setup, Location
  11334. send {Enter} ; Install
  11335. }
  11336. winwait, CSI - Fatal Conspiracy Demo Setup, Finish
  11337. if ( w_opt_unattended > 0 ) {
  11338. ControlClick Button4
  11339. send {Enter} ; Finish
  11340. WinWaitClose
  11341. }
  11342. "
  11343. }
  11344. #----------------------------------------------------------------
  11345. w_metadata darknesswithin2_demo games \
  11346. title="Darkness Within 2 Demo" \
  11347. publisher="Zoetrope Interactive" \
  11348. year="2010" \
  11349. media="manual_download" \
  11350. file1="DarknessWithin2Demo.exe" \
  11351. installed_exe1="$W_PROGRAMS_X86_WIN/Iceberg Interactive/Darkness Within 2 Demo/DarkLineage.exe"
  11352. load_darknesswithin2_demo()
  11353. {
  11354. w_download_manual http://www.bigdownload.com/games/darkness-within-2-the-dark-lineage/pc/darkness-within-2-the-dark-lineage-demo DarknessWithin2Demo.exe
  11355. cd "$W_CACHE/$W_PACKAGE"
  11356. w_ahk_do "
  11357. SetTitleMatchMode, 2
  11358. run, DarknessWithin2Demo.exe
  11359. winwait, Darkness Within, will install
  11360. if ( w_opt_unattended > 0 ) {
  11361. ControlClick, TNewButton1
  11362. winwait, Darkness, License
  11363. ControlClick, TNewRadioButton1
  11364. ControlClick, TNewButton2
  11365. winwait, Darkness, Location
  11366. ControlClick, TNewButton3
  11367. winwait, Darkness, shortcuts
  11368. ControlClick, TNewButton4
  11369. winwait, Darkness, additional
  11370. ControlClick, TNewButton4
  11371. winwait, Darkness, Ready to Install
  11372. ControlClick, TNewButton4
  11373. winwait, PhysX, License
  11374. ControlClick, Button3
  11375. ControlClick, Button4
  11376. winwait, PhysX, successfully
  11377. ControlClick, Button1
  11378. }
  11379. winwait, Darkness, Setup has finished
  11380. if ( w_opt_unattended > 0 ) {
  11381. ControlClick, TNewListBoxButton1
  11382. ControlClick, TNewButton4
  11383. }
  11384. winwaitclose, Darkness, Setup has finished
  11385. "
  11386. if w_workaround_wine_bug 23041
  11387. then
  11388. w_call d3dx9_36
  11389. fi
  11390. }
  11391. #----------------------------------------------------------------
  11392. w_metadata darkspore games \
  11393. title="Darkspore" \
  11394. publisher="EA" \
  11395. year="2011" \
  11396. media="dvd" \
  11397. file1="DARKSPORE.iso" \
  11398. installed_exe1="$W_PROGRAMS_X86_WIN/Electronic Arts/Darkspore/DarksporeBin/Darkspore.exe" \
  11399. homepage="http://darkspore.com/"
  11400. load_darkspore()
  11401. {
  11402. # Mount disc, verify that expected file is present
  11403. w_mount DARKSPORE Darkspore.ico
  11404. w_ahk_do "
  11405. SetWinDelay 1000
  11406. SetTitleMatchMode, 2
  11407. run ${W_ISO_MOUNT_LETTER}:setup.exe
  11408. if ( w_opt_unattended > 0 ) {
  11409. winwait, Choose Setup Language
  11410. controlclick, Button1 ; ok (accept default, English)
  11411. winwait, InstallShield Wizard, Welcome
  11412. controlclick, Button1 ; Next
  11413. winwait, InstallShield Wizard, License Agreement
  11414. controlclick, Button3 ; Accept
  11415. sleep 1000
  11416. controlclick, Button1 ; Next
  11417. winwait, InstallShield Wizard, Select Features
  11418. controlclick, Button5 ; Next
  11419. winwait, InstallShield Wizard, Ready to Install the Program
  11420. controlclick, Button1 ; Install
  11421. winwait, DirectX
  11422. controlclick, Button1 ; Accept
  11423. sleep 1000
  11424. controlclick, Button4 ; Next
  11425. winwait, DirectX, DirectX setup
  11426. controlclick, Button4
  11427. winwait, DirectX, components installed
  11428. controlclick, Button5 ; Finish
  11429. }
  11430. winwait, InstallShield Wizard, You are now ready
  11431. if ( w_opt_unattended > 0 ) {
  11432. controlclick, Button1 ; Uncheck View Readme.txt
  11433. controlclick, Button4 ; Finish
  11434. }
  11435. WinWaitClose, InstallShield Wizard
  11436. "
  11437. }
  11438. #----------------------------------------------------------------
  11439. w_metadata dcuo games \
  11440. title="DC Universe Online" \
  11441. publisher="EA" \
  11442. year="2011" \
  11443. media="dvd" \
  11444. file1="DCUO - Disc 1.iso" \
  11445. file2="DCUO - Disc 2.iso" \
  11446. installed_exe1="$W_PROGRAMS_X86_WIN/Sony Online Entertainment/Installed Games/DC Universe Online Live/LaunchPad.exe"
  11447. load_dcuo()
  11448. {
  11449. # The installer would take care of this, but let's do it first
  11450. w_call flash
  11451. w_mount "DCUO - Disc 1"
  11452. w_ahk_do "
  11453. SetWinDelay 1000
  11454. SetTitleMatchMode, 2
  11455. run, ${W_ISO_MOUNT_LETTER}:setup.exe
  11456. if ( w_opt_unattended > 0 ) {
  11457. winwait, DC Universe, Anti-virus
  11458. ControlClick, Button1 ; next
  11459. winwait, DC Universe, License
  11460. ControlClick, Button5 ; accept
  11461. sleep 500
  11462. ControlClick, Button2 ; next
  11463. winwait, DC Universe, Shortcut
  11464. ControlClick, Button3 ; next
  11465. Loop
  11466. {
  11467. IfWinExist, DC Universe, not enough space
  11468. {
  11469. exit 1 ; dang, have to quit
  11470. }
  11471. IfWinExist, DC Universe, Ready
  11472. {
  11473. break
  11474. }
  11475. Sleep 1000
  11476. }
  11477. winwait, DC Universe, Ready
  11478. ControlClick, Button1 ; next
  11479. }
  11480. winwait, Setup Needs The Next Disk, Please insert disk 2
  11481. "
  11482. w_mount "DCUO - Disc 2"
  11483. w_ahk_do "
  11484. SetWinDelay 1000
  11485. SetTitleMatchMode, 2
  11486. winwait, Setup Needs The Next Disk, Please insert disk 2
  11487. if ( w_opt_unattended > 0 ) {
  11488. ControlClick, Button2 ; next
  11489. winwaitclose
  11490. Loop
  11491. {
  11492. IfWinExist, DirectX, Welcome
  11493. {
  11494. ControlClick, Button1 ; accept
  11495. Sleep 1000
  11496. ControlClick, Button4 ; next
  11497. WinWait, DirectX, Runtime Install
  11498. ControlClick, Button4 ; next
  11499. WinWait, DirectX, Complete
  11500. ControlClick, Button4 ; next
  11501. sleep 1000
  11502. process, close, dxsetup.exe ; work around strange 'next button does nothing' bug
  11503. }
  11504. IfWinExist, Flash ; a newer version of flash is already installed
  11505. {
  11506. ControlClick, Button3 ; quit
  11507. }
  11508. IfWinExist, DC Universe, Complete
  11509. {
  11510. break
  11511. }
  11512. Sleep 1000
  11513. }
  11514. }
  11515. WinWait, DC Universe, Complete
  11516. if ( w_opt_unattended > 0 ) {
  11517. ControlClick, Button4 ; finish
  11518. }
  11519. winwaitclose
  11520. "
  11521. w_warn "Now let the wookie install itself, and then quit."
  11522. }
  11523. #----------------------------------------------------------------
  11524. w_metadata deadspace games \
  11525. title="Dead Space" \
  11526. publisher="EA" \
  11527. year="2008" \
  11528. media="dvd" \
  11529. file1="DEADSPACE.iso" \
  11530. installed_exe1="$W_PROGRAMS_X86_WIN/Electronic Arts/Dead Space/Dead Space.exe"
  11531. load_deadspace()
  11532. {
  11533. w_mount DEADSPACE
  11534. if w_workaround_wine_bug 23324
  11535. then
  11536. msvcrun_me_harder="
  11537. winwait, Microsoft
  11538. controlclick, Button1
  11539. "
  11540. else
  11541. msvcrun_me_harder=""
  11542. fi
  11543. w_read_key
  11544. w_ahk_do "
  11545. SetTitleMatchMode, 2
  11546. ; note: if this is the second run, the installer skips the registration code prompt
  11547. run, ${W_ISO_MOUNT_LETTER}:EASetup.exe
  11548. winwait, Dead
  11549. send {Enter}
  11550. winwait, Dead, Registration Code
  11551. send {RAW}$W_KEY
  11552. Sleep 1000
  11553. controlclick, Button2
  11554. $msvcrun_me_harder
  11555. winwait, Setup, License
  11556. Sleep 1000
  11557. controlclick, Button1
  11558. Sleep 1000
  11559. send {Enter}
  11560. winwait, Setup, License
  11561. Sleep 1000
  11562. controlclick, Button1
  11563. Sleep 1000
  11564. send {Enter}
  11565. winwait, Setup, Destination
  11566. Sleep 1000
  11567. controlclick, Button1
  11568. winwait, Setup, begin
  11569. Sleep 1000
  11570. controlclick, Button1
  11571. winwait, Setup, Finish
  11572. Sleep 1000
  11573. controlclick, Button5
  11574. controlclick, Button1
  11575. "
  11576. }
  11577. #----------------------------------------------------------------
  11578. w_metadata deadspace2 games \
  11579. title="Dead Space 2" \
  11580. publisher="EA" \
  11581. year="2011" \
  11582. media="dvd" \
  11583. file1="Disc1.iso" \
  11584. file2="Disc2.iso" \
  11585. installed_exe1="$W_PROGRAMS_X86_WIN/EA Games/Dead Space 2/deadspace2.exe" \
  11586. load_deadspace2()
  11587. {
  11588. w_read_key
  11589. w_mount Disc1
  11590. # FIXME: this bug was fixed in 1.3.36, so this is unneccessary
  11591. #
  11592. # Work around bug 25963 (fails to switch discs)
  11593. w_warn "Copying discs to hard drive. This will take a few minutes."
  11594. cd "$W_TMP"
  11595. # Copy takes a LONG time, so offer a way to avoid copy while debugging verb
  11596. # You'll need to comment out the five "rm -rf"'s, too.
  11597. if test ! -f easetup.exe
  11598. then
  11599. w_try cp -R "$W_ISO_MOUNT_ROOT"/* .
  11600. # Make the directories writable, else 2nd disc copy will fail.
  11601. w_try chmod -R +w .
  11602. w_mount Disc2
  11603. # On Linux, use symlinks for disc 2. (On Cygwin, we'd have to copy.)
  11604. w_try ln -s "$W_ISO_MOUNT_ROOT"/*.dat .
  11605. mkdir -p movies/en movies/fr
  11606. w_try ln -s "$W_ISO_MOUNT_ROOT"/movies/en/* movies/en/
  11607. w_try ln -s "$W_ISO_MOUNT_ROOT"/movies/fr/* movies/fr/
  11608. # Make the files writable, otherwise you'll get errors when trying to remove the temp directory.
  11609. chmod -R +w .
  11610. fi
  11611. # Install takes a long time, so offer a way to skip installation
  11612. # and go straight to activation while debugging that
  11613. if ! test -f "$W_PROGRAMS_X86_UNIX/EA Games/Dead Space 2/deadspace2.exe"
  11614. then
  11615. w_ahk_do "
  11616. run easetup.exe
  11617. if ( w_opt_unattended > 0 ) {
  11618. SetTitleMatchMode, 2
  11619. ; Not all systems need the Visual C++ runtime
  11620. loop
  11621. {
  11622. ifwinexist, Microsoft Visual C++ 2008 Redistributable Setup
  11623. {
  11624. sleep 500
  11625. controlclick, Button12 ; Next
  11626. winwait, Visual C++, License
  11627. sleep 500
  11628. controlclick, Button11 ; Agree
  11629. sleep 500
  11630. controlclick, Button8 ; Install
  11631. winwait, Setup, configuring
  11632. winwaitclose
  11633. winwait, Visual C++, Complete
  11634. sleep 500
  11635. controlclick, Button2 ; Finish
  11636. break
  11637. }
  11638. ifwinexist, Setup, Dead Space
  11639. {
  11640. break
  11641. }
  11642. sleep 1000
  11643. }
  11644. winwait, Setup, License ; Dead Space license
  11645. sleep 500
  11646. controlclick Button1 ; accept
  11647. controlclick Button3 ; next
  11648. SetTitleMatchMode, slow ; since word DirectX in next dialog can only be read 'slowly'
  11649. winwait, Setup, DirectX ; DirectX license
  11650. sleep 500
  11651. controlclick Button1 ; accept
  11652. controlclick Button3 ; next
  11653. winwait, Setup, Ready to install
  11654. sleep 500
  11655. controlclick Button1 ; Install
  11656. }
  11657. winwait, Setup, Completed
  11658. if ( w_opt_unattended > 0 ) {
  11659. controlclick Button5 ; (Don't) install EA Download Manager
  11660. controlclick Button1 ; Finish
  11661. }
  11662. winwaitclose
  11663. "
  11664. fi
  11665. # Activate the game
  11666. cd "$W_PROGRAMS_X86/EA Games/Dead Space 2"
  11667. w_ahk_do "
  11668. run activation.exe
  11669. if ( w_opt_unattended > 0 ) {
  11670. SetTitleMatchMode, 2
  11671. WinWait, Product activation
  11672. sleep 500
  11673. controlclick TBitBtn2 ; Next
  11674. WinWait, Product activation, Serial
  11675. sleep 500
  11676. send $W_KEY
  11677. controlclick TBitBtn3 ; Next
  11678. WinWait, Information
  11679. sleep 4000 ; let user see what happened
  11680. send {Enter}
  11681. }
  11682. WinWaitClose, Product activation
  11683. "
  11684. }
  11685. #----------------------------------------------------------------
  11686. w_metadata deusex2_demo games \
  11687. title="Deus Ex 2 / Deus Ex: Invisible War Demo" \
  11688. publisher="Eidos" \
  11689. year="2003" \
  11690. media="manual_download" \
  11691. file1="dxiw_demo.zip" \
  11692. installed_exe1="$W_PROGRAMS_X86_WIN/Deus Ex - Invisible War Demo/System/DX2.exe"
  11693. load_deusex2_demo()
  11694. {
  11695. w_download_manual "http://www.techpowerup.com/downloads/1730/Deus_Ex:_Invisible_War_Demo.html" dxiw_demo.zip ccae48fb046d912b3714ea1b4be4294e74bb3092
  11696. w_try unzip "$W_CACHE/$W_PACKAGE/dxiw_demo.zip" -d "$W_TMP"
  11697. cd "$W_TMP"
  11698. w_ahk_do "
  11699. SetTitleMatchMode 2
  11700. SetWinDelay 500
  11701. run setup.exe
  11702. winwait Deus Ex, Launch
  11703. if ( w_opt_unattended > 0 ) {
  11704. controlclick button2
  11705. winwait Deus Ex, Welcome
  11706. controlclick button1
  11707. winwait Deus Ex, License
  11708. controlclick button3 ;accept
  11709. controlclick button1 ;next
  11710. winwait Deus Ex, Setup Type
  11711. controlclick button4
  11712. winwait Deus Ex, Install
  11713. controlclick button1
  11714. winwait Question, Readme
  11715. controlclick button2
  11716. winwait Question, play
  11717. controlclick button2
  11718. }
  11719. winwait Deus Ex, Complete
  11720. if ( w_opt_unattended > 0 )
  11721. controlclick button4
  11722. winwaitclose Deus Ex, Complete
  11723. "
  11724. }
  11725. #----------------------------------------------------------------
  11726. w_metadata diablo2 games \
  11727. title="Diablo II" \
  11728. publisher="Blizzard" \
  11729. year="2000" \
  11730. media="cd" \
  11731. file1="INSTALL.iso" \
  11732. file2="PLAYDISC.iso" \
  11733. file3="CINEMATICS.iso" \
  11734. installed_exe1="$W_PROGRAMS_X86_WIN/Diablo II/Diablo II.exe"
  11735. load_diablo2()
  11736. {
  11737. w_download http://ftp.blizzard.com/pub/diablo2/patches/PC/D2Patch_113c.exe c78761bfb06999a9788f25a23a1ed30260ffb8ab
  11738. w_read_key
  11739. w_mount INSTALL
  11740. w_ahk_do "
  11741. SetWinDelay 500
  11742. run ${W_ISO_MOUNT_LETTER}:setup.exe
  11743. winwait, Diablo II Setup
  11744. send {i}
  11745. winwait, Choose Installation Size
  11746. send {u}
  11747. send {Enter}
  11748. send {Raw}$LOGNAME
  11749. send {Tab}{Raw}$W_KEY
  11750. send {Enter}
  11751. winwait, Diablo II - choose install directory
  11752. send {Enter}
  11753. winwait, Desktop Shortcut
  11754. send {N}
  11755. winwait, Insert Disc"
  11756. w_mount PLAYDISC
  11757. # Needed by patch 1.13c to avoid disc swapping
  11758. cp "$W_ISO_MOUNT_ROOT"/d2music.mpq "$W_PROGRAMS_UNIX/Diablo II/"
  11759. w_ahk_do "
  11760. send, {Enter}
  11761. Sleep 1000
  11762. winwait, Insert Disc"
  11763. w_mount CINEMATICS
  11764. w_ahk_do "
  11765. send, {Enter}
  11766. Sleep 1000
  11767. winwait, Insert Disc"
  11768. w_mount INSTALL
  11769. w_ahk_do "
  11770. send, {Enter}
  11771. Sleep 1000
  11772. winwait, View ReadMe?
  11773. ControlClick &No, View ReadMe?
  11774. winwait, Register Diablo II Electronically?
  11775. send {N}
  11776. winwait, Diablo II Setup - Video Test
  11777. ControlClick &Cancel, Diablo II Setup - Video Test
  11778. winclose, Diablo II Setup"
  11779. cd "$W_CACHE"/$W_PACKAGE
  11780. w_try "$WINE" D2Patch_113c.exe
  11781. w_ahk_do "
  11782. winwait, Blizzard Updater v2.72, has completed
  11783. Sleep 1000
  11784. send {Enter}
  11785. winwait Diablo II
  11786. Sleep 1000
  11787. ControlClick &Cancel, Diablo II"
  11788. # Dagnabbit, the darn updater starts the game after it updates, no matter what I do?
  11789. w_killall "Game.exe"
  11790. }
  11791. w_metadata digitanks_demo games \
  11792. title="Digitanks Demo" \
  11793. publisher="Lunar Workshop" \
  11794. year="2011" \
  11795. media="download" \
  11796. file1="digitanks.exe" \
  11797. installed_exe1="$W_PROGRAMS_X86_WIN/Digitanks/digitanksdemo.exe" \
  11798. homepage="http://www.digitanks.com"
  11799. load_digitanks_demo()
  11800. {
  11801. # 8 june 2011: f204b13dc64c1a54fb1aaf27187c6083ebb16acf
  11802. # 11 Nov 2011: e54ffb07232f434bcfaf7b3d43ddf9affa93ef15
  11803. w_download "http://static.digitanks.com/files/digitanks.exe" e54ffb07232f434bcfaf7b3d43ddf9affa93ef15
  11804. cd "$W_CACHE/$W_PACKAGE"
  11805. w_try "$WINE" $file1 ${W_OPT_UNATTENDED:+ /S}
  11806. if w_workaround_wine_bug 8060 "installing corefonts"
  11807. then
  11808. w_call corefonts
  11809. fi
  11810. }
  11811. w_metadata dirt2_demo games \
  11812. title="Dirt 2 Demo" \
  11813. publisher="Codemasters" \
  11814. year="2009" \
  11815. media="manual_download" \
  11816. file1="Dirt2Demo.zip" \
  11817. installed_exe1="$W_PROGRAMS_X86_WIN/Codemasters/DiRT2 Demo/dirt2.exe"
  11818. load_dirt2_demo()
  11819. {
  11820. w_download_manual http://www.joystiq.com/game/dirt-2/download/dirt-2-demo/ Dirt2Demo.zip 13af1beb8c4f6300e4655045b66aea1f8a29f2b3
  11821. w_try_unzip "$W_TMP/$W_PACKAGE" "$W_CACHE/$W_PACKAGE/Dirt2Demo.zip"
  11822. if w_workaround_wine_bug 23532
  11823. then
  11824. w_call gfw
  11825. fi
  11826. if w_workaround_wine_bug 24868
  11827. then
  11828. w_call d3dx9_36
  11829. fi
  11830. cd "$W_TMP/$W_PACKAGE"
  11831. w_ahk_do "
  11832. Run, "Setup.exe"
  11833. WinWait, Choose Setup Language, Select
  11834. if ( w_opt_unattended > 0 ) {
  11835. sleep 500
  11836. ControlClick Button1 ;next
  11837. WinWait, DiRT2 Demo - InstallShield Wizard, Welcome
  11838. sleep 500
  11839. ControlClick Button1 ;next
  11840. WinWait, DiRT2 Demo - InstallShield Wizard, License
  11841. sleep 500
  11842. ControlClick Button3 ;i accept
  11843. sleep 500
  11844. ControlClick Button1 ;next
  11845. WinWait, DiRT2 Demo - InstallShield Wizard, Setup
  11846. sleep 500
  11847. ControlClick Button4 ;next
  11848. WinWait, InstallShield Wizard, In order
  11849. sleep 500
  11850. ControlClick Button1 ;next
  11851. WinWait, DiRT2 Demo - InstallShield Wizard, Ready
  11852. sleep 500
  11853. ControlClick Button1 ;next
  11854. }
  11855. WinWait, DiRT2 Demo - InstallShield Wizard, Complete
  11856. if ( w_opt_unattended > 0 ) {
  11857. sleep 500
  11858. ControlClick Button4 ;finish
  11859. }
  11860. WinWaitClose, DiRT2 Demo - InstallShield Wizard, Complete
  11861. "
  11862. }
  11863. #----------------------------------------------------------------
  11864. w_metadata divinity2_demo games \
  11865. title="Divinity II Demo" \
  11866. publisher="DTP Entertainment" \
  11867. year="2010" \
  11868. media="manual_download" \
  11869. file1="Divinity2_DEMO_EN_US.zip" \
  11870. installed_file1="$W_PROGRAMS_X86_WIN/Divinity II - Ego Draconis - Demo/Bin/Divinity2_Demo.exe"
  11871. load_divinity2_demo()
  11872. {
  11873. w_download_manual "http://www.gamershell.com/download_54304.shtml" $file1 2a33670b705d4da89e1119d808cda64977bb6096
  11874. w_try unzip -d "$W_TMP" "$W_CACHE/$W_PACKAGE/$file1"
  11875. cd "$W_TMP"
  11876. w_ahk_do "
  11877. Run, Divinity2_DEMO_EN_US.exe
  11878. SetTitleMatchMode, 2
  11879. WinWait,Setup - Divinity II - Ego Draconis - Demo
  11880. if ( w_opt_unattended > 0 ) {
  11881. Sleep 500
  11882. ControlClick TNewButton1 ; Next
  11883. WinWait,Setup - Divinity II - Ego Draconis - Demo, read
  11884. Sleep 500
  11885. ControlClick TNewRadioButton1 ;agreement
  11886. Sleep 500
  11887. ControlClick TNewButton2 ; Next
  11888. WinWait,Setup - Divinity II - Ego Draconis - Demo, into
  11889. Sleep 500
  11890. ControlClick TNewButton3 ; Next
  11891. WinWait,Setup - Divinity II - Ego Draconis - Demo, place
  11892. Sleep 500
  11893. ControlClick TNewButton4 ; Next
  11894. WinWait,Setup - Divinity II - Ego Draconis - Demo, installation
  11895. Sleep 500
  11896. ControlClick TNewButton4 ; Install
  11897. Loop
  11898. {
  11899. IfWinExist, NVIDIA PhysX Setup, must
  11900. {
  11901. WinWait,NVIDIA PhysX Setup, must
  11902. Sleep 500
  11903. ControlClick Button3 ;accept
  11904. Sleep 500
  11905. ControlClick Button4 ; Next
  11906. WinWait,NVIDIA PhysX Setup, been
  11907. Sleep 500
  11908. ControlClick Button1 ; Finish
  11909. }
  11910. IfWinExist,Setup - Divinity II - Ego Draconis - Demo, launched
  11911. {
  11912. break
  11913. }
  11914. Sleep 2000
  11915. }
  11916. WinWait,Setup - Divinity II - Ego Draconis - Demo, launched
  11917. Sleep 500
  11918. ControlFocus, TNewCheckListBox1, Desktop
  11919. Sleep 500
  11920. Send {Space}
  11921. Sleep 500
  11922. ControlClick TNewButton4 ; Finish
  11923. }
  11924. WinWaitClose
  11925. "
  11926. if w_workaround_wine_bug 24417
  11927. then
  11928. w_call d3dx9_36
  11929. fi
  11930. if w_workaround_wine_bug 25329
  11931. then
  11932. w_call wmp9
  11933. fi
  11934. }
  11935. #----------------------------------------------------------------
  11936. w_metadata demolition_company_demo games \
  11937. title="Demolition Company demo" \
  11938. publisher="Giants Software" \
  11939. year="2010" \
  11940. media="manual_download" \
  11941. file1="DemolitionCompanyDemoENv2.exe" \
  11942. installed_exe1="$W_PROGRAMS_X86_WIN/Demolition Company Demo/DemolitionCompany.exe"
  11943. load_demolition_company_demo()
  11944. {
  11945. w_download_manual http://www.demolitioncompany-thegame.com/demo.php DemolitionCompanyDemoENv2.exe
  11946. cd "$W_CACHE/$W_PACKAGE"
  11947. w_ahk_do "
  11948. SetTitleMatchMode, 2
  11949. run, DemolitionCompanyDemoENv2.exe
  11950. winwait, Setup - Demolition, This will install
  11951. if ( w_opt_unattended > 0 ) {
  11952. sleep 1000
  11953. controlclick, TNewButton1, Setup - Demolition, This will install
  11954. winwait, Setup - Demolition, License Agreement
  11955. sleep 1000
  11956. controlclick, TNewRadioButton1, Setup - Demolition, License Agreement
  11957. sleep 1000
  11958. controlclick, TNewButton2, Setup - Demolition, License Agreement
  11959. winwait, Setup - Demolition, Setup Type
  11960. sleep 1000
  11961. controlclick, TNewButton2, Setup - Demolition, Setup Type
  11962. winwait, Setup - Demolition, Ready to Install
  11963. sleep 1000
  11964. controlclick, TNewButton2, Setup - Demolition, Ready to Install
  11965. winwait, Setup - Demolition, Completing
  11966. sleep 1000
  11967. controlclick, TNewButton2, Setup - Demolition, Completing
  11968. }
  11969. winwaitclose, Setup - Demolition
  11970. "
  11971. }
  11972. #----------------------------------------------------------------
  11973. w_metadata dragonage games \
  11974. title="Dragon Age: Origins" \
  11975. publisher="Bioware / EA" \
  11976. year="2009" \
  11977. media="dvd" \
  11978. file1="DragonAge.iso" \
  11979. installed_exe1="$W_PROGRAMS_X86_WIN/Dragon Age/bin_ship/daorigins.exe"
  11980. load_dragonage()
  11981. {
  11982. w_read_key
  11983. # game can do this, why do we need to?
  11984. w_call physx
  11985. w_mount DragonAge
  11986. w_ahk_do "
  11987. SetWinDelay 1000
  11988. Run, ${W_ISO_MOUNT_LETTER}:Setup.exe
  11989. SetTitleMatchMode, 2
  11990. winwait, Installer Language
  11991. if ( w_opt_unattended > 0 ) {
  11992. WinActivate
  11993. send {Enter}
  11994. winwait, Dragon Age: Origins Setup
  11995. ControlClick Next, Dragon Age: Origins Setup
  11996. winwait, Dragon Age: Origins Setup, End User License
  11997. ;ControlClick Button4, Dragon Age: Origins Setup ; agree
  11998. send {Tab}a ; agree
  11999. ;ControlClick I agree, Dragon Age: Origins Setup
  12000. send {Enter} ; continue
  12001. SetTitleMatchMode, 1
  12002. winwait, Dragon Age: Origins, Registration
  12003. send $W_KEY
  12004. send {Enter}
  12005. }
  12006. winwait, Dragon Age: Origins Setup, Install Type
  12007. if ( w_opt_unattended > 0 )
  12008. send {Enter}
  12009. winwaitclose
  12010. "
  12011. # Since the installer explodes on exit, just wait for the
  12012. # last file it's known to create
  12013. while ! test -f "$W_PROGRAMS_X86_UNIX/Dragon Age/bin_ship/DAOriginsLauncher-MCE.png"
  12014. do
  12015. w_info "Waiting for installer to finish..."
  12016. sleep 1
  12017. done
  12018. # FIXME: does this directory name change in win7?
  12019. ini="$W_DRIVE_C/users/$LOGNAME/My Documents/BioWare/Dragon Age/Settings/DragonAge.ini"
  12020. if ! test -f "$ini"
  12021. then
  12022. w_warn "$ini not found?"
  12023. else
  12024. cp -f "$ini" "$ini.old"
  12025. fi
  12026. if w_workaround_wine_bug 22383 "use strictdrawordering to avoid video problems"
  12027. then
  12028. w_call strictdrawordering=enabled
  12029. fi
  12030. if w_workaround_wine_bug 22557 "Setting UseVSync=0 to avoid black menu"
  12031. then
  12032. sed 's,UseVSync=1,UseVSync=0,' < "$ini" > "$ini.new"
  12033. mv -f "$ini.new" "$ini"
  12034. fi
  12035. }
  12036. #----------------------------------------------------------------
  12037. w_metadata dragonage_ue games \
  12038. title="Dragon Age: Origins - Ultimate Edition" \
  12039. publisher="Bioware / EA" \
  12040. year="2010" \
  12041. media="dvd" \
  12042. file1="DRAGONAGE-1.iso" \
  12043. file2="DRAGONAGE-2.iso"
  12044. load_dragonage_ue()
  12045. {
  12046. w_read_key
  12047. w_mount DRAGONAGE Setup.exe 1
  12048. # Annoyingly, it runs a webbrowser so you can activate the extra stuff. Disable that, and w_warn the user after install:
  12049. WINEDLLOVERRIDES="winebrowser.exe="
  12050. export WINEDLLOVERRIDES
  12051. w_ahk_do "
  12052. SetTitleMatchMode, 2
  12053. SetTitleMatchMode, slow
  12054. SetWinDelay 1000
  12055. Run, ${W_ISO_MOUNT_LETTER}:Setup.exe
  12056. winwait, Installer, English
  12057. if ( w_opt_unattended > 0 ) {
  12058. ControlClick Button1, Installer, English
  12059. winwait, Dragon Age: Origins Setup
  12060. ControlClick Button2, Dragon Age: Origins Setup
  12061. winwait, Dragon Age: Origins Setup, License Agreement
  12062. ControlClick Button4, Dragon Age: Origins Setup
  12063. ControlClick Button2, Dragon Age: Origins Setup
  12064. winwait, Dragon Age: Origins, Registration
  12065. controlclick, Edit1
  12066. sleep 1000
  12067. send $W_KEY
  12068. send {Enter}
  12069. winwait, Dragon Age: Origins Setup, Install Type
  12070. controlclick, Button2, Dragon Age: Origins Setup, Install Type
  12071. winwait, Dragon Age: Origins Setup, expanded content
  12072. controlclick, Button1
  12073. }
  12074. winwait, Insert Disc...
  12075. "
  12076. w_mount DRAGONAGE data/ultimate_en.rar 2
  12077. w_ahk_do "
  12078. sleep 5000
  12079. SetTitleMatchMode, 2
  12080. if ( w_opt_unattended > 0 ) {
  12081. controlclick, Button2, Insert Disc...
  12082. winwait, Dragon Age, Setup was completed successfully
  12083. controlclick, Button2, Dragon Age, Setup was completed successfully
  12084. }
  12085. winwait, Dragon Age, Click Finish to close
  12086. if ( w_opt_unattended > 0 ) {
  12087. controlclick, Button5, Dragon Age, Click Finish to close
  12088. controlclick, Button2, Dragon Age, Click Finish to close
  12089. }
  12090. winwaitclose
  12091. "
  12092. if w_workaround_wine_bug 22383
  12093. then
  12094. w_try_winetricks strictdrawordering=enabled
  12095. fi
  12096. if w_workaround_wine_bug 23730
  12097. then
  12098. w_warn "Run with WINEDEBUG=-all to reduce flickering."
  12099. fi
  12100. if w_workaround_wine_bug 23081
  12101. then
  12102. w_warn "If you still see flickering, try applying the patch from http://bugs.winehq.org/show_bug.cgi?id=23081"
  12103. fi
  12104. w_warn "To activate the additional content, visit http://social.bioware.com/redeem_code.php?path=/dragonage/pc/dlcactivate/en"
  12105. }
  12106. #----------------------------------------------------------------
  12107. w_metadata dragonage2_demo games \
  12108. title="Dragon Age II demo" \
  12109. publisher="EA/Bioware" \
  12110. year="2011" \
  12111. media="download" \
  12112. file1="DragonAge2Demo_F93M2qCj_EnEsItPlRu.exe" \
  12113. installed_exe1="$W_PROGRAMS_X86_WIN/Dragon Age 2 Demo/bin_ship/DragonAge2Demo.exe"
  12114. load_dragonage2_demo()
  12115. {
  12116. w_download http://lvlt.bioware.cdn.ea.com/bioware/u/f/eagames/bioware/dragonage2/demo/DragonAge2Demo_F93M2qCj_EnEsItPlRu.exe a94715cd7943533a3cf1d84d40e667b04e1abc2e
  12117. cd "$W_CACHE/$W_PACKAGE"
  12118. w_ahk_do "
  12119. SetWinDelay 500
  12120. SetTitleMatchMode, 2
  12121. run, DragonAge2Demo_F93M2qCj_EnEsItPlRu.exe
  12122. winwait, Installer Language
  12123. if ( w_opt_unattended > 0 ) {
  12124. send {Enter}
  12125. winwait, Dragon Age II Demo Setup
  12126. send {Enter}
  12127. winwait, Dragon Age II Demo Setup, License
  12128. send !a
  12129. send {Enter}
  12130. winwait, Dragon Age II Demo Setup, Select
  12131. send {Enter}
  12132. }
  12133. winwait, Dragon Age II Demo Setup, Complete, completed
  12134. if ( w_opt_unattended > 0 ) {
  12135. send {Enter}
  12136. winwait, Dragon Age II Demo Setup, Completing
  12137. send {Enter}
  12138. }
  12139. winwaitclose
  12140. "
  12141. }
  12142. #----------------------------------------------------------------
  12143. w_metadata eve games \
  12144. title="EVE Online Tyrannis" \
  12145. publisher="CCP Games" \
  12146. year="2011" \
  12147. media="download" \
  12148. file1="EVE_Online_Installer_561078.exe" \
  12149. installed_exe1="$W_PROGRAMS_X86_WIN/CCP/EVE/eve.exe"
  12150. load_eve()
  12151. {
  12152. # http://www.eveonline.com/download/?fallback=1&
  12153. w_download http://content.eveonline.com/561078/EVE_Online_Installer_561078.exe 5b5f0cd4fbd42f82b1d1cccb2e22ddeed97d1d3a
  12154. cd "$W_CACHE/$W_PACKAGE"
  12155. w_ahk_do "
  12156. run, $file1
  12157. WinWait, EVE Online
  12158. if ( w_opt_unattended > 0 ) {
  12159. WinActivate
  12160. send {Enter} ; Next
  12161. WinWait, EVE,License Agreement
  12162. WinActivate
  12163. send {Enter} ; Next
  12164. WinWait, EVE,Choose Install
  12165. WinActivate
  12166. send {Enter} ; Install
  12167. WinWait, EVE,has been installed
  12168. WinActivate
  12169. ;Send {Tab}{Tab}{Tab} ; select Launch
  12170. ;Send {Space} ; untick Launch
  12171. ControlClick Button4 ; untick Launch
  12172. Send {Enter} ; Finish (Button2)
  12173. }
  12174. WinWaitClose, EVE Online
  12175. "
  12176. }
  12177. #----------------------------------------------------------------
  12178. w_metadata fable_tlc games \
  12179. title="Fable: The Lost Chapters" \
  12180. publisher="Microsoft" \
  12181. year="2005" \
  12182. media="cd" \
  12183. file1="FABLE_DISC_1.iso" \
  12184. file2="FABLE DISC 2.iso" \
  12185. file3="FABLE DISC 3.iso" \
  12186. file4="FABLE DISC 4.iso" \
  12187. installed_exe1="$W_PROGRAMS_X86_WIN/Microsoft Games/Fable - The Lost Chapters/Fable.exe"
  12188. load_fable_tlc()
  12189. {
  12190. w_read_key
  12191. if w_workaround_wine_bug 657
  12192. then
  12193. w_call mfc42
  12194. fi
  12195. w_mount FABLE_DISK_1
  12196. w_ahk_do "
  12197. SetTitleMatchMode, 2
  12198. run, ${W_ISO_MOUNT_LETTER}:setup.exe
  12199. WinWait,Fable,Welcome
  12200. if ( w_opt_unattended > 0 ) {
  12201. Sleep 500
  12202. ControlClick Button1 ; Next
  12203. WinWait,Fable,Please
  12204. Sleep 500
  12205. ControlClick Button4 ; Next
  12206. WinWait,Fable,Product Key
  12207. Sleep 500
  12208. Send $W_KEY
  12209. Send {Enter}
  12210. }
  12211. WinWait,Fable,Disk 2
  12212. "
  12213. w_mount "FABLE DISK 2"
  12214. w_ahk_do "
  12215. SetTitleMatchMode, 2
  12216. WinWait,Fable,Disk 2
  12217. if ( w_opt_unattended > 0 ) {
  12218. Sleep 500
  12219. ControlClick Button2 ; Retry
  12220. }
  12221. WinWait,Fable,Disk 3
  12222. "
  12223. w_mount "FABLE DISK 3"
  12224. w_ahk_do "
  12225. SetTitleMatchMode, 2
  12226. WinWait,Fable,Disk 3
  12227. if ( w_opt_unattended > 0 ) {
  12228. Sleep 500
  12229. ControlClick Button2 ; Retry
  12230. }
  12231. WinWait,Fable,Disk 4
  12232. "
  12233. w_mount "FABLE DISK 4"
  12234. w_ahk_do "
  12235. SetTitleMatchMode, 2
  12236. WinWait,Fable,Disk 4
  12237. if ( w_opt_unattended > 0 ) {
  12238. Sleep 500
  12239. ControlClick Button2 ; Retry
  12240. }
  12241. WinWait,Fable,Disk 1
  12242. WinKill
  12243. "
  12244. # Now tell game what the real disc is so user can insert disc 1 and run the game!
  12245. # FIXME: don't guess it's D:
  12246. cat > "$W_TMP"/$W_PACKAGE.reg <<_EOF_
  12247. REGEDIT4
  12248. [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\D3BE9C3CAF4226447B48E06CAACF2DDD\InstallProperties]
  12249. "InstallSource"="D:\\"
  12250. _EOF_
  12251. try_regedit "$W_TMP_WIN"\\$W_PACKAGE.reg
  12252. # Also accept EULA
  12253. cat > "$W_TMP"/$W_PACKAGE.reg <<_EOF_
  12254. REGEDIT4
  12255. [HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\Fable TLC]
  12256. "FIRSTRUN"=dword:00000001
  12257. _EOF_
  12258. try_regedit "$W_TMP_WIN"\\$W_PACKAGE.reg
  12259. if w_workaround_wine_bug 24912
  12260. then
  12261. # kill off lingering installer
  12262. w_ahk_do "
  12263. SetTitleMatchMode, 2
  12264. WinKill,Fable
  12265. "
  12266. w_killall IDriverT.exe
  12267. w_killall IDriver.exe
  12268. fi
  12269. if w_workaround_wine_bug 25352
  12270. then
  12271. w_call devenum
  12272. w_call quartz
  12273. w_call wmp9
  12274. fi
  12275. if w_workaround_wine_bug 20074
  12276. then
  12277. w_call d3dx9_36
  12278. fi
  12279. }
  12280. #----------------------------------------------------------------
  12281. w_metadata farmsim2011_demo games \
  12282. title="Farming Simulator 2011 Demo" \
  12283. publisher="Astragon" \
  12284. year="2011" \
  12285. media="manual_download" \
  12286. file1="FarmingSimulator2011DemoEN.exe" \
  12287. installed_exe1="$W_PROGRAMS_X86_WIN/Farming Simulator 2011 Demo/game.exe"
  12288. load_farmsim2011_demo()
  12289. {
  12290. # From http://www.landwirtschafts-simulator.de/demo.php
  12291. w_download_manual http://www.landwirtschafts-simulator.de/demo.php FarmingSimulator2011DemoEN.exe c1221110e55625a3e797a3060c4bf5e3219bf2f0
  12292. cd "$W_CACHE/$W_PACKAGE"
  12293. w_ahk_do "
  12294. SetWinDelay 500
  12295. SetTitleMatchMode, 2
  12296. run, FarmingSimulator2011DemoEN.exe
  12297. if ( w_opt_unattended > 0 ) {
  12298. WinWait, Setup - Farming Simulator 2011 Demo
  12299. ControlClick TNewButton1 ; Next
  12300. WinWait, Setup - Farming Simulator 2011 Demo, License Agreement
  12301. ControlClick TNewRadioButton1 ; Accept
  12302. ControlClick TNewButton2 ; Next
  12303. WinWait, Setup - Farming Simulator 2011 Demo, Setup Type
  12304. ControlClick TNewButton2 ; Next
  12305. WinWait, Setup - Farming Simulator 2011 Demo, Ready to Install
  12306. ControlClick TNewButton2 ; Install
  12307. }
  12308. WinWait, Setup - Farming Simulator 2011 Demo, finished
  12309. if ( w_opt_unattended > 0 )
  12310. ControlClick TNewButton2 ; Finish
  12311. WinWaitClose
  12312. "
  12313. }
  12314. #----------------------------------------------------------------
  12315. w_metadata fifa11_demo games \
  12316. title="FIFA 11 Demo" \
  12317. publisher="EA Sports" \
  12318. year="2010" \
  12319. media="download" \
  12320. file1="fifa11_pc_demo_NA.zip" \
  12321. installed_exe1="$W_PROGRAMS_X86_WIN/EA Sports/FIFA 11 Demo/Game/fifa.exe"
  12322. load_fifa11_demo()
  12323. {
  12324. # From http://www.ea.com/uk/football/news/fifa11-download-2
  12325. w_download "http://static.cdn.ea.com/fifa/u/f/fifa11_pc_demo_NA.zip" c3a66284bffb985f31b11e477dade50c0d4cac52
  12326. w_try unzip -d "$W_TMP" "$W_CACHE/$W_PACKAGE/fifa11_pc_demo_NA.zip"
  12327. cd "$W_TMP"
  12328. w_ahk_do "
  12329. SetTitleMatchMode, 2
  12330. run, EASetup.exe
  12331. winwait, Microsoft Visual C++ 2008, wizard
  12332. if ( w_opt_unattended > 0 ) {
  12333. sleep 1000
  12334. controlclick, Button12, Microsoft Visual C++ 2008, wizard
  12335. winwait, Microsoft Visual C++ 2008, License Terms
  12336. sleep 1000
  12337. controlclick, Button11, Microsoft Visual C++ 2008, License Terms
  12338. sleep 1000
  12339. controlclick, Button8, Microsoft Visual C++ 2008, License Terms
  12340. winwait, Setup, is configuring
  12341. winwaitclose
  12342. winwait, Microsoft Visual C++ 2008, Setup Complete
  12343. sleep 1000
  12344. controlclick, Button2
  12345. ; There are two license agreements...one is for Directx
  12346. winwait, FIFA 11, I &accept the terms in the End User License Agreement
  12347. sleep 1000
  12348. controlclick, Button1
  12349. sleep 1000
  12350. controlclick, Button3
  12351. winwaitclose
  12352. winwait, FIFA 11, I &accept the terms in the End User License Agreement
  12353. sleep 1000
  12354. controlclick, Button1, FIFA 11, I &accept the terms in the End User License Agreement
  12355. sleep 1000
  12356. controlclick, Button3, FIFA 11, I &accept the terms in the End User License Agreement
  12357. winwait, FIFA 11, Ready to install FIFA 11
  12358. sleep 1000
  12359. controlclick, Button1, FIFA 11, Ready to install FIFA 11
  12360. }
  12361. winwait, FIFA 11, Click the Finish button to exit the Setup Wizard.
  12362. if ( w_opt_unattended > 0 ) {
  12363. sleep 1000
  12364. controlclick, Button5, FIFA 11, Click the Finish button to exit the Setup Wizard.
  12365. sleep 1000
  12366. controlclick, Button1, FIFA 11, Click the Finish button to exit the Setup Wizard.
  12367. }
  12368. WinWaitClose
  12369. "
  12370. }
  12371. #----------------------------------------------------------------
  12372. w_metadata hon games \
  12373. title="Heroes of Newerth" \
  12374. publisher="S2 Games" \
  12375. year="2013" \
  12376. media="download" \
  12377. file1="HoNClient-3.1.2.exe" \
  12378. installed_exe1="$W_PROGRAMS_X86_WIN/Heroes of Newerth/hon.exe"
  12379. load_hon()
  12380. {
  12381. w_download http://dl.heroesofnewerth.com/HoNClient-3.1.2.exe 49123d092f1fa75b8dddc20c817ab8addd5aee5f
  12382. cd "$W_CACHE/$W_PACKAGE"
  12383. w_ahk_do "
  12384. SetTitleMatchMode, 2
  12385. run, $file1
  12386. winwait, Installer Language
  12387. if ( w_opt_unattended > 0 ) {
  12388. send {Enter}
  12389. winwait, Heroes of Newerth
  12390. controlclick, Button2, Heroes of Newerth
  12391. winwait, Heroes of Newerth, License
  12392. controlclick, Button2, Heroes of Newerth, License
  12393. winwait, Heroes of Newerth, Components
  12394. controlclick, Button2, Heroes of Newerth, Components
  12395. winwait, Heroes of Newerth, Install Location
  12396. controlclick, Button2, Heroes of Newerth, Install Location
  12397. winwait, Heroes of Newerth, Start Menu
  12398. controlclick, Button2, Heroes of Newerth, Start Menu
  12399. winwait, Heroes of Newerth, Finish
  12400. controlclick, Button2, Heroes of Newerth, Finish
  12401. }
  12402. winwaitclose, Heroes of Newerth, Finish
  12403. "
  12404. }
  12405. #----------------------------------------------------------------
  12406. w_metadata hordesoforcs2_demo games \
  12407. title="Hordes of Orcs 2 Demo" \
  12408. publisher="Freeverse" \
  12409. year="2010" \
  12410. media="manual_download" \
  12411. file1="HoO2Demo.exe" \
  12412. installed_exe1="$W_PROGRAMS_X86_WIN/Hordes of Orcs 2 Demo/HoO2.exe"
  12413. load_hordesoforcs2_demo()
  12414. {
  12415. w_download_manual http://www.fileplanet.com/216619/download/Hordes-of-Orcs-2-Demo HoO2Demo.exe 1ba26d35697e359f89a30915140e471fadc675da
  12416. cd "$W_CACHE/$W_PACKAGE"
  12417. w_ahk_do "
  12418. SetTitleMatchMode, 2
  12419. SetWinDelay 500
  12420. SetTitleMatchMode, slow
  12421. run HoO2Demo.exe
  12422. WinWait,Orcs
  12423. if ( w_opt_unattended > 0 ) {
  12424. WinActivate
  12425. ControlFocus, Button1, Hordes ; Next
  12426. sleep 500
  12427. Send n ; next
  12428. WinWait,Orcs,conditions
  12429. ControlFocus, Button4, Hordes, agree
  12430. Send {Space}
  12431. Send {Enter} ; next
  12432. WinWait,Orcs,files
  12433. Send {Enter} ; next
  12434. WinWait,Orcs,exist ; Destination does not exist, create?
  12435. Send {Enter} ; yes
  12436. WinWait,Orcs,Start
  12437. Send {Enter} ; Start
  12438. }
  12439. WinWait,Orcs,successfully
  12440. if ( w_opt_unattended > 0 ) {
  12441. Send {Space} ; Finish
  12442. }
  12443. winwaitclose Orcs
  12444. "
  12445. }
  12446. #----------------------------------------------------------------
  12447. w_metadata mfsxde games \
  12448. title="Microsoft Flight Simulator X: Deluxe Edition" \
  12449. publisher="Microsoft" \
  12450. year="2006" \
  12451. media="dvd" \
  12452. file1="FSX DISK 1.iso" \
  12453. file2="FSX DISK 2.iso" \
  12454. installed_exe1="$W_PROGRAMS_X86_WIN/Microsoft Games/Microsoft Flight Simulator X/fsx.exe"
  12455. load_mfsxde()
  12456. {
  12457. if w_workaround_wine_bug 25139 "Setting virtual desktop so license screen shows up on first run"
  12458. then
  12459. w_call vd=1024x768
  12460. fi
  12461. w_mount "FSX DISK 1"
  12462. if w_workaround_wine_bug 25558 "Copying disc to hard drive. This will take a few minutes."
  12463. then
  12464. cd "$W_CACHE/$W_PACKAGE"
  12465. # Copy takes a LONG time, so offer a way to avoid copy while debugging verb
  12466. if test ! -f bothdiscs/setup.exe
  12467. then
  12468. mkdir bothdiscs
  12469. cd bothdiscs
  12470. w_try cp -R "$W_ISO_MOUNT_ROOT"/* .
  12471. # A few files are on both DVDs. Remove them manually so cp doesn't complain.
  12472. rm -f DVDCheck.exe autorun.inf fsx.ico vcredist_x86.exe
  12473. # Make the directories writable, else 2nd disc copy will fail.
  12474. w_try chmod -R +w .
  12475. w_mount "FSX DISK 2"
  12476. # On Linux, use symlinks for disc 2. (On Cygwin, we'd have to copy.)
  12477. w_try ln -s "$W_ISO_MOUNT_ROOT"/* .
  12478. # Make the files writable, otherwise you'll get errors when trying to remove bothdiscs.
  12479. chmod -R +w .
  12480. # If you leave it mounted, it doesn't ask for the second disk to be inserted.
  12481. # If you mount it without extracting though, the install fails.
  12482. # Apparently it uses the files from the cache, but does a disk check.
  12483. else
  12484. cd bothdiscs
  12485. fi
  12486. else
  12487. w_die "non-broken case not yet supported for this game"
  12488. fi
  12489. w_ahk_do "
  12490. SetWinDelay 1000
  12491. SetTitleMatchMode, 2
  12492. run setup.exe,,,mfs_pid
  12493. winwait, Microsoft Flight Simulator X, To continue, click Install
  12494. ControlClick, Button1, Microsoft Flight Simulator X, To continue
  12495. ; Accept license:
  12496. winwait, Flight Simulator X - End User License Agreement
  12497. controlclick, Button1, Flight Simulator X - End User License Agreement
  12498. winwait, Microsoft Flight Simulator X Product Activation Wizard
  12499. ; Activate later, currently broken on Wine, see http://bugs.winehq.org/show_bug.cgi?id=25579
  12500. controlclick, Button2, Microsoft Flight Simulator X Product Activation Wizard
  12501. sleep 1000
  12502. controlclick, Button5, Microsoft Flight Simulator X Product Activation Wizard
  12503. ; Close main window:
  12504. winwait, Microsoft Flight Simulator, LEARNING CENTER
  12505. ; A winclose/winkill isn't forceful enough:
  12506. process, close, fsx.exe
  12507. ; Setup doesn't close on its own, because this process doesn't exit cleanly
  12508. process, close, IDriver.exe
  12509. "
  12510. }
  12511. #----------------------------------------------------------------
  12512. w_metadata mfsx_demo games \
  12513. title="Microsoft Flight Simulator X Demo" \
  12514. publisher="Microsoft" \
  12515. year="2006" \
  12516. media="download" \
  12517. file1="FSXDemo.exe" \
  12518. installed_exe1="$W_PROGRAMS_X86_WIN/Microsoft Games/Microsoft Flight Simulator X Demo/fsx.exe" \
  12519. wine_showstoppers="26411"
  12520. load_mfsx_demo()
  12521. {
  12522. w_workaround_wine_bug 26411 "Game hangs on first screen for me"
  12523. if w_workaround_wine_bug 25139 "Setting virtual desktop so license screen shows up on first run"
  12524. then
  12525. w_call vd=1024x768
  12526. fi
  12527. w_download http://download.microsoft.com/download/4/7/7/477dcc35-0b98-42c5-b06f-7ded38a40491/FSXDemo.exe cbb13d2a7918f409f224eab7d3a2014330fc87bc
  12528. cd "$W_TMP"
  12529. unzip "$W_CACHE/$W_PACKAGE"/FSXDemo.exe
  12530. w_ahk_do "
  12531. SetWinDelay 1000
  12532. SetTitleMatchMode, 2
  12533. run setup.exe,,,mfs_pid
  12534. winwait, Microsoft Flight Simulator X, To continue, click Install
  12535. ControlClick, Button1, Microsoft Flight Simulator X, To continue
  12536. ; Accept license:
  12537. winwait, Flight Simulator X - End User License Agreement
  12538. controlclick, Button1, Flight Simulator X - End User License Agreement
  12539. winwait, Microsoft Flight Simulator X Product Activation Wizard
  12540. ; Activate later, currently broken on Wine, see http://bugs.winehq.org/show_bug.cgi?id=25579
  12541. controlclick, Button2, Microsoft Flight Simulator X Product Activation Wizard
  12542. sleep 1000
  12543. controlclick, Button5, Microsoft Flight Simulator X Product Activation Wizard
  12544. ; Close main window:
  12545. winwait, Microsoft Flight Simulator, LEARNING CENTER
  12546. ; A winclose/winkill isn't forceful enough:
  12547. process, close, fsx.exe
  12548. ; Setup doesn't close on its own, because this process doesn't exit cleanly
  12549. process, close, IDriver.exe
  12550. "
  12551. }
  12552. #----------------------------------------------------------------
  12553. w_metadata gothic4_demo games \
  12554. title="Gothic 4 demo (drm broken on wine)" \
  12555. publisher="Jowood" \
  12556. year="2010" \
  12557. media="manual_download" \
  12558. file1="ArcaniA_Gothic4_Demo_Setup.zip" \
  12559. installed_exe1="$W_PROGRAMS_X86_WIN/JoWooD Entertainment AG/ArcaniA - Gothic 4 Demo/Arcania.exe"
  12560. # http://appdb.winehq.org/objectManager.php?sClass=version&iId=21507
  12561. load_gothic4_demo()
  12562. {
  12563. w_download_manual http://www.gamershell.com/download_63874.shtml ArcaniA_Gothic4_Demo_Setup.zip d36024c0235878c4589234a56cc8b6e05da5c593
  12564. cd "$W_TMP"
  12565. w_try unzip "$W_CACHE/$W_PACKAGE"/ArcaniA_Gothic4_Demo_Setup.zip
  12566. w_ahk_do "
  12567. Settitlematchmode, 2
  12568. run, ArcaniA_Gothic4_Demo_Setup.exe
  12569. if ( w_opt_unattended > 0 ) {
  12570. winwait, Select Setup Language
  12571. sleep 1000
  12572. controlclick, TNewButton1, Select Setup Language
  12573. winwait, Setup - ArcaniA, Welcome to the
  12574. sleep 1000
  12575. controlclick, TNewButton1, Setup - ArcaniA, Welcome to the
  12576. winwait, Setup - ArcaniA, License Agreement
  12577. sleep 1000
  12578. controlclick, TNewRadioButton1, Setup - ArcaniA, License Agreement
  12579. sleep 1000
  12580. controlclick, TNewButton2, Setup - ArcaniA, License Agreement
  12581. winwait, Setup - ArcaniA, Select Destination Location
  12582. sleep 1000
  12583. controlclick, TNewButton3, Setup - ArcaniA, Select Destination Location
  12584. winwait, Setup - ArcaniA, Select Components
  12585. sleep 1000
  12586. controlclick, TNewButton3, Setup - ArcaniA, Select Components
  12587. winwait, Setup - ArcaniA, Select Start Menu
  12588. sleep 1000
  12589. controlclick, TNewButton4, Setup - ArcaniA, Select Start Menu
  12590. winwait, Setup - ArcaniA, Select Additional
  12591. sleep 1000
  12592. controlclick, TNewButton4, Setup - ArcaniA, Select Additional
  12593. winwait, Setup - ArcaniA, Ready to Install
  12594. sleep 1000
  12595. controlclick, TNewButton4, Setup - ArcaniA, Ready to Install
  12596. winwait, Setup - ArcaniA, Information
  12597. sleep 1000
  12598. controlclick, TNewButton4, Setup - ArcaniA, Information
  12599. }
  12600. winwait, Setup - ArcaniA, Completing
  12601. if ( w_opt_unattended > 0 ) {
  12602. sleep 1000
  12603. ; The two checkboxes share the same button id. App/Wine bug?
  12604. mousemove, 190, 155
  12605. click
  12606. sleep 1000
  12607. mousemove, 190, 180
  12608. click
  12609. sleep 1000
  12610. controlclick, TNewButton4, Setup - ArcaniA, Completing
  12611. }
  12612. winwaitclose
  12613. "
  12614. }
  12615. #----------------------------------------------------------------
  12616. w_metadata gta_vc games \
  12617. title="Grand Theft Auto: Vice City" \
  12618. publisher="Rockstar" \
  12619. year="2003" \
  12620. media="cd" \
  12621. file1="GTA_VICE_CITY.iso" \
  12622. file2="VICE_CITY_PLAY.iso" \
  12623. installed_exe1="$W_PROGRAMS_X86_WIN/Rockstar Games/Grand Theft Auto Vice City/gta-vc.exe"
  12624. load_gta_vc()
  12625. {
  12626. w_mount GTA_VICE_CITY
  12627. w_ahk_do "
  12628. SetWinDelay 1000
  12629. SetTitleMatchMode, 2
  12630. Run, ${W_ISO_MOUNT_LETTER}:Setup.exe
  12631. winwait, Choose Setup Language
  12632. if ( w_opt_unattended > 0 ) {
  12633. Send {enter}
  12634. winwait, Grand Theft Auto Vice City, Welcome to the InstallShield Wizard
  12635. Send {enter}
  12636. winwait, Grand Theft Auto Vice City, License Agreement
  12637. Send !a
  12638. send {enter}
  12639. winwait, Grand Theft Auto Vice City, Customer Information
  12640. controlclick, edit1
  12641. send $LOGNAME
  12642. send {tab}
  12643. send company ; installer won't proceed without something here
  12644. send {enter}
  12645. winwait, Grand Theft Auto Vice City, Choose Destination Location
  12646. controlclick, Button1
  12647. winwait, Grand Theft Auto Vice City, Select Components
  12648. controlclick, Button2
  12649. winwait, Grand Theft Auto Vice City, Ready to Install the Program
  12650. send {enter}
  12651. }
  12652. winwait, Setup Needs The Next Disk, Please insert disk 2
  12653. "
  12654. w_mount VICE_CITY_PLAY
  12655. w_ahk_do "
  12656. SetWinDelay 1000
  12657. SetTitleMatchMode, 2
  12658. winwait, Setup Needs The Next Disk, Please insert disk 2
  12659. if ( w_opt_unattended > 0 ) {
  12660. controlclick, Button2
  12661. }
  12662. winwait, Grand Theft Auto Vice City, InstallShield Wizard Complete
  12663. if ( w_opt_unattended > 0 ) {
  12664. send {enter}
  12665. }
  12666. winwaitclose
  12667. "
  12668. if w_workaround_wine_bug 26322 "Setting virtual desktop"
  12669. then
  12670. w_call vd=800x600
  12671. fi
  12672. myexec="Exec=env WINEPREFIX=\"$WINEPREFIX\" wine cmd /c 'C:\\\\\\\\Run-gta_vc.bat'"
  12673. mymenu="$XDG_DATA_HOME/applications/wine/Programs/Rockstar Games/Grand Theft Auto Vice City/Play GTA Vice City.desktop"
  12674. if test -f "$mymenu" && w_workaround_wine_bug 26304 "Fixing system menu"
  12675. then
  12676. # this is a hack, hopefully the wine bug will be fixed soon
  12677. sed -i "s,Exec=.*,$myexec," "$mymenu"
  12678. fi
  12679. }
  12680. #----------------------------------------------------------------
  12681. w_metadata guildwars games \
  12682. title="Guild Wars" \
  12683. publisher="NCsoft" \
  12684. year="2005" \
  12685. media="download" \
  12686. file1="GwSetup.exe" \
  12687. installed_exe1="$W_PROGRAMS_X86_WIN/Guild Wars/Gw.exe" \
  12688. homepage="http://www.guildwars.com"
  12689. load_guildwars()
  12690. {
  12691. w_download "http://guildwars.com/download/" a7c4c8cb3b8cbee20707dcf8176d3da6a1686c05 GwSetup.exe
  12692. cd "$W_CACHE/$W_PACKAGE"
  12693. w_ahk_do "
  12694. Run, GwSetup.exe
  12695. WinWait, ahk_class ArenaNet_Dialog_Class
  12696. if ( w_opt_unattended > 0 ) {
  12697. ; Wait for network connection to finish. This might need to be longer. Can we detect this better?
  12698. Sleep 6000
  12699. ; For some reason, the OK doesn't take for me unless I activate the window first
  12700. WinActivate
  12701. Send {Enter}
  12702. ; Installation takes a long time... and then starts the game, which we don't want.
  12703. }
  12704. WinWait, ahk_class ArenaNet_Dx_Window_Class
  12705. Sleep 4000
  12706. WinClose, ahk_class ArenaNet_Dx_Window_Class
  12707. "
  12708. }
  12709. #----------------------------------------------------------------
  12710. w_metadata hegemonygold_demo games \
  12711. title="Hegemony Gold" \
  12712. publisher="Longbow Games" \
  12713. year="2011" \
  12714. media="download" \
  12715. file1="HegemonyGoldInstaller.exe" \
  12716. installed_exe1="$W_PROGRAMS_X86_WIN/Longbow Digital Arts/Hegemony Gold/Hegemony Gold.exe" \
  12717. homepage="http://www.longbowgames.com/forums/topic/?id=2146" \
  12718. rating="bronze"
  12719. load_hegemonygold_demo()
  12720. {
  12721. # 6 Mar 2011: 8c4d8aa8f997b106c78b065a4b200e5e1ab846a8
  12722. # 28 Apr 2011: 93677013fc17f014b1640bed070e8bb1b2a17445
  12723. # 25 Jun 2011: 4069656ea3c3760b67d1c5adff37de7472955f72
  12724. # 5 Nov 2011: 723c575ff5fff77941a1c786e28f46c094b8159c
  12725. # 8 Mar 2012: 36634314f571e345d082bdefe1150c76ef5610a7
  12726. w_download "http://www.longbowgames.com/downloads/Hegemony%20Gold%20Installer.exe" 36634314f571e345d082bdefe1150c76ef5610a7 HegemonyGoldInstaller.exe
  12727. cd "$W_CACHE/$W_PACKAGE"
  12728. w_ahk_do "
  12729. SetWinDelay 500
  12730. SetTitleMatchMode, 2
  12731. Run, HegemonyGoldInstaller.exe
  12732. WinWait,Hegemony
  12733. if ( w_opt_unattended > 0 ) {
  12734. ControlClick Button2 ; Next
  12735. WinWait,Hegemony, License
  12736. ControlClick Button2 ; Agree
  12737. WinWait,Hegemony, Components
  12738. Click, Left, 187, 185
  12739. Sleep 500
  12740. ControlClick Button2 ; Next
  12741. WinWait,Hegemony, Location
  12742. ControlClick Button2 ; Next
  12743. WinWait,Hegemony, shortcuts
  12744. ControlClick Button2 ; Install
  12745. WinWait,Hegemony, Completing
  12746. ControlFocus,Button4,launch
  12747. Sleep 1000
  12748. Send {Space}
  12749. Sleep 500
  12750. ControlClick Button2 ; finish
  12751. }
  12752. WinWaitClose,Hegemony
  12753. "
  12754. }
  12755. #----------------------------------------------------------------
  12756. w_metadata hegemony_demo games \
  12757. title="Hegemony: Philip of Macedon Demo" \
  12758. publisher="Longbow Games" \
  12759. year="2010" \
  12760. media="download" \
  12761. file1="Hegemony_Philip_of_Macedon_Installer.exe" \
  12762. installed_exe1="$W_PROGRAMS_X86_WIN/Longbow Digital Arts/Hegemony Philip of Macedon/Hegemony Philip of Macedon.exe"
  12763. load_hegemony_demo()
  12764. {
  12765. # Oct 2010: d3d2aa020d38b594d112360ae40871662d35dea4
  12766. # Nov 2010: 80cad805ad4bed0d3c493f2d9a40d06512c429a9 http://www.longbowgames.com/forums/topic/?id=2223&start=0#post22184
  12767. # Feb 16 2011: 38e92e3e4d0f0d10393790bc37350a2094f60c37
  12768. w_download "http://www.longbowgames.com/downloads/Hegemony%20Philip%20of%20Macedon%20Installer.exe" 38e92e3e4d0f0d10393790bc37350a2094f60c37 Hegemony_Philip_of_Macedon_Installer.exe
  12769. cd "$W_CACHE/$W_PACKAGE"
  12770. w_ahk_do "
  12771. SetTitleMatchMode, 2
  12772. run, Hegemony_Philip_of_Macedon_Installer.exe
  12773. winwait, Hegemony, installation
  12774. if ( w_opt_unattended > 0 ) {
  12775. controlclick, Button2
  12776. Sleep 500
  12777. winwait, Hegemony, License
  12778. controlclick, Button2
  12779. winwait, Hegemony, Components
  12780. controlclick, Button2
  12781. winwait, Hegemony, Install Location
  12782. controlclick, Button2
  12783. winwait, Hegemony, shortcuts
  12784. controlclick, Button2
  12785. Loop
  12786. {
  12787. ; Work around wine bug 24484
  12788. IfWinExist, Log message, IKnownFolderManager
  12789. {
  12790. send {Enter}
  12791. }
  12792. ; Work around wine bug 21261
  12793. IfWinExist, Log message, Games Explorer
  12794. {
  12795. send {Enter}
  12796. }
  12797. IfWinExist, Hegemony, has been installed
  12798. {
  12799. break
  12800. }
  12801. Sleep (2000)
  12802. }
  12803. winwait, Hegemony, has been installed
  12804. Sleep 500
  12805. controlclick, Button4
  12806. Sleep 500
  12807. controlclick, Button2
  12808. }
  12809. WinWaitClose,Hegemony
  12810. "
  12811. }
  12812. #----------------------------------------------------------------
  12813. w_metadata hphbp_demo games \
  12814. title="Harry Potter & The Half Blood Prince Demo" \
  12815. publisher="EA" \
  12816. year="2009" \
  12817. media="download" \
  12818. file1="Release_HBP_demo_PC_DD_DEMO_Final_348428.exe" \
  12819. installed_exe1="$W_PROGRAMS_X86_WIN/Electronic Arts/Harry Potter and the Half-Blood Prince Demo/pc/hp6_demo.exe"
  12820. load_hphbp_demo()
  12821. {
  12822. case "$LANG" in
  12823. ""|"C") w_die "Harry Potter will not install in the Posix locale; please do 'export LANG=en_US.UTF-8' or something like that" ;;
  12824. esac
  12825. w_download http://largedownloads.ea.com/pub/demos/HarryPotter/Release_HBP_demo_PC_DD_DEMO_Final_348428.exe dadc1366c3b5e641454aa337ad82bc8c5082bad2
  12826. cd "$W_CACHE/$W_PACKAGE"
  12827. w_ahk_do "
  12828. SetTitleMatchMode, 2
  12829. run, Release_HBP_demo_PC_DD_DEMO_FINAL_348428.exe
  12830. winwait, Harry Potter, Install
  12831. if ( w_opt_unattended > 0 ) {
  12832. controlclick, Button1, Harry Potter
  12833. winwait, Setup, License
  12834. controlclick, Button1
  12835. controlclick, Button3
  12836. winwait, Setup, License
  12837. controlclick, Button1
  12838. controlclick, Button3
  12839. winwait, Setup, Destination
  12840. controlclick, Button1
  12841. winwait, Setup, begin
  12842. controlclick, Button1
  12843. }
  12844. winwait, Setup, Finish
  12845. if ( w_opt_unattended > 0 )
  12846. controlclick, Button1
  12847. winwaitclose
  12848. "
  12849. # Work around locale issues by symlinking the app's directory to not have a funny char
  12850. # Won't really work on cygwin, but that's ok.
  12851. cd "$W_PROGRAMS_X86_UNIX/Electronic Arts"
  12852. ln -s "Harry Potter and the Half-Blood Prince"* "Harry Potter and the Half-Blood Prince Demo"
  12853. }
  12854. #----------------------------------------------------------------
  12855. w_metadata imvu games \
  12856. title="IMVU - Instant Messaging Virtual Universe" \
  12857. publisher="IMVU" \
  12858. year="2004" \
  12859. media="download" \
  12860. file1="InstallIMVU_465.0_st_c.exe" \
  12861. installed_exe1="c:/users/$LOGNAME/Application Data/IMVUClient/IMVUClient.exe"
  12862. load_imvu()
  12863. {
  12864. w_download http://static-akm.imvu.com/imvufiles/installers/InstallIMVU_465.0_st_c.exe 3a5c6c335227a5709c5772f91d8407edd07d4012
  12865. cd "$W_CACHE/$W_PACKAGE"
  12866. w_ahk_do "
  12867. SetTitleMatchMode, 2
  12868. SetWinDelay 500
  12869. Run, $file1
  12870. if ( w_opt_unattended > 0 ) {
  12871. WinWait,IMVU Setup, IMVU Extension
  12872. ControlClick Button4 ; Don't install extension
  12873. Sleep 500
  12874. ControlClick Button2 ; Finish
  12875. ; There's no way to tell it not to launch
  12876. WinWait,IMVU Login, chrome
  12877. Click, Left, 29, 230 ; Uncheck [run on startup]
  12878. Sleep 500
  12879. Click, Left, 416, 11 ; Click X on window decoration to close
  12880. Sleep 500
  12881. WinKill,IMVU Login, chrome ; and then close harshly, just in case?
  12882. }
  12883. winwaitclose
  12884. "
  12885. }
  12886. #----------------------------------------------------------------
  12887. w_metadata kotor1 games \
  12888. title="Star Wars: Knights Of The Old Republic" \
  12889. publisher="Lucas Arts" \
  12890. year="2003" \
  12891. media="cd" \
  12892. file1="KOTOR_1.iso" \
  12893. file2="KOTOR_2.iso" \
  12894. file3="KOTOR_3.iso" \
  12895. file4="KOTOR_4.iso" \
  12896. installed_exe1="$W_PROGRAMS_X86_WIN/LucasArts/SWKotOR/swkotor.exe"
  12897. load_kotor1()
  12898. {
  12899. w_mount "KOTOR_1"
  12900. w_ahk_do "
  12901. SetTitleMatchMode 2
  12902. SetWinDelay 500
  12903. run ${W_ISO_MOUNT_LETTER}:setup.exe
  12904. winwait Star Wars, Welcome
  12905. if ( w_opt_unattended > 0 ) {
  12906. controlclick button1
  12907. winwait Star Wars, Licensing Agreement
  12908. controlclick button2
  12909. winwait Question, Licensing Agreement
  12910. controlclick button1
  12911. winwait Star Wars, Destination Folder
  12912. controlclick button1
  12913. winwait Star Wars, Program Folder
  12914. controlclick button2
  12915. winwait Star Wars, Additional Shortcuts
  12916. ;unselect start menu shortcuts
  12917. controlclick button1
  12918. controlclick button2
  12919. controlclick button3
  12920. controlclick button4
  12921. controlclick button5
  12922. controlclick button11
  12923. winwait Star Wars, Review settings
  12924. controlclick button1
  12925. }
  12926. winwait Next Disk, Please insert disk 2
  12927. "
  12928. w_mount "KOTOR_2"
  12929. w_ahk_do "
  12930. SetTitleMatchMode 2
  12931. if ( w_opt_unattended > 0 ) {
  12932. winwait Next Disk
  12933. controlclick button2
  12934. }
  12935. winwait Next Disk, Please insert disk 3
  12936. "
  12937. w_mount "KOTOR_3"
  12938. w_ahk_do "
  12939. SetTitleMatchMode 2
  12940. if ( w_opt_unattended > 0 ) {
  12941. winwait Next Disk
  12942. controlclick button2
  12943. }
  12944. winwait Next Disk, Please insert disk 4
  12945. "
  12946. w_mount "KOTOR_4"
  12947. w_ahk_do "
  12948. SetTitleMatchMode 2
  12949. if ( w_opt_unattended > 0 ) {
  12950. winwait Next Disk
  12951. controlclick button2
  12952. winwait Question, Desktop
  12953. controlclick button2
  12954. winwait Question, DirectX
  12955. controlclick button2 ;don't install directx
  12956. }
  12957. winwait Star Wars, Complete
  12958. if ( w_opt_unattended > 0 ) {
  12959. controlclick button1 ;don't launch game
  12960. controlclick button4
  12961. }
  12962. winwaitclose Star Wars, Complete
  12963. "
  12964. }
  12965. #----------------------------------------------------------------
  12966. w_metadata losthorizon_demo games \
  12967. title="Lost Horizon Demo" \
  12968. publisher="Deep Silver" \
  12969. year="2010" \
  12970. media="manual_download" \
  12971. file1="Lost_Horizon_Demo_EN.exe" \
  12972. installed_exe1="$W_PROGRAMS_X86_WIN/Deep Silver/Lost Horizon Demo/fsasgame.exe"
  12973. load_losthorizon_demo()
  12974. {
  12975. w_download_manual http://www.fileplanet.com/215704/download/Lost-Horizon-Demo Lost_Horizon_Demo_EN.exe
  12976. cd "$W_CACHE/$W_PACKAGE"
  12977. w_ahk_do "
  12978. SetTitleMatchMode, 2
  12979. run Lost_Horizon_Demo_EN.exe
  12980. WinWait,Lost Horizon Demo, Destination
  12981. if ( w_opt_unattended > 0 ) {
  12982. Sleep 500
  12983. Send {RAW}"$W_TMP"
  12984. ControlClick Button2 ;Install
  12985. WinWaitClose,Lost Horizon Demo,Installation
  12986. Sleep 1000
  12987. Click, Left, 169, 371
  12988. WinWait,Lost Horizon Demo - InstallShield Wizard,Welcome
  12989. Sleep 500
  12990. ControlClick Button1 ;Next
  12991. WinWait,Lost Horizon Demo - InstallShield Wizard,License
  12992. ControlFocus,Button3,Lost Horizon Demo
  12993. Sleep 500
  12994. Send {Space}
  12995. ControlClick Button1 ;Next
  12996. WinWait,Lost Horizon Demo - InstallShield Wizard,program
  12997. Sleep 500
  12998. ControlClick Button2 ;Next
  12999. WinWait,Lost Horizon Demo - InstallShield Wizard,features
  13000. Sleep 500
  13001. ControlClick Button4 ;Next
  13002. WinWait,Lost Horizon Demo - InstallShield Wizard,begin
  13003. Sleep 500
  13004. ControlClick Button1 ;Next
  13005. }
  13006. WinWaitClose
  13007. WinWait,Lost Horizon Demo - InstallShield Wizard,Complete
  13008. if ( w_opt_unattended > 0 ) {
  13009. ControlFocus,Button2,Lost Horizon
  13010. Sleep 500
  13011. Send {Space}
  13012. Sleep 500
  13013. ControlClick Button4 ; Finish
  13014. }
  13015. WinWaitClose
  13016. "
  13017. }
  13018. #----------------------------------------------------------------
  13019. w_metadata lego_potc_demo games \
  13020. title="Lego Pirates of the Caribbean Demo" \
  13021. publisher="Travellers Tales" \
  13022. year="2011" \
  13023. media="manual_download" \
  13024. file1="LPOTC_PC_Demo.zip" \
  13025. installed_file1="$W_PROGRAMS_X86_WIN/Disney Interactive Studios/LEGO Pirates DEMO/LEGOPiratesDEMO.exe"
  13026. load_lego_potc_demo()
  13027. {
  13028. w_download_manual http://www.gamershell.com/download_73976.shtml LPOTC_PC_Demo.zip 3025dcbbee9ff2d74d7837a78ef5b7aceae15d8f
  13029. cd "$W_TMP"
  13030. w_info "Unpacking $file1"
  13031. w_try_unzip . "$W_CACHE/$W_PACKAGE/$file1" LPOTC_PC_Demo.exe
  13032. w_ahk_do "
  13033. SetWinDelay, 500
  13034. SetTitleMatchMode, 2
  13035. SetTitleMatchMode, slow ; since word English in first dialog can only be read 'slowly'
  13036. run LPOTC_PC_Demo.exe
  13037. if ( w_opt_unattended > 0 ) {
  13038. winwait,LEGO,English
  13039. sleep 500
  13040. winactivate
  13041. send {Tab}{Tab}{Enter}
  13042. winwaitclose,LEGO,English
  13043. winwait, LEGO, License
  13044. winactivate
  13045. send {Space}
  13046. sleep 500
  13047. send {Enter}
  13048. winwaitclose, LEGO, License
  13049. winwait, DirectX
  13050. ControlClick, Button1 ; next
  13051. ;send {Enter} ; next
  13052. winwaitclose, DirectX
  13053. winwait, LEGO, License ; DIRECTX shows up in slow text, could wait for that
  13054. winactivate
  13055. sleep 500
  13056. ControlClick, Button1 ; accept
  13057. ;send {Tab}{Tab}{Space} ; accept
  13058. sleep 500
  13059. send {Enter}
  13060. winwaitclose, LEGO, License
  13061. }
  13062. winwait, LEGO, continue
  13063. if ( w_opt_unattended > 0 ) {
  13064. ControlClick, Button2
  13065. sleep 1000
  13066. }
  13067. winwaitclose, LEGO
  13068. "
  13069. }
  13070. #----------------------------------------------------------------
  13071. w_metadata lhp_demo games \
  13072. title="LEGO Harry Potter Demo [Years 1-4]" \
  13073. publisher="Travellers Tales / WB" \
  13074. year="2010" \
  13075. media="download" \
  13076. file1="LEGOHarryPotterDEMO.exe" \
  13077. installed_exe1="$W_PROGRAMS_X86_WIN/WB Games/LEGO_Harry_Potter_DEMO/LEGOHarryPotterDEMO.exe"
  13078. load_lhp_demo()
  13079. {
  13080. case "$LANG" in
  13081. *UTF-8*|*utf8*) ;;
  13082. *)
  13083. w_warn "This installer fails in non-utf-8 locales. Doing 'export LANG=en_US.UTF-8'."
  13084. LANG=en_US.UTF-8
  13085. export LANG
  13086. ;;
  13087. esac
  13088. w_download "http://static.kidswb.com/legoharrypottergame/LEGOHarryPotterDEMO.exe" bb0a30ad9a7cc51c80e1bb1f3eec22e6ccc1a706
  13089. cd "$W_CACHE/$W_PACKAGE"
  13090. w_ahk_do "
  13091. SetTitleMatchMode, 2
  13092. run, LEGOHarryPotterDEMO.exe
  13093. winwait, LEGO, language
  13094. if ( w_opt_unattended > 0 ) {
  13095. controlclick, Button1
  13096. winwait, LEGO, License
  13097. controlclick, Button1
  13098. controlclick, Button2
  13099. winwait, LEGO, installation method
  13100. controlclick, Button2
  13101. }
  13102. winwait, LEGO, Finish
  13103. if ( w_opt_unattended > 0 )
  13104. controlclick, Button1
  13105. winwaitclose, LEGO, Finish
  13106. "
  13107. # Work around locale issues by symlinking the app's directory to not have a funny char
  13108. # Won't really work on cygwin, but that's ok.
  13109. cd "$W_PROGRAMS_X86_UNIX/WB Games"
  13110. ln -s LEGO*Harry\ Potter*DEMO LEGO_Harry_Potter_DEMO
  13111. }
  13112. #----------------------------------------------------------------
  13113. w_metadata lswcs games \
  13114. title="Lego Star Wars Complete Saga" \
  13115. publisher="Lucasarts" \
  13116. year="2009" \
  13117. media="dvd" \
  13118. file1="LEGOSAGA.iso" \
  13119. installed_file1="$W_PROGRAMS_X86_WIN/LucasArts/LEGO Star Wars - The Complete Saga/LEGOStarWarsSaga.exe"
  13120. load_lswcs()
  13121. {
  13122. w_mount LEGOSAGA
  13123. w_ahk_do "
  13124. run ${W_ISO_MOUNT_LETTER}:setup.exe
  13125. SetTitleMatchMode, 2
  13126. winwait, Choose Setup Language
  13127. if ( w_opt_unattended > 0 ) {
  13128. send {Enter}
  13129. winwait, LEGO, License Agreement
  13130. send a{Enter}
  13131. }
  13132. winwait, LEGO, method
  13133. if ( w_opt_unattended > 0 ) {
  13134. ControlClick Easy Installation
  13135. sleep 1000
  13136. }
  13137. winwaitclose, LEGO
  13138. "
  13139. w_warn "This game is copy-protected, and requires the real disc in a real drive to run."
  13140. }
  13141. #----------------------------------------------------------------
  13142. w_metadata lemonysnicket games \
  13143. title="Lemony Snicket: A Series of Unfortunate Events" \
  13144. publisher="Activision" \
  13145. year="2004" \
  13146. media="cd" \
  13147. file1="Lemony Snicket.iso"
  13148. load_lemonysnicket()
  13149. {
  13150. w_mount "Lemony Snicket"
  13151. w_ahk_do "
  13152. SetTitleMatchMode, 2
  13153. Run, ${W_ISO_MOUNT_LETTER}:setup.exe
  13154. WinWait, Lemony, Welcome
  13155. if ( w_opt_unattended > 0 ) {
  13156. sleep 1000
  13157. ControlClick, Button1 ; Next
  13158. WinWait, Lemony, License
  13159. sleep 1000
  13160. ControlClick, Button2 ; Accept
  13161. WinWait, Lemony, Minimum System
  13162. sleep 1000
  13163. ControlClick, Button2 ; Yes
  13164. WinWait, Lemony, Destination
  13165. sleep 1000
  13166. ControlClick, Button1 ; Next
  13167. WinWait, Lemony, Select Program Folder
  13168. sleep 1000
  13169. ControlClick, Button2 ; Next
  13170. WinWait, Lemony, Start Copying
  13171. sleep 1000
  13172. ControlClick, Button1 ; Next
  13173. WinWait, Question, Would you like to add a desktop shortcut
  13174. sleep 1000
  13175. ControlClick, Button2 ; No
  13176. WinWait, Question, Would you like to register
  13177. sleep 1000
  13178. ControlClick, Button2 ; No
  13179. ;WinWait, Information, Please register
  13180. ;sleep 1000
  13181. ;ControlClick, Button1 ; OK
  13182. WinWait, Lemony, Complete
  13183. sleep 1000
  13184. ControlClick, Button4 ; Finish
  13185. WinWait, Lemony, Play
  13186. sleep 1000
  13187. ControlClick, Button6 ; Exit
  13188. WinWait, Lemony, Are you sure
  13189. sleep 1000
  13190. ControlClick, Button1 ; Yes already
  13191. }
  13192. WinWaitClose, Lemony
  13193. "
  13194. }
  13195. #----------------------------------------------------------------
  13196. w_metadata luxor_ar games \
  13197. title="Luxor Amun Rising" \
  13198. publisher="MumboJumbo" \
  13199. year="2006" \
  13200. media="cd" \
  13201. file1="LUXOR_AMUNRISING.iso" \
  13202. installed_exe1="$W_PROGRAMS_X86_WIN/MumboJumbo/Luxor Amun Rising/Luxor AR.exe"
  13203. load_luxor_ar()
  13204. {
  13205. w_mount LUXOR_AMUNRISING
  13206. w_ahk_do "
  13207. SetWinDelay, 500
  13208. SetTitleMatchMode, 2
  13209. run, ${W_ISO_MOUNT_LETTER}:Luxor_AR_Setup.exe
  13210. winwait, Luxor
  13211. if ( w_opt_unattended > 0 ) {
  13212. ControlClick, Button2 ; Agree
  13213. winwait, Folder
  13214. ControlClick, Button2 ; Install
  13215. winwait, Completed
  13216. ControlClick, Button2 ; Next
  13217. }
  13218. winwait, Success
  13219. if ( w_opt_unattended > 0 ) {
  13220. ControlClick, Button6 ; Uncheck Play
  13221. ControlClick, Button2 ; Close
  13222. }
  13223. winwaitclose
  13224. "
  13225. }
  13226. #----------------------------------------------------------------
  13227. w_metadata masseffect2 games \
  13228. title="Mass Effect 2 (drm broken on wine)" \
  13229. publisher="BioWare" \
  13230. year="2010" \
  13231. media="dvd" \
  13232. file1="MassEffect2.iso" \
  13233. file2="ME2_Disc2.iso" \
  13234. installed_exe1="$W_PROGRAMS_X86_WIN/Mass Effect 2/Binaries/MassEffect2.exe" \
  13235. wine_showstoppers="23184"
  13236. load_masseffect2()
  13237. {
  13238. w_mount MassEffect2
  13239. w_read_key
  13240. # FIXME: only do this for nvidia cards
  13241. if w_workaround_wine_bug 23151 "Disabling glsl"
  13242. then
  13243. w_call glsl=disabled
  13244. fi
  13245. w_ahk_do "
  13246. SetTitleMatchMode, 2
  13247. run, ${W_ISO_MOUNT_LETTER}:Setup.exe
  13248. winwait, Installer Language
  13249. if ( w_opt_unattended > 0 ) {
  13250. send {Enter}
  13251. winwait, Mass Effect
  13252. send {Enter}
  13253. winwait, Mass Effect, License
  13254. ControlClick, Button4
  13255. ControlClick, Button2
  13256. winwait, Mass Effect, Registration Code
  13257. send $W_KEY
  13258. ControlClick, Button2
  13259. winwait, Mass Effect, Install Type
  13260. ControlClick, Button2
  13261. }
  13262. winwait, Insert Disc
  13263. "
  13264. sleep 5
  13265. w_mount ME2_Disc2
  13266. w_ahk_do "
  13267. SetTitleMatchMode, 2
  13268. if ( w_opt_unattended > 0 ) {
  13269. winwait, Insert Disc
  13270. ControlClick, Button4
  13271. ; on windows, the first click doesn't seem to do it, so press enter, too
  13272. sleep 1000
  13273. send {Enter}
  13274. }
  13275. ; Some installs may not get to this point due to an installer hang/crash (bug 22919)
  13276. ; The hang/crash happens after the Physx install but does not seem to affect gameplay
  13277. loop
  13278. {
  13279. ifwinexist, Mass Effect, Finish
  13280. {
  13281. if ( w_opt_unattended > 0 ) {
  13282. winkill, Mass Effect
  13283. }
  13284. break
  13285. }
  13286. Process, exist, Installer.exe
  13287. me2pid = %ErrorLevel%
  13288. if me2pid = 0
  13289. break
  13290. sleep 1000
  13291. }
  13292. "
  13293. }
  13294. #----------------------------------------------------------------
  13295. w_metadata masseffect2_demo games \
  13296. title="Mass Effect 2" \
  13297. publisher="BioWare" \
  13298. year="2010" \
  13299. media="download" \
  13300. file1="MassEffect2DemoEN.exe" \
  13301. installed_exe1="$W_PROGRAMS_X86_WIN/Mass Effect 2 Demo/Binaries/MassEffect2.exe"
  13302. load_masseffect2_demo()
  13303. {
  13304. w_download http://static.cdn.ea.com/bioware/u/f/eagames/bioware/masseffect2/ME2_DEMO/MassEffect2DemoEN.exe cda9a25387a98e29772b3ccdcf609f87188285e2
  13305. # FIXME: only do this for nvidia cards
  13306. if w_workaround_wine_bug 23151 "Disabling glsl"
  13307. then
  13308. w_call glsl=disabled
  13309. fi
  13310. # Don't let self-extractor write into $W_CACHE
  13311. case "$OS" in
  13312. "Windows_NT")
  13313. cp "$W_CACHE/$W_PACKAGE/MassEffect2DemoEN.exe" "$W_TMP"
  13314. chmod +x "$W_TMP"/MassEffect2DemoEN.exe ;;
  13315. *)
  13316. ln -sf "$W_CACHE/$W_PACKAGE/MassEffect2DemoEN.exe" "$W_TMP" ;;
  13317. esac
  13318. cd "$W_TMP"
  13319. w_ahk_do "
  13320. SetWinDelay 1000
  13321. SetTitleMatchMode, 2
  13322. run, MassEffect2DemoEN.exe
  13323. winwait, Mass Effect 2 Demo
  13324. if ( w_opt_unattended > 0 ) {
  13325. send {Enter}
  13326. winwait, Mass Effect 2 Demo, conflicts
  13327. send {Enter}
  13328. winwait, Mass Effect, License
  13329. ControlClick, Button4
  13330. ;ControlClick, Button2
  13331. send {Enter}
  13332. winwait, Mass Effect, Install Type
  13333. ControlClick, Button2
  13334. }
  13335. ; Some installs may not get to this point due to an installer hang/crash (bug 22919)
  13336. ; The hang/crash happens after the Physx install but does not seem to affect gameplay
  13337. loop
  13338. {
  13339. ifwinexist, Mass Effect, Finish
  13340. {
  13341. if ( w_opt_unattended > 0 ) {
  13342. winkill, Mass Effect
  13343. }
  13344. break
  13345. }
  13346. Process, exist, Installer.exe
  13347. me2pid = %ErrorLevel%
  13348. if me2pid = 0
  13349. break
  13350. sleep 1000
  13351. }
  13352. "
  13353. }
  13354. #----------------------------------------------------------------
  13355. w_metadata maxmagicmarker_demo games \
  13356. title="Max & the Magic Marker Demo" \
  13357. publisher="Press Play" \
  13358. year="2010" \
  13359. media="download" \
  13360. file1="max_demo_pc.zip" \
  13361. installed_exe1="$W_PROGRAMS_X86_WIN/maxmagicmarker_demo/max and the magic markerdemo pc.exe"
  13362. load_maxmagicmarker_demo()
  13363. {
  13364. w_download http://www.maxandthemagicmarker.com/maxdemo/max_demo_pc.zip 1a79c583ff40e7b2cf05d18a89a806fd6b88a5d1
  13365. w_try_unzip "$W_PROGRAMS_X86_UNIX"/$W_PACKAGE "$W_CACHE/$W_PACKAGE"/max_demo_pc.zip
  13366. # Work around bug in game?!
  13367. cd "$W_PROGRAMS_X86_UNIX/$W_PACKAGE"
  13368. mv "max and the magic markerdemo pc" "max and the magic markerdemo pc"_Data
  13369. }
  13370. #----------------------------------------------------------------
  13371. w_metadata mdk games \
  13372. title="MDK (3dfx)" \
  13373. publisher="Playmates International" \
  13374. year="1997" \
  13375. media="cd" \
  13376. file1="MDK.iso" \
  13377. installed_exe1="C:/SHINY/MDK/MDK3DFX.EXE"
  13378. load_mdk()
  13379. {
  13380. # Needed even on Windows, some people say. Haven't tried the D3D version on win7 yet.
  13381. w_call glidewrapper
  13382. w_download http://www.falconfly.de/downloads/patch-mdk3dfx.zip edcff0160c62d23b00c55c0bdfa38a6e90d925b0
  13383. w_mount MDK
  13384. cd "$W_ISO_MOUNT_ROOT"
  13385. w_ahk_do "
  13386. SetTitleMatchMode, 2
  13387. SetTitleMatchMode, slow
  13388. run ${W_ISO_MOUNT_LETTER}:setup.exe
  13389. winwait, MDK
  13390. if ( w_opt_unattended > 0 ) {
  13391. click, left, 80, 80 ; USA
  13392. winwait, Welcome, purchasing MDK
  13393. ControlClick, Button1 ; Next
  13394. winwait, Select Target Platform
  13395. ControlClick, Button6 ; Next
  13396. winwait, Select Installation Options
  13397. ControlClick, Button3 ; Large
  13398. ControlClick, Button6 ; Next
  13399. winwait, Destination
  13400. ControlClick, Button1 ; Next
  13401. winwait, Program Folder
  13402. ControlClick, Button2 ; Next
  13403. winwait, Start
  13404. ControlClick, Button1 ; Next
  13405. Loop {
  13406. IfWinExist, Setup, ProgramFolder
  13407. send {Enter}
  13408. IfWinExist, Setup Complete
  13409. break
  13410. sleep 500
  13411. }
  13412. }
  13413. WinWait, Setup Complete
  13414. if ( w_opt_unattended > 0 ) {
  13415. ControlClick, Button1 ; uncheck readme
  13416. ControlClick, Button4 ; Finish
  13417. WinWait, Question, DirectX
  13418. ControlClick, Button2 ; No
  13419. WinWait, Information, complete
  13420. ControlClick, Button1 ; No
  13421. }
  13422. WinWaitClose
  13423. "
  13424. cd "$W_DRIVE_C/SHINY/MDK"
  13425. w_try_unzip . "$W_CACHE/$W_PACKAGE"/patch-mdk3dfx.zip
  13426. # TODO: wine fails to install menu items, add a workaround for that
  13427. }
  13428. #----------------------------------------------------------------
  13429. w_metadata menofwar games \
  13430. title="Men of War" \
  13431. publisher="Aspyr Media" \
  13432. year="2009" \
  13433. media="dvd" \
  13434. file1="Men of War.iso" \
  13435. installed_exe1="$W_PROGRAMS_X86_WIN/Aspyr/Men of War/mow.exe"
  13436. load_menofwar()
  13437. {
  13438. w_mount "Men of War"
  13439. cd "$W_ISO_MOUNT_ROOT"
  13440. w_ahk_do "
  13441. SetTitleMatchMode, 2
  13442. SetTitleMatchMode, slow
  13443. run ${W_ISO_MOUNT_LETTER}:setup.exe
  13444. winwait, Select Setup Language, Select the language
  13445. if ( w_opt_unattended > 0 ) {
  13446. sleep 1000
  13447. ControlClick, TNewButton1, Select Setup Language, Select the language
  13448. winwait, Men of War
  13449. sleep 1000
  13450. ControlClick, TButton4, Men of War
  13451. winwait, Setup - Men of War, ACCEPTANCE OF AGREEMENT
  13452. sleep 1000
  13453. ControlClick, TNewRadioButton1, Setup - Men of War, ACCEPTANCE OF AGREEMENT
  13454. ControlClick, TNewButton1, Setup - Men of War, ACCEPTANCE OF AGREEMENT
  13455. }
  13456. winwait, Setup - Men of War, Setup has finished installing
  13457. if ( w_opt_unattended > 0 ) {
  13458. sleep 1000
  13459. ControlClick, x242 y254
  13460. ControlClick, x242 y278
  13461. ControlClick, TNewButton1, Setup - Men of War, Setup has finished
  13462. }
  13463. "
  13464. }
  13465. #----------------------------------------------------------------
  13466. w_metadata mb_warband_demo games \
  13467. title="Mount & Blade Warband Demo" \
  13468. publisher="Taleworlds" \
  13469. year="2010" \
  13470. media="download" \
  13471. file1="mb_warband_setup_1143.exe" \
  13472. installed_exe1="$W_PROGRAMS_X86_WIN/Mount&Blade Warband/mb_warband.exe" \
  13473. homepage="http://www.taleworlds.com"
  13474. load_mb_warband_demo()
  13475. {
  13476. w_download "http://download.taleworlds.com/mb_warband_setup_1143.exe" 94fb829068678e27bcd67d9e0fde7f08c51a23af
  13477. cd "$W_CACHE/$W_PACKAGE"
  13478. w_ahk_do "
  13479. SetTitleMatchMode 2
  13480. run mb_warband_setup_1143.exe
  13481. winwait Warband
  13482. if ( w_opt_unattended > 0 ) {
  13483. controlclick button2
  13484. winwait Warband
  13485. controlclick button2
  13486. winwait Warband, Finish
  13487. controlclick button4
  13488. controlclick button2
  13489. }
  13490. winwaitclose Warband
  13491. "
  13492. }
  13493. #----------------------------------------------------------------
  13494. w_metadata mise games \
  13495. title="Monkey Island: Special Edition" \
  13496. publisher="LucasArts" \
  13497. year="2009" \
  13498. media="dvd" \
  13499. file1="SecretOfMonkeyIslandSE_ddsetup.zip" \
  13500. installed_exe1="$W_PROGRAMS_X86_WIN/LucasArts/The Secret of Monkey Island Special Edition/MISE.exe"
  13501. load_mise()
  13502. {
  13503. w_download_manual "http://www.direct2drive.com/8241/product/Buy-The-Secret-of-Monkey-Island(R):-Special-Edition-Download" SecretOfMonkeyIslandSE_ddsetup.zip 2e32458698c9ec7ebce94ae5c57531a3fe1dbb9e
  13504. mkdir -p "$W_TMP/$W_PACKAGE"
  13505. cd "$W_TMP/$W_PACKAGE"
  13506. # Don't extract DirectX/dotnet35 installers, they just take up extra time and aren't needed. Luckily, MISE copes well and just skips them if they are missing:
  13507. w_try unzip "$W_CACHE/$W_PACKAGE"/SecretOfMonkeyIslandSE_ddsetup.zip -x DirectX* dotnet*
  13508. w_ahk_do "
  13509. SetTitleMatchMode, 2
  13510. run, setup.exe
  13511. WinWait, The Secret of Monkey Island, This wizard will guide you
  13512. sleep 1000
  13513. ControlClick, Button2
  13514. WinWait, The Secret of Monkey Island, License Agreement
  13515. sleep 1000
  13516. ControlSend, RichEdit20A1, {CTRL}{END}
  13517. sleep 1000
  13518. ControlClick, Button4
  13519. sleep 1000
  13520. ControlClick, Button2
  13521. WinWait, The Secret of Monkey Island, Setup Type
  13522. sleep 1000
  13523. ControlClick, Button2
  13524. WinWait, The Secret of Monkey Island, Click Finish
  13525. sleep 1000
  13526. ControlClick, Button2
  13527. "
  13528. # FIXME: This app has two different keys - you can use either one. How do we handle that with w_read_key?
  13529. if test -f "$W_CACHE"/$W_PACKAGE/activationcode.txt
  13530. then
  13531. MISE_KEY=`cat "$W_CACHE"/$W_PACKAGE/activationcode.txt`
  13532. w_ahk_do "
  13533. SetTitleMatchMode, 2
  13534. run, $W_PROGRAMS_X86_WIN\\LucasArts\\The Secret of Monkey Island Special Edition\\MISE.exe
  13535. winwait, Product Activation
  13536. ControlClick, Edit1 ; Activation Code
  13537. send $MISE_KEY
  13538. ControlClick Button4 ; Activate Online
  13539. winwait, Product Activation, SUCCESSFUL
  13540. winClose
  13541. sleep 1000
  13542. Process, Close, MISE.exe
  13543. "
  13544. elif test -f "$W_CACHE"/$W_PACKAGE/unlockcode.txt
  13545. then
  13546. MISE_KEY=`cat "$W_CACHE"/$W_PACKAGE/unlockcode.txt`
  13547. w_ahk_do "
  13548. SetTitleMatchMode, 2
  13549. run, $W_PROGRAMS_X86_WIN\\LucasArts\\The Secret of Monkey Island Special Edition\\MISE.exe
  13550. winwait, Product Activation
  13551. ControlClick, Edit3 ; Unlock Code
  13552. send $MISE_KEY
  13553. ControlClick Button6 ; Activate manual
  13554. winClose
  13555. sleep 1000
  13556. Process, Close, MISE.exe
  13557. "
  13558. fi
  13559. }
  13560. #----------------------------------------------------------------
  13561. w_metadata myth2_demo games \
  13562. title="Myth II demo 1.7.2" \
  13563. publisher="Project Magma" \
  13564. year="2011" \
  13565. media="download" \
  13566. file1="Myth2_Demo_172.exe" \
  13567. installed_exe1="$W_PROGRAMS_X86_WIN/Myth II Demo/Myth II Demo.exe" \
  13568. homepage="http://projectmagma.net/"
  13569. load_myth2_demo()
  13570. {
  13571. # Originally a 1998 game by Bungie; according to Wikipedia, they handed the
  13572. # source code to Project Magma for further development.
  13573. # 1 May 2011 1.7.2 sha1sum e0a8f707377e71314a471a09ad2a55179ea44588
  13574. w_download http://tain.totalcodex.net/items/download/myth-ii-demo-windows e0a8f707377e71314a471a09ad2a55179ea44588 Myth2_Demo_172.exe
  13575. cd "$W_CACHE/$W_PACKAGE"
  13576. w_ahk_do "
  13577. SetTitleMatchMode, 2
  13578. SetWinDelay 500
  13579. run, $file1
  13580. winwait, Setup, Welcome
  13581. if ( w_opt_unattended > 0 ) {
  13582. winactivate
  13583. send {Enter} ; next
  13584. winwait, Setup, Components
  13585. send {Enter} ; next
  13586. winwait, Setup, Location
  13587. send {Enter} ; install
  13588. }
  13589. winwait, Setup, Complete
  13590. if ( w_opt_unattended > 0 ) {
  13591. controlclick, Button4 ; Do not run
  13592. controlclick, Button2 ; Finish
  13593. }
  13594. winwaitclose
  13595. "
  13596. }
  13597. #----------------------------------------------------------------
  13598. w_metadata nfsshift_demo games \
  13599. title="Need For Speed: SHIFT Demo" \
  13600. publisher="EA" \
  13601. year="2009" \
  13602. media="download" \
  13603. file1="NFSSHIFTPCDEMO.exe" \
  13604. installed_exe1="$W_PROGRAMS_X86_WIN/Electronic Arts/Need for Speed SHIFT Demo/shiftdemo.exe"
  13605. load_nfsshift_demo()
  13606. {
  13607. #w_download http://cdn.needforspeed.com/data/downloads/shift/NFSSHIFTPCDEMO.exe 7b267654d08c54f15813f2917d9d74ec40905db7
  13608. w_download http://www.legendaryreviews.com/download-center/demos/NFSSHIFTPCDEMO.exe 7b267654d08c54f15813f2917d9d74ec40905db7
  13609. w_try cp "$W_CACHE/$W_PACKAGE/$file1" "$W_TMP"
  13610. cd "$W_TMP"
  13611. w_ahk_do "
  13612. SetTitleMatchMode, 2
  13613. SetTitleMatchMode, slow
  13614. run, $file1
  13615. winwait, WinRAR
  13616. if ( w_opt_unattended > 0 ) {
  13617. ControlClick, Button2
  13618. winwait, SHIFT, View the readme
  13619. controlclick, Button1
  13620. ; Not all systems need the Visual C++ runtime
  13621. loop
  13622. {
  13623. ifwinexist, Visual C++
  13624. {
  13625. controlclick, Button1
  13626. break
  13627. }
  13628. ifwinexist, Setup, SHIFT Demo License
  13629. {
  13630. break
  13631. }
  13632. sleep 1000
  13633. }
  13634. winwait, Setup, SHIFT Demo License
  13635. Sleep 1000
  13636. send {Space}
  13637. Sleep 1000
  13638. send {Enter}
  13639. winwait, Setup, DirectX
  13640. Sleep 1000
  13641. send {Space}
  13642. Sleep 1000
  13643. send {Enter}
  13644. winwait, Setup, Destination
  13645. Sleep 1000
  13646. send {Enter}
  13647. winwait, Setup, begin
  13648. Sleep 1000
  13649. controlclick, Button1
  13650. }
  13651. winwait, Setup, Finish
  13652. if ( w_opt_unattended > 0 ) {
  13653. Sleep 1000
  13654. controlclick, Button5
  13655. controlclick, Button1
  13656. }
  13657. winwaitclose, Setup, Finish
  13658. "
  13659. }
  13660. #----------------------------------------------------------------
  13661. w_metadata njcwp_trial apps \
  13662. title="NJStar Chinese Word Processor trial" \
  13663. publisher="NJStar" \
  13664. year="2009" \
  13665. media="download" \
  13666. file1="njcwp.exe" \
  13667. installed_exe1="$W_PROGRAMS_X86_WIN/NJStar Chinese WP/njstar.exe" \
  13668. homepage="http://www.njstar.com/cms/njstar-chinese-word-processor"
  13669. load_njcwp_trial()
  13670. {
  13671. w_download http://www.njstar.com/download/njcwp.exe 006da155bad1ac4a73b953c98cb821eb7fd96507
  13672. cd "$W_CACHE/$W_PACKAGE"
  13673. if test "$W_OPT_UNATTENDED"
  13674. then
  13675. w_ahk_do "
  13676. SetTitleMatchMode, 2
  13677. run $file1
  13678. WinWait, Setup, Wizard
  13679. ControlClick Button2 ; next
  13680. WinWait, Setup, License
  13681. ControlClick Button2 ; agree
  13682. WinWait, Setup, Install
  13683. ControlClick Button2 ; install
  13684. WinWait, Setup, Completing
  13685. ControlClick Button4 ; do not launch
  13686. ControlClick Button2 ; finish
  13687. WinWaitClose
  13688. "
  13689. else
  13690. w_try "$WINE" $file1
  13691. fi
  13692. }
  13693. #----------------------------------------------------------------
  13694. w_metadata njjwp_trial apps \
  13695. title="NJStar Japanese Word Processor trial" \
  13696. publisher="NJStar" \
  13697. year="2009" \
  13698. media="download" \
  13699. file1="njjwp.exe" \
  13700. installed_exe1="$W_PROGRAMS_X86_WIN/NJStar Japanese WP/njstarj.exe" \
  13701. homepage="http://www.njstar.com/cms/njstar-japanese-word-processor"
  13702. load_njjwp_trial()
  13703. {
  13704. w_download http://www.njstar.com/download/njjwp.exe 363d22e4ca7b79d0290a8ccdb0fa99169971d418
  13705. cd "$W_CACHE/$W_PACKAGE"
  13706. if test "$W_OPT_UNATTENDED"
  13707. then
  13708. w_ahk_do "
  13709. SetTitleMatchMode, 2
  13710. run $file1
  13711. WinWait, Setup, Wizard
  13712. ControlClick Button2 ; next
  13713. WinWait, Setup, License
  13714. ControlClick Button2 ; agree
  13715. WinWait, Setup, Install
  13716. ControlClick Button2 ; install
  13717. WinWait, Setup, Completing
  13718. ControlClick Button4 ; do not launch
  13719. ControlClick Button2 ; finish
  13720. WinWaitClose
  13721. "
  13722. else
  13723. w_try "$WINE" $file1
  13724. fi
  13725. }
  13726. #----------------------------------------------------------------
  13727. w_metadata oblivion games \
  13728. title="Elder Scrolls: Oblivion" \
  13729. publisher="Bethesda Game Studios" \
  13730. year="2006" \
  13731. media="dvd" \
  13732. file1="Oblivion.iso" \
  13733. installed_exe1="$W_PROGRAMS_X86_WIN/Bethesda Softworks/Oblivion/Oblivion.exe"
  13734. load_oblivion()
  13735. {
  13736. w_mount "Oblivion"
  13737. cd "$W_ISO_MOUNT_ROOT"
  13738. w_ahk_do "
  13739. SetTitleMatchMode, 2
  13740. run, Setup.exe
  13741. winwait, Oblivion, Welcome to the
  13742. if ( w_opt_unattended > 0 ) {
  13743. sleep 500
  13744. controlclick, Button1
  13745. winwait, Oblivion, License Agreement
  13746. sleep 500
  13747. controlclick, Button3
  13748. sleep 500
  13749. controlclick, Button1
  13750. winwait, Oblivion, Choose Destination
  13751. sleep 500
  13752. controlclick, Button1
  13753. winwait, Oblivion, Ready to Install
  13754. sleep 500
  13755. controlclick, Button1
  13756. winwait, Oblivion, Complete
  13757. sleep 500
  13758. controlclick, Button1
  13759. sleep 500
  13760. controlclick, Button2
  13761. sleep 500
  13762. controlclick, Button3
  13763. }
  13764. winwaitclose, Oblivion, Complete
  13765. "
  13766. if w_workaround_wine_bug 20074 "Installing native d3dx9_36"
  13767. then
  13768. w_call d3dx9_36
  13769. fi
  13770. }
  13771. #----------------------------------------------------------------
  13772. w_metadata penpenxmas games \
  13773. title="Pen-Pen Xmas Olympics" \
  13774. publisher="Army of Trolls / Black Cat" \
  13775. year="2007" \
  13776. media="download" \
  13777. file1="PenPenXmasOlympics100.exe" \
  13778. installed_exe1="$W_PROGRAMS_X86_WIN/PPO/PPO.exe"
  13779. load_penpenxmas()
  13780. {
  13781. W_BROWSERAGENT=1 \
  13782. w_download http://retrospec.sgn.net/download/files/PenPenXmasOlympics100.exe 36ec83cffa0ad3cc19dea33193b54bdaaea6db5b
  13783. cd "$W_CACHE/$W_PACKAGE"
  13784. "$WINE" PenPenXmasOlympics100.exe $W_UNATTENDED_SLASH_S
  13785. }
  13786. #----------------------------------------------------------------
  13787. w_metadata plantsvszombies games \
  13788. title="Plants vs. Zombies" \
  13789. publisher="PopCap Games" \
  13790. year="2009" \
  13791. media="download" \
  13792. file1="PlantsVsZombiesSetup.exe" \
  13793. installed_file1="$W_PROGRAMS_X86_WIN/PopCap Games/Plants vs. Zombies/PlantsVsZombies.exe"
  13794. load_plantsvszombies()
  13795. {
  13796. w_download "http://downloads.popcap.com/www/popcap_downloads/PlantsVsZombiesSetup.exe" c46979be135ef1c486144fa062466cdc51b740f5
  13797. cd "$W_CACHE/$W_PACKAGE"
  13798. w_ahk_do "
  13799. run PlantsVsZombiesSetup.exe
  13800. winwait, Plants vs. Zombies Installer
  13801. if ( w_opt_unattended > 0 ) {
  13802. sleep 1000
  13803. send {Enter}
  13804. winwait, Plants vs. Zombies License Agreement
  13805. ControlClick Button1
  13806. }
  13807. winwait, Plants vs. Zombies Installation Complete!
  13808. if ( w_opt_unattended > 0 ) {
  13809. sleep 1000
  13810. send {Space}{Enter}
  13811. ControlClick, x309 y278, Plants vs. Zombies Installation Complete!,,,, Pos
  13812. }
  13813. WinWaitClose
  13814. "
  13815. }
  13816. #----------------------------------------------------------------
  13817. w_metadata popfs games \
  13818. title="Prince of Persia The Forgotten Sands" \
  13819. publisher="Ubisoft" \
  13820. year="2010" \
  13821. media="dvd" \
  13822. file1="PoP_TFS.iso" \
  13823. installed_exe1="$W_PROGRAMS_X86_WIN/Ubisoft/Prince of Persia The Forgotten Sands/Prince of Persia.exe"
  13824. load_popfs()
  13825. {
  13826. w_mount PoP_TFS
  13827. w_ahk_do "
  13828. SetTitleMatchMode, 2
  13829. run, ${W_ISO_MOUNT_LETTER}:Setup.exe
  13830. winwait, Prince of Persia, Language
  13831. if ( w_opt_unattended > 0 ) {
  13832. sleep 500
  13833. ControlClick, Button3
  13834. winwait, Prince of Persia, Welcome
  13835. sleep 500
  13836. ControlClick, Button1
  13837. winwait, Prince of Persia, License
  13838. sleep 500
  13839. ControlClick, Button5
  13840. sleep 500
  13841. ControlClick, Button2
  13842. winwait, Prince of Persia, Click Install
  13843. sleep 500
  13844. ControlClick, Button1
  13845. ; Avoid error when creating desktop shortcut
  13846. Loop
  13847. {
  13848. IfWinActive, Prince of Persia, Click Finish
  13849. break
  13850. IfWinExist, Prince of Persia, desktop shortcut
  13851. {
  13852. sleep 500
  13853. ControlClick, Button1, Prince of Persia, desktop shortcut
  13854. break
  13855. }
  13856. sleep 5000
  13857. }
  13858. }
  13859. winwait, Prince of Persia, Click Finish
  13860. if ( w_opt_unattended > 0 ) {
  13861. sleep 500
  13862. ControlClick, Button4
  13863. }
  13864. "
  13865. }
  13866. #----------------------------------------------------------------
  13867. w_metadata qq apps \
  13868. title="QQ 8.0(Chinese chat app)" \
  13869. publisher="Tencent" \
  13870. year="2015" \
  13871. media="download" \
  13872. file1="QQ8.0.exe" \
  13873. file2="QQ.tar.gz"\
  13874. installed_exe1="$W_PROGRAMS_X86_WIN/Tencent/QQ/Bin/QQScLauncher.exe" \
  13875. homepage="http://www.qq.com" \
  13876. unattended="no"
  13877. load_qq()
  13878. {
  13879. w_download http://dldir1.qq.com/qqfile/qq/QQ8.0/16968/QQ8.0.exe ef92f3863113971c95a79aa75e601893d803826c
  13880. w_download http://hillwoodhome.net/wine/QQ.tar.gz 08de45d3e5bb34b22e7c33e1163daec69742db58
  13881. if w_workaround_wine_bug 5162 "Installing native riched20 to work around can't input username."
  13882. then
  13883. w_call riched20
  13884. fi
  13885. # Make sure chinese fonts are available
  13886. w_call fakechinese
  13887. # uses mfc42u.dll
  13888. w_call mfc42
  13889. if w_workaround_wine_bug 38171 "Installing desktop file to work around bug"
  13890. then
  13891. cd "$W_TMP/"
  13892. tar -zxf "$W_CACHE/qq/QQ.tar.gz"
  13893. mkdir -p $HOME/.local/share/applications/wine/Programs/腾讯软件/QQ
  13894. mkdir -p $HOME/.local/share/icons/hicolor/48x48/apps
  13895. mkdir -p $HOME/.local/share/icons/hicolor/256x256/apps
  13896. w_try mv QQ/腾讯QQ.desktop ~/.local/share/applications/wine/Programs/腾讯软件/QQ
  13897. w_try mv QQ/48x48/QQ.png ~/.local/share/icons/hicolor/48x48/apps
  13898. w_try mv QQ/256x256/QQ.png ~/.local/share/icons/hicolor/256x256/apps
  13899. echo Exec=env WINEPREFIX="$WINEPREFIX" "$WINE" $W_PROGRAMS_X86_WIN\/Tencent\/QQ\/bin\/QQScLauncher.exe >> $HOME/.local/share/applications/wine/Programs/腾讯软件/QQ/腾讯QQ.desktop
  13900. fi
  13901. if w_workaround_wine_bug 39657 "Disable ntoskrnl.exe to work around can't be started bug"
  13902. then
  13903. w_override_dlls disabled ntoskrnl.exe
  13904. fi
  13905. if w_workaround_wine_bug 37680 "Disable txplatform.exe to work around QQ can't be quit cleanly"
  13906. then
  13907. w_override_dlls disabled txplatform.exe
  13908. fi
  13909. cd "$W_CACHE/$W_PACKAGE"
  13910. w_try "$WINE" "$file1"
  13911. }
  13912. #----------------------------------------------------------------
  13913. w_metadata qqintl apps \
  13914. title="QQ International Instant Messenger 2.11" \
  13915. publisher="Tencent" \
  13916. year="2014" \
  13917. media="download" \
  13918. file1="QQIntl2.11.exe" \
  13919. installed_exe1="$W_PROGRAMS_X86_WIN/Tencent/QQIntl/Bin/QQ.exe" \
  13920. homepage="http://www.imqq.com" \
  13921. unattended="no"
  13922. load_qqintl()
  13923. {
  13924. w_download http://dldir1.qq.com/qqfile/QQIntl/QQi_PC/QQIntl2.11.exe 030df82390e7962177fcef66fc1a0fd1a3ba4090
  13925. if w_workaround_wine_bug 33086 "Installing native riched20 to allow typing in username"
  13926. then
  13927. w_call riched20
  13928. fi
  13929. if w_workaround_wine_bug 37617 "Installing native wininet to work around crash"
  13930. then
  13931. w_call wininet
  13932. fi
  13933. if w_workaround_wine_bug 37680 "Disable txplatform.exe to work around QQ can't be quit cleanly"
  13934. then
  13935. w_override_dlls disabled txplatform.exe
  13936. fi
  13937. # Make sure chinese fonts are available
  13938. w_call fakechinese
  13939. # wants mfc80u.dll
  13940. w_call vcrun2005
  13941. cd "$W_CACHE/$W_PACKAGE"
  13942. w_try "$WINE" "$file1"
  13943. }
  13944. #----------------------------------------------------------------
  13945. w_metadata ragnarok games \
  13946. title="Ragnarok" \
  13947. publisher="GRAVITY" \
  13948. year="2002" \
  13949. media="manual_download" \
  13950. file1="iRO-13.2.2-FullInstall-20110421-1717.msi" \
  13951. installed_exe1="$W_PROGRAMS_X86_WIN/Gravity/Ragnarok Online/Ragnarok.exe"
  13952. load_ragnarok()
  13953. {
  13954. if w_workaround_wine_bug 657 "Visual C++ 6 runtime"
  13955. then
  13956. w_call vcrun6
  13957. fi
  13958. # publisher puts SHA1 checksums on download page, nice
  13959. # BDA295E3A2A57CD02BD122ED7BF4836AC012369A
  13960. w_download_manual http://www.playragnarok.com/downloads/clientdownload.aspx iRO-13.2.2-FullInstall-20110421-1717.msi bda295e3a2a57cd02bd122ed7bf4836ac012369a
  13961. cd "$W_CACHE/$W_PACKAGE"
  13962. w_ahk_do "
  13963. Run, msiexec /i $file1
  13964. SetTitleMatchMode, 2
  13965. WinWait, Ragnarok Online Setup, Please read the Ragnarok Online License Agreement
  13966. if ( w_opt_unattended > 0 ) {
  13967. Sleep 500
  13968. ControlClick Button1
  13969. Sleep 500
  13970. ControlClick Button3
  13971. }
  13972. WinWait, Ragnarok Online Setup, Completed the Ragnarok Online Setup Wizard
  13973. if ( w_opt_unattended > 0 ) {
  13974. Sleep 500
  13975. ControlClick Button1 ;Direct
  13976. }
  13977. "
  13978. # Game autoupdates:
  13979. w_killall "Ragnarok.exe"
  13980. }
  13981. #----------------------------------------------------------------
  13982. w_metadata rct3deluxe games \
  13983. title="RollerCoaster Tycoon 3 Deluxe (drm broken on wine)" \
  13984. publisher="Atari" \
  13985. year="2004" \
  13986. media="cd" \
  13987. file1="RCT3.iso" \
  13988. installed_exe1="$W_PROGRAMS_X86_WIN/Atari/RollerCoaster Tycoon 3/RCT3.EXE"\
  13989. wine_showstoppers="21448"
  13990. load_rct3deluxe()
  13991. {
  13992. w_mount RCT3
  13993. # FIXME: make videos and music work
  13994. # Game still doesn't show .wmv logo videos nor play .wma background audio in menu
  13995. # though it does in Jake's screencast. Loading wmp9 and devenum gets it to
  13996. # try to load the .wmv logos, but it crashes in quartz :-(
  13997. # But at least it's playable without the logo videos and background.
  13998. w_ahk_do "
  13999. SetWinDelay 500
  14000. SetTitleMatchMode, 2
  14001. run ${W_ISO_MOUNT_LETTER}:setup-rtc3.exe
  14002. if ( w_opt_unattended > 0 ) {
  14003. WinWait, Select Setup Language
  14004. controlclick, TButton1 ; accept
  14005. WinWait Setup - RollerCoaster Tycoon 3, Welcome
  14006. controlclick, TButton1 ; Next
  14007. WinWait Setup - RollerCoaster Tycoon 3, License
  14008. controlclick, TRadioButton1 ; Accept
  14009. sleep 500
  14010. controlclick, TButton2 ; Next
  14011. WinWait Setup - RollerCoaster Tycoon 3, Destination
  14012. controlclick, TButton3 ; Next
  14013. WinWait Setup - RollerCoaster Tycoon 3, Start Menu
  14014. controlclick, TButton4 ; Next
  14015. WinWait Setup - RollerCoaster Tycoon 3, Additional
  14016. controlclick, TButton4 ; Next
  14017. WinWait Setup - RollerCoaster Tycoon 3, begin
  14018. controlclick, TButton4 ; Install
  14019. WinWait, Atari Product Registration
  14020. controlclick, Button6 ; Close
  14021. WinWait, Product Registration, skip
  14022. controlclick, Button2 ; Yes, skip
  14023. }
  14024. WinWait Setup - RollerCoaster Tycoon 3, finished
  14025. if ( w_opt_unattended > 0 ) {
  14026. controlclick, TNewCheckListBox1 ; uncheck Launch
  14027. controlclick, TButton4 ; Finish
  14028. }
  14029. WinWaitClose Setup - RollerCoaster Tycoon 3, finished
  14030. "
  14031. }
  14032. #----------------------------------------------------------------
  14033. w_metadata rayman2_demo games \
  14034. title="Rayman 2 High Demo" \
  14035. publisher="Ubisoft" \
  14036. year="1999" \
  14037. media="download" \
  14038. file1="rayman2high.zip" \
  14039. installed_exe1="c:/UbiSoft/Rayman2Demo/Rayman2Demo.exe"
  14040. load_rayman2_demo()
  14041. {
  14042. w_download "ftp://ftp.ubisoft.com/Rayman2/rayman2high.zip" 14b2ad6f41e2e1358f3a4a5167d67a7111ea4fb5
  14043. cd "$W_TMP"
  14044. w_try unzip "$W_CACHE/$W_PACKAGE/rayman2high.zip"
  14045. w_ahk_do "
  14046. SetWinDelay 500
  14047. SetTitleMatchMode, 3
  14048. Run, SETUP.EXE
  14049. WinWaitActive, UBI Soft Installer - Language Choice
  14050. if ( w_opt_unattended > 0 ) {
  14051. ControlClick button1 ; OK
  14052. WinWait, Ubi Soft Installer - Rayman 2 Demo
  14053. ControlClick button1 ; Install
  14054. WinWait, Ubi Soft Installer - Configuration choice
  14055. ControlClick button1 ; Install
  14056. WinWait, Ubi Soft Installer - Installation Directory
  14057. ControlClick button1 ; OK
  14058. WinWait, Ubi Soft Installer - Shortcut Choice
  14059. ControlClick button1 ; OK
  14060. WinWait, Ubi Soft Installer - Information file
  14061. ControlClick button2 ; No
  14062. }
  14063. WinWait, Ubi Soft Installer - Rayman 2 Demo
  14064. if ( w_opt_unattended > 0 ) {
  14065. ControlClick button4 ; Quit
  14066. }
  14067. WinWaitClose
  14068. "
  14069. myexec="Exec=env WINEPREFIX=\"$WINEPREFIX\" wine "'C:\\\\\\\\windows\\\\\\\\UbiSoft\\\\\\\\SetupUbi.exe -play Rayman2'
  14070. mymenu="$HOME/Desktop/To Play Rayman 2 Demo.desktop"
  14071. if test -f "$mymenu" && w_workaround_wine_bug 26303 "Fixing desktop entry"
  14072. then
  14073. # this is a hack, hopefully the wine bug will be fixed soon
  14074. sed -i "s,Exec=.*,$myexec," "$mymenu"
  14075. fi
  14076. mymenu="$XDG_DATA_HOME/applications/wine/Programs/Ubi Soft Games/Rayman 2 Demo/1 To Play Rayman 2 Demo.desktop"
  14077. if test -f "$mymenu" && w_workaround_wine_bug 26304 "Fixing system menu"
  14078. then
  14079. # this is a hack, hopefully the wine bug will be fixed soon
  14080. sed -i "s,Exec=.*,$myexec," "$mymenu"
  14081. fi
  14082. }
  14083. #----------------------------------------------------------------
  14084. w_metadata riseofnations_demo games \
  14085. title="Rise of Nations Trial" \
  14086. publisher="Microsoft" \
  14087. year="2003" \
  14088. media="manual_download" \
  14089. file1="RiseOfNationsTrial.exe" \
  14090. installed_exe1="$W_PROGRAMS_X86_WIN/Microsoft Games/Rise of Nations Trial/nations.exe"
  14091. load_riseofnations_demo()
  14092. {
  14093. w_download_manual http://download.cnet.com/Rise-of-Nations-Trial-Version/3000-7562_4-10730812.html RiseOfNationsTrial.exe 33cbf1ebc0a93cb840f6296d8b529f6155db95ee
  14094. cd "$W_CACHE/$W_PACKAGE"
  14095. w_ahk_do "
  14096. SetTitleMatchMode, 2
  14097. run RiseOfNationsTrial.exe
  14098. WinWait,Rise Of Nations Trial Setup
  14099. if ( w_opt_unattended > 0 ) {
  14100. sleep 2500
  14101. ControlClick CButtonClassName2
  14102. WinWait,Rise Of Nations Trial Setup, installed
  14103. sleep 2500
  14104. ControlClick CButtonClassName7
  14105. }
  14106. WinWaitClose
  14107. "
  14108. if w_workaround_wine_bug 9027
  14109. then
  14110. w_call directmusic
  14111. fi
  14112. }
  14113. #----------------------------------------------------------------
  14114. w_metadata secondlife games \
  14115. title="Second Life Viewer" \
  14116. publisher="Linden Labs" \
  14117. year="2003-2011" \
  14118. media="download" \
  14119. file1="Second_Life_3-2-8-248931_Setup.exe" \
  14120. installed_exe1="$W_PROGRAMS_X86_WIN/SecondLifeViewer/SecondLife.exe"
  14121. load_secondlife()
  14122. {
  14123. w_download http://download.cloud.secondlife.com/Viewer-3/Second_Life_3-2-8-248931_Setup.exe e08c16edc4d2fb68bb6275bed11a259a74918da5
  14124. cd "$W_CACHE/$W_PACKAGE"
  14125. w_ahk_do "
  14126. SetTitleMatchMode, 2
  14127. SetWinDelay 500
  14128. run, $file1
  14129. if ( w_opt_unattended > 0 ) {
  14130. winwait, Installer Language
  14131. send {Enter}
  14132. winwait, Installation Folder
  14133. send {Enter}
  14134. }
  14135. winwait, Second Life, Start Second Life now
  14136. if ( w_opt_unattended > 0 ) {
  14137. send {Tab}{Enter}
  14138. }
  14139. winwaitclose
  14140. "
  14141. }
  14142. #----------------------------------------------------------------
  14143. w_metadata sims3 games \
  14144. title="The Sims 3 (drm broken on wine)" \
  14145. publisher="EA" \
  14146. year="2009" \
  14147. media="dvd" \
  14148. file1="Sims3.iso" \
  14149. installed_exe1="$W_PROGRAMS_X86_WIN/Electronic Arts/The Sims 3/Game/Bin/TS3.exe" \
  14150. wine_showstoppers="26273"
  14151. load_sims3()
  14152. {
  14153. w_read_key
  14154. w_mount Sims3
  14155. # Default lang, USA, accept defaults, uncheck EA dl mgr, uncheck readme
  14156. w_ahk_do "
  14157. run ${W_ISO_MOUNT_LETTER}:Sims3Setup.exe
  14158. winwait, Choose Setup Language
  14159. if ( w_opt_unattended > 0 ) {
  14160. send {Enter}
  14161. SetTitleMatchMode, 2
  14162. winwait, - InstallShield Wizard
  14163. sleep 1000
  14164. ControlClick &Next >, - InstallShield Wizard
  14165. sleep 1000
  14166. send uuuuuu{Tab}{Tab}{Enter}
  14167. sleep 1000
  14168. send a{Enter}
  14169. sleep 1000
  14170. send {Raw}$W_KEY
  14171. send {Enter}
  14172. winwait, - InstallShield Wizard, Setup Type
  14173. send {Enter}
  14174. winwait, - InstallShield Wizard, Click Install to begin
  14175. send {Enter}
  14176. winwait, - InstallShield Wizard, EA Download Manager
  14177. ControlClick Yes, - InstallShield Wizard
  14178. send {Enter}
  14179. }
  14180. winwait, - InstallShield Wizard, Complete
  14181. if ( w_opt_unattended > 0 ) {
  14182. ControlClick View the readme file, - InstallShield Wizard
  14183. ControlClick Finish, - InstallShield Wizard
  14184. }
  14185. winwaitclose
  14186. "
  14187. w_umount
  14188. # DVD Region code is last digit.
  14189. # FIXME: download appropriate one rather than just US version.
  14190. w_download http://akamai.cdn.ea.com/eadownloads/u/f/sims/sims3/patches/TS3_1.19.44.010001_Update.exe 7d21a81aaea70bf102267456df4629ce68be0cc8
  14191. cd "$W_CACHE"/$W_PACKAGE
  14192. w_ahk_do "
  14193. run TS3_1.19.44.010001_Update.exe
  14194. SetTitleMatchMode, 2
  14195. winwait, - InstallShield Wizard, Complete
  14196. if ( w_opt_unattended > 0 ) {
  14197. ControlClick Finish, - InstallShield Wizard
  14198. }
  14199. winwaitclose
  14200. "
  14201. }
  14202. #----------------------------------------------------------------
  14203. w_metadata simsmed games \
  14204. title="The Sims Medieval (drm broken on wine)" \
  14205. publisher="EA" \
  14206. year="2011" \
  14207. media="dvd" \
  14208. file1="TSimsM.iso" \
  14209. installed_exe1="$W_PROGRAMS_X86_WIN/Electronic Arts/The Sims Medieval/Game/Bin/TSM.exe" \
  14210. wine_showstoppers="26273"
  14211. load_simsmed()
  14212. {
  14213. w_read_key
  14214. w_mount TSimsM
  14215. # Default lang, USA, accept defaults, uncheck EA dl mgr, uncheck readme
  14216. w_ahk_do "
  14217. SetTitleMatchMode, 2
  14218. SetWinDelay 1000
  14219. run ${W_ISO_MOUNT_LETTER}:SimsMedievalSetup.exe
  14220. winwait, Choose Setup Language
  14221. if ( w_opt_unattended > 0 ) {
  14222. send {Enter}
  14223. SetTitleMatchMode, 2
  14224. winwait, - InstallShield Wizard
  14225. ControlClick &Next >, - InstallShield Wizard
  14226. sleep 1000
  14227. send uuuuuu{Tab}{Tab}{Enter}
  14228. WinWait, Sims, License
  14229. ControlClick Button3 ; Accept
  14230. sleep 1000
  14231. ControlClick Button1 ; Next
  14232. sleep 1000
  14233. send {Raw}$W_KEY
  14234. send {Enter}
  14235. winwait, - InstallShield Wizard, Setup Type
  14236. ControlClick &Complete ; was not defaulting to complete?
  14237. send {Enter}
  14238. winwait, - InstallShield Wizard, Click Install to begin
  14239. send {Enter}
  14240. ; Handle optional dialogs
  14241. ; In Wine-1.3.16 and lower, before
  14242. ; http://www.winehq.org/pipermail/wine-cvs/2011-March/076262.html,
  14243. ; wine didn't claim to already have .net 4 installed,
  14244. ; and ran into bug 25535.
  14245. Loop
  14246. {
  14247. ; .net 4 install sometimes fails nicely
  14248. ifWinExist,, .NET Framework 4 has not been installed
  14249. {
  14250. ControlClick Button3 ; Finish
  14251. }
  14252. ; .net 4 install sometimes explodes
  14253. ifWinExist .NET Framework Initialization Error
  14254. {
  14255. send {Enter}
  14256. }
  14257. ifWinExist, Sims, Customer Experience Improvement
  14258. {
  14259. send {Enter} ; Next
  14260. }
  14261. ifWinExist, - InstallShield Wizard, Complete
  14262. break
  14263. sleep 1000
  14264. }
  14265. }
  14266. winwait, - InstallShield Wizard, Complete
  14267. if ( w_opt_unattended > 0 ) {
  14268. ControlClick Button1 ; Do not view readme
  14269. send {Enter} ; Finish
  14270. }
  14271. winwaitclose
  14272. "
  14273. # DVD Region code is last digit.
  14274. # FIXME: download appropriate one rather than just US version.
  14275. w_download http://akamai.cdn.ea.com/eadownloads/u/f/sims/sims/patches/TheSimsMedievalPatch_1.1.10.00001_Update.exe 7214ced8af7315741e05024faeacf9053b999b1b
  14276. cd "$W_CACHE"/$W_PACKAGE
  14277. w_ahk_do "
  14278. SetTitleMatchMode, 2
  14279. SetWinDelay 500
  14280. run TheSimsMedievalPatch_1.1.10.00001_Update.exe
  14281. winwait, Medieval, will reset any in-progress quests
  14282. send {Enter}
  14283. winwait, Medieval, Welcome
  14284. if ( w_opt_unattended > 0 ) {
  14285. send {Enter}
  14286. }
  14287. winwait, - InstallShield Wizard, Complete
  14288. if ( w_opt_unattended > 0 ) {
  14289. ControlClick Finish, - InstallShield Wizard
  14290. }
  14291. winwaitclose
  14292. "
  14293. }
  14294. #----------------------------------------------------------------
  14295. w_metadata sims3_gen games \
  14296. title="The Sims 3: Generations (drm broken on Wine)" \
  14297. publisher="EA" \
  14298. year="2011" \
  14299. media="dvd" \
  14300. file1="Sims3EP04.iso" \
  14301. installed_exe1="$W_PROGRAMS_X86_WIN/Electronic Arts/The Sims 3 Generations/Game/Bin/TS3EP04.exe" \
  14302. wine_showstoppers="26273"
  14303. load_sims3_gen()
  14304. {
  14305. if [ ! -f "$W_PROGRAMS_X86_WIN/Electronic Arts/The Sims 3/Game/Bin/TS3.exe" ]
  14306. then
  14307. w_die "You must have sims3 installed to install sims3_gen!"
  14308. fi
  14309. w_read_key
  14310. w_mount Sims3EP04
  14311. # Default lang, USA, accept defaults, uncheck EA dl mgr, uncheck readme
  14312. w_ahk_do "
  14313. SetTitleMatchMode, 2
  14314. SetWinDelay 1000
  14315. run ${W_ISO_MOUNT_LETTER}:Sims3EP04Setup.exe
  14316. winwait, - InstallShield Wizard
  14317. if ( w_opt_unattended > 0 ) {
  14318. send {Enter}
  14319. loop
  14320. {
  14321. SetTitleMatchMode, 2
  14322. ifwinexist, - InstallShield Wizard, Setup will now attempt to update
  14323. {
  14324. ControlClick, Button1, - InstallShield Wizard
  14325. sleep 1000
  14326. winwait, - InstallShield Wizard, Setup has finished updating The Sims
  14327. sleep 1000
  14328. controlclick, Button1, - InstallShield Wizard
  14329. sleep 1000
  14330. }
  14331. ifwinexist, Sims, License
  14332. {
  14333. winactivate, Sims, License
  14334. sleep 1000
  14335. ControlClick, Button3
  14336. sleep 1000
  14337. ControlClick, Button1
  14338. sleep 1000
  14339. break
  14340. }
  14341. sleep 1000
  14342. }
  14343. winwait, Sims, Please enter the entire Registration Code
  14344. sleep 1000
  14345. send {Raw}$W_KEY
  14346. send {Enter}
  14347. winwait, - InstallShield Wizard, Setup Type
  14348. ControlClick &Complete ; was not defaulting to complete?
  14349. send {Enter}
  14350. winwait, - InstallShield Wizard, Click Install to begin
  14351. send {Enter}
  14352. winwait, - InstallShield Wizard, Would you like to install the latest
  14353. sleep 1000
  14354. ControlClick, Button4 ; No thanks
  14355. sleep 1000
  14356. ControlClick, Button1
  14357. sleep 1000
  14358. }
  14359. winwait, - InstallShield Wizard, Complete
  14360. if ( w_opt_unattended > 0 ) {
  14361. ControlClick Button1 ; Do not view readme
  14362. send {Enter} ; Finish
  14363. }
  14364. winwaitclose
  14365. "
  14366. }
  14367. #----------------------------------------------------------------
  14368. w_metadata splitsecond games \
  14369. title="Split Second" \
  14370. publisher="Disney" \
  14371. year="2010" \
  14372. media="dvd" \
  14373. file1="SplitSecond.iso" \
  14374. installed_exe1="$W_PROGRAMS_X86_WIN/Disney Interactive Studios/Split Second/SplitSecond.exe"
  14375. load_splitsecond()
  14376. {
  14377. # Key is used in first run activation, no need to read it here.
  14378. w_mount SplitSecond
  14379. # Aborts with dialog about FirewallInstallHelper.dll if that's not on the path (e.g. in current dir)
  14380. cd "$W_ISO_MOUNT_ROOT"
  14381. w_ahk_do "
  14382. SetTitleMatchMode, 2
  14383. run setup.exe
  14384. winwait, Split, Language
  14385. sleep 500
  14386. ControlClick, Next, Split, Language ; FIXME: Use button name
  14387. winwait, Split, game installation
  14388. sleep 500
  14389. ControlClick, Button1, Split, game installation
  14390. winwait, Split, license
  14391. sleep 500
  14392. ControlClick, Button5, Split, license
  14393. sleep 500
  14394. ControlClick, Button2, Split, license
  14395. winwait, Split, DirectX
  14396. sleep 500
  14397. ControlClick, Button5, Split, DirectX
  14398. sleep 500
  14399. ControlClick, Button2, Split, DirectX
  14400. winwait, Split, installation method
  14401. sleep 500
  14402. controlclick, Next, Split, installation method ; FIXME: Use button name
  14403. winwait, DirectX needs to be updated
  14404. sleep 500
  14405. send {Enter}
  14406. winwait, Split, begin
  14407. sleep 500
  14408. ControlClick, Button1
  14409. winwait, Split, completed
  14410. sleep 500
  14411. ControlClick, Button1, Split
  14412. sleep 500
  14413. ControlClick, Button4, Split
  14414. "
  14415. }
  14416. #----------------------------------------------------------------
  14417. w_metadata splitsecond_demo games \
  14418. title="Split Second Demo" \
  14419. publisher="Disney" \
  14420. year="2010" \
  14421. media="manual_download" \
  14422. file1="SplitSecondDemo_FilePlanet.exe" \
  14423. installed_exe1="$W_PROGRAMS_X86_WIN/Disney Interactive Studios/Split Second/SplitSecondDEMO.exe"
  14424. load_splitsecond_demo()
  14425. {
  14426. w_download_manual http://www.fileplanet.com/212404/210000/fileinfo/Split/Second-Demo SplitSecondDemo_FilePlanet.exe 72b070712cfe951297263fae143521b45dae16b4
  14427. if w_workaround_wine_bug 22774 "" 1.3.0
  14428. then
  14429. w_warn "On wine, install takes an extra 7 minutes at the end, please be patient."
  14430. fi
  14431. cd "$W_CACHE/$W_PACKAGE"
  14432. w_ahk_do "
  14433. SetTitleMatchMode, 2
  14434. run, SplitSecondDemo_FilePlanet.exe
  14435. winwait, Split, Language
  14436. ;ControlClick, Next, Split, Language ; does not quite work, have to use {Enter} instead
  14437. Send {Enter}
  14438. winwait, Split, game installation
  14439. ControlClick, Button1, Split, game installation
  14440. winwait, Split, license
  14441. ControlClick, Button5, Split, license
  14442. ControlClick, Button2, Split, license
  14443. winwait, Split, DirectX
  14444. ControlClick, Button5, Split, DirectX
  14445. ControlClick, Button2, Split, DirectX
  14446. winwait, Split, installation path
  14447. ControlClick, Button1, Split, installation path
  14448. winwait, Split, Game features
  14449. ControlClick, Button2, Split, Game features
  14450. winwait, Split, start copying
  14451. ControlClick, Button1, Split, start copying
  14452. winwait, Split, completed
  14453. ControlClick, Button1, Split, completed
  14454. ControlClick, Button4, Split, completed
  14455. "
  14456. }
  14457. #----------------------------------------------------------------
  14458. w_metadata spore games \
  14459. title="Spore" \
  14460. publisher="EA" \
  14461. year="2008" \
  14462. media="dvd" \
  14463. file1="SPORE.iso" \
  14464. installed_exe1="$W_PROGRAMS_X86_WIN/Electronic Arts/SPORE/Sporebin/SporeApp.exe"
  14465. load_spore()
  14466. {
  14467. w_mount SPORE
  14468. w_read_key
  14469. w_ahk_do "
  14470. SetTitleMatchMode, 2
  14471. run, ${W_ISO_MOUNT_LETTER}:SPORESetup.exe
  14472. winwait, Language
  14473. if ( w_opt_unattended > 0 ) {
  14474. sleep 500
  14475. controlclick, Button1
  14476. winwait, SPORE, Welcome
  14477. sleep 500
  14478. controlclick, Button1
  14479. winwait, SPORE, License
  14480. sleep 500
  14481. controlclick, Button3
  14482. sleep 500
  14483. controlclick, Button1
  14484. winwait, SPORE, Registration Code
  14485. send {RAW}$W_KEY
  14486. sleep 500
  14487. controlclick, Button2
  14488. winwait, SPORE, Setup Type
  14489. sleep 500
  14490. controlclick, Button6
  14491. winwait, SPORE, Shortcut
  14492. sleep 500
  14493. controlclick, Button6
  14494. winwait, SPORE, begin
  14495. sleep 500
  14496. controlclick, Button1
  14497. winwait, Question
  14498. ; download managers are usually a pain, so always say no to such questions
  14499. sleep 500
  14500. controlclick, Button2
  14501. }
  14502. winwait, SPORE, complete
  14503. sleep 500
  14504. if ( w_opt_unattended > 0 ) {
  14505. controlclick, Button1
  14506. sleep 500
  14507. controlclick, Button2
  14508. sleep 500
  14509. controlclick, Button4
  14510. }
  14511. winwaitclose, SPORE, complete
  14512. "
  14513. }
  14514. #----------------------------------------------------------------
  14515. w_metadata spore_cc_demo games \
  14516. title="Spore Creature Creator trial" \
  14517. publisher="EA" \
  14518. year="2008" \
  14519. media="download" \
  14520. file1="792248d6ad421d577132c2b648bbed45_scc_trial_na.exe" \
  14521. installed_exe1="$W_PROGRAMS_X86_WIN/Electronic Arts/SPORE/Sporebin/SporeCreatureCreator.exe"
  14522. load_spore_cc_demo()
  14523. {
  14524. w_download http://lvlt.bioware.cdn.ea.com/u/f/eagames/spore/scc/promo/792248d6ad421d577132c2b648bbed45_scc_trial_na.exe 06da5558e6ebbc39d2fac955eceab78cf8470e07
  14525. w_info "The installer runs on for about a minute after it's done."
  14526. cd "$W_CACHE/$W_PACKAGE"
  14527. if test "$W_OPT_UNATTENDED"
  14528. then
  14529. w_ahk_do "
  14530. SetWinDelay 1000
  14531. SetTitleMatchMode, 2
  14532. run $file1
  14533. winwait, Wizard, Welcome to the SPORE
  14534. send N
  14535. winwait, Wizard, Please read the following
  14536. send a
  14537. send N
  14538. winwait, Wizard, your setup
  14539. send N
  14540. winwait, Wizard, options below
  14541. send N
  14542. winwait, Wizard, We're ready
  14543. ;send i ; didn't take once?
  14544. ControlClick, Button1
  14545. winwait, Question, do not install the latest
  14546. send N ; reject EA Download Manager
  14547. winwait, Wizard, Launch
  14548. send {SPACE}{DOWN}{SPACE}{ENTER}
  14549. winwaitclose
  14550. "
  14551. while ps | grep $file1 | grep -v grep > /dev/null
  14552. do
  14553. w_info "Waiting for installer to finish."
  14554. sleep 2
  14555. done
  14556. else
  14557. w_try "$WINE" "$file1"
  14558. fi
  14559. }
  14560. #----------------------------------------------------------------
  14561. w_metadata starcraft2_demo games \
  14562. title="Starcraft II Demo" \
  14563. publisher="Blizzard" \
  14564. year="2010" \
  14565. media="manual_download" \
  14566. file1="SC2-WingsOfLiberty-enUS-Demo-Installer.zip" \
  14567. installed_exe1="$W_PROGRAMS_X86_WIN/StarCraft II Demo/StarCraft II.exe"
  14568. load_starcraft2_demo()
  14569. {
  14570. w_download_manual http://www.fileplanet.com/217982/210000/fileinfo/Starcraft-2-Demo SC2-WingsOfLiberty-enUS-Demo-Installer.zip 4c06ad755fbde73f135a7359bf6bfdbd2c6eb00e
  14571. cd "$W_TMP"
  14572. w_try_unzip . "$W_CACHE/$W_PACKAGE"/SC2-WingsOfLiberty-enUS-Demo-Installer.zip
  14573. w_ahk_do "
  14574. SetTitleMatchMode, 2
  14575. Run, Installer.exe
  14576. WinWait, StarCraft II Installer
  14577. if ( w_opt_unattended > 0 ) {
  14578. sleep 500
  14579. ControlClick, x300 y200
  14580. winwait, End User License Agreement
  14581. winactivate
  14582. ;MouseMove, 300, 300
  14583. ;Click WheelDown, 70
  14584. Sleep, 1000
  14585. ControlClick, Button2 ; Accept
  14586. winwaitclose
  14587. winwait, StarCraft II Installer
  14588. sleep 1000
  14589. ControlClick, x800 y500
  14590. ; Is there any better wait to await completion?
  14591. Loop {
  14592. PixelGetColor, color, 473, 469 ; the 1 in 100%
  14593. ; The digits are drawn white, but because the whole
  14594. ; window is flickering, it cycles through about 20
  14595. ; brightnesses. Check a bunch of them to reduce
  14596. ; chances of getting stuck for a long time.
  14597. ifEqual, color, 0xffffff
  14598. break
  14599. ifEqual, color, 0xf4f4f4
  14600. break
  14601. ifEqual, color, 0xf1f1f1
  14602. break
  14603. ifEqual, color, 0xf0f0f0
  14604. break
  14605. ifEqual, color, 0xeeeeee
  14606. break
  14607. ifEqual, color, 0xebebeb
  14608. break
  14609. ifEqual, color, 0xe4e4e4
  14610. break
  14611. sleep 500 ; changes rapidly, so sample often
  14612. }
  14613. ControlClick, x800 y500 ; Finish
  14614. winwaitclose
  14615. ; no way to tell game to not start?
  14616. process, wait, SC2.exe
  14617. sleep 2000
  14618. process, close, SC2.exe
  14619. }
  14620. "
  14621. }
  14622. #----------------------------------------------------------------
  14623. w_metadata theundergarden_demo games \
  14624. title="The UnderGarden Demo" \
  14625. publisher="Atari" \
  14626. year="2010" \
  14627. media="manual_download" \
  14628. file1="TheUnderGarden_PC_B34_SRTB.30_28OCT10.exe" \
  14629. installed_exe1="$W_PROGRAMS_X86_WIN/The UnderGarden/TheUndergarden.exe"
  14630. load_theundergarden_demo()
  14631. {
  14632. w_download_manual http://www.bigdownload.com/games/the-undergarden/pc/the-undergarden-demo TheUnderGarden_PC_B34_SRTB.30_28OCT10.exe acf90c422ac2f2f242100f39bedfe7df0c95f7a
  14633. cd "$W_CACHE/$W_PACKAGE"
  14634. w_ahk_do "
  14635. SetTitleMatchMode, 2
  14636. Run, TheUnderGarden_PC_B34_SRTB.30_28OCT10.exe
  14637. WinWait,WinRAR
  14638. if ( w_opt_unattended > 0 ) {
  14639. Sleep 500
  14640. ControlClick Button2 ; Install
  14641. WinWait,Select Setup Language, during
  14642. Sleep 500
  14643. ControlClick TNewButton1 ;OK
  14644. WinWait,Setup - The UnderGarden, your
  14645. Sleep 500
  14646. ControlClick TNewButton1 ;OK
  14647. WinWait,Setup - The UnderGarden, License
  14648. Sleep 500
  14649. ControlClick TNewRadioButton1 ; accept
  14650. Sleep 500
  14651. ControlClick TNewButton2 ; Next
  14652. WinWait,Setup - The UnderGarden, different
  14653. Sleep 500
  14654. ControlClick TNewButton3 ;Next
  14655. WinWait,Setup - The UnderGarden, shortcuts
  14656. Sleep 500
  14657. ControlClick TNewButton4 ;OK
  14658. WinWait,Setup - The UnderGarden, additional
  14659. Sleep 500
  14660. ControlFocus,TNewCheckListBox1,desktop
  14661. Sleep 500
  14662. Send {Space}
  14663. Sleep 500
  14664. ControlClick TNewButton4 ; Next
  14665. WinWait,Setup - The UnderGarden, review
  14666. Sleep 500
  14667. ControlClick TNewButton4 ;Install
  14668. WinWait,Microsoft Visual C, Visual
  14669. Sleep 500
  14670. ControlClick Button13 ;Cancel
  14671. WinWait,Microsoft Visual C, want
  14672. Sleep 500
  14673. ControlClick Button1 ;Yes
  14674. WinWait,Microsoft Visual C, chosen
  14675. Sleep 500
  14676. ControlClick Button2 ;Finish
  14677. WinWait,Framework 3, Press
  14678. Sleep 500
  14679. ControlClick Button21 ;Cancel
  14680. WinWait,Framework 3, want
  14681. Sleep 500
  14682. ControlClick Button1 ;Yes
  14683. WinWait,Installing Microsoft, Runtime
  14684. Sleep 500
  14685. ControlClick Button6 ;Cancel
  14686. }
  14687. WinWait,Setup,launched
  14688. if ( w_opt_unattended > 0 ) {
  14689. Sleep 500
  14690. ControlClick TNewButton4 ;Finish
  14691. }
  14692. WinWaitClose,Setup,launched
  14693. "
  14694. }
  14695. #----------------------------------------------------------------
  14696. w_metadata tmnationsforever games \
  14697. title="TrackMania Nations Forever" \
  14698. publisher="Nadeo" \
  14699. year="2009" \
  14700. media="download" \
  14701. file1="tmnationsforever_setup.exe" \
  14702. installed_exe1="$W_PROGRAMS_X86_WIN/TmNationsForever/TmForever.exe"
  14703. load_tmnationsforever()
  14704. {
  14705. # Before: cab0cf66db0471bc2674a3b1aebc35de0bca6ed0
  14706. # 29 Mar 2011: 23388798d5c90ad4a233b4cd7e9fcafd69756978
  14707. w_download "http://files.trackmaniaforever.com/tmnationsforever_setup.exe" 23388798d5c90ad4a233b4cd7e9fcafd69756978
  14708. cd "$W_CACHE/$W_PACKAGE"
  14709. w_ahk_do "
  14710. SetTitleMatchMode, 2
  14711. Run, tmnationsforever_setup.exe
  14712. WinWait,Select Setup Language
  14713. if ( w_opt_unattended > 0 ) {
  14714. Sleep 1000
  14715. ControlClick TNewButton1 ; OK
  14716. WinWait,Setup - TmNationsForever,Welcome
  14717. Sleep 1000
  14718. ControlClick TNewButton1 ; Next
  14719. WinWait,Setup - TmNationsForever,License
  14720. Sleep 1000
  14721. ControlClick TNewRadioButton1 ; Accept
  14722. Sleep 1000
  14723. ControlClick TNewButton2 ; Next
  14724. WinWait,Setup - TmNationsForever,Where
  14725. Sleep 1000
  14726. ControlClick TNewButton3 ; Next
  14727. WinWait,Setup - TmNationsForever,shortcuts
  14728. Sleep 1000
  14729. ControlClick TNewButton4 ; Next
  14730. WinWait,Setup - TmNationsForever,perform
  14731. Sleep 1000
  14732. ControlClick TNewButton4 ; Next
  14733. WinWait,Setup - TmNationsForever,installing
  14734. Sleep 1000
  14735. ControlClick TNewButton4 ; Install
  14736. }
  14737. WinWait,Setup - TmNationsForever,finished
  14738. if ( w_opt_unattended > 0 ) {
  14739. Sleep 1000
  14740. ControlFocus, TNewCheckListBox1, TmNationsForever, finished
  14741. Sleep 1000
  14742. Send {Space} ; don't start game
  14743. ControlClick TNewButton4 ; Finish
  14744. }
  14745. WinWaitClose
  14746. "
  14747. }
  14748. #----------------------------------------------------------------
  14749. w_metadata trainztcc_2004 games \
  14750. title="Trainz: The Complete Collection: TRS2004" \
  14751. publisher="Paradox Interactive" \
  14752. year="2008" \
  14753. media="dvd" \
  14754. file1="TRS2006DVD.iso" \
  14755. installed_exe1="$W_PROGRAMS_X86_WIN/Auran/TRS2004/TRS2004.exe"
  14756. load_trainztcc_2004()
  14757. {
  14758. w_call mfc42
  14759. w_read_key
  14760. # yup, they got the volume name wrong
  14761. w_mount TRS2006DVD
  14762. cd ${W_ISO_MOUNT_ROOT}/TRS2004_SP4_DVD_Installer_BUILD_2370/Installer/Disk1
  14763. w_ahk_do "
  14764. SetTitleMatchMode, 2
  14765. SetWinDelay 500
  14766. run setup.exe
  14767. if ( w_opt_unattended > 0 ) {
  14768. winwait TRS2004 Setup, Please install the latest drivers
  14769. send {Enter}
  14770. winwait TRS2004, Welcome
  14771. send {Enter}
  14772. winwait TRS2004, License
  14773. ControlClick Button2
  14774. winwait TRS2004, serial
  14775. winactivate
  14776. send ${W_RAW_KEY}{Enter}
  14777. winwait TRS2004, Destination
  14778. send {Enter}
  14779. winwait Install DirectX
  14780. send n
  14781. winwait Windows Update, Your computer already
  14782. send {Enter}
  14783. }
  14784. winwait TRS2004, Complete
  14785. if ( w_opt_unattended > 0 ) {
  14786. send {Space} ; uncheck View Readme
  14787. send {Enter} ; Finish
  14788. }
  14789. winwaitclose
  14790. "
  14791. # And, while we're at it, also install the accompanying paint shed app
  14792. cd ${W_ISO_MOUNT_ROOT}/TRAINZ_PAINTSHED
  14793. w_ahk_do "
  14794. SetTitleMatchMode, 2
  14795. SetWinDelay 500
  14796. run Trainz_Paint_Shed_Setup.exe
  14797. if ( w_opt_unattended > 0 ) {
  14798. winwait Trainz Paint Shed, Welcome
  14799. send {Enter}
  14800. winwait Trainz Paint Shed, License
  14801. send a ; accept
  14802. send {Enter} ; Next
  14803. winwait Trainz Paint Shed, Destination
  14804. send {Enter}
  14805. winwait Trainz Paint Shed, Install
  14806. send {Enter}
  14807. }
  14808. winwait Trainz Paint Shed, Complete
  14809. if ( w_opt_unattended > 0 ) {
  14810. send {Enter} ; Finish
  14811. }
  14812. winwaitclose
  14813. "
  14814. }
  14815. #----------------------------------------------------------------
  14816. w_metadata sammax301_demo games \
  14817. title="Sam & Max 301: The Penal Zone" \
  14818. publisher="Telltale Games" \
  14819. year="2010" \
  14820. media="manual_download" \
  14821. file1="SamMax301_PC_Setup.exe" \
  14822. installed_exe1="$W_PROGRAMS_X86_WIN/Telltale Games/Sam and Max - The Devil's Playhouse/The Penal Zone/SamMax301.exe"
  14823. load_sammax301_demo()
  14824. {
  14825. w_download_manual "http://www.fileplanet.com/211314/210000/fileinfo/Sam-&-Max:-Devil's-Playhouse---Episode-One-Demo" SamMax301_PC_Setup.exe 83f47b7f3a5074a6e29bdc9b4f1fd2c4471d9641
  14826. cd "$W_CACHE/$W_PACKAGE"
  14827. w_ahk_do "
  14828. SetTitleMatchMode, 2
  14829. SetWinDelay 500
  14830. run SamMax301_PC_Setup.exe
  14831. winwait Sam and Max The Penal Zone Setup, Welcome
  14832. if ( w_opt_unattended > 0 ) {
  14833. controlclick button2 ; Next
  14834. winwait Sam and Max The Penal Zone Setup, DirectX
  14835. controlclick button5 ; Uncheck check directx
  14836. controlclick button2 ; Next
  14837. winwait Sam and Max The Penal Zone Setup, License
  14838. controlclick button2 ; I Agree
  14839. winwait Sam and Max The Penal Zone Setup, Location
  14840. controlclick button2 ; Install
  14841. winwait Sam and Max The Penal Zone Setup, Finish
  14842. controlclick button4 ; Uncheck play now
  14843. controlclick button5 ; Uncheck create shortcut
  14844. controlclick button2 ; Finish
  14845. }
  14846. winwaitclose Sam and Max The Penal Zone Setup
  14847. "
  14848. }
  14849. #----------------------------------------------------------------
  14850. w_metadata sammax304_demo games \
  14851. title="Sam & Max 304: Beyond the Alley of the Dolls" \
  14852. publisher="Telltale Games" \
  14853. year="2010" \
  14854. media="manual_download" \
  14855. file1="SamMax304_PC_setup.exe" \
  14856. installed_exe1="$W_PROGRAMS_X86_WIN/Telltale Games/Sam and Max - The Devil's Playhouse/Beyond the Alley of the Dolls/SamMax304.exe"
  14857. load_sammax304_demo()
  14858. {
  14859. w_download_manual "http://www.fileplanet.com/214770/210000/fileinfo/Sam-&-Max:-The-Devi's-Playhouse---Beyond-the-Alley-of-the-Dolls-Demo" SamMax304_PC_setup.exe 1a385a1f1e83770c973e6457b923b7a44bbe44d8
  14860. cd "$W_CACHE/$W_PACKAGE"
  14861. w_ahk_do "
  14862. SetTitleMatchMode, 2
  14863. Run, $file1
  14864. WinWait,Sam and Max Beyond the Alley of the Dolls Setup
  14865. if ( w_opt_unattended > 0 ) {
  14866. ControlClick Button2 ; Next
  14867. WinWait,Sam and Max Beyond the Alley of the Dolls Setup,DirectX
  14868. ControlClick Button2 ; Next - Directx check defaulted
  14869. WinWait,Sam and Max Beyond the Alley of the Dolls Setup,License
  14870. ControlClick Button2 ; Agree
  14871. WinWait,Sam and Max Beyond the Alley of the Dolls Setup,Location
  14872. ControlClick Button2 ; Install
  14873. WinWait,Sam and Max Beyond the Alley of the Dolls Setup,Finish
  14874. ControlClick Button4 ; Uncheck Play Now
  14875. ControlClick Button2 ; Finish
  14876. }
  14877. WinWaitClose
  14878. "
  14879. }
  14880. #----------------------------------------------------------------
  14881. w_metadata tropico3_demo games \
  14882. title="Tropico 3 Demo" \
  14883. publisher="Kalypso Media GmbH" \
  14884. year="2009" \
  14885. media="manual_download" \
  14886. file1="Tropico3Demo.exe" \
  14887. installed_exe1="$W_PROGRAMS_X86_WIN/Kalypso/Tropico 3 Demo/Tropico3 Demo.exe"
  14888. load_tropico3_demo()
  14889. {
  14890. w_download_manual "http://www.tropico3.com/?p=downloads" Tropico3Demo.exe e031749db346ac3a87a675787c81eb1ca8cb5909
  14891. cd "$W_CACHE/$W_PACKAGE"
  14892. w_ahk_do "
  14893. SetWinDelay 1000
  14894. SetTitleMatchMode, 2
  14895. Run, Tropico3Demo.exe
  14896. WinWait,Installer
  14897. if ( w_opt_unattended > 0 ) {
  14898. ControlClick Button1 ; OK
  14899. WinWait,Tropico,Welcome
  14900. ControlClick Button2 ; Next
  14901. WinWait,Tropico,License
  14902. ControlClick Button2 ; Agree
  14903. WinWait,Tropico,Typical
  14904. ControlClick Button2 ; Next
  14905. }
  14906. WinWait,Tropico,Completing
  14907. if ( w_opt_unattended > 0 ) {
  14908. ControlClick Button4 ; Uncheck Run Now
  14909. ControlClick Button2 ; Finish
  14910. }
  14911. WinWaitClose
  14912. "
  14913. }
  14914. #----------------------------------------------------------------
  14915. w_metadata singularity games \
  14916. title="Singularity" \
  14917. publisher="Activision" \
  14918. year="2010" \
  14919. media="dvd" \
  14920. file1="SNG_DVD.iso"
  14921. load_singularity()
  14922. {
  14923. w_read_key
  14924. w_mount SNG_DVD
  14925. w_ahk_do "
  14926. run ${W_ISO_MOUNT_LETTER}:setup.exe
  14927. winwait, Activision(R) - InstallShield, Select the language for the installation from the choices below.
  14928. if ( w_opt_unattended > 0 ) {
  14929. sleep 1000
  14930. controlclick, Button1, Activision(R) - InstallShield, Select the language for the installation from the choices below.
  14931. sleep 1000
  14932. winwait, Singularity(TM), Keycode Check
  14933. sleep 1000
  14934. Send $W_KEY
  14935. sleep 1000
  14936. Send {Enter}
  14937. ; Well this is annoying...
  14938. Winwait, Keycode Check, The Keycode you entered appears to be valid.
  14939. sleep 1000
  14940. Send {Enter}
  14941. winwait, Singularity(TM), The InstallShield Wizard will install Singularity(TM) on your computer
  14942. sleep 1000
  14943. controlclick, Button1, Singularity(TM), The InstallShield Wizard will install Singularity(TM) on your computer
  14944. winwait, Singularity(TM), Please read the following license agreement carefully
  14945. sleep 1000
  14946. controlclick, Button5, Singularity(TM), Please read the following license agreement carefully
  14947. sleep 1000
  14948. controlclick, Button2, Singularity(TM), Please read the following license agreement carefully
  14949. winwait, Singularity(TM), Minimum System Requirements
  14950. sleep 1000
  14951. controlclick, Button1, Singularity(TM), Minimum System Requirements
  14952. winwait, Singularity(TM), Select the setup type to install
  14953. controlclick, Button4, Singularity(TM), Select the setup type to install
  14954. }
  14955. ; Loop until installer window has been gone for at least two seconds
  14956. Loop
  14957. {
  14958. sleep 1000
  14959. IfWinExist, Singularity
  14960. continue
  14961. IfWinExist, Activision
  14962. continue
  14963. sleep 1000
  14964. IfWinExist, Singularity
  14965. continue
  14966. IfWinExist, Activision
  14967. continue
  14968. break
  14969. }
  14970. "
  14971. # Clean up crap left over in c:\ when the installer runs the vc 2008 redistributable installer
  14972. cd "$W_DRIVE_C"
  14973. rm -f VC_RED.* eula.*.txt globdata.ini install.exe install.ini install.res.*.dll vcredist.bmp
  14974. }
  14975. #----------------------------------------------------------------
  14976. w_metadata wglgears benchmarks \
  14977. title="wglgears" \
  14978. publisher="Clinton L. Jeffery" \
  14979. year="2005" \
  14980. media="download" \
  14981. file1="wglgears.exe" \
  14982. installed_exe1="$W_PROGRAMS_X86_WIN/misc/wglgears.exe"
  14983. load_wglgears()
  14984. {
  14985. w_download http://www2.cs.uidaho.edu/~jeffery/win32/wglgears.exe d65d2098bc11af76cb614946342913b1af62924d
  14986. mkdir -p "$W_PROGRAMS_X86_UNIX/misc"
  14987. cp "$W_CACHE"/wglgears/wglgears.exe "$W_PROGRAMS_X86_UNIX/misc"
  14988. chmod +x "$W_PROGRAMS_X86_UNIX/misc/wglgears.exe"
  14989. }
  14990. #----------------------------------------------------------------
  14991. w_metadata stalker_pripyat_bench benchmarks \
  14992. title="S.T.A.L.K.E.R Call of Pripyat benchmark" \
  14993. publisher="GSC Game World" \
  14994. year="2009" \
  14995. media="manual_download" \
  14996. file1="stkcop-bench-setup.exe" \
  14997. installed_exe1="$W_PROGRAMS_X86_WIN/Call Of Pripyat Benchmark/Benchmark.exe"
  14998. load_stalker_pripyat_bench()
  14999. {
  15000. # Much faster
  15001. w_download_manual http://www.bigdownload.com/games/stalker-call-of-pripyat/pc/stalker-call-of-pripyat-benchmark stkcop-bench-setup.exe 8691c3f289ecd0521bed60ffd46e65ad080206e0
  15002. #w_download http://files.gsc-game.com/st/bench/stkcop-bench-setup.exe 8691c3f289ecd0521bed60ffd46e65ad080206e0
  15003. cd "$W_CACHE/$W_PACKAGE"
  15004. # FIXME: a bit fragile, if you're browsing the web while installing, it sometimes gets stuck.
  15005. w_ahk_do "
  15006. SetTitleMatchMode, 2
  15007. run stkcop-bench-setup.exe
  15008. WinWait,Setup - Call Of Pripyat Benchmark
  15009. if ( w_opt_unattended > 0 ) {
  15010. sleep 1000
  15011. ControlClick TNewButton1 ; Next
  15012. WinWait,Setup - Call Of Pripyat Benchmark,License
  15013. sleep 1000
  15014. ControlClick TNewRadioButton1 ; accept
  15015. sleep 1000
  15016. ControlClick TNewButton2 ; Next
  15017. WinWait,Setup - Call Of Pripyat Benchmark,Destination
  15018. sleep 1000
  15019. ControlClick TNewButton3 ; Next
  15020. WinWait,Setup - Call Of Pripyat Benchmark,shortcuts
  15021. sleep 1000
  15022. ControlClick TNewButton4 ; Next
  15023. WinWait,Setup - Call Of Pripyat Benchmark,performed
  15024. sleep 1000
  15025. ControlClick TNewButton4 ; Next
  15026. WinWait,Setup - Call Of Pripyat Benchmark,ready
  15027. sleep 1000
  15028. ControlClick, TNewButton4 ; Next (nah, who reads doc?)
  15029. }
  15030. WinWait,Setup - Call Of Pripyat Benchmark,finished
  15031. if ( w_opt_unattended > 0 ) {
  15032. sleep 1000
  15033. Send {Space} ; uncheck launch
  15034. sleep 1000
  15035. ControlClick TNewButton4 ; Finish
  15036. }
  15037. WinWaitClose,Setup - Call Of Pripyat Benchmark,finished
  15038. "
  15039. if w_workaround_wine_bug 24868
  15040. then
  15041. w_call d3dx9_31
  15042. w_call d3dx9_42
  15043. fi
  15044. }
  15045. #----------------------------------------------------------------
  15046. w_metadata torchlight games \
  15047. title="Torchlight - boxed version" \
  15048. publisher="Runic Games" \
  15049. year="2009" \
  15050. media="dvd" \
  15051. file1="Torchlight.iso"
  15052. load_torchlight()
  15053. {
  15054. w_mount "Torchlight"
  15055. w_ahk_do "
  15056. SetTitleMatchMode, 2
  15057. Run, ${W_ISO_MOUNT_LETTER}:Torchlight.exe
  15058. WinWait, Torchlight Setup, This wizard will guide
  15059. if ( w_opt_unattended > 0 ) {
  15060. sleep 1000
  15061. ControlClick, Button2, Torchlight Setup, This wizard will guide
  15062. WinWait, Torchlight Setup, Please review the license terms
  15063. sleep 1000
  15064. ControlClick, Button2, Torchlight Setup, Please review the license terms
  15065. WinWait, Torchlight Setup, Choose Install Location
  15066. sleep 1000
  15067. ControlClick, Button2, Torchlight Setup, Choose Install Location
  15068. WinWait, Torchlight Setup, Installation Complete
  15069. sleep 1000
  15070. ControlClick, Button2, Torchlight Setup, Installation Complete
  15071. WinWait, Torchlight Setup, Completing the Torchlight Setup Wizard
  15072. sleep 1000
  15073. ControlClick, Button4, Torchlight Setup, Completing the Torchlight Setup Wizard
  15074. ControlClick, Button2, Torchlight Setup, Completing the Torchlight Setup Wizard
  15075. }
  15076. WinWaitClose, Torchlight Setup
  15077. "
  15078. }
  15079. #----------------------------------------------------------------
  15080. w_metadata twfc games \
  15081. title="Transformers: War for Cybertron" \
  15082. publisher="Activision" \
  15083. year="2010" \
  15084. media="dvd" \
  15085. file1="TWFC_DVD.iso"
  15086. load_twfc()
  15087. {
  15088. w_read_key
  15089. w_mount TWFC_DVD
  15090. w_ahk_do "
  15091. run ${W_ISO_MOUNT_LETTER}:setup.exe
  15092. SetTitleMatchMode, 2
  15093. winwait, Activision, Select the language for the installation
  15094. if ( w_opt_unattended > 0 ) {
  15095. sleep 1000
  15096. controlclick, Button1, Activision, Select the language for the installation
  15097. winwait, Transformers, Press NEXT to verify your key
  15098. sleep 1000
  15099. send $W_KEY
  15100. send {Enter}
  15101. winwait, Keycode Check, The Keycode you entered appears to be valid
  15102. sleep 1000
  15103. send {Enter}
  15104. winwait, Transformers, The InstallShield Wizard will install Transformers
  15105. sleep 1000
  15106. controlclick, Button1, Transformers, The InstallShield Wizard will install Transformers
  15107. winwait, Transformers, License Agreement
  15108. sleep 1000
  15109. controlclick, Button5, Transformers, License Agreement
  15110. sleep 1000
  15111. controlclick, Button2, Transformers, License Agreement
  15112. winwait, Transformers, Minimum System Requirements
  15113. sleep 1000
  15114. controlclick, Button1, Transformers, Minimum System Requirements
  15115. winwait, Transformers, Select the setup type to install
  15116. sleep 1000
  15117. controlclick, Button4, Transformers, Select the setup type to install
  15118. }
  15119. ; Installer exits silently. Prevent an early umount
  15120. Loop
  15121. {
  15122. sleep 1000
  15123. IfWinExist, Transformers
  15124. continue
  15125. IfWinExist, Activision
  15126. continue
  15127. sleep 1000
  15128. IfWinExist, Transformers
  15129. continue
  15130. IfWinExist, Activision
  15131. continue
  15132. break
  15133. }
  15134. "
  15135. # Clean up crap left over in c:\ when the installer runs the vc 2008 redistributable installer
  15136. cd "$W_DRIVE_C"
  15137. rm -f VC_RED.* eula.*.txt globdata.ini install.exe install.ini install.res.*.dll vcredist.bmp
  15138. }
  15139. #----------------------------------------------------------------
  15140. w_metadata typingofthedead_demo games \
  15141. title="Typing of the Dead Demo" \
  15142. publisher="Sega" \
  15143. year="1999" \
  15144. media="manual_download" \
  15145. file1="Tod_e_demo.exe" \
  15146. installed_exe1="$W_PROGRAMS_X86_WIN/SEGA/TOD-Demo/Tod_e_demo.exe"
  15147. load_typingofthedead_demo()
  15148. {
  15149. w_download "http://www.fileplanet.com/54947/50000/fileinfo/The-Typing-of-the-Dead-Demo" 96fe3edb2431210932af840e29c59bce6b7fc80f
  15150. cd "$W_TMP"
  15151. w_try_unzip . "$W_CACHE/$W_PACKAGE/tod-demo.zip"
  15152. w_ahk_do "
  15153. SetTitleMatchMode, 2
  15154. run SETUP.EXE
  15155. if ( w_opt_unattended > 0 ) {
  15156. WinWait,InstallShield Wizard,where
  15157. sleep 1000
  15158. ControlClick Button1 ; Next
  15159. WinWait,InstallShield Wizard,icons
  15160. sleep 1000
  15161. ControlClick Button2 ; Next
  15162. }
  15163. ; installer crashes here?
  15164. Sleep 20000
  15165. "
  15166. }
  15167. #----------------------------------------------------------------
  15168. w_metadata ut3 games \
  15169. title="Unreal Tournament 3" \
  15170. publisher="Midway Games" \
  15171. year="2007" \
  15172. media="dvd" \
  15173. file1="UT3_RC7.iso" \
  15174. file2="UT3Patch5.exe" \
  15175. installed_exe1="$W_PROGRAMS_X86_WIN/Unreal Tournament 3/Binaries/UT3.exe"
  15176. load_ut3()
  15177. {
  15178. w_download_manual "http://www.filefront.com/13709855/UT3Patch5.exe" UT3Patch5.exe
  15179. w_try w_mount UT3_RC7
  15180. w_ahk_do "
  15181. run ${W_ISO_MOUNT_LETTER}:SetupUT3.exe
  15182. SetTitleMatchMode, slow ; else can't see EULA text
  15183. SetTitleMatchMode, 2
  15184. SetWinDelay 1000
  15185. WinWait, Choose Setup Language
  15186. if ( w_opt_unattended > 0 ) {
  15187. ControlClick Button1 ; OK
  15188. WinWait, Unreal Tournament 3, GAMESPY ; License Agreement
  15189. ControlClick Button2 ; Yes
  15190. WinWait, Unreal Tournament 3, UnrealEd ; License Agreement
  15191. ControlClick Button2 ; Yes
  15192. WinWait, , Choose Destination
  15193. ControlClick Button1 ; Next
  15194. WinWait, AGEIA PhysX v7.09.13 Setup, License
  15195. ControlClick Button3 ; Accept
  15196. sleep 1000
  15197. ControlClick Button4 ; Next
  15198. WinWait, AGEIA PhysX v7.09.13, Finish
  15199. ControlClick Button1 ; Finish
  15200. ; game now begins installing
  15201. }
  15202. WinWait, , InstallShield Wizard Complete
  15203. if ( w_opt_unattended > 0 ) {
  15204. ControlClick Button4 ; Finish
  15205. }
  15206. WinWaitClose
  15207. "
  15208. cd "$W_CACHE/$W_PACKAGE"
  15209. w_ahk_do "
  15210. SetTitleMatchMode, 2
  15211. run UT3Patch5.exe
  15212. WinWait, License
  15213. if ( w_opt_unattended > 0 ) {
  15214. ControlClick Button1 ; Accept
  15215. WinWait, End User License Agreement
  15216. ControlClick Button1 ; Accept
  15217. WinWait, Patch UT3
  15218. ControlClick Button1 ; Yes
  15219. }
  15220. WinWait, , UT3 was successfully patched!
  15221. if ( w_opt_unattended > 0 ) {
  15222. ControlClick Button1 ; OK
  15223. }
  15224. WinWaitClose
  15225. "
  15226. }
  15227. #----------------------------------------------------------------
  15228. w_metadata wog games \
  15229. title="World of Goo Demo" \
  15230. publisher="2D Boy" \
  15231. year="2008" \
  15232. media="download" \
  15233. file1="WorldOfGooDemo.1.0.exe" \
  15234. installed_exe1="$W_PROGRAMS_X86_WIN/WorldOfGooDemo/WorldOfGoo.exe"
  15235. load_wog()
  15236. {
  15237. if ! test -f "$W_CACHE/wog/WorldOfGooDemo.1.0.exe"
  15238. then
  15239. # Get temporary download location
  15240. w_download "http://www.worldofgoo.com/dl2.php?lk=demo&filename=WorldOfGooDemo.1.0.exe"
  15241. URL=`cat "$W_CACHE/wog/dl2.php?lk=demo&filename=WorldOfGooDemo.1.0.exe" |
  15242. grep WorldOfGooDemo.1.0.exe | sed 's,.*http,http,;s,".*,,'`
  15243. rm "$W_CACHE/wog/dl2.php?lk=demo&filename=WorldOfGooDemo.1.0.exe"
  15244. w_download "$URL" e61d8253b9fe0663cb3c69018bb3d2ec6152d488
  15245. fi
  15246. cd "$W_CACHE/$W_PACKAGE"
  15247. w_ahk_do "
  15248. SetWinDelay 500
  15249. run WorldOfGooDemo.1.0.exe
  15250. winwait, World of Goo Setup, License Agreement
  15251. if ( w_opt_unattended > 0 ) {
  15252. sleep 1000
  15253. WinActivate
  15254. send {Enter}
  15255. winwait, World of Goo Setup, Choose Components
  15256. send {Enter}
  15257. winwait, World of Goo Setup, Choose Install Location
  15258. send {Enter}
  15259. winwait, World of Goo Setup, Thank you
  15260. ControlClick, Make me dirty right now, World of Goo Setup, Thank you
  15261. send {Enter}
  15262. }
  15263. winwaitclose, World of Goo Setup
  15264. "
  15265. }
  15266. #----------------------------------------------------------------
  15267. w_metadata zootycoon2_demo games \
  15268. title="Zoo Tycoon 2 demo" \
  15269. publisher="Microsoft" \
  15270. year="2004" \
  15271. media="download" \
  15272. file1="Zoo2Trial.exe" \
  15273. installed_exe1="$W_PROGRAMS_X86_WIN/Microsoft Games/Zoo Tycoon 2 Trial Version/zt2demoretail.exe"
  15274. load_zootycoon2_demo()
  15275. {
  15276. w_download "http://download.microsoft.com/download/9/f/6/9f6a95f0-f34a-4312-9749-77b81d3de245/Zoo2Trial.exe" 60ad1bb34351f97b579c58234b926055f7979126
  15277. cd "$W_CACHE/$W_PACKAGE"
  15278. w_ahk_do "
  15279. ; Uses winwaitactive, because the windows appear and immediately after another window
  15280. ; gets in the way, then disappears after a second or so
  15281. SetTitleMatchMode, 2
  15282. run Zoo2Trial.exe
  15283. winwaitclose, APPMESSAGE
  15284. winwaitactive, Zoo Tycoon 2 Trial, AUTORUN
  15285. if ( w_opt_unattended > 0 ) {
  15286. sleep 1000
  15287. controlclick, CButtonClassName1, Zoo Tycoon 2 Trial, AUTORUN
  15288. winwaitclose, APPMESSAGE
  15289. winwaitactive, Zoo Tycoon 2 Trial, INSTALLTYPE
  15290. ; 1 second was not enough.
  15291. sleep 3000
  15292. controlclick, CButtonClassName1, Zoo Tycoon 2 Trial, INSTALLTYPE
  15293. }
  15294. winwaitactive, Zoo Tycoon 2 Trial, COMPLETE
  15295. winclose, Zoo Tycoon 2 Trial, COMPLETE
  15296. "
  15297. }
  15298. #----------------------------------------------------------------
  15299. # Gog.com games
  15300. #----------------------------------------------------------------
  15301. w_metadata beneath_a_steel_sky_gog games \
  15302. title="Beneath a Steel Sky (GOG.com, free)" \
  15303. publisher="Virgin Interactive" \
  15304. year="1994" \
  15305. file1="setup_beneath_a_steel_sky.exe" \
  15306. installed_exe1="$W_PROGRAMS_X86_WIN/GOG.com/Beneath a Steel Sky/ScummVM/scummvm.exe"
  15307. load_beneath_a_steel_sky_gog()
  15308. {
  15309. winetricks_load_gog "beneath_a_steel_sky" "Beneath a Steel Sky" "" "TsCheckBox4" "ScummVM\\scummvm.exe -c \"C:\\Program Files\\GOG.com\\Beneath a Steel Sky\\beneath.ini\" beneath" "" "" "75176395,1f99e12643529baa91fecfb206139a8921d9589c"
  15310. }
  15311. w_metadata sacrifice_gog games \
  15312. title="Sacrifice (GOG.com)" \
  15313. publisher="Interplay" \
  15314. year="2000" \
  15315. media="manual_download" \
  15316. file1="setup_sacrifice.exe" \
  15317. installed_exe1="$W_PROGRAMS_X86_WIN/GOG.com/Sacrifice/Sacrifice.exe"
  15318. load_sacrifice_gog()
  15319. {
  15320. winetricks_load_gog "sacrifice" "Sacrifice" "" "TsCheckBox2" "sacrifice" "" "" "591161642,63e77685599ce20c08b004a9fa3324e466ce1679"
  15321. }
  15322. w_metadata the_witcher_2_gog games \
  15323. title="The Witcher 2: Assassins of Kings" \
  15324. publisher="Atari" \
  15325. year="2011" \
  15326. media="manual_download" \
  15327. file1="setup_the_witcher_2_ee_3.0.1.17.exe" \
  15328. installed_exe1="$W_PROGRAMS_X86_WIN/GOG.com/The Witcher 2/bin/witcher2.exe"
  15329. load_the_witcher_2_gog()
  15330. {
  15331. winetricks_load_gog "the_witcher_2" \
  15332. "The Witcher 2 - Assassins of Kings" \
  15333. "setup_the_witcher_2-1.bin,2048477,b826cd7b096fd98eab78517752522b2a3ca8af5e\
  15334. setup_the_witcher_2-2.bin,2050788,a419926e4d02de81d79d586bf893150d3231833c \
  15335. setup_the_witcher_2-3.bin,2050788,6974cadc29fb8a8795aa245c5f8bb24e5e0cff5e \
  15336. setup_the_witcher_2-4.bin,2050788,ed79c1e9456801addf6fd6e687528fa01354b0d8 \
  15337. setup_the_witcher_2-5.bin,1631852,354cb73ae3e73cb88dedc53dd472803862a654cf \
  15338. setup_the_witcher_2.bin,129136,d3aa93bf147e155c5035ae15444916feabfd47b4" \
  15339. "" "bin/witcher2.exe" "" "The Witcher 2" \
  15340. "2308,9ca06383301f242143f69fe08974f9d4d713ac6b"
  15341. }
  15342. # Brief HOWTO for adding a GOG game:
  15343. # - "beneath_a_steel_sky" is the installer exe name, minus "setup_" and ".exe"
  15344. # - "Beneath a Steel Sky" is installer window title, minus "Setup - "
  15345. # - There are no other files for this game, so this parameter is empty.
  15346. # Otherwise it should be of the following form:
  15347. # file_name[,length[,sha1sum]] [...]
  15348. # - "TsCheckBox4" is the control name for the checkbox deciding whether it will
  15349. # install some reader (Foxit in this case, could be acrobat reader). That
  15350. # installation is enabled by default, and would just bloat the generic
  15351. # AutoHotKey script, so it gets disabled.
  15352. # - "ScummVM\\[...]" is the command line to run the game, as fetched from the
  15353. # shortcut/launcher installer/wine creates, which will be used in BAT scripts
  15354. # created by wisotool
  15355. # - The part in the url which is specific to this game is identical to its "id"
  15356. # (first parameter), so this parameter is left out.
  15357. # - The install directory is the same as installer window title (second
  15358. # parameter), so this parameter is left out.
  15359. # - Main installer size and sha1sum, separated by a comma.
  15360. #----------------------------------------------------------------
  15361. # Steam Games
  15362. #----------------------------------------------------------------
  15363. w_metadata alienswarm_steam games \
  15364. title="Alien Swarm (Steam)" \
  15365. publisher="Valve" \
  15366. year="2010" \
  15367. media="download" \
  15368. installed_exe1="$W_PROGRAMS_X86_WIN/Steam/steamapps/common/alien swarm/swarm.exe"
  15369. load_alienswarm_steam()
  15370. {
  15371. w_steam_install_game 630 "Alien Swarm"
  15372. }
  15373. #----------------------------------------------------------------
  15374. w_metadata bioshock2_steam games \
  15375. title="Bioshock 2 (Steam)" \
  15376. publisher="2k" \
  15377. year="2010" \
  15378. media="download" \
  15379. installed_exe1="$W_PROGRAMS_X86_WIN/Steam/steamapps/common/bioshock2/blort.exe"
  15380. load_bioshock2_steam()
  15381. {
  15382. w_steam_install_game 8850 "BioShock 2"
  15383. }
  15384. #----------------------------------------------------------------
  15385. w_metadata borderlands_steam games \
  15386. title="Borderlands (Steam, nonfree)" \
  15387. publisher="2K Games" \
  15388. year="2009" \
  15389. media="download" \
  15390. installed_exe1="$W_PROGRAMS_X86_WIN/Steam/steamapps/common/borderlands/Binaries/Borderlands.exe"
  15391. load_borderlands_steam()
  15392. {
  15393. w_steam_install_game 8980 "Borderlands"
  15394. }
  15395. #----------------------------------------------------------------
  15396. w_metadata civ5_demo_steam games \
  15397. title="Civ V Demo (Steam)" \
  15398. publisher="2K Games" \
  15399. year="2010" \
  15400. media="download" \
  15401. installed_exe1="$W_PROGRAMS_X86_WIN/Steam/steamapps/common/sid meier's civilization v - demo/CivilizationV.exe"
  15402. load_civ5_demo_steam()
  15403. {
  15404. # Start autohotkey watching for directx9 option in the background, and select it when it comes up
  15405. w_ahk_do "
  15406. SetWinDelay 500
  15407. loop
  15408. {
  15409. ifWinExist, Sid Meier's Civilization V - Demo - Steam
  15410. {
  15411. winactivate
  15412. click 26,108 ; select directx9
  15413. sleep 500
  15414. click 200,150 ; Play
  15415. }
  15416. ifWinExist, Updating Sid Meier's Civilization V - Demo
  15417. {
  15418. break
  15419. }
  15420. sleep 1000
  15421. }
  15422. " &
  15423. _job=$!
  15424. # While that's running, install the game.
  15425. # You'll see *two* Autohotkey icons until that first script
  15426. # finds the dialog it's looking for, clicks, and exits.
  15427. w_info "If you already own the full Civ 5 game on steam, the installer won't even appear."
  15428. w_steam_install_game 65900 "Sid Meier's Civilization V - Demo"
  15429. kill -s HUP $_job # just in case
  15430. }
  15431. #----------------------------------------------------------------
  15432. w_metadata ruse_demo_steam games \
  15433. title="Ruse Demo (Steam)" \
  15434. publisher="Ubisoft" \
  15435. year="2010" \
  15436. media="download" \
  15437. installed_exe1="$W_PROGRAMS_X86_WIN/Steam/steamapps/common/r.u.s.e. demo/Ruse.exe"
  15438. load_ruse_demo_steam()
  15439. {
  15440. w_steam_install_game 33310 "R.U.S.E."
  15441. }
  15442. #----------------------------------------------------------------
  15443. w_metadata supermeatboy_steam games \
  15444. title="Super Meat Boy (Steam, nonfree)" \
  15445. publisher="Independent" \
  15446. year="2010" \
  15447. media="download" \
  15448. installed_exe1="$W_PROGRAMS_X86_WIN/Steam/steamapps/common/super meat boy/SuperMeatBoy.exe"
  15449. load_supermeatboy_steam()
  15450. {
  15451. w_steam_install_game 40800 "Super Meat Boy"
  15452. }
  15453. #----------------------------------------------------------------
  15454. w_metadata trine_steam games \
  15455. title="Trine (Steam)" \
  15456. publisher="Frozenbyte" \
  15457. year="2009" \
  15458. media="download" \
  15459. installed_exe1="$W_PROGRAMS_X86_WIN/Steam/steamapps/common/trine/trine_launcher.exe"
  15460. load_trine_steam()
  15461. {
  15462. w_steam_install_game 35700 "Trine"
  15463. }
  15464. #----------------------------------------------------------------
  15465. w_metadata trine_demo_steam games \
  15466. title="Trine Demo (Steam)" \
  15467. publisher="Frozenbyte" \
  15468. year="2009" \
  15469. media="download" \
  15470. installed_exe1="$W_PROGRAMS_X86_WIN/Steam/steamapps/common/trine demo/trine_launcher.exe"
  15471. load_trine_demo_steam()
  15472. {
  15473. w_steam_install_game 35710 "Trine Demo"
  15474. }
  15475. #----------------------------------------------------------------
  15476. w_metadata wormsreloaded_demo_steam games \
  15477. title="Worms Reloaded Demo (Steam)" \
  15478. publisher="Team17" \
  15479. year="2010" \
  15480. media="download" \
  15481. installed_exe1="$W_PROGRAMS_X86_WIN/Steam/steamapps/common/worms reloaded/WormsReloaded.exe"
  15482. load_wormsreloaded_demo_steam()
  15483. {
  15484. w_steam_install_game 22690 "Worms Reloaded Demo"
  15485. }
  15486. #----------------------------------------------------------------
  15487. # Settings
  15488. #----------------------------------------------------------------
  15489. # Direct3D settings
  15490. winetricks_set_wined3d_var()
  15491. {
  15492. # Filter out/correct bad or partial values
  15493. # Confusing because dinput uses 'disable', but d3d uses 'disabled'
  15494. # see wined3d_dll_init() in dlls/wined3d/wined3d_main.c
  15495. # and DllMain() in dlls/ddraw/main.c
  15496. case $2 in
  15497. disable*) arg=disabled;;
  15498. enable*) arg=enabled;;
  15499. hard*) arg=hardware;;
  15500. repack) arg=repack;;
  15501. backbuffer|fbo|gdi|none|opengl|readdraw|readtex|texdraw|textex|auto) arg=$2;;
  15502. [0-9]*) arg=$2;;
  15503. *) w_die "illegal value $2 for $1";;
  15504. esac
  15505. echo "Setting Direct3D/$1 to $arg"
  15506. cat > "$W_TMP"/set-wined3d.reg <<_EOF_
  15507. REGEDIT4
  15508. [HKEY_CURRENT_USER\Software\Wine\Direct3D]
  15509. "$1"="$arg"
  15510. _EOF_
  15511. w_try_regedit "$W_TMP_WIN"\\set-wined3d.reg
  15512. }
  15513. #----------------------------------------------------------------
  15514. w_metadata glsl=enabled settings \
  15515. title_uk="Включити glsl шейдери (за замовчуванням)" \
  15516. title="Enable glsl shaders (default)"
  15517. w_metadata glsl=disabled settings \
  15518. title_uk="Вимкнути glsl шейдери та використовувати arb шейдери (швидше, але іноді з перервами)" \
  15519. title="Disable glsl shaders, use arb shaders (faster, but sometimes breaks)"
  15520. load_glsl()
  15521. {
  15522. winetricks_set_wined3d_var UseGLSL $1
  15523. }
  15524. #----------------------------------------------------------------
  15525. w_metadata multisampling=enabled settings \
  15526. title_uk="Включити Direct3D мультисемплінг" \
  15527. title="Enable Direct3D multisampling"
  15528. w_metadata multisampling=disabled settings \
  15529. title_uk="Вимкнути Direct3D мультисемплінг" \
  15530. title="Disable Direct3D multisampling"
  15531. load_multisampling()
  15532. {
  15533. winetricks_set_wined3d_var Multisampling $1
  15534. }
  15535. #----------------------------------------------------------------
  15536. w_metadata npm=repack settings \
  15537. title_uk="Поставити NonPower2Mode на repack" \
  15538. title="Set NonPower2Mode to repack"
  15539. load_npm()
  15540. {
  15541. winetricks_set_wined3d_var NonPower2Mode $1
  15542. }
  15543. #----------------------------------------------------------------
  15544. w_metadata orm=fbo settings \
  15545. title_uk="Поставити OffscreenRenderingMode=fbo (за замовчуванням)" \
  15546. title="Set OffscreenRenderingMode=fbo (default)"
  15547. w_metadata orm=backbuffer settings \
  15548. title_uk="Поставити OffscreenRenderingMode=backbuffer" \
  15549. title="Set OffscreenRenderingMode=backbuffer"
  15550. load_orm()
  15551. {
  15552. winetricks_set_wined3d_var OffscreenRenderingMode $1
  15553. }
  15554. #----------------------------------------------------------------
  15555. w_metadata strictdrawordering=enabled settings \
  15556. title_uk="Включити StrictDrawOrdering" \
  15557. title="Enable StrictDrawOrdering"
  15558. w_metadata strictdrawordering=disabled settings \
  15559. title_uk="Вимкнути StrictDrawOrdering (за замовчуванням)" \
  15560. title="Disable StrictDrawOrdering (default)"
  15561. load_strictdrawordering()
  15562. {
  15563. winetricks_set_wined3d_var StrictDrawOrdering $1
  15564. }
  15565. #----------------------------------------------------------------
  15566. w_metadata rtlm=auto settings \
  15567. title_uk="Поставити RenderTargetLockMode на авто (за замовчуванням)" \
  15568. title="Set RenderTargetLockMode to auto (default)"
  15569. w_metadata rtlm=disabled settings \
  15570. title_uk="Вимкнути RenderTargetLockMode" \
  15571. title="Set RenderTargetLockMode to disabled"
  15572. w_metadata rtlm=readdraw settings \
  15573. title_uk="Поставити RenderTargetLockMode на readdraw" \
  15574. title="Set RenderTargetLockMode to readdraw"
  15575. w_metadata rtlm=readtex settings \
  15576. title_uk="Поставити RenderTargetLockMode на readtex" \
  15577. title="Set RenderTargetLockMode to readtex"
  15578. w_metadata rtlm=texdraw settings \
  15579. title_uk="Поставити RenderTargetLockMode на texdraw" \
  15580. title="Set RenderTargetLockMode to texdraw"
  15581. w_metadata rtlm=textex settings \
  15582. title_uk="Поставити RenderTargetLockMode на textex" \
  15583. title="Set RenderTargetLockMode to textex"
  15584. load_rtlm()
  15585. {
  15586. winetricks_set_wined3d_var RenderTargetLockMode $1
  15587. }
  15588. #----------------------------------------------------------------
  15589. # AlwaysOffscreen settings
  15590. w_metadata ao=enabled settings \
  15591. title_uk="Включити AlwaysOffscreen" \
  15592. title="Enable AlwaysOffscreen"
  15593. w_metadata ao=disabled settings \
  15594. title_uk="Вимкнути AlwaysOffscreen (за замовчуванням)" \
  15595. title="Disable AlwaysOffscreen (default)"
  15596. load_ao()
  15597. {
  15598. winetricks_set_wined3d_var AlwaysOffscreen $1
  15599. }
  15600. #----------------------------------------------------------------
  15601. # DirectDraw settings
  15602. w_metadata ddr=gdi settings \
  15603. title_uk="Поставити DirectDrawRenderer на gdi" \
  15604. title="Set DirectDrawRenderer to gdi"
  15605. w_metadata ddr=opengl settings \
  15606. title_uk="Поставити DirectDrawRenderer на opengl" \
  15607. title="Set DirectDrawRenderer to opengl"
  15608. load_ddr()
  15609. {
  15610. winetricks_set_wined3d_var DirectDrawRenderer $1
  15611. }
  15612. #----------------------------------------------------------------
  15613. # DirectInput settings
  15614. w_metadata mwo=force settings \
  15615. title_uk="Поставити примусове DirectInput MouseWarpOverride (необхідно для деяких ігор)" \
  15616. title="Set DirectInput MouseWarpOverride to force (needed by some games)"
  15617. w_metadata mwo=enabled settings \
  15618. title_uk="Включити DirectInput MouseWarpOverride (за замовчуванням)" \
  15619. title="Set DirectInput MouseWarpOverride to enabled (default)"
  15620. w_metadata mwo=disable settings \
  15621. title_uk="Вимкнути DirectInput MouseWarpOverride" \
  15622. title="Set DirectInput MouseWarpOverride to disable"
  15623. load_mwo()
  15624. {
  15625. # Filter out/correct bad or partial values
  15626. # Confusing because dinput uses 'disable', but d3d uses 'disabled'
  15627. # see alloc_device() in dlls/dinput/mouse.c
  15628. case $1 in
  15629. enable*) arg=enabled;;
  15630. disable*) arg=disable;;
  15631. force) arg=force;;
  15632. *) w_die "illegal value $1 for MouseWarpOverride";;
  15633. esac
  15634. echo "Setting MouseWarpOverride to $arg"
  15635. cat > "$W_TMP"/set-mwo.reg <<_EOF_
  15636. REGEDIT4
  15637. [HKEY_CURRENT_USER\Software\Wine\DirectInput]
  15638. "MouseWarpOverride"="$arg"
  15639. _EOF_
  15640. w_try_regedit "$W_TMP"/set-mwo.reg
  15641. }
  15642. #----------------------------------------------------------------
  15643. # Mac Driver settings
  15644. w_metadata macdriver=mac settings \
  15645. title_uk="Включити рідний Mac Quartz драйвер (за замовчуванням)" \
  15646. title="Enable the Mac native Quartz driver (default)"
  15647. w_metadata macdriver=x11 settings \
  15648. title_uk="Вимкнути рідний Mac Quartz драйвер та використовувати замість нього X11" \
  15649. title="Disable the Mac native Quartz driver, use X11 instead"
  15650. load_macdriver()
  15651. {
  15652. echo "Setting MacDriver to $arg"
  15653. cat > "$W_TMP"/set-mac.reg <<_EOF_
  15654. REGEDIT4
  15655. [HKEY_CURRENT_USER\Software\Wine\Drivers]
  15656. "Graphics"="$arg"
  15657. _EOF_
  15658. w_try_regedit "$W_TMP"/set-mac.reg
  15659. }
  15660. #----------------------------------------------------------------
  15661. # X11 Driver settings
  15662. w_metadata grabfullscreen=y settings \
  15663. title_uk="Примусове захоплення курсору для повноекранних вікон (необхідно для деяких ігор)" \
  15664. title="Force cursor clipping for full-screen windows (needed by some games)"
  15665. w_metadata grabfullscreen=n settings \
  15666. title_uk="Вимкнути примусове захоплення курсору для повноекранних вікон (за замовчуванням)" \
  15667. title="Disable cursor clipping for full-screen windows (default)"
  15668. load_grabfullscreen()
  15669. {
  15670. case $1 in
  15671. y|n) arg=$1;;
  15672. *) w_die "illegal value $1 for GrabFullscreen";;
  15673. esac
  15674. echo "Setting GrabFullscreen to $arg"
  15675. cat > "$W_TMP"/set-gfs.reg <<_EOF_
  15676. REGEDIT4
  15677. [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
  15678. "GrabFullscreen"="$arg"
  15679. _EOF_
  15680. w_try_regedit "$W_TMP"/set-gfs.reg
  15681. }
  15682. w_metadata windowmanagerdecorated=y settings \
  15683. title_uk="Дозволити менеджеру вікон декорувати вікна (за замовчуванням)" \
  15684. title="Allow the window manager to decorate windows (default)"
  15685. w_metadata windowmanagerdecorated=n settings \
  15686. title_uk="Не дозволяти менеджеру вікон декорувати вікна" \
  15687. title="Prevent the window manager from decorating windows"
  15688. load_windowmanagerdecorated()
  15689. {
  15690. case $1 in
  15691. y|n) arg=$1;;
  15692. *) w_die "illegal value $1 for Decorated";;
  15693. esac
  15694. echo "Setting Decorated to $arg"
  15695. cat > "$W_TMP"/set-wmd.reg <<_EOF_
  15696. REGEDIT4
  15697. [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
  15698. "Decorated"="$arg"
  15699. _EOF_
  15700. w_try_regedit "$W_TMP"/set-wmd.reg
  15701. }
  15702. w_metadata windowmanagermanaged=y settings \
  15703. title_uk="Дозволити менеджеру вікон керування вікнами (за замовчуванням)" \
  15704. title="Allow the window manager to control windows (default)"
  15705. w_metadata windowmanagermanaged=n settings \
  15706. title_uk="Не дозволяти менеджеру вікон керування вікнами" \
  15707. title="Prevent the window manager from controling windows"
  15708. load_windowmanagermanaged()
  15709. {
  15710. case $1 in
  15711. y|n) arg=$1;;
  15712. *) w_die "illegal value $1 for Managed";;
  15713. esac
  15714. echo "Setting Managed to $arg"
  15715. cat > "$W_TMP"/set-wmm.reg <<_EOF_
  15716. REGEDIT4
  15717. [HKEY_CURRENT_USER\Software\Wine\X11 Driver]
  15718. "Managed"="$arg"
  15719. _EOF_
  15720. w_try_regedit "$W_TMP"/set-wmm.reg
  15721. }
  15722. #----------------------------------------------------------------
  15723. # Other settings
  15724. #----------------------------------------------------------------
  15725. w_metadata alldlls=default settings \
  15726. title_uk="Видалити всі перевизначення DLL" \
  15727. title="Remove all DLL overrides"
  15728. w_metadata alldlls=builtin settings \
  15729. title_uk="Перевизначити найбільш поширені DLL на вбудовані" \
  15730. title="Override most common DLLs to builtin"
  15731. load_alldlls()
  15732. {
  15733. case $1 in
  15734. default) w_override_no_dlls ;;
  15735. builtin) w_override_all_dlls ;;
  15736. esac
  15737. }
  15738. w_metadata fontsmooth=disable settings \
  15739. title_uk="Вимкнути згладжування шрифту" \
  15740. title="Disable font smoothing"
  15741. w_metadata fontsmooth=bgr settings \
  15742. title_uk="Включити субпіксельне згладжування шрифту для BGR LCD моніторів" \
  15743. title="Enable subpixel font smoothing for BGR LCDs"
  15744. w_metadata fontsmooth=rgb settings \
  15745. title_uk="Включити субпіксельне згладжування шрифту для RGB LCD моніторів" \
  15746. title="Enable subpixel font smoothing for RGB LCDs"
  15747. w_metadata fontsmooth=gray settings \
  15748. title_uk="Включити субпіксельне згладжування шрифту" \
  15749. title="Enable subpixel font smoothing"
  15750. load_fontsmooth()
  15751. {
  15752. case $1 in
  15753. disable) FontSmoothing=0; FontSmoothingOrientation=1; FontSmoothingType=0;;
  15754. gray|grey) FontSmoothing=2; FontSmoothingOrientation=1; FontSmoothingType=1;;
  15755. bgr) FontSmoothing=2; FontSmoothingOrientation=0; FontSmoothingType=2;;
  15756. rgb) FontSmoothing=2; FontSmoothingOrientation=1; FontSmoothingType=2;;
  15757. *) w_die "unknown font smoothing type $1";;
  15758. esac
  15759. echo "Setting font smoothing to $1"
  15760. cat > "$W_TMP"/fontsmooth.reg <<_EOF_
  15761. REGEDIT4
  15762. [HKEY_CURRENT_USER\Control Panel\Desktop]
  15763. "FontSmoothing"="$FontSmoothing"
  15764. "FontSmoothingGamma"=dword:00000578
  15765. "FontSmoothingOrientation"=dword:0000000$FontSmoothingOrientation
  15766. "FontSmoothingType"=dword:0000000$FontSmoothingType
  15767. _EOF_
  15768. w_try_regedit "$W_TMP_WIN"\\fontsmooth.reg
  15769. }
  15770. #----------------------------------------------------------------
  15771. w_metadata forcemono settings \
  15772. title_uk="Примусове використання mono замість .Net (для налогодження)" \
  15773. title="Force using mono instead of .Net (for debugging)"
  15774. load_forcemono()
  15775. {
  15776. w_override_dlls native mscoree
  15777. w_override_dlls disabled mscorsvw.exe
  15778. }
  15779. #----------------------------------------------------------------
  15780. w_metadata gsm=0 settings \
  15781. title="Set MaxShaderModelGS to 0"
  15782. w_metadata gsm=1 settings \
  15783. title="Set MaxShaderModelGS to 1"
  15784. w_metadata gsm=2 settings \
  15785. title="Set MaxShaderModelGS to 2"
  15786. w_metadata gsm=3 settings \
  15787. title="Set MaxShaderModelGS to 3"
  15788. load_gsm()
  15789. {
  15790. winetricks_set_wined3d_var MaxShaderModelGS $1
  15791. }
  15792. #----------------------------------------------------------------
  15793. w_metadata heapcheck settings \
  15794. title_uk="Включити накопичувальну перевірку GlobalFlag" \
  15795. title="Enable heap checking with GlobalFlag"
  15796. load_heapcheck()
  15797. {
  15798. cat > "$W_TMP"/heapcheck.reg <<_EOF_
  15799. REGEDIT4
  15800. [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager]
  15801. "GlobalFlag"=dword:00200030
  15802. _EOF_
  15803. w_try_regedit "$W_TMP_WIN"\\heapcheck.reg
  15804. }
  15805. #----------------------------------------------------------------
  15806. w_metadata hidewineexports=enable settings \
  15807. title="Enable hiding wine exports from applications (wine-staging)"
  15808. w_metadata hidewineexports=disable settings \
  15809. title="Disable hiding wine exports from applications (wine-staging)"
  15810. load_hidewineexports()
  15811. {
  15812. # Wine exports some functions allowing apps to query the wine version and
  15813. # information about the host environment. Using these functions, some apps
  15814. # will intentionally terminate if they can detect that they are running in
  15815. # a wine environment.
  15816. #
  15817. # Hiding these wine exports is only available in wine-staging.
  15818. # See https://bugs.winehq.org/show_bug.cgi?id=38656
  15819. case $arg in
  15820. enable)
  15821. local registry_value="\"Y\""
  15822. ;;
  15823. disable)
  15824. local registry_value="-"
  15825. ;;
  15826. *) w_die "Unexpected argument, $arg";;
  15827. esac
  15828. cat > "$W_TMP"/set-wineexports.reg <<_EOF_
  15829. REGEDIT4
  15830. [HKEY_CURRENT_USER\Software\Wine]
  15831. "HideWineExports"=$registry_value
  15832. _EOF_
  15833. w_try_regedit "$W_TMP"/set-wineexports.reg
  15834. }
  15835. #----------------------------------------------------------------
  15836. w_metadata hosts settings \
  15837. title_uk="Додати порожні файли у C:\windows\system32\drivers\etc\{hosts,services}" \
  15838. title="Add empty C:\windows\system32\drivers\etc\{hosts,services} files"
  15839. load_hosts()
  15840. {
  15841. # Create fake system32\drivers\etc\hosts and system32\drivers\etc\services files.
  15842. # The hosts file is used to map network names to IP addresses without DNS.
  15843. # The services file is used map service names to network ports.
  15844. # Some apps depend on these files, but they're not implemented in wine.
  15845. # Fortunately, empty files in the correct location satisfy those apps.
  15846. # See http://bugs.winehq.org/show_bug.cgi?id=12076
  15847. # It's in system32 for both win32/win64
  15848. mkdir -p "$W_WINDIR_UNIX"/system32/drivers/etc
  15849. touch "$W_WINDIR_UNIX"/system32/drivers/etc/hosts
  15850. touch "$W_WINDIR_UNIX"/system32/drivers/etc/services
  15851. }
  15852. #----------------------------------------------------------------
  15853. w_metadata native_mdac settings \
  15854. title_uk="Перевизначити odbc32, odbccp32 та oledb32" \
  15855. title="Override odbc32, odbccp32 and oledb32"
  15856. load_native_mdac()
  15857. {
  15858. # Set those overrides globally so user programs get MDAC's odbc
  15859. # instead of wine's unixodbc
  15860. w_override_dlls native,builtin odbc32 odbccp32 oledb32
  15861. }
  15862. #----------------------------------------------------------------
  15863. w_metadata native_oleaut32 settings \
  15864. title_uk="Перевизначити oleaut32" \
  15865. title="Override oleaut32"
  15866. load_native_oleaut32()
  15867. {
  15868. w_override_dlls native,builtin oleaut32
  15869. }
  15870. #----------------------------------------------------------------
  15871. w_metadata nocrashdialog settings \
  15872. title_uk="Вимкнути діалог про помилку" \
  15873. title="Disable crash dialog"
  15874. load_nocrashdialog()
  15875. {
  15876. echo "Disabling graphical crash dialog"
  15877. cat > "$W_TMP"/crashdialog.reg <<_EOF_
  15878. REGEDIT4
  15879. [HKEY_CURRENT_USER\Software\Wine\WineDbg]
  15880. "ShowCrashDialog"=dword:00000000
  15881. _EOF_
  15882. cd "$W_TMP"
  15883. w_try_regedit crashdialog.reg
  15884. }
  15885. #----------------------------------------------------------------
  15886. w_metadata nt40 settings \
  15887. title_uk="Поставити версію Windows NT 4.0" \
  15888. title="Set windows version to Windows NT 4.0"
  15889. load_nt40()
  15890. {
  15891. w_set_winver nt40
  15892. }
  15893. #----------------------------------------------------------------
  15894. w_metadata psm=0 settings \
  15895. title="Set MaxShaderModelPS to 0"
  15896. w_metadata psm=1 settings \
  15897. title="Set MaxShaderModelPS to 1"
  15898. w_metadata psm=2 settings \
  15899. title="Set MaxShaderModelPS to 2"
  15900. w_metadata psm=3 settings \
  15901. title="Set MaxShaderModelPS to 3"
  15902. load_psm()
  15903. {
  15904. winetricks_set_wined3d_var MaxShaderModelPS $1
  15905. }
  15906. #----------------------------------------------------------------
  15907. w_metadata sandbox settings \
  15908. title_uk="Пісочниця wineprefix - видалити посилання до HOME" \
  15909. title="Sandbox the wineprefix - remove links to \$HOME"
  15910. load_sandbox()
  15911. {
  15912. w_skip_windows sandbox && return
  15913. # Unmap drive Z
  15914. rm -f "$WINEPREFIX/dosdevices/z:"
  15915. _olddir="`pwd`"
  15916. cd "$WINEPREFIX/drive_c/users/$USER"
  15917. for x in *
  15918. do
  15919. if test -h "$x" && test -d "$x"
  15920. then
  15921. rm -f "$x"
  15922. mkdir -p "$x"
  15923. fi
  15924. done
  15925. cd "$_olddir"
  15926. unset _olddir
  15927. # Disable unixfs
  15928. # Unfortunately, when you run with a different version of Wine, Wine will recreate this key.
  15929. # See http://bugs.winehq.org/show_bug.cgi?id=22450
  15930. "$WINE" regedit /d 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\Namespace\{9D20AAE8-0625-44B0-9CA7-71889C2254D9}'
  15931. # Disable recreation of the above key - or any updating of the registry - when running with a newer version of Wine.
  15932. echo disable > "$WINEPREFIX/.update-timestamp"
  15933. }
  15934. #----------------------------------------------------------------
  15935. w_metadata sound=alsa settings \
  15936. title_uk="Поставити звуковий драйвер ALSA" \
  15937. title="Set sound driver to ALSA"
  15938. w_metadata sound=coreaudio settings \
  15939. title_uk="Поставити звуковий драйвер Mac CoreAudio" \
  15940. title="Set sound driver to Mac CoreAudio"
  15941. w_metadata sound=disabled settings \
  15942. title_uk="Вимкнути звуковий драйвер" \
  15943. title="Set sound driver to disabled"
  15944. w_metadata sound=oss settings \
  15945. title_uk="Поставити звуковий драйвер OSS" \
  15946. title="Set sound driver to OSS"
  15947. w_metadata sound=pulse settings \
  15948. title_uk="Поставити звуковий драйвер PulseAudio" \
  15949. title="Set sound driver to PulseAudio"
  15950. load_sound()
  15951. {
  15952. echo "Setting sound driver to $1"
  15953. cat > "$W_TMP"/set-sound.reg <<_EOF_
  15954. REGEDIT4
  15955. [HKEY_CURRENT_USER\Software\Wine\Drivers]
  15956. "Audio"="$1"
  15957. _EOF_
  15958. w_try_regedit "$W_TMP_WIN"\\set-sound.reg
  15959. }
  15960. #----------------------------------------------------------------
  15961. w_metadata vd=off settings \
  15962. title_uk="Вимкнути віртуальний робочий стіл" \
  15963. title="Disable virtual desktop"
  15964. w_metadata vd=640x480 settings \
  15965. title_uk="Включити віртуальний робочий стіл та поставити розмір 640x480" \
  15966. title="Enable virtual desktop, set size to 640x480"
  15967. w_metadata vd=800x600 settings \
  15968. title_uk="Включити віртуальний робочий стіл та поставити розмір 800x600" \
  15969. title="Enable virtual desktop, set size to 800x600"
  15970. w_metadata vd=1024x768 settings \
  15971. title_uk="Включити віртуальний робочий стіл та поставити розмір 1024x768" \
  15972. title="Enable virtual desktop, set size to 1024x768"
  15973. w_metadata vd=1280x1024 settings \
  15974. title_uk="Включити віртуальний робочий стіл та поставити розмір 1280x1024" \
  15975. title="Enable virtual desktop, set size to 1280x1024"
  15976. w_metadata vd=1440x900 settings \
  15977. title_uk="Включити віртуальний робочий стіл та поставити розмір 1440x900" \
  15978. title="Enable virtual desktop, set size to 1440x900"
  15979. load_vd()
  15980. {
  15981. size=$1
  15982. case $size in
  15983. off|disabled)
  15984. cat > "$W_TMP"/vd.reg <<_EOF_
  15985. REGEDIT4
  15986. [HKEY_CURRENT_USER\Software\Wine\Explorer]
  15987. "Desktop"=-
  15988. [HKEY_CURRENT_USER\Software\Wine\Explorer\Desktops]
  15989. "Default"=-
  15990. _EOF_
  15991. ;;
  15992. [1-9]*x[1-9]*)
  15993. cat > "$W_TMP"/vd.reg <<_EOF_
  15994. REGEDIT4
  15995. [HKEY_CURRENT_USER\Software\Wine\Explorer]
  15996. "Desktop"="Default"
  15997. [HKEY_CURRENT_USER\Software\Wine\Explorer\Desktops]
  15998. "Default"="$size"
  15999. _EOF_
  16000. ;;
  16001. *)
  16002. w_die "you want a virtual desktop of $size? I don't understand."
  16003. ;;
  16004. esac
  16005. w_try_regedit "$W_TMP_WIN"/vd.reg
  16006. }
  16007. #----------------------------------------------------------------
  16008. w_metadata videomemorysize=default settings \
  16009. title_uk="Дати можливість Wine визначити розмір відеопам'яті" \
  16010. title="Let Wine detect amount of video card memory"
  16011. w_metadata videomemorysize=512 settings \
  16012. title_uk="Повідомити Wine про 512МБ відеопам'яті" \
  16013. title="Tell Wine your video card has 512MB RAM"
  16014. w_metadata videomemorysize=1024 settings \
  16015. title_uk="Повідомити Wine про 1024МБ відеопам'яті" \
  16016. title="Tell Wine your video card has 1024MB RAM"
  16017. w_metadata videomemorysize=2048 settings \
  16018. title_uk="Повідомити Wine про 2048МБ відеопам'яті" \
  16019. title="Tell Wine your video card has 2048MB RAM"
  16020. load_videomemorysize()
  16021. {
  16022. size=$1
  16023. echo "Setting video memory size to $size"
  16024. case $size in
  16025. default)
  16026. cat > "$W_TMP"/set-video.reg <<_EOF_
  16027. REGEDIT4
  16028. [HKEY_CURRENT_USER\Software\Wine\Direct3D]
  16029. "VideoMemorySize"=-
  16030. _EOF_
  16031. ;;
  16032. *)
  16033. cat > "$W_TMP"/set-video.reg <<_EOF_
  16034. REGEDIT4
  16035. [HKEY_CURRENT_USER\Software\Wine\Direct3D]
  16036. "VideoMemorySize"="$size"
  16037. _EOF_
  16038. esac
  16039. w_try_regedit "$W_TMP_WIN"\\set-video.reg
  16040. }
  16041. #----------------------------------------------------------------
  16042. w_metadata vista settings \
  16043. title_uk="Поставити версію Windows Vista" \
  16044. title="Set windows version to Windows Vista"
  16045. load_vista()
  16046. {
  16047. w_set_winver vista
  16048. }
  16049. #----------------------------------------------------------------
  16050. w_metadata vsm=0 settings \
  16051. title="Set MaxShaderModelVS to 0"
  16052. w_metadata vsm=1 settings \
  16053. title="Set MaxShaderModelVS to 1"
  16054. w_metadata vsm=2 settings \
  16055. title="Set MaxShaderModelVS to 2"
  16056. w_metadata vsm=3 settings \
  16057. title="Set MaxShaderModelVS to 3"
  16058. load_vsm()
  16059. {
  16060. winetricks_set_wined3d_var MaxShaderModelVS $1
  16061. }
  16062. #----------------------------------------------------------------
  16063. w_metadata win2k settings \
  16064. title_uk="Поставити версію Windows 2000" \
  16065. title="Set windows version to Windows 2000"
  16066. load_win2k()
  16067. {
  16068. w_set_winver win2k
  16069. }
  16070. #----------------------------------------------------------------
  16071. w_metadata win2k3 settings \
  16072. title_uk="Поставити версію Windows 2003" \
  16073. title="Set windows version to Windows 2003"
  16074. load_win2k3()
  16075. {
  16076. w_set_winver win2k3
  16077. }
  16078. #----------------------------------------------------------------
  16079. w_metadata win31 settings \
  16080. title_uk="Поставити версію Windows 3.1" \
  16081. title="Set windows version to Windows 3.1"
  16082. load_win31()
  16083. {
  16084. w_set_winver win31
  16085. }
  16086. #----------------------------------------------------------------
  16087. w_metadata win7 settings \
  16088. title_uk="Поставити версію Windows 7" \
  16089. title="Set windows version to Windows 7"
  16090. load_win7()
  16091. {
  16092. w_set_winver win7
  16093. }
  16094. #----------------------------------------------------------------
  16095. w_metadata win95 settings \
  16096. title_uk="Поставити версію Windows 95" \
  16097. title="Set windows version to Windows 95"
  16098. load_win95()
  16099. {
  16100. w_set_winver win95
  16101. }
  16102. #----------------------------------------------------------------
  16103. w_metadata win98 settings \
  16104. title_uk="Поставити версію Windows 98" \
  16105. title="Set windows version to Windows 98"
  16106. load_win98()
  16107. {
  16108. w_set_winver win98
  16109. }
  16110. #----------------------------------------------------------------
  16111. # Really, we should support other values, since winetricks did
  16112. w_metadata winver= settings \
  16113. title_uk="Поставити версію Windows за замовчуванням (winxp)" \
  16114. title="Set windows version to default (winxp)"
  16115. load_winver()
  16116. {
  16117. w_set_winver winxp
  16118. }
  16119. #----------------------------------------------------------------
  16120. w_metadata winxp settings \
  16121. title_uk="Поставити версію Windows XP" \
  16122. title="Set windows version to Windows XP"
  16123. load_winxp()
  16124. {
  16125. w_set_winver winxp
  16126. }
  16127. #----------------------------------------------------------------
  16128. #---- Derived Metadata ----
  16129. # Generated automatically by measuring time and space requirements of all verbs
  16130. # size_MB includes size of virgin wineprefix, but not the cached installer
  16131. case $WINETRICKS_OPT_VERBOSE in
  16132. 2) set -x ;;
  16133. *) set +x ;;
  16134. esac
  16135. for data in \
  16136. 3dmark03:size_MB=895,time_sec=149 \
  16137. 3dmark05:size_MB=1255,time_sec=208 \
  16138. 3dmark06:size_MB=2627,time_sec=461 \
  16139. 3dmark2000:size_MB=165,time_sec=71 \
  16140. 3dmark2001:size_MB=260,time_sec=141 \
  16141. 7zip:size_MB=53,time_sec=9 \
  16142. abiword:size_MB=119,time_sec=15 \
  16143. adobeair:size_MB=132,time_sec=8 \
  16144. algodoo_demo:size_MB=165,time_sec=52 \
  16145. allcodecs:size_MB=48,time_sec=3 \
  16146. allfonts:size_MB=132,time_sec=114 \
  16147. amstream:size_MB=48,time_sec=2 \
  16148. aoe3_demo:size_MB=4472,time_sec=422 \
  16149. aoe_demo:size_MB=164,time_sec=35 \
  16150. art2kmin:size_MB=363,time_sec=36 \
  16151. atmlib:size_MB=454,time_sec=73 \
  16152. autohotkey:size_MB=53,time_sec=4 \
  16153. baekmuk:size_MB=138,time_sec=3 \
  16154. bioshock_demo:size_MB=7510,time_sec=1543 \
  16155. bladekitten_demo:size_MB=1444,time_sec=174 \
  16156. cjkfonts:size_MB=48,time_sec=4 \
  16157. cmake:size_MB=85,time_sec=8 \
  16158. cnc3_demo:size_MB=5244,time_sec=1022 \
  16159. cod4mw_demo:size_MB=5730,time_sec=1108 \
  16160. cod_demo:size_MB=574,time_sec=115 \
  16161. colorprofile:size_MB=47,time_sec=1 \
  16162. comctl32:size_MB=49,time_sec=1 \
  16163. comdlg32ocx:size_MB=49,time_sec=1 \
  16164. controlpad:size_MB=69,time_sec=4 \
  16165. corefonts:size_MB=62,time_sec=2 \
  16166. crypt32:size_MB=178,time_sec=71 \
  16167. crysis2:size_MB=8259,time_sec=1200 \
  16168. crysis2_demo_mp:size_MB=5259,time_sec=1473 \
  16169. d3dcompiler_43:size_MB=138,time_sec=51 \
  16170. d3dx10:size_MB=50,time_sec=4 \
  16171. d3dx11_43:size_MB=48,time_sec=1 \
  16172. d3dx9:size_MB=126,time_sec=3 \
  16173. d3dx9_26:size_MB=48,time_sec=2 \
  16174. d3dx9_28:size_MB=48,time_sec=1 \
  16175. d3dx9_31:size_MB=48,time_sec=2 \
  16176. d3dx9_35:size_MB=50,time_sec=2 \
  16177. d3dx9_36:size_MB=48,time_sec=1 \
  16178. d3dx9_42:size_MB=48,time_sec=1 \
  16179. d3dxof:size_MB=48,time_sec=2 \
  16180. dc2ba_demo:size_MB=209,time_sec=38 \
  16181. deadspace2:size_MB=12693,time_sec=720 \
  16182. devenum:size_MB=59,time_sec=2 \
  16183. diablo2:size_MB=2577,time_sec=37 \
  16184. dinput:size_MB=48,time_sec=1 \
  16185. dinput8:size_MB=61,time_sec=2 \
  16186. dirac:size_MB=50,time_sec=4 \
  16187. directmusic:size_MB=63,time_sec=4 \
  16188. directplay:size_MB=61,time_sec=3 \
  16189. directx9:size_MB=387,time_sec=12 \
  16190. dirt2_demo:size_MB=6241,time_sec=977 \
  16191. divinity2_demo:size_MB=2906,time_sec=2627 \
  16192. dmsynth:size_MB=57,time_sec=2 \
  16193. dotnet11:size_MB=94,time_sec=15 \
  16194. dotnet20:size_MB=360,time_sec=64 \
  16195. dotnet30:size_MB=645,time_sec=302 \
  16196. dotnet35:size_MB=1149,time_sec=445 \
  16197. dragonage:size_MB=23771,time_sec=673 \
  16198. dragonage2_demo:size_MB=4014,time_sec=1428 \
  16199. droid:size_MB=63,time_sec=8 \
  16200. dsound:size_MB=48,time_sec=1 \
  16201. dxdiag:size_MB=75,time_sec=6 \
  16202. dxdiagn:size_MB=48,time_sec=1 \
  16203. eufonts:size_MB=58,time_sec=2 \
  16204. eve:size_MB=5313,time_sec=1568 \
  16205. eve:size_MB=11215,time_sec=467 \
  16206. farmsim2011_demo:size_MB=48,time_sec=4 \
  16207. ffdshow:size_MB=53,time_sec=4 \
  16208. fifa11_demo:size_MB=4932,time_sec=845 \
  16209. flash:size_MB=57,time_sec=3 \
  16210. fontfix:size_MB=47,time_sec=0 \
  16211. fontxplorer:size_MB=51,time_sec=5 \
  16212. gdiplus:size_MB=50,time_sec=2 \
  16213. gfw:size_MB=211,time_sec=11 \
  16214. glut:size_MB=47,time_sec=1 \
  16215. gothic4_demo:size_MB=7719,time_sec=1402 \
  16216. guildwars:size_MB=224,time_sec=392 \
  16217. hegemony_demo:size_MB=1927,time_sec=315 \
  16218. hegemonygold_demo:size_MB=2339,time_sec=247 \
  16219. hon:size_MB=1536,time_sec=337 \
  16220. hphbp_demo:size_MB=2898,time_sec=556 \
  16221. icodecs:size_MB=60,time_sec=29 \
  16222. ie6:size_MB=340,time_sec=58 \
  16223. ie7:size_MB=181,time_sec=44 \
  16224. ie8:size_MB=202,time_sec=39 \
  16225. imvu:size_MB=194,time_sec=17 \
  16226. jet40:size_MB=54,time_sec=3 \
  16227. l3codecx:size_MB=60,time_sec=5 \
  16228. lhp_demo:size_MB=3200,time_sec=645 \
  16229. liberation:size_MB=50,time_sec=3 \
  16230. lucida:size_MB=51,time_sec=1 \
  16231. masseffect2_demo:size_MB=8291,time_sec=1397 \
  16232. mb_warband_demo:size_MB=1495,time_sec=35 \
  16233. mdac25:size_MB=97,time_sec=6 \
  16234. mdac27:size_MB=70,time_sec=3 \
  16235. mdac28:size_MB=75,time_sec=4 \
  16236. mfc40:size_MB=48,time_sec=0 \
  16237. mfc42:size_MB=47,time_sec=1 \
  16238. mingw:size_MB=132,time_sec=3 \
  16239. mozillabuild:size_MB=891,time_sec=26 \
  16240. mpc:size_MB=87,time_sec=2 \
  16241. msasn1:size_MB=178,time_sec=3 \
  16242. mshflxgd:size_MB=47,time_sec=0 \
  16243. msi2:size_MB=62,time_sec=4 \
  16244. msls31:size_MB=48,time_sec=0 \
  16245. msmask:size_MB=47,time_sec=0 \
  16246. mspaint:size_MB=49,time_sec=0 \
  16247. msscript:size_MB=48,time_sec=0 \
  16248. msxml3:size_MB=49,time_sec=1 \
  16249. msxml4:size_MB=55,time_sec=0 \
  16250. msxml6:size_MB=54,time_sec=1 \
  16251. nfsshift_demo:size_MB=4877,time_sec=157 \
  16252. ogg:size_MB=54,time_sec=1 \
  16253. opensymbol:size_MB=49,time_sec=1 \
  16254. openwatcom:size_MB=274,time_sec=12 \
  16255. osmos_demo:size_MB=67,time_sec=5 \
  16256. pdh:size_MB=48,time_sec=0 \
  16257. penpenxmas:size_MB=49,time_sec=6 \
  16258. physx:size_MB=213,time_sec=5 \
  16259. plantsvszombies:size_MB=156,time_sec=24 \
  16260. pngfilt:size_MB=49,time_sec=0 \
  16261. puzzleagent_demo:size_MB=495,time_sec=36 \
  16262. python26:size_MB=160,time_sec=9 \
  16263. python26_comtypes:size_MB=46,time_sec=1 \
  16264. quartz:size_MB=62,time_sec=3 \
  16265. quicktime72:size_MB=219,time_sec=9 \
  16266. quicktime76:size_MB=237,time_sec=6 \
  16267. rayman2_demo:size_MB=239,time_sec=146 \
  16268. riched20:size_MB=49,time_sec=0 \
  16269. riched30:size_MB=48,time_sec=0 \
  16270. richtx32:size_MB=48,time_sec=0 \
  16271. safari:size_MB=210,time_sec=4 \
  16272. sammax301_demo:size_MB=1419,time_sec=341 \
  16273. sammax304_demo:size_MB=1642,time_sec=88 \
  16274. secondlife:size_MB=266,time_sec=24 \
  16275. secur32:size_MB=47,time_sec=0 \
  16276. shockwave:size_MB=134,time_sec=6 \
  16277. sims3:size_MB=12884,time_sec=584 \
  16278. sketchup:size_MB=319,time_sec=15 \
  16279. spotify:size_MB=59,time_sec=4 \
  16280. starcraft2_demo:size_MB=5241,time_sec=211 \
  16281. tahoma:size_MB=48,time_sec=0 \
  16282. takao:size_MB=176,time_sec=3 \
  16283. tmnationsforever:size_MB=1871,time_sec=116 \
  16284. uff:size_MB=47,time_sec=0 \
  16285. unifont:size_MB=51,time_sec=0 \
  16286. usp10:size_MB=50,time_sec=0 \
  16287. ut3:size_MB=7355,time_sec=426 \
  16288. utorrent:size_MB=48,time_sec=1 \
  16289. vb2run:size_MB=48,time_sec=0 \
  16290. vb3run:size_MB=47,time_sec=0 \
  16291. vb4run:size_MB=49,time_sec=0 \
  16292. vb5run:size_MB=49,time_sec=0 \
  16293. vb6run:size_MB=50,time_sec=1 \
  16294. vc2005express:size_MB=1614,time_sec=173 \
  16295. vc2005trial:size_MB=7156,time_sec=53 \
  16296. vcrun2003:size_MB=47,time_sec=0 \
  16297. vcrun2005:size_MB=60,time_sec=2 \
  16298. vcrun2008:size_MB=60,time_sec=2 \
  16299. vcrun2010:size_MB=71,time_sec=7 \
  16300. vcrun6:size_MB=51,time_sec=0 \
  16301. vcrun6sp6:size_MB=109,time_sec=2 \
  16302. vjrun20:size_MB=319,time_sec=57 \
  16303. vlc:size_MB=221,time_sec=7 \
  16304. wenquanyi:size_MB=50,time_sec=0 \
  16305. windowscodecs:size_MB=53,time_sec=2 \
  16306. winhttp:size_MB=49,time_sec=0 \
  16307. wininet:size_MB=47,time_sec=0 \
  16308. wme9:size_MB=136,time_sec=5 \
  16309. wmi:size_MB=62,time_sec=12 \
  16310. wmp10:size_MB=161,time_sec=7 \
  16311. wmp9:size_MB=143,time_sec=12 \
  16312. wog:size_MB=124,time_sec=5 \
  16313. wsh56js:size_MB=45,time_sec=0 \
  16314. xact:size_MB=60,time_sec=6 \
  16315. xinput:size_MB=47,time_sec=2 \
  16316. xmllite:size_MB=50,time_sec=4 \
  16317. xvid:size_MB=54,time_sec=2 \
  16318. zootycoon2_demo:size_MB=299,time_sec=32 \
  16319. do
  16320. cmd=${data%%:*}
  16321. file="`echo "$WINETRICKS_METADATA"/*/$cmd.vars`"
  16322. if test -f "$file"
  16323. then
  16324. case $data in
  16325. *size_MB*)
  16326. size_MB=${data##*size_MB=} # remove anything before value
  16327. size_MB=${size_MB%%,*} # remove anything after value
  16328. echo size_MB=$size_MB >> "$file"
  16329. ;;
  16330. esac
  16331. case $data in
  16332. *time_sec*)
  16333. time_sec=${data##*time_sec=}
  16334. time_sec=${time_sec%%,*}
  16335. echo time_sec=$time_sec >> "$file"
  16336. esac
  16337. fi
  16338. unset size_MB time_sec
  16339. done
  16340. # Restore verbosity:
  16341. case $WINETRICKS_OPT_VERBOSE in
  16342. 1|2) set -x ;;
  16343. *) set +x ;;
  16344. esac
  16345. #---- Main Program ----
  16346. winetricks_stats_save()
  16347. {
  16348. # Save opt-in status
  16349. if test "$WINETRICKS_STATS_REPORT"
  16350. then
  16351. echo "$WINETRICKS_STATS_REPORT" > "$W_CACHE"/track_usage
  16352. fi
  16353. }
  16354. winetricks_stats_init()
  16355. {
  16356. # Load opt-in status if not already set by a commandline option
  16357. if test ! "$WINETRICKS_STATS_REPORT" && test -f "$W_CACHE"/track_usage
  16358. then
  16359. WINETRICKS_STATS_REPORT=`cat "$W_CACHE"/track_usage`
  16360. fi
  16361. if test ! "$WINETRICKS_STATS_REPORT"
  16362. then
  16363. # No opt-in status found. If GUI active, ask user whether they would like to opt in.
  16364. case $WINETRICKS_GUI in
  16365. zenity)
  16366. case $LANG in
  16367. de*)
  16368. title="Einmalige Frage zur Hilfe an der Winetricks Entwicklung"
  16369. question="Möchten Sie die Winetricks Entwicklung unterstützen indem Sie Winetricks Statistiken übermitteln lassen? Sie können die Übermittlung jederzeit mit 'winetricks --optout' ausschalten"
  16370. thanks="Danke! Sie bekommen diese Frage nicht mehr gestellt. Sie können die Übermittlung jederzeit mit 'winetricks --optout' wieder ausschalten"
  16371. declined="OK, Winetricks wird *keine* Statistiken übermitteln. Sie bekommen diese Frage nicht mehr gestellt."
  16372. ;;
  16373. *)
  16374. title="One-time question about helping Winetricks development"
  16375. question="Would you like to help winetricks development by letting winetricks report statistics? You can turn reporting off at any time with the command 'winetricks --optout'"
  16376. thanks="Thanks! You won't be asked this question again. Remember, you can turn reporting off at any time with the command 'winetricks --optout'"
  16377. declined="OK, winetricks will *not* report statistics. You won't be asked this question again."
  16378. ;;
  16379. esac
  16380. if $WINETRICKS_GUI --question --text "$question" --title "$title"
  16381. then
  16382. $WINETRICKS_GUI --info --text "$thanks"
  16383. WINETRICKS_STATS_REPORT=1
  16384. else
  16385. $WINETRICKS_GUI --info --text "$declined"
  16386. WINETRICKS_STATS_REPORT=0
  16387. fi
  16388. echo $WINETRICKS_STATS_REPORT > "$W_CACHE"/track_usage
  16389. ;;
  16390. esac
  16391. fi
  16392. winetricks_stats_save
  16393. }
  16394. # Retrieve a short string with the operating system name and version
  16395. winetricks_os_description()
  16396. {
  16397. (
  16398. case "$OS" in
  16399. "Windows_NT")
  16400. echo windows ;;
  16401. *) echo "$WINETRICKS_WINE_VERSION" ;;
  16402. esac
  16403. ) | tr '\012' ' '
  16404. }
  16405. winetricks_stats_report()
  16406. {
  16407. # If user has opted in to usage tracking, report what he used (if anything)
  16408. case "$WINETRICKS_STATS_REPORT" in
  16409. 1) ;;
  16410. *) return;;
  16411. esac
  16412. test -f "$WINETRICKS_WORKDIR"/breadcrumbs || return
  16413. WINETRICKS_STATS_BREADCRUMBS=`cat "$WINETRICKS_WORKDIR"/breadcrumbs | tr '\012' ' '`
  16414. echo "You opted in, so reporting '$WINETRICKS_STATS_BREADCRUMBS' to the winetricks maintainer so he knows which winetricks verbs get used and which don't. Use --optout to disable future reports."
  16415. report="os=`winetricks_os_description`&winetricks=$WINETRICKS_VERSION&breadcrumbs=$WINETRICKS_STATS_BREADCRUMBS"
  16416. report="`echo $report | sed 's/ /%20/g'`"
  16417. # Just do a HEAD request with the raw commandline.
  16418. # Yes, this can be fooled by caches. That's ok.
  16419. if [ -x "`which wget 2>/dev/null`" ]
  16420. then
  16421. wget --spider "http://kegel.com/data/winetricks-usage?$report" > /dev/null 2>&1 || true
  16422. elif [ -x "`which curl 2>/dev/null`" ]
  16423. then
  16424. curl -I "http://kegel.com/data/winetricks-usage?$report" > /dev/null 2>&1 || true
  16425. fi
  16426. }
  16427. winetricks_stats_log_command()
  16428. {
  16429. # log what we execute for possible later statistics reporting
  16430. echo "$*" >> "$WINETRICKS_WORKDIR"/breadcrumbs
  16431. # and for the user's own reference later, when figuring out what he did
  16432. case "$OS" in
  16433. "Windows_NT") _W_LOGDIR="$W_WINDIR_UNIX"/Temp ;;
  16434. *) _W_LOGDIR="$WINEPREFIX" ;;
  16435. esac
  16436. mkdir -p "$_W_LOGDIR"
  16437. echo "$*" >> "$_W_LOGDIR"/winetricks.log
  16438. unset _W_LOGDIR
  16439. }
  16440. # Launch a new terminal window if in gui, or
  16441. # spawn a shell in the current window if commandline.
  16442. # New shell contains proper WINEPREFIX and WINE environment variables.
  16443. # May be useful when debugging verbs.
  16444. winetricks_shell()
  16445. {
  16446. (
  16447. cd "$W_DRIVE_C"
  16448. export WINE
  16449. case $WINETRICKS_GUI in
  16450. none)
  16451. $SHELL
  16452. ;;
  16453. *)
  16454. for term in gnome-terminal konsole Terminal xterm
  16455. do
  16456. if test `which $term` 2> /dev/null
  16457. then
  16458. $term
  16459. break
  16460. fi
  16461. done
  16462. ;;
  16463. esac
  16464. )
  16465. }
  16466. # Usage: execute_command verb[=argument]
  16467. execute_command()
  16468. {
  16469. case "$1" in
  16470. *=*) arg=`echo $1 | sed 's/.*=//'`; cmd=`echo $1 | sed 's/=.*//'`;;
  16471. *) cmd="$1"; arg="" ;;
  16472. esac
  16473. case "$1" in
  16474. # FIXME: avoid duplicated code
  16475. apps|benchmarks|dlls|fonts|games|prefix|settings)
  16476. WINETRICKS_CURMENU=$1
  16477. ;;
  16478. # Late options
  16479. -*)
  16480. if ! winetricks_handle_option $1
  16481. then
  16482. winetricks_usage
  16483. exit 1
  16484. fi
  16485. ;;
  16486. # Hard-coded verbs
  16487. main) WINETRICKS_CURMENU=main ;;
  16488. help) w_open_webpage https://code.google.com/archive/p/winetricks/wikis ;;
  16489. list) winetricks_list_all ;;
  16490. list-cached) winetricks_list_cached ;;
  16491. list-download) winetricks_list_download ;;
  16492. list-manual-download) winetricks_list_manual_download ;;
  16493. list-installed) winetricks_list_installed ;;
  16494. list-all)
  16495. old_menu="$WINETRICKS_CURMENU"
  16496. for WINETRICKS_CURMENU in apps benchmarks dlls fonts games prefix settings
  16497. do
  16498. echo "===== $WINETRICKS_CURMENU ====="
  16499. winetricks_list_all
  16500. done
  16501. WINETRICKS_CURMENU="$old_menu"
  16502. ;;
  16503. unattended) winetricks_set_unattended 1 ;;
  16504. attended) winetricks_set_unattended 0 ;;
  16505. showbroken) W_OPT_SHOWBROKEN=1 ;;
  16506. hidebroken) W_OPT_SHOWBROKEN=0 ;;
  16507. prefix=*) winetricks_set_wineprefix "$arg" ;;
  16508. annihilate) winetricks_annihilate_wineprefix ;;
  16509. folder) w_open_folder "$WINEPREFIX" ;;
  16510. winecfg) "$WINE" winecfg ;;
  16511. regedit) "$WINE" regedit ;;
  16512. taskmgr) "$WINE" taskmgr & ;;
  16513. uninstaller) "$WINE" uninstaller ;;
  16514. shell) winetricks_shell ;;
  16515. # These have to come before *=disabled to avoid looking like dlls
  16516. fontsmooth=disable*) w_call fontsmooth=disable ;;
  16517. glsl=disable*) w_call glsl=disabled ;;
  16518. multisampling=disable*) w_call multisampling=disabled ;;
  16519. mwo=disable*) w_call mwo=disable ;; # FIXME: relax matching so we can handle these spelling differences in verb instead of here
  16520. rtlm=disable*) w_call rtlm=disabled ;;
  16521. sound=disable*) w_call sound=disabled ;;
  16522. ao=disable*) w_call ao=disabled ;;
  16523. strictdrawordering=disable*) w_call strictdrawordering=disabled ;;
  16524. # Use winecfg if you want a gui for plain old dll overrides
  16525. alldlls=*) w_call $1 ;;
  16526. *=native) w_do_call native $cmd;;
  16527. *=builtin) w_do_call builtin $cmd;;
  16528. *=default) w_do_call default $cmd;;
  16529. *=disabled) w_do_call disabled $cmd;;
  16530. vd=*) w_do_call $cmd;;
  16531. # Hacks for backwards compatibility
  16532. cc580) w_call comctl32 ;;
  16533. comdlg32.ocx) w_call comdlg32ocx ;;
  16534. dotnet1) w_call dotnet11 ;;
  16535. dotnet2) w_call dotnet20 ;;
  16536. flash11) w_call flash ;;
  16537. fm20) w_call controlpad ;; # art2kmin also comes with fm20.dll
  16538. fontsmooth-bgr) w_call fontsmooth=bgr ;;
  16539. fontsmooth-disable) w_call fontsmooth=disable ;;
  16540. fontsmooth-gray) w_call fontsmooth=gray ;;
  16541. fontsmooth-rgb) w_call fontsmooth=rgb ;;
  16542. glsl-disable) w_call glsl=disabled ;;
  16543. glsl-enable) w_call glsl=enabled ;;
  16544. ie6_full) w_call ie6 ;;
  16545. jscript) w_call wsh56js ;; # FIXME: use wsh57 instead?
  16546. npm-repack) w_call npm=repack ;;
  16547. oss) w_call sound=oss ;;
  16548. python) w_call python26 ;;
  16549. python-comtypes) w_call python26_comtypes ;;
  16550. vbrun60) w_call vb6run ;;
  16551. vcrun2005sp1) w_call vcrun2005 ;;
  16552. vcrun2008sp1) w_call vcrun2008 ;;
  16553. wsh56) w_call wsh57 ;;
  16554. xlive) w_call gfw ;;
  16555. # Normal verbs, with metadata and load_ functions
  16556. *)
  16557. if winetricks_metadata_exists $1
  16558. then
  16559. w_call "$1"
  16560. else
  16561. echo Unknown arg $1
  16562. winetricks_usage
  16563. exit 1
  16564. fi
  16565. ;;
  16566. esac
  16567. }
  16568. if ! test "$WINETRICKS_LIB"
  16569. then
  16570. # If user opted out, save that preference now.
  16571. winetricks_stats_save
  16572. # If user specifies menu on commandline, execute that command, but don't commit to commandline mode
  16573. # FIXME: this code is duplicated several times; unify it
  16574. if echo "$WINETRICKS_CATEGORIES" | grep -w "$1" > /dev/null
  16575. then
  16576. WINETRICKS_CURMENU=$1
  16577. shift
  16578. fi
  16579. case "$1" in
  16580. die) w_die "we who are about to die salute you." ;;
  16581. volnameof=*)
  16582. # Debug code. Remove later?
  16583. # Since linux's volname command can't handle dvds, winetricks has its own,
  16584. # implemented using dd, old gum, and some string I had laying around.
  16585. # You can try it like this:
  16586. # winetricks volnameof=/dev/sr0
  16587. # or
  16588. # winetricks volnameof=foo.iso
  16589. # This will read the volname from the given image and put it to stdout.
  16590. winetricks_volname ${1#volnameof=}
  16591. ;;
  16592. "")
  16593. if test x"$DISPLAY" = x""
  16594. then
  16595. echo "DISPLAY not set, not defaulting to gui"
  16596. winetricks_usage
  16597. exit 0
  16598. fi
  16599. # GUI case
  16600. # No non-option arguments given, so read them from GUI, and loop until user quits
  16601. winetricks_detect_gui
  16602. winetricks_detect_sudo
  16603. while true
  16604. do
  16605. case $WINETRICKS_CURMENU in
  16606. main) verbs=`winetricks_mainmenu` ;;
  16607. prefix)
  16608. verbs=`winetricks_prefixmenu`;
  16609. # Cheezy hack: choosing 'attended' or 'unattended' leaves you in same menu
  16610. case "$verbs" in
  16611. attended) winetricks_set_unattended 0 ; continue;;
  16612. unattended) winetricks_set_unattended 1 ; continue;;
  16613. esac
  16614. ;;
  16615. settings) verbs=`winetricks_settings_menu` ;;
  16616. *) verbs="`winetricks_showmenu`" ;;
  16617. esac
  16618. if test "$verbs" = ""
  16619. then
  16620. # "user didn't pick anything, back up a level in the menu"
  16621. case "$WINETRICKS_CURMENU"-"$WINETRICKS_OPT_SHAREDPREFIX" in
  16622. apps-0|benchmarks-0|games-0|main-*) WINETRICKS_CURMENU=prefix ;;
  16623. prefix-*) break ;;
  16624. *) WINETRICKS_CURMENU=main ;;
  16625. esac
  16626. elif echo "$WINETRICKS_CATEGORIES" | grep -w "$verbs" > /dev/null
  16627. then
  16628. WINETRICKS_CURMENU=$verbs
  16629. else
  16630. winetricks_stats_init
  16631. # Otherwise user picked one or more real verbs.
  16632. case "$verbs" in
  16633. prefix=*)
  16634. # prefix menu is special, it only returns one verb, and the
  16635. # verb can contain spaces
  16636. execute_command "$verbs"
  16637. # after picking a prefix, want to land in main.
  16638. WINETRICKS_CURMENU=main ;;
  16639. *)
  16640. for verb in $verbs
  16641. do
  16642. execute_command "$verb"
  16643. done
  16644. case "$WINETRICKS_CURMENU"-"$WINETRICKS_OPT_SHAREDPREFIX" in
  16645. prefix-*|apps-0|benchmarks-0|games-0)
  16646. # After installing isolated app, return to prefix picker
  16647. WINETRICKS_CURMENU=prefix
  16648. ;;
  16649. *)
  16650. # Otherwise go to main menu.
  16651. WINETRICKS_CURMENU=main
  16652. ;;
  16653. esac
  16654. ;;
  16655. esac
  16656. fi
  16657. done
  16658. ;;
  16659. *)
  16660. winetricks_stats_init
  16661. # Commandline case
  16662. winetricks_detect_sudo
  16663. # User gave commandline arguments, so just run those verbs and exit
  16664. for verb
  16665. do
  16666. case $verb in
  16667. *.verb)
  16668. # Load the verb file
  16669. case $verb in
  16670. */*) . $verb ;;
  16671. *) . ./$verb ;;
  16672. esac
  16673. # And forget that the verb comes from a file
  16674. verb="`echo $verb | sed 's,.*/,,;s,.verb,,'`"
  16675. ;;
  16676. esac
  16677. execute_command "$verb"
  16678. done
  16679. ;;
  16680. esac
  16681. winetricks_stats_report
  16682. fi