oktadmin@192.168.122.64 780 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643
  1. #!/bin/sh
  2. # shellcheck disable=SC2030,SC2031
  3. # SC2030: Modification of WINE is local (to subshell caused by (..) group).
  4. # SC2031: WINE was modified in a subshell. That change might be lost
  5. # This has to be right after the shebang, see: https://github.com/koalaman/shellcheck/issues/779
  6. # Name of this version of winetricks (YYYYMMDD)
  7. # (This doesn't change often, use the sha256sum of the file when reporting problems)
  8. WINETRICKS_VERSION=20230212-next
  9. # This is a UTF-8 file
  10. # You should see an o with two dots over it here [ö]
  11. # You should see a micro (u with a tail) here [µ]
  12. # You should see a trademark symbol here [™]
  13. #--------------------------------------------------------------------
  14. #
  15. # Winetricks is a package manager for Win32 dlls and applications on POSIX.
  16. # Features:
  17. # - Consists of a single shell script - no installation required
  18. # - Downloads packages automatically from original trusted sources
  19. # - Points out and works around known wine bugs automatically
  20. # - Both command-line and GUI operation
  21. # - Can install many packages in silent (unattended) mode
  22. # - Multiplatform; written for Linux, but supports OS X and Cygwin too
  23. #
  24. # Uses the following non-POSIX system tools:
  25. # - wine is used to execute Win32 apps except on Cygwin.
  26. # - ar, cabextract, unrar, unzip, and 7z are needed by some verbs.
  27. # - aria2c, wget, curl, or fetch is needed for downloading.
  28. # - fuseiso, archivemount (Linux), or hdiutil (macOS) is used to mount .iso images.
  29. # - perl is used for displaying download progress for wget when using zenity
  30. # - pkexec, sudo, or kdesu (gksu/gksudo/kdesudo are deprecated upstream but also still supported)
  31. # are used to mount .iso images if the user cached them with -k option.
  32. # - sha256sum, sha256, or shasum (OSX 10.5 does not support these, 10.6+ is required)
  33. # - torify is used with option "--torify" if sites are blocked in single countries.
  34. # - xdg-open (if present) or open (for OS X) is used to open download pages
  35. # for the user when downloads cannot be fully automated.
  36. # - xz is used by some verbs to decompress tar archives.
  37. # - zenity is needed by the GUI, though it can limp along somewhat with kdialog/xmessage.
  38. #
  39. # On Ubuntu (20.04 and newer), the following line can be used to install all the prerequisites:
  40. # sudo apt install aria2 binutils cabextract fuseiso p7zip-full pkexec tor unrar unzip wine xdg-utils xz-utils zenity
  41. #
  42. # On older Ubuntu, the following line can be used to install all the prerequisites:
  43. # sudo apt install aria2 binutils cabextract fuseiso p7zip-full policykit-1 tor unrar unzip wine xdg-utils xz-utils zenity
  44. #
  45. # On Fedora, these commands can be used (RPM Fusion is used to install unrar):
  46. # sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
  47. # sudo dnf install binutils cabextract fuseiso p7zip-plugins polkit tor unrar unzip wget wine xdg-utils xz zenity
  48. #
  49. # See https://github.com/Winetricks/winetricks for documentation and tutorials,
  50. # including how to contribute changes to winetricks.
  51. #
  52. #--------------------------------------------------------------------
  53. #
  54. # Copyright:
  55. # Copyright (C) 2007-2014 Dan Kegel <dank!kegel.com>
  56. # Copyright (C) 2008-2022 Austin English <austinenglish!gmail.com>
  57. # Copyright (C) 2010-2011 Phil Blankenship <phillip.e.blankenship!gmail.com>
  58. # Copyright (C) 2010-2015 Shannon VanWagner <shannon.vanwagner!gmail.com>
  59. # Copyright (C) 2010 Belhorma Bendebiche <amro256!gmail.com>
  60. # Copyright (C) 2010 Eleazar Galano <eg.galano!gmail.com>
  61. # Copyright (C) 2010 Travis Athougies <iammisc!gmail.com>
  62. # Copyright (C) 2010 Andrew Nguyen
  63. # Copyright (C) 2010 Detlef Riekenberg
  64. # Copyright (C) 2010 Maarten Lankhorst
  65. # Copyright (C) 2010 Rico Schüller
  66. # Copyright (C) 2011 Scott Jackson <sjackson2!gmx.com>
  67. # Copyright (C) 2011 Trevor Johnson
  68. # Copyright (C) 2011 Franco Junio
  69. # Copyright (C) 2011 Craig Sanders
  70. # Copyright (C) 2011 Matthew Bauer <mjbauer95!gmail.com>
  71. # Copyright (C) 2011 Giuseppe Dia
  72. # Copyright (C) 2011 Łukasz Wojniłowicz
  73. # Copyright (C) 2011 Matthew Bozarth
  74. # Copyright (C) 2013-2017 Andrey Gusev <andrey.goosev!gmail.com>
  75. # Copyright (C) 2013-2020 Hillwood Yang <hillwood!opensuse.org>
  76. # Copyright (C) 2013,2016 André Hentschel <nerv!dawncrow.de>
  77. # Copyright (C) 2023 Georgi Georgiev (RacerBG) <g.georgiev.shumen!gmail.com>
  78. #
  79. # License:
  80. # This program is free software; you can redistribute it and/or
  81. # modify it under the terms of the GNU Lesser General Public
  82. # License as published by the Free Software Foundation; either
  83. # version 2.1 of the License, or (at your option) any later
  84. # version.
  85. #
  86. # This program is distributed in the hope that it will be useful,
  87. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  88. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  89. # GNU Lesser General Public License for more details.
  90. #
  91. # You should have received a copy of the GNU Lesser General Public
  92. # License along with this program. If not, see
  93. # <https://www.gnu.org/licenses/>.
  94. #
  95. #--------------------------------------------------------------------
  96. # Coding standards:
  97. #
  98. # Portability:
  99. # - Portability matters, as this script is run on many operating systems
  100. # - No bash, zsh, or csh extensions; only use features from
  101. # the POSIX standard shell and utilities; see
  102. # https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
  103. # - Prefer classic sh idioms as described in e.g.
  104. # "Portable Shell Programming" by Bruce Blinn, ISBN: 0-13-451494-7
  105. # - If there is no universally available program for a needed function,
  106. # support the two most frequently available programs.
  107. # e.g. fall back to wget if curl is not available; likewise, support
  108. # both sha256sum and sha256.
  109. # - When using Unix commands like cp, put options before filenames so it will
  110. # work on systems like OS X. e.g. "rm -f foo.dat", not "rm foo.dat -f"
  111. #
  112. # Formatting:
  113. # - Your terminal and editor must be configured for UTF-8
  114. # If you do not see an o with two dots over it here [ö], stop!
  115. # - Do not use tabs in this file or any verbs.
  116. # - Indent 4 spaces.
  117. # - Try to keep line length below 80 (makes printing easier)
  118. # - Open curly braces ('{'),
  119. # then should go on the same line as 'if/elif'
  120. # close curlies ('}') and 'fi' should line up with the matching { or if,
  121. # cases indented 4 spaces from 'case' and 'esac'. For instance,
  122. #
  123. # if test "$FOO" = "bar"; then
  124. # echo "FOO is bar"
  125. # fi
  126. #
  127. # case "$FOO" in
  128. # bar) echo "FOO is still bar" ;;
  129. # esac
  130. #
  131. # Commenting:
  132. # - Comments should explain intent in English
  133. # - Keep functions short and well named to reduce need for comments
  134. #
  135. # Naming:
  136. # Public things defined by this script, for use by verbs:
  137. # - Variables have uppercase names starting with W_
  138. # - Functions have lowercase names starting with w_
  139. #
  140. # Private things internal to this script, not for use by verbs:
  141. # - Local variables have lowercase names starting with uppercase _W_
  142. # (and should not use the local declaration, as it is not POSIX)
  143. # - Global variables have uppercase names starting with WINETRICKS_
  144. # - Functions have lowercase names starting with winetricks_
  145. # FIXME: A few verbs still use winetricks-private functions or variables.
  146. #
  147. # Internationalization / localization:
  148. # - Important or frequently used message should be internationalized
  149. # so translations can be easily added. For example:
  150. # case $LANG in
  151. # de*) echo "Das ist die deutsche Meldung" ;;
  152. # *) echo "This is the English message" ;;
  153. # esac
  154. #
  155. # Support:
  156. # - Winetricks is maintained by Austin English <austinenglish!$gmail.com>.
  157. # - If winetricks has helped you out, then please consider donating to the FSF/EFF as a thank you:
  158. # * EFF - https://supporters.eff.org/donate/button
  159. # * FSF - https://my.fsf.org/donate
  160. # - Donations towards electricity bill and developer beer fund can be sent via Bitcoin to 18euSAZztpZ9wcN6xZS3vtNnE1azf8niDk
  161. # - I try to actively respond to bugs and pull requests on GitHub:
  162. # - Bugs: https://github.com/Winetricks/winetricks/issues/new
  163. # - Pull Requests: https://github.com/Winetricks/winetricks/pulls
  164. #--------------------------------------------------------------------
  165. # Using TRUE and FALSE instead of 0 and 1, to make the logic flow better and cause less confusion with other languages's definitions.
  166. TRUE=0
  167. FALSE=1
  168. # FIXME: XDG_CACHE_HOME is defined twice, clean this up
  169. XDG_DATA_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}"
  170. XDG_CACHE_HOME="${XDG_CACHE_HOME:-${HOME}/.cache}"
  171. W_COUNTRY=""
  172. W_PREFIXES_ROOT="${WINE_PREFIXES:-${XDG_DATA_HOME}/wineprefixes}"
  173. # For temp files before $WINEPREFIX is available:
  174. if [ -x "$(command -v mktemp 2>/dev/null)" ] ; then
  175. W_TMP_EARLY="$(mktemp -d "${TMPDIR:-/tmp}/winetricks.XXXXXXXX")"
  176. elif [ -w "${TMPDIR}" ] ; then
  177. W_TMP_EARLY="${TMPDIR}"
  178. else
  179. W_TMP_EARLY="/tmp"
  180. fi
  181. W_TEXT_LINE="------------------------------------------------------"
  182. #---- Public Functions ----
  183. # Ask permission to continue
  184. w_askpermission()
  185. {
  186. printf '%s\n%b\n%s\n' "${W_TEXT_LINE}" "${@}" "${W_TEXT_LINE}"
  187. if test "${W_OPT_UNATTENDED}"; then
  188. _W_timeout="--timeout"
  189. _W_timeout_length="5"
  190. fi
  191. case ${WINETRICKS_GUI} in
  192. zenity) ${WINETRICKS_GUI} "${_W_timeout}" "${_W_timeout_length}" --question --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')" --no-wrap;;
  193. kdialog) ${WINETRICKS_GUI} --title winetricks --warningcontinuecancel "$@" ;;
  194. none)
  195. if [ -n "${_W_timeout}" ]; then
  196. # -t / TMOUT don't seem to be portable, so just assume yes in unattended mode
  197. w_info "Unattended mode, not prompting for confirmation"
  198. else
  199. printf %s "Press Y or N, then Enter: "
  200. read -r response
  201. test "${response}" = Y || test "${response}" = y
  202. fi
  203. esac
  204. if test $? -ne 0; then
  205. case ${LANG} in
  206. bg*) w_die "Операцията е отменена, излизане." ;;
  207. uk*) w_die "Операція скасована." ;;
  208. pl*) w_die "Anulowano operację, opuszczanie." ;;
  209. pt*) w_die "Operação cancelada, saindo." ;;
  210. *) w_die "Operation cancelled, quitting." ;;
  211. esac
  212. fi
  213. unset _W_timeout
  214. }
  215. # Display info message. Time out quickly if user doesn't click.
  216. w_info()
  217. {
  218. # If $WINETRICKS_SUPER_QUIET is set, w_info is a no-op:
  219. if [ -z "${WINETRICKS_SUPER_QUIET}" ] ; then
  220. printf '%s\n%b\n%s\n' "${W_TEXT_LINE}" "${@}" "${W_TEXT_LINE}"
  221. fi
  222. # kdialog doesn't allow a timeout unless you use --passivepopup
  223. if test "${W_OPT_UNATTENDED}"; then
  224. case ${WINETRICKS_GUI} in
  225. zenity) ${WINETRICKS_GUI} --timeout 5 --info --width=400 --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')";;
  226. kdialog) ${WINETRICKS_GUI} --passivepopup "$@" 5 --title winetricks;;
  227. none) ;;
  228. esac
  229. else
  230. case ${WINETRICKS_GUI} in
  231. zenity) ${WINETRICKS_GUI} --info --width=400 --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')";;
  232. kdialog) ${WINETRICKS_GUI} --title winetricks --error "$@";;
  233. none) ;;
  234. esac
  235. fi
  236. }
  237. # Display warning message to stderr (since it is called inside redirected code)
  238. w_warn()
  239. {
  240. # If $WINETRICKS_SUPER_QUIET is set, w_info is a no-op:
  241. if [ -z "${WINETRICKS_SUPER_QUIET}" ] ; then
  242. printf '%s\nwarning: %b\n%s\n' "${W_TEXT_LINE}" "${*}" "${W_TEXT_LINE}"
  243. fi
  244. # kdialog doesn't allow a timeout unless you use --passivepopup
  245. if test "${W_OPT_UNATTENDED}"; then
  246. case ${WINETRICKS_GUI} in
  247. zenity) ${WINETRICKS_GUI} --timeout 5 --error --width=400 --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')";;
  248. kdialog) ${WINETRICKS_GUI} --passivepopup "$@" 5 --title winetricks;;
  249. none) ;;
  250. esac
  251. else
  252. case ${WINETRICKS_GUI} in
  253. zenity) ${WINETRICKS_GUI} --error --width=400 --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')";;
  254. kdialog) ${WINETRICKS_GUI} --title winetricks --error "$@";;
  255. none) ;;
  256. esac
  257. fi
  258. unset _W_timeout
  259. }
  260. # Display warning message to stderr (since it is called inside redirected code)
  261. # And give gui user option to cancel (for when used in a loop)
  262. # If user cancels, exit status is 1
  263. w_warn_cancel()
  264. {
  265. printf '%s\n%b\n%s\n' "${W_TEXT_LINE}" "${@}" "${W_TEXT_LINE}" >&2
  266. if test "${W_OPT_UNATTENDED}"; then
  267. _W_timeout="--timeout"
  268. _W_timeout_length="5"
  269. fi
  270. # Zenity has no cancel button, but will set status to 1 if you click the go-away X
  271. case ${WINETRICKS_GUI} in
  272. zenity) ${WINETRICKS_GUI} "${_W_timeout}" "${_W_timeout_length}" --error --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')";;
  273. kdialog) ${WINETRICKS_GUI} --title winetricks --warningcontinuecancel "$@" ;;
  274. none) ;;
  275. esac
  276. # can't unset, it clears status
  277. }
  278. # Display fatal error message and terminate script
  279. w_die()
  280. {
  281. w_warn "$@"
  282. exit 1
  283. }
  284. # Kill all instances of a process in a safe way (Solaris killall kills _everything_)
  285. w_killall()
  286. {
  287. # shellcheck disable=SC2046,SC2086
  288. kill -s KILL $(pgrep $1)
  289. }
  290. # Helper for w_package_broken() and friends. If --force is used, continue.
  291. # If not, exit 99 or the optional value passed as $1
  292. _w_force_continue_check()
  293. {
  294. exitval="${1:-99}"
  295. if [ "${WINETRICKS_FORCE}" = 1 ]; then
  296. w_warn "--force was used, so trying anyway. Caveat emptor."
  297. else
  298. exit "${exitval}"
  299. fi
  300. }
  301. _w_get_broken_messages()
  302. {
  303. # bit of a hack, but otherwise if two bugs are reported, the second message won't get set:
  304. unset broken_good_version_known
  305. unset broken_good_and_bad_version_known
  306. unset broken_only_bad_version_known
  307. unset broken_no_version_known
  308. # Unify the broken messages (to make it easier for future translators):
  309. case ${LANG} in
  310. bg*)
  311. # default broken messages
  312. broken_good_version_known_default="Пакетът (${W_PACKAGE}) е повреден в wine-${_wine_version_stripped}. Използвайте >=${good_version}. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  313. broken_good_and_bad_version_known_default="Пакетът (${W_PACKAGE}) е повреден в wine-${_wine_version_stripped}. Повреден е от версия ${bad_version}. Използвайте >=${good_version}. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  314. broken_only_bad_version_known_default="Пакетът (${W_PACKAGE}) е повреден в wine-${_wine_version_stripped}. Повреден е от версия ${bad_version}. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  315. broken_no_version_known_default="Пакетът (${W_PACKAGE}) е повреден. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  316. # mingw broken messages
  317. broken_good_version_known_mingw="Пакетът (${W_PACKAGE}) е повреден в wine-${_wine_version_stripped}, когато wine е създаден с mingw. Използвайте >=${good_version} или wine, без mingw. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  318. broken_good_and_bad_version_known_mingw="Пакетът (${W_PACKAGE}) е повреден в wine-${_wine_version_stripped}. Повреден е от версия ${bad_version}, когато wine е създаден с mingw. Използвайте >=${good_version} или wine, без mingw. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  319. broken_only_bad_version_known_mingw="Пакетът (${W_PACKAGE}) е повреден в wine-${_wine_version_stripped}. Повреден е от версия ${bad_version}, когато wine е създаден с mingw. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  320. broken_no_version_known_mingw="Пакетът (${W_PACKAGE}) е повреден, когато wine е създаден с mingw. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  321. # no mingw broken messages
  322. broken_good_version_known_no_mingw="Пакетът (${W_PACKAGE}) е повреден в wine-${_wine_version_stripped}, когато wine е създаден без mingw. Използвайте >=${good_version}. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  323. broken_good_and_bad_version_known_no_mingw="Пакетът (${W_PACKAGE}) е повреден в wine-${_wine_version_stripped}. Повреден е от версия ${bad_version}, когато wine е създаден без mingw. Използвайте >=${good_version}. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  324. broken_only_bad_version_known_no_mingw="Пакетът (${W_PACKAGE}) е повреден в wine-${_wine_version_stripped}. Повреден е от версия ${bad_version}, когато wine е създаден без mingw. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  325. broken_no_version_known_no_mingw="Пакетът (${W_PACKAGE}) е повреден, когато wine е създаден без mingw. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  326. # win64 broken messages
  327. broken_good_version_known_win64="Пакетът (${W_PACKAGE}) е повреден при 64-битовата архитектура на wine-${_wine_version_stripped}. Използвайте папка, създадена с WINEARCH=win32 или wine >=${good_version}. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  328. broken_good_and_bad_version_known_win64="Пакетът (${W_PACKAGE}) е повреден при 64-битовата архитектура на wine-${_wine_version_stripped}. Повреден е от версия ${bad_version}. Използвайте папка, създадена с WINEARCH=win32 или wine to >=${good_version}. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  329. broken_only_bad_version_known_win64="Пакетът (${W_PACKAGE}) е повреден при 64-битовата архитектура на wine-${_wine_version_stripped}. Повреден е от версия ${bad_version}. Използвайте папка, създадена с WINEARCH=win32. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  330. broken_no_version_known_win64="Пакетът (${W_PACKAGE}) е повреден, когато wine е създаден без mingw. Вижте ${bug_link} за повече информация. Използвайте --force, за да опитате въпреки това."
  331. ;;
  332. pt*)
  333. # default broken messages
  334. broken_good_version_known_default="O pacote (${W_PACKAGE}) está quebrado no wine-${_wine_version_stripped}. Atualize para >=${good_version}. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  335. broken_good_and_bad_version_known_default="O pacote (${W_PACKAGE}) está quebrado no wine-${_wine_version_stripped}. Quebrado desde ${bad_version}. Atualize para >=${good_version}. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  336. broken_only_bad_version_known_default="O pacote (${W_PACKAGE}) está quebrado no wine-${_wine_version_stripped}. Quebrado desde ${bad_version}. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  337. broken_no_version_known_default="Este pacote (${W_PACKAGE}) está quebrado. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  338. # mingw broken messages
  339. broken_good_version_known_mingw="Este pacote (${W_PACKAGE}) está quebrado no wine-${_wine_version_stripped} quando o wine é feito com o mingw. Atualize para >=${good_version} ou refaça o wine sem mingw. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  340. broken_good_and_bad_version_known_mingw="O pacote (${W_PACKAGE}) está quebrado no wine-${_wine_version_stripped}. Quebrado desde ${bad_version} quando o wine é feito com o mingw. Atualize para >=${good_version} ou refaça o wine sem mingw. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  341. broken_only_bad_version_known_mingw="O pacote (${W_PACKAGE}) está quebrado no wine-${_wine_version_stripped}. Quebrado desde ${bad_version} quando o wine é feito com o mingw. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  342. broken_no_version_known_mingw="Este pacote (${W_PACKAGE}) está quebrado quando o wine é feito com o mingw. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  343. # no mingw broken messages
  344. broken_good_version_known_no_mingw="Este pacote (${W_PACKAGE}) está quebrado no wine-${_wine_version_stripped} quando o wine é feito sem mingw. Atualize para >=${good_version}. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  345. broken_good_and_bad_version_known_no_mingw="O pacote (${W_PACKAGE}) está quebrado no wine-${_wine_version_stripped}. Quebrado desde ${bad_version} quando o wine é feito sem mingw. Atualize para >=${good_version}. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  346. broken_only_bad_version_known_no_mingw="O pacote (${W_PACKAGE}) está quebrado no wine-${_wine_version_stripped}. Quebrado desde ${bad_version} quando o wine é feito sem mingw. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  347. broken_no_version_known_no_mingw="Este pacote (${W_PACKAGE}) está quebrado quando o wine é feito sem mingw. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  348. # win64 broken messages
  349. broken_good_version_known_win64="Este pacote (${W_PACKAGE}) está quebrado em 64-bit wine-${_wine_version_stripped}. Use um prefixo feito com WINEARCH=win32 ou atualize o wine para >=${good_version} para trabalhar com isto. Or use --force to try anyway. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  350. broken_good_and_bad_version_known_win64="Este pacote (${W_PACKAGE}) está quebrado em 64-bit wine-${_wine_version_stripped}. Quebrado desde ${bad_version}. Use um prefixo feito com WINEARCH=win32 ou atualize o wine para >=${good_version} para trabalhar com isto. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  351. broken_only_bad_version_known_win64="Este pacote (${W_PACKAGE}) está quebrado em 64-bit wine-${_wine_version_stripped}. Quebrado desde ${bad_version}. Use um prefixo feito com WINEARCH=win32 para trabalhar com isto. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  352. broken_no_version_known_win64="Este pacote (${W_PACKAGE}) está quebrado quando o wine é feito sem mingw. Veja ${bug_link} para mais informações. Use --force para tentar forçar de toda forma."
  353. ;;
  354. *)
  355. # default broken messages
  356. broken_good_version_known_default="This package (${W_PACKAGE}) is broken in wine-${_wine_version_stripped}. Upgrade to >=${good_version}. See ${bug_link} for more info. Use --force to try anyway."
  357. broken_good_and_bad_version_known_default="This package (${W_PACKAGE}) is broken in wine-${_wine_version_stripped}. Broken since ${bad_version}. Upgrade to >=${good_version}. See ${bug_link} for more info. Use --force to try anyway."
  358. broken_only_bad_version_known_default="This package (${W_PACKAGE}) is broken in wine-${_wine_version_stripped}. Broken since ${bad_version}. See ${bug_link} for more info. Use --force to try anyway."
  359. broken_no_version_known_default="This package (${W_PACKAGE}) is broken. See ${bug_link} for more info. Use --force to try anyway."
  360. # mingw broken messages
  361. broken_good_version_known_mingw="This package (${W_PACKAGE}) is broken in wine-${_wine_version_stripped} when wine is built with mingw. Upgrade to >=${good_version} or rebuild wine without mingw. See ${bug_link} for more info. Use --force to try anyway."
  362. broken_good_and_bad_version_known_mingw="This package (${W_PACKAGE}) is broken in wine-${_wine_version_stripped}. Broken since ${bad_version} when wine is built with mingw. Upgrade to >=${good_version} or rebuild wine without mingw. See ${bug_link} for more info. Use --force to try anyway."
  363. broken_only_bad_version_known_mingw="This package (${W_PACKAGE}) is broken in wine-${_wine_version_stripped}. Broken since ${bad_version} when wine is built with mingw. See ${bug_link} for more info. Use --force to try anyway."
  364. broken_no_version_known_mingw="This package (${W_PACKAGE}) is broken when wine is built with mingw. See ${bug_link} for more info. Use --force to try anyway."
  365. # no mingw broken messages
  366. broken_good_version_known_no_mingw="This package (${W_PACKAGE}) is broken in wine-${_wine_version_stripped} when wine is built without mingw. Upgrade to >=${good_version}. See ${bug_link} for more info. Use --force to try anyway."
  367. broken_good_and_bad_version_known_no_mingw="This package (${W_PACKAGE}) is broken in wine-${_wine_version_stripped}. Broken since ${bad_version} when wine is built without mingw. Upgrade to >=${good_version}. See ${bug_link} for more info. Use --force to try anyway."
  368. broken_only_bad_version_known_no_mingw="This package (${W_PACKAGE}) is broken in wine-${_wine_version_stripped}. Broken since ${bad_version} when wine is built without mingw. See ${bug_link} for more info. Use --force to try anyway."
  369. broken_no_version_known_no_mingw="This package (${W_PACKAGE}) is broken when wine is built without mingw. See ${bug_link} for more info. Use --force to try anyway."
  370. # win64 broken messages
  371. broken_good_version_known_win64="This package (${W_PACKAGE}) is broken on 64-bit wine-${_wine_version_stripped}. Use a prefix made with WINEARCH=win32 or upgrade wine to >=${good_version} to work around this. Or use --force to try anyway. See ${bug_link} for more info. Use --force to try anyway."
  372. broken_good_and_bad_version_known_win64="This package (${W_PACKAGE}) is broken on 64-bit wine-${_wine_version_stripped}. Broken since ${bad_version}. Use a prefix made with WINEARCH=win32 or upgrade wine to >=${good_version} to work around this. See ${bug_link} for more info. Use --force to try anyway."
  373. broken_only_bad_version_known_win64="This package (${W_PACKAGE}) is broken on 64-bit wine-${_wine_version_stripped}. Broken since ${bad_version}. Use a prefix made with WINEARCH=win32 to work around this. See ${bug_link} for more info. Use --force to try anyway."
  374. broken_no_version_known_win64="This package (${W_PACKAGE}) is broken when wine is built without mingw. See ${bug_link} for more info. Use --force to try anyway."
  375. ;;
  376. esac
  377. }
  378. # Warn user if package is broken (on all arches) in the current wine version. Bug report required.
  379. w_package_broken()
  380. {
  381. # FIXME: test cases for this
  382. bug_link="$1"
  383. bad_version="$2" # Optional, for upstream regressions
  384. good_version="$3" # Optional, if it's been fixed upstream
  385. _w_get_broken_messages
  386. broken_good_version_known="${broken_good_version_known:-${broken_good_version_known_default}}"
  387. broken_good_and_bad_version_known="${broken_good_and_bad_version_known:-${broken_good_and_bad_version_known_default}}"
  388. broken_only_bad_version_known="${broken_only_bad_version_known:-${broken_only_bad_version_known_default}}"
  389. broken_no_version_known="${broken_no_version_known:-${broken_no_version_known_default}}"
  390. if [ -z "${bug_link}" ] ; then
  391. w_die "Bug report link required!"
  392. fi
  393. if [ -n "${good_version}" ] && [ -n "${bad_version}" ]; then
  394. if w_wine_version_in "${bad_version},${good_version}"; then
  395. w_warn "${broken_good_and_bad_version_known}"
  396. else
  397. return
  398. fi
  399. elif [ -n "${good_version}" ]; then
  400. if w_wine_version_in ,"${good_version}"; then
  401. w_warn "${broken_good_version_known}"
  402. else
  403. return
  404. fi
  405. elif [ -n "${bad_version}" ]; then
  406. if w_wine_version_in "${bad_version}",; then
  407. w_warn "${broken_only_bad_version_known}"
  408. else
  409. return
  410. fi
  411. else
  412. w_warn "${broken_no_version_known}"
  413. fi
  414. unset broken_good_version_known
  415. unset broken_good_and_bad_version_known
  416. unset broken_only_bad_version_known
  417. unset broken_no_version_known
  418. _w_force_continue_check
  419. }
  420. w_detect_mingw()
  421. {
  422. # mingw builds have some (not yet all) .dll files in ${WINE}/../lib{,64}/wine
  423. # non-mingw have exclusively .dll.so files
  424. #
  425. # It's more portable though, to check for 'Wine (placeholder|builtin) DLL'
  426. # placeholder=no-mingw
  427. # builtin=mingw (wine-4.11+)
  428. # See https://github.com/Winetricks/winetricks/issues/1461
  429. if grep -obUa "Wine placeholder DLL" "$(w_winepath -u "c:\\windows\\system32\\kernelbase.dll" 2>/dev/null)" | grep -q '64:Wine placeholder DLL'; then
  430. _W_no_mingw=1
  431. elif grep -obUa "Wine builtin DLL" "$(w_winepath -u "c:\\windows\\system32\\kernelbase.dll" 2>/dev/null)" | grep -q '64:Wine builtin DLL'; then
  432. _W_mingw=1
  433. else
  434. w_warn "Unable to detect wine dlls, please file an issue on Github!"
  435. fi
  436. }
  437. # Warn user if package is broken in the current wine version when compiled with mingw. Bug report required.
  438. w_package_broken_mingw()
  439. {
  440. # FIXME: test cases for this
  441. bug_link="$1"
  442. bad_version="$2" # Optional, for upstream regressions
  443. good_version="$3" # Optional, if it's been fixed upstream
  444. w_detect_mingw
  445. _w_get_broken_messages
  446. if [ -z "${_W_mingw}" ]; then
  447. echo "Not using a mingw build, nothing to do"
  448. return
  449. fi
  450. broken_good_version_known="${broken_good_version_known_mingw}"
  451. broken_good_and_bad_version_known="${broken_good_and_bad_version_known_mingw}"
  452. broken_only_bad_version_known="${broken_only_bad_version_known_mingw}"
  453. broken_no_version_known="${broken_no_version_known_mingw}"
  454. w_package_broken "${bug_link}" "${bad_version}" "${good_version}"
  455. }
  456. # Warn user if package is broken in the current wine version when compiled without mingw. Bug report required.
  457. w_package_broken_no_mingw()
  458. {
  459. # FIXME: test cases for this
  460. bug_link="$1"
  461. bad_version="$2" # Optional, for upstream regressions
  462. good_version="$3" # Optional, if it's been fixed upstream
  463. w_detect_mingw
  464. _w_get_broken_messages
  465. if [ -z "${_W_no_mingw}" ]; then
  466. echo "Using a mingw build, nothing to do"
  467. return
  468. fi
  469. broken_good_version_known="${broken_good_version_known_no_mingw}"
  470. broken_good_and_bad_version_known="${broken_good_and_bad_version_known_no_mingw}"
  471. broken_only_bad_version_known="${broken_only_bad_version_known_no_mingw}"
  472. broken_no_version_known="${broken_no_version_known_no_mingw}"
  473. w_package_broken "${bug_link}" "${bad_version}" "${good_version}"
  474. }
  475. # Warn user if package is broken on win64.
  476. w_package_broken_win64()
  477. {
  478. # FIXME: test cases for this
  479. bug_link="$1"
  480. bad_version="$2" # Optional, for upstream regressions
  481. good_version="$3" # Optional, if it's been fixed upstream
  482. _w_get_broken_messages
  483. if [ "${W_ARCH}" != "win64" ]; then
  484. echo "Not using a 64-bit prefix, nothing to do"
  485. return
  486. fi
  487. broken_good_version_known="${broken_good_version_known_win64}"
  488. broken_good_and_bad_version_known="${broken_good_and_bad_version_known_win64}"
  489. broken_only_bad_version_known="${broken_only_bad_version_known_win64}"
  490. broken_no_version_known="${broken_no_version_known_win64}"
  491. w_package_broken "${bug_link}" "${bad_version}" "${good_version}"
  492. }
  493. # Some packages don't support win32, die with an appropriate message
  494. # Returns 64 (for tests/winetricks-test)
  495. w_package_unsupported_win32()
  496. {
  497. if [ "${W_ARCH}" = "win32" ] ; then
  498. w_warn "This package (${W_PACKAGE}) does not work on a 32-bit installation. You must use a prefix made with WINEARCH=win64."
  499. _w_force_continue_check 64
  500. fi
  501. }
  502. # Some packages don't support win64, die with an appropriate message
  503. # Note: this is for packages that natively don't support win64, not packages that are broken on wine64, for that, use w_package_broken_win64()
  504. # Returns 32 (for tests/winetricks-test)
  505. w_package_unsupported_win64()
  506. {
  507. if [ "${W_ARCH}" = "win64" ] ; then
  508. case ${LANG} in
  509. bg*) w_warn "Пакетът (${W_PACKAGE}) не работи на 64-битовите инсталации. Трябва да използвате папка, създадена с WINEARCH=win32." ;;
  510. pl*) w_warn "Ten pakiet (${W_PACKAGE}) nie działa z 64-bitową instalacją. Musisz użyć prefiksu utworzonego z WINEARCH=win32." ;;
  511. pt*) w_warn "Este pacote (${W_PACKAGE}) não funciona em instalação de 64-bit. Você precisa usar um prefixo feito com WINEARCH=win32." ;;
  512. ru*) w_warn "Данный пакет не работает в 64-битном окружении. Используйте префикс, созданный с помощью WINEARCH=win32." ;;
  513. zh_CN*) w_warn "(${W_PACKAGE}) 无法在64位下工作,只能将容器变量设置为 WINEARCH=win32 安装。" ;;
  514. zh_TW*|zh_HK*) w_warn "(${W_PACKAGE}) 無法在64元下工作,只能將容器變數設定為 WINEARCH=win32 安装。" ;;
  515. *) w_warn "This package (${W_PACKAGE}) does not work on a 64-bit installation. You must use a prefix made with WINEARCH=win32." ;;
  516. esac
  517. _w_force_continue_check 32
  518. fi
  519. }
  520. # For packages that are not well tested or have some known issues on win64, but aren't broken
  521. w_package_warn_win64()
  522. {
  523. if [ "${W_ARCH}" = "win64" ] ; then
  524. case ${LANG} in
  525. bg*) w_warn "Пакетът (${W_PACKAGE}) вероятно няма да работи на 64-битовите инсталации. 32-битовите папки може да работят по-добре." ;;
  526. pt*) w_warn "Este pacote (${W_PACKAGE}) talvez não funcione completamente em 64-bit. Em prefixo 32-bit talvez funcione melhor." ;;
  527. pl*) w_warn "Ten pakiet (${W_PACKAGE}) może nie działać poprawnie z 64-bitową instalacją. Prefiks 32-bitowy może działać lepiej." ;;
  528. ru*) w_warn "Данный пакет может быть не полностью работоспособным в 64-битном окружении. 32-битные префиксы могут работать лучше." ;;
  529. zh_CN*) w_warn "(${W_PACKAGE}) 可能在64位环境下工作有问题,安装在32位环境可能会更好。" ;;
  530. zh_TW*|zh_HK*) w_warn "(${W_PACKAGE}) 可能在64元環境下工作有問題,安装在32元環境可能會更好。" ;;
  531. *) w_warn "This package (${W_PACKAGE}) may not fully work on a 64-bit installation. 32-bit prefixes may work better." ;;
  532. esac
  533. fi
  534. }
  535. ### w_try and w_try wrappers ###
  536. # Execute with error checking
  537. # Put this in front of any command that might fail
  538. w_try()
  539. {
  540. # "VAR=foo w_try cmd" fails to put VAR in the environment
  541. # with some versions of bash if w_try is a shell function?!
  542. # This is a problem when trying to pass environment variables to e.g. wine.
  543. # Adding an explicit export here works around it, so add any we use.
  544. export WINEDLLOVERRIDES
  545. # If $WINETRICKS_SUPER_QUIET is set, make w_try quiet
  546. if [ -z "${WINETRICKS_SUPER_QUIET}" ]; then
  547. printf '%s\n' "Executing $*"
  548. fi
  549. # On Vista, we need to jump through a few hoops to run commands in Cygwin.
  550. # First, .exe's need to have the executable bit set.
  551. # Second, only cmd can run setup programs (presumably for security).
  552. # If $1 ends in .exe, we know we're running on real Windows, otherwise
  553. # $1 would be 'wine'.
  554. case "$1" in
  555. *.exe)
  556. chmod +x "$1" || true # don't care if it fails
  557. cmd /c "$@"
  558. ;;
  559. *)
  560. "$@"
  561. ;;
  562. esac
  563. status=$?
  564. en_ms_5="exit status ${status} - user selected 'Cancel'"
  565. en_ms_105="exit status ${status} - normal, user selected 'restart now'"
  566. en_ms_194="exit status ${status} - normal, user selected 'restart later'"
  567. en_ms_236="exit status ${status} - newer version detected"
  568. bg_abort="Важно: командата $* върна статуса ${status}. Прекратяване."
  569. en_abort="Note: command $* returned status ${status}. Aborting."
  570. pl_abort="Informacja: poelcenie $* zwróciło status ${status}. Przerywam."
  571. pt_abort="Nota: comando $* retornou o status ${status}. Cancelando."
  572. ru_abort="Важно: команда $* вернула статус ${status}. Прерывание."
  573. if [ -n "${_w_ms_installer}" ]; then
  574. case ${status} in
  575. # Nonfatal
  576. 0) ;;
  577. 105) echo "${en_ms_105}" ;;
  578. 194) echo "${en_ms_194}" ;;
  579. 236) echo "${en_ms_236}" ;;
  580. # Fatal
  581. 5) w_die "${en_ms_5}" ;;
  582. *) w_die "${en_abort}" ;;
  583. esac
  584. else
  585. case ${status} in
  586. 0) ;;
  587. *)
  588. case ${LANG} in
  589. bg*) w_die "${bg_abort}" ;;
  590. pl*) w_die "${pl_abort}" ;;
  591. pt*) w_die "${pt_abort}" ;;
  592. ru*) w_die "${ru_abort}" ;;
  593. *) w_die "${en_abort}" ;;
  594. esac
  595. ;;
  596. esac
  597. fi
  598. }
  599. # For some MS installers that have special exit codes:
  600. w_try_ms_installer()
  601. {
  602. _w_ms_installer=true
  603. w_try "$@"
  604. unset _w_ms_installer
  605. }
  606. w_try_7z()
  607. {
  608. # $1 - directory to extract to
  609. # $2 - file to extract
  610. # $3 .. $n - files to extract from the archive
  611. destdir="$1"
  612. filename="$2"
  613. shift 2
  614. # Not always installed, use Windows 7-Zip as a fallback:
  615. if [ -z "${WINETRICKS_FORCE_WIN_7Z}" ] && [ -x "$(command -v 7z 2>/dev/null)" ] ; then
  616. w_try 7z x "${filename}" -o"${destdir}" "$@"
  617. else
  618. 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-plugins')."
  619. WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip
  620. # w_call above will wipe $W_TMP; if that's the CWD, things will break. So forcefully reset the directory:
  621. w_try_cd "${PWD}"
  622. # errors out if there is a space between -o and path
  623. w_try "${WINE}" "${W_PROGRAMS_X86_WIN}\\7-Zip\\7z.exe" x "$(w_pathconv -w "${filename}")" -o"$(w_pathconv -w "${destdir}")" "$@"
  624. fi
  625. }
  626. w_try_ar()
  627. {
  628. # $1 - ar file (.deb) to extract (keeping internal paths, in cwd)
  629. # $2 - file to extract (optional)
  630. # Not always installed, use Windows 7-zip as a fallback:
  631. if [ -z "${WINETRICKS_FORCE_WIN_7Z}" ] && [ -x "$(command -v ar 2>/dev/null)" ]; then
  632. w_try ar x "$@"
  633. else
  634. w_warn "Cannot find ar. Using Windows 7-zip instead. (You can avoid this by installing binutils, e.g. 'sudo apt-get install binutils' or 'sudo yum install binutils')."
  635. WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip
  636. # w_call above will wipe $W_TMP; if that's the CWD, things will break. So forcefully reset the directory:
  637. w_try_cd "${PWD}"
  638. # -t* prevents 7-zip from decompressing .tar.xz to .tar, see
  639. # https://sourceforge.net/p/sevenzip/discussion/45798/thread/8cd16946/?limit=25
  640. w_try "${WINE}" "${W_PROGRAMS_X86_WIN}\\7-Zip\\7z.exe" -t* x "$(w_pathconv -w "$1")"
  641. fi
  642. }
  643. w_try_cabextract()
  644. {
  645. # Not always installed, but shouldn't be fatal unless it's being used
  646. if test ! -x "$(command -v cabextract 2>/dev/null)"; then
  647. w_die "Cannot find cabextract. Please install it (e.g. 'sudo apt-get install cabextract' or 'sudo yum install cabextract')."
  648. fi
  649. w_try cabextract -q "$@"
  650. }
  651. w_try_cd()
  652. {
  653. w_try cd "$@"
  654. }
  655. # Copy $1 into $2. If $2 is found to be a symbolic link, it will be removed first.
  656. # This solve a problem of dlls being symbolic links on some versions or variants of wine.
  657. # We want to replace the symbolic link and not copy into its target.
  658. w_try_cp_dll()
  659. {
  660. _W_srcfile="$1"
  661. _W_destfile="$2"
  662. [ -d "${_W_destfile}" ] && _W_destfile="${_W_destfile}/$(basename "${_W_srcfile}")"
  663. [ -h "${_W_destfile}" ] && w_try rm -f "${_W_destfile}"
  664. w_try cp -f "${_W_srcfile}" "${_W_destfile}"
  665. }
  666. # Copy font files matching a glob pattern from source directory to destination directory.
  667. # Also remove any file in the destination directory that has the same name as
  668. # any of the files that we're trying to copy, but with different case letters.
  669. # Note: it converts font file names to lower case to avoid inconsistencies due to paths
  670. # being case-insensitive under Wine.
  671. w_try_cp_font_files()
  672. {
  673. # $1 - source directory
  674. # $2 - destination directory
  675. # $3 - optional font file glob pattern (default: "*.ttf")
  676. _W_src_dir="$1"
  677. _W_dest_dir="$2"
  678. _W_pattern="$3"
  679. shift 2
  680. if test ! -d "${_W_src_dir}"; then
  681. w_die "bug: missing source dir"
  682. fi
  683. if test ! -d "${_W_dest_dir}"; then
  684. w_die "bug: missing destination dir"
  685. fi
  686. if test -z "${_W_pattern}"; then
  687. _W_pattern="*.ttf"
  688. fi
  689. # POSIX sh doesn't have a good way to handle this, but putting into a separate script
  690. # and running with sh avoids it.
  691. #
  692. # See https://github.com/Winetricks/winetricks/issues/995 for details
  693. cat > "${WINETRICKS_WORKDIR}/cp_font_files.sh" <<_EOF_
  694. #!/bin/sh
  695. _W_src_file="\$@"
  696. # Extract the file name and lower case it
  697. _W_file_name="\$(basename "\$_W_src_file" | tr "[:upper:]" "[:lower:]")"
  698. # Remove any existing font files that might have the same name, but with different case characters
  699. # LANG=C to avoid locale issues (https://github.com/Winetricks/winetricks/issues/1892)
  700. LANG=C find "${_W_dest_dir}" -maxdepth 1 -type f -iname "\$_W_file_name" -exec rm '{}' ';'
  701. # FIXME: w_try() isn't available, need some better error handling:
  702. cp -f "\$_W_src_file" "${_W_dest_dir}/\$_W_file_name"
  703. _EOF_
  704. # Use -exec "sh .." to avoid issues with noexec
  705. # Gross quoting is to avoid SC2156
  706. # LANG=C to avoid locale issues (https://github.com/Winetricks/winetricks/issues/1892)
  707. LANG=C find "${_W_src_dir}" -maxdepth 1 -type f -iname "${_W_pattern}" -exec sh -c 'sh '"${WINETRICKS_WORKDIR}/cp_font_files.sh"' "$1"' _ {} \;
  708. # Wait for Wine to add the new font to the registry under HKCU\Software\Wine\Fonts\Cache
  709. w_wineserver -w
  710. unset _W_dest_dir
  711. }
  712. w_try_mkdir()
  713. {
  714. # Only print a message if the directory doesn't already exist
  715. # If -q is given, only print in verbose mode
  716. dir="$1"
  717. if [ "${dir}" = "-q" ]; then
  718. dir="$2"
  719. WINETRICKS_SUPER_QUIET=1 w_try mkdir -p "${dir}"
  720. fi
  721. if [ ! -d "${dir}" ]; then
  722. w_try mkdir -p "${dir}"
  723. fi
  724. }
  725. w_try_msiexec64()
  726. {
  727. if test "${W_ARCH}" != "win64"; then
  728. w_die "bug: 64-bit msiexec called from a ${W_ARCH} prefix."
  729. fi
  730. w_try "${WINE}" start /wait "${W_SYSTEM64_DLLS_WIN32}/msiexec.exe" ${W_OPT_UNATTENDED:+/q} "$@"
  731. }
  732. w_try_regedit()
  733. {
  734. # If on wow64, run under both wine and wine64 (otherwise they only go in the 32-bit registry afaict)
  735. if [ "${W_ARCH}" = "win32" ]; then
  736. w_try_regedit32 "$@"
  737. elif [ "${W_ARCH}" = "win64" ]; then
  738. w_try_regedit32 "$@"
  739. w_try_regedit64 "$@"
  740. fi
  741. }
  742. w_try_regedit32()
  743. {
  744. # on windows, doesn't work without cmd /c
  745. case "${W_PLATFORM}" in
  746. windows_cmd|wine_cmd) cmdc="cmd /c";;
  747. *) unset cmdc ;;
  748. esac
  749. if [ "${W_ARCH}" = "win64" ]; then
  750. # shellcheck disable=SC2086
  751. w_try "${WINE}" ${cmdc} "${W_SYSTEM32_DLLS_WIN}\\regedit.exe" ${W_OPT_UNATTENDED:+/S} "$@"
  752. else
  753. # shellcheck disable=SC2086
  754. w_try "${WINE}" ${cmdc} "C:\\windows\\regedit.exe" ${W_OPT_UNATTENDED:+/S} "$@"
  755. fi
  756. }
  757. w_try_regedit64()
  758. {
  759. # on windows, doesn't work without cmd /c
  760. case "${W_PLATFORM}" in
  761. windows_cmd|wine_cmd) cmdc="cmd /c";;
  762. *) unset cmdc ;;
  763. esac
  764. # shellcheck disable=SC2086
  765. w_try "${WINE64}" ${cmdc} "C:\\windows\\regedit.exe" ${W_OPT_UNATTENDED:+/S} "$@"
  766. }
  767. w_try_regsvr()
  768. {
  769. w_try "${WINE}" "${W_SYSTEM32_DLLS_WIN}\\regsvr32.exe" ${W_OPT_UNATTENDED:+/S} "$@"
  770. }
  771. w_try_regsvr64()
  772. {
  773. w_try "${WINE64}" "${W_SYSTEM64_DLLS_WIN64}\\regsvr32.exe" ${W_OPT_UNATTENDED:+/S} "$@"
  774. }
  775. w_try_unrar()
  776. {
  777. # $1 - zipfile to extract (keeping internal paths, in cwd)
  778. # Not always installed, use Windows 7-Zip as a fallback:
  779. if [ -z "${WINETRICKS_FORCE_WIN_7Z}" ] && [ -x "$(command -v unrar 2>/dev/null)" ]; then
  780. w_try unrar x "$@"
  781. else
  782. 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')."
  783. WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip
  784. # w_call above will wipe $W_TMP; if that's the CWD, things will break. So forcefully reset the directory:
  785. w_try_cd "${PWD}"
  786. w_try "${WINE}" "${W_PROGRAMS_X86_WIN}\\7-Zip\\7z.exe" x "$(w_pathconv -w "$1")"
  787. fi
  788. }
  789. w_try_unzip()
  790. {
  791. # $1 - directory to extract to
  792. # $2 - zipfile to extract
  793. # $3 .. $n - files to extract from the archive
  794. destdir="$1"
  795. zipfile="$2"
  796. shift 2
  797. # Not always installed, use Windows 7-Zip as a fallback:
  798. if [ -z "${WINETRICKS_FORCE_WIN_7Z}" ] && [ -x "$(command -v unzip 2>/dev/null)" ]; then
  799. # FreeBSD ships unzip, but it doesn't support self-compressed executables
  800. # If it fails, fall back to 7-Zip:
  801. unzip -o -q -d"${destdir}" "${zipfile}" "$@"
  802. ret=$?
  803. case ${ret} in
  804. 0) return ;;
  805. 1|*) w_warn "Unzip failed, trying Windows 7-Zip instead." ;;
  806. esac
  807. else
  808. 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')."
  809. fi
  810. WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip
  811. # w_call above will wipe $W_TMP; if that's the CWD, things will break. So forcefully reset the directory:
  812. w_try_cd "${PWD}"
  813. # errors out if there is a space between -o and path
  814. w_try "${WINE}" "${W_PROGRAMS_X86_WIN}\\7-Zip\\7z.exe" x "$(w_pathconv -w "${zipfile}")" -o"$(w_pathconv -w "${destdir}")" "$@"
  815. }
  816. ### End of w_try ###
  817. w_read_key()
  818. {
  819. if test ! "${W_OPT_UNATTENDED}"; then
  820. W_KEY=dummy_to_make_autohotkey_happy
  821. return "${TRUE}"
  822. fi
  823. w_try_mkdir "${W_CACHE}/${W_PACKAGE}"
  824. # backwards compatible location
  825. # Auth doesn't belong in cache, since restoring it requires user input
  826. _W_keyfile="${W_CACHE}/${W_PACKAGE}/key.txt"
  827. if ! test -f "${_W_keyfile}"; then
  828. _W_keyfile="${WINETRICKS_AUTH}/${W_PACKAGE}/key.txt"
  829. fi
  830. if ! test -f "${_W_keyfile}"; then
  831. # read key from user
  832. case ${LANG} in
  833. bg*) _W_keymsg="Моля, въведете ключа за приложението '${W_PACKAGE}'"
  834. _W_nokeymsg="Няма въведен ключ"
  835. ;;
  836. da*) _W_keymsg="Angiv venligst registrerings-nøglen for pakken '${W_PACKAGE}'"
  837. _W_nokeymsg="Ingen nøgle angivet"
  838. ;;
  839. de*) _W_keymsg="Bitte einen Key für Paket '${W_PACKAGE}' eingeben"
  840. _W_nokeymsg="Keinen Key eingegeben?"
  841. ;;
  842. pl*) _W_keymsg="Proszę podać klucz dla programu '${W_PACKAGE}'"
  843. _W_nokeymsg="Nie podano klucza"
  844. ;;
  845. pt*) _W_keymsg="Por favor, insira a chave do aplicativo '${W_PACKAGE}'"
  846. _W_nokeymsg="Nenhuma chave fornecida"
  847. ;;
  848. ru*) _W_keymsg="Пожалуйста, введите ключ для приложения '${W_PACKAGE}'"
  849. _W_nokeymsg="Ключ не введён"
  850. ;;
  851. uk*) _W_keymsg="Будь ласка, введіть ключ для додатка '${W_PACKAGE}'"
  852. _W_nokeymsg="Ключ не надано"
  853. ;;
  854. zh_CN*) _W_keymsg="按任意键为 '${W_PACKAGE}'"
  855. _W_nokeymsg="No key given"
  856. ;;
  857. zh_TW*|zh_HK*) _W_keymsg="按任意鍵為 '${W_PACKAGE}'"
  858. _W_nokeymsg="No key given"
  859. ;;
  860. *) _W_keymsg="Please enter the key for app '${W_PACKAGE}'"
  861. _W_nokeymsg="No key given"
  862. ;;
  863. esac
  864. case ${WINETRICKS_GUI} in
  865. *zenity) W_KEY=$(zenity --entry --text "${_W_keymsg}") ;;
  866. *kdialog) W_KEY=$(kdialog --inputbox "${_W_keymsg}") ;;
  867. *xmessage) w_die "sorry, can't read key from GUI with xmessage" ;;
  868. none) printf %s "${_W_keymsg}": ; read -r W_KEY ;;
  869. esac
  870. if test "${W_KEY}" = ""; then
  871. w_die "${_W_nokeymsg}"
  872. fi
  873. echo "${W_KEY}" > "${_W_keyfile}"
  874. fi
  875. W_RAW_KEY=$(cat "${_W_keyfile}")
  876. W_KEY=$(echo "${W_RAW_KEY}" | tr -d '[:blank:][=-=]')
  877. unset _W_keyfile _W_keymsg _W_nokeymsg
  878. }
  879. w_verify_cabextract_available()
  880. {
  881. # If verb_a requires verb_b, then verb_a will fail when the dependency for verb_b is installed
  882. # This should be called by verb_a, to give a proper warning
  883. if test ! -x "$(command -v cabextract 2>/dev/null)"; then
  884. w_die "Cannot find cabextract. Please install it (e.g. 'sudo apt-get install cabextract' or 'sudo yum install cabextract')."
  885. fi
  886. w_try_cabextract -q -v >/dev/null 2>&1
  887. }
  888. # Convert a Windows path to a Unix path quickly.
  889. # $1 is an absolute Windows path starting with c:\ or C:/
  890. # with no funny business, so we can use the simplest possible
  891. # algorithm.
  892. winetricks_wintounix()
  893. {
  894. _W_winp_="$1"
  895. # Remove drive letter and colon
  896. _W_winp="${_W_winp_#??}"
  897. # Prepend the location of drive c
  898. printf %s "${WINEPREFIX}"/dosdevices/c:
  899. # Change backslashes to slashes
  900. echo "${_W_winp}" | sed 's,\\,/,g'
  901. }
  902. # Convert between Unix path and Windows path
  903. # Usage is lowest common denominator of cygpath/winepath
  904. # so -u to convert to Unix, and -w to convert to Windows
  905. w_pathconv()
  906. {
  907. case "${W_PLATFORM}" in
  908. windows_cmd)
  909. # for some reason, cygpath turns some spaces into newlines?!
  910. cygpath "$@" | tr '\012' '\040' | sed 's/ $//'
  911. ;;
  912. *)
  913. case "$@" in
  914. -u?c:\\*|-u?C:\\*|-u?c:/*|-u?C:/*) winetricks_wintounix "$2" ;;
  915. *) w_winepath "$@" ;;
  916. esac
  917. ;;
  918. esac
  919. }
  920. # Expand an environment variable and print it to stdout
  921. w_expand_env()
  922. {
  923. winetricks_early_wine_arch cmd.exe /c echo "%$1%"
  924. }
  925. # Determine what architecture a binary file is built for
  926. winetricks_get_file_arch()
  927. {
  928. _W_file="$1"
  929. # macOS uses Mach-O binaries, not ELF
  930. if [ "$(uname -s)" = "Darwin" ]; then
  931. _W_lipo_output="$(lipo -archs "${_W_file}")"
  932. case "${_W_lipo_output}" in
  933. "arm64") _W_file_arch="arm64" ;;
  934. "i386") _W_file_arch="i386" ;;
  935. "x86_64") _W_file_arch="x86_64" ;;
  936. *) w_die "Unknown file arch: ${_W_lipo_output}" ;;
  937. esac
  938. else
  939. # Assume ELF binaries for everything else
  940. _W_ob_output="$(od -An -t x1 -j 0x12 -N 1 "${_W_file}" | tr -d "[:space:]")"
  941. case "${_W_ob_output}" in
  942. "3e") _W_file_arch="x86_64" ;;
  943. "03"|"06") _W_file_arch="i386" ;;
  944. "b7") _W_file_arch="aarch64" ;;
  945. "28") _W_file_arch="aarch32" ;;
  946. *) w_die "Unknown file arch: ${_W_ob_output}";;
  947. esac
  948. fi
  949. echo "${_W_file_arch}"
  950. }
  951. # Get the latest tagged release from github.com API
  952. w_get_github_latest_release()
  953. {
  954. # FIXME: can we get releases that aren't on master branch?
  955. org="$1"
  956. repo="$2"
  957. WINETRICKS_SUPER_QUIET=1 w_download_to "${W_TMP_EARLY}" "https://api.github.com/repos/${org}/${repo}/releases/latest" "" "release.json" >/dev/null 2>&1
  958. # aria2c condenses the json (https://github.com/aria2/aria2/issues/1389)
  959. # but curl/wget don't, so handle both cases:
  960. json_length="$(wc -l "${W_TMP_EARLY}/release.json")"
  961. case "${json_length}" in
  962. 0*) latest_version="$(sed -e "s/\",\"/|/g" "${W_TMP_EARLY}/release.json" | tr '|' '\n' | grep tag_name | sed 's@.*"@@')";;
  963. *) latest_version="$(grep -w tag_name "${W_TMP_EARLY}/release.json" | cut -d '"' -f 4)";;
  964. esac
  965. echo "${latest_version}"
  966. }
  967. # Get the latest tagged prerelease from github.com API
  968. w_get_github_latest_prerelease()
  969. {
  970. # FIXME: can we get releases that aren't on master branch?
  971. org="$1"
  972. repo="$2"
  973. WINETRICKS_SUPER_QUIET=1 w_download_to "${W_TMP_EARLY}" "https://api.github.com/repos/${org}/${repo}/releases" "" "release.json" >/dev/null 2>&1
  974. # aria2c condenses the json (https://github.com/aria2/aria2/issues/1389)
  975. # but curl/wget don't, so handle both cases:
  976. json_length="$(wc -l "${W_TMP_EARLY}/release.json")"
  977. case "${json_length}" in
  978. 0*) latest_version="$(sed -e "s/\",\"/|/g" "${W_TMP_EARLY}/release.json" | tr '|' '\n' | grep tag_name -m 1 | sed 's@.*"@@')";;
  979. *) latest_version="$(grep -m 1 -w tag_name "${W_TMP_EARLY}/release.json" | cut -d '"' -f 4)";;
  980. esac
  981. echo "${latest_version}"
  982. }
  983. # get sha256sum string and set $_W_gotsha256sum to it
  984. w_get_sha256sum()
  985. {
  986. _W_sha256_file="$1"
  987. # See https://github.com/Winetricks/winetricks/issues/645
  988. # User is running winetricks from /dev/stdin
  989. if [ -f "${_W_sha256_file}" ] || [ -h "${_W_sha256_file}" ] ; then
  990. _W_gotsha256sum=$(${WINETRICKS_SHA256SUM} < "${_W_sha256_file}" | sed 's/(stdin)= //;s/ .*//')
  991. else
  992. w_warn "${_W_sha256_file} is not a regular file, not checking sha256sum"
  993. return
  994. fi
  995. }
  996. w_get_shatype() {
  997. _W_sum="$1"
  998. # tr -d " " is for FreeBSD/OS X/Solaris return a leading space:
  999. # See https://stackoverflow.com/questions/30927590/wc-on-osx-return-includes-spaces/30927885#30927885
  1000. _W_sum_length="$(echo "${_W_sum}" | tr -d "\\n" | wc -c | tr -d " ")"
  1001. case "${_W_sum_length}" in
  1002. 0) _W_shatype="none" ;;
  1003. 64) _W_shatype="sha256" ;;
  1004. # 128) sha512..
  1005. *) w_die "unsupported shasum..bug" ;;
  1006. esac
  1007. }
  1008. # verify a sha256sum
  1009. w_verify_sha256sum()
  1010. {
  1011. _W_vs_wantsum=$1
  1012. _W_vs_file=$2
  1013. w_get_sha256sum "${_W_vs_file}"
  1014. if [ "${_W_gotsha256sum}"x != "${_W_vs_wantsum}"x ] ; then
  1015. if [ "${WINETRICKS_FORCE}" = 1 ]; then
  1016. w_warn "sha256sum mismatch! However --force was used, so trying anyway. Caveat emptor."
  1017. else
  1018. w_askpermission "SHA256 mismatch!\n\nURL: ${_W_url}\nDownloaded: ${_W_gotsha256sum}\nExpected: ${_W_vs_wantsum}\n\nThis is often the result of an updated package such as vcrun2019.\nIf you are willing to accept the risk, you can bypass this check.\nAlternatively, you may use the --force option to ignore this check entirely.\n\nContinue anyway?"
  1019. fi
  1020. fi
  1021. unset _W_vs_wantsum _W_vs_file _W_gotsha256sum
  1022. }
  1023. # verify any kind of shasum (that winetricks supports ;) ):
  1024. w_verify_shasum()
  1025. {
  1026. _W_vs_wantsum="$1"
  1027. _W_vs_file="$2"
  1028. w_get_shatype "${_W_vs_wantsum}"
  1029. case "${_W_shatype}" in
  1030. none) w_warn "No checksum provided, not verifying" ;;
  1031. sha256) w_verify_sha256sum "${_W_sum}" "${_W_vs_file}" ;;
  1032. # 128) sha512..
  1033. *) w_die "unsupported shasum..bug" ;;
  1034. esac
  1035. }
  1036. # simple wrapper around winepath using winetricks_early_wine (to strip escape characters, etc.)
  1037. # For https://bugs.winehq.org/show_bug.cgi?id=48937 and any future regressions
  1038. w_winepath()
  1039. {
  1040. winetricks_early_wine winepath "$@"
  1041. }
  1042. # wget outputs progress messages that look like this:
  1043. # 0K .......... .......... .......... .......... .......... 0% 823K 40s
  1044. # This function replaces each such line with the pair of lines
  1045. # 0%
  1046. # # Downloading... 823K (40s)
  1047. # It uses minimal buffering, so each line is output immediately
  1048. # and the user can watch progress as it happens.
  1049. # wrapper around wineserver, to let users know that it will wait indefinitely/kill stuff
  1050. w_wineserver()
  1051. {
  1052. case "$@" in
  1053. *-k) w_warn "Running ${WINESERVER} -k. This will kill all running wine processes in prefix=${WINEPREFIX}";;
  1054. *-w) w_warn "Running ${WINESERVER} -w. This will hang until all wine processes in prefix=${WINEPREFIX} terminate";;
  1055. *) w_warn "Invoking wineserver with '$*'";;
  1056. esac
  1057. # shellcheck disable=SC2068
  1058. "${WINESERVER}" $@
  1059. }
  1060. winetricks_parse_wget_progress()
  1061. {
  1062. # Parse a percentage, a size, and a time into $1, $2 and $3
  1063. # then use them to create the output line.
  1064. case ${LANG} in
  1065. bg*) perl -p -e \
  1066. '$| = 1; s/^.* +([0-9]+%) +([0-9,.]+[GMKB]) +([0-9hms,.]+).*$/\1\n# Изтегляне... \2 (\3)/' ;;
  1067. pl*) perl -p -e \
  1068. '$| = 1; s/^.* +([0-9]+%) +([0-9,.]+[GMKB]) +([0-9hms,.]+).*$/\1\n# Pobieranie… \2 (\3)/' ;;
  1069. ru*) perl -p -e \
  1070. '$| = 1; s/^.* +([0-9]+%) +([0-9,.]+[GMKB]) +([0-9hms,.]+).*$/\1\n# Загрузка... \2 (\3)/' ;;
  1071. *) perl -p -e \
  1072. '$| = 1; s/^.* +([0-9]+%) +([0-9,.]+[GMKB]) +([0-9hms,.]+).*$/\1\n# Downloading... \2 (\3)/' ;;
  1073. esac
  1074. }
  1075. # Execute wget, and if in GUI mode, also show a graphical progress bar
  1076. winetricks_wget_progress()
  1077. {
  1078. case ${WINETRICKS_GUI} in
  1079. zenity)
  1080. # Use a subshell so if the user clicks 'Cancel',
  1081. # the --auto-kill kills the subshell, not the current shell
  1082. (
  1083. ${torify} wget "$@" 2>&1 |
  1084. winetricks_parse_wget_progress | \
  1085. ${WINETRICKS_GUI} --progress --width 400 --title="${_W_file}" --auto-kill --auto-close
  1086. )
  1087. err=$?
  1088. if test ${err} -gt 128; then
  1089. # 129 is 'killed by SIGHUP'
  1090. # Sadly, --auto-kill only applies to parent process,
  1091. # which was the subshell, not all the elements of the pipeline...
  1092. # have to go find and kill the wget.
  1093. # If we ran wget in the background, we could kill it more directly, perhaps...
  1094. if pid=$(pgrep -f ."${_W_file}"); then
  1095. echo User aborted download, killing wget
  1096. # shellcheck disable=SC2086
  1097. kill ${pid}
  1098. fi
  1099. fi
  1100. return ${err}
  1101. ;;
  1102. *) ${torify} wget "$@" ;;
  1103. esac
  1104. }
  1105. w_dotnet_verify()
  1106. {
  1107. case "$1" in
  1108. dotnet11) version="1.1" ;;
  1109. dotnet11sp1) version="1.1 SP1" ;;
  1110. dotnet20) version="2.0" ;;
  1111. dotnet20sp1) version="2.0 SP1" ;;
  1112. dotnet20sp2) version="2.0 SP2" ;;
  1113. dotnet30) version="3.0" ;;
  1114. dotnet30sp1) version="3.0 SP1" ;;
  1115. dotnet35) version="3.5" ;;
  1116. dotnet35sp1) version="3.5 SP1" ;;
  1117. dotnet40) version="4 Client" ;;
  1118. dotnet45) version="4.5" ;;
  1119. dotnet452) version="4.5.2" ;;
  1120. dotnet46) version="4.6" ;;
  1121. dotnet461) version="4.6.1" ;;
  1122. dotnet462) version="4.6.2" ;;
  1123. dotnet471) version="4.7.1" ;;
  1124. dotnet472) version="4.7.2" ;;
  1125. dotnet48) version="4.8" ;;
  1126. *) echo error ; exit 1 ;;
  1127. esac
  1128. w_call dotnet_verifier
  1129. # FIXME: The logfile may be useful somewhere (or at least print the location)
  1130. # for 'run, netfx_setupverifier.exe /q:a /c:"setupverifier2.exe"' line
  1131. # shellcheck disable=SC2140
  1132. w_ahk_do "
  1133. SetTitleMatchMode, 2
  1134. ; FIXME; this only works the first time? Check if it's already verified somehow..
  1135. run, netfx_setupverifier.exe /q:a /c:"setupverifier2.exe"
  1136. winwait, Verification Utility
  1137. ControlClick, Button1
  1138. Control, ChooseString, NET Framework ${version}, ComboBox1
  1139. ControlClick, Button1 ; Verify
  1140. loop, 60
  1141. {
  1142. sleep 1000
  1143. process, exist, setupverifier2.exe
  1144. dn_pid=%ErrorLevel%
  1145. if dn_pid = 0
  1146. {
  1147. break
  1148. }
  1149. ifWinExist, Verification Utility, Product verification failed
  1150. {
  1151. process, close, setupverifier2.exe
  1152. exit 1
  1153. }
  1154. ifWinExist, Verification Utility, Product verification succeeded
  1155. {
  1156. process, close, setupverifier2.exe
  1157. break
  1158. }
  1159. }
  1160. "
  1161. dn_status="$?"
  1162. w_info ".Net Verifier returned ${dn_status}"
  1163. }
  1164. # Checks if the user can run the self-update/rollback commands
  1165. winetricks_check_update_availability()
  1166. {
  1167. # Prevents the development file overwrite:
  1168. if test -d "../.git"; then
  1169. w_warn "You're running in a dev environment. Please make a copy of the file before running this command."
  1170. exit
  1171. fi
  1172. # Checks read/write permissions on update directories
  1173. if ! { test -r "$0" && test -w "$0" && test -w "${0%/*}" && test -x "${0%/*}"; }; then
  1174. w_warn "You don't have the proper permissions to run this command. Try again with sudo or as root."
  1175. exit
  1176. fi
  1177. }
  1178. winetricks_selfupdate()
  1179. {
  1180. winetricks_check_update_availability
  1181. _W_filename="${0##*/}"
  1182. _W_rollback_file="${0}.bak"
  1183. _W_update_file="${0}.update"
  1184. _W_tmpdir=${TMPDIR:-/tmp}
  1185. _W_tmpdir="$(mktemp -d "${_W_tmpdir}/${_W_filename}.XXXXXXXX")"
  1186. w_download_to "${_W_tmpdir}" https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks "" "${_W_filename}"
  1187. # 2016/10/26: now file is uncompressed? Handle both cases:
  1188. update_file_type="$(file "${_W_tmpdir}/${_W_filename}")"
  1189. case "${update_file_type}" in
  1190. *"POSIX shell script"*)
  1191. #echo "already decompressed!"
  1192. w_try mv "${_W_tmpdir}/${_W_filename}" "${_W_update_file}"
  1193. ;;
  1194. *"gzip compressed data"*)
  1195. w_try mv "${_W_tmpdir}/${_W_filename}" "${_W_update_file}.gz"
  1196. w_try gunzip "${_W_update_file}.gz"
  1197. ;;
  1198. *)
  1199. echo "Unknown file type: ${update_file_type}"
  1200. exit 1
  1201. ;;
  1202. esac
  1203. w_try rmdir "${_W_tmpdir}"
  1204. w_try cp "$0" "${_W_rollback_file}"
  1205. w_try chmod -x "${_W_rollback_file}"
  1206. w_try mv "${_W_update_file}" "$0"
  1207. w_try chmod +x "$0"
  1208. w_warn "Update finished! The current version is $($0 -V). Use 'winetricks --update-rollback' to return to the previous version."
  1209. exit
  1210. }
  1211. winetricks_selfupdate_rollback()
  1212. {
  1213. winetricks_check_update_availability
  1214. _W_rollback_file="${0}.bak"
  1215. if test -f "${_W_rollback_file}"; then
  1216. w_try mv "${_W_rollback_file}" "$0"
  1217. w_try chmod +x "$0"
  1218. w_warn "Rollback finished! The current version is $($0 -V)."
  1219. else
  1220. w_warn "Nothing to rollback."
  1221. fi
  1222. exit;
  1223. }
  1224. # Download a file
  1225. # Usage: w_download_to (packagename|path to download file) url [shasum [filename [cookie jar]]]
  1226. # Caches downloads in winetrickscache/$packagename
  1227. w_download_to()
  1228. {
  1229. winetricks_download_setup
  1230. _W_packagename="$1" # or path to download file to
  1231. _W_url="$2"
  1232. _W_sum="$3"
  1233. _W_file="$4"
  1234. _W_cookiejar="$5"
  1235. case ${_W_packagename} in
  1236. .) w_die "bug: please do not download packages to top of cache" ;;
  1237. esac
  1238. if echo "${_W_url}" | grep ' ' ; then
  1239. w_die "bug: please use %20 instead of literal spaces in urls, curl rejects spaces, and they make life harder for linkcheck.sh"
  1240. fi
  1241. if [ "${_W_file}"x = ""x ] ; then
  1242. _W_file=$(basename "${_W_url}")
  1243. fi
  1244. w_get_shatype "${_W_sum}"
  1245. if echo "${_W_packagename}" | grep -q -e '\/-' -e '^-'; then
  1246. w_die "Invalid path ${_W_packagename} given"
  1247. else
  1248. if ! echo "${_W_packagename}" | grep -q '^/' ; then
  1249. _W_cache="${W_CACHE}/${_W_packagename}"
  1250. else
  1251. _W_cache="${_W_packagename}"
  1252. fi
  1253. fi
  1254. if test ! -d "${_W_cache}" ; then
  1255. w_try_mkdir "${_W_cache}"
  1256. fi
  1257. # Try download twice
  1258. checksum_ok=""
  1259. tries=0
  1260. # Set olddir before entering the loop, otherwise second try will overwrite
  1261. _W_dl_olddir=$(pwd)
  1262. while test ${tries} -lt 2 ; do
  1263. # Warn on a second try
  1264. test "${tries}" -eq 1 && winetricks_dl_warning
  1265. tries=$((tries + 1))
  1266. if test -s "${_W_cache}/${_W_file}" ; then
  1267. if test "${_W_sum}" ; then
  1268. # If checksum matches, declare success and exit loop
  1269. case "${_W_shatype}" in
  1270. none)
  1271. w_warn "No checksum provided, not verifying"
  1272. ;;
  1273. sha256)
  1274. w_get_sha256sum "${_W_cache}/${_W_file}"
  1275. if [ "${_W_gotsha256sum}"x = "${_W_sum}"x ] ; then
  1276. checksum_ok=1
  1277. break
  1278. fi
  1279. ;;
  1280. esac
  1281. if test "${WINETRICKS_FORCE}" != 1; then
  1282. case ${LANG} in
  1283. bg*) w_warn "Контролната сума на ${_W_cache}/${_W_file} не съвпада, повторен опит за изтегляне" ;;
  1284. pl*) w_warn "Niezgodność sum kontrolnych dla ${_W_cache}/${_W_file}, pobieram ponownie" ;;
  1285. pt*) w_warn "Checksum para ${_W_cache}/${_W_file} não confere, tentando novo download" ;;
  1286. ru*) w_warn "Контрольная сумма файла ${_W_cache}/${_W_file} не совпадает, попытка повторной загрузки" ;;
  1287. *) w_warn "Checksum for ${_W_cache}/${_W_file} did not match, retrying download" ;;
  1288. esac
  1289. mv -f "${_W_cache}/${_W_file}" "${_W_cache}/${_W_file}".bak
  1290. else
  1291. w_warn "Checksum for ${_W_cache}/${_W_file} did not match, but --force was used, so ignoring and trying anyway."
  1292. checksum_ok=1
  1293. break
  1294. fi
  1295. else
  1296. # file exists, no checksum known, declare success and exit loop
  1297. break
  1298. fi
  1299. elif test -f "${_W_cache}/${_W_file}" ; then
  1300. # zero-length file, just delete before retrying
  1301. rm "${_W_cache}/${_W_file}"
  1302. fi
  1303. w_try_cd "${_W_cache}"
  1304. # Mac folks tend to have curl rather than wget
  1305. # On Mac, 'which' doesn't return good exit status
  1306. echo "Downloading ${_W_url} to ${_W_cache}"
  1307. # For sites that prefer Mozilla in the user-agent header, set W_BROWSERAGENT=1
  1308. case "${W_BROWSERAGENT}" in
  1309. 1) _W_agent="Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)" ;;
  1310. *) _W_agent="" ;;
  1311. esac
  1312. if [ "${WINETRICKS_DOWNLOADER}" = "aria2c" ] ; then
  1313. # Note: aria2c wants = for most options or silently fails
  1314. # (Slightly fancy) aria2c support
  1315. # See https://github.com/Winetricks/winetricks/issues/612
  1316. # --daemon=false --enable-rpc=false to ensure aria2c doesnt go into the background after starting
  1317. # and prevent any attempts to rebind on the RPC interface specified in someone's config.
  1318. # --input-file='' if the user config has a input-file specified then aria2 will read it and
  1319. # attempt to download everything in that input file again.
  1320. # --save-session='' if the user has specified save-session in their config, their session will be
  1321. # ovewritten by the new aria2 process
  1322. # shellcheck disable=SC2086
  1323. ${torify} aria2c \
  1324. ${aria2c_torify_opts:+"${aria2c_torify_opts}"} \
  1325. --connect-timeout="${WINETRICKS_DOWNLOADER_TIMEOUT}" \
  1326. --continue \
  1327. --daemon=false \
  1328. --dir="${_W_cache}" \
  1329. --enable-rpc=false \
  1330. --input-file='' \
  1331. --max-connection-per-server=5 \
  1332. --max-tries="${WINETRICKS_DOWNLOADER_RETRIES}" \
  1333. --out="${_W_file}" \
  1334. --save-session='' \
  1335. --stream-piece-selector=geom \
  1336. "${_W_url}"
  1337. elif [ "${WINETRICKS_DOWNLOADER}" = "wget" ] ; then
  1338. # Use -nd to insulate ourselves from people who set -x in WGETRC
  1339. # [*] --retry-connrefused works around the broken sf.net mirroring
  1340. # system when downloading corefonts
  1341. # [*] --read-timeout is useful on the adobe server that doesn't
  1342. # close the connection unless you tell it to (control-C or closing
  1343. # the socket)
  1344. # shellcheck disable=SC2086
  1345. winetricks_wget_progress \
  1346. -O "${_W_file}" \
  1347. -nd \
  1348. -c\
  1349. --read-timeout 300 \
  1350. --retry-connrefused \
  1351. --timeout "${WINETRICKS_DOWNLOADER_TIMEOUT}" \
  1352. --tries "${WINETRICKS_DOWNLOADER_RETRIES}" \
  1353. ${_W_cookiejar:+--load-cookies "${_W_cookiejar}"} \
  1354. ${_W_agent:+--user-agent="${_W_agent}"} \
  1355. "${_W_url}"
  1356. elif [ "${WINETRICKS_DOWNLOADER}" = "curl" ] ; then
  1357. # Note: curl does not accept '=' when passing options
  1358. # curl doesn't get filename from the location given by the server!
  1359. # fortunately, we know it
  1360. # shellcheck disable=SC2086
  1361. ${torify} curl \
  1362. --connect-timeout "${WINETRICKS_DOWNLOADER_TIMEOUT}" \
  1363. -L \
  1364. -o "${_W_file}" \
  1365. -C - \
  1366. --retry "${WINETRICKS_DOWNLOADER_RETRIES}" \
  1367. ${_W_cookiejar:+--cookie "${_W_cookiejar}"} \
  1368. ${_W_agent:+--user-agent "${_W_agent}"} \
  1369. "${_W_url}"
  1370. elif [ "${WINETRICKS_DOWNLOADER}" = "fetch" ] ; then
  1371. # Note: fetch does not support configurable retry count
  1372. # shellcheck disable=SC2086
  1373. ${torify} fetch \
  1374. -T "${WINETRICKS_DOWNLOADER_TIMEOUT}" \
  1375. -o "${_W_file}" \
  1376. ${_W_agent:+--user-agent="${_W_agent}"} \
  1377. "${_W_url}"
  1378. else
  1379. w_die "Here be dragons"
  1380. fi
  1381. if test $? = 0; then
  1382. # Need to decompress .exe's that are compressed, else Cygwin fails
  1383. # Also affects ttf files on github
  1384. # FIXME: gzip hack below may no longer be needed, but need to investigate before removing
  1385. _W_filetype=$(command -v file 2>/dev/null)
  1386. case ${_W_filetype}-${_W_file} in
  1387. /*-*.exe|/*-*.ttf|/*-*.zip)
  1388. case $(file "${_W_file}") in
  1389. *:*gzip*) mv "${_W_file}" "${_W_file}.gz"; gunzip < "${_W_file}.gz" > "${_W_file}";;
  1390. esac
  1391. esac
  1392. # On Cygwin, .exe's must be marked +x
  1393. case "${_W_file}" in
  1394. *.exe) chmod +x "${_W_file}" ;;
  1395. esac
  1396. w_try_cd "${_W_dl_olddir}"
  1397. unset _W_dl_olddir
  1398. # downloaded successfully, exit from loop
  1399. break
  1400. elif test ${tries} = 2; then
  1401. test -f "${_W_file}" && rm "${_W_file}"
  1402. w_die "Downloading ${_W_url} failed"
  1403. fi
  1404. # Download from the Wayback Machine on second try
  1405. _W_url="https://web.archive.org/web/2000/${_W_url}"
  1406. done
  1407. if test "${_W_sum}" && test ! "${checksum_ok}"; then
  1408. w_verify_shasum "${_W_sum}" "${_W_cache}/${_W_file}"
  1409. fi
  1410. }
  1411. # Open a folder for the user in the specified directory
  1412. # Usage: w_open_folder directory
  1413. w_open_folder()
  1414. {
  1415. for _W_cmd in xdg-open open cygstart true ; do
  1416. _W_cmdpath=$(command -v ${_W_cmd})
  1417. if test -n "${_W_cmdpath}" ; then
  1418. break
  1419. fi
  1420. done
  1421. ${_W_cmd} "$1" &
  1422. unset _W_cmd _W_cmdpath
  1423. }
  1424. # Open a web browser for the user to the given page
  1425. # Usage: w_open_webpage url
  1426. w_open_webpage()
  1427. {
  1428. # See https://www.dwheeler.com/essays/open-files-urls.html
  1429. for _W_cmd in xdg-open sdtwebclient cygstart open firefox true ; do
  1430. _W_cmdpath=$(command -v ${_W_cmd})
  1431. if test -n "${_W_cmdpath}" ; then
  1432. break
  1433. fi
  1434. done
  1435. ${_W_cmd} "$1" &
  1436. unset _W_cmd _W_cmdpath
  1437. }
  1438. # Download a file
  1439. # Usage: w_download url [shasum [filename [cookie jar]]]
  1440. # Caches downloads in winetrickscache/$W_PACKAGE
  1441. w_download()
  1442. {
  1443. w_download_to "${W_PACKAGE}" "$@"
  1444. }
  1445. # Download one or more files via BitTorrent
  1446. # Usage: w_download_torrent [foo.torrent]
  1447. # Caches downloads in $W_CACHE/$W_PACKAGE, torrent files are assumed to be there
  1448. # If no foo.torrent is given, will add ALL .torrent files in $W_CACHE/$W_PACKAGE
  1449. w_download_torrent()
  1450. {
  1451. # FIXME: figure out how to extract the filename from the .torrent file
  1452. # so callers don't need to check if the files are already downloaded.
  1453. w_call utorrent
  1454. UT_WINPATH="${W_CACHE_WIN}\\${W_PACKAGE}"
  1455. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  1456. if [ "$2"x != ""x ] ; then # foo.torrent parameter supplied
  1457. w_try "${WINE}" utorrent "/DIRECTORY" "${UT_WINPATH}" "${UT_WINPATH}\\$2" &
  1458. else # grab all torrents
  1459. for torrent in *.torrent ; do
  1460. w_try "${WINE}" utorrent "/DIRECTORY" "${UT_WINPATH}" "${UT_WINPATH}\\${torrent}" &
  1461. done
  1462. fi
  1463. # Start uTorrent, have it wait until all downloads are finished
  1464. w_ahk_do "
  1465. SetTitleMatchMode, 2
  1466. winwait, Torrent
  1467. Loop
  1468. {
  1469. sleep 6000
  1470. ifwinexist, Torrent, default
  1471. {
  1472. ;should uTorrent be the default torrent app?
  1473. controlclick, Button1, Torrent, default ; yes
  1474. continue
  1475. }
  1476. ifwinexist, Torrent, already
  1477. {
  1478. ;torrent already registered, fine
  1479. controlclick, Button1, Torrent, default ; yes
  1480. continue
  1481. }
  1482. ifwinexist, Torrent, Bandwidth
  1483. {
  1484. ;Cancels bandwidth test on first run of uTorrent
  1485. controlclick, Button5, Torrent, Bandwidth
  1486. continue
  1487. }
  1488. ifwinexist, Torrent, version
  1489. {
  1490. ;Decline upgrade to newer version
  1491. controlclick, Button3, Torrent, version
  1492. controlclick, Button2, Torrent, version
  1493. continue
  1494. }
  1495. break
  1496. }
  1497. ;Sets parameter to close uTorrent once all downloads are complete
  1498. winactivate, Torrent 2.0
  1499. send !o
  1500. send a{Down}{Enter}
  1501. winwaitclose, Torrent 2.0
  1502. "
  1503. }
  1504. w_download_manual_to()
  1505. {
  1506. _W_packagename="$1"
  1507. _W_url="$2"
  1508. _W_file="$3"
  1509. _W_shasum="$4"
  1510. # shellcheck disable=SC2154
  1511. case "${media}" in
  1512. "download") w_info "FAIL: bug: media type is download, but w_download_manual was called. Programmer, please change verb's media type to manual_download." ;;
  1513. esac
  1514. if ! test -f "${W_CACHE}/${_W_packagename}/${_W_file}"; then
  1515. case ${LANG} in
  1516. bg*) _W_dlmsg="Моля, изтеглете ${_W_file} от ${_W_url}, поставете го в ${W_CACHE}/${_W_packagename} и стартирайте този скрипт отново.";;
  1517. 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.";;
  1518. 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.";;
  1519. 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.";;
  1520. pt*) _W_dlmsg="Baixe o ${_W_file} de ${_W_url}, salve em ${W_CACHE}/${_W_packagename}, então tente executar novamente este script.";;
  1521. ru*) _W_dlmsg="Пожалуйста, скачайте файл ${_W_file} по адресу ${_W_url}, и поместите его в ${W_CACHE}/${_W_packagename}, а затем запустите winetricks заново.";;
  1522. uk*) _W_dlmsg="Будь ласка, звантажте ${_W_file} з ${_W_url}, розташуйте в ${W_CACHE}/${_W_packagename}, потім запустіть скрипт знову.";;
  1523. zh_CN*) _W_dlmsg="请从 ${_W_url} 下载 ${_W_file},并置放于 ${W_CACHE}/${_W_packagename}, 然后重新运行 winetricks.";;
  1524. zh_TW*|zh_HK*) _W_dlmsg="請從 ${_W_url} 下載 ${_W_file},并置放於 ${W_CACHE}/${_W_packagename}, 然后重新執行 winetricks.";;
  1525. *) _W_dlmsg="Please download ${_W_file} from ${_W_url}, place it in ${W_CACHE}/${_W_packagename}, then re-run this script.";;
  1526. esac
  1527. w_try_mkdir "${W_CACHE}/${_W_packagename}"
  1528. w_open_folder "${W_CACHE}/${_W_packagename}"
  1529. w_open_webpage "${_W_url}"
  1530. sleep 3 # give some time for web browser to open
  1531. w_die "${_W_dlmsg}"
  1532. # FIXME: wait in loop until file is finished?
  1533. fi
  1534. if test "${_W_shasum}"; then
  1535. w_verify_shasum "${_W_shasum}" "${W_CACHE}/${_W_packagename}/${_W_file}"
  1536. fi
  1537. unset _W_dlmsg _W_file _W_sha256sum _W_url
  1538. }
  1539. w_download_manual()
  1540. {
  1541. w_download_manual_to "${W_PACKAGE}" "$@"
  1542. }
  1543. w_question()
  1544. {
  1545. case ${WINETRICKS_GUI} in
  1546. *zenity) ${WINETRICKS_GUI} --entry --text "$1" ;;
  1547. *kdialog) ${WINETRICKS_GUI} --inputbox "$1" ;;
  1548. *xmessage) w_die "sorry, can't ask question with xmessage" ;;
  1549. none)
  1550. # Using printf instead of echo because we don't want a newline
  1551. printf "%s" "$1" >&2 ;
  1552. read -r W_ANSWER ;
  1553. echo "${W_ANSWER}";
  1554. unset W_ANSWER;;
  1555. esac
  1556. }
  1557. #----------------------------------------------------------------
  1558. # Usage: w_mount "volume name" [filename-to-check [discnum]]
  1559. # Some games have two volumes with identical volume names.
  1560. # For these, please specify discnum 1 for first disc, discnum 2 for 2nd, etc.,
  1561. # else caching can't work.
  1562. # FIXME: should take mount option 'unhide' for poorly mastered discs
  1563. w_mount()
  1564. {
  1565. if test "$3"; then
  1566. WINETRICKS_IMG="${W_CACHE}/${W_PACKAGE}/$1-$3.iso"
  1567. else
  1568. WINETRICKS_IMG="${W_CACHE}/${W_PACKAGE}/$1.iso"
  1569. fi
  1570. w_try_mkdir "${W_CACHE}/${W_PACKAGE}"
  1571. if test -f "${WINETRICKS_IMG}"; then
  1572. winetricks_mount_cached_iso
  1573. else
  1574. if test "${WINETRICKS_OPT_KEEPISOS}" = 0 || test "$2"; then
  1575. while true; do
  1576. winetricks_mount_real_volume "$1"
  1577. if test "$2" = "" || test -f "${W_ISO_MOUNT_ROOT}/$2"; then
  1578. break
  1579. else
  1580. w_warn "Wrong disc inserted, $2 not found."
  1581. fi
  1582. done
  1583. fi
  1584. case "${WINETRICKS_OPT_KEEPISOS}" in
  1585. 1)
  1586. winetricks_cache_iso "$1"
  1587. winetricks_mount_cached_iso
  1588. ;;
  1589. esac
  1590. fi
  1591. }
  1592. w_umount()
  1593. {
  1594. if test "${WINE}" = ""; then
  1595. # Windows
  1596. winetricks_load_vcdmount
  1597. w_try_cd "${VCD_DIR}"
  1598. w_try vcdmount.exe /u
  1599. else
  1600. if test "${W_USE_USERMOUNT}"; then
  1601. # FUSE-based tools or hdiutil
  1602. if test -d "${W_ISO_USER_MOUNT_ROOT}"; then
  1603. "${WINE}" eject "${W_ISO_MOUNT_LETTER}:"
  1604. cat > "${W_TMP}"/unset_type_cdrom.reg <<_EOF_
  1605. REGEDIT4
  1606. [HKEY_LOCAL_MACHINE\\Software\\Wine\\Drives]
  1607. "${W_ISO_MOUNT_LETTER}:"=-
  1608. _EOF_
  1609. w_try_regedit "${W_TMP}"/unset_type_cdrom.reg
  1610. rm -f "${WINEPREFIX}/dosdevices/${W_ISO_MOUNT_LETTER}:"
  1611. rm -f "${WINEPREFIX}/dosdevices/${W_ISO_MOUNT_LETTER}::"
  1612. case "${WINETRICKS_ISO_MOUNT}" in
  1613. hdiutil)
  1614. "${WINETRICKS_ISO_MOUNT}" detach "${W_ISO_USER_MOUNT_ROOT}"
  1615. ;;
  1616. *)
  1617. # -uz lazy unmount in case executable still running
  1618. fusermount -uz "${W_ISO_USER_MOUNT_ROOT}"
  1619. ;;
  1620. esac
  1621. w_try rmdir "${W_ISO_USER_MOUNT_ROOT}"
  1622. fi
  1623. W_ISO_MOUNT_ROOT=/mnt/winetricks
  1624. else
  1625. # sudo + umount
  1626. echo "Running ${WINETRICKS_SUDO} umount ${W_ISO_MOUNT_ROOT}"
  1627. case "${WINETRICKS_SUDO}" in
  1628. gksu*|kdesudo)
  1629. # -l lazy unmount in case executable still running
  1630. "${WINETRICKS_SUDO}" "umount -l ${W_ISO_MOUNT_ROOT}"
  1631. w_try "${WINETRICKS_SUDO}" "rm -rf ${W_ISO_MOUNT_ROOT}"
  1632. ;;
  1633. kdesu)
  1634. "${WINETRICKS_SUDO}" -c "umount -l ${W_ISO_MOUNT_ROOT}"
  1635. w_try "${WINETRICKS_SUDO}" -c "rm -rf ${W_ISO_MOUNT_ROOT}"
  1636. ;;
  1637. *)
  1638. "${WINETRICKS_SUDO}" umount -l "${W_ISO_MOUNT_ROOT}"
  1639. w_try "${WINETRICKS_SUDO}" rm -rf "${W_ISO_MOUNT_ROOT}"
  1640. ;;
  1641. esac
  1642. "${WINE}" eject "${W_ISO_MOUNT_LETTER}:"
  1643. rm -f "${WINEPREFIX}/dosdevices/${W_ISO_MOUNT_LETTER}:"
  1644. rm -f "${WINEPREFIX}/dosdevices/${W_ISO_MOUNT_LETTER}::"
  1645. fi
  1646. fi
  1647. }
  1648. w_ahk_do()
  1649. {
  1650. if ! test -f "${W_CACHE}/ahk/AutoHotkeyU32.exe"; then
  1651. w_download_to ahk https://github.com/AutoHotkey/AutoHotkey/releases/download/v1.1.36.01/AutoHotkey_1.1.36.01_setup.exe 62734d219f14a942986e62d6c0fef0c2315bc84acd963430aed788c36e67e1ff
  1652. w_try_7z "${W_CACHE}/ahk" "${W_CACHE}/ahk/AutoHotkey_1.1.36.01_setup.exe" AutoHotkeyU32.exe
  1653. chmod +x "${W_CACHE}/ahk/AutoHotkeyU32.exe"
  1654. fi
  1655. # Previously this used printf + sed, but that was broken with BSD sed (FreeBSD/OS X):
  1656. # https://github.com/Winetricks/winetricks/issues/697
  1657. # So now using trying awk instead (next, perl):
  1658. cat <<_EOF_ | awk 'sub("$", "\r")' > "${W_TMP}/${W_PACKAGE}.ahk"
  1659. w_opt_unattended = ${W_OPT_UNATTENDED:-0}
  1660. $@
  1661. _EOF_
  1662. w_try "${WINE}" "${W_CACHE_WIN}\\ahk\\AutoHotkeyU32.exe" "${W_TMP_WIN}\\${W_PACKAGE}.ahk"
  1663. }
  1664. # Function to protect Wine-specific sections of code.
  1665. # Outputs a message to console explaining what's being skipped.
  1666. # Usage:
  1667. # if w_skip_windows name-of-operation; then
  1668. # return
  1669. # fi
  1670. # ... do something that doesn't make sense on Windows ...
  1671. w_skip_windows()
  1672. {
  1673. case "${W_PLATFORM}" in
  1674. windows_cmd)
  1675. echo "Skipping operation '$1' on Windows"
  1676. return "${TRUE}"
  1677. ;;
  1678. esac
  1679. return "${FALSE}"
  1680. }
  1681. # for common code in w_override_dlls and w_override_app_dlls
  1682. w_common_override_dll()
  1683. {
  1684. _W_mode="$1"
  1685. module="$2"
  1686. # Remove wine's builtin manifest, if present. Use:
  1687. # wineboot ; find "$WINEPREFIX"/drive_c/windows/winsxs/ -iname \*deadbeef.manifest | sort
  1688. case "${W_PACKAGE}" in
  1689. comctl32)
  1690. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest
  1691. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef.manifest
  1692. ;;
  1693. vcrun2005)
  1694. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/amd64_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.4053_none_deadbeef.manifest
  1695. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053_none_deadbeef.manifest
  1696. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/x86_microsoft.vc80.atl_1fc8b3b9a1e18e3b_8.0.50727.4053_none_deadbeef.manifest
  1697. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053_none_deadbeef.manifest
  1698. # These are 32-bit only?
  1699. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/x86_microsoft.vc80.mfc_1fc8b3b9a1e18e3b_8.0.50727.6195_none_deadbeef.manifest
  1700. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/x86_microsoft.vc80.mfcloc_1fc8b3b9a1e18e3b_8.0.50727.6195_none_deadbeef.manifest
  1701. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/x86_microsoft.vc80.openmp_1fc8b3b9a1e18e3b_8.0.50727.6195_none_deadbeef.manifest
  1702. ;;
  1703. vcrun2008)
  1704. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/amd64_microsoft.vc90.atl_1fc8b3b9a1e18e3b_9.0.30729.6161_none_deadbeef.manifest
  1705. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_deadbeef.manifest
  1706. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/x86_microsoft.vc90.atl_1fc8b3b9a1e18e3b_9.0.30729.6161_none_deadbeef.manifest
  1707. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_deadbeef.manifest
  1708. # These are 32-bit only?
  1709. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_9.0.30729.6161_none_deadbeef.manifest
  1710. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/x86_microsoft.vc90.mfcloc_1fc8b3b9a1e18e3b_9.0.30729.6161_none_deadbeef.manifest
  1711. w_try rm -rf "${W_WINDIR_UNIX}"/winsxs/manifests/x86_microsoft.vc90.openmp_1fc8b3b9a1e18e3b_9.0.30729.6161_none_deadbeef.manifest
  1712. ;;
  1713. esac
  1714. if [ "${_W_mode}" = default ] ; then
  1715. # To delete a registry key, give an unquoted dash as value
  1716. echo "\"*${module}\"=-" >> "${W_TMP}"/override-dll.reg
  1717. else
  1718. # Note: if you want to override even DLLs loaded with an absolute
  1719. # path, you need to add an asterisk:
  1720. echo "\"*${module}\"=\"${_W_mode}\"" >> "${W_TMP}"/override-dll.reg
  1721. fi
  1722. }
  1723. w_override_dlls()
  1724. {
  1725. w_skip_windows w_override_dlls && return
  1726. _W_mode=$1
  1727. case ${_W_mode} in
  1728. *=*)
  1729. w_die "w_override_dlls: unknown mode ${_W_mode}.
  1730. Usage: 'w_override_dlls mode[,mode] dll ...'." ;;
  1731. disabled)
  1732. _W_mode="" ;;
  1733. esac
  1734. shift
  1735. echo "Using ${_W_mode} override for following DLLs: $*"
  1736. cat > "${W_TMP}"/override-dll.reg <<_EOF_
  1737. REGEDIT4
  1738. [HKEY_CURRENT_USER\\Software\\Wine\\DllOverrides]
  1739. _EOF_
  1740. while test "$1" != ""; do
  1741. w_common_override_dll "${_W_mode}" "$1"
  1742. shift
  1743. done
  1744. w_try_regedit "${W_TMP_WIN}"\\override-dll.reg
  1745. unset _W_mode
  1746. }
  1747. w_override_no_dlls()
  1748. {
  1749. w_skip_windows override && return
  1750. w_try_regedit /d "HKEY_CURRENT_USER\\Software\\Wine\\DllOverrides"
  1751. }
  1752. w_override_all_dlls()
  1753. {
  1754. # Disable all known native Microsoft DLLs in favor of Wine's built-in ones
  1755. # Generated with:
  1756. # find ./dlls -maxdepth 1 -type d ! -iname "*.dll16" ! -iname "*.drv*" ! -iname "*.ds" ! -iname "*.exe*" ! -iname "*.tlb" ! -iname "*.vxd" -print | sed \
  1757. # -e '/^.*\/adsiid$/ d' \
  1758. # -e '/^.*\/advapi32$/ d' \
  1759. # -e '/^.*\/capi2032$/ d' \
  1760. # -e '/^.*\/dbghelp$/ d' \
  1761. # -e '/^.*\/ddraw$/ d' \
  1762. # -e '/^.*\/dlls$/ d' \
  1763. # -e '/^.*\/dmoguids$/ d' \
  1764. # -e '/^.*\/dxerr8$/ d' \
  1765. # -e '/^.*\/dxerr9$/ d' \
  1766. # -e '/^.*\/dxguid$/ d' \
  1767. # -e '/^.*\/gdi32$/ d' \
  1768. # -e '/^.*\/glu32$/ d' \
  1769. # -e '/^.*\/icmp$/ d' \
  1770. # -e '/^.*\/iphlpapi$/ d' \
  1771. # -e '/^.*\/kernel32$/ d' \
  1772. # -e '/^.*\/l3codeca.acm$/ d' \
  1773. # -e '/^.*\/mfuuid$/ d' \
  1774. # -e '/^.*\/mountmgr.sys$/ d' \
  1775. # -e '/^.*\/mswsock$/ d' \
  1776. # -e '/^.*\/ntdll$/ d' \
  1777. # -e '/^.*\/opengl32$/ d' \
  1778. # -e '/^.*\/secur32$/ d' \
  1779. # -e '/^.*\/strmbase$/ d' \
  1780. # -e '/^.*\/strmiids$/ d' \
  1781. # -e '/^.*\/twain_32$/ d' \
  1782. # -e '/^.*\/unicows$/ d' \
  1783. # -e '/^.*\/user32$/ d' \
  1784. # -e '/^.*\/uuid$/ d' \
  1785. # -e '/^.*\/vdmdbg$/ d' \
  1786. # -e '/^.*\/w32skrnl$/ d' \
  1787. # -e '/^.*\/winecrt0$/ d' \
  1788. # -e '/^.*\/wined3d$/ d' \
  1789. # -e '/^.*\/winemp3.acm$/ d' \
  1790. # -e '/^.*\/wineqtdecoder$/ d' \
  1791. # -e '/^.*\/winmm$/ d' \
  1792. # -e '/^.*\/wintab32$/ d' \
  1793. # -e '/^.*\/wmcodecdspuuid$/ d' \
  1794. # -e '/^.*\/wnaspi32$/ d' \
  1795. # -e '/^.*\/wow32$/ d' \
  1796. # -e '/^.*\/ws2_32$/ d' \
  1797. # -e '/^.*\/wsock32$/ d' \
  1798. # -e 's,.*/, ,' | sort | fmt -63 | sed 's/$/ \\/'
  1799. #
  1800. # 2018-12-10: Last list update (wine-4.0-rc1)
  1801. w_override_dlls builtin \
  1802. acledit aclui activeds actxprxy adsldp adsldpc advpack \
  1803. amstream api-ms-win-appmodel-identity-l1-1-0 \
  1804. api-ms-win-appmodel-runtime-l1-1-1 \
  1805. api-ms-win-appmodel-runtime-l1-1-2 \
  1806. api-ms-win-core-apiquery-l1-1-0 \
  1807. api-ms-win-core-appcompat-l1-1-1 \
  1808. api-ms-win-core-appinit-l1-1-0 \
  1809. api-ms-win-core-atoms-l1-1-0 \
  1810. api-ms-win-core-bem-l1-1-0 api-ms-win-core-com-l1-1-0 \
  1811. api-ms-win-core-com-l1-1-1 api-ms-win-core-comm-l1-1-0 \
  1812. api-ms-win-core-com-private-l1-1-0 \
  1813. api-ms-win-core-console-l1-1-0 \
  1814. api-ms-win-core-console-l2-1-0 \
  1815. api-ms-win-core-crt-l1-1-0 api-ms-win-core-crt-l2-1-0 \
  1816. api-ms-win-core-datetime-l1-1-0 \
  1817. api-ms-win-core-datetime-l1-1-1 \
  1818. api-ms-win-core-debug-l1-1-0 \
  1819. api-ms-win-core-debug-l1-1-1 \
  1820. api-ms-win-core-delayload-l1-1-0 \
  1821. api-ms-win-core-delayload-l1-1-1 \
  1822. api-ms-win-core-errorhandling-l1-1-0 \
  1823. api-ms-win-core-errorhandling-l1-1-1 \
  1824. api-ms-win-core-errorhandling-l1-1-2 \
  1825. api-ms-win-core-errorhandling-l1-1-3 \
  1826. api-ms-win-core-fibers-l1-1-0 \
  1827. api-ms-win-core-fibers-l1-1-1 \
  1828. api-ms-win-core-file-l1-1-0 \
  1829. api-ms-win-core-file-l1-2-0 \
  1830. api-ms-win-core-file-l1-2-1 \
  1831. api-ms-win-core-file-l1-2-2 \
  1832. api-ms-win-core-file-l2-1-0 \
  1833. api-ms-win-core-file-l2-1-1 \
  1834. api-ms-win-core-file-l2-1-2 \
  1835. api-ms-win-core-handle-l1-1-0 \
  1836. api-ms-win-core-heap-l1-1-0 \
  1837. api-ms-win-core-heap-l1-2-0 \
  1838. api-ms-win-core-heap-l2-1-0 \
  1839. api-ms-win-core-heap-obsolete-l1-1-0 \
  1840. api-ms-win-core-interlocked-l1-1-0 \
  1841. api-ms-win-core-interlocked-l1-2-0 \
  1842. api-ms-win-core-io-l1-1-0 api-ms-win-core-io-l1-1-1 \
  1843. api-ms-win-core-job-l1-1-0 api-ms-win-core-job-l2-1-0 \
  1844. api-ms-win-core-kernel32-legacy-l1-1-0 \
  1845. api-ms-win-core-kernel32-legacy-l1-1-1 \
  1846. api-ms-win-core-kernel32-private-l1-1-1 \
  1847. api-ms-win-core-largeinteger-l1-1-0 \
  1848. api-ms-win-core-libraryloader-l1-1-0 \
  1849. api-ms-win-core-libraryloader-l1-1-1 \
  1850. api-ms-win-core-libraryloader-l1-2-0 \
  1851. api-ms-win-core-libraryloader-l1-2-1 \
  1852. api-ms-win-core-libraryloader-l1-2-2 \
  1853. api-ms-win-core-localization-l1-1-0 \
  1854. api-ms-win-core-localization-l1-2-0 \
  1855. api-ms-win-core-localization-l1-2-1 \
  1856. api-ms-win-core-localization-l2-1-0 \
  1857. api-ms-win-core-localization-obsolete-l1-1-0 \
  1858. api-ms-win-core-localization-obsolete-l1-2-0 \
  1859. api-ms-win-core-localization-obsolete-l1-3-0 \
  1860. api-ms-win-core-localization-private-l1-1-0 \
  1861. api-ms-win-core-localregistry-l1-1-0 \
  1862. api-ms-win-core-memory-l1-1-0 \
  1863. api-ms-win-core-memory-l1-1-1 \
  1864. api-ms-win-core-memory-l1-1-2 \
  1865. api-ms-win-core-misc-l1-1-0 \
  1866. api-ms-win-core-namedpipe-l1-1-0 \
  1867. api-ms-win-core-namedpipe-l1-2-0 \
  1868. api-ms-win-core-namespace-l1-1-0 \
  1869. api-ms-win-core-normalization-l1-1-0 \
  1870. api-ms-win-core-path-l1-1-0 \
  1871. api-ms-win-core-privateprofile-l1-1-1 \
  1872. api-ms-win-core-processenvironment-l1-1-0 \
  1873. api-ms-win-core-processenvironment-l1-2-0 \
  1874. api-ms-win-core-processthreads-l1-1-0 \
  1875. api-ms-win-core-processthreads-l1-1-1 \
  1876. api-ms-win-core-processthreads-l1-1-2 \
  1877. api-ms-win-core-processthreads-l1-1-3 \
  1878. api-ms-win-core-processtopology-obsolete-l1-1-0 \
  1879. api-ms-win-core-profile-l1-1-0 \
  1880. api-ms-win-core-psapi-ansi-l1-1-0 \
  1881. api-ms-win-core-psapi-l1-1-0 \
  1882. api-ms-win-core-psapi-obsolete-l1-1-0 \
  1883. api-ms-win-core-quirks-l1-1-0 \
  1884. api-ms-win-core-realtime-l1-1-0 \
  1885. api-ms-win-core-registry-l1-1-0 \
  1886. api-ms-win-core-registry-l2-1-0 \
  1887. api-ms-win-core-registryuserspecific-l1-1-0 \
  1888. api-ms-win-core-rtlsupport-l1-1-0 \
  1889. api-ms-win-core-rtlsupport-l1-2-0 \
  1890. api-ms-win-core-shlwapi-legacy-l1-1-0 \
  1891. api-ms-win-core-shlwapi-obsolete-l1-1-0 \
  1892. api-ms-win-core-shlwapi-obsolete-l1-2-0 \
  1893. api-ms-win-core-shutdown-l1-1-0 \
  1894. api-ms-win-core-sidebyside-l1-1-0 \
  1895. api-ms-win-core-stringansi-l1-1-0 \
  1896. api-ms-win-core-string-l1-1-0 \
  1897. api-ms-win-core-string-l2-1-0 \
  1898. api-ms-win-core-stringloader-l1-1-1 \
  1899. api-ms-win-core-string-obsolete-l1-1-0 \
  1900. api-ms-win-core-synch-ansi-l1-1-0 \
  1901. api-ms-win-core-synch-l1-1-0 \
  1902. api-ms-win-core-synch-l1-2-0 \
  1903. api-ms-win-core-synch-l1-2-1 \
  1904. api-ms-win-core-sysinfo-l1-1-0 \
  1905. api-ms-win-core-sysinfo-l1-2-0 \
  1906. api-ms-win-core-sysinfo-l1-2-1 \
  1907. api-ms-win-core-threadpool-l1-1-0 \
  1908. api-ms-win-core-threadpool-l1-2-0 \
  1909. api-ms-win-core-threadpool-legacy-l1-1-0 \
  1910. api-ms-win-core-threadpool-private-l1-1-0 \
  1911. api-ms-win-core-timezone-l1-1-0 \
  1912. api-ms-win-core-toolhelp-l1-1-0 \
  1913. api-ms-win-core-url-l1-1-0 api-ms-win-core-util-l1-1-0 \
  1914. api-ms-win-core-versionansi-l1-1-0 \
  1915. api-ms-win-core-version-l1-1-0 \
  1916. api-ms-win-core-version-l1-1-1 \
  1917. api-ms-win-core-version-private-l1-1-0 \
  1918. api-ms-win-core-windowserrorreporting-l1-1-0 \
  1919. api-ms-win-core-winrt-error-l1-1-0 \
  1920. api-ms-win-core-winrt-error-l1-1-1 \
  1921. api-ms-win-core-winrt-errorprivate-l1-1-1 \
  1922. api-ms-win-core-winrt-l1-1-0 \
  1923. api-ms-win-core-winrt-registration-l1-1-0 \
  1924. api-ms-win-core-winrt-roparameterizediid-l1-1-0 \
  1925. api-ms-win-core-winrt-string-l1-1-0 \
  1926. api-ms-win-core-winrt-string-l1-1-1 \
  1927. api-ms-win-core-wow64-l1-1-0 \
  1928. api-ms-win-core-wow64-l1-1-1 \
  1929. api-ms-win-core-xstate-l1-1-0 \
  1930. api-ms-win-core-xstate-l2-1-0 \
  1931. api-ms-win-crt-conio-l1-1-0 \
  1932. api-ms-win-crt-convert-l1-1-0 \
  1933. api-ms-win-crt-environment-l1-1-0 \
  1934. api-ms-win-crt-filesystem-l1-1-0 \
  1935. api-ms-win-crt-heap-l1-1-0 \
  1936. api-ms-win-crt-locale-l1-1-0 \
  1937. api-ms-win-crt-math-l1-1-0 \
  1938. api-ms-win-crt-multibyte-l1-1-0 \
  1939. api-ms-win-crt-private-l1-1-0 \
  1940. api-ms-win-crt-process-l1-1-0 \
  1941. api-ms-win-crt-runtime-l1-1-0 \
  1942. api-ms-win-crt-stdio-l1-1-0 \
  1943. api-ms-win-crt-string-l1-1-0 \
  1944. api-ms-win-crt-time-l1-1-0 \
  1945. api-ms-win-crt-utility-l1-1-0 \
  1946. api-ms-win-devices-config-l1-1-0 \
  1947. api-ms-win-devices-config-l1-1-1 \
  1948. api-ms-win-devices-query-l1-1-1 \
  1949. api-ms-win-downlevel-advapi32-l1-1-0 \
  1950. api-ms-win-downlevel-advapi32-l2-1-0 \
  1951. api-ms-win-downlevel-normaliz-l1-1-0 \
  1952. api-ms-win-downlevel-ole32-l1-1-0 \
  1953. api-ms-win-downlevel-shell32-l1-1-0 \
  1954. api-ms-win-downlevel-shlwapi-l1-1-0 \
  1955. api-ms-win-downlevel-shlwapi-l2-1-0 \
  1956. api-ms-win-downlevel-user32-l1-1-0 \
  1957. api-ms-win-downlevel-version-l1-1-0 \
  1958. api-ms-win-dx-d3dkmt-l1-1-0 \
  1959. api-ms-win-eventing-classicprovider-l1-1-0 \
  1960. api-ms-win-eventing-consumer-l1-1-0 \
  1961. api-ms-win-eventing-controller-l1-1-0 \
  1962. api-ms-win-eventing-legacy-l1-1-0 \
  1963. api-ms-win-eventing-provider-l1-1-0 \
  1964. api-ms-win-eventlog-legacy-l1-1-0 \
  1965. api-ms-win-gdi-dpiinfo-l1-1-0 \
  1966. api-ms-win-mm-joystick-l1-1-0 \
  1967. api-ms-win-mm-misc-l1-1-1 api-ms-win-mm-mme-l1-1-0 \
  1968. api-ms-win-mm-time-l1-1-0 \
  1969. api-ms-win-ntuser-dc-access-l1-1-0 \
  1970. api-ms-win-ntuser-rectangle-l1-1-0 \
  1971. api-ms-win-ntuser-sysparams-l1-1-0 \
  1972. api-ms-win-perf-legacy-l1-1-0 \
  1973. api-ms-win-power-base-l1-1-0 \
  1974. api-ms-win-power-setting-l1-1-0 \
  1975. api-ms-win-rtcore-ntuser-draw-l1-1-0 \
  1976. api-ms-win-rtcore-ntuser-private-l1-1-0 \
  1977. api-ms-win-rtcore-ntuser-private-l1-1-4 \
  1978. api-ms-win-rtcore-ntuser-window-l1-1-0 \
  1979. api-ms-win-rtcore-ntuser-winevent-l1-1-0 \
  1980. api-ms-win-rtcore-ntuser-wmpointer-l1-1-0 \
  1981. api-ms-win-rtcore-ntuser-wmpointer-l1-1-3 \
  1982. api-ms-win-security-activedirectoryclient-l1-1-0 \
  1983. api-ms-win-security-audit-l1-1-1 \
  1984. api-ms-win-security-base-l1-1-0 \
  1985. api-ms-win-security-base-l1-2-0 \
  1986. api-ms-win-security-base-private-l1-1-1 \
  1987. api-ms-win-security-credentials-l1-1-0 \
  1988. api-ms-win-security-cryptoapi-l1-1-0 \
  1989. api-ms-win-security-grouppolicy-l1-1-0 \
  1990. api-ms-win-security-lsalookup-l1-1-0 \
  1991. api-ms-win-security-lsalookup-l1-1-1 \
  1992. api-ms-win-security-lsalookup-l2-1-0 \
  1993. api-ms-win-security-lsalookup-l2-1-1 \
  1994. api-ms-win-security-lsapolicy-l1-1-0 \
  1995. api-ms-win-security-provider-l1-1-0 \
  1996. api-ms-win-security-sddl-l1-1-0 \
  1997. api-ms-win-security-systemfunctions-l1-1-0 \
  1998. api-ms-win-service-core-l1-1-0 \
  1999. api-ms-win-service-core-l1-1-1 \
  2000. api-ms-win-service-management-l1-1-0 \
  2001. api-ms-win-service-management-l2-1-0 \
  2002. api-ms-win-service-private-l1-1-1 \
  2003. api-ms-win-service-winsvc-l1-1-0 \
  2004. api-ms-win-service-winsvc-l1-2-0 \
  2005. api-ms-win-shcore-obsolete-l1-1-0 \
  2006. api-ms-win-shcore-scaling-l1-1-1 \
  2007. api-ms-win-shcore-stream-l1-1-0 \
  2008. api-ms-win-shcore-thread-l1-1-0 \
  2009. api-ms-win-shell-shellcom-l1-1-0 \
  2010. api-ms-win-shell-shellfolders-l1-1-0 apphelp \
  2011. appwiz.cpl atl atl100 atl110 atl80 atl90 atmlib \
  2012. authz avicap32 avifil32 avrt bcrypt bluetoothapis \
  2013. browseui bthprops.cpl cabinet cards cdosys cfgmgr32 \
  2014. clusapi combase comcat comctl32 comdlg32 compstui \
  2015. comsvcs concrt140 connect credui crtdll crypt32 \
  2016. cryptdlg cryptdll cryptext cryptnet cryptui ctapi32 \
  2017. ctl3d32 d2d1 d3d10 d3d10_1 d3d10core d3d11 d3d12 d3d8 \
  2018. d3d9 d3dcompiler_33 d3dcompiler_34 d3dcompiler_35 \
  2019. d3dcompiler_36 d3dcompiler_37 d3dcompiler_38 \
  2020. d3dcompiler_39 d3dcompiler_40 d3dcompiler_41 \
  2021. d3dcompiler_42 d3dcompiler_43 d3dcompiler_46 \
  2022. d3dcompiler_47 d3dim d3drm d3dx10_33 d3dx10_34 \
  2023. d3dx10_35 d3dx10_36 d3dx10_37 d3dx10_38 d3dx10_39 \
  2024. d3dx10_40 d3dx10_41 d3dx10_42 d3dx10_43 d3dx11_42 \
  2025. d3dx11_43 d3dx9_24 d3dx9_25 d3dx9_26 d3dx9_27 \
  2026. d3dx9_28 d3dx9_29 d3dx9_30 d3dx9_31 d3dx9_32 d3dx9_33 \
  2027. d3dx9_34 d3dx9_35 d3dx9_36 d3dx9_37 d3dx9_38 d3dx9_39 \
  2028. d3dx9_40 d3dx9_41 d3dx9_42 d3dx9_43 d3dxof davclnt \
  2029. dbgeng dciman32 ddrawex devenum dhcpcsvc dhtmled.ocx \
  2030. difxapi dinput dinput8 dispex dmband dmcompos dmime \
  2031. dmloader dmscript dmstyle dmsynth dmusic dmusic32 \
  2032. dnsapi dplay dplayx dpnaddr dpnet dpnhpast dpnlobby \
  2033. dpvoice dpwsockx drmclien dsound dsquery dssenh \
  2034. dswave dwmapi dwrite dx8vb dxdiagn dxgi dxva2 esent \
  2035. evr explorerframe ext-ms-win-authz-context-l1-1-0 \
  2036. ext-ms-win-domainjoin-netjoin-l1-1-0 \
  2037. ext-ms-win-dwmapi-ext-l1-1-0 \
  2038. ext-ms-win-gdi-dc-create-l1-1-1 \
  2039. ext-ms-win-gdi-dc-l1-2-0 ext-ms-win-gdi-devcaps-l1-1-0 \
  2040. ext-ms-win-gdi-draw-l1-1-1 \
  2041. ext-ms-win-gdi-render-l1-1-0 \
  2042. ext-ms-win-kernel32-package-current-l1-1-0 \
  2043. ext-ms-win-kernel32-package-l1-1-1 \
  2044. ext-ms-win-ntuser-draw-l1-1-0 \
  2045. ext-ms-win-ntuser-gui-l1-3-0 \
  2046. ext-ms-win-ntuser-keyboard-l1-3-0 \
  2047. ext-ms-win-ntuser-message-l1-1-1 \
  2048. ext-ms-win-ntuser-misc-l1-2-0 \
  2049. ext-ms-win-ntuser-misc-l1-5-1 \
  2050. ext-ms-win-ntuser-mouse-l1-1-0 \
  2051. ext-ms-win-ntuser-private-l1-1-1 \
  2052. ext-ms-win-ntuser-private-l1-3-1 \
  2053. ext-ms-win-ntuser-rectangle-ext-l1-1-0 \
  2054. ext-ms-win-ntuser-uicontext-ext-l1-1-0 \
  2055. ext-ms-win-ntuser-windowclass-l1-1-1 \
  2056. ext-ms-win-ntuser-window-l1-1-1 \
  2057. ext-ms-win-ntuser-window-l1-1-4 \
  2058. ext-ms-win-oleacc-l1-1-0 \
  2059. ext-ms-win-ras-rasapi32-l1-1-0 \
  2060. ext-ms-win-rtcore-gdi-devcaps-l1-1-0 \
  2061. ext-ms-win-rtcore-gdi-object-l1-1-0 \
  2062. ext-ms-win-rtcore-gdi-rgn-l1-1-0 \
  2063. ext-ms-win-rtcore-ntuser-cursor-l1-1-0 \
  2064. ext-ms-win-rtcore-ntuser-dc-access-l1-1-0 \
  2065. ext-ms-win-rtcore-ntuser-dpi-l1-1-0 \
  2066. ext-ms-win-rtcore-ntuser-dpi-l1-2-0 \
  2067. ext-ms-win-rtcore-ntuser-rawinput-l1-1-0 \
  2068. ext-ms-win-rtcore-ntuser-syscolors-l1-1-0 \
  2069. ext-ms-win-rtcore-ntuser-sysparams-l1-1-0 \
  2070. ext-ms-win-security-credui-l1-1-0 \
  2071. ext-ms-win-security-cryptui-l1-1-0 \
  2072. ext-ms-win-uxtheme-themes-l1-1-0 faultrep feclient \
  2073. fltlib fltmgr.sys fntcache fontsub fusion fwpuclnt \
  2074. gameux gdiplus gpkcsp hal hhctrl.ocx hid hidclass.sys \
  2075. hlink hnetcfg httpapi iccvid ieframe ieproxy \
  2076. imaadp32.acm imagehlp imm32 inetcomm inetcpl.cpl \
  2077. inetmib1 infosoft initpki inkobj inseng iprop \
  2078. irprops.cpl itircl itss joy.cpl jscript jsproxy \
  2079. kerberos kernelbase ksuser ktmw32 loadperf localspl \
  2080. localui lz32 mapi32 mapistub mciavi32 mcicda mciqtz32 \
  2081. mciseq mciwave mf mf3216 mfplat mfreadwrite mgmtapi \
  2082. midimap mlang mmcndmgr mmdevapi mp3dmod mpr mprapi \
  2083. msacm32 msadp32.acm msasn1 mscat32 mscms mscoree \
  2084. msctf msctfp msdaps msdelta msdmo msdrm msftedit \
  2085. msg711.acm msgsm32.acm mshtml msi msident msimg32 \
  2086. msimsg msimtf msisip msisys.ocx msls31 msnet32 \
  2087. mspatcha msports msrle32 msscript.ocx mssign32 \
  2088. mssip32 mstask msvcirt msvcm80 msvcm90 msvcp100 \
  2089. msvcp110 msvcp120 msvcp120_app msvcp140 msvcp60 \
  2090. msvcp70 msvcp71 msvcp80 msvcp90 msvcr100 msvcr110 \
  2091. msvcr120 msvcr120_app msvcr70 msvcr71 msvcr80 \
  2092. msvcr90 msvcrt msvcrt20 msvcrt40 msvcrtd msvfw32 \
  2093. msvidc32 msxml msxml2 msxml3 msxml4 msxml6 mtxdm \
  2094. ncrypt nddeapi ndis.sys netapi32 netcfgx netprofm \
  2095. newdev ninput normaliz npmshtml npptools ntdsapi \
  2096. ntprint objsel odbc32 odbccp32 odbccu32 ole32 oleacc \
  2097. oleaut32 olecli32 oledb32 oledlg olepro32 olesvr32 \
  2098. olethk32 opcservices openal32 opencl packager pdh \
  2099. photometadatahandler pidgen powrprof printui prntvpt \
  2100. propsys psapi pstorec qcap qedit qmgr qmgrprxy \
  2101. quartz query qwave rasapi32 rasdlg regapi resutils \
  2102. riched20 riched32 rpcrt4 rsabase rsaenh rstrtmgr \
  2103. rtutils samlib sapi sas scarddlg sccbase schannel \
  2104. schedsvc scrobj scrrun scsiport.sys security sensapi \
  2105. serialui setupapi sfc sfc_os shcore shdoclc shdocvw \
  2106. shell32 shfolder shlwapi slbcsp slc snmpapi softpub \
  2107. spoolss srclient sspicli sti strmdll svrapi sxs \
  2108. t2embed tapi32 taskschd tdh tdi.sys traffic tzres \
  2109. ucrtbase uiautomationcore uiribbon updspapi url \
  2110. urlmon usbd.sys userenv usp10 uxtheme vbscript \
  2111. vcomp vcomp100 vcomp110 vcomp120 vcomp140 vcomp90 \
  2112. vcruntime140 version virtdisk vssapi vulkan-1 wbemdisp \
  2113. wbemprox wdscore webservices wer wevtapi wiaservc \
  2114. wimgapi windowscodecs windowscodecsext winebus.sys \
  2115. winegstreamer winehid.sys winemapi winevulkan wing32 \
  2116. winhttp wininet winnls32 winscard winsta wintrust \
  2117. winusb wlanapi wldap32 wmasf wmi wmiutils wmp wmphoto \
  2118. wmvcore wpc wpcap wsdapi wshom.ocx wsnmp32 wtsapi32 \
  2119. wuapi wuaueng x3daudio1_0 x3daudio1_1 x3daudio1_2 \
  2120. x3daudio1_3 x3daudio1_4 x3daudio1_5 x3daudio1_6 \
  2121. x3daudio1_7 xapofx1_1 xapofx1_2 xapofx1_3 xapofx1_4 \
  2122. xapofx1_5 xaudio2_0 xaudio2_1 xaudio2_2 xaudio2_3 \
  2123. xaudio2_4 xaudio2_5 xaudio2_6 xaudio2_7 xaudio2_8 \
  2124. xaudio2_9 xinput1_1 xinput1_2 xinput1_3 xinput1_4 \
  2125. xinput9_1_0 xmllite xolehlp xpsprint xpssvcs \
  2126. # blank line so you don't have to remove the extra trailing \
  2127. }
  2128. w_override_app_dlls()
  2129. {
  2130. w_skip_windows w_override_app_dlls && return
  2131. _W_app=$1
  2132. shift
  2133. _W_mode=$1
  2134. shift
  2135. # Fixme: handle comma-separated list of modes
  2136. case ${_W_mode} in
  2137. b|builtin) _W_mode=builtin ;;
  2138. n|native) _W_mode=native ;;
  2139. default) _W_mode=default ;;
  2140. d|disabled) _W_mode="" ;;
  2141. *)
  2142. w_die "w_override_app_dlls: unknown mode ${_W_mode}. (want native, builtin, default, or disabled)
  2143. Usage: 'w_override_app_dlls app mode dll ...'." ;;
  2144. esac
  2145. echo "Using ${_W_mode} override for following DLLs when running ${_W_app}: $*"
  2146. (
  2147. printf 'REGEDIT4\n\n[HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\%s\\DllOverrides]\n' "${_W_app}"
  2148. ) > "${W_TMP}"/override-dll.reg
  2149. while test "$1" != ""; do
  2150. w_common_override_dll "${_W_mode}" "$1"
  2151. shift
  2152. done
  2153. w_try_regedit "${W_TMP_WIN}"\\override-dll.reg
  2154. w_try rm "${W_TMP}"/override-dll.reg
  2155. unset _W_app _W_mode
  2156. }
  2157. # Has to be set in a few places...
  2158. w_set_winver()
  2159. {
  2160. w_skip_windows w_set_winver && return
  2161. _W_winver="$1"
  2162. # Make sure we pass the right version name:
  2163. case "${_W_winver}" in
  2164. # These are the mismatched ones:
  2165. # winecfg doesn't accept 'default' as an option (as of wine-5.9):
  2166. # https://bugs.winehq.org/show_bug.cgi?id=49241
  2167. # For now, assuming win7:
  2168. default) _W_winver="win7";;
  2169. win2k3) _W_winver="win2003";;
  2170. win2k8) _W_winver="win2008";;
  2171. win2k8r2) _W_winver="win2008r2";;
  2172. # xp has two entries (winxp/winxp64):
  2173. winxp)
  2174. if [ "${W_ARCH}" = "win64" ]; then
  2175. _W_winver="winxp64"
  2176. else
  2177. _W_winver="winxp"
  2178. fi
  2179. ;;
  2180. # These are the same:
  2181. nt351|nt40|vista|win10|win11|win20|win2k|win30|win31|win7|win8|win81|win95|win98|winme) : ;;
  2182. *) w_die "Unsupported Windows version ${_W_winver}";;
  2183. esac
  2184. w_try "${WINE}" winecfg -v "${_W_winver}"
  2185. # Prevent a race when calling from another verb
  2186. w_wineserver -w
  2187. }
  2188. # Restore a previously set winver. If not found, use default
  2189. w_restore_winver()
  2190. {
  2191. if [ -z "${_W_user_winver}" ]; then
  2192. _W_user_winver="default"
  2193. fi
  2194. w_set_winver "${_W_user_winver}"
  2195. unset "${_W_user_winver}"
  2196. }
  2197. # Get the current winver from winecfg, store it in a variable to be restored with w_restore_winver
  2198. w_store_winver()
  2199. {
  2200. # Only set if not set already; for cases where a verb changes the version multiple times
  2201. # or calls a second verb that changes the version
  2202. if [ -z "${_W_user_winver}" ]; then
  2203. _W_user_winver=$("${WINE}" winecfg /v | tr -d '\r')
  2204. fi
  2205. }
  2206. w_unset_winver()
  2207. {
  2208. w_warn "w_unset_winver() is deprecated, use \'w_set_winver default\' instead"
  2209. w_set_winver default
  2210. }
  2211. # Present app $1 with the Windows personality $2
  2212. w_set_app_winver()
  2213. {
  2214. w_skip_windows w_set_app_winver && return
  2215. _W_app="$1"
  2216. _W_version="$2"
  2217. echo "Setting ${_W_app} to ${_W_version} mode"
  2218. (
  2219. echo REGEDIT4
  2220. echo ""
  2221. echo "[HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\${_W_app}]"
  2222. echo "\"Version\"=\"${_W_version}\""
  2223. ) > "${W_TMP}"/set-winver.reg
  2224. w_try_regedit "${W_TMP_WIN}"\\set-winver.reg
  2225. rm "${W_TMP}"/set-winver.reg
  2226. unset _W_app
  2227. }
  2228. # Usage: w_compare_wine_version OP VALUE
  2229. # Note: currently only -ge and -le are supported,
  2230. # as well as the special case -bn (between)
  2231. # Example:
  2232. # if w_compare_wine_version -ge 2.5 ; then
  2233. # ...
  2234. # fi
  2235. #
  2236. # Returns true if comparison is valid
  2237. w_compare_wine_version()
  2238. {
  2239. comparison="$1"
  2240. known_wine_val1="$2"
  2241. known_wine_val2="$3"
  2242. case "${comparison}" in
  2243. # expected value if the comparison is true
  2244. -bn)
  2245. # If the current wine version matches the lower version, it's a match (the bug is present).
  2246. # If it matches the higher version, it's not a match (the bug is fixed in that version).
  2247. if [ "${_wine_version_stripped}" = "${known_wine_val1}" ]; then
  2248. return "${TRUE}"
  2249. elif [ "${_wine_version_stripped}" = "${known_wine_val2}" ]; then
  2250. return "${FALSE}"
  2251. else
  2252. _expected_pos_current_wine="2"
  2253. fi
  2254. ;;
  2255. -ge) _expected_pos_current_wine="2";;
  2256. -le) _expected_pos_current_wine="1";;
  2257. *) w_die "Unsupported comparison. Only -bn, -ge, and -le are supported" ;;
  2258. esac
  2259. # First, check if current wine is equal to either upper or lower wine version:
  2260. case "${_wine_version_stripped}" in
  2261. "${known_wine_val1}"|"${known_wine_val2}") return "${TRUE}";;
  2262. esac
  2263. _pos_current_wine="$(printf "%s\\n%s\\n%s" "${known_wine_val1}" "${_wine_version_stripped}" "${known_wine_val2}" | sort -t. -k 1,1n -k 2,2n -k 3,3n | grep -n "^${_wine_version_stripped}\$" | cut -d : -f1)"
  2264. if [ "${_pos_current_wine}" = "${_expected_pos_current_wine}" ] ; then
  2265. #echo "true: known_wine_version=$2, comparison=$1, stripped wine=$_wine_version_stripped, expected_pos=$_expected_pos_known, pos_known=$_pos_known_wine"
  2266. #echo "Wine version comparison is true"
  2267. return "${TRUE}"
  2268. else
  2269. #echo "false: known_wine_version=$2, comparison=$1, stripped wine=$_wine_version_stripped, expected_pos=$_expected_pos_known, pos_known=$_pos_known_wine"
  2270. #echo "Wine version comparison is false"
  2271. return "${FALSE}"
  2272. fi
  2273. }
  2274. # Usage: w_wine_version_in range ...
  2275. # True if wine version in any of the given ranges
  2276. # 'range' can be
  2277. # val1, (for >= val1)
  2278. # ,val2 (for <= val2)
  2279. # val1,val2 (for >= val1 && <= val2)
  2280. w_wine_version_in()
  2281. {
  2282. for _W_range; do
  2283. _W_val1=$(echo "${_W_range}" | sed 's/,.*//')
  2284. _W_val2=$(echo "${_W_range}" | sed 's/.*,//')
  2285. # If in this range, return true
  2286. case ${_W_range} in
  2287. ,*) w_compare_wine_version -le "${_W_val2}" && unset _W_range _W_val1 _W_val2 && return "${TRUE}";;
  2288. *,) w_compare_wine_version -ge "${_W_val1}" && unset _W_range _W_val1 _W_val2 && return "${TRUE}";;
  2289. *) w_compare_wine_version -bn "${_W_val1}" "${_W_val2}" && unset _W_range _W_val1 _W_val2 && return "${TRUE}";;
  2290. esac
  2291. done
  2292. unset _W_range _W_val1 _W_val2
  2293. return "${FALSE}"
  2294. }
  2295. # Usage: workaround_wine_bug bugnumber [message] [good-wine-version-range ...]
  2296. # Returns true and outputs given msg if the workaround needs to be applied.
  2297. # For debugging: if you want to skip a bug's workaround, put the bug number in
  2298. # the environment variable WINETRICKS_BLACKLIST to disable it.
  2299. w_workaround_wine_bug()
  2300. {
  2301. if test "${WINE}" = ""; then
  2302. echo "No need to work around wine bug $1 on Windows"
  2303. return "${FALSE}"
  2304. fi
  2305. case "$2" in
  2306. [0-9]*) w_die "bug: want message in w_workaround_wine_bug arg 2, got $2" ;;
  2307. "") _W_msg="";;
  2308. *) _W_msg="-- $2";;
  2309. esac
  2310. # shellcheck disable=SC2086
  2311. if test "$3" && w_wine_version_in $3 $4 $5 $6; then
  2312. echo "Current Wine does not have Wine bug $1, so not applying workaround"
  2313. return "${FALSE}"
  2314. fi
  2315. case "$1" in
  2316. "${WINETRICKS_BLACKLIST}")
  2317. echo "Wine bug $1 workaround blacklisted, skipping"
  2318. return "${FALSE}"
  2319. ;;
  2320. esac
  2321. case ${LANG} in
  2322. bg*) w_warn "Заобикаляне на проблема ${1} ${_W_msg}" ;;
  2323. da*) w_warn "Arbejder uden om wine-fejl ${1} ${_W_msg}" ;;
  2324. de*) w_warn "Wine-Fehler ${1} wird umgegangen ${_W_msg}" ;;
  2325. pl*) w_warn "Obchodzenie błędu w wine ${1} ${_W_msg}" ;;
  2326. pt*) w_warn "Trabalhando em torno do bug do wine ${1} ${_W_msg}" ;;
  2327. ru*) w_warn "Обход ошибки ${1} ${_W_msg}" ;;
  2328. uk*) w_warn "Обхід помилки ${1} ${_W_msg}" ;;
  2329. zh_CN*) w_warn "绕过 wine bug ${1} ${_W_msg}" ;;
  2330. zh_TW*|zh_HK*) w_warn "繞過 wine bug ${1} ${_W_msg}" ;;
  2331. *) w_warn "Working around wine bug ${1} ${_W_msg}" ;;
  2332. esac
  2333. winetricks_stats_log_command "w_workaround_wine_bug-$1"
  2334. return "${TRUE}"
  2335. }
  2336. # Function for verbs to register themselves so they show up in the menu.
  2337. # Example:
  2338. # w_metadata cmd dlls \
  2339. # title="MS cmd.exe" \
  2340. # publisher="Microsoft" \
  2341. # year="2004" \
  2342. # media="download" \
  2343. # file1="Q811493_W2K_SP4_X86_EN.exe" \
  2344. # installed_file1="${W_SYSTEM32_DLLS_WIN}/cmd.exe"
  2345. w_metadata()
  2346. {
  2347. case ${WINETRICKS_OPT_VERBOSE} in
  2348. 2) set -x ;;
  2349. *) set +x ;;
  2350. esac
  2351. # shellcheck disable=SC2154
  2352. if test "${installed_exe1}" || test "${installed_file1}" || test "${publisher}" || test "${year}"; then
  2353. w_die "bug: stray metadata tags set: somebody forgot a backslash in a w_metadata somewhere. Run with sh -x to see where."
  2354. fi
  2355. if winetricks_metadata_exists "$1"; then
  2356. w_die "bug: a verb named $1 already exists."
  2357. fi
  2358. _W_md_cmd="$1"
  2359. _W_category="$2"
  2360. file="${WINETRICKS_METADATA}/${_W_category}/$1.vars"
  2361. shift
  2362. shift
  2363. # Echo arguments to file, with double quotes around the values.
  2364. # Used to use Perl here, but that was too slow on Cygwin.
  2365. for arg; do
  2366. # If _W_wine_not_needed is set, we're a list command that isn't list-installed, and can ignore the installed_* errors:
  2367. case "${arg}" in
  2368. installed_exe1=/*)
  2369. if [ -n "${_W_wine_not_needed}" ]; then
  2370. # "_W_wine_not_needed set, no installed_exe1"
  2371. :
  2372. else
  2373. w_die "bug: w_metadata ${_W_md_cmd} has a unix path for installed_exe1, should be a windows path"
  2374. fi
  2375. ;;
  2376. installed_file1=/*)
  2377. if [ -n "${_W_wine_not_needed}" ]; then
  2378. # "_W_wine_not_needed set, no installed_file1"
  2379. :
  2380. else
  2381. w_die "bug: w_metadata ${_W_md_cmd} has a unix path for installed_file1, should be a windows path"
  2382. fi
  2383. ;;
  2384. media=download_manual)
  2385. w_die "bug: verb ${_W_md_cmd} has media=download_manual, should be manual_download";;
  2386. esac
  2387. # Use longest match when stripping value,
  2388. # and shortest match when stripping name,
  2389. # so descriptions can have embedded equals signs
  2390. # FIXME: backslashes get interpreted here. This screws up
  2391. # installed_file1 fairly often. Fortunately, we can use forward
  2392. # slashes in that variable instead of backslashes.
  2393. echo "${arg%%=*}"=\""${arg#*=}"\"
  2394. done > "${file}"
  2395. echo category='"'"${_W_category}"'"' >> "${file}"
  2396. # If the problem described above happens, you'd see errors like this:
  2397. # /tmp/w.dank.4650/metadata/dlls/comctl32.vars: 6: Syntax error: Unterminated quoted string
  2398. # so check for lines that aren't properly quoted.
  2399. # Do sanity check unless running on Cygwin, where it's way too slow.
  2400. case "${W_PLATFORM}" in
  2401. windows_cmd)
  2402. ;;
  2403. *)
  2404. if grep '[^"]$' "${file}"; then
  2405. w_die "bug: w_metadata ${_W_md_cmd} corrupt, might need forward slashes?"
  2406. fi
  2407. ;;
  2408. esac
  2409. unset _W_md_cmd
  2410. # Restore verbosity:
  2411. case ${WINETRICKS_OPT_VERBOSE} in
  2412. 1|2) set -x ;;
  2413. *) set +x ;;
  2414. esac
  2415. }
  2416. # Function for verbs to register their main executable [or, if name is given, other executables]
  2417. # Deprecated. No-op for backwards compatibility
  2418. w_declare_exe()
  2419. {
  2420. w_warn "w_declare_exe is deprecated, now a noop"
  2421. }
  2422. # Checks that a conflicting verb is not already installed in the prefix
  2423. # Usage: w_conflicts verb_to_install conflicting_verbs
  2424. w_conflicts()
  2425. {
  2426. verb="$1"
  2427. conflicting_verbs="$2"
  2428. for x in ${conflicting_verbs}; do
  2429. if grep -qw "${x}" "${WINEPREFIX}/winetricks.log" 2>/dev/null; then
  2430. w_die "error: ${verb} conflicts with ${x}, which is already installed. You can run \`$0 --force ${verb}\` to ignore this check and attempt installation."
  2431. fi
  2432. done
  2433. }
  2434. # Call a verb, don't let it affect environment
  2435. # Hope that subshell passes through exit status
  2436. # Usage: w_do_call foo [bar] (calls load_foo bar)
  2437. # Or: w_do_call foo=bar (also calls load_foo bar)
  2438. # Or: w_do_call foo (calls load_foo)
  2439. w_do_call()
  2440. {
  2441. (
  2442. # Hack..
  2443. if test "${cmd}" = vd; then
  2444. load_vd "${arg}"
  2445. _W_status=$?
  2446. test "${W_OPT_NOCLEAN}" = 1 || rm -rf "${W_TMP}"
  2447. w_try_mkdir -q "${W_TMP}"
  2448. return ${_W_status}
  2449. fi
  2450. case "$1" in
  2451. *=*) arg=$(echo "$1" | sed 's/.*=//'); cmd=$(echo "$1" | sed 's/=.*//');;
  2452. *) cmd=$1; arg=$2 ;;
  2453. esac
  2454. # Kludge: use Temp instead of temp to avoid \t expansion in w_try
  2455. # but use temp in Unix path because that's what Wine creates, and having both temp and Temp
  2456. # causes confusion (e.g. makes vc2005trial fail)
  2457. # FIXME: W_TMP is also set in winetricks_set_wineprefix, can we avoid the duplication?
  2458. W_TMP="${W_DRIVE_C}/windows/temp/_$1"
  2459. W_TMP_WIN="C:\\windows\\Temp\\_$1"
  2460. test "${W_OPT_NOCLEAN}" = 1 || rm -rf "${W_TMP}"
  2461. w_try_mkdir -q "${W_TMP}"
  2462. # Unset all known used metadata values, in case this is a nested call
  2463. unset conflicts installed_file1 installed_exe1
  2464. if winetricks_metadata_exists "$1"; then
  2465. # shellcheck disable=SC1090
  2466. . "${WINETRICKS_METADATA}"/*/"${1}.vars"
  2467. elif winetricks_metadata_exists "${cmd}"; then
  2468. # shellcheck disable=SC1090
  2469. . "${WINETRICKS_METADATA}"/*/"${cmd}.vars"
  2470. elif test "${cmd}" = native || test "${cmd}" = disabled || test "${cmd}" = builtin || test "${cmd}" = default; then
  2471. # ugly special case - can't have metadata for these verbs until we allow arbitrary parameters
  2472. w_override_dlls "${cmd}" "${arg}"
  2473. _W_status=$?
  2474. test "${W_OPT_NOCLEAN}" = 1 || rm -rf "${W_TMP}"
  2475. w_try_mkdir "${W_TMP}"
  2476. return ${_W_status}
  2477. else
  2478. w_die "No such verb $1"
  2479. fi
  2480. # If needed, set the app's wineprefix
  2481. case "${W_PLATFORM}" in
  2482. windows_cmd|wine_cmd) ;;
  2483. *)
  2484. case "${_W_category}-${WINETRICKS_OPT_SHAREDPREFIX}" in
  2485. apps-0|benchmarks-0) winetricks_set_wineprefix "${cmd}";;
  2486. *) winetricks_set_wineprefix "${_W_prefix_name}";;
  2487. esac
  2488. # If it's a new wineprefix, give it metadata
  2489. if test ! -f "${WINEPREFIX}"/wrapper.cfg; then
  2490. echo ww_name=\""${title}"\" > "${WINEPREFIX}"/wrapper.cfg
  2491. fi
  2492. ;;
  2493. esac
  2494. test "${W_OPT_NOCLEAN}" = 1 || rm -rf "${W_TMP}"
  2495. w_try_mkdir -q "${W_TMP}"
  2496. # Don't install if a conflicting verb is already installed:
  2497. # shellcheck disable=SC2154
  2498. if test "${WINETRICKS_FORCE}" != 1 && test "${conflicts}" && test -f "${WINEPREFIX}/winetricks.log"; then
  2499. for x in ${conflicts}; do
  2500. w_conflicts "$1" "${x}"
  2501. done
  2502. fi
  2503. # Allow verifying a verb separately from installing it
  2504. if test "${WINETRICKS_VERIFY}" = 1 && winetricks_is_installed "$1" && test -z "${WINETRICKS_FORCE}"; then
  2505. echo "$1 is already installed. --force wasn't given, --verify was, so re-verifying."
  2506. winetricks_verify
  2507. return "${TRUE}"
  2508. fi
  2509. # Don't install if already installed
  2510. if test "${WINETRICKS_FORCE}" != 1 && winetricks_is_installed "$1"; then
  2511. echo "$1 already installed, skipping"
  2512. return "${TRUE}"
  2513. fi
  2514. # We'd like to get rid of W_PACKAGE, but for now, just set it as late as possible.
  2515. W_PACKAGE=$1
  2516. w_try "load_${cmd}" "${arg}"
  2517. winetricks_stats_log_command "$@"
  2518. # User-specific postinstall hook.
  2519. # Source it so the script can call w_download() if needed.
  2520. postfile="${WINETRICKS_POST}/$1/$1-postinstall.sh"
  2521. if test -f "${postfile}"; then
  2522. chmod +x "${postfile}"
  2523. # shellcheck disable=SC1090
  2524. . "${postfile}"
  2525. fi
  2526. # Verify install
  2527. if test "${installed_exe1}" || test "${installed_file1}"; then
  2528. if ! winetricks_is_installed "$1"; then
  2529. w_die "$1 install completed, but installed file ${_W_file_unix} not found"
  2530. fi
  2531. fi
  2532. # If the user specified --verify, also run GUI tests:
  2533. if test "${WINETRICKS_VERIFY}" = 1; then
  2534. winetricks_verify
  2535. fi
  2536. # Clean up after this verb
  2537. test "${W_OPT_NOCLEAN}" = 1 || rm -rf "${W_TMP}"
  2538. w_try_mkdir -q "${W_TMP}"
  2539. # Reset whether use of user mount tool
  2540. unset W_USE_USERMOUNT
  2541. # Calling subshell must explicitly propagate error code with exit $?
  2542. ) || exit $?
  2543. }
  2544. # If you want to check exit status yourself, use w_do_call
  2545. w_call()
  2546. {
  2547. w_try w_do_call "$@"
  2548. }
  2549. w_backup_reg_file()
  2550. {
  2551. W_reg_file=$1
  2552. w_get_sha256sum "${W_reg_file}"
  2553. w_try cp "${W_reg_file}" "${W_TMP_EARLY}/_reg_$(echo "${_W_gotsha256sum}" | cut -c1-8)"_$$.reg
  2554. unset W_reg_file _W_gotsha256sum
  2555. }
  2556. w_register_font()
  2557. {
  2558. W_file=$1
  2559. shift
  2560. W_font=$1
  2561. case $(echo "${W_file}" | tr "[:upper:]" "[:lower:]") in
  2562. *.ttf|*.ttc) W_font="${W_font} (TrueType)";;
  2563. esac
  2564. # Kludge: use _r to avoid \r expansion in w_try
  2565. cat > "${W_TMP}"/_register-font.reg <<_EOF_
  2566. REGEDIT4
  2567. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts]
  2568. "${W_font}"="${W_file}"
  2569. _EOF_
  2570. # too verbose
  2571. w_try_regedit "${W_TMP_WIN}"\\_register-font.reg
  2572. w_backup_reg_file "${W_TMP}"/_register-font.reg
  2573. # Wine also updates the win9x fonts key, so let's do that, too
  2574. cat > "${W_TMP}"/_register-font.reg <<_EOF_
  2575. REGEDIT4
  2576. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Fonts]
  2577. "${W_font}"="${W_file}"
  2578. _EOF_
  2579. w_try_regedit "${W_TMP_WIN}"\\_register-font.reg
  2580. w_backup_reg_file "${W_TMP}"/_register-font.reg
  2581. unset W_file W_font
  2582. }
  2583. # Note: we use UTF-16 (little endian) in .reg file for native (non-English) font names.
  2584. w_register_font_replacement()
  2585. {
  2586. _W_alias=$1
  2587. shift
  2588. _W_font=$1
  2589. # UTF-16 BOM (U+FEFF, "0xEF 0xBB 0xBF" in UTF-8)
  2590. printf "\357\273\277" | iconv -f UTF-8 -t UTF-16LE > "${W_TMP}"/_register-font-replacements.reg
  2591. # Kludge: use _r to avoid \r expansion in w_try
  2592. iconv -f UTF-8 -t UTF-16LE >> "${W_TMP}"/_register-font-replacements.reg <<_EOF_
  2593. REGEDIT4
  2594. [HKEY_CURRENT_USER\\Software\\Wine\\Fonts\\Replacements]
  2595. "${_W_alias}"="${_W_font}"
  2596. _EOF_
  2597. w_try_regedit "${W_TMP_WIN}"\\_register-font-replacements.reg
  2598. w_backup_reg_file "${W_TMP}"/_register-font-replacements.reg
  2599. unset _W_alias _W_font
  2600. }
  2601. w_append_path()
  2602. {
  2603. # Prepend $1 to the Windows path in the registry.
  2604. # Use printf %s to avoid interpreting backslashes.
  2605. # 2/4 backslashes, not 4/8, see https://github.com/Winetricks/winetricks/issues/932
  2606. _W_NEW_PATH="$(printf %s "$1" | sed 's,\\,\\\\,g')"
  2607. _W_WIN_PATH="$(w_expand_env PATH | sed 's,\\,\\\\,g')"
  2608. # FIXME: OS X? https://github.com/Winetricks/winetricks/issues/697
  2609. sed 's/$/\r/' > "${W_TMP}"/path.reg <<_EOF_
  2610. REGEDIT4
  2611. [HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Environment]
  2612. "PATH"="${_W_NEW_PATH};${_W_WIN_PATH}"
  2613. _EOF_
  2614. w_try_regedit "${W_TMP_WIN}"\\path.reg
  2615. rm -f "${W_TMP}"/path.reg
  2616. unset _W_NEW_PATH _W_WIN_PATH
  2617. }
  2618. #---- Private Functions ----
  2619. # Determines downloader to use, etc.
  2620. # I.e., things common to w_download_to(), winetricks_download_to_stdout(), and winetricks_stats_report())
  2621. winetricks_download_setup()
  2622. {
  2623. # shellcheck disable=SC2104
  2624. case "${WINETRICKS_DOWNLOADER}" in
  2625. aria2c|curl|wget|fetch) : ;;
  2626. "") if [ -x "$(command -v aria2c 2>/dev/null)" ] ; then
  2627. WINETRICKS_DOWNLOADER="aria2c"
  2628. elif [ -x "$(command -v wget 2>/dev/null)" ] ; then
  2629. WINETRICKS_DOWNLOADER="wget"
  2630. elif [ -x "$(command -v curl 2>/dev/null)" ] ; then
  2631. WINETRICKS_DOWNLOADER="curl"
  2632. elif [ -x "$(command -v fetch 2>/dev/null)" ] ; then
  2633. WINETRICKS_DOWNLOADER="fetch"
  2634. else
  2635. w_die "Please install wget or aria2c (or, if those aren't available, curl)"
  2636. fi
  2637. ;;
  2638. *) w_die "Invalid value ${WINETRICKS_DOWNLOADER} given for WINETRICKS_DOWNLOADER. Possible values: aria2c, curl, wget, fetch"
  2639. esac
  2640. # Common values for aria2c/curl/fetch/wget
  2641. # Number of retry attempts (not supported by fetch):
  2642. WINETRICKS_DOWNLOADER_RETRIES=${WINETRICKS_DOWNLOADER_RETRIES:-3}
  2643. # Connection timeout time (in seconds):
  2644. WINETRICKS_DOWNLOADER_TIMEOUT=${WINETRICKS_DOWNLOADER_TIMEOUT:-15}
  2645. case "${WINETRICKS_OPT_TORIFY}" in
  2646. 1) torify=torify
  2647. # torify needs --async-dns=false, see https://github.com/tatsuhiro-t/aria2/issues/613
  2648. aria2c_torify_opts="--async-dns=false"
  2649. if [ ! -x "$(command -v torify 2>/dev/null)" ]; then
  2650. w_die "--torify was used, but torify is not installed, please install it."
  2651. fi ;;
  2652. *) torify=
  2653. aria2c_torify_opts="" ;;
  2654. esac
  2655. }
  2656. winetricks_dl_url_to_stdout()
  2657. {
  2658. winetricks_download_setup
  2659. # Not using w_try here as it adds extra output, breaking things.
  2660. # FIXME: add a w_try_quiet() wrapper around w_try() that doesn't print the
  2661. # Executing ... stuff, but still does error checking
  2662. if [ "${WINETRICKS_DOWNLOADER}" = "wget" ] ; then
  2663. ${torify} wget -q -O - --timeout "${WINETRICKS_DOWNLOADER_TIMEOUT}" \
  2664. --tries "${WINETRICKS_DOWNLOADER_RETRIES}" "$1"
  2665. elif [ "${WINETRICKS_DOWNLOADER}" = "curl" ] ; then
  2666. ${torify} curl -s --connect-timeout "${WINETRICKS_DOWNLOADER_TIMEOUT}" \
  2667. --retry "${WINETRICKS_DOWNLOADER_RETRIES}" "$1"
  2668. elif [ "${WINETRICKS_DOWNLOADER}" = "aria2c" ] ; then
  2669. # aria2c doesn't have support downloading to stdout:
  2670. # https://github.com/aria2/aria2/issues/190
  2671. # So instead, download to a temporary directory and cat the file:
  2672. stdout_tmpfile="${W_TMP_EARLY}/stdout.tmp"
  2673. if [ -e "${stdout_tmpfile}" ] ; then
  2674. rm "${stdout_tmpfile}"
  2675. fi
  2676. ${torify} aria2c \
  2677. ${aria2c_torify_opts:+"${aria2c_torify_opts}"} \
  2678. --continue \
  2679. --daemon=false \
  2680. --dir="${W_TMP_EARLY}" \
  2681. --enable-rpc=false \
  2682. --input-file='' \
  2683. --max-connection-per-server=5 \
  2684. --out="stdout.tmp" \
  2685. --save-session='' \
  2686. --stream-piece-selector=geom \
  2687. --connect-timeout="${WINETRICKS_DOWNLOADER_TIMEOUT}" \
  2688. --max-tries="${WINETRICKS_DOWNLOADER_RETRIES}" \
  2689. "$1" > /dev/null
  2690. cat "${stdout_tmpfile}"
  2691. rm "${stdout_tmpfile}"
  2692. elif [ "${WINETRICKS_DOWNLOADER}" = "fetch" ] ; then
  2693. # fetch does not support retry count
  2694. ${torify} fetch -o - -T "${WINETRICKS_DOWNLOADER_TIMEOUT}" "$1" 2>/dev/null
  2695. else
  2696. w_die "Please install aria2c, curl, or wget"
  2697. fi
  2698. }
  2699. winetricks_dl_warning() {
  2700. case ${LANG} in
  2701. bg*) _W_countrymsg="Вашият IP адрес е от Русия. Ако възникне грешка със сертификата по време на изтеглянето, моля, рестартирайте с '--torify' или изтеглете файловете ръчно, например с VPN." ;;
  2702. ru*) _W_countrymsg="Скрипт определил, что ваш IP-адрес принадлежит России. Если во время загрузки файлов вы увидите ошибки несоответствия сертификата, перезапустите скрипт с опцией '--torify' или скачайте файлы вручную, например, используя VPN." ;;
  2703. pl*) _W_countrymsg="Wykryto, że twój adres IP należy do Rosji. W wypadku problemów z pobieraniem, uruchom z parametrem '--torify' lub pobierz plik manualnie, np. z użyciem VPN." ;;
  2704. *) _W_countrymsg="Your IP address has been determined to belong to Russia. If you encounter a certificate error while downloading, please relaunch with the '--torify' option, or download files manually, for instance using VPN." ;;
  2705. esac
  2706. # Lookup own country via IP address only once (i.e. don't run this function for every download invocation)
  2707. if [ -z "${W_COUNTRY}" ] ; then
  2708. W_COUNTRY="$(winetricks_dl_url_to_stdout "https://ipinfo.io/$(winetricks_dl_url_to_stdout "https://ipinfo.io/ip")" | awk -F '"' '/country/{print $4}')"
  2709. export W_COUNTRY
  2710. if [ -z "${W_COUNTRY}" ] ; then
  2711. export W_COUNTRY="unknown"
  2712. fi
  2713. fi
  2714. # TODO: Resolve a full country name via https://github.com/umpirsky/country-list/tree/master/data
  2715. case "${W_COUNTRY}" in
  2716. "RU") w_warn "${_W_countrymsg}" ;;
  2717. *) : ;;
  2718. esac
  2719. }
  2720. winetricks_get_sha256sum_prog() {
  2721. # Linux/Solaris:
  2722. if [ -x "$(command -v sha256sum 2>/dev/null)" ] ; then
  2723. WINETRICKS_SHA256SUM="sha256sum"
  2724. # FreeBSD/NetBSD:
  2725. elif [ -x "$(command -v sha256 2>/dev/null)" ] ; then
  2726. WINETRICKS_SHA256SUM="sha256"
  2727. # OSX (10.6+), 10.5 doesn't support at all: https://stackoverflow.com/questions/7500691/rvm-sha256sum-nor-shasum-found
  2728. elif [ -x "$(command -v shasum 2>/dev/null)" ] ; then
  2729. WINETRICKS_SHA256SUM="shasum -a 256"
  2730. else
  2731. w_die "No sha256um utility available."
  2732. fi
  2733. }
  2734. winetricks_get_platform()
  2735. {
  2736. if [ "${OS}" = "Windows_NT" ]; then
  2737. if [ -n "${WINELOADERNOEXEC}" ]; then
  2738. # Windows/Cygwin
  2739. export W_PLATFORM="windows_cmd"
  2740. else
  2741. # wineconsole/cmd under wine
  2742. export W_PLATFORM="wine_cmd"
  2743. fi
  2744. else
  2745. # Normal Unix shell
  2746. export W_PLATFORM="wine"
  2747. fi
  2748. }
  2749. winetricks_latest_version_check()
  2750. {
  2751. if [ "${WINETRICKS_LATEST_VERSION_CHECK}" = 'disabled' ] || [ -f "${WINETRICKS_CONFIG}/disable-latest-version-check" ] ; then
  2752. w_info "winetricks latest version check update disabled"
  2753. return
  2754. # Used by ./src/release.sh, not for end users. Silently disables update check, without using $WINETRICKS_SUPER_QUIET
  2755. elif [ "${WINETRICKS_LATEST_VERSION_CHECK}" = 'development' ] ; then
  2756. return
  2757. fi
  2758. latest_version="$(winetricks_dl_url_to_stdout https://raw.githubusercontent.com/Winetricks/winetricks/master/files/LATEST)"
  2759. # Check that $latest_version is an actual number in case github is down
  2760. if ! echo "${latest_version}" | grep -q -E "[0-9]{8}" || [ -z "${latest_version}" ] ; then
  2761. case ${LANG} in
  2762. bg*) w_warn "Github не работи? Версия ${latest_version} не е валидна" ;;
  2763. pl*) w_warn "GitHub nie działa? Wersja '${latest_version}' nie wydaje się być prawdiłową wersją" ;;
  2764. pt*) w_warn "Github offline? versão '${latest_version}' não parece uma versão válida" ;;
  2765. ru*) w_warn "Отсутствует подключение к Github? Версия '${latest_version}' может быть неактуальной" ;;
  2766. zh_CN*) w_warn "GitHub 无法访问?${latest_version} 似乎不是个有效的版本号。" ;;
  2767. zh_TW*|zh_HK*) w_warn "GitHub 宕機了?${latest_version} 似乎不是個有效的版本號。" ;;
  2768. *) w_warn "Github down? version '${latest_version}' doesn't appear to be a valid version" ;;
  2769. esac
  2770. # If we can't get the latest version, no reason to go further:
  2771. return
  2772. fi
  2773. if [ ! "${WINETRICKS_VERSION}" = "${latest_version}" ] && [ ! "${WINETRICKS_VERSION}" = "${latest_version}-next" ]; then
  2774. if [ -f "${WINETRICKS_CONFIG}/enable-auto-update" ] ; then
  2775. w_info "You are running winetricks-${WINETRICKS_VERSION}."
  2776. w_info "New upstream release winetricks-${latest_version} is available."
  2777. w_info "auto-update enabled: running winetricks_selfupdate"
  2778. winetricks_selfupdate
  2779. else
  2780. case ${LANG} in
  2781. bg*)
  2782. w_warn "Използвате winetricks-${WINETRICKS_VERSION}, последната версия е winetricks-${latest_version}!"
  2783. w_warn "Обновете Вашата версия с пакетния мениджър на дистрибуцията, --self-update или ръчно."
  2784. ;;
  2785. pl*)
  2786. w_warn "Korzystasz z winetricks-${WINETRICKS_VERSION}, a najnowszą wersją winetricks-${latest_version}!"
  2787. w_warn "Zalecana jest aktualizacja z użyciem menedżera pakietów Twojej dystrybucji, --self-update lub ręczna aktualizacja."
  2788. ;;
  2789. pt*)
  2790. w_warn "Você está utilizando o winetricks-${WINETRICKS_VERSION}, a versão mais recente é winetricks-${latest_version}!"
  2791. w_warn "Você pode atualizar com o sistema de atualizações da sua distribuição, --self-update, ou manualmente."
  2792. ;;
  2793. ru*)
  2794. w_warn "Запущен winetricks-${WINETRICKS_VERSION}, последняя версия: winetricks-${latest_version}!"
  2795. w_warn "Вы можете выполнить обновление с помощью менеджера пакетов, параметра --self-update или вручную."
  2796. ;;
  2797. zh_CN*)
  2798. w_warn "你正在使用 winetricks-${WINETRICKS_VERSION},最新版本是 winetricks-${latest_version}!"
  2799. w_warn "你应该使用你的发行版软件管理器、--self-update 或者手动更新。"
  2800. ;;
  2801. zh_TW*|zh_HK*)
  2802. w_warn "你正在使用 winetricks-${WINETRICKS_VERSION},最新版本是 winetricks-${latest_version}!"
  2803. w_warn "你應該使用你的發行版軟體管理者、--self-update 或者手動更新。"
  2804. ;;
  2805. *)
  2806. w_warn "You are running winetricks-${WINETRICKS_VERSION}, latest upstream is winetricks-${latest_version}!"
  2807. w_warn "You should update using your distribution's package manager, --self-update, or manually."
  2808. ;;
  2809. esac
  2810. fi
  2811. fi
  2812. }
  2813. winetricks_print_version()
  2814. {
  2815. # Normally done by winetricks_init, but we don't want to set up the WINEPREFIX
  2816. # just to get the winetricks version:
  2817. winetricks_get_sha256sum_prog
  2818. w_get_sha256sum "$0"
  2819. echo "${WINETRICKS_VERSION} - sha256sum: ${_W_gotsha256sum}"
  2820. }
  2821. # Run a small wine command for internal use
  2822. # Handy place to put small workarounds
  2823. winetricks_early_wine()
  2824. {
  2825. # The sed works around https://bugs.winehq.org/show_bug.cgi?id=25838
  2826. # which unfortunately got released in wine-1.3.12
  2827. # We would like to use DISPLAY= to prevent virtual desktops from
  2828. # popping up, but that causes AutoHotKey's tray icon to not show up.
  2829. # We used to use WINEDLLOVERRIDES=mshtml= here to suppress the Gecko
  2830. # autoinstall, but that yielded wineprefixes that *never* autoinstalled
  2831. # Gecko (winezeug bug 223).
  2832. # The tr removes carriage returns so expanded variables don't have crud on the end
  2833. # The grep works around using new wineprefixes with old wine
  2834. WINEDEBUG=-all "${WINE}" "$@" 2> "${W_TMP_EARLY}"/early_wine.err.txt | ( sed 's/.*1h.=//' | tr -d '\r' | grep -v -e "Module not found" -e "Could not load wine-gecko" || true)
  2835. }
  2836. # Wrapper around winetricks_early_wine()
  2837. # Same idea, but use $WINE_ARCH, i.e., always use wine64 for 64-bit prefixes
  2838. # Currently only used by w_expand_env()
  2839. winetricks_early_wine_arch()
  2840. {
  2841. WINE="${WINE_ARCH}" winetricks_early_wine "$@"
  2842. }
  2843. winetricks_detect_gui()
  2844. {
  2845. if [ "$1" != "--gui" ] ; then
  2846. if [ "$1" = "kdialog" ] ; then
  2847. test -x "$(command -v kdialog 2>/dev/null)" || w_die "--gui=kdialog was used, but kdialog is not installed"
  2848. WINETRICKS_GUI=kdialog
  2849. WINETRICKS_GUI_VERSION="$(kdialog --version)"
  2850. elif [ "$1" = "zenity" ] ; then
  2851. test -x "$(command -v zenity 2>/dev/null)" || w_die "--gui=zenity was used, but zenity is not installed"
  2852. WINETRICKS_GUI=zenity
  2853. WINETRICKS_GUI_VERSION="$(zenity --version)"
  2854. WINETRICKS_MENU_HEIGHT=500
  2855. WINETRICKS_MENU_WIDTH=1010
  2856. else
  2857. echo "Invalid argument for --gui"
  2858. echo "Valid options are 'zenity' and 'kdialog'"
  2859. exit 1
  2860. fi
  2861. elif [ "${XDG_CURRENT_DESKTOP}" = "KDE" ] && test -x "$(command -v kdialog 2>/dev/null)"; then
  2862. WINETRICKS_GUI=kdialog
  2863. WINETRICKS_GUI_VERSION="$(kdialog --version)"
  2864. elif test -x "$(command -v zenity 2>/dev/null)"; then
  2865. WINETRICKS_GUI=zenity
  2866. WINETRICKS_GUI_VERSION="$(zenity --version)"
  2867. WINETRICKS_MENU_HEIGHT=500
  2868. WINETRICKS_MENU_WIDTH=1010
  2869. elif test -x "$(command -v kdialog 2>/dev/null)"; then
  2870. WINETRICKS_GUI=kdialog
  2871. WINETRICKS_GUI_VERSION="$(kdialog --version)"
  2872. else
  2873. echo "No arguments given, so tried to start GUI, but neither zenity"
  2874. echo "nor kdialog were found. Please install one of them if you want"
  2875. echo "a graphical interface, or run with --help for more options."
  2876. exit 1
  2877. fi
  2878. # Print zenity/dialog version info for debugging:
  2879. if [ -z "${WINETRICKS_SUPER_QUIET}" ] ; then
  2880. echo "winetricks GUI enabled, using ${WINETRICKS_GUI} ${WINETRICKS_GUI_VERSION##kdialog }"
  2881. fi
  2882. }
  2883. # Detect which sudo to use
  2884. winetricks_detect_sudo()
  2885. {
  2886. WINETRICKS_SUDO=sudo
  2887. if test "${WINETRICKS_GUI}" = "none"; then
  2888. return
  2889. fi
  2890. if test x"${DISPLAY}" != x""; then
  2891. # This should be the default option because some of GUI sudo programs are unmaintained
  2892. # See https://github.com/Winetricks/winetricks/issues/912
  2893. if test -x "$(command -v pkexec 2>/dev/null)"; then
  2894. # Maintained and recommended, part of Polkit, desktop-independent
  2895. # Usage: pkexec command ...
  2896. WINETRICKS_SUDO=pkexec
  2897. # Austin said "gksu*/kdesu* should stay (at least for a while)" in Feb 2018
  2898. # See https://github.com/Winetricks/winetricks/pull/915#issuecomment-362984379
  2899. elif test -x "$(command -v gksudo 2>/dev/null)"; then
  2900. # Unmaintained [2009], part of gksu
  2901. # Usage: gksudo "command ..."
  2902. WINETRICKS_SUDO=gksudo
  2903. elif test -x "$(command -v kdesudo 2>/dev/null)"; then
  2904. # Unmaintained [2015] (latest is for KDE4, no KF5 version available)
  2905. # https://cgit.kde.org/kdesudo.git/
  2906. # Usage: kdesudo "command ..."
  2907. WINETRICKS_SUDO=kdesudo
  2908. # fall back to the su versions if sudo isn't available (Fedora, etc.):
  2909. elif test -x "$(command -v gksu 2>/dev/null)"; then
  2910. # Unmaintained [2009]
  2911. # Usage: gksu "command ..."
  2912. WINETRICKS_SUDO=gksu
  2913. elif test -x "$(command -v kdesu 2>/dev/null)"; then
  2914. # Maintained, KF5 version available
  2915. # https://cgit.kde.org/kdesu.git/
  2916. # Usage: kdesu -c "command ..."
  2917. WINETRICKS_SUDO=kdesu
  2918. fi
  2919. fi
  2920. }
  2921. # Detect which iso mount tool to use
  2922. winetricks_detect_iso_mount()
  2923. {
  2924. if test -x "$(command -v fuseiso 2>/dev/null)"; then
  2925. # File/dir names are converted to lowercase
  2926. WINETRICKS_ISO_MOUNT=fuseiso
  2927. elif test -x "$(command -v archivemount 2>/dev/null)"; then
  2928. # File/dir names may be uppercase and we may need
  2929. # case-insensitive operations
  2930. # e.g. w_try "$WINE" cmd /c "copy $W_ISO_MOUNT_LETTER:\\DOC.PDF C:\\doc.pdf"
  2931. # This tool had path issue in 0.8.8 or older versions
  2932. # e.g. office2013pro works in 0.8.9 or later but doesn't work in 0.8.8
  2933. WINETRICKS_ISO_MOUNT=archivemount
  2934. elif test -x "$(command -v hdiutil 2>/dev/null)"; then
  2935. # File/dir names may be uppercase (same as archivemount)
  2936. WINETRICKS_ISO_MOUNT=hdiutil
  2937. else
  2938. WINETRICKS_ISO_MOUNT=none
  2939. fi
  2940. # Notes about other tools:
  2941. # fuseiso9660: may append ";1" to filenames
  2942. # unar: the drive icon is not "optical drive + disc" in Wine Explorer
  2943. # and "wine eject" command fails
  2944. }
  2945. winetricks_get_prefix_var()
  2946. {
  2947. (
  2948. # shellcheck disable=SC1090
  2949. . "${W_PREFIXES_ROOT}/${p}/wrapper.cfg"
  2950. # The cryptic sed is there to turn ' into '\''
  2951. # shellcheck disable=SC1117
  2952. eval echo \$ww_"$1" | sed "s/'/'\\\''/"
  2953. )
  2954. }
  2955. # Display prefix menu, get which wineprefix the user wants to work with
  2956. winetricks_prefixmenu()
  2957. {
  2958. case ${LANG} in
  2959. bg*) _W_msg_title="Winetricks - изберете действие"
  2960. _W_msg_body='Какво да бъде?'
  2961. _W_msg_apps='Инсталиране на приложение'
  2962. _W_msg_benchmarks='Инсталиране на еталонен тест'
  2963. _W_msg_default="Избиране на папката по подразбиране"
  2964. _W_msg_mkprefix="Създаване на нова папка"
  2965. _W_msg_unattended0="Изключване на автоматичното инсталиране"
  2966. _W_msg_unattended1="Включване на автоматичното инсталиране"
  2967. _W_msg_help="Отваряне на помощта"
  2968. ;;
  2969. ru*) _W_msg_title="Winetricks - выберите путь wine (префикс)"
  2970. _W_msg_body='Что вы хотите сделать?'
  2971. _W_msg_apps='Установить программу'
  2972. _W_msg_benchmarks='Установить приложение для оценки производительности'
  2973. _W_msg_default="Использовать префикс по умолчанию"
  2974. _W_msg_mkprefix="Создать новый префикс wine"
  2975. _W_msg_unattended0="Отключить автоматическую установку"
  2976. _W_msg_unattended1="Включить автоматическую установку"
  2977. _W_msg_help="Просмотр справки (в веб-браузере)"
  2978. ;;
  2979. uk*) _W_msg_title="Winetricks - виберіть wineprefix"
  2980. _W_msg_body='Що Ви хочете зробити?'
  2981. _W_msg_apps='Встановити додаток'
  2982. _W_msg_benchmarks='Встановити benchmark'
  2983. _W_msg_default="Вибрати wineprefix за замовчуванням"
  2984. _W_msg_mkprefix="створити новий wineprefix"
  2985. _W_msg_unattended0="Вимкнути автоматичне встановлення"
  2986. _W_msg_unattended1="Увімкнути автоматичне встановлення"
  2987. _W_msg_help="Переглянути довідку"
  2988. ;;
  2989. zh_CN*) _W_msg_title="Winetricks - 择一 Wine 容器"
  2990. _W_msg_body='君欲何为?'
  2991. _W_msg_apps='安装一个 Windows 应用'
  2992. _W_msg_benchmarks='安装一个基准测试软件'
  2993. _W_msg_default="选择默认的 Wine 容器"
  2994. _W_msg_mkprefix="创建新的 Wine 容器"
  2995. _W_msg_unattended0="禁用静默安装"
  2996. _W_msg_unattended1="启用静默安装"
  2997. _W_msg_help="查看帮助"
  2998. ;;
  2999. zh_TW*|zh_HK*) _W_msg_title="Winetricks - 取一 Wine 容器"
  3000. _W_msg_body='君欲何為?'
  3001. _W_msg_apps='安裝一個 Windows 應用'
  3002. _W_msg_benchmarks='安裝一個基准測試軟體'
  3003. _W_msg_default="選取預設的 Wine 容器"
  3004. _W_msg_mkprefix="建立新的 Wine 容器"
  3005. _W_msg_unattended0="禁用靜默安裝"
  3006. _W_msg_unattended1="啟用靜默安裝"
  3007. _W_msg_help="檢視輔助說明"
  3008. ;;
  3009. de*) _W_msg_title="Winetricks - wineprefix auswählen"
  3010. _W_msg_body='Was möchten Sie tun?'
  3011. _W_msg_apps='Ein Programm installieren'
  3012. _W_msg_benchmarks='Einen Benchmark-Test installieren'
  3013. _W_msg_default="Standard wineprefix auswählen"
  3014. _W_msg_mkprefix="Neuen wineprefix erstellen"
  3015. _W_msg_unattended0="Automatische Installation deaktivieren"
  3016. _W_msg_unattended1="Automatische Installation aktivieren"
  3017. _W_msg_help="Hilfe anzeigen"
  3018. ;;
  3019. pl*) _W_msg_title="Winetricks - wybierz prefiks Wine"
  3020. _W_msg_body='Co chcesz zrobić?'
  3021. _W_msg_apps='Zainstalować aplikację'
  3022. _W_msg_benchmarks='Zainstalować program sprawdzający wydajność komputera'
  3023. _W_msg_default="Wybrać domyślny prefiks Wine"
  3024. _W_msg_mkprefix="Stwórz nowy prefiks Wine"
  3025. _W_msg_unattended0="Wyłącz cichą instalację"
  3026. _W_msg_unattended1="Włącz cichą instalację"
  3027. _W_msg_help="Wyświetl pomoc"
  3028. ;;
  3029. pt*) _W_msg_title="Winetricks - Escolha um wineprefix"
  3030. _W_msg_body='O que você quer fazer?'
  3031. _W_msg_apps='Instalar um programa'
  3032. _W_msg_benchmarks='Instalar um teste de desempenho/benchmark'
  3033. _W_msg_default="Selecionar o prefixo padrão wineprefix"
  3034. _W_msg_mkprefix="Criar novo prefixo wineprefix"
  3035. _W_msg_unattended0="Desativar instalação silenciosa"
  3036. _W_msg_unattended1="Ativar instalação silenciosa"
  3037. _W_msg_help="Ver ajuda"
  3038. ;;
  3039. *) _W_msg_title="Winetricks - choose a wineprefix"
  3040. _W_msg_body='What do you want to do?'
  3041. _W_msg_apps='Install an application'
  3042. _W_msg_benchmarks='Install a benchmark'
  3043. _W_msg_default="Select the default wineprefix"
  3044. _W_msg_mkprefix="Create new wineprefix"
  3045. _W_msg_unattended0="Disable silent install"
  3046. _W_msg_unattended1="Enable silent install"
  3047. _W_msg_help="View help"
  3048. ;;
  3049. esac
  3050. case "${W_OPT_UNATTENDED}" in
  3051. 1) _W_cmd_unattended=attended; _W_msg_unattended="${_W_msg_unattended0}" ;;
  3052. *) _W_cmd_unattended=unattended; _W_msg_unattended="${_W_msg_unattended1}" ;;
  3053. esac
  3054. case ${WINETRICKS_GUI} in
  3055. zenity)
  3056. printf %s "zenity \
  3057. --title '${_W_msg_title}' \
  3058. --text '${_W_msg_body}' \
  3059. --list \
  3060. --radiolist \
  3061. --column '' \
  3062. --column '' \
  3063. --column '' \
  3064. --height ${WINETRICKS_MENU_HEIGHT} \
  3065. --width ${WINETRICKS_MENU_WIDTH} \
  3066. --hide-column 2 \
  3067. FALSE help '${_W_msg_help}' \
  3068. FALSE apps '${_W_msg_apps}' \
  3069. FALSE benchmarks '${_W_msg_benchmarks}' \
  3070. TRUE main '${_W_msg_default}' \
  3071. FALSE mkprefix '${_W_msg_mkprefix}' \
  3072. " \
  3073. > "${WINETRICKS_WORKDIR}"/zenity.sh
  3074. if ls -d "${W_PREFIXES_ROOT}"/*/dosdevices > /dev/null 2>&1; then
  3075. for prefix in "${W_PREFIXES_ROOT}"/*/dosdevices; do
  3076. q="${prefix%%/dosdevices}"
  3077. p="${q##*/}"
  3078. if test -f "${W_PREFIXES_ROOT}/${p}/wrapper.cfg"; then
  3079. _W_msg_name="${p} ($(winetricks_get_prefix_var name))"
  3080. else
  3081. _W_msg_name="${p}"
  3082. fi
  3083. case ${LANG} in
  3084. bg*) printf %s " FALSE prefix='${p}' 'Изберете ${_W_msg_name}' " ;;
  3085. zh_CN*) printf %s " FALSE prefix='${p}' '选择管理 ${_W_msg_name}' " ;;
  3086. zh_TW*|zh_HK*) printf %s " FALSE prefix='${p}' '選擇管理 ${_W_msg_name}' " ;;
  3087. de*) printf %s " FALSE prefix='${p}' '${_W_msg_name} auswählen' " ;;
  3088. pl*) printf %s " FALSE prefix='${p}' 'Wybierz ${_W_msg_name}' " ;;
  3089. pt*) printf %s " FALSE prefix='${p}' 'Selecione ${_W_msg_name}' " ;;
  3090. *) printf %s " FALSE prefix='${p}' 'Select ${_W_msg_name}' " ;;
  3091. esac
  3092. done >> "${WINETRICKS_WORKDIR}"/zenity.sh
  3093. fi
  3094. printf %s " FALSE ${_W_cmd_unattended} '${_W_msg_unattended}'" >> "${WINETRICKS_WORKDIR}"/zenity.sh
  3095. sh "${WINETRICKS_WORKDIR}"/zenity.sh | tr '|' ' '
  3096. ;;
  3097. kdialog)
  3098. (
  3099. printf %s "kdialog \
  3100. --geometry 600x400+100+100 \
  3101. --title '${_W_msg_title}' \
  3102. --separate-output \
  3103. --radiolist '${_W_msg_body}' \
  3104. help '${_W_msg_help}' off \
  3105. benchmarks '${_W_msg_benchmarks}' off \
  3106. apps '${_W_msg_apps}' off \
  3107. main '${_W_msg_default}' on \
  3108. mkprefix '${_W_msg_mkprefix}' off \
  3109. "
  3110. if ls -d "${W_PREFIXES_ROOT}"/*/dosdevices > /dev/null 2>&1; then
  3111. for prefix in "${W_PREFIXES_ROOT}"/*/dosdevices; do
  3112. q="${prefix%%/dosdevices}"
  3113. p="${q##*/}"
  3114. if test -f "${W_PREFIXES_ROOT}/${p}/wrapper.cfg"; then
  3115. _W_msg_name="${p} ($(winetricks_get_prefix_var name))"
  3116. else
  3117. _W_msg_name="${p}"
  3118. fi
  3119. printf %s "prefix='${p}' 'Select ${_W_msg_name}' off "
  3120. done
  3121. fi
  3122. printf %s " ${_W_cmd_unattended} '${_W_msg_unattended}' off"
  3123. ) > "${WINETRICKS_WORKDIR}"/kdialog.sh
  3124. sh "${WINETRICKS_WORKDIR}"/kdialog.sh
  3125. ;;
  3126. esac
  3127. unset _W_msg_help _W_msg_body _W_msg_title _W_msg_new _W_msg_default _W_msg_name
  3128. }
  3129. # Graphically create new custom wineprefix.
  3130. # This returns two verbs: arch and prefix, e.g. "arch=32 prefix=test".
  3131. winetricks_mkprefixmenu()
  3132. {
  3133. case ${LANG} in
  3134. # TODO: translate to other languages
  3135. bg*) _W_msg_title="Winetricks - създайте нова папка"
  3136. _W_msg_name="Наименование"
  3137. _W_msg_arch="Архитектура"
  3138. ;;
  3139. de) _W_msg_title="Winetricks - Neues Wineprefix erstellen"
  3140. _W_msg_name="Name"
  3141. _W_msg_arch="Architektur"
  3142. ;;
  3143. pt*) _W_msg_title="Winetricks - criar novo wineprefix"
  3144. _W_msg_name="Nome"
  3145. _W_msg_arch="Arquitetura"
  3146. ;;
  3147. *) _W_msg_title="Winetricks - create new wineprefix"
  3148. _W_msg_name="Name"
  3149. _W_msg_arch="Architecture"
  3150. ;;
  3151. esac
  3152. case ${WINETRICKS_GUI} in
  3153. zenity)
  3154. ${WINETRICKS_GUI} --forms --text="" --title "${_W_msg_title}" \
  3155. --add-combo="${_W_msg_arch}" --combo-values=32\|64 \
  3156. --add-entry="${_W_msg_name}" \
  3157. | sed -e 's/^\s*|/64|/' -e 's/^/arch=/' -e 's/|/ prefix=/'
  3158. ;;
  3159. kdialog)
  3160. ${WINETRICKS_GUI} --title="${_W_msg_title}" \
  3161. --radiolist="${_W_msg_arch}" 32 32bit off 64 64bit on \
  3162. | sed -e 's/^$/64/' -e 's/^/arch=/'
  3163. ${WINETRICKS_GUI} --title="${_W_msg_title}" --inputbox="${_W_msg_name}" \
  3164. | sed -e 's/^/prefix=/'
  3165. ;;
  3166. esac
  3167. unset _W_msg_title _W_msg_name _W_msg_arch
  3168. }
  3169. # Display main menu, get which submenu the user wants
  3170. winetricks_mainmenu()
  3171. {
  3172. case ${LANG} in
  3173. bg*) _W_msg_title="Winetricks - текущата папка е \"${WINEPREFIX}\""
  3174. _W_msg_body='Какво да бъде?'
  3175. _W_msg_dlls="Инсталиране на DLL файл или компонент"
  3176. _W_msg_fonts='Инсталиране на шрифт'
  3177. _W_msg_settings='Промяна на настройките'
  3178. _W_msg_winecfg='Стартиране на winecfg'
  3179. _W_msg_regedit='Стартиране на regedit'
  3180. _W_msg_taskmgr='Стартиране на taskmgr'
  3181. _W_msg_explorer='Стартиране на explorer'
  3182. _W_msg_uninstaller='Стартиране на uninstaller'
  3183. _W_msg_winecmd='Стартиране на терминала'
  3184. _W_msg_wine_misc_exe='Run an arbitrary executable (.exe/.msi/.msu)'
  3185. _W_msg_shell='Стартиране на терминала (за отстраняване на неизправности)'
  3186. _W_msg_folder='Търсене на файлове'
  3187. _W_msg_annihilate="Изтриване на ВСИЧКИ ДАННИ И ПРИЛОЖЕНИЯ В ТАЗИ ПАПКА"
  3188. ;;
  3189. da*) _W_msg_title="Vælg en pakke-kategori - Nuværende præfiks er \"${WINEPREFIX}\""
  3190. _W_msg_body='Hvad ønsker du at gøre?'
  3191. _W_msg_dlls="Install a Windows DLL"
  3192. _W_msg_fonts='Install a font'
  3193. _W_msg_settings='Change Wine settings'
  3194. _W_msg_winecfg='Run winecfg'
  3195. _W_msg_regedit='Run regedit'
  3196. _W_msg_taskmgr='Run taskmgr'
  3197. _W_msg_explorer='Run explorer'
  3198. _W_msg_uninstaller='Run uninstaller'
  3199. _W_msg_winecmd='Run a Wine cmd shell'
  3200. _W_msg_wine_misc_exe='Run an arbitrary executable (.exe/.msi/.msu)'
  3201. _W_msg_shell='Run a commandline shell (for debugging)'
  3202. _W_msg_folder='Browse files'
  3203. _W_msg_annihilate="Delete ALL DATA AND APPLICATIONS INSIDE THIS WINEPREFIX"
  3204. ;;
  3205. de*) _W_msg_title="Pakettyp auswählen - Aktueller Präfix ist \"${WINEPREFIX}\""
  3206. _W_msg_body='Was möchten Sie tun?'
  3207. _W_msg_dlls="Windows-DLL installieren"
  3208. _W_msg_fonts='Schriftart installieren'
  3209. _W_msg_settings='Wine Einstellungen ändern'
  3210. _W_msg_winecfg='winecfg starten'
  3211. _W_msg_regedit='regedit starten'
  3212. _W_msg_taskmgr='taskmgr starten'
  3213. _W_msg_explorer='explorer starten'
  3214. _W_msg_uninstaller='uninstaller starten'
  3215. _W_msg_winecmd='Starten Sie Wine cmd'
  3216. _W_msg_wine_misc_exe='Run an arbitrary executable (.exe/.msi/.msu)'
  3217. _W_msg_shell='Eine Kommandozeile zum debuggen starten'
  3218. _W_msg_folder='Ordner durchsuchen'
  3219. _W_msg_annihilate="ALLE DATEIEN UND PROGRAMME IN DIESEM WINEPREFIX Löschen"
  3220. ;;
  3221. pl*) _W_msg_title="Winetricks - obecny prefiks to \"${WINEPREFIX}\""
  3222. _W_msg_body='Co chcesz zrobić w tym prefiksie?'
  3223. _W_msg_dlls="Zainstalować windowsową bibliotekę DLL lub komponent"
  3224. _W_msg_fonts='Zainstalować czcionkę'
  3225. _W_msg_settings='Zmienić ustawienia'
  3226. _W_msg_winecfg='Uruchomić winecfg'
  3227. _W_msg_regedit='Uruchomić edytor rejestru'
  3228. _W_msg_taskmgr='Uruchomić menedżer zadań'
  3229. _W_msg_explorer='Uruchomić explorer'
  3230. _W_msg_uninstaller='Uruchomić program odinstalowujący'
  3231. _W_msg_winecmd='Uruchomić Wine cmd'
  3232. _W_msg_wine_misc_exe='Run an arbitrary executable (.exe/.msi/.msu)'
  3233. _W_msg_shell='Uruchomić powłokę wiersza poleceń (dla debugowania)'
  3234. _W_msg_folder='Przeglądać pliki'
  3235. _W_msg_annihilate="Usuńąć WSZYSTKIE DANE I APLIKACJE WEWNĄTRZ TEGO PREFIKSU WINE"
  3236. ;;
  3237. pt*) _W_msg_title="Winetricks - o prefixo atual é \"${WINEPREFIX}\""
  3238. _W_msg_body='O que você gostaria de fazer com este prefixo wineprefix?'
  3239. _W_msg_dlls="Instalar DLL ou componente do Windows"
  3240. _W_msg_fonts='Instalar fontes'
  3241. _W_msg_settings='Alterar configurações'
  3242. _W_msg_winecfg='Executar winecfg'
  3243. _W_msg_regedit='Executar regedit'
  3244. _W_msg_taskmgr='Executar taskmgr'
  3245. _W_msg_explorer='Executar explorer'
  3246. _W_msg_uninstaller='Executar desinstalador'
  3247. _W_msg_winecmd='Executar Wine cmd'
  3248. _W_msg_wine_misc_exe='Run an arbitrary executable (.exe/.msi/.msu)'
  3249. _W_msg_shell='Executar linha de comandos shell (para depuração)'
  3250. _W_msg_folder='Gerenciar arquivos'
  3251. _W_msg_annihilate="Apagar TODOS OS DADOS E APLICATIVOS DENTRO DESTE WINEPREFIX"
  3252. ;;
  3253. ru*) _W_msg_title="Winetricks — текущий префикс: \"${WINEPREFIX}\""
  3254. _W_msg_body='Что вы хотите сделать с этим префиксом?'
  3255. _W_msg_dlls="Установить библиотеку DLL или компонент Windows"
  3256. _W_msg_fonts='Установить шрифт'
  3257. _W_msg_settings='Поменять настройки'
  3258. _W_msg_winecfg='Запустить winecfg (редактор настроек wine)'
  3259. _W_msg_regedit='Запустить regedit (редактор реестра)'
  3260. _W_msg_taskmgr='Запустить taskmgr (менеджер задач)'
  3261. _W_msg_explorer='Запустить explorer (Проводник)'
  3262. _W_msg_uninstaller='Запустить uninstaller (установка и удаление программ)'
  3263. _W_msg_winecmd='Запустить wine cmd (командную строку)'
  3264. _W_msg_wine_misc_exe='Run an arbitrary executable (.exe/.msi/.msu)'
  3265. _W_msg_shell='Запустить графический терминал (для отладки)'
  3266. _W_msg_folder='Запустить winefile (проводник файлов)'
  3267. _W_msg_annihilate="Удалить ВСЕ ДАННЫЕ И ПРИЛОЖЕНИЯ в этом префиксе"
  3268. ;;
  3269. uk*) _W_msg_title="Winetricks - поточний prefix \"${WINEPREFIX}\""
  3270. _W_msg_body='Що Ви хочете зробити для цього wineprefix?'
  3271. _W_msg_dlls="Встановити Windows DLL чи компонент(и)"
  3272. _W_msg_fonts='Встановити шрифт'
  3273. _W_msg_settings='Змінити налаштування'
  3274. _W_msg_winecfg='Запустити winecfg'
  3275. _W_msg_regedit='Запустити regedit'
  3276. _W_msg_taskmgr='Запустити taskmgr'
  3277. _W_msg_explorer='Запустити explorer'
  3278. _W_msg_uninstaller='Встановлення/видалення програм'
  3279. _W_msg_winecmd='Запустіть оболонку Wine cmd'
  3280. _W_msg_wine_misc_exe='Run an arbitrary executable (.exe/.msi/.msu)'
  3281. _W_msg_shell='Запуск командної оболонки (для налагодження)'
  3282. _W_msg_folder='Перегляд файлів'
  3283. _W_msg_annihilate="Видалити УСІ ДАНІ ТА ПРОГРАМИ З ЦЬОГО WINEPREFIX"
  3284. ;;
  3285. zh_CN*) _W_msg_title="Winetricks - 当前容器路径是 \"${WINEPREFIX}\""
  3286. _W_msg_body='管理当前容器'
  3287. _W_msg_dlls="安装 Windows DLL 或组件"
  3288. _W_msg_fonts='安装字体'
  3289. _W_msg_settings='修改设置'
  3290. _W_msg_winecfg='运行 Wine 配置程序'
  3291. _W_msg_regedit='运行注册表'
  3292. _W_msg_taskmgr='运行任务管理器'
  3293. _W_msg_explorer='运行资源管理器'
  3294. _W_msg_uninstaller='运行卸载程序'
  3295. _W_msg_winecmd='运行 Wine cmd'
  3296. _W_msg_wine_misc_exe='Run an arbitrary executable (.exe/.msi/.msu)'
  3297. _W_msg_shell='运行命令提示窗口 (作为调试)'
  3298. _W_msg_folder='浏览容器中的文件'
  3299. _W_msg_annihilate="删除容器中所有数据和应用程序"
  3300. ;;
  3301. zh_TW*|zh_HK*) _W_msg_title="Winetricks - 目前容器路徑是 \"${WINEPREFIX}\""
  3302. _W_msg_body='管理目前容器'
  3303. _W_msg_dlls="安裝 Windows DLL 或套件"
  3304. _W_msg_fonts='安裝字型'
  3305. _W_msg_settings='修改設定'
  3306. _W_msg_winecfg='執行 Wine 設定程式'
  3307. _W_msg_regedit='執行登錄編輯程式'
  3308. _W_msg_taskmgr='執行工作管理員'
  3309. _W_msg_explorer='執行檔案總管'
  3310. _W_msg_uninstaller='執行解除安裝程式'
  3311. _W_msg_winecmd='運行 Wine cmd'
  3312. _W_msg_wine_misc_exe='Run an arbitrary executable (.exe/.msi/.msu)'
  3313. _W_msg_shell='執行命令提示視窗 (作為偵錯)'
  3314. _W_msg_folder='瀏覽容器中的檔案'
  3315. _W_msg_annihilate="刪除容器中所有資料和應用程式"
  3316. ;;
  3317. *) _W_msg_title="Winetricks - current prefix is \"${WINEPREFIX}\""
  3318. _W_msg_body='What would you like to do to this wineprefix?'
  3319. _W_msg_dlls="Install a Windows DLL or component"
  3320. _W_msg_fonts='Install a font'
  3321. _W_msg_settings='Change settings'
  3322. _W_msg_winecfg='Run winecfg'
  3323. _W_msg_regedit='Run regedit'
  3324. _W_msg_taskmgr='Run taskmgr'
  3325. _W_msg_explorer='Run explorer'
  3326. _W_msg_uninstaller='Run uninstaller'
  3327. _W_msg_winecmd='Run a Wine cmd shell'
  3328. _W_msg_wine_misc_exe='Run an arbitrary executable (.exe/.msi/.msu)'
  3329. _W_msg_shell='Run a commandline shell (for debugging)'
  3330. _W_msg_folder='Browse files'
  3331. _W_msg_annihilate="Delete ALL DATA AND APPLICATIONS INSIDE THIS WINEPREFIX"
  3332. ;;
  3333. esac
  3334. case ${WINETRICKS_GUI} in
  3335. zenity)
  3336. (
  3337. printf %s "zenity \
  3338. --title '${_W_msg_title}' \
  3339. --text '${_W_msg_body}' \
  3340. --list \
  3341. --radiolist \
  3342. --column '' \
  3343. --column '' \
  3344. --column '' \
  3345. --height ${WINETRICKS_MENU_HEIGHT} \
  3346. --width ${WINETRICKS_MENU_WIDTH} \
  3347. --hide-column 2 \
  3348. FALSE dlls '${_W_msg_dlls}' \
  3349. FALSE fonts '${_W_msg_fonts}' \
  3350. FALSE settings '${_W_msg_settings}' \
  3351. FALSE winecfg '${_W_msg_winecfg}' \
  3352. FALSE regedit '${_W_msg_regedit}' \
  3353. FALSE taskmgr '${_W_msg_taskmgr}' \
  3354. FALSE explorer '${_W_msg_explorer}' \
  3355. FALSE uninstaller '${_W_msg_uninstaller}' \
  3356. FALSE winecmd '${_W_msg_winecmd}' \
  3357. FALSE wine_misc_exe '${_W_msg_wine_misc_exe}' \
  3358. FALSE shell '${_W_msg_shell}' \
  3359. FALSE folder '${_W_msg_folder}' \
  3360. FALSE annihilate '${_W_msg_annihilate}' \
  3361. "
  3362. ) > "${WINETRICKS_WORKDIR}"/zenity.sh
  3363. sh "${WINETRICKS_WORKDIR}"/zenity.sh | tr '|' ' '
  3364. ;;
  3365. kdialog)
  3366. ${WINETRICKS_GUI} --geometry 600x400+100+100 \
  3367. --title "${_W_msg_title}" \
  3368. --separate-output \
  3369. --radiolist \
  3370. "${_W_msg_body}"\
  3371. dlls "${_W_msg_dlls}" off \
  3372. fonts "${_W_msg_fonts}" off \
  3373. settings "${_W_msg_settings}" off \
  3374. winecfg "${_W_msg_winecfg}" off \
  3375. regedit "${_W_msg_regedit}" off \
  3376. taskmgr "${_W_msg_taskmgr}" off \
  3377. explorer "${_W_msg_explorer}" off \
  3378. uninstaller "${_W_msg_uninstaller}" off \
  3379. winecmd "${_W_msg_winecmd}" off \
  3380. wine_misc_exe "${_W_msg_wine_misc_exe}" off \
  3381. shell "${_W_msg_shell}" off \
  3382. folder "${_W_msg_folder}" off \
  3383. annihilate "${_W_msg_annihilate}" off \
  3384. "${_W_cmd_unattended}" "${_W_msg_unattended}" off \
  3385. ;;
  3386. esac
  3387. unset _W_msg_body _W_msg_title _W_msg_apps _W_msg_benchmarks _W_msg_dlls _W_msg_settings
  3388. }
  3389. winetricks_settings_menu()
  3390. {
  3391. # FIXME: these translations should really be centralized/reused:
  3392. case ${LANG} in
  3393. bg*) _W_msg_title="Winetricks - текущата папка е \"${WINEPREFIX}\""
  3394. _W_msg_body='Какво искате да промените?'
  3395. ;;
  3396. da*) _W_msg_title="Vælg en pakke - Nuværende præfiks er \"${WINEPREFIX}\""
  3397. _W_msg_body='Which settings would you like to change?'
  3398. ;;
  3399. de*) _W_msg_title="Winetricks - Aktueller Präfix ist \"${WINEPREFIX}\""
  3400. _W_msg_body='Welche Einstellungen möchten Sie ändern?'
  3401. ;;
  3402. pl*) _W_msg_title="Winetricks - obecny prefiks to \"${WINEPREFIX}\""
  3403. _W_msg_body='Jakie ustawienia chcesz zmienić?'
  3404. ;;
  3405. pt*) _W_msg_title="Winetricks - o prefixo atual é \"${WINEPREFIX}\""
  3406. _W_msg_body='Quais configurações você gostaria de alterar?'
  3407. ;;
  3408. ru*) _W_msg_title="Winetricks - текущий префикс: \"${WINEPREFIX}\""
  3409. _W_msg_body='Какие настройки вы хотите изменить?'
  3410. ;;
  3411. uk*) _W_msg_title="Winetricks - поточний prefix \"${WINEPREFIX}\""
  3412. _W_msg_body='Які налаштування Ви хочете змінити?'
  3413. ;;
  3414. zh_CN*) _W_msg_title="Winetricks - 当前容器路径是 \"${WINEPREFIX}\""
  3415. _W_msg_body='您想要更改哪项设置?'
  3416. ;;
  3417. zh_TW*|zh_HK*) _W_msg_title="Winetricks - 目前容器路徑是 \"${WINEPREFIX}\""
  3418. _W_msg_body='您想要變更哪項設定?'
  3419. ;;
  3420. *) _W_msg_title="Winetricks - current prefix is \"${WINEPREFIX}\""
  3421. _W_msg_body='Which settings would you like to change?'
  3422. ;;
  3423. esac
  3424. case ${WINETRICKS_GUI} in
  3425. zenity)
  3426. case ${LANG} in
  3427. bg*) printf %s "zenity \
  3428. --title '${_W_msg_title}' \
  3429. --text '${_W_msg_body}' \
  3430. --list \
  3431. --checklist \
  3432. --column '' \
  3433. --column Настройка \
  3434. --column Описание \
  3435. --height ${WINETRICKS_MENU_HEIGHT} \
  3436. --width ${WINETRICKS_MENU_WIDTH} \
  3437. "
  3438. ;;
  3439. da*) printf %s "zenity \
  3440. --title '${_W_msg_title}' \
  3441. --text '${_W_msg_body}' \
  3442. --list \
  3443. --checklist \
  3444. --column '' \
  3445. --column Pakke \
  3446. --column Navn \
  3447. --height ${WINETRICKS_MENU_HEIGHT} \
  3448. --width ${WINETRICKS_MENU_WIDTH} \
  3449. "
  3450. ;;
  3451. de*) printf %s "zenity \
  3452. --title '${_W_msg_title}' \
  3453. --text '${_W_msg_body}' \
  3454. --list \
  3455. --checklist \
  3456. --column '' \
  3457. --column Einstellung \
  3458. --column Name \
  3459. --height ${WINETRICKS_MENU_HEIGHT} \
  3460. --width ${WINETRICKS_MENU_WIDTH} \
  3461. "
  3462. ;;
  3463. pl*) printf %s "zenity \
  3464. --title '${_W_msg_title}' \
  3465. --text '${_W_msg_body}' \
  3466. --list \
  3467. --checklist \
  3468. --column '' \
  3469. --column Ustawienie \
  3470. --column Nazwa \
  3471. --height ${WINETRICKS_MENU_HEIGHT} \
  3472. --width ${WINETRICKS_MENU_WIDTH} \
  3473. "
  3474. ;;
  3475. pt*) printf %s "zenity \
  3476. --title '${_W_msg_title}' \
  3477. --text '${_W_msg_body}' \
  3478. --list \
  3479. --checklist \
  3480. --column '' \
  3481. --column Configuração \
  3482. --column Título \
  3483. --height ${WINETRICKS_MENU_HEIGHT} \
  3484. --width ${WINETRICKS_MENU_WIDTH} \
  3485. "
  3486. ;;
  3487. ru*) printf %s "zenity \
  3488. --title '${_W_msg_title}' \
  3489. --text '${_W_msg_body}' \
  3490. --list \
  3491. --checklist \
  3492. --column '' \
  3493. --column Установка \
  3494. --column Имя \
  3495. --height ${WINETRICKS_MENU_HEIGHT} \
  3496. --width ${WINETRICKS_MENU_WIDTH} \
  3497. "
  3498. ;;
  3499. uk*) printf %s "zenity \
  3500. --title '${_W_msg_title}' \
  3501. --text '${_W_msg_body}' \
  3502. --list \
  3503. --checklist \
  3504. --column '' \
  3505. --column Установка \
  3506. --column Назва \
  3507. --height ${WINETRICKS_MENU_HEIGHT} \
  3508. --width ${WINETRICKS_MENU_WIDTH} \
  3509. "
  3510. ;;
  3511. zh_CN*) printf %s "zenity \
  3512. --title '${_W_msg_title}' \
  3513. --text '${_W_msg_body}' \
  3514. --list \
  3515. --checklist \
  3516. --column '' \
  3517. --column 设置 \
  3518. --column 标题 \
  3519. --height ${WINETRICKS_MENU_HEIGHT} \
  3520. --width ${WINETRICKS_MENU_WIDTH} \
  3521. "
  3522. ;;
  3523. zh_TW*|zh_HK*) printf %s "zenity \
  3524. --title '${_W_msg_title}' \
  3525. --text '${_W_msg_body}' \
  3526. --list \
  3527. --checklist \
  3528. --column '' \
  3529. --column 設定 \
  3530. --column 標題 \
  3531. --height ${WINETRICKS_MENU_HEIGHT} \
  3532. --width ${WINETRICKS_MENU_WIDTH} \
  3533. "
  3534. ;;
  3535. *) printf %s "zenity \
  3536. --title '${_W_msg_title}' \
  3537. --text '${_W_msg_body}' \
  3538. --list \
  3539. --checklist \
  3540. --column '' \
  3541. --column Setting \
  3542. --column Title \
  3543. --height ${WINETRICKS_MENU_HEIGHT} \
  3544. --width ${WINETRICKS_MENU_WIDTH} \
  3545. "
  3546. ;;
  3547. esac > "${WINETRICKS_WORKDIR}"/zenity.sh
  3548. for metadatafile in "${WINETRICKS_METADATA}/${WINETRICKS_CURMENU}"/*.vars; do
  3549. code=$(winetricks_metadata_basename "${metadatafile}")
  3550. (
  3551. title='?'
  3552. # shellcheck disable=SC1090
  3553. . "${metadatafile}"
  3554. # Begin 'title' strings localization code
  3555. # shellcheck disable=SC2154
  3556. case ${LANG} in
  3557. uk*)
  3558. case "${title_uk}" in
  3559. "") ;;
  3560. *) title="${title_uk}";;
  3561. esac
  3562. esac
  3563. # End of code
  3564. printf "%s %s %s %s" " " FALSE \
  3565. "${code}" \
  3566. "\"${title}\""
  3567. )
  3568. done >> "${WINETRICKS_WORKDIR}"/zenity.sh
  3569. sh "${WINETRICKS_WORKDIR}"/zenity.sh | tr '|' ' '
  3570. ;;
  3571. kdialog)
  3572. (
  3573. printf %s "kdialog --geometry 600x400+100+100 --title '${_W_msg_title}' --separate-output --checklist '${_W_msg_body}' "
  3574. winetricks_list_all | sed 's/\([^ ]*\) *\(.*\)/\1 "\1 - \2" off /' | tr '\012' ' '
  3575. ) > "${WINETRICKS_WORKDIR}"/kdialog.sh
  3576. sh "${WINETRICKS_WORKDIR}"/kdialog.sh
  3577. ;;
  3578. esac
  3579. unset _W_msg_body _W_msg_title
  3580. }
  3581. # Display the current menu, output list of verbs to execute to stdout
  3582. winetricks_showmenu()
  3583. {
  3584. case ${LANG} in
  3585. bg*) _W_msg_title="Winetricks - текущата папка е \"${WINEPREFIX}\""
  3586. _W_msg_body='Какво искате да инсталирате?'
  3587. _W_cached="кеширано"
  3588. ;;
  3589. da*) _W_msg_title='Vælg en pakke'
  3590. _W_msg_body='Vilken pakke vil du installere?'
  3591. _W_cached="cached"
  3592. ;;
  3593. de*) _W_msg_title="Winetricks - Aktueller Prefix ist \"${WINEPREFIX}\""
  3594. _W_msg_body='Welche Paket(e) möchten Sie installieren?'
  3595. _W_cached="gecached"
  3596. ;;
  3597. pl*) _W_msg_title="Winetricks - obecny prefiks to \"${WINEPREFIX}\""
  3598. _W_msg_body='Które paczki chesz zainstalować?'
  3599. _W_cached="zarchiwizowane"
  3600. ;;
  3601. pt*) _W_msg_title="Winetricks - o prefixo atual é \"${WINEPREFIX}\""
  3602. _W_msg_body='Quais pacotes você gostaria de instalar?'
  3603. _W_cached="em cache"
  3604. ;;
  3605. ru*) _W_msg_title="Winetricks - текущий префикс: \"${WINEPREFIX}\""
  3606. _W_msg_body='Какое приложение вы хотите установить?'
  3607. _W_cached="в кэше"
  3608. ;;
  3609. uk*) _W_msg_title="Winetricks - поточний prefix \"${WINEPREFIX}\""
  3610. _W_msg_body='Які пакунки Ви хочете встановити?'
  3611. _W_cached="кешовано"
  3612. ;;
  3613. zh_CN*) _W_msg_title="Winetricks - 当前容器路径是 \"${WINEPREFIX}\""
  3614. _W_msg_body='您想要安装什么应用程序?'
  3615. _W_cached="已缓存"
  3616. ;;
  3617. zh_TW*|zh_HK*) _W_msg_title="Winetricks - 目前容器路徑是 \"${WINEPREFIX}\""
  3618. _W_msg_body='您想要安裝什麼應用程式?'
  3619. _W_cached="已緩存"
  3620. ;;
  3621. *) _W_msg_title="Winetricks - current prefix is \"${WINEPREFIX}\""
  3622. _W_msg_body='Which package(s) would you like to install?'
  3623. _W_cached="cached"
  3624. ;;
  3625. esac
  3626. case ${WINETRICKS_GUI} in
  3627. zenity)
  3628. case ${LANG} in
  3629. bg*) printf %s "zenity \
  3630. --title '${_W_msg_title}' \
  3631. --text '${_W_msg_body}' \
  3632. --list \
  3633. --checklist \
  3634. --column '' \
  3635. --column Пакет \
  3636. --column Наименование \
  3637. --column Издател \
  3638. --column Година \
  3639. --column Източник \
  3640. --column Състояние \
  3641. --height ${WINETRICKS_MENU_HEIGHT} \
  3642. --width ${WINETRICKS_MENU_WIDTH} \
  3643. "
  3644. ;;
  3645. da*) printf %s "zenity \
  3646. --title '${_W_msg_title}' \
  3647. --text '${_W_msg_body}' \
  3648. --list \
  3649. --checklist \
  3650. --column '' \
  3651. --column Pakke \
  3652. --column Navn \
  3653. --column Udgiver \
  3654. --column År \
  3655. --column Medie \
  3656. --column Status \
  3657. --height ${WINETRICKS_MENU_HEIGHT} \
  3658. --width ${WINETRICKS_MENU_WIDTH} \
  3659. "
  3660. ;;
  3661. de*) printf %s "zenity \
  3662. --title '${_W_msg_title}' \
  3663. --text '${_W_msg_body}' \
  3664. --list \
  3665. --checklist \
  3666. --column '' \
  3667. --column Paket \
  3668. --column Name \
  3669. --column Herausgeber \
  3670. --column Jahr \
  3671. --column Media \
  3672. --column Status \
  3673. --height ${WINETRICKS_MENU_HEIGHT} \
  3674. --width ${WINETRICKS_MENU_WIDTH} \
  3675. "
  3676. ;;
  3677. pl*) printf %s "zenity \
  3678. --title '${_W_msg_title}' \
  3679. --text '${_W_msg_body}' \
  3680. --list \
  3681. --checklist \
  3682. --column '' \
  3683. --column Pakiet \
  3684. --column Nazwa \
  3685. --column Wydawca \
  3686. --column Rok \
  3687. --column Media \
  3688. --column Status \
  3689. --height ${WINETRICKS_MENU_HEIGHT} \
  3690. --width ${WINETRICKS_MENU_WIDTH} \
  3691. "
  3692. ;;
  3693. pt*) printf %s "zenity \
  3694. --title '${_W_msg_title}' \
  3695. --text '${_W_msg_body}' \
  3696. --list \
  3697. --checklist \
  3698. --column '' \
  3699. --column Pacote \
  3700. --column Título \
  3701. --column Publisher \
  3702. --column Ano \
  3703. --column Mídia \
  3704. --column Status \
  3705. --height ${WINETRICKS_MENU_HEIGHT} \
  3706. --width ${WINETRICKS_MENU_WIDTH} \
  3707. "
  3708. ;;
  3709. ru*) printf %s "zenity \
  3710. --title '${_W_msg_title}' \
  3711. --text '${_W_msg_body}' \
  3712. --list \
  3713. --checklist \
  3714. --column '' \
  3715. --column Пакет \
  3716. --column Название \
  3717. --column Издатель \
  3718. --column Год \
  3719. --column Источник \
  3720. --column Статус \
  3721. --height ${WINETRICKS_MENU_HEIGHT} \
  3722. --width ${WINETRICKS_MENU_WIDTH} \
  3723. "
  3724. ;;
  3725. uk*) printf %s "zenity \
  3726. --title '${_W_msg_title}' \
  3727. --text '${_W_msg_body}' \
  3728. --list \
  3729. --checklist \
  3730. --column '' \
  3731. --column Пакунок \
  3732. --column Назва \
  3733. --column Видавець \
  3734. --column Рік \
  3735. --column Медіа \
  3736. --column Статус \
  3737. --height ${WINETRICKS_MENU_HEIGHT} \
  3738. --width ${WINETRICKS_MENU_WIDTH} \
  3739. "
  3740. ;;
  3741. zh_CN*) printf %s "zenity \
  3742. --title '${_W_msg_title}' \
  3743. --text '${_W_msg_body}' \
  3744. --list \
  3745. --checklist \
  3746. --column '' \
  3747. --column 包名 \
  3748. --column 软件名 \
  3749. --column 发行商 \
  3750. --column 发行年 \
  3751. --column 媒介 \
  3752. --column 状态 \
  3753. --height ${WINETRICKS_MENU_HEIGHT} \
  3754. --width ${WINETRICKS_MENU_WIDTH} \
  3755. "
  3756. ;;
  3757. zh_TW*|zh_HK*) printf %s "zenity \
  3758. --title '${_W_msg_title}' \
  3759. --text '${_W_msg_body}' \
  3760. --list \
  3761. --checklist \
  3762. --column '' \
  3763. --column 包名 \
  3764. --column 軟體名 \
  3765. --column 發行商 \
  3766. --column 發行年 \
  3767. --column 媒介 \
  3768. --column 狀態 \
  3769. --height ${WINETRICKS_MENU_HEIGHT} \
  3770. --width ${WINETRICKS_MENU_WIDTH} \
  3771. "
  3772. ;;
  3773. *) printf %s "zenity \
  3774. --title '${_W_msg_title}' \
  3775. --text '${_W_msg_body}' \
  3776. --list \
  3777. --checklist \
  3778. --column '' \
  3779. --column Package \
  3780. --column Title \
  3781. --column Publisher \
  3782. --column Year \
  3783. --column Media \
  3784. --column Status \
  3785. --height ${WINETRICKS_MENU_HEIGHT} \
  3786. --width ${WINETRICKS_MENU_WIDTH} \
  3787. "
  3788. ;;
  3789. esac > "${WINETRICKS_WORKDIR}"/zenity.sh
  3790. true > "${WINETRICKS_WORKDIR}"/installed.txt
  3791. for metadatafile in "${WINETRICKS_METADATA}/${WINETRICKS_CURMENU}"/*.vars; do
  3792. code=$(winetricks_metadata_basename "${metadatafile}")
  3793. (
  3794. title='?'
  3795. # shellcheck disable=SC1090
  3796. . "${metadatafile}"
  3797. # Compute cached and downloadable flags
  3798. flags=""
  3799. winetricks_is_cached "${code}" && flags="${_W_cached}"
  3800. installed=FALSE
  3801. if winetricks_is_installed "${code}"; then
  3802. installed=TRUE
  3803. echo "${code}" >> "${WINETRICKS_WORKDIR}"/installed.txt
  3804. fi
  3805. if [ "${#title}" -gt 100 ]; then
  3806. # Small hysteresis of a few characters to not shorten descriptions that are close to the limit
  3807. title=$(printf "%s" "${title}" | head -c 95)
  3808. title="${title} ..."
  3809. fi
  3810. printf %s " ${installed} \
  3811. ${code} \
  3812. \"${title}\" \
  3813. \"${publisher}\" \
  3814. \"${year}\" \
  3815. \"${media}\" \
  3816. \"${flags}\" \
  3817. "
  3818. )
  3819. done >> "${WINETRICKS_WORKDIR}"/zenity.sh
  3820. # Filter out any verb that's already installed
  3821. sh "${WINETRICKS_WORKDIR}"/zenity.sh |
  3822. tr '|' '\012' |
  3823. grep -F -v -x -f "${WINETRICKS_WORKDIR}"/installed.txt |
  3824. tr '\012' ' '
  3825. ;;
  3826. kdialog)
  3827. (
  3828. printf %s "kdialog --geometry 600x400+100+100 --title '${_W_msg_title}' --separate-output --checklist '${_W_msg_body}' "
  3829. winetricks_list_all | sed 's/\([^ ]*\) *\(.*\)/\1 "\1 - \2" off /' | tr '\012' ' '
  3830. ) > "${WINETRICKS_WORKDIR}"/kdialog.sh
  3831. sh "${WINETRICKS_WORKDIR}"/kdialog.sh
  3832. ;;
  3833. esac
  3834. unset _W_msg_body _W_msg_title
  3835. }
  3836. # Converts a metadata absolute path to its app code
  3837. winetricks_metadata_basename()
  3838. {
  3839. # Classic, but too slow on cygwin
  3840. #basename $1 .vars
  3841. # first, remove suffix .vars
  3842. _W_mb_tmp="${1%.vars}"
  3843. # second, remove any directory prefix
  3844. echo "${_W_mb_tmp##*/}"
  3845. unset _W_mb_tmp
  3846. }
  3847. # Returns true if given verb has been registered
  3848. winetricks_metadata_exists()
  3849. {
  3850. test -f "${WINETRICKS_METADATA}"/*/"${1}.vars"
  3851. }
  3852. # Returns true if given verb has been cached
  3853. # You must have already loaded its metadata before calling
  3854. winetricks_is_cached()
  3855. {
  3856. # FIXME: also check file2... if given
  3857. # https://github.com/Winetricks/winetricks/issues/989
  3858. # shellcheck disable=SC2154
  3859. _W_path="${W_CACHE}/$1/${file1}"
  3860. case "${_W_path}" in
  3861. *..*)
  3862. # Remove /foo/.. so verbs that don't have their own cache directories
  3863. # can refer to siblings
  3864. _W_path="$(echo "${_W_path}" | sed 's,/[^/]*/\.\.,,')"
  3865. ;;
  3866. esac
  3867. if test -f "${_W_path}"; then
  3868. unset _W_path
  3869. return "${TRUE}"
  3870. fi
  3871. unset _W_path
  3872. return "${FALSE}"
  3873. }
  3874. # Returns true if given verb has been installed
  3875. # You must have already loaded its metadata before calling
  3876. winetricks_is_installed()
  3877. {
  3878. unset _W_file _W_file_unix
  3879. if test "${installed_exe1}"; then
  3880. _W_file="${installed_exe1}"
  3881. elif test "${installed_file1}"; then
  3882. _W_file="${installed_file1}"
  3883. else
  3884. return "${FALSE}" # not installed
  3885. fi
  3886. # Test if the verb has been executed before
  3887. if ! grep -qw "$1" "${WINEPREFIX}/winetricks.log" 2>/dev/null; then
  3888. unset _W_file
  3889. return "${FALSE}" # not installed
  3890. fi
  3891. case "${W_PLATFORM}" in
  3892. windows_cmd|wine_cmd)
  3893. # On Windows, there's no wineprefix, just check if file's there
  3894. _W_file_unix="$(w_pathconv -u "${_W_file}")"
  3895. if test -f "${_W_file_unix}"; then
  3896. unset _W_file _W_file_unix _W_prefix
  3897. return "${TRUE}" # installed
  3898. fi
  3899. ;;
  3900. *)
  3901. # Compute wineprefix for this app
  3902. case "${_W_category}-${WINETRICKS_OPT_SHAREDPREFIX}" in
  3903. apps-0|benchmarks-0)
  3904. _W_prefix="${W_PREFIXES_ROOT}/$1"
  3905. ;;
  3906. *)
  3907. _W_prefix="${WINEPREFIX}"
  3908. ;;
  3909. esac
  3910. if test -d "${_W_prefix}/dosdevices"; then
  3911. # 'win7 vcrun2005' creates different file than 'winxp vcrun2005'
  3912. # so let it specify multiple, separated by |
  3913. _W_IFS="${IFS}"
  3914. IFS='|'
  3915. for _W_file_ in ${_W_file}; do
  3916. _W_file_unix="$(WINEPREFIX="${_W_prefix}" w_pathconv -u "${_W_file_}")"
  3917. if test -f "${_W_file_unix}" && ! grep -q "Wine placeholder DLL" "${_W_file_unix}"; then
  3918. IFS="${_W_IFS}"
  3919. unset _W_file _W_file_ _W_file_unix _W_prefix _W_IFS
  3920. return "${TRUE}" # installed
  3921. fi
  3922. done
  3923. IFS="${_W_IFS}"
  3924. fi
  3925. ;;
  3926. esac
  3927. unset _W_file _W_prefix _W_IFS # leak _W_file_unix for caller. Is this wise?
  3928. return "${FALSE}" # not installed
  3929. }
  3930. # List verbs which are already fully cached locally
  3931. winetricks_list_cached()
  3932. {
  3933. for _W_metadatafile in "${WINETRICKS_METADATA}"/*/*.vars; do
  3934. # Use a subshell to avoid putting metadata in global space
  3935. # If this is too slow, we can unset known metadata by hand
  3936. (
  3937. code=$(winetricks_metadata_basename "${_W_metadatafile}")
  3938. # shellcheck disable=SC1090
  3939. . "${_W_metadatafile}"
  3940. if winetricks_is_cached "${code}"; then
  3941. echo "${code}"
  3942. fi
  3943. )
  3944. done | sort
  3945. unset _W_metadatafile
  3946. }
  3947. # List verbs which are automatically downloadable, regardless of whether they're cached yet
  3948. winetricks_list_download()
  3949. {
  3950. # Piping output of w_try_cd to /dev/null since winetricks-test parses it:
  3951. w_try_cd "${WINETRICKS_METADATA}" >/dev/null
  3952. grep -l 'media=.download' ./*/*.vars | sed 's,.*/,,;s/\.vars//' | sort -u
  3953. }
  3954. # List verbs which are downloadable with user intervention, regardless of whether they're cached yet
  3955. winetricks_list_manual_download()
  3956. {
  3957. # Piping output of w_try_cd to /dev/null since winetricks-test parses it:
  3958. w_try_cd "${WINETRICKS_METADATA}" >/dev/null
  3959. grep -l 'media=.manual_download' ./*/*.vars | sed 's,.*/,,;s/\.vars//' | sort -u
  3960. }
  3961. winetricks_list_installed()
  3962. {
  3963. # Rather than check individual metadata/files (which is slow/brittle, and also breaks settings and metaverbs)
  3964. # just show winetricks.log (if it exists), which lists verbs in the order they were installed
  3965. if [ -f "${WINEPREFIX}/winetricks.log" ]; then
  3966. cat "${WINEPREFIX}/winetricks.log"
  3967. else
  3968. echo "warning: ${WINEPREFIX}/winetricks.log not found; winetricks has not installed anything in this prefix."
  3969. fi
  3970. }
  3971. # Helper for adding a string to a list of flags
  3972. winetricks_append_to_flags()
  3973. {
  3974. if test "${flags}"; then
  3975. flags="${flags},"
  3976. fi
  3977. flags="${flags}$1"
  3978. }
  3979. # List all verbs in category WINETRICKS_CURMENU verbosely
  3980. # Format is "verb title (publisher, year) [flags]"
  3981. winetricks_list_all()
  3982. {
  3983. # Note: doh123 relies on 'winetricks list' to list main menu categories
  3984. case ${WINETRICKS_CURMENU} in
  3985. prefix|main|mkprefix) echo "${WINETRICKS_CATEGORIES}" | sed 's/ mkprefix//' | tr ' ' '\012' ; return;;
  3986. esac
  3987. case ${LANG} in
  3988. bg*) _W_cached="кеширано" ; _W_download="за изтегляне" ;;
  3989. da*) _W_cached="cached" ; _W_download="kan hentes" ;;
  3990. de*) _W_cached="gecached" ; _W_download="herunterladbar";;
  3991. pl*) _W_cached="zarchiwizowane" ; _W_download="do pobrania" ;;
  3992. pt*) _W_cached="em cache" ; _W_download="para download" ;;
  3993. ru*) _W_cached="в кэше" ; _W_download="доступно для скачивания" ;;
  3994. uk*) _W_cached="кешовано" ; _W_download="завантажуване" ;;
  3995. zh_CN*) _W_cached="已缓存" ; _W_download="可下载" ;;
  3996. zh_TW*|zh_HK*) _W_cached="已緩存" ; _W_download="可下載" ;;
  3997. *) _W_cached="cached" ; _W_download="downloadable" ;;
  3998. esac
  3999. for _W_metadatafile in "${WINETRICKS_METADATA}/${WINETRICKS_CURMENU}"/*.vars; do
  4000. # Use a subshell to avoid putting metadata in global space
  4001. # If this is too slow, we can unset known metadata by hand
  4002. (
  4003. code=$(winetricks_metadata_basename "${_W_metadatafile}")
  4004. # shellcheck disable=SC1090
  4005. . "${_W_metadatafile}"
  4006. # Compute cached and downloadable flags
  4007. flags=""
  4008. test "${media}" = "download" && winetricks_append_to_flags "${_W_download}"
  4009. winetricks_is_cached "${code}" && winetricks_append_to_flags "${_W_cached}"
  4010. test "${flags}" && flags="[${flags}]"
  4011. if ! test "${year}" && ! test "${publisher}"; then
  4012. printf "%-24s %s %s\\n" "${code}" "${title}" "${flags}"
  4013. else
  4014. printf "%-24s %s (%s, %s) %s\\n" "${code}" "${title}" "${publisher}" "${year}" "${flags}"
  4015. fi
  4016. )
  4017. done
  4018. unset _W_cached _W_metadatafile
  4019. }
  4020. # Abort if user doesn't own the given directory (or its parent, if it doesn't exist yet)
  4021. winetricks_die_if_user_not_dirowner()
  4022. {
  4023. if test -d "$1"; then
  4024. _W_checkdir="$1"
  4025. else
  4026. # fixme: quoting problem?
  4027. _W_checkdir=$(dirname "$1")
  4028. fi
  4029. _W_nuser=$(id -u)
  4030. _W_nowner=$(stat -c '%u' "${_W_checkdir}")
  4031. if test x"${_W_nuser}" != x"${_W_nowner}"; then
  4032. w_die "You ($(id -un)) don't own ${_W_checkdir}. Don't run this tool as another user!"
  4033. fi
  4034. }
  4035. # See
  4036. # https://www.ecma-international.org/publications/files/ECMA-ST/Ecma-119.pdf (iso9660)
  4037. # https://www.ecma-international.org/publications/files/ECMA-ST/Ecma-167.pdf
  4038. # http://www.osta.org/specs/pdf/udf102.pdf
  4039. # https://www.ecma-international.org/publications/techreports/E-TR-071.htm
  4040. # Usage: read_bytes offset count device
  4041. winetricks_read_bytes()
  4042. {
  4043. dd status=noxfer if="$3" bs=1 skip="$1" count="$2" 2>/dev/null
  4044. }
  4045. # Usage: read_hex offset count device
  4046. winetricks_read_hex()
  4047. {
  4048. od -j "$1" -N "$2" -t x1 "$3" | # offset $1, count $2, single byte hex format, file $3
  4049. sed 's/^[^ ]* //' | # remove address
  4050. sed '$d' # remove final line which is just final offset
  4051. }
  4052. # Usage: read_decimal offset device
  4053. # Reads single four byte word, outputs in decimal.
  4054. # Uses default endianness.
  4055. # udf uses little endian words, so this only works on little endian machines.
  4056. winetricks_read_decimal()
  4057. {
  4058. od -j "$1" -N 4 -t u4 "$2" | # offset $1, byte count 4, four byte decimal format, file $2
  4059. sed 's/^[^ ]* //' | # remove address
  4060. sed '$d' # remove final line which is just final offset
  4061. }
  4062. winetricks_read_udf_volume_name()
  4063. {
  4064. # "Anchor volume descriptor pointer" starts at sector 256
  4065. # AVDP Layout (ECMA-167 3/10.2):
  4066. # size offset contents
  4067. # 16 0 descriptor tag (id = 2)
  4068. # 16 8 main (primary?) volume descriptor sequence extent
  4069. # ...
  4070. # descriptor tag layout (ECMA-167 3/7.2):
  4071. # size offset contents
  4072. # 2 0 TagIdentifier
  4073. # ...
  4074. # extent layout (ECMA-167 3/7.1):
  4075. # size offset contents
  4076. # 4 0 length (in bytes)
  4077. # 8 4 location (in 2k sectors)
  4078. # primary volume descriptor layout (ECMA-167 3/10.1):
  4079. # size offset contents
  4080. # 16 0 descriptor tag (id = 1)
  4081. # ...
  4082. # 32 24 volume identifier (dstring)
  4083. # 1. check the 16 bit TagIdentifier of the descriptor tag, make sure it's 2
  4084. tagid=$(winetricks_read_hex 524288 2 "$1")
  4085. : echo "tagid is ${tagid}"
  4086. case "${tagid}" in
  4087. "02 00") : echo "Found AVDP" ;;
  4088. *) echo "Did not find AVDP (tagid was ${tagid})"; exit 1;;
  4089. esac
  4090. # 2. read the location of the main volume descriptor:
  4091. offset=$(winetricks_read_decimal 524308 "$1")
  4092. : echo "MVD is at sector ${offset}"
  4093. offset=$((offset * 2048))
  4094. : echo "MVD is at byte ${offset}"
  4095. # 3. check the TagIdentifier of the MVD's descriptor tag, make sure it's 1
  4096. tagid=$(winetricks_read_hex ${offset} 2 "$1")
  4097. : echo "tagid is ${tagid}"
  4098. case "${tagid}" in
  4099. "01 00") : echo Found MVD ;;
  4100. *) echo Did not find MVD; exit 1;;
  4101. esac
  4102. # 4. Read whether the name is in 8 or 16 bit chars
  4103. offset=$((offset + 24))
  4104. width=$(winetricks_read_hex ${offset} 1 "$1")
  4105. offset=$((offset + 1))
  4106. # 5. Profit!
  4107. case ${width} in
  4108. 08) winetricks_read_bytes ${offset} 30 "$1" | sed 's/ *$//' ;;
  4109. 10) winetricks_read_bytes ${offset} 30 "$1" | tr -d '\000' | sed 's/ *$//' ;;
  4110. *) echo "Unhandled dvd volname character width '${width}'"; exit 1;;
  4111. esac
  4112. echo ""
  4113. }
  4114. winetricks_read_iso9660_volume_name()
  4115. {
  4116. winetricks_read_bytes 32808 30 "$1" | sed 's/ *$//'
  4117. }
  4118. winetricks_read_volume_name()
  4119. {
  4120. # ECMA-119 says that CD-ROMs have sector size 2k, and at sector 16 have:
  4121. # size offset contents
  4122. # 1 0 Volume descriptor type (1 for primary volume descriptor)
  4123. # 5 1 Standard identifier ("CD001" for iso9660)
  4124. # ECMA-167, section 9.1.2, has a table of standard identifiers:
  4125. # "BEA01": ecma-167 9.2, Beginning Extended Area Descriptor
  4126. # "CD001": ecma-119
  4127. # "CDW02": ecma-168
  4128. std_id=$(winetricks_read_bytes 32769 5 "$1")
  4129. : echo "std_id is ${std_id}"
  4130. case ${std_id} in
  4131. CD001) winetricks_read_iso9660_volume_name "$1" ;;
  4132. BEA01) winetricks_read_udf_volume_name "$1" ;;
  4133. *) echo "Unrecognized disk type ${std_id}"; exit 1 ;;
  4134. esac
  4135. }
  4136. winetricks_volname()
  4137. {
  4138. x=$(volname "$1" 2> /dev/null| sed 's/ *$//')
  4139. if test -z "${x}"; then
  4140. # UDF? See https://bugs.launchpad.net/bugs/678419
  4141. x=$(winetricks_read_volume_name "$1")
  4142. fi
  4143. echo "${x}"
  4144. }
  4145. # Really, should take a volume name as argument, and use 'mount' to get
  4146. # mount point if system automounted it.
  4147. winetricks_detect_optical_drive()
  4148. {
  4149. case "${WINETRICKS_DEV}" in
  4150. "") ;;
  4151. *) return ;;
  4152. esac
  4153. for WINETRICKS_DEV in /dev/cdrom /dev/dvd /dev/sr0; do
  4154. test -b ${WINETRICKS_DEV} && break
  4155. done
  4156. case "${WINETRICKS_DEV}" in
  4157. "x") w_die "can't find cd/dvd drive" ;;
  4158. esac
  4159. }
  4160. winetricks_cache_iso()
  4161. {
  4162. # WINETRICKS_IMG has already been set by w_mount
  4163. _W_expected_volname="$1"
  4164. winetricks_die_if_user_not_dirowner "${W_CACHE}"
  4165. winetricks_detect_optical_drive
  4166. # Horrible hack for Gentoo - make sure we can read from the drive
  4167. if ! test -r "${WINETRICKS_DEV}"; then
  4168. case "${WINETRICKS_SUDO}" in
  4169. gksu*|kdesudo) ${WINETRICKS_SUDO} chmod 666 "${WINETRICKS_DEV}" ;;
  4170. kdesu) ${WINETRICKS_SUDO} -c "chmod 666 ${WINETRICKS_DEV}" ;;
  4171. *) ${WINETRICKS_SUDO} chmod 666 "${WINETRICKS_DEV}" ;;
  4172. esac
  4173. fi
  4174. while true; do
  4175. # Wait for user to insert disc.
  4176. # Sleep long to make it less likely to close the drive during insertion.
  4177. while ! dd if="${WINETRICKS_DEV}" of=/dev/null count=1; do
  4178. sleep 5
  4179. done
  4180. # Some distributions automount discs in /media, take advantage of that
  4181. if test -d "/media/_W_expected_volname"; then
  4182. break
  4183. fi
  4184. # Otherwise try and read it straight from unmounted volume
  4185. _W_volname="$(winetricks_volname "${WINETRICKS_DEV}")"
  4186. if test "${_W_expected_volname}" != "${_W_volname}"; then
  4187. case ${LANG} in
  4188. bg*) w_warn "Дискът [${_W_volname}] е неправилен. Моля, използвайте [${_W_expected_volname}]" ;;
  4189. da*) w_warn "Forkert disk [${_W_volname}] indsat. Indsæt venligst disken [${_W_expected_volname}]" ;;
  4190. de*) w_warn "Falsche Disk [${_W_volname}] eingelegt. Bitte legen Sie Disk [${_W_expected_volname}] ein!" ;;
  4191. pl*) w_warn "Umieszczono zły dysk [${_W_volname}]. Proszę włożyć dysk [${_W_expected_volname}]" ;;
  4192. pt*) w_warn "Disco errado [${_W_volname}] inserido. Por favor insira o disco [${_W_expected_volname}]" ;;
  4193. ru*) w_warn "Неверный диск [${_W_volname}]. Пожалуйста, вставьте диск [${_W_expected_volname}]" ;;
  4194. uk*) w_warn "Неправильний диск [${_W_volname}]. Будь ласка, вставте диск [${_W_expected_volname}]" ;;
  4195. zh_CN*) w_warn " [${_W_volname}] 光盘插入错误,请插入光盘 [${_W_expected_volname}]" ;;
  4196. zh_TW*|zh_HK*) w_warn " [${_W_volname}] 光碟插入錯誤,請插入光碟 [${_W_expected_volname}]" ;;
  4197. *) w_warn "Wrong disc [${_W_volname}] inserted. Please insert disc [${_W_expected_volname}]" ;;
  4198. esac
  4199. sleep 10
  4200. else
  4201. break
  4202. fi
  4203. done
  4204. # Copy disc to .iso file, display progress every 5 seconds
  4205. # Use conv=noerror,sync to replace unreadable blocks with zeroes
  4206. case "${WINETRICKS_OPT_DD}" in
  4207. dd)
  4208. "${WINETRICKS_OPT_DD}" if="${WINETRICKS_DEV}" of="${W_CACHE}"/temp.iso bs=2048 conv=noerror,sync &
  4209. WINETRICKS_DD_PID=$!
  4210. ;;
  4211. ddrescue)
  4212. if [ ! -x "$(command -v ddrescue)" ]; then
  4213. w_die "Please install ddrescue first."
  4214. fi
  4215. "${WINETRICKS_OPT_DD}" -v -b 2048 "${WINETRICKS_DEV}" "${W_CACHE}"/temp.iso &
  4216. WINETRICKS_DD_PID=$!
  4217. ;;
  4218. esac
  4219. echo "${WINETRICKS_DD_PID}" > "${WINETRICKS_WORKDIR}"/dd-pid
  4220. # Note: if user presses ^C, winetricks_cleanup will call winetricks_iso_cleanup
  4221. # FIXME: add progress bar for kde, too
  4222. case ${WINETRICKS_GUI} in
  4223. none|kdialog)
  4224. while ps -p "${WINETRICKS_DD_PID}" > /dev/null 2>&1; do
  4225. sleep 5
  4226. ls -l "${W_CACHE}"/temp.iso
  4227. done
  4228. ;;
  4229. zenity)
  4230. while ps -p "${WINETRICKS_DD_PID}" > /dev/null 2>&1; do
  4231. echo 1
  4232. sleep 2
  4233. done | ${WINETRICKS_GUI} --title "Copying to ${_W_expected_volname}.iso" --progress --pulsate --auto-kill
  4234. ;;
  4235. esac
  4236. rm "${WINETRICKS_WORKDIR}"/dd-pid
  4237. mv "${W_CACHE}"/temp.iso "${WINETRICKS_IMG}"
  4238. eject "${WINETRICKS_DEV}" || true # punt if eject not found (as on cygwin)
  4239. }
  4240. winetricks_load_vcdmount()
  4241. {
  4242. if test "${WINE}" != ""; then
  4243. return
  4244. fi
  4245. # Call only on real Windows.
  4246. # Sets VCD_DIR and W_ISO_MOUNT_ROOT
  4247. # The only free mount tool I know for Windows Vista is Virtual CloneDrive,
  4248. # which can be downloaded at
  4249. # http://www.slysoft.com/en/virtual-clonedrive.html
  4250. # FIXME: actually install it here
  4251. # Locate vcdmount.exe.
  4252. VCD_DIR="Elaborate Bytes/VirtualCloneDrive"
  4253. if test ! -x "${W_PROGRAMS_UNIX}/${VCD_DIR}/vcdmount.exe" && test ! -x "${W_PROGRAMS_X86_UNIX}/${VCD_DIR}/vcdmount.exe"; then
  4254. w_warn "Installing Virtual CloneDrive"
  4255. w_download_to vcd http://static.slysoft.com/SetupVirtualCloneDrive.exe
  4256. # have to use cmd else vista won't let cygwin run .exe's?
  4257. chmod +x "${W_CACHE}"/vcd/SetupVirtualCloneDrive.exe
  4258. w_try_cd "${W_CACHE}/vcd"
  4259. cmd /c SetupVirtualCloneDrive.exe
  4260. fi
  4261. if test -x "${W_PROGRAMS_UNIX}/${VCD_DIR}/vcdmount.exe"; then
  4262. VCD_DIR="${W_PROGRAMS_UNIX}/${VCD_DIR}"
  4263. elif test -x "${W_PROGRAMS_X86_UNIX}/${VCD_DIR}/vcdmount.exe"; then
  4264. VCD_DIR="${W_PROGRAMS_X86_UNIX}/${VCD_DIR}"
  4265. else
  4266. w_die "can't find Virtual CloneDrive?"
  4267. fi
  4268. # FIXME: Use WMI to locate the drive named
  4269. # "ELBY CLONEDRIVE..." using WMI as described in
  4270. # https://delphihaven.wordpress.com/2009/07/05/using-wmi-to-get-a-drive-friendly-name/
  4271. }
  4272. winetricks_mount_cached_iso()
  4273. {
  4274. # On entry, WINETRICKS_IMG is already set
  4275. w_umount
  4276. if test "${WINE}" = ""; then
  4277. winetricks_load_vcdmount
  4278. my_img_win="$(w_pathconv -w "${WINETRICKS_IMG}" | tr '\012' ' ' | sed 's/ $//')"
  4279. w_try_cd "${VCD_DIR}"
  4280. w_try vcdmount.exe /l="${letter}" "${my_img_win}"
  4281. tries=0
  4282. while test ${tries} -lt 20; do
  4283. for W_ISO_MOUNT_LETTER in e f g h i j k; do
  4284. # let user blacklist drive letters
  4285. echo "${WINETRICKS_MOUNT_LETTER_IGNORE}" | grep -q "${W_ISO_MOUNT_LETTER}" && continue
  4286. W_ISO_MOUNT_ROOT=/cygdrive/${W_ISO_MOUNT_LETTER}
  4287. if find ${W_ISO_MOUNT_ROOT} -iname 'setup*' -o -iname '*.exe' -o -iname '*.msi'; then
  4288. break 2
  4289. fi
  4290. done
  4291. tries=$((tries + 1))
  4292. echo "Waiting for mount to finish mounting"
  4293. sleep 1
  4294. done
  4295. else
  4296. if test "${W_USE_USERMOUNT}"; then
  4297. # Linux (FUSE-based tools), macOS (hdiutil)
  4298. if test "${WINETRICKS_ISO_MOUNT}" = "none"; then
  4299. # If no tools found, fall back to sudo + mount
  4300. w_warn "No user mount tools detected, using sudo + mount"
  4301. unset W_USE_USERMOUNT
  4302. winetricks_mount_cached_iso
  4303. return
  4304. fi
  4305. echo "Running mkdir -p ${W_ISO_USER_MOUNT_ROOT}"
  4306. mkdir -p "${W_ISO_USER_MOUNT_ROOT}"
  4307. if test $? -ne 0; then
  4308. w_warn "mkdir -p ${W_ISO_USER_MOUNT_ROOT} failed, falling back to sudo + mount"
  4309. unset W_USE_USERMOUNT
  4310. winetricks_mount_cached_iso
  4311. return
  4312. fi
  4313. case "${WINETRICKS_ISO_MOUNT}" in
  4314. fuseiso)
  4315. echo "Running ${WINETRICKS_ISO_MOUNT} ${WINETRICKS_IMG} ${W_ISO_USER_MOUNT_ROOT}"
  4316. ${WINETRICKS_ISO_MOUNT} "${WINETRICKS_IMG}" "${W_ISO_USER_MOUNT_ROOT}"
  4317. ;;
  4318. archivemount)
  4319. echo "Running ${WINETRICKS_ISO_MOUNT} ${WINETRICKS_IMG} ${W_ISO_USER_MOUNT_ROOT} -o readonly"
  4320. ${WINETRICKS_ISO_MOUNT} "${WINETRICKS_IMG}" "${W_ISO_USER_MOUNT_ROOT}" -o readonly
  4321. ;;
  4322. hdiutil)
  4323. echo "Running ${WINETRICKS_ISO_MOUNT} attach -mountpoint ${W_ISO_USER_MOUNT_ROOT} ${WINETRICKS_IMG}"
  4324. ${WINETRICKS_ISO_MOUNT} attach -mountpoint "${W_ISO_USER_MOUNT_ROOT}" "${WINETRICKS_IMG}"
  4325. ;;
  4326. *)
  4327. w_warn "Unknown ISO mount tool ${WINETRICKS_ISO_MOUNT}, using sudo + mount"
  4328. unset W_USE_USERMOUNT
  4329. winetricks_mount_cached_iso
  4330. return
  4331. ;;
  4332. esac
  4333. if test $? -ne 0; then
  4334. w_warn "${WINETRICKS_ISO_MOUNT} failed, falling back to sudo + mount"
  4335. unset W_USE_USERMOUNT
  4336. winetricks_mount_cached_iso
  4337. return
  4338. fi
  4339. echo "Mounting as drive ${W_ISO_MOUNT_LETTER}:"
  4340. # Gotta provide a symlink to the raw disc, else installers that check volume names will fail
  4341. rm -f "${WINEPREFIX}/dosdevices/${W_ISO_MOUNT_LETTER}:"*
  4342. ln -sf "${WINETRICKS_IMG}" "${WINEPREFIX}/dosdevices/${W_ISO_MOUNT_LETTER}::"
  4343. ln -sf "${W_ISO_USER_MOUNT_ROOT}" "${WINEPREFIX}/dosdevices/${W_ISO_MOUNT_LETTER}:"
  4344. # Gotta set the type to "cdrom", else "wine eject" will fail
  4345. cat > "${W_TMP}"/set_type_cdrom.reg <<_EOF_
  4346. REGEDIT4
  4347. [HKEY_LOCAL_MACHINE\\Software\\Wine\\Drives]
  4348. "${W_ISO_MOUNT_LETTER}:"="cdrom"
  4349. _EOF_
  4350. w_try_regedit "${W_TMP}"/set_type_cdrom.reg
  4351. # The new drive is not recognized without waiting
  4352. # FIXME: not sure if the duration is appropriate
  4353. sleep 5
  4354. W_ISO_MOUNT_ROOT="${W_ISO_USER_MOUNT_ROOT}"
  4355. else
  4356. # Linux (sudo + mount)
  4357. _W_USERID=$(id -u)
  4358. # WINETRICKS_IMG may contain spaces and needs to be quoted
  4359. case "${WINETRICKS_SUDO}" in
  4360. gksu*|kdesudo)
  4361. w_try "${WINETRICKS_SUDO}" "mkdir -p ${W_ISO_MOUNT_ROOT}"
  4362. w_try "${WINETRICKS_SUDO}" "mount -o ro,loop,uid=${_W_USERID},unhide '${WINETRICKS_IMG}' ${W_ISO_MOUNT_ROOT}"
  4363. ;;
  4364. kdesu)
  4365. w_try "${WINETRICKS_SUDO}" -c "mkdir -p ${W_ISO_MOUNT_ROOT}"
  4366. w_try "${WINETRICKS_SUDO}" -c "mount -o ro,loop,uid=${_W_USERID},unhide '${WINETRICKS_IMG}' ${W_ISO_MOUNT_ROOT}"
  4367. ;;
  4368. *)
  4369. w_try "${WINETRICKS_SUDO}" mkdir -p "${W_ISO_MOUNT_ROOT}"
  4370. w_try "${WINETRICKS_SUDO}" mount -o ro,loop,uid="${_W_USERID}",unhide "${WINETRICKS_IMG}" "${W_ISO_MOUNT_ROOT}"
  4371. ;;
  4372. esac
  4373. echo "Mounting as drive ${W_ISO_MOUNT_LETTER}:"
  4374. # Gotta provide a symlink to the raw disc, else installers that check volume names will fail
  4375. rm -f "${WINEPREFIX}/dosdevices/${W_ISO_MOUNT_LETTER}:"*
  4376. ln -sf "${WINETRICKS_IMG}" "${WINEPREFIX}/dosdevices/${W_ISO_MOUNT_LETTER}::"
  4377. ln -sf "${W_ISO_MOUNT_ROOT}" "${WINEPREFIX}/dosdevices/${W_ISO_MOUNT_LETTER}:"
  4378. unset _W_USERID
  4379. fi
  4380. fi
  4381. }
  4382. # List the currently mounted UDF or iso9660 filesystems that match the given pattern
  4383. # Output format:
  4384. # dev mountpoint
  4385. # dev mountpoint
  4386. # ...
  4387. # Mount points may contain spaces.
  4388. winetricks_list_mounts()
  4389. {
  4390. mount | grep -E 'udf|iso9660' | sed 's,^\([^ ]*\) on \(.*\) type .*,\1 \2,'| grep "$1\$"
  4391. }
  4392. # Return success and set _W_dev _W_mountpoint if volume $1 is mounted
  4393. # Note: setting variables as a way of returning results from a
  4394. # shell function exposed several bugs in most shells (except ksh!)
  4395. # related to implicit subshells. It would be better to output
  4396. # one string to stdout instead.
  4397. winetricks_is_mounted()
  4398. {
  4399. # First, check for matching mountpoint
  4400. _W_tmp="$(winetricks_list_mounts "$1")"
  4401. if test "${_W_tmp}"; then
  4402. _W_dev=$(echo "${_W_tmp}" | sed 's/ .*//')
  4403. _W_mountpoint="$(echo "${_W_tmp}" | sed 's/^[^ ]* //')"
  4404. # Volume found!
  4405. return "${TRUE}"
  4406. fi
  4407. # If that fails, read volume name the hard way for each volume
  4408. # Have to use file to return results from implicit subshell
  4409. rm -f "${W_TMP_EARLY}/_W_tmp.${LOGNAME}"
  4410. winetricks_list_mounts . | while true; do
  4411. IFS= read -r _W_tmp
  4412. _W_dev=$(echo "${_W_tmp}" | sed 's/ .*//')
  4413. test "${_W_dev}" || break
  4414. _W_mountpoint="$(echo "${_W_tmp}" | sed 's/^[^ ]* //')"
  4415. _W_volname=$(winetricks_volname "${_W_dev}")
  4416. if test "$1" = "${_W_volname}"; then
  4417. # Volume found! Want to return from function here, but can't
  4418. echo "${_W_tmp}" > "${W_TMP_EARLY}/_W_tmp.${LOGNAME}"
  4419. break
  4420. fi
  4421. done
  4422. if test -f "${W_TMP_EARLY}/_W_tmp.${LOGNAME}"; then
  4423. # Volume found! Return from function.
  4424. _W_dev=$(sed 's/ .*//' "${W_TMP_EARLY}/_W_tmp.${LOGNAME}")
  4425. _W_mountpoint="$(sed 's/^[^ ]* //' "${W_TMP_EARLY}/_W_tmp.${LOGNAME}")"
  4426. rm -f "${W_TMP_EARLY}/_W_tmp.${LOGNAME}"
  4427. return "${TRUE}"
  4428. fi
  4429. # Volume not found
  4430. unset _W_dev _W_mountpoint _W_volname
  4431. return "${FALSE}"
  4432. }
  4433. winetricks_mount_real_volume()
  4434. {
  4435. _W_expected_volname="$1"
  4436. # Wait for user to insert disc.
  4437. case ${LANG} in
  4438. bg*) _W_mountmsg="Моля, използвайте ${_W_expected_volname} (изисква се от пакета ${W_PACKAGE})" ;;
  4439. da*)_W_mountmsg="Indsæt venligst disken '${_W_expected_volname}' (krævet af pakken '${W_PACKAGE}')" ;;
  4440. de*)_W_mountmsg="Bitte Disk '${_W_expected_volname}' einlegen (für Paket '${W_PACKAGE}')" ;;
  4441. pl*) _W_mountmsg="Proszę włożyć dysk '${_W_expected_volname}' (potrzebny paczce '${W_PACKAGE}')" ;;
  4442. pt*) _W_mountmsg="Por favor insira o volume '${_W_expected_volname}' (necessário para o pacote '${W_PACKAGE}')" ;;
  4443. ru*) _W_mountmsg="Пожалуйста, вставьте том '${_W_expected_volname}' (требуется для пакета '${W_PACKAGE}')" ;;
  4444. uk*) _W_mountmsg="Будь ласка, вставте том '${_W_expected_volname}' (потрібний для пакунка '${W_PACKAGE}')" ;;
  4445. zh_CN*) _W_mountmsg="请插入卷 '${_W_expected_volname}' (为包 '${W_PACKAGE} 所需')" ;;
  4446. zh_TW*|zh_HK*) _W_mountmsg="請插入卷 '${_W_expected_volname}' (為包 '${W_PACKAGE} 所需')" ;;
  4447. *) _W_mountmsg="Please insert volume '${_W_expected_volname}' (needed for package '${W_PACKAGE}')" ;;
  4448. esac
  4449. if test "${WINE}" = ""; then
  4450. # Assume already mounted, just get drive letter
  4451. W_ISO_MOUNT_LETTER=$(awk '/iso/ {print $1}' < /proc/mounts | tr -d :)
  4452. W_ISO_MOUNT_ROOT=$(awk '/iso/ {print $2}' < /proc/mounts)
  4453. else
  4454. while ! winetricks_is_mounted "${_W_expected_volname}"; do
  4455. w_try w_warn_cancel "${_W_mountmsg}"
  4456. # In non-gui case, give user two seconds to futz with disc drive before spamming him again
  4457. sleep 2
  4458. done
  4459. WINETRICKS_DEV=${_W_dev}
  4460. W_ISO_MOUNT_ROOT="${_W_mountpoint}"
  4461. # Gotta provide a symlink to the raw disc, else installers that check volume names will fail
  4462. rm -f "${WINEPREFIX}/dosdevices/${W_ISO_MOUNT_LETTER}:"*
  4463. ln -sf "${WINETRICKS_DEV}" "${WINEPREFIX}/dosdevices/${W_ISO_MOUNT_LETTER}::"
  4464. ln -sf "${W_ISO_MOUNT_ROOT}" "${WINEPREFIX}/dosdevices/${W_ISO_MOUNT_LETTER}:"
  4465. fi
  4466. # FIXME: need to remount some discs with unhide option,
  4467. # add that as option to w_mount
  4468. unset _W_mountmsg
  4469. }
  4470. winetricks_cleanup()
  4471. {
  4472. # We don't want to run this multiple times, so unfortunately we have to run it here:
  4473. if test "${W_NGEN_CMD}"; then
  4474. "${W_NGEN_CMD}"
  4475. fi
  4476. set +e
  4477. if test -f "${WINETRICKS_WORKDIR}/dd-pid"; then
  4478. # shellcheck disable=SC2046
  4479. kill $(cat "${WINETRICKS_WORKDIR}/dd-pid")
  4480. fi
  4481. test "${WINETRICKS_CACHE_SYMLINK}" && rm -f "${WINETRICKS_CACHE_SYMLINK}"
  4482. if [ "${W_OPT_NOCLEAN}" = 1 ]; then
  4483. rm -rf "${WINETRICKS_WORKDIR}"
  4484. rm -rf "${W_TMP_EARLY}"
  4485. rm -rf "${WINEPREFIX}/wrapper.cfg"
  4486. rm -rf "${WINEPREFIX}/no_win64_warnings"
  4487. fi
  4488. }
  4489. winetricks_set_unattended()
  4490. {
  4491. case "$1" in
  4492. 1) W_OPT_UNATTENDED=1;;
  4493. *) unset W_OPT_UNATTENDED;;
  4494. esac
  4495. }
  4496. # Usage: winetricks_print_wineprefix_info
  4497. # Print some useful info about $WINEPREFIX if things fail in winetricks_set_wineprefix()
  4498. winetricks_print_wineprefix_info()
  4499. {
  4500. printf "WINEPREFIX INFO:\\n"
  4501. printf "Drive C: %s\\n\\n" "$(ls -al1 "${WINEPREFIX}/drive_c")"
  4502. printf "Registry info:\\n"
  4503. for regfile in "${WINEPREFIX}"/*.reg; do
  4504. printf "%s:%s\\n" "${regfile}" "$(grep '#arch=' "${regfile}")"
  4505. done
  4506. }
  4507. # Force creation of 32 or 64bit wineprefix on 64 bit systems.
  4508. # On 32bit systems, trying to create a 64bit wineprefix will fail.
  4509. # This must be called prior to winetricks_set_wineprefix()
  4510. winetricks_set_winearch()
  4511. {
  4512. if [ "$1" = "32" ] || [ "$1" = "win32" ]; then
  4513. export WINEARCH=win32
  4514. elif [ "$1" = "64" ] || [ "$1" = "win64" ]; then
  4515. export WINEARCH=win64
  4516. else
  4517. w_die "arch: Invalid architecture: $1"
  4518. fi
  4519. }
  4520. # Usage: winetricks_set_wineprefix [bottlename]
  4521. # Bottlename must not contain spaces, slashes, or other special characters
  4522. # If bottlename is omitted, the default bottle (~/.wine) is used.
  4523. #
  4524. # shellcheck disable=SC2034
  4525. winetricks_set_wineprefix()
  4526. {
  4527. # Note: these are arch independent, but are needed by some arch dependent variables
  4528. # Defining here to avoid having two arch checks:
  4529. if ! test "$1"; then
  4530. WINEPREFIX="${WINETRICKS_ORIGINAL_WINEPREFIX}"
  4531. else
  4532. WINEPREFIX="${W_PREFIXES_ROOT}/$1"
  4533. fi
  4534. export WINEPREFIX
  4535. w_try_mkdir "$(dirname "${WINEPREFIX}")"
  4536. case "${W_PLATFORM}" in
  4537. windows_cmd)
  4538. W_DRIVE_C="/cygdrive/c" ;;
  4539. *)
  4540. W_DRIVE_C="${WINEPREFIX}/dosdevices/c:" ;;
  4541. esac
  4542. W_WINDIR_UNIX="${W_DRIVE_C}/windows"
  4543. if [ ! -d "${WINEPREFIX}" ] && [ -n "${WINEARCH}" ]; then
  4544. w_info "Creating WINEPREFIX \"${WINEPREFIX}\" with WINEARCH=${WINEARCH}"
  4545. "${WINE}" wineboot
  4546. # apparently wineboot doesn't wait for the prefix to be ready
  4547. # (to reproduce, run 'wine wineboot ; ls ~/.wine' it will often return before the .reg files are present
  4548. "${WINESERVER}" -w
  4549. fi
  4550. # Make sure the prefix is initialized:
  4551. w_try winetricks_early_wine cmd /c "echo init" > /dev/null 2>&1
  4552. if [ "$(uname -s)" = "Darwin" ] && [ "$(uname -m)" = "arm64" ] && grep -q "Bad CPU type in executable" "${W_TMP_EARLY}"/early_wine.err.txt; then
  4553. # FIXME: this should really go in w_warn()/winetricks_detect_gui()
  4554. if [ -z "${W_OPT_UNATTENDED}" ]; then
  4555. osascript -e 'tell app "System Events" to display dialog "Wine failed to run with the error \"Bad CPU type in executable.\" You probably need to install Rosetta2"'
  4556. fi
  4557. w_die "Wine failed to run with the error 'Bad CPU type in executable'. You probably need to install Rosetta2"
  4558. fi
  4559. # Win(e) 32/64?
  4560. # Using the variable W_SYSTEM32_DLLS instead of SYSTEM32 because some stuff does go under system32 for both arch's
  4561. # e.g., spool/drivers/color
  4562. if test -d "${W_DRIVE_C}/windows/syswow64"; then
  4563. # Check the bitness of wineserver + wine binary, used later to determine if we're on a WOW setup (no wine64)
  4564. # https://github.com/Winetricks/winetricks/issues/2030
  4565. _W_wineserver_binary_arch="$(winetricks_get_file_arch "${WINESERVER}")"
  4566. _W_wine_binary_arch="$(winetricks_get_file_arch "${WINE}")"
  4567. # determine wow64 type (new/old)
  4568. # FIXME: check what upstream is calling them
  4569. if [ "${_W_wineserver_binary_arch}" = "${_W_wine_binary_arch}" ]; then
  4570. _W_wow64_style="new"
  4571. else
  4572. _W_wow64_style="classic"
  4573. fi
  4574. # Probably need fancier handling/checking, but for a basic start:
  4575. # Note 'wine' may be named 'wine-stable'/'wine-staging'/etc.):
  4576. # WINE64 = wine64, available on 64-bit prefixes
  4577. # WINE_ARCH = the native wine for the prefix (wine for 32-bit or new wow mode, wine64 for classic wow mode)
  4578. # WINE_MULTI = generic wine, new name
  4579. if [ -n "${WINE64}" ]; then
  4580. true
  4581. elif [ "${_W_wow64_style}" = "new" ]; then
  4582. WINE64="${WINE}"
  4583. elif [ "${WINE%??}64" = "${WINE}" ]; then
  4584. WINE64="${WINE}"
  4585. elif command -v "${WINE}64" >/dev/null 2>&1; then
  4586. WINE64="${WINE}64"
  4587. else
  4588. # Handle case where wine binaries (or binary wrappers) have a suffix
  4589. WINE64="$(dirname "${WINE}")/"
  4590. [ "${WINE64}" = "./" ] && WINE64=""
  4591. WINE64="${WINE64}$(basename "${WINE}" | sed 's/^wine/wine64/')"
  4592. fi
  4593. WINE_ARCH="${WINE64}"
  4594. WINE_MULTI="${WINE}"
  4595. W_ARCH=win64
  4596. W_PROGRAMS_WIN="$(w_expand_env ProgramFiles)"
  4597. W_PROGRAMS_UNIX="$(w_pathconv -u "${W_PROGRAMS_WIN}")"
  4598. # Common variable for 32-bit dlls on win32/win64:
  4599. W_SYSTEM32_DLLS="${W_WINDIR_UNIX}/syswow64"
  4600. W_SYSTEM32_DLLS_WIN="C:\\windows\\syswow64"
  4601. W_SYSTEM64_DLLS="${W_WINDIR_UNIX}/system32"
  4602. W_SYSTEM64_DLLS_WIN32="C:\\windows\\sysnative" # path to access 64-bit dlls from 32-bit apps
  4603. W_SYSTEM64_DLLS_WIN64="C:\\windows\\system32" # path to access 64-bit dlls from 64-bit apps
  4604. # There's also ProgramW6432, which =%ProgramFiles%(but only available when running under a 64 bit OS)
  4605. # See https://ss64.com/nt/syntax-variables.html
  4606. W_PROGRAMW6432_WIN="$(w_expand_env ProgramW6432)"
  4607. W_PROGRAMW6432_UNIX="$(w_pathconv -u "${W_PROGRAMW6432_WIN}")"
  4608. # 64-bit Windows has a second directory for program files
  4609. W_PROGRAMS_X86_WIN="${W_PROGRAMS_WIN} (x86)"
  4610. W_PROGRAMS_X86_UNIX="${W_PROGRAMS_UNIX} (x86)"
  4611. W_COMMONFILES_X86_WIN="$(w_expand_env CommonProgramFiles\(x86\))"
  4612. W_COMMONFILES_X86="$(w_pathconv -u "${W_COMMONFILES_X86_WIN}")"
  4613. W_COMMONFILES_WIN="$(w_expand_env CommonProgramW6432)"
  4614. W_COMMONFILES="$(w_pathconv -u "${W_COMMONFILES_WIN}")"
  4615. # 64-bit prefixes still have plenty of issues/a lot of verbs only install 32-bit libraries
  4616. # Allow the user to disable that (globally, or per prefix).
  4617. if test -f "${W_CACHE}/no_win64_warnings"; then
  4618. echo "${W_CACHE}/no_win64_warnings exists, not issuing 64-bit prefix warning"
  4619. _W_no_win64_warnings=1
  4620. elif test -f "${WINEPREFIX}/no_win64_warnings"; then
  4621. echo "${WINEPREFIX}/no_win64_warnings exists, not issuing 64-bit prefix warning"
  4622. _W_no_win64_warnings=1
  4623. elif test -f "${W_TMP_EARLY}/no_win64_warnings"; then
  4624. echo "${W_TMP_EARLY}/no_win64_warnings exists, not issuing 64-bit prefix warning"
  4625. _W_no_win64_warnings=1
  4626. else
  4627. _W_no_win64_warnings=0
  4628. fi
  4629. # In case of GUI, only warn once per prefix, per session (i.e., don't warn next time)
  4630. # Can't use ${W_TMP} because that is cleared out after each verb (by w_call())
  4631. case ${WINETRICKS_GUI} in
  4632. none) true ;;
  4633. *) touch "${W_TMP_EARLY}/no_win64_warnings" ;;
  4634. esac
  4635. if [ "${_W_no_win64_warnings}" = 0 ]; then
  4636. case ${LANG} in
  4637. bg*) w_warn "Използвате 64-битова папка. Повечето програми са за 32-битова архитектура. Ако възникнат проблеми, моля, използвайте 32-битова папка, преди да ги докладвате." ;;
  4638. ru*) w_warn "Вы используете 64-битный WINEPREFIX. Важно: многие ветки устанавливают только 32-битные версии пакетов. Если у вас возникли проблемы, пожалуйста, проверьте еще раз на чистом 32-битном WINEPREFIX до отправки отчета об ошибке." ;;
  4639. pt*) w_warn "Você está usando um WINEPREFIX de 64-bit. Observe que muitos casos instalam apenas versões de pacotes de 32-bit. Se você encontrar problemas, teste novamente em um WINEPREFIX limpo de 32-bit antes de relatar um bug." ;;
  4640. *) w_warn "You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug." ;;
  4641. esac
  4642. if [ "${_W_wow64_style}" = "new" ]; then
  4643. w_warn "You apppear to be using Wine's new wow64 mode. Note that this is EXPERIMENTAL and not yet fully supported. If reporting an issue, be sure to mention this."
  4644. fi
  4645. fi
  4646. else
  4647. _W_wow64_style="none"
  4648. WINE64="false"
  4649. WINE_ARCH="${WINE}"
  4650. WINE_MULTI="${WINE}"
  4651. W_ARCH=win32
  4652. W_PROGRAMS_WIN="$(w_expand_env ProgramFiles)"
  4653. W_PROGRAMS_UNIX="$(w_pathconv -u "${W_PROGRAMS_WIN}")"
  4654. # Common variable for 32-bit dlls on win32/win64:
  4655. W_SYSTEM32_DLLS="${W_WINDIR_UNIX}/system32"
  4656. W_SYSTEM32_DLLS_WIN="C:\\windows\\system32"
  4657. # These don't exist on win32, but are defined in case they are used on 32-bit.
  4658. # W_SYSTEM64_DLLS_WIN64 in particular is needed by w_metadata()
  4659. W_SYSTEM64_DLLS="/dev/null"
  4660. W_SYSTEM64_DLLS_WIN32="C:\\does-not-exist-on-win32" # path to access 64-bit dlls from 32-bit apps
  4661. W_SYSTEM64_DLLS_WIN64="C:\\does-not-exist-on-win32" # path to access 64-bit dlls from 64-bit apps
  4662. W_PROGRAMS_X86_WIN="${W_PROGRAMS_WIN}"
  4663. W_PROGRAMS_X86_UNIX="${W_PROGRAMS_UNIX}"
  4664. W_COMMONFILES_X86_WIN="$(w_expand_env CommonProgramFiles)"
  4665. W_COMMONFILES_X86="$(w_pathconv -u "${W_COMMONFILES_X86_WIN}")"
  4666. W_COMMONFILES_WIN="$(w_expand_env CommonProgramFiles)"
  4667. W_COMMONFILES="$(w_pathconv -u "${W_COMMONFILES_WIN}")"
  4668. fi
  4669. ## Arch independent variables:
  4670. # Note: using AppData since it's arch independent
  4671. W_APPDATA_WIN="$(w_expand_env AppData)"
  4672. W_APPDATA_UNIX="$(w_pathconv -u "${W_APPDATA_WIN}")"
  4673. case "${W_APPDATA_WIN}" in
  4674. "") w_info "$(winetricks_print_wineprefix_info)" ; w_die "${WINE} cmd.exe /c echo '%AppData%' returned empty string, error message \"$(cat "${W_TMP_EARLY}"/early_wine.err.txt)\" ";;
  4675. %*) w_info "$(winetricks_print_wineprefix_info)" ; w_die "${WINE} cmd.exe /c echo '%AppData%' returned unexpanded string '${W_PROGRAMS_WIN}' ... this can be caused by a corrupt wineprefix (\`wineboot -u\` may help), by an old wine, or by not owning ${WINEPREFIX}" ;;
  4676. esac
  4677. # Kludge: use Temp instead of temp to avoid \t expansion in w_try
  4678. # but use temp in Unix path because that's what Wine creates, and having both temp and Temp
  4679. # causes confusion (e.g. makes vc2005trial fail)
  4680. if ! test "$1"; then
  4681. W_TMP="${W_DRIVE_C}/windows/temp"
  4682. W_TMP_WIN="C:\\windows\\Temp"
  4683. else
  4684. # Verbs can rely on W_TMP being empty at entry, deleted after return, and a subdir of C:
  4685. W_TMP="${W_DRIVE_C}/windows/temp/_$1"
  4686. W_TMP_WIN="C:\\windows\\Temp\\_$1"
  4687. fi
  4688. case "${W_PLATFORM}" in
  4689. "windows_cmd|wine_cmd") W_CACHE_WIN="$(w_pathconv -w "${W_CACHE}")" ;;
  4690. *)
  4691. # For case where Z: doesn't exist or / is writable (!),
  4692. # make a drive letter for W_CACHE. Clean it up on exit.
  4693. test "${WINETRICKS_CACHE_SYMLINK}" && rm -f "${WINETRICKS_CACHE_SYMLINK}"
  4694. for letter in y x w v u t s r q p o n m; do
  4695. if ! test -d "${WINEPREFIX}"/dosdevices/${letter}:; then
  4696. w_try_mkdir "${WINEPREFIX}"/dosdevices
  4697. WINETRICKS_CACHE_SYMLINK="${WINEPREFIX}"/dosdevices/${letter}:
  4698. ln -sf "${W_CACHE}" "${WINETRICKS_CACHE_SYMLINK}"
  4699. break
  4700. fi
  4701. done
  4702. W_CACHE_WIN="${letter}:"
  4703. ;;
  4704. esac
  4705. W_WINDIR_UNIX="${W_DRIVE_C}/windows"
  4706. W_WINDIR_WIN="C:\\windows"
  4707. # FIXME: get fonts path from SHGetFolderPath
  4708. # See also https://blogs.msdn.microsoft.com/oldnewthing/20031103-00/?p=41973/
  4709. W_FONTSDIR_WIN="${W_WINDIR_WIN}\\Fonts"
  4710. # FIXME: just convert path from Windows to Unix?
  4711. # Did the user rename Fonts to fonts?
  4712. if test ! -d "${W_WINDIR_UNIX}"/Fonts && test -d "${W_WINDIR_UNIX}"/fonts; then
  4713. W_FONTSDIR_UNIX="${W_WINDIR_UNIX}"/fonts
  4714. else
  4715. W_FONTSDIR_UNIX="${W_WINDIR_UNIX}"/Fonts
  4716. fi
  4717. w_try_mkdir "${W_FONTSDIR_UNIX}"
  4718. # Unset WINEARCH which might be set from winetricks_set_winearch().
  4719. # It is no longer necessary after the new wineprefix was created
  4720. # and even may cause trouble when using 64bit wineprefixes afterwards.
  4721. unset WINEARCH
  4722. }
  4723. winetricks_annihilate_wineprefix()
  4724. {
  4725. w_skip_windows "No wineprefix to delete on windows" && return
  4726. case ${LANG} in
  4727. bg*) w_askpermission "Изтриване на ${WINEPREFIX}, нейните приложения, икони и менюта?" ;;
  4728. uk*) w_askpermission "Бажаєте видалити '${WINEPREFIX}'?" ;;
  4729. pl*) w_askpermission "Czy na pewno chcesz usunąć prefiks ${WINEPREFIX} i wszystkie jego elementy?" ;;
  4730. pt*) w_askpermission "Apagar ${WINEPREFIX}, Estes apps, ícones e ítens do menu?" ;;
  4731. *) w_askpermission "Delete ${WINEPREFIX}, its apps, icons, and menu items?" ;;
  4732. esac
  4733. rm -rf "${WINEPREFIX}"
  4734. # Also remove menu items.
  4735. find "${XDG_DATA_HOME}/applications" -type f -name '*.desktop' -exec grep -q -l "${WINEPREFIX}" '{}' ';' -exec rm '{}' ';'
  4736. # Also remove desktop items.
  4737. # Desktop might be synonym for home directory, so only go one level
  4738. # deep to avoid extreme slowdown if user has lots of files
  4739. (
  4740. if ! test "${XDG_DESKTOP_DIR}" && test -f "${XDG_CONFIG_HOME}/user-dirs.dirs"; then
  4741. # shellcheck disable=SC1090,SC1091
  4742. . "${XDG_CONFIG_HOME}/user-dirs.dirs"
  4743. fi
  4744. find "${XDG_DESKTOP_DIR}" -maxdepth 1 -type f -name '*.desktop' -exec grep -q -l "${WINEPREFIX}" '{}' ';' -exec rm '{}' ';'
  4745. )
  4746. # FIXME: recover more nicely. At moment, have to restart to avoid trouble.
  4747. exit 0
  4748. }
  4749. winetricks_init()
  4750. {
  4751. #---- Private Variables ----
  4752. if ! test "${USERNAME}"; then
  4753. # Posix only requires LOGNAME to be defined, and sure enough, when
  4754. # logging in via console and startx in Ubuntu 11.04, USERNAME isn't set!
  4755. # And even normal logins in Ubuntu 13.04 doesn't set it.
  4756. # I tried using only LOGNAME in this script, but it's so easy to slip
  4757. # and use USERNAME, so define it here if needed.
  4758. USERNAME="${LOGNAME}"
  4759. fi
  4760. # Running Wine as root is (generally) bad, mmkay?
  4761. if [ "$(id -u)" = 0 ]; then
  4762. w_warn "Running Wine/winetricks as root is highly discouraged. See https://wiki.winehq.org/FAQ#Should_I_run_Wine_as_root.3F"
  4763. fi
  4764. # Ephemeral files for this run
  4765. WINETRICKS_WORKDIR="${W_TMP_EARLY}/w.${LOGNAME}.$$"
  4766. test "${W_OPT_NOCLEAN}" = 1 || rm -rf "${WINETRICKS_WORKDIR}"
  4767. # Registering a verb creates a file in WINETRICKS_METADATA
  4768. WINETRICKS_METADATA="${WINETRICKS_WORKDIR}/metadata"
  4769. # The list of categories is also hardcoded in winetricks_mainmenu() :-(
  4770. WINETRICKS_CATEGORIES="apps benchmarks dlls fonts settings mkprefix"
  4771. for _W_cat in ${WINETRICKS_CATEGORIES}; do
  4772. w_try_mkdir -q "${WINETRICKS_METADATA}/${_W_cat}"
  4773. done
  4774. # Which subdirectory of WINETRICKS_METADATA is currently active (or main, if none)
  4775. WINETRICKS_CURMENU=prefix
  4776. # Delete work directory after each run, on exit either graceful or abrupt
  4777. trap winetricks_cleanup EXIT HUP INT QUIT ABRT
  4778. # Whether to always cache cached iso's (1) or only use cache if present (0)
  4779. # Can be inherited from environment or set via -k, defaults to off
  4780. WINETRICKS_OPT_KEEPISOS=${WINETRICKS_OPT_KEEPISOS:-0}
  4781. # what program to use to make disc image (dd or ddrescue)
  4782. WINETRICKS_OPT_DD=${WINETRICKS_OPT_DD:-dd}
  4783. # whether to use shared wineprefix (1) or unique wineprefix for each app (0)
  4784. WINETRICKS_OPT_SHAREDPREFIX=${WINETRICKS_OPT_SHAREDPREFIX:-0}
  4785. winetricks_get_sha256sum_prog
  4786. winetricks_get_platform
  4787. # Workaround SIP DYLD_stripping
  4788. # See https://support.apple.com/en-us/HT204899
  4789. if [ -n "${WINETRICKS_FALLBACK_LIBRARY_PATH}" ]; then
  4790. export DYLD_FALLBACK_LIBRARY_PATH="${WINETRICKS_FALLBACK_LIBRARY_PATH}"
  4791. fi
  4792. #---- Public Variables ----
  4793. # Where application installers are cached
  4794. # See https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html
  4795. # OSX: https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html
  4796. if test -d "${HOME}/Library"; then
  4797. # OS X
  4798. XDG_CACHE_HOME="${XDG_CACHE_HOME:-${HOME}/Library/Caches}"
  4799. XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${HOME}/Library/Preferences}"
  4800. else
  4801. XDG_CACHE_HOME="${XDG_CACHE_HOME:-${HOME}/.cache}"
  4802. XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${HOME}/.config}"
  4803. fi
  4804. # shellcheck disable=SC2153
  4805. if test "${WINETRICKS_DIR}"; then
  4806. # For backwards compatibility
  4807. W_CACHE="${W_CACHE:-${WINETRICKS_DIR}/cache}"
  4808. WINETRICKS_POST="${WINETRICKS_POST:-${WINETRICKS_DIR}/postinstall}"
  4809. else
  4810. W_CACHE="${W_CACHE:-${XDG_CACHE_HOME}/winetricks}"
  4811. WINETRICKS_POST="${WINETRICKS_POST:-${XDG_DATA_HOME}/winetricks/postinstall}"
  4812. fi
  4813. WINETRICKS_AUTH="${WINETRICKS_AUTH:-${XDG_DATA_HOME}/winetricks/auth}"
  4814. # Config options are currently opt-in and not required, so not creating the config
  4815. # directory unless there's demand:
  4816. WINETRICKS_CONFIG="${XDG_CONFIG_HOME}/winetricks"
  4817. #test -d "$WINETRICKS_CONFIG" || w_try_mkdir "$WINETRICKS_CONFIG"
  4818. # Load country code from config file only when "--country=" option is not specified
  4819. if test -z "${W_COUNTRY}" -a -f "${WINETRICKS_CONFIG}"/country; then
  4820. W_COUNTRY="$(cat "${WINETRICKS_CONFIG}"/country)"
  4821. fi
  4822. # Pin a task to a single cpu. Helps prevent race conditions.
  4823. #
  4824. # Linux/FreeBSD: supported
  4825. # OSX: doesn't have a utility for this
  4826. # Solaris: no access, PR welcome
  4827. if [ -x "$(command -v taskset 2>/dev/null)" ]; then
  4828. W_TASKSET="taskset -c 0"
  4829. elif [ -x "$(command -v cpuset 2>/dev/null)" ]; then
  4830. W_TASKSET="cpuset -l 0"
  4831. else
  4832. # not using w_warn so we don't annoy everyone running via GUI, but still printed to terminal:
  4833. echo "warning: taskset/cpuset not available on your platform!"
  4834. W_TASKSET=""
  4835. fi
  4836. # Whether to automate installs (0=no, 1=yes)
  4837. winetricks_set_unattended "${W_OPT_UNATTENDED:-0}"
  4838. # We have to call this here, because it needs to be called before w_metadata
  4839. # Unfortunately, that means we run wine before the gui runs. Avoiding that would take quite the refactor..
  4840. winetricks_wine_setup "$@"
  4841. }
  4842. winetricks_wine_setup()
  4843. {
  4844. # This used to be part of winetricks_init(), factored out because not everything needs Wine.
  4845. if [ -n "${_W_wine_not_needed}" ]; then
  4846. # no-op
  4847. :
  4848. return
  4849. fi
  4850. winetricks_latest_version_check
  4851. # Overridden for windows
  4852. W_ISO_MOUNT_ROOT=/mnt/winetricks
  4853. W_ISO_USER_MOUNT_ROOT="${HOME}"/winetricks-iso
  4854. W_ISO_MOUNT_LETTER=i
  4855. ######################
  4856. # System-specific variables
  4857. case "${W_PLATFORM}" in
  4858. windows_cmd)
  4859. WINE=""
  4860. WINE64=""
  4861. WINE_ARCH=""
  4862. WINE_MULTI=""
  4863. WINESERVER=""
  4864. W_DRIVE_C="C:/"
  4865. ;;
  4866. *)
  4867. WINE="${WINE:-wine}"
  4868. # Find wineserver.
  4869. # Some distributions (Debian before wine 1.8-2) don't have it on the path.
  4870. for x in \
  4871. "${WINESERVER}" \
  4872. "${WINE}server" \
  4873. "$(command -v wineserver 2> /dev/null)" \
  4874. "$(dirname "${WINE}")/server/wineserver" \
  4875. "$(dirname "${WINE}")/wineserver" \
  4876. /usr/bin/wineserver-development \
  4877. /usr/lib/wine/wineserver \
  4878. /usr/lib/i386-kfreebsd-gnu/wine/wineserver \
  4879. /usr/lib/i386-linux-gnu/wine/wineserver \
  4880. /usr/lib/powerpc-linux-gnu/wine/wineserver \
  4881. /usr/lib/i386-kfreebsd-gnu/wine/bin/wineserver \
  4882. /usr/lib/i386-linux-gnu/wine/bin/wineserver \
  4883. /usr/lib/powerpc-linux-gnu/wine/bin/wineserver \
  4884. /usr/lib/x86_64-linux-gnu/wine/bin/wineserver \
  4885. /usr/lib/i386-kfreebsd-gnu/wine-development/wineserver \
  4886. /usr/lib/i386-linux-gnu/wine-development/wineserver \
  4887. /usr/lib/powerpc-linux-gnu/wine-development/wineserver \
  4888. /usr/lib/x86_64-linux-gnu/wine-development/wineserver \
  4889. file-not-found; do
  4890. if test -x "${x}"; then
  4891. case "${x}" in
  4892. /usr/lib/*/wine-development/wineserver|/usr/bin/wineserver-development)
  4893. if test -x /usr/bin/wine-development; then
  4894. WINE="/usr/bin/wine-development"
  4895. fi
  4896. ;;
  4897. esac
  4898. break
  4899. fi
  4900. done
  4901. case "${x}" in
  4902. file-not-found) w_die "wineserver not found!" ;;
  4903. *) WINESERVER="${x}" ;;
  4904. esac
  4905. if test "${WINEPREFIX}"; then
  4906. WINETRICKS_ORIGINAL_WINEPREFIX="${WINEPREFIX}"
  4907. else
  4908. WINETRICKS_ORIGINAL_WINEPREFIX="${HOME}/.wine"
  4909. fi
  4910. _abswine="$(command -v "${WINE}" 2>/dev/null)"
  4911. if ! test -x "${_abswine}" || ! test -f "${_abswine}"; then
  4912. w_die "WINE is ${WINE}, which is neither on the path nor an executable file"
  4913. fi
  4914. unset _abswine
  4915. ;;
  4916. esac
  4917. WINETRICKS_WINE_VERSION=${WINETRICKS_WINE_VERSION:-$(winetricks_early_wine --version | sed 's/.*wine/wine/')}
  4918. WINETRICKS_ORIG_WINE_VERSION="${WINETRICKS_WINE_VERSION}"
  4919. # Need to account for lots of variations:
  4920. # wine-1.9.22
  4921. # wine-1.9.22 (Debian 1.9.22-1)
  4922. # wine-1.9.22 (Staging)
  4923. # wine-2.0 (Debian 2.0-1)
  4924. # wine-2.0-rc1
  4925. # wine-2.8
  4926. _wine_version_stripped="$(echo "${WINETRICKS_WINE_VERSION}" | cut -d ' ' -f1 | sed -e 's/wine-//' -e 's/-rc.*//')"
  4927. # If WINE is < 7.0, warn user:
  4928. # 7.0 doesn't do what I thought it would
  4929. if w_wine_version_in ,6.99 ; then
  4930. w_warn "Your version of wine ${_wine_version_stripped} is no longer supported upstream. You should upgrade to 7.x"
  4931. fi
  4932. winetricks_set_wineprefix "$1"
  4933. if [ -z "${WINETRICKS_SUPER_QUIET}" ] ; then
  4934. echo "Using winetricks $(winetricks_print_version) with ${WINETRICKS_ORIG_WINE_VERSION} and WINEARCH=${W_ARCH}"
  4935. fi
  4936. }
  4937. winetricks_usage()
  4938. {
  4939. case ${LANG} in
  4940. bg*)
  4941. cat <<_EOF_
  4942. Начин на използване: $0 [опции] [команда|глагол|местоположение-на-глагола] ...
  4943. Изпълнява глаголите. Всеки глагол инсталира приложение или променя настройка.
  4944. Опции:
  4945. --country=CC Променя държавния код (СС) и не засича Вашия IP адрес
  4946. -f, --force Не проверява за инсталираните пакети
  4947. --gui Показва графична диагностика
  4948. --gui=OPT Избира kdialog или zenity (OPT)
  4949. --isolate Инсталира всяко приложение или игра в отделна бутилка (ПАПКА)
  4950. --self-update Обновява това приложение
  4951. --update-rollback Отменя последното обновяване на това приложение
  4952. -k, --keep_isos Кешира .iso файловете (позволява инсталация без диск)
  4953. --no-clean Не изтрива временните директории (полезно е за отстраняване на неизправности)
  4954. -q, --unattended Не задава въпроси, инсталира автоматично
  4955. -r, --ddrescue Повтаря опитите за кеширане на одраскани дискове
  4956. -t --torify Стартира изтегляне с torify, ако е налично
  4957. --verify Стартира автоматични графични тестове за глаголи, ако е налично
  4958. -v, --verbose Изписва всички изпълнени команди
  4959. -h, --help Показва това съобщение и излиза
  4960. -V, --version Показва версията и излиза
  4961. Команди:
  4962. list показва категориите
  4963. list-all показва всички категории и техните глаголи
  4964. apps list показва глаголите в категория 'приложения'
  4965. benchmarks list показва глаголите в категория 'еталонни тестове'
  4966. dlls list показва глаголите в категория 'DLL файлове'
  4967. fonts list показва глаголите в категория 'шрифтове'
  4968. settings list показва глаголите в категория 'настройки'
  4969. list-cached показва кешираните-и-готови-за-инсталиране глаголи
  4970. list-download показва глаголите, които се изтеглят автоматично
  4971. list-manual-download показва глаголите, които се изтеглят от потребителя
  4972. list-installed показва инсталираните глаголи
  4973. arch=32|64 създава папка с 32 или 64-битова архитектура, тази опция
  4974. трябва да бъде зададена преди prefix=foobar и няма да работи
  4975. с папката по подразбиране.
  4976. prefix=foobar избира ПАПКА=${W_PREFIXES_ROOT}/foobar
  4977. annihilate Изтрива ВСИЧКИ ДАННИ И ПРИЛОЖЕНИЯ В ТАЗИ ПАПКА
  4978. _EOF_
  4979. ;;
  4980. da*)
  4981. cat <<_EOF_
  4982. Brug: $0 [tilvalg] [verbum|sti-til-verbum] ...
  4983. Kører de angivne verber. Hvert verbum installerer et program eller ændrer en indstilling.
  4984. Tilvalg:
  4985. --country=CC Set country code to CC and don't detect your IP address
  4986. -f, --force Don't check whether packages were already installed
  4987. --gui Show gui diagnostics even when driven by commandline
  4988. --isolate Install each app or game in its own bottle (WINEPREFIX)
  4989. --self-update Update this application to the last version
  4990. --update-rollback Rollback the last self update
  4991. -k, --keep_isos lagr iso'er lokalt (muliggør senere installation uden disk)
  4992. --no-clean Don't delete temp directories (useful during debugging)
  4993. -q, --unattended stil ingen spørgsmål, installér bare automatisk
  4994. -r, --ddrescue brug alternativ disk-tilgangsmetode (hjælper i tilfælde af en ridset disk)
  4995. -t, --torify Run downloads under torify, if available
  4996. --verify Run (automated) GUI tests for verbs, if available
  4997. -v, --verbose vis alle kommandoer som de bliver udført
  4998. -V, --version vis programversionen og afslut
  4999. -h --help vis denne besked og afslut
  5000. Diverse verber:
  5001. list vis en liste over alle verber
  5002. list-all list all categories and their verbs
  5003. apps list list verbs in category 'applications'
  5004. benchmarks list list verbs in category 'benchmarks'
  5005. dlls list list verbs in category 'dlls'
  5006. fonts list list verbs in category 'fonts'
  5007. settings list list verbs in category 'settings'
  5008. list-cached vis en liste over verber for allerede-hentede installationsprogrammer
  5009. list-download vis en liste over verber for programmer der kan hentes
  5010. list-manual-download list applications which can be downloaded with some help from the user
  5011. list-installed list already-installed applications
  5012. arch=32|64 create wineprefix with 32 or 64 bit, this option must be
  5013. given before prefix=foobar and will not work in case of
  5014. the default wineprefix.
  5015. prefix=foobar select WINEPREFIX=${W_PREFIXES_ROOT}/foobar
  5016. annihilate Delete ALL DATA AND APPLICATIONS INSIDE THIS WINEPREFIX
  5017. _EOF_
  5018. ;;
  5019. de*)
  5020. cat <<_EOF_
  5021. Benutzung: $0 [options] [Kommando|Verb|Pfad-zu-Verb] ...
  5022. Angegebene Verben ausführen.
  5023. Jedes Verb installiert eine Anwendung oder ändert eine Einstellung.
  5024. Optionen:
  5025. --country=CC Ländercode auf CC setzen und IP Adresse nicht auslesen
  5026. -f, --force Nicht prüfen ob Pakete bereits installiert wurden
  5027. --gui GUI Diagnosen anzeigen, auch wenn von der Kommandozeile gestartet
  5028. --isolate Jedes Programm oder Spiel in eigener Bottle (WINEPREFIX) installieren
  5029. --self-update Dieses Programm auf die neueste Version aktualisieren
  5030. --update-rollback Rollback des letzten Self Update
  5031. -k, --keep_isos ISOs local speichern (erlaubt spätere Installation ohne Disk)
  5032. --no-clean Temp Verzeichnisse nicht löschen (nützlich beim debuggen)
  5033. -q, --unattended Keine Fragen stellen, alles automatisch installieren
  5034. -r, --ddrescue Alternativer Zugriffsmodus (hilft bei zerkratzten Disks)
  5035. -t --torify Wenn möglich Downloads unter torify ausführen
  5036. --verify Wenn möglich automatische GUI Tests für Verben starten
  5037. -v, --verbose Alle ausgeführten Kommandos anzeigen
  5038. -h, --help Diese Hilfemeldung anzeigen
  5039. -V, --version Programmversion anzeigen und Beenden
  5040. Kommandos:
  5041. list Kategorien auflisten
  5042. list-all Alle Kategorien und deren Verben auflisten
  5043. apps list Verben der Kategorie 'Anwendungen' auflisten
  5044. benchmarks list Verben der Kategorie 'Benchmarks' auflisten
  5045. dlls list Verben der Kategorie 'DLLs' auflisten
  5046. fonts list list verbs in category 'fonts'
  5047. settings list Verben der Kategorie 'Einstellungen' auflisten
  5048. list-cached Verben für bereits gecachte Installers auflisten
  5049. list-download Verben für automatisch herunterladbare Anwendungen auflisten
  5050. list-manual-download Verben für vom Benutzer herunterladbare Anwendungen auflisten
  5051. list-installed Bereits installierte Verben auflisten
  5052. arch=32|64 Neues wineprefix mit 32 oder 64 bit erstellen, diese Option
  5053. muss vor prefix=foobar angegeben werden und funktioniert
  5054. nicht im Falle des Standard Wineprefix.
  5055. prefix=foobar WINEPREFIX=${W_PREFIXES_ROOT}/foobar auswählen
  5056. annihilate ALLE DATEIEN UND PROGRAMME IN DIESEM WINEPREFIX Löschen
  5057. _EOF_
  5058. ;;
  5059. *)
  5060. cat <<_EOF_
  5061. Usage: $0 [options] [command|verb|path-to-verb] ...
  5062. Executes given verbs. Each verb installs an application or changes a setting.
  5063. Options:
  5064. --country=CC Set country code to CC and don't detect your IP address
  5065. -f, --force Don't check whether packages were already installed
  5066. --gui Show gui diagnostics even when driven by commandline
  5067. --gui=OPT Set OPT to kdialog or zenity to override GUI engine
  5068. --isolate Install each app or game in its own bottle (WINEPREFIX)
  5069. --self-update Update this application to the last version
  5070. --update-rollback Rollback the last self update
  5071. -k, --keep_isos Cache isos (allows later installation without disc)
  5072. --no-clean Don't delete temp directories (useful during debugging)
  5073. --optin Opt in to reporting which verbs you use to the Winetricks maintainers
  5074. --optout Opt out of reporting which verbs you use to the Winetricks maintainers
  5075. -q, --unattended Don't ask any questions, just install automatically
  5076. -r, --ddrescue Retry hard when caching scratched discs
  5077. -t --torify Run downloads under torify, if available
  5078. --verify Run (automated) GUI tests for verbs, if available
  5079. -v, --verbose Echo all commands as they are executed
  5080. -h, --help Display this message and exit
  5081. -V, --version Display version and exit
  5082. Commands:
  5083. list list categories
  5084. list-all list all categories and their verbs
  5085. apps list list verbs in category 'applications'
  5086. benchmarks list list verbs in category 'benchmarks'
  5087. dlls list list verbs in category 'dlls'
  5088. fonts list list verbs in category 'fonts'
  5089. settings list list verbs in category 'settings'
  5090. list-cached list cached-and-ready-to-install verbs
  5091. list-download list verbs which download automatically
  5092. list-manual-download list verbs which download with some help from the user
  5093. list-installed list already-installed verbs
  5094. arch=32|64 create wineprefix with 32 or 64 bit, this option must be
  5095. given before prefix=foobar and will not work in case of
  5096. the default wineprefix.
  5097. prefix=foobar select WINEPREFIX=${W_PREFIXES_ROOT}/foobar
  5098. annihilate Delete ALL DATA AND APPLICATIONS INSIDE THIS WINEPREFIX
  5099. _EOF_
  5100. ;;
  5101. esac
  5102. }
  5103. winetricks_handle_option()
  5104. {
  5105. case "$1" in
  5106. --country=*) W_COUNTRY="${1##--country=}" ;;
  5107. -f|--force) WINETRICKS_FORCE=1;;
  5108. --gui*) winetricks_detect_gui "${1##--gui=}";;
  5109. -h|--help) winetricks_usage ; exit 0 ;;
  5110. --isolate) WINETRICKS_OPT_SHAREDPREFIX=0 ;;
  5111. -k|--keep_isos) WINETRICKS_OPT_KEEPISOS=1 ;;
  5112. --no-clean) W_OPT_NOCLEAN=1 ;;
  5113. --no-isolate) WINETRICKS_OPT_SHAREDPREFIX=1 ;;
  5114. --optin) WINETRICKS_STATS_REPORT=1;;
  5115. --optout) WINETRICKS_STATS_REPORT=0;;
  5116. -q|--unattended) winetricks_set_unattended 1 ;;
  5117. -r|--ddrescue) WINETRICKS_OPT_DD=ddrescue ;;
  5118. --self-update) winetricks_selfupdate;;
  5119. -t|--torify) WINETRICKS_OPT_TORIFY=1 ;;
  5120. --update-rollback) winetricks_selfupdate_rollback;;
  5121. -v|--verbose) WINETRICKS_OPT_VERBOSE=1 ; set -x;;
  5122. -V|--version) winetricks_print_version ; exit 0;;
  5123. --verify) WINETRICKS_VERIFY=1 ;;
  5124. -vv|--really-verbose) WINETRICKS_OPT_VERBOSE=2 ; set -x ;;
  5125. -*) w_die "unknown option $1" ;;
  5126. prefix=*) export WINEPREFIX="${W_PREFIXES_ROOT}/${1##prefix=}" ;;
  5127. *) return "${FALSE}" ;;
  5128. esac
  5129. return "${TRUE}"
  5130. }
  5131. # Test whether temporary directory is valid - before initialising script
  5132. [ -d "${W_TMP_EARLY}" ] || w_die "temporary directory: '${W_TMP_EARLY}' ; does not exist"
  5133. [ -w "${W_TMP_EARLY}" ] || w_die "temporary directory: '${W_TMP_EARLY}' ; is not user writeable"
  5134. # Must initialize variables before calling w_metadata
  5135. if ! test "${WINETRICKS_LIB}"; then
  5136. WINETRICKS_SRCDIR=$(dirname "$0")
  5137. WINETRICKS_SRCDIR=$(w_try_cd "${WINETRICKS_SRCDIR}"; pwd)
  5138. # Which GUI helper to use (none/zenity/kdialog). See winetricks_detect_gui.
  5139. WINETRICKS_GUI=none
  5140. # Default to a shared prefix:
  5141. WINETRICKS_OPT_SHAREDPREFIX=${WINETRICKS_OPT_SHAREDPREFIX:-1}
  5142. # Handle options before init, to avoid starting wine for --help or --version
  5143. while winetricks_handle_option "$1"; do
  5144. shift
  5145. done
  5146. # Super gross, but I couldn't find a cleaner way. This needs to be set for the list verbs (maybe others)
  5147. # while also supporting `dlls list` (etc.)
  5148. # This used by w_metadata() to skip checking installed files if wine isn't available/needed
  5149. if echo "$*" | grep -v list-installed | grep -q -w list; then
  5150. export _W_wine_not_needed=1
  5151. fi
  5152. # Workaround for https://github.com/Winetricks/winetricks/issues/599
  5153. # If --isolate is used, pass verb to winetricks_init, so it can set the wineprefix using winetricks_set_wineprefix()
  5154. # Otherwise, an arch mismatch between ${WINEPREFIX:-$HOME/.wine} and the prefix to be made for the isolated app would cause it to fail
  5155. case ${WINETRICKS_OPT_SHAREDPREFIX} in
  5156. 0) winetricks_init "$1" ;;
  5157. *) winetricks_init ;;
  5158. esac
  5159. fi
  5160. winetricks_install_app()
  5161. {
  5162. case ${LANG} in
  5163. bg*) fail_msg="Инсталирането на пакета $1 е неуспешно" ;;
  5164. da*) fail_msg="Installationen af pakken $1 fejlede" ;;
  5165. de*) fail_msg="Installieren von Paket $1 gescheitert" ;;
  5166. pl*) fail_msg="Niepowodzenie przy instalacji paczki $1" ;;
  5167. pt*) fail_msg="Falha ao instalar o pacote $1" ;;
  5168. ru*) fail_msg="Ошибка установки пакета $1" ;;
  5169. uk*) fail_msg="Помилка встановлення пакунка $1" ;;
  5170. zh_CN*) fail_msg="$1 安装失败" ;;
  5171. zh_TW*|zh_HK*) fail_msg="$1 安裝失敗" ;;
  5172. *) fail_msg="Failed to install package $1" ;;
  5173. esac
  5174. # FIXME: initialize a new wineprefix for this app, set lots of global variables
  5175. if ! w_do_call "$1" "$2"; then
  5176. w_die "${fail_msg}"
  5177. fi
  5178. }
  5179. winetricks_verify()
  5180. {
  5181. "verify_${cmd}" 2>/dev/null
  5182. verify_status=$?
  5183. case ${verify_status} in
  5184. 0) w_warn "verify_${cmd} succeeded!" ;;
  5185. 127) echo "verify_${cmd} not found, not verifying ${cmd}" ;;
  5186. *) w_die "verify_${cmd} failed!" ;;
  5187. esac
  5188. }
  5189. #---- Builtin Verbs ----
  5190. #----------------------------------------------------------------
  5191. # Runtimes
  5192. #----------------------------------------------------------------
  5193. #----- common download for several verbs
  5194. # Note: please put a file list $(cabextract -l $foo) / $(unzip -l $foo) at ./misc/filelists/${helper}.txt
  5195. # Filelist at ./misc/filelists/directx-feb2010.txt
  5196. helper_directx_dl()
  5197. {
  5198. # February 2010 DirectX 9c User Redistributable
  5199. # https://www.microsoft.com/en-us/download/details.aspx?id=9033
  5200. # FIXME: none of the verbs that use this will show download status right
  5201. # until file1 metadata is extended to handle common cache dir
  5202. # 2021/01/28: https://download.microsoft.com/download/E/E/1/EE17FF74-6C45-4575-9CF4-7FC2597ACD18/directx_feb2010_redist.exe
  5203. w_download_to directx9 https://files.holarse-linuxgaming.de/mirrors/microsoft/directx_feb2010_redist.exe f6d191e89a963d7cca34f169d30f49eab99c1ed3bb92da73ec43617caaa1e93f
  5204. DIRECTX_NAME=directx_feb2010_redist.exe
  5205. }
  5206. # Filelist at ./misc/filelists/directx-jun2010.txt
  5207. helper_directx_Jun2010()
  5208. {
  5209. # June 2010 DirectX 9c User Redistributable
  5210. # https://www.microsoft.com/en-us/download/details.aspx?id=8109
  5211. # 2021/01/28: https://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe
  5212. w_download_to directx9 https://files.holarse-linuxgaming.de/mirrors/microsoft/directx_Jun2010_redist.exe 8746ee1a84a083a90e37899d71d50d5c7c015e69688a466aa80447f011780c0d
  5213. DIRECTX_NAME=directx_Jun2010_redist.exe
  5214. }
  5215. # Filelist at ./misc/filelists/directx-jun2010.txt
  5216. helper_d3dx9_xx()
  5217. {
  5218. dllname=d3dx9_$1
  5219. helper_directx_Jun2010
  5220. # Even kinder, less invasive directx - only extract and override d3dx9_xx.dll
  5221. w_try_cabextract -d "${W_TMP}" -L -F "*${dllname}*x86*" "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5222. for x in "${W_TMP}"/*.cab; do
  5223. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F "${dllname}.dll" "${x}"
  5224. done
  5225. if test "${W_ARCH}" = "win64"; then
  5226. w_try_cabextract -d "${W_TMP}" -L -F "*${dllname}*x64*" "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5227. for x in "${W_TMP}"/*x64.cab; do
  5228. w_try_cabextract -d "${W_SYSTEM64_DLLS}" -L -F "${dllname}.dll" "${x}"
  5229. done
  5230. fi
  5231. w_override_dlls native "${dllname}"
  5232. }
  5233. # Filelist at ./misc/filelists/vb6sp6.txt
  5234. helper_vb6sp6()
  5235. {
  5236. # $1 - directory to extract to
  5237. # $2 .. $n - files to extract from the archive
  5238. destdir="$1"
  5239. shift
  5240. w_download_to vb6sp6 https://download.microsoft.com/download/5/6/3/5635D6A9-885E-4C80-A2E7-8A7F4488FBF1/VB60SP6-KB2708437-x86-ENU.msi 350602b2e084b39c97d1394c8594b18e41ef622315d4a9635c5e8ea6aa977b5e
  5241. w_try_7z "${destdir}" "${W_CACHE}"/vb6sp6/VB60SP6-KB2708437-x86-ENU.msi "$@"
  5242. }
  5243. # Filelist at ./misc/filelists/win2ksp4.txt
  5244. helper_win2ksp4()
  5245. {
  5246. filename=$1
  5247. # Originally at https://www.microsoft.com/en-us/download/details.aspx?id=4127
  5248. # Mirror list at http://www.filewatcher.com/m/w2ksp4_en.exe.135477136-0.html
  5249. # This URL doesn't need rename from w2ksp4_en.exe to W2KSP4_EN.EXE
  5250. # to avoid users having to redownload for a file rename
  5251. # 2020/12/09: https://ftp.gnome.org/mirror/archive/ftp.sunet.se/pub/security/vendor/microsoft/win2000/Service_Packs/usa/W2KSP4_EN.EXE
  5252. w_download_to win2ksp4 http://x3270.bgp.nu/download/specials/W2KSP4_EN.EXE 167bb78d4adc957cc39fb4902517e1f32b1e62092353be5f8fb9ee647642de7e
  5253. w_try_cabextract -d "${W_TMP}" -L -F "${filename}" "${W_CACHE}"/win2ksp4/W2KSP4_EN.EXE
  5254. }
  5255. # Filelist at ./misc/filelists/winxpsp2_support_tools.txt
  5256. helper_winxpsp2_support_tools()
  5257. {
  5258. filename="$1"
  5259. # https://www.microsoft.com/en-us/download/details.aspx?id=18546
  5260. w_download_to winxpsp2_support_tools https://web.archive.org/web/20070104163903/https://download.microsoft.com/download/d/3/8/d38066aa-4e37-4ae8-bce3-a4ce662b2024/WindowsXP-KB838079-SupportTools-ENU.exe 7927e87af616d2fb8d4ead0db0103eb845a4e6651b20a5bffea9eebc3035c24d
  5261. w_try_cabextract -d "${W_TMP}" -L -F support.cab "${W_CACHE}"/winxpsp2_support_tools/WindowsXP-KB838079-SupportTools-ENU.exe
  5262. w_try_cabextract -d "${W_TMP}" -L -F "${filename}" "${W_TMP}"/support.cab
  5263. }
  5264. # Filelist at ./misc/filelists/winxpsp3.txt
  5265. helper_winxpsp3()
  5266. {
  5267. filename=$1
  5268. # Formerly at:
  5269. # https://www.microsoft.com/en-us/download/details.aspx?id=24
  5270. # https://download.microsoft.com/download/d/3/0/d30e32d8-418a-469d-b600-f32ce3edf42d/WindowsXP-KB936929-SP3-x86-ENU.exe
  5271. # Mirror list: http://www.filewatcher.com/m/WindowsXP-KB936929-SP3-x86-ENU.exe.331805736-0.html
  5272. # 2018/04/04: http://www.download.windowsupdate.com/msdownload/update/software/dflt/2008/04/windowsxp-kb936929-sp3-x86-enu_c81472f7eeea2eca421e116cd4c03e2300ebfde4.exe
  5273. # 2020/12/09: https://ftp.gnome.org/mirror/archive/ftp.sunet.se/pub/security/vendor/microsoft/winxp/Service_Packs/WindowsXP-KB936929-SP3-x86-ENU.exe
  5274. w_download_to winxpsp3 http://www.download.windowsupdate.com/msdownload/update/software/dflt/2008/04/windowsxp-kb936929-sp3-x86-enu_c81472f7eeea2eca421e116cd4c03e2300ebfde4.exe 62e524a552db9f6fd22d469010ea4d7e28ee06fa615a1c34362129f808916654 WindowsXP-KB936929-SP3-x86-ENU.exe
  5275. w_try_cabextract -d "${W_TMP}" -L -F "${filename}" "${W_CACHE}"/winxpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe
  5276. }
  5277. # Filelist at ./misc/filelists/win7sp1.txt
  5278. helper_win7sp1()
  5279. {
  5280. filename=$1
  5281. # Formerly at:
  5282. # https://www.microsoft.com/en-us/download/details.aspx?id=5842
  5283. # 2020/08/27: https://download.microsoft.com/download/0/A/F/0AFB5316-3062-494A-AB78-7FB0D4461357/windows6.1-KB976932-X86.exe
  5284. w_download_to win7sp1 http://download.windowsupdate.com/msdownload/update/software/svpk/2011/02/windows6.1-kb976932-x86_c3516bc5c9e69fee6d9ac4f981f5b95977a8a2fa.exe e5449839955a22fc4dd596291aff1433b998f9797e1c784232226aba1f8abd97 windows6.1-KB976932-X86.exe
  5285. w_try_cabextract -d "${W_TMP}" -L -F "${filename}" "${W_CACHE}"/win7sp1/windows6.1-KB976932-X86.exe
  5286. }
  5287. # Filelist at ./misc/filelists/win7sp1_x64.txt
  5288. helper_win7sp1_x64()
  5289. {
  5290. filename=$1
  5291. # Formerly at:
  5292. # https://www.microsoft.com/en-us/download/details.aspx?id=5842
  5293. # 2020/08/27: https://download.microsoft.com/download/0/A/F/0AFB5316-3062-494A-AB78-7FB0D4461357/windows6.1-KB976932-X64.exe
  5294. w_download_to win7sp1 http://download.windowsupdate.com/msdownload/update/software/svpk/2011/02/windows6.1-kb976932-x64_74865ef2562006e51d7f9333b4a8d45b7a749dab.exe f4d1d418d91b1619688a482680ee032ffd2b65e420c6d2eaecf8aa3762aa64c8 windows6.1-KB976932-X64.exe
  5295. w_try_cabextract -d "${W_TMP}" -L -F "${filename}" "${W_CACHE}"/win7sp1/windows6.1-KB976932-X64.exe
  5296. }
  5297. #######################
  5298. # dlls
  5299. #######################
  5300. #---------------------------------------------------------
  5301. w_metadata amstream dlls \
  5302. title="MS amstream.dll" \
  5303. publisher="Microsoft" \
  5304. year="2011" \
  5305. media="download" \
  5306. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  5307. installed_file1="${W_SYSTEM32_DLLS_WIN}/amstream.dll"
  5308. load_amstream()
  5309. {
  5310. helper_win7sp1 x86_microsoft-windows-directshow-other_31bf3856ad364e35_6.1.7601.17514_none_0f58f1e53efca91e/amstream.dll
  5311. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-directshow-other_31bf3856ad364e35_6.1.7601.17514_none_0f58f1e53efca91e/amstream.dll" "${W_SYSTEM32_DLLS}/amstream.dll"
  5312. w_override_dlls native,builtin amstream
  5313. w_try_regsvr amstream.dll
  5314. if [ "${W_ARCH}" = "win64" ]; then
  5315. helper_win7sp1_x64 amd64_microsoft-windows-directshow-other_31bf3856ad364e35_6.1.7601.17514_none_6b778d68f75a1a54/amstream.dll
  5316. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-directshow-other_31bf3856ad364e35_6.1.7601.17514_none_6b778d68f75a1a54/amstream.dll" "${W_SYSTEM64_DLLS}/amstream.dll"
  5317. w_try_regsvr64 amstream.dll
  5318. fi
  5319. }
  5320. #----------------------------------------------------------------
  5321. w_metadata art2kmin dlls \
  5322. title="MS Access 2000 runtime" \
  5323. publisher="Microsoft" \
  5324. year="2000" \
  5325. media="download" \
  5326. file1="art2kmin.exe" \
  5327. installed_file1="${W_COMMONFILES_X86_WIN}/Microsoft Shared/MSDesigners98/MDT2DBNS.DLL"
  5328. load_art2kmin()
  5329. {
  5330. w_download http://download.microsoft.com/download/office2000dev/art2kmin/1/win98/en-us/art2kmin.exe c6bf34dfac8d22b5d4ba8a4b14256dc25215f1ce769049c7f25c40850b5e5b81
  5331. w_try_7z "${W_TMP}" "${W_CACHE}/${W_PACKAGE}"/art2kmin.exe
  5332. w_try_cd "${W_TMP}"
  5333. w_try "${WINE}" Setup.exe INSTALLPFILES=1 /wait ${W_OPT_UNATTENDED:+/q}
  5334. }
  5335. w_metadata art2k7min dlls \
  5336. title="MS Access 2007 runtime" \
  5337. publisher="Microsoft" \
  5338. year="2007" \
  5339. media="download" \
  5340. file1="AccessRuntime.exe" \
  5341. installed_file1="${W_COMMONFILES_X86_WIN}/Microsoft Shared/OFFICE12/ACEES.DLL"
  5342. load_art2k7min()
  5343. {
  5344. # See https://www.microsoft.com/en-us/download/details.aspx?id=4438
  5345. # Originally at https://download.microsoft.com/download/D/2/A/D2A2FC8B-0447-491C-A5EF-E8AA3A74FB98/AccessRuntime.exe
  5346. # 2019/11/22: moved to https://www.fmsinc.com/microsoftaccess/runtime/AccessRuntime2007.exe
  5347. w_download https://www.fmsinc.com/microsoftaccess/runtime/AccessRuntime2007.exe a00a92fdc4ddc0dcf5d1964214a8d7e4c61bb036908a4b43b3700063eda9f4fb AccessRuntime.exe
  5348. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  5349. w_try "${WINE}" AccessRuntime.exe ${W_OPT_UNATTENDED:+/q}
  5350. }
  5351. #----------------------------------------------------------------
  5352. w_metadata atmlib dlls \
  5353. title="Adobe Type Manager" \
  5354. publisher="Adobe" \
  5355. year="2009" \
  5356. media="download" \
  5357. file1="../win2ksp4/W2KSP4_EN.EXE" \
  5358. installed_file1="${W_SYSTEM32_DLLS_WIN}/atmlib.dll"
  5359. load_atmlib()
  5360. {
  5361. helper_win2ksp4 i386/atmlib.dl_
  5362. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/atmlib.dl_
  5363. }
  5364. #----------------------------------------------------------------
  5365. w_metadata avifil32 dlls \
  5366. title="MS avifil32" \
  5367. publisher="Microsoft" \
  5368. year="2004" \
  5369. media="download" \
  5370. file1="../winxpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  5371. installed_file1="${W_SYSTEM32_DLLS_WIN}/avifil32.dll"
  5372. load_avifil32()
  5373. {
  5374. helper_winxpsp3 i386/avifil32.dl_
  5375. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/avifil32.dl_
  5376. w_override_dlls native avifil32
  5377. }
  5378. #----------------------------------------------------------------
  5379. w_metadata cabinet dlls \
  5380. title="Microsoft cabinet.dll" \
  5381. publisher="Microsoft" \
  5382. year="2002" \
  5383. media="download" \
  5384. file1="MDAC_TYP.EXE" \
  5385. installed_file1="${W_SYSTEM32_DLLS_WIN}/cabinet.dll"
  5386. load_cabinet()
  5387. {
  5388. # https://www.microsoft.com/downloads/en/details.aspx?FamilyId=9AD000F2-CAE7-493D-B0F3-AE36C570ADE8&displaylang=en
  5389. # Originally at: https://download.microsoft.com/download/3/b/f/3bf74b01-16ba-472d-9a8c-42b2b4fa0d76/mdac_typ.exe
  5390. # Mirror list: http://www.filewatcher.com/m/MDAC_TYP.EXE.5389224-0.html (5.14 MB MDAC_TYP.EXE)
  5391. # 2018/08/09: ftp.gunadarma.ac.id is dead, moved to archive.org
  5392. w_download https://web.archive.org/web/20060718123742/http://ftp.gunadarma.ac.id/pub/driver/itegno/USB%20Software/MDAC/MDAC_TYP.EXE 36d2a3099e6286ae3fab181a502a95fbd825fa5ddb30bf09b345abc7f1f620b4
  5393. w_try_cabextract --directory="${W_TMP}" "${W_CACHE}/${W_PACKAGE}/${file1}"
  5394. w_try_cp_dll "${W_TMP}/cabinet.dll" "${W_SYSTEM32_DLLS}/cabinet.dll"
  5395. w_override_dlls native,builtin cabinet
  5396. }
  5397. #----------------------------------------------------------------
  5398. w_metadata cmd dlls \
  5399. title="MS cmd.exe" \
  5400. publisher="Microsoft" \
  5401. year="2004" \
  5402. media="download" \
  5403. file1="Q811493_W2K_SP4_X86_EN.exe" \
  5404. installed_file1="${W_SYSTEM32_DLLS_WIN}/cmd.exe"
  5405. load_cmd()
  5406. {
  5407. w_download https://web.archive.org/web/20150526022037/http://download.microsoft.com/download/8/d/c/8dc79965-dfbc-4b25-9546-e23bc4b791c6/Q811493_W2K_SP4_X86_EN.exe b5574b3516a724c2cba0d864162a3d1d684db1cf30de8db4b0e0ea6a1f6f1480
  5408. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_CACHE}/${W_PACKAGE}/${file1}" -F cmd.exe
  5409. w_override_dlls native,builtin cmd.exe
  5410. }
  5411. #----------------------------------------------------------------
  5412. w_metadata cnc_ddraw dlls \
  5413. title="Reimplentation of ddraw for CnC games" \
  5414. homepage="https://github.com/CnCNet/cnc-ddraw" \
  5415. publisher="CnCNet" \
  5416. year="2021" \
  5417. media="download" \
  5418. file1="cnc-ddraw-v5.0.0.0.zip" \
  5419. installed_file1="${W_SYSTEM32_DLLS_WIN}/Shaders/readme.txt"
  5420. load_cnc_ddraw()
  5421. {
  5422. # Note: only works if ddraw.ini contains settings for the executable
  5423. w_download https://github.com/CnCNet/cnc-ddraw/releases/download/v5.0.0.0/cnc-ddraw.zip 9f37010bf87aafbe3d97a95f4253460a8f0869fb52bb45bcffbb73182b4b00fe cnc-ddraw-v5.0.0.0.zip
  5424. w_try_unzip "${W_SYSTEM32_DLLS}" "${W_CACHE}/${W_PACKAGE}/${file1}"
  5425. w_override_dlls native,builtin ddraw
  5426. }
  5427. #----------------------------------------------------------------
  5428. w_metadata comctl32 dlls \
  5429. title="MS common controls 5.80" \
  5430. publisher="Microsoft" \
  5431. year="2001" \
  5432. media="download" \
  5433. file1="CC32inst.exe" \
  5434. installed_file1="${W_SYSTEM32_DLLS_WIN}/comctl32.dll"
  5435. load_comctl32()
  5436. {
  5437. # Microsoft has removed. Mirrors can be found at http://www.filewatcher.com/m/CC32inst.exe.587496-0.html
  5438. # 2011/01/17: https://www.microsoft.com/en-us/download/details.aspx?id=14672
  5439. # 2012/08/11: w_download https://download.microsoft.com/download/platformsdk/redist/5.80.2614.3600/w9xnt4/en-us/cc32inst.exe d68c0cca721870aed39f5f2efd80dfb74f3db66d5f9a49e7578b18279edfa4a7
  5440. # 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
  5441. # 2017/03/12: w_download https://downloads.sourceforge.net/project/pocmin/Win%2095_98%20Controls/Win%2095_98%20Controls/CC32inst.exe
  5442. w_download https://downloads.sourceforge.net/project/pocmin/Win%2095_98%20Controls/Win%2095_98%20Controls/CC32inst.exe d68c0cca721870aed39f5f2efd80dfb74f3db66d5f9a49e7578b18279edfa4a7
  5443. w_try "${WINE}" "${W_CACHE}/${W_PACKAGE}/${file1}" "/T:${W_TMP_WIN}" /c ${W_OPT_UNATTENDED:+/q}
  5444. w_try_unzip "${W_TMP}" "${W_TMP}"/comctl32.exe
  5445. w_try "${WINE}" "${W_TMP}"/x86/50ComUpd.Exe "/T:${W_TMP_WIN}" /c ${W_OPT_UNATTENDED:+/q}
  5446. w_try_cp_dll "${W_TMP}"/comcnt.dll "${W_SYSTEM32_DLLS}"/comctl32.dll
  5447. w_override_dlls native,builtin comctl32
  5448. # some builtin apps don't like native comctl32
  5449. w_override_app_dlls winecfg.exe builtin comctl32
  5450. w_override_app_dlls explorer.exe builtin comctl32
  5451. w_override_app_dlls iexplore.exe builtin comctl32
  5452. }
  5453. #----------------------------------------------------------------
  5454. w_metadata comctl32ocx dlls \
  5455. title="MS comctl32.ocx and mscomctl.ocx, comctl32 wrappers for VB6" \
  5456. publisher="Microsoft" \
  5457. year="2012" \
  5458. media="download" \
  5459. file1="../vb6sp6/VB60SP6-KB2708437-x86-ENU.msi" \
  5460. installed_file1="${W_SYSTEM32_DLLS_WIN}/mscomctl.ocx"
  5461. load_comctl32ocx()
  5462. {
  5463. helper_vb6sp6 "${W_SYSTEM32_DLLS}" comctl32.ocx mscomctl.ocx mscomct2.ocx
  5464. w_try_regsvr comctl32.ocx
  5465. w_try_regsvr mscomctl.ocx
  5466. w_try_regsvr mscomct2.ocx
  5467. }
  5468. #----------------------------------------------------------------
  5469. w_metadata comdlg32ocx dlls \
  5470. title="Common Dialog ActiveX Control for VB6" \
  5471. publisher="Microsoft" \
  5472. year="2012" \
  5473. media="download" \
  5474. file1="../vb6sp6/VB60SP6-KB2708437-x86-ENU.msi" \
  5475. installed_file1="${W_SYSTEM32_DLLS_WIN}/comdlg32.ocx"
  5476. load_comdlg32ocx()
  5477. {
  5478. helper_vb6sp6 "${W_TMP}" ComDlg32.ocx
  5479. w_try mv "${W_TMP}/ComDlg32.ocx" "${W_SYSTEM32_DLLS}/comdlg32.ocx"
  5480. w_try_regsvr comdlg32.ocx
  5481. }
  5482. #----------------------------------------------------------------
  5483. w_metadata crypt32 dlls \
  5484. title="MS crypt32" \
  5485. publisher="Microsoft" \
  5486. year="2004" \
  5487. media="download" \
  5488. file1="../winxpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  5489. installed_file1="${W_SYSTEM32_DLLS_WIN}/crypt32.dll"
  5490. load_crypt32()
  5491. {
  5492. w_call msasn1
  5493. helper_winxpsp3 i386/crypt32.dl_
  5494. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/crypt32.dl_
  5495. w_override_dlls native crypt32
  5496. }
  5497. #----------------------------------------------------------------
  5498. w_metadata binkw32 dlls \
  5499. title="RAD Game Tools binkw32.dll" \
  5500. publisher="RAD Game Tools, Inc." \
  5501. year="2000" \
  5502. media="download" \
  5503. file1="__32-binkw32.dll3.0.0.0.zip" \
  5504. installed_file1="${W_SYSTEM32_DLLS_WIN}/binkw32.dll"
  5505. load_binkw32()
  5506. {
  5507. # Mirror: https://www.dlldump.com/download-dll-files_new.php/dllfiles/B/binkw32.dll/1.0q/download.html
  5508. # sha256sum of the decompressed file: 1fd7ef7873c8a3be7e2f127b306d0d24d7d88e20cf9188894eff87b5af0d495f
  5509. #
  5510. # Zip sha256sum:
  5511. # 2015/12/27: 1d5efda8e4af796319b94034ba67b453cbbfddd81eb7d94fd059b40e237fa75d
  5512. w_download https://web.archive.org/web/20160221223726if_/http://www.down-dll.com/dll/b/__32-binkw32.dll3.0.0.0.zip 1d5efda8e4af796319b94034ba67b453cbbfddd81eb7d94fd059b40e237fa75d
  5513. w_try_unzip "${W_TMP}" "${W_CACHE}"/binkw32/__32-binkw32.dll3.0.0.0.zip
  5514. w_try_cp_dll "${W_TMP}"/binkw32.dll "${W_SYSTEM32_DLLS}"/binkw32.dll
  5515. w_override_dlls native binkw32
  5516. }
  5517. #----------------------------------------------------------------
  5518. w_metadata d3dcompiler_42 dlls \
  5519. title="MS d3dcompiler_42.dll" \
  5520. publisher="Microsoft" \
  5521. year="2010" \
  5522. media="download" \
  5523. file1="../directx9/directx_Jun2010_redist.exe" \
  5524. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dcompiler_42.dll"
  5525. load_d3dcompiler_42()
  5526. {
  5527. dllname=d3dcompiler_42
  5528. helper_directx_Jun2010
  5529. w_try_cabextract -d "${W_TMP}" -L -F "*${dllname}*x86*" "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5530. for x in "${W_TMP}"/*.cab; do
  5531. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F "${dllname}.dll" "${x}"
  5532. done
  5533. if test "${W_ARCH}" = "win64"; then
  5534. w_try_cabextract -d "${W_TMP}" -L -F "*${dllname}*x64*" "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5535. for x in "${W_TMP}"/*x64.cab; do
  5536. w_try_cabextract -d "${W_SYSTEM64_DLLS}" -L -F "${dllname}.dll" "${x}"
  5537. done
  5538. fi
  5539. w_override_dlls native ${dllname}
  5540. }
  5541. #----------------------------------------------------------------
  5542. w_metadata d3dcompiler_43 dlls \
  5543. title="MS d3dcompiler_43.dll" \
  5544. publisher="Microsoft" \
  5545. year="2010" \
  5546. media="download" \
  5547. file1="../directx9/directx_Jun2010_redist.exe" \
  5548. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dcompiler_43.dll"
  5549. load_d3dcompiler_43()
  5550. {
  5551. dllname=d3dcompiler_43
  5552. helper_directx_Jun2010
  5553. w_try_cabextract -d "${W_TMP}" -L -F "*${dllname}*x86*" "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5554. for x in "${W_TMP}"/*.cab; do
  5555. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F "${dllname}.dll" "${x}"
  5556. done
  5557. if test "${W_ARCH}" = "win64"; then
  5558. w_try_cabextract -d "${W_TMP}" -L -F "*${dllname}*x64*" "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5559. for x in "${W_TMP}"/*x64.cab; do
  5560. w_try_cabextract -d "${W_SYSTEM64_DLLS}" -L -F "${dllname}.dll" "${x}"
  5561. done
  5562. fi
  5563. w_override_dlls native ${dllname}
  5564. }
  5565. #----------------------------------------------------------------
  5566. w_metadata d3dcompiler_46 dlls \
  5567. title="MS d3dcompiler_46.dll" \
  5568. publisher="Microsoft" \
  5569. year="2010" \
  5570. media="download" \
  5571. file1="../directx9/directx_Jun2010_redist.exe" \
  5572. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dcompiler_46.dll"
  5573. load_d3dcompiler_46()
  5574. {
  5575. # See https://bugs.winehq.org/show_bug.cgi?id=50350#c13
  5576. w_download http://download.microsoft.com/download/F/1/3/F1300C9C-A120-4341-90DF-8A52509B23AC/standalonesdk/Installers/2630bae9681db6a9f6722366f47d055c.cab
  5577. w_try_cabextract -d "${W_TMP}" -L -F "fil47ed91e900f4b9d9659b66a211b57c39" "${W_CACHE}/${W_PACKAGE}/2630bae9681db6a9f6722366f47d055c.cab"
  5578. w_try mv "${W_TMP}/fil47ed91e900f4b9d9659b66a211b57c39" "${W_SYSTEM32_DLLS}/d3dcompiler_46.dll"
  5579. if [ "${W_ARCH}" = "win64" ]; then
  5580. w_download http://download.microsoft.com/download/F/1/3/F1300C9C-A120-4341-90DF-8A52509B23AC/standalonesdk/Installers/61d57a7a82309cd161a854a6f4619e52.cab
  5581. w_try_cabextract -d "${W_TMP}" -L -F "fil8c20206095817436f8df4a711faee5b7" "${W_CACHE}/${W_PACKAGE}/61d57a7a82309cd161a854a6f4619e52.cab"
  5582. w_try mv "${W_TMP}/fil8c20206095817436f8df4a711faee5b7" "${W_SYSTEM64_DLLS}/d3dcompiler_46.dll"
  5583. fi
  5584. w_override_dlls native d3dcompiler_46
  5585. }
  5586. #----------------------------------------------------------------
  5587. w_metadata d3dcompiler_47 dlls \
  5588. title="MS d3dcompiler_47.dll" \
  5589. publisher="Microsoft" \
  5590. year="FIXME" \
  5591. media="download" \
  5592. file1="FirefoxSetup62.0.3-win32.exe" \
  5593. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dcompiler_47.dll"
  5594. load_d3dcompiler_47()
  5595. {
  5596. # FIXME: would be awesome to find a small download that has both 32/64bit dlls, but this works for now:
  5597. w_download https://download-installer.cdn.mozilla.net/pub/firefox/releases/62.0.3/win32/ach/Firefox%20Setup%2062.0.3.exe "d6edb4ff0a713f417ebd19baedfe07527c6e45e84a6c73ed8c66a33377cc0aca" "FirefoxSetup62.0.3-win32.exe"
  5598. w_try_7z "${W_TMP}/win32" "${W_CACHE}/d3dcompiler_47/FirefoxSetup62.0.3-win32.exe" "core/d3dcompiler_47.dll"
  5599. w_try_cp_dll "${W_TMP}/win32/core/d3dcompiler_47.dll" "${W_SYSTEM32_DLLS}/d3dcompiler_47.dll"
  5600. if [ "${W_ARCH}" = "win64" ]; then
  5601. w_download https://download-installer.cdn.mozilla.net/pub/firefox/releases/62.0.3/win64/ach/Firefox%20Setup%2062.0.3.exe "721977f36c008af2b637aedd3f1b529f3cfed6feb10f68ebe17469acb1934986" "FirefoxSetup62.0.3-win64.exe"
  5602. w_try_7z "${W_TMP}/win64" "${W_CACHE}/d3dcompiler_47/FirefoxSetup62.0.3-win64.exe" "core/d3dcompiler_47.dll"
  5603. w_try_cp_dll "${W_TMP}/win64/core/d3dcompiler_47.dll" "${W_SYSTEM64_DLLS}/d3dcompiler_47.dll"
  5604. fi
  5605. w_override_dlls native d3dcompiler_47
  5606. }
  5607. #----------------------------------------------------------------
  5608. w_metadata d3drm dlls \
  5609. title="MS d3drm.dll" \
  5610. publisher="Microsoft" \
  5611. year="2010" \
  5612. media="download" \
  5613. file1="../directx9/directx_feb2010_redist.exe" \
  5614. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3drm.dll"
  5615. load_d3drm()
  5616. {
  5617. helper_directx_dl
  5618. w_try_cabextract -d "${W_TMP}" -L -F "dxnt.cab" "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5619. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F "d3drm.dll" "${W_TMP}/dxnt.cab"
  5620. w_override_dlls native d3drm
  5621. }
  5622. #----------------------------------------------------------------
  5623. w_metadata d3dx9 dlls \
  5624. title="MS d3dx9_??.dll from DirectX 9 redistributable" \
  5625. publisher="Microsoft" \
  5626. year="2010" \
  5627. media="download" \
  5628. file1="../directx9/directx_Jun2010_redist.exe" \
  5629. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_43.dll"
  5630. load_d3dx9()
  5631. {
  5632. helper_directx_Jun2010
  5633. # Kinder, less invasive directx - only extract and override d3dx9_??.dll
  5634. w_try_cabextract -d "${W_TMP}" -L -F '*d3dx9*x86*' "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5635. for x in "${W_TMP}"/*.cab; do
  5636. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'd3dx9*.dll' "${x}"
  5637. done
  5638. if test "${W_ARCH}" = "win64"; then
  5639. w_try_cabextract -d "${W_TMP}" -L -F '*d3dx9*x64*' "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5640. for x in "${W_TMP}"/*x64.cab; do
  5641. w_try_cabextract -d "${W_SYSTEM64_DLLS}" -L -F 'd3dx9*.dll' "${x}"
  5642. done
  5643. fi
  5644. # For now, not needed, but when Wine starts preferring our builtin dll over native it will be.
  5645. w_override_dlls native d3dx9_24 d3dx9_25 d3dx9_26 d3dx9_27 d3dx9_28 d3dx9_29 d3dx9_30
  5646. w_override_dlls native d3dx9_31 d3dx9_32 d3dx9_33 d3dx9_34 d3dx9_35 d3dx9_36 d3dx9_37
  5647. w_override_dlls native d3dx9_38 d3dx9_39 d3dx9_40 d3dx9_41 d3dx9_42 d3dx9_43
  5648. }
  5649. #----------------------------------------------------------------
  5650. w_metadata d3dx9_24 dlls \
  5651. title="MS d3dx9_24.dll" \
  5652. publisher="Microsoft" \
  5653. year="2010" \
  5654. media="download" \
  5655. file1="../directx9/directx_feb2010_redist.exe" \
  5656. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_24.dll"
  5657. load_d3dx9_24()
  5658. {
  5659. helper_d3dx9_xx 24
  5660. }
  5661. #----------------------------------------------------------------
  5662. w_metadata d3dx9_25 dlls \
  5663. title="MS d3dx9_25.dll" \
  5664. publisher="Microsoft" \
  5665. year="2010" \
  5666. media="download" \
  5667. file1="../directx9/directx_Jun2010_redist.exe" \
  5668. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_25.dll"
  5669. load_d3dx9_25()
  5670. {
  5671. helper_d3dx9_xx 25
  5672. }
  5673. #----------------------------------------------------------------
  5674. w_metadata d3dx9_26 dlls \
  5675. title="MS d3dx9_26.dll" \
  5676. publisher="Microsoft" \
  5677. year="2010" \
  5678. media="download" \
  5679. file1="../directx9/directx_Jun2010_redist.exe" \
  5680. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_26.dll"
  5681. load_d3dx9_26()
  5682. {
  5683. helper_d3dx9_xx 26
  5684. }
  5685. #----------------------------------------------------------------
  5686. w_metadata d3dx9_27 dlls \
  5687. title="MS d3dx9_27.dll" \
  5688. publisher="Microsoft" \
  5689. year="2010" \
  5690. media="download" \
  5691. file1="../directx9/directx_Jun2010_redist.exe" \
  5692. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_27.dll"
  5693. load_d3dx9_27()
  5694. {
  5695. helper_d3dx9_xx 27
  5696. }
  5697. #----------------------------------------------------------------
  5698. w_metadata d3dx9_28 dlls \
  5699. title="MS d3dx9_28.dll" \
  5700. publisher="Microsoft" \
  5701. year="2010" \
  5702. media="download" \
  5703. file1="../directx9/directx_Jun2010_redist.exe" \
  5704. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_28.dll"
  5705. load_d3dx9_28()
  5706. {
  5707. helper_d3dx9_xx 28
  5708. }
  5709. #----------------------------------------------------------------
  5710. w_metadata d3dx9_29 dlls \
  5711. title="MS d3dx9_29.dll" \
  5712. publisher="Microsoft" \
  5713. year="2010" \
  5714. media="download" \
  5715. file1="../directx9/directx_Jun2010_redist.exe" \
  5716. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_29.dll"
  5717. load_d3dx9_29()
  5718. {
  5719. helper_d3dx9_xx 29
  5720. }
  5721. #----------------------------------------------------------------
  5722. w_metadata d3dx9_30 dlls \
  5723. title="MS d3dx9_30.dll" \
  5724. publisher="Microsoft" \
  5725. year="2010" \
  5726. media="download" \
  5727. file1="../directx9/directx_Jun2010_redist.exe" \
  5728. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_30.dll"
  5729. load_d3dx9_30()
  5730. {
  5731. helper_d3dx9_xx 30
  5732. }
  5733. #----------------------------------------------------------------
  5734. w_metadata d3dx9_31 dlls \
  5735. title="MS d3dx9_31.dll" \
  5736. publisher="Microsoft" \
  5737. year="2010" \
  5738. media="download" \
  5739. file1="../directx9/directx_Jun2010_redist.exe" \
  5740. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_31.dll"
  5741. load_d3dx9_31()
  5742. {
  5743. helper_d3dx9_xx 31
  5744. }
  5745. #----------------------------------------------------------------
  5746. w_metadata d3dx9_32 dlls \
  5747. title="MS d3dx9_32.dll" \
  5748. publisher="Microsoft" \
  5749. year="2010" \
  5750. media="download" \
  5751. file1="../directx9/directx_Jun2010_redist.exe" \
  5752. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_32.dll"
  5753. load_d3dx9_32()
  5754. {
  5755. helper_d3dx9_xx 32
  5756. }
  5757. #----------------------------------------------------------------
  5758. w_metadata d3dx9_33 dlls \
  5759. title="MS d3dx9_33.dll" \
  5760. publisher="Microsoft" \
  5761. year="2010" \
  5762. media="download" \
  5763. file1="../directx9/directx_Jun2010_redist.exe" \
  5764. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_33.dll"
  5765. load_d3dx9_33()
  5766. {
  5767. helper_d3dx9_xx 33
  5768. }
  5769. #----------------------------------------------------------------
  5770. w_metadata d3dx9_34 dlls \
  5771. title="MS d3dx9_34.dll" \
  5772. publisher="Microsoft" \
  5773. year="2010" \
  5774. media="download" \
  5775. file1="../directx9/directx_Jun2010_redist.exe" \
  5776. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_34.dll"
  5777. load_d3dx9_34()
  5778. {
  5779. helper_d3dx9_xx 34
  5780. }
  5781. #----------------------------------------------------------------
  5782. w_metadata d3dx9_35 dlls \
  5783. title="MS d3dx9_35.dll" \
  5784. publisher="Microsoft" \
  5785. year="2010" \
  5786. media="download" \
  5787. file1="../directx9/directx_Jun2010_redist.exe" \
  5788. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_35.dll"
  5789. load_d3dx9_35()
  5790. {
  5791. helper_d3dx9_xx 35
  5792. }
  5793. #----------------------------------------------------------------
  5794. w_metadata d3dx9_36 dlls \
  5795. title="MS d3dx9_36.dll" \
  5796. publisher="Microsoft" \
  5797. year="2010" \
  5798. media="download" \
  5799. file1="../directx9/directx_Jun2010_redist.exe" \
  5800. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_36.dll"
  5801. load_d3dx9_36()
  5802. {
  5803. helper_d3dx9_xx 36
  5804. }
  5805. #----------------------------------------------------------------
  5806. w_metadata d3dx9_37 dlls \
  5807. title="MS d3dx9_37.dll" \
  5808. publisher="Microsoft" \
  5809. year="2010" \
  5810. media="download" \
  5811. file1="../directx9/directx_Jun2010_redist.exe" \
  5812. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_37.dll"
  5813. load_d3dx9_37()
  5814. {
  5815. helper_d3dx9_xx 37
  5816. }
  5817. #----------------------------------------------------------------
  5818. w_metadata d3dx9_38 dlls \
  5819. title="MS d3dx9_38.dll" \
  5820. publisher="Microsoft" \
  5821. year="2010" \
  5822. media="download" \
  5823. file1="../directx9/directx_Jun2010_redist.exe" \
  5824. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_38.dll"
  5825. load_d3dx9_38()
  5826. {
  5827. helper_d3dx9_xx 38
  5828. }
  5829. #----------------------------------------------------------------
  5830. w_metadata d3dx9_39 dlls \
  5831. title="MS d3dx9_39.dll" \
  5832. publisher="Microsoft" \
  5833. year="2010" \
  5834. media="download" \
  5835. file1="../directx9/directx_Jun2010_redist.exe" \
  5836. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_39.dll"
  5837. load_d3dx9_39()
  5838. {
  5839. helper_d3dx9_xx 39
  5840. }
  5841. #----------------------------------------------------------------
  5842. w_metadata d3dx9_40 dlls \
  5843. title="MS d3dx9_40.dll" \
  5844. publisher="Microsoft" \
  5845. year="2010" \
  5846. media="download" \
  5847. file1="../directx9/directx_Jun2010_redist.exe" \
  5848. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_40.dll"
  5849. load_d3dx9_40()
  5850. {
  5851. helper_d3dx9_xx 40
  5852. }
  5853. #----------------------------------------------------------------
  5854. w_metadata d3dx9_41 dlls \
  5855. title="MS d3dx9_41.dll" \
  5856. publisher="Microsoft" \
  5857. year="2010" \
  5858. media="download" \
  5859. file1="../directx9/directx_Jun2010_redist.exe" \
  5860. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_41.dll"
  5861. load_d3dx9_41()
  5862. {
  5863. helper_d3dx9_xx 41
  5864. }
  5865. #----------------------------------------------------------------
  5866. w_metadata d3dx9_42 dlls \
  5867. title="MS d3dx9_42.dll" \
  5868. publisher="Microsoft" \
  5869. year="2010" \
  5870. media="download" \
  5871. file1="../directx9/directx_Jun2010_redist.exe" \
  5872. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_42.dll"
  5873. load_d3dx9_42()
  5874. {
  5875. helper_d3dx9_xx 42
  5876. }
  5877. #----------------------------------------------------------------
  5878. w_metadata d3dx9_43 dlls \
  5879. title="MS d3dx9_43.dll" \
  5880. publisher="Microsoft" \
  5881. year="2010" \
  5882. media="download" \
  5883. file1="../directx9/directx_Jun2010_redist.exe" \
  5884. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx9_43.dll"
  5885. load_d3dx9_43()
  5886. {
  5887. helper_d3dx9_xx 43
  5888. }
  5889. #----------------------------------------------------------------
  5890. w_metadata d3dx11_42 dlls \
  5891. title="MS d3dx11_42.dll" \
  5892. publisher="Microsoft" \
  5893. year="2010" \
  5894. media="download" \
  5895. file1="../directx9/directx_Jun2010_redist.exe" \
  5896. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx11_42.dll"
  5897. load_d3dx11_42()
  5898. {
  5899. dllname=d3dx11_42
  5900. helper_directx_Jun2010
  5901. w_try_cabextract -d "${W_TMP}" -L -F "*${dllname}*x86*" "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5902. for x in "${W_TMP}"/*.cab; do
  5903. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F "${dllname}.dll" "${x}"
  5904. done
  5905. if test "${W_ARCH}" = "win64"; then
  5906. w_try_cabextract -d "${W_TMP}" -L -F "*${dllname}*x64*" "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5907. for x in "${W_TMP}"/*x64.cab; do
  5908. w_try_cabextract -d "${W_SYSTEM64_DLLS}" -L -F "${dllname}.dll" "${x}"
  5909. done
  5910. fi
  5911. w_override_dlls native ${dllname}
  5912. }
  5913. #----------------------------------------------------------------
  5914. w_metadata d3dx11_43 dlls \
  5915. title="MS d3dx11_43.dll" \
  5916. publisher="Microsoft" \
  5917. year="2010" \
  5918. media="download" \
  5919. file1="../directx9/directx_Jun2010_redist.exe" \
  5920. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx11_43.dll"
  5921. load_d3dx11_43()
  5922. {
  5923. dllname=d3dx11_43
  5924. helper_directx_Jun2010
  5925. w_try_cabextract -d "${W_TMP}" -L -F "*${dllname}*x86*" "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5926. for x in "${W_TMP}"/*.cab; do
  5927. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F "${dllname}.dll" "${x}"
  5928. done
  5929. if test "${W_ARCH}" = "win64"; then
  5930. w_try_cabextract -d "${W_TMP}" -L -F "*${dllname}*x64*" "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5931. for x in "${W_TMP}"/*x64.cab; do
  5932. w_try_cabextract -d "${W_SYSTEM64_DLLS}" -L -F "${dllname}.dll" "${x}"
  5933. done
  5934. fi
  5935. w_override_dlls native ${dllname}
  5936. }
  5937. #----------------------------------------------------------------
  5938. w_metadata d3dx10 dlls \
  5939. title="MS d3dx10_??.dll from DirectX user redistributable" \
  5940. publisher="Microsoft" \
  5941. year="2010" \
  5942. media="download" \
  5943. file1="../directx9/directx_Jun2010_redist.exe" \
  5944. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx10_33.dll"
  5945. load_d3dx10()
  5946. {
  5947. helper_directx_Jun2010
  5948. # Kinder, less invasive directx10 - only extract and override d3dx10_??.dll
  5949. w_try_cabextract -d "${W_TMP}" -L -F '*d3dx10*x86*' "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5950. for x in "${W_TMP}"/*.cab; do
  5951. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'd3dx10*.dll' "${x}"
  5952. done
  5953. if test "${W_ARCH}" = "win64"; then
  5954. w_try_cabextract -d "${W_TMP}" -L -F '*d3dx10*x64*' "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5955. for x in "${W_TMP}"/*x64.cab; do
  5956. w_try_cabextract -d "${W_SYSTEM64_DLLS}" -L -F 'd3dx10*.dll' "${x}"
  5957. done
  5958. fi
  5959. # For now, not needed, but when Wine starts preferring our built-in DLL over native it will be.
  5960. w_override_dlls native d3dx10_33 d3dx10_34 d3dx10_35 d3dx10_36 d3dx10_37
  5961. w_override_dlls native d3dx10_38 d3dx10_39 d3dx10_40 d3dx10_41 d3dx10_42 d3dx10_43
  5962. }
  5963. #----------------------------------------------------------------
  5964. w_metadata d3dx10_43 dlls \
  5965. title="MS d3dx10_43.dll" \
  5966. publisher="Microsoft" \
  5967. year="2010" \
  5968. media="download" \
  5969. file1="../directx9/directx_Jun2010_redist.exe" \
  5970. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dx10_43.dll"
  5971. load_d3dx10_43()
  5972. {
  5973. dllname=d3dx10_43
  5974. helper_directx_Jun2010
  5975. w_try_cabextract -d "${W_TMP}" -L -F "*${dllname}*x86*" "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5976. for x in "${W_TMP}"/*.cab; do
  5977. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F "${dllname}.dll" "${x}"
  5978. done
  5979. if test "${W_ARCH}" = "win64"; then
  5980. w_try_cabextract -d "${W_TMP}" -L -F "*${dllname}*x64*" "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5981. for x in "${W_TMP}"/*x64.cab; do
  5982. w_try_cabextract -d "${W_SYSTEM64_DLLS}" -L -F "${dllname}.dll" "${x}"
  5983. done
  5984. fi
  5985. w_override_dlls native ${dllname}
  5986. }
  5987. #----------------------------------------------------------------
  5988. w_metadata d3dxof dlls \
  5989. title="MS d3dxof.dll from DirectX user redistributable" \
  5990. publisher="Microsoft" \
  5991. year="2010" \
  5992. media="download" \
  5993. file1="../directx9/directx_feb2010_redist.exe" \
  5994. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3dxof.dll"
  5995. load_d3dxof()
  5996. {
  5997. helper_directx_dl
  5998. w_try_cabextract -d "${W_TMP}" -L -F 'dxnt.cab' "${W_CACHE}"/directx9/${DIRECTX_NAME}
  5999. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'd3dxof.dll' "${W_TMP}/dxnt.cab"
  6000. w_override_dlls native d3dxof
  6001. }
  6002. #----------------------------------------------------------------
  6003. w_metadata dbghelp dlls \
  6004. title="MS dbghelp" \
  6005. publisher="Microsoft" \
  6006. year="2008" \
  6007. media="download" \
  6008. file1="../winxpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  6009. installed_file1="${W_SYSTEM32_DLLS_WIN}/dbghelp.dll"
  6010. load_dbghelp()
  6011. {
  6012. helper_winxpsp3 i386/dbghelp.dll
  6013. w_try_cp_dll "${W_TMP}"/i386/dbghelp.dll "${W_SYSTEM32_DLLS}"
  6014. w_override_dlls native dbghelp
  6015. }
  6016. #----------------------------------------------------------------
  6017. w_metadata devenum dlls \
  6018. title="MS devenum.dll from DirectX user redistributable" \
  6019. publisher="Microsoft" \
  6020. year="2010" \
  6021. media="download" \
  6022. file1="../directx9/directx_feb2010_redist.exe" \
  6023. installed_file1="${W_SYSTEM32_DLLS_WIN}/devenum.dll"
  6024. load_devenum()
  6025. {
  6026. helper_directx_dl
  6027. w_try_cabextract -d "${W_TMP}" -L -F 'dxnt.cab' "${W_CACHE}/directx9/${DIRECTX_NAME}"
  6028. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'devenum.dll' "${W_TMP}/dxnt.cab"
  6029. w_override_dlls native devenum
  6030. w_try_regsvr devenum.dll
  6031. }
  6032. #----------------------------------------------------------------
  6033. w_metadata dinput dlls \
  6034. title="MS dinput.dll; breaks mouse, use only on Rayman 2 etc." \
  6035. publisher="Microsoft" \
  6036. year="2010" \
  6037. media="download" \
  6038. file1="../directx9/directx_feb2010_redist.exe" \
  6039. installed_file1="${W_SYSTEM32_DLLS_WIN}/dinput.dll"
  6040. load_dinput()
  6041. {
  6042. helper_directx_dl
  6043. w_try_cabextract -d "${W_TMP}" -L -F 'dxnt.cab' "${W_CACHE}"/directx9/${DIRECTX_NAME}
  6044. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dinput.dll' "${W_TMP}/dxnt.cab"
  6045. w_override_dlls native dinput
  6046. w_try_regsvr dinput
  6047. }
  6048. #----------------------------------------------------------------
  6049. w_metadata dinput8 dlls \
  6050. title="MS DirectInput 8 from DirectX user redistributable" \
  6051. publisher="Microsoft" \
  6052. year="2010" \
  6053. media="download" \
  6054. file1="../directx9/directx_feb2010_redist.exe" \
  6055. installed_file1="${W_SYSTEM32_DLLS_WIN}/dinput8.dll"
  6056. load_dinput8()
  6057. {
  6058. helper_directx_dl
  6059. w_try_cabextract -d "${W_TMP}" -L -F 'dxnt.cab' "${W_CACHE}"/directx9/${DIRECTX_NAME}
  6060. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dinput8.dll' "${W_TMP}/dxnt.cab"
  6061. # Don't try to register native dinput8; it doesn't export DllRegisterServer().
  6062. #w_try_regsvr32 dinput8
  6063. w_override_dlls native dinput8
  6064. }
  6065. #----------------------------------------------------------------
  6066. w_metadata directmusic dlls \
  6067. title="MS DirectMusic from DirectX user redistributable" \
  6068. publisher="Microsoft" \
  6069. year="2010" \
  6070. media="download" \
  6071. file1="../directx9/directx_feb2010_redist.exe" \
  6072. installed_file1="${W_SYSTEM32_DLLS_WIN}/dmusic.dll"
  6073. load_directmusic()
  6074. {
  6075. # Untested. Based off https://bugs.winehq.org/show_bug.cgi?id=4805 and https://bugs.winehq.org/show_bug.cgi?id=24911
  6076. w_warn "You can specify individual DirectMusic verbs instead. e.g. 'winetricks dmsynth dmusic'"
  6077. w_call dmband
  6078. w_call dmcompos
  6079. w_call dmime
  6080. w_call dmloader
  6081. w_call dmscript
  6082. w_call dmstyle
  6083. w_call dmsynth
  6084. w_call dmusic
  6085. w_call dmusic32
  6086. w_call dsound
  6087. w_call dswave
  6088. # FIXME: dxnt.cab doesn't contain this DLL. Is this really needed?
  6089. w_override_dlls native streamci
  6090. }
  6091. #----------------------------------------------------------------
  6092. w_metadata directshow dlls \
  6093. title="DirectShow runtime DLLs (amstream, qasf, qcap, qdvd, qedit, quartz)" \
  6094. publisher="Microsoft" \
  6095. year="2011" \
  6096. media="download" \
  6097. file1="../win7sp1/windows6.1-KB976932-X86.exe"
  6098. load_directshow()
  6099. {
  6100. w_warn "You can specify individual DirectShow verbs instead. e.g. 'winetricks quartz'"
  6101. w_call amstream
  6102. w_call qasf
  6103. w_call qcap
  6104. w_call qdvd
  6105. w_call qedit
  6106. w_call quartz
  6107. }
  6108. #----------------------------------------------------------------
  6109. w_metadata directplay dlls \
  6110. title="MS DirectPlay from DirectX user redistributable" \
  6111. publisher="Microsoft" \
  6112. year="2010" \
  6113. media="download" \
  6114. file1="../directx9/directx_feb2010_redist.exe" \
  6115. installed_file1="${W_SYSTEM32_DLLS_WIN}/dplayx.dll"
  6116. load_directplay()
  6117. {
  6118. helper_directx_dl
  6119. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  6120. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dplaysvr.exe' "${W_TMP}/dxnt.cab"
  6121. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dplayx.dll' "${W_TMP}/dxnt.cab"
  6122. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dpmodemx.dll' "${W_TMP}/dxnt.cab"
  6123. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dpnet.dll' "${W_TMP}/dxnt.cab"
  6124. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dpnhpast.dll' "${W_TMP}/dxnt.cab"
  6125. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dpnhupnp.dll' "${W_TMP}/dxnt.cab"
  6126. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dpnsvr.exe' "${W_TMP}/dxnt.cab"
  6127. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dpwsockx.dll' "${W_TMP}/dxnt.cab"
  6128. w_override_dlls native dplaysvr.exe dplayx dpmodemx dpnet dpnhpast dpnhupnp dpnsvr.exe dpwsockx
  6129. w_try_regsvr dplayx.dll
  6130. w_try_regsvr dpnet.dll
  6131. w_try_regsvr dpnhpast.dll
  6132. w_try_regsvr dpnhupnp.dll
  6133. }
  6134. #----------------------------------------------------------------
  6135. w_metadata directx9 dlls \
  6136. title="MS DirectX 9 (Deprecated, no-op)" \
  6137. publisher="Microsoft" \
  6138. year="2010" \
  6139. media="download"
  6140. load_directx9()
  6141. {
  6142. # There are 54 as of 2019/04/23, so listing them all (especially in GUI) would be hard.
  6143. # Besides, that would probably encourage people to install more native stuff than necessary.
  6144. w_warn "directx9 is deprecated. Please install individual directx components (e.g., \`$0 d3dx9\`) instead."
  6145. }
  6146. #----------------------------------------------------------------
  6147. w_metadata dpvoice dlls \
  6148. title="Microsoft dpvoice dpvvox dpvacm Audio dlls" \
  6149. publisher="Microsoft" \
  6150. year="2002" \
  6151. media="download" \
  6152. file1="../directx9/directx_feb2010_redist.exe" \
  6153. installed_file1="${W_SYSTEM32_DLLS_WIN}/dpvoice.dll" \
  6154. installed_file2="${W_SYSTEM32_DLLS_WIN}/dpvvox.dll" \
  6155. installed_file2="${W_SYSTEM32_DLLS_WIN}/dpvacm.dll"
  6156. load_dpvoice()
  6157. {
  6158. helper_directx_dl
  6159. w_try_cabextract -d "${W_TMP}" -L -F 'dxnt.cab' "${W_CACHE}"/directx9/${DIRECTX_NAME}
  6160. for x in "${W_TMP}"/*.cab; do
  6161. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dpvoice.dll' "${x}"
  6162. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dpvvox.dll' "${x}"
  6163. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dpvacm.dll' "${x}"
  6164. done
  6165. w_override_dlls native dpvoice dpvvox dpvacm
  6166. w_try_regsvr dpvoice.dll
  6167. w_try_regsvr dpvvox.dll
  6168. w_try_regsvr dpvacm.dll
  6169. }
  6170. #----------------------------------------------------------------
  6171. w_metadata dsdmo dlls \
  6172. title="MS dsdmo.dll" \
  6173. publisher="Microsoft" \
  6174. year="2010" \
  6175. media="download" \
  6176. file1="../directx9/directx_feb2010_redist.exe" \
  6177. installed_file1="${W_SYSTEM32_DLLS_WIN}/dsdmo.dll"
  6178. load_dsdmo()
  6179. {
  6180. helper_directx_dl
  6181. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  6182. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dsdmo.dll' "${W_TMP}/dxnt.cab"
  6183. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dsdmoprp.dll' "${W_TMP}/dxnt.cab"
  6184. w_try_regsvr dsdmo.dll
  6185. w_try_regsvr dsdmoprp.dll
  6186. }
  6187. #----------------------------------------------------------------
  6188. w_metadata dxsdk_aug2006 apps \
  6189. title="MS DirectX SDK, August 2006 (developers only)" \
  6190. publisher="Microsoft" \
  6191. year="2006" \
  6192. media="download" \
  6193. file1="dxsdk_aug2006.exe" \
  6194. installed_file1="${W_PROGRAMS_X86_WIN}/Microsoft DirectX SDK (August 2006)/Lib/x86/d3d10.lib"
  6195. load_dxsdk_aug2006()
  6196. {
  6197. w_download https://archive.org/download/dxsdk_aug2006/dxsdk_aug2006.exe ab8d7d895089a88108d4148ef0f7e214b7a23c1ee9ba720feca78c7d4ca16c00
  6198. # dxview.dll uses mfc42u while registering
  6199. w_call mfc42
  6200. w_try_cabextract "${W_CACHE}/${W_PACKAGE}/${file1}"
  6201. w_try_unzip "${W_TMP}" dxsdk.exe
  6202. w_try_cd "${W_TMP}"
  6203. w_try "${WINE}" msiexec /i Microsoft_DirectX_SDK.msi ${W_OPT_UNATTENDED:+/q}
  6204. }
  6205. #----------------------------------------------------------------
  6206. w_metadata dxsdk_jun2010 apps \
  6207. title="MS DirectX SDK, June 2010 (developers only)" \
  6208. publisher="Microsoft" \
  6209. year="2010" \
  6210. media="download" \
  6211. file1="DXSDK_Jun10.exe" \
  6212. installed_file1="${W_PROGRAMS_X86_WIN}/Microsoft DirectX SDK (June 2010)/Lib/x86/d3d11.lib"
  6213. load_dxsdk_jun2010()
  6214. {
  6215. w_download https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe 9f818a977c32b254af5d649a4cec269ed8762f8a49ae67a9f01101a7237ae61a
  6216. # Without dotnet20, install aborts halfway through
  6217. w_call dotnet20
  6218. w_try_cd "${W_TMP}"
  6219. w_try "${WINE}" "${W_CACHE}"/dxsdk_jun2010/DXSDK_Jun10.exe ${W_OPT_UNATTENDED:+/U}
  6220. }
  6221. #----------------------------------------------------------------
  6222. w_metadata dxtrans dlls \
  6223. title="MS dxtrans.dll" \
  6224. publisher="Microsoft" \
  6225. year="2002" \
  6226. media="download" \
  6227. file1="../winxpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  6228. installed_file1="${W_SYSTEM32_DLLS_WIN}/dxtrans.dll" \
  6229. load_dxtrans()
  6230. {
  6231. helper_winxpsp3 i386/dxtrans.dl_
  6232. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/dxtrans.dl_
  6233. w_override_dlls native,builtin dxtrans
  6234. w_try_regsvr dxtrans.dll
  6235. }
  6236. #----------------------------------------------------------------
  6237. # $1 - dxvk archive name (required)
  6238. # $2 - minimum Wine version (required)
  6239. # $3 - minimum Vulkan API version (required)
  6240. # $4 - [dxgi,][d3d9,][d3d10core,][d3d10,]d3d11 (required)
  6241. helper_dxvk()
  6242. {
  6243. _W_package_archive="${1}"
  6244. _W_min_wine_version="${2}"
  6245. _W_min_vulkan_version="${3}"
  6246. _W_dll_overrides="$(echo "${4}" | sed 's/,/ /g')"
  6247. # dxvk repository, for d3d9/d3d10/d3d11 support
  6248. _W_repository="doitsujin/dxvk"
  6249. _W_supported_overrides="dxgi d3d9 d3d10core d3d10 d3d11"
  6250. _W_invalid_overrides="$(echo "${_W_dll_overrides}" | awk -vvalid_overrides_regex="$(echo "${_W_supported_overrides}" | sed 's/ /|/g')" '{ gsub(valid_overrides_regex,""); sub("[ ]*",""); print $0 }')"
  6251. if [ "${_W_invalid_overrides}" != "" ]; then
  6252. w_die "parameter (4) unsupported dll override: '${_W_invalid_overrides}' ; supported dll overrides: ${_W_supported_overrides}"
  6253. fi
  6254. _W_dll_overrides="$(echo "${_W_dll_overrides}" | sed 's/d3d10 /&d3d10_1 /')"
  6255. _W_package_dir="${_W_package_archive%.tar.gz}"
  6256. _W_package_version="${_W_package_dir#*-}"
  6257. w_warn "Please refer to ${_W_repository#*/} version ${_W_package_version} release notes... See: https://github.com/${_W_repository}/releases/tag/v${_W_package_version}"
  6258. w_warn "Please refer to current dxvk base graphics driver requirements... See: https://github.com/doitsujin/dxvk/wiki/Driver-support"
  6259. if w_wine_version_in ",${_W_min_wine_version}" ; then
  6260. # shellcheck disable=SC2140
  6261. w_warn "${_W_repository#*/} ${_W_package_version} does not support wine version ${_wine_version_stripped} . "\
  6262. "${_W_repository#*/} ${_W_package_version} requires wine version ${_W_min_wine_version} (or newer). "\
  6263. "Vulkan ${_W_min_vulkan_version} API (or newer) support is recommended."
  6264. fi
  6265. if [ "${_W_package_archive##*.}" = "zip" ]; then
  6266. w_try_unzip "${W_TMP}" "${W_CACHE}/${W_PACKAGE}/${_W_package_archive}"
  6267. else
  6268. w_try tar -C "${W_TMP}" -zxf "${W_CACHE}/${W_PACKAGE}/${_W_package_archive}"
  6269. fi
  6270. for _W_dll in ${_W_dll_overrides}; do
  6271. w_try mv "${W_TMP}/${_W_package_dir}/x32/${_W_dll}.dll" "${W_SYSTEM32_DLLS}/"
  6272. [ "${_W_dll}" = "d3d9" ] && _W_d3d9_support="1"
  6273. done
  6274. if test "${W_ARCH}" = "win64"; then
  6275. for _W_dll in ${_W_dll_overrides}; do
  6276. w_try mv "${W_TMP}/${_W_package_dir}/x64/${_W_dll}.dll" "${W_SYSTEM64_DLLS}/"
  6277. done
  6278. fi
  6279. # shellcheck disable=SC2086
  6280. w_override_dlls native ${_W_dll_overrides}
  6281. if [ -n "${_W_d3d9_support}" ]; then
  6282. w_call d3dcompiler_43
  6283. w_call d3dx9
  6284. fi
  6285. w_call d3dcompiler_47
  6286. unset _W_d3d9_support _W_dll _W_dll_overrides _W_invalid_overrides _W_min_vulkan_version _W_min_wine_version \
  6287. _W_package_archive _W_package_dir _W_package_version \
  6288. _W_repository _W_supported_overrides
  6289. }
  6290. #----------------------------------------------------------------
  6291. w_metadata dxvk0054 dlls \
  6292. title="Vulkan-based D3D11 implementation for Linux / Wine (0.54)" \
  6293. publisher="Philip Rebohle" \
  6294. year="2017" \
  6295. media="download" \
  6296. file1="dxvk-0.54.tar.gz" \
  6297. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6298. installed_file2="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6299. load_dxvk0054()
  6300. {
  6301. # https://github.com/doitsujin/dxvk
  6302. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.54/dxvk-0.54.tar.gz" 1c2f186baaa01d2de7b832f6f05021bdd29eccb65fc197c8b15adfd4e08f9640
  6303. helper_dxvk "${file1}" "3.10" "1.1.72" "dxgi,d3d11"
  6304. }
  6305. w_metadata dxvk0060 dlls \
  6306. title="Vulkan-based D3D11 implementation for Linux / Wine (0.60)" \
  6307. publisher="Philip Rebohle" \
  6308. year="2017" \
  6309. media="download" \
  6310. file1="dxvk-0.60.tar.gz" \
  6311. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6312. installed_file2="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6313. load_dxvk0060()
  6314. {
  6315. # https://github.com/doitsujin/dxvk
  6316. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.60/dxvk-0.60.tar.gz" 27d6f700241d3ec3b6c002c3d739bb0e3f210ec916ecb5a62d9204e9e50f2c4a
  6317. helper_dxvk "${file1}" "3.10" "1.1.72" "dxgi,d3d11"
  6318. }
  6319. w_metadata dxvk0061 dlls \
  6320. title="Vulkan-based D3D11 implementation for Linux / Wine (0.61)" \
  6321. publisher="Philip Rebohle" \
  6322. year="2017" \
  6323. media="download" \
  6324. file1="dxvk-0.61.tar.gz" \
  6325. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6326. installed_file2="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6327. load_dxvk0061()
  6328. {
  6329. # https://github.com/doitsujin/dxvk
  6330. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.61/dxvk-0.61.tar.gz" d04388f026dc0d8b276b08f7db74fb3556cbbc8f762401eb5ef52629ee39ded1
  6331. helper_dxvk "${file1}" "3.10" "1.1.72" "dxgi,d3d11"
  6332. }
  6333. w_metadata dxvk0062 dlls \
  6334. title="Vulkan-based D3D11 implementation for Linux / Wine (0.62)" \
  6335. publisher="Philip Rebohle" \
  6336. year="2017" \
  6337. media="download" \
  6338. file1="dxvk-0.62.tar.gz" \
  6339. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6340. installed_file2="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6341. load_dxvk0062()
  6342. {
  6343. # https://github.com/doitsujin/dxvk
  6344. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.62/dxvk-0.62.tar.gz" b9dbb57908e24b094b68f665ad729b6ee277eecc8ba04a6e6e4f8a4d2dfd94e3
  6345. helper_dxvk "${file1}" "3.10" "1.1.72" "dxgi,d3d11"
  6346. }
  6347. w_metadata dxvk0063 dlls \
  6348. title="Vulkan-based D3D11 implementation for Linux / Wine (0.63)" \
  6349. publisher="Philip Rebohle" \
  6350. year="2017" \
  6351. media="download" \
  6352. file1="dxvk-0.63.tar.gz" \
  6353. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6354. installed_file2="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6355. load_dxvk0063()
  6356. {
  6357. # https://github.com/doitsujin/dxvk
  6358. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.63/dxvk-0.63.tar.gz" 696df816bd9640770dee14f932bc641a16261fccf76be7c28d812a64ca6040fa
  6359. helper_dxvk "${file1}" "3.18" "1.1.80" "dxgi,d3d11"
  6360. }
  6361. w_metadata dxvk0064 dlls \
  6362. title="Vulkan-based D3D11 implementation for Linux / Wine (0.64)" \
  6363. publisher="Philip Rebohle" \
  6364. year="2017" \
  6365. media="download" \
  6366. file1="dxvk-0.64.tar.gz" \
  6367. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6368. installed_file2="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6369. load_dxvk0064()
  6370. {
  6371. # https://github.com/doitsujin/dxvk
  6372. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.64/dxvk-0.64.tar.gz" 2e03e40ff0a9d36f96a06137f3fa9110ebaea230d0bf6c22cf6399e16e97fb9c
  6373. helper_dxvk "${file1}" "3.18" "1.1.80" "dxgi,d3d11"
  6374. }
  6375. w_metadata dxvk0065 dlls \
  6376. title="Vulkan-based D3D11 implementation for Linux / Wine (0.65)" \
  6377. publisher="Philip Rebohle" \
  6378. year="2017" \
  6379. media="download" \
  6380. file1="dxvk-0.65.tar.gz" \
  6381. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6382. installed_file2="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6383. load_dxvk0065()
  6384. {
  6385. # https://github.com/doitsujin/dxvk
  6386. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.65/dxvk-0.65.tar.gz" 7b4eb42e693f925d0aff90bae261b20c50428602382ee94a3e3860b2ad1ebad0
  6387. helper_dxvk "${file1}" "3.18" "1.1.80" "dxgi,d3d11"
  6388. }
  6389. w_metadata dxvk0070 dlls \
  6390. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (0.70)" \
  6391. publisher="Philip Rebohle" \
  6392. year="2017" \
  6393. media="download" \
  6394. file1="dxvk-0.70.tar.gz" \
  6395. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6396. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6397. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6398. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6399. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6400. load_dxvk0070()
  6401. {
  6402. # https://github.com/doitsujin/dxvk
  6403. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.70/dxvk-0.70.tar.gz" 310546d530be494a35cae49b707fef4b073269d811aac25bdf72899ed1df4e9f
  6404. helper_dxvk "${file1}" "3.18" "1.1.80" "dxgi,d3d10core,d3d10,d3d11"
  6405. }
  6406. w_metadata dxvk0071 dlls \
  6407. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (0.71)" \
  6408. publisher="Philip Rebohle" \
  6409. year="2017" \
  6410. media="download" \
  6411. file1="dxvk-0.71.tar.gz" \
  6412. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6413. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6414. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6415. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6416. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6417. load_dxvk0071()
  6418. {
  6419. # https://github.com/doitsujin/dxvk
  6420. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.71/dxvk-0.71.tar.gz" fbe66337d1450f366961a7699253cd7a96c12a88c2fcda64b79be1cbb13d37d5
  6421. helper_dxvk "${file1}" "3.18" "1.1.80" "dxgi,d3d10core,d3d10,d3d11"
  6422. }
  6423. w_metadata dxvk0072 dlls \
  6424. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (0.72)" \
  6425. publisher="Philip Rebohle" \
  6426. year="2017" \
  6427. media="download" \
  6428. file1="dxvk-0.72.tar.gz" \
  6429. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6430. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6431. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6432. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6433. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6434. load_dxvk0072()
  6435. {
  6436. # https://github.com/doitsujin/dxvk
  6437. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.72/dxvk-0.72.tar.gz" bc84f48f99cf5add3c8919a43d7a9c0bf208c994dc58326a636b56b8db650c52
  6438. helper_dxvk "${file1}" "3.18" "1.1.84" "dxgi,d3d10core,d3d10,d3d11"
  6439. }
  6440. w_metadata dxvk0080 dlls \
  6441. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (0.80)" \
  6442. publisher="Philip Rebohle" \
  6443. year="2017" \
  6444. media="download" \
  6445. file1="dxvk-0.80.tar.gz" \
  6446. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6447. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6448. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6449. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6450. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6451. load_dxvk0080()
  6452. {
  6453. # https://github.com/doitsujin/dxvk
  6454. # 2017/09/23: f9e736cdbf1e83e45ca748652a94a3a189fc5accde1eac549b2ba5af8f7acacb
  6455. # 2017/11/17: 7058a834bb006cad5462933110449b434df561e67d83f68d3965ecc74e2e1cbc
  6456. # See: https://github.com/doitsujin/dxvk/issues/773
  6457. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.80/dxvk-0.80.tar.gz" 7058a834bb006cad5462933110449b434df561e67d83f68d3965ecc74e2e1cbc
  6458. helper_dxvk "${file1}" "3.18" "1.1.84" "dxgi,d3d10core,d3d10,d3d11"
  6459. }
  6460. w_metadata dxvk0081 dlls \
  6461. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (0.81)" \
  6462. publisher="Philip Rebohle" \
  6463. year="2017" \
  6464. media="download" \
  6465. file1="dxvk-0.81.tar.gz" \
  6466. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6467. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6468. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6469. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6470. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6471. load_dxvk0081()
  6472. {
  6473. # https://github.com/doitsujin/dxvk
  6474. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.81/dxvk-0.81.tar.gz" 9bf6eda9ae4ee74b509e07dfe9cc003dfa4bba192b519dacdd542a57f6a43869
  6475. helper_dxvk "${file1}" "3.18" "1.1.84" "dxgi,d3d10core,d3d10,d3d11"
  6476. }
  6477. w_metadata dxvk0090 dlls \
  6478. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (0.90)" \
  6479. publisher="Philip Rebohle" \
  6480. year="2017" \
  6481. media="download" \
  6482. file1="dxvk-0.90.tar.gz" \
  6483. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6484. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6485. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6486. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6487. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6488. load_dxvk0090()
  6489. {
  6490. # https://github.com/doitsujin/dxvk
  6491. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.90/dxvk-0.90.tar.gz" 15bce7b282065054ff9233b33738bf1d2c74b16829361cbd6843bc2f5dfe4509
  6492. helper_dxvk "${file1}" "3.19" "1.1.87" "dxgi,d3d10core,d3d10,d3d11"
  6493. }
  6494. w_metadata dxvk0091 dlls \
  6495. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (0.91)" \
  6496. publisher="Philip Rebohle" \
  6497. year="2017" \
  6498. media="download" \
  6499. file1="dxvk-0.91.tar.gz" \
  6500. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6501. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6502. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6503. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6504. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6505. load_dxvk0091()
  6506. {
  6507. # https://github.com/doitsujin/dxvk
  6508. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.91/dxvk-0.91.tar.gz" 5296106ac3a8c631d7f26fa46dbff4be1332cda14fa493fd89ccf97e050c4855
  6509. helper_dxvk "${file1}" "3.19" "1.1.87" "dxgi,d3d10core,d3d10,d3d11"
  6510. }
  6511. w_metadata dxvk0092 dlls \
  6512. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (0.92)" \
  6513. publisher="Philip Rebohle" \
  6514. year="2017" \
  6515. media="download" \
  6516. file1="dxvk-0.92.tar.gz" \
  6517. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6518. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6519. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6520. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6521. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6522. load_dxvk0092()
  6523. {
  6524. # https://github.com/doitsujin/dxvk
  6525. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.92/dxvk-0.92.tar.gz" e22c0ae4693aac88562c7a9a97b3316e086b9048c9f8f9e128923ac1611a5c49
  6526. helper_dxvk "${file1}" "3.19" "1.1.87" "dxgi,d3d10core,d3d10,d3d11"
  6527. }
  6528. w_metadata dxvk0093 dlls \
  6529. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (0.93)" \
  6530. publisher="Philip Rebohle" \
  6531. year="2017" \
  6532. media="download" \
  6533. file1="dxvk-0.93.tar.gz" \
  6534. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6535. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6536. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6537. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6538. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6539. load_dxvk0093()
  6540. {
  6541. # https://github.com/doitsujin/dxvk
  6542. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.93/dxvk-0.93.tar.gz" 4d964e4e10e67ba7705312496e472ae9859520a78d8742d6d377886318c95e53
  6543. helper_dxvk "${file1}" "4.0" "1.1.93" "dxgi,d3d10core,d3d10,d3d11"
  6544. }
  6545. w_metadata dxvk0094 dlls \
  6546. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (0.94)" \
  6547. publisher="Philip Rebohle" \
  6548. year="2017" \
  6549. media="download" \
  6550. file1="dxvk-0.94.tar.gz" \
  6551. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6552. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6553. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6554. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6555. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6556. load_dxvk0094()
  6557. {
  6558. # https://github.com/doitsujin/dxvk
  6559. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.94/dxvk-0.94.tar.gz" 1f06bfac5b435b62b972806fb3bbd86f7ccae2399b4451e85ae414e03d3712a3
  6560. helper_dxvk "${file1}" "4.0" "1.1.93" "dxgi,d3d10core,d3d10,d3d11"
  6561. }
  6562. w_metadata dxvk0095 dlls \
  6563. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (0.95)" \
  6564. publisher="Philip Rebohle" \
  6565. year="2017" \
  6566. media="download" \
  6567. file1="dxvk-0.95.tar.gz" \
  6568. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6569. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6570. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6571. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6572. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6573. load_dxvk0095()
  6574. {
  6575. # https://github.com/doitsujin/dxvk
  6576. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.95/dxvk-0.95.tar.gz" 1eea48149f6e94c3c74ecddd92df4f9daa67ab28d0fca548bde5cd40f0e486bf
  6577. helper_dxvk "${file1}" "4.0" "1.1.93" "dxgi,d3d10core,d3d10,d3d11"
  6578. }
  6579. w_metadata dxvk0096 dlls \
  6580. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (0.96)" \
  6581. publisher="Philip Rebohle" \
  6582. year="2017" \
  6583. media="download" \
  6584. file1="dxvk-0.96.tar.gz" \
  6585. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6586. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6587. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6588. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6589. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6590. load_dxvk0096()
  6591. {
  6592. # https://github.com/doitsujin/dxvk
  6593. w_download "https://github.com/doitsujin/dxvk/releases/download/v0.96/dxvk-0.96.tar.gz" 9d054c1e7a4f59825c651b14d3cfbf0d8c724763f485b3d59c89f1d7194b2206
  6594. helper_dxvk "${file1}" "4.0" "1.1.93" "dxgi,d3d10core,d3d10,d3d11"
  6595. }
  6596. w_metadata dxvk1000 dlls \
  6597. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.0)" \
  6598. publisher="Philip Rebohle" \
  6599. year="2017" \
  6600. media="download" \
  6601. file1="dxvk-1.0.tar.gz" \
  6602. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6603. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6604. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6605. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6606. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6607. load_dxvk1000()
  6608. {
  6609. # https://github.com/doitsujin/dxvk
  6610. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.0/dxvk-1.0.tar.gz" 8c8d26544609532201c10e6f5309bf5e913b5ca5b985932928ef9ab238de6dc2
  6611. helper_dxvk "${file1}" "4.5" "1.1.101" "dxgi,d3d10core,d3d10,d3d11"
  6612. }
  6613. w_metadata dxvk1001 dlls \
  6614. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.0.1)" \
  6615. publisher="Philip Rebohle" \
  6616. year="2017" \
  6617. media="download" \
  6618. file1="dxvk-1.0.1.tar.gz" \
  6619. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6620. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6621. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6622. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6623. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6624. load_dxvk1001()
  6625. {
  6626. # https://github.com/doitsujin/dxvk
  6627. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.0.1/dxvk-1.0.1.tar.gz" 739847cdd14b302dac600c66bc6617d7814945df6d4d7b6c91fecfa910e3b1b1
  6628. helper_dxvk "${file1}" "4.5" "1.1.101" "dxgi,d3d10core,d3d10,d3d11"
  6629. }
  6630. w_metadata dxvk1002 dlls \
  6631. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.0.2)" \
  6632. publisher="Philip Rebohle" \
  6633. year="2017" \
  6634. media="download" \
  6635. file1="dxvk-1.0.2.tar.gz" \
  6636. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6637. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6638. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6639. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6640. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6641. load_dxvk1002()
  6642. {
  6643. # https://github.com/doitsujin/dxvk
  6644. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.0.2/dxvk-1.0.2.tar.gz" f9504b188488d1102cba7e82c28681708f39e151af1c1ef7ebeac82d729c01ac
  6645. helper_dxvk "${file1}" "4.5" "1.1.101" "dxgi,d3d10core,d3d10,d3d11"
  6646. }
  6647. w_metadata dxvk1003 dlls \
  6648. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.0.3)" \
  6649. publisher="Philip Rebohle" \
  6650. year="2017" \
  6651. media="download" \
  6652. file1="dxvk-1.0.3.tar.gz" \
  6653. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6654. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6655. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6656. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6657. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6658. load_dxvk1003()
  6659. {
  6660. # https://github.com/doitsujin/dxvk
  6661. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.0.3/dxvk-1.0.3.tar.gz" 984d28ab3a112be207d6339da19113d1117e56731ed413d0e202e6fd1391a6ae
  6662. helper_dxvk "${file1}" "4.5" "1.1.101" "dxgi,d3d10core,d3d10,d3d11"
  6663. }
  6664. w_metadata dxvk1011 dlls \
  6665. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.1.1)" \
  6666. publisher="Philip Rebohle" \
  6667. year="2017" \
  6668. media="download" \
  6669. file1="dxvk-1.1.1.tar.gz" \
  6670. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6671. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6672. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6673. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6674. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6675. load_dxvk1011()
  6676. {
  6677. # https://github.com/doitsujin/dxvk
  6678. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.1.1/dxvk-1.1.1.tar.gz" 346c523953f72ac5885071c4384039faf01f6f43a88d5b0c12d94bfaa9598c1d
  6679. helper_dxvk "${file1}" "4.5" "1.1.104" "dxgi,d3d10core,d3d10,d3d11"
  6680. }
  6681. w_metadata dxvk1020 dlls \
  6682. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.2)" \
  6683. publisher="Philip Rebohle" \
  6684. year="2017" \
  6685. media="download" \
  6686. file1="dxvk-1.2.tar.gz" \
  6687. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6688. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6689. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6690. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6691. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6692. load_dxvk1020()
  6693. {
  6694. # https://github.com/doitsujin/dxvk
  6695. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.2/dxvk-1.2.tar.gz" 414751a810143ced34d1f4f0eb2a40e79b4c9726318994b244b70d1b3a6f8b32
  6696. helper_dxvk "${file1}" "4.5" "1.1.104" "dxgi,d3d10core,d3d10,d3d11"
  6697. }
  6698. w_metadata dxvk1021 dlls \
  6699. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.2.1)" \
  6700. publisher="Philip Rebohle" \
  6701. year="2017" \
  6702. media="download" \
  6703. file1="dxvk-1.2.1.tar.gz" \
  6704. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6705. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6706. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6707. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6708. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6709. load_dxvk1021()
  6710. {
  6711. # https://github.com/doitsujin/dxvk
  6712. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.2.1/dxvk-1.2.1.tar.gz" 192beca0a34d13f101e9c2545d9533cf84830a23b566bed185c022ed754c3daa
  6713. helper_dxvk "${file1}" "4.5" "1.1.104" "dxgi,d3d10core,d3d10,d3d11"
  6714. }
  6715. w_metadata dxvk1022 dlls \
  6716. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.2.2)" \
  6717. publisher="Philip Rebohle" \
  6718. year="2017" \
  6719. media="download" \
  6720. file1="dxvk-1.2.2.tar.gz" \
  6721. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6722. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6723. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6724. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6725. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6726. load_dxvk1022()
  6727. {
  6728. # https://github.com/doitsujin/dxvk
  6729. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.2.2/dxvk-1.2.2.tar.gz" dfe620a387222dc117a6722171e0bca400755a3e1c6459350c710dfda40b6701
  6730. helper_dxvk "${file1}" "4.5" "1.1.104" "dxgi,d3d10core,d3d10,d3d11"
  6731. }
  6732. w_metadata dxvk1023 dlls \
  6733. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.2.3)" \
  6734. publisher="Philip Rebohle" \
  6735. year="2017" \
  6736. media="download" \
  6737. file1="dxvk-1.2.3.tar.gz" \
  6738. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6739. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6740. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6741. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6742. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6743. load_dxvk1023()
  6744. {
  6745. # https://github.com/doitsujin/dxvk
  6746. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.2.3/dxvk-1.2.3.tar.gz" 29ce345b3d962dbd8ec8bfda190635a21f62124e3e46f06e89aa2f3b1e230321
  6747. helper_dxvk "${file1}" "4.5" "1.1.104" "dxgi,d3d10core,d3d10,d3d11"
  6748. }
  6749. w_metadata dxvk1030 dlls \
  6750. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.3)" \
  6751. publisher="Philip Rebohle" \
  6752. year="2017" \
  6753. media="download" \
  6754. file1="dxvk-1.3.tar.gz" \
  6755. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6756. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6757. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6758. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6759. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6760. load_dxvk1030()
  6761. {
  6762. # https://github.com/doitsujin/dxvk
  6763. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.3/dxvk-1.3.tar.gz" d15fac6503ea614986237052d554d7cbd2dbf5f3486feb6217e64bae83cfc2cf
  6764. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d10core,d3d10,d3d11"
  6765. }
  6766. w_metadata dxvk1031 dlls \
  6767. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.3.1)" \
  6768. publisher="Philip Rebohle" \
  6769. year="2017" \
  6770. media="download" \
  6771. file1="dxvk-1.3.1.tar.gz" \
  6772. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6773. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6774. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6775. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6776. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6777. load_dxvk1031()
  6778. {
  6779. # https://github.com/doitsujin/dxvk
  6780. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.3.1/dxvk-1.3.1.tar.gz" 2f6636dbd591ea9de20b30a33c9c8c0985a4939f6503f90ca5c7edafd01524a3
  6781. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d10core,d3d10,d3d11"
  6782. }
  6783. w_metadata dxvk1032 dlls \
  6784. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.3.2)" \
  6785. publisher="Philip Rebohle" \
  6786. year="2017" \
  6787. media="download" \
  6788. file1="dxvk-1.3.2.tar.gz" \
  6789. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6790. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6791. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6792. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6793. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6794. load_dxvk1032()
  6795. {
  6796. # https://github.com/doitsujin/dxvk
  6797. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.3.2/dxvk-1.3.2.tar.gz" aa70890a17b48be27648d15cb837b5167c99f75ee32ae0c94a85ec1f1fdc4675
  6798. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d10core,d3d10,d3d11"
  6799. }
  6800. w_metadata dxvk1033 dlls \
  6801. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.3.3)" \
  6802. publisher="Philip Rebohle" \
  6803. year="2017" \
  6804. media="download" \
  6805. file1="dxvk-1.3.3.tar.gz" \
  6806. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6807. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6808. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6809. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6810. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6811. load_dxvk1033()
  6812. {
  6813. # https://github.com/doitsujin/dxvk
  6814. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.3.3/dxvk-1.3.3.tar.gz" 828171ad1dbb6b51f367fa46cf33f8db4a0b1b990cd2e95654d6a65500d230b7
  6815. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d10core,d3d10,d3d11"
  6816. }
  6817. w_metadata dxvk1034 dlls \
  6818. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.3.4)" \
  6819. publisher="Philip Rebohle" \
  6820. year="2017" \
  6821. media="download" \
  6822. file1="dxvk-1.3.4.tar.gz" \
  6823. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6824. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6825. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6826. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6827. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6828. load_dxvk1034()
  6829. {
  6830. # https://github.com/doitsujin/dxvk
  6831. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.3.4/dxvk-1.3.4.tar.gz" 4683e2ad4221b16572b0d939da5a05ab9a16b2b62c2f4e0c8bf3b2cdb27918ff
  6832. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d10core,d3d10,d3d11"
  6833. }
  6834. w_metadata dxvk1040 dlls \
  6835. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.4)" \
  6836. publisher="Philip Rebohle" \
  6837. year="2017" \
  6838. media="download" \
  6839. file1="dxvk-1.4.tar.gz" \
  6840. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6841. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6842. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6843. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6844. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6845. load_dxvk1040()
  6846. {
  6847. # https://github.com/doitsujin/dxvk
  6848. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.4/dxvk-1.4.tar.gz" bf22785de1ce728bbdcfb4615035924112b4718049ca2cade5861b03735181de
  6849. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d10core,d3d10,d3d11"
  6850. }
  6851. w_metadata dxvk1041 dlls \
  6852. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.4.1)" \
  6853. publisher="Philip Rebohle" \
  6854. year="2017" \
  6855. media="download" \
  6856. file1="dxvk-1.4.1.tar.gz" \
  6857. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6858. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6859. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6860. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6861. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6862. load_dxvk1041()
  6863. {
  6864. # https://github.com/doitsujin/dxvk
  6865. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.4.1/dxvk-1.4.1.tar.gz" 574ec4dc5201e45d70472228f0c6695426f0392503ec7a47d6092600aac53a07
  6866. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d10core,d3d10,d3d11"
  6867. }
  6868. w_metadata dxvk1042 dlls \
  6869. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.4.2)" \
  6870. publisher="Philip Rebohle" \
  6871. year="2017" \
  6872. media="download" \
  6873. file1="dxvk-1.4.2.tar.gz" \
  6874. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6875. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6876. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6877. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6878. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6879. load_dxvk1042()
  6880. {
  6881. # https://github.com/doitsujin/dxvk
  6882. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.4.2/dxvk-1.4.2.tar.gz" 5adfd71ee0299798af4402f09f113f88929af429b6889af334cff5b84b84dbe6
  6883. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d10core,d3d10,d3d11"
  6884. }
  6885. w_metadata dxvk1043 dlls \
  6886. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.4.3)" \
  6887. publisher="Philip Rebohle" \
  6888. year="2017" \
  6889. media="download" \
  6890. file1="dxvk-1.4.3.tar.gz" \
  6891. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6892. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6893. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6894. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6895. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6896. load_dxvk1043()
  6897. {
  6898. # https://github.com/doitsujin/dxvk
  6899. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.4.3/dxvk-1.4.3.tar.gz" e4b9e7fc8faf2dd1ddf5206e14939a822034a85778d54a6950767d68909726f7
  6900. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d10core,d3d10,d3d11"
  6901. }
  6902. w_metadata dxvk1044 dlls \
  6903. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.4.4)" \
  6904. publisher="Philip Rebohle" \
  6905. year="2017" \
  6906. media="download" \
  6907. file1="dxvk-1.4.4.tar.gz" \
  6908. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6909. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6910. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6911. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6912. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6913. load_dxvk1044()
  6914. {
  6915. # https://github.com/doitsujin/dxvk
  6916. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.4.4/dxvk-1.4.4.tar.gz" a845285c8dfc63c7d00c14520b58fc6048796fef69fea49617edb46662a0ba31
  6917. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d10core,d3d10,d3d11"
  6918. }
  6919. w_metadata dxvk1045 dlls \
  6920. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.4.5)" \
  6921. publisher="Philip Rebohle" \
  6922. year="2017" \
  6923. media="download" \
  6924. file1="dxvk-1.4.5.tar.gz" \
  6925. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6926. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6927. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6928. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6929. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6930. load_dxvk1045()
  6931. {
  6932. # https://github.com/doitsujin/dxvk
  6933. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.4.5/dxvk-1.4.5.tar.gz" 566c93dce84c3c2f39938428ddcca27a5bb2f5068eb4f868ff2126389b965cd1
  6934. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d10core,d3d10,d3d11"
  6935. }
  6936. w_metadata dxvk1046 dlls \
  6937. title="Vulkan-based D3D10/D3D11 implementation for Linux / Wine (1.4.6)" \
  6938. publisher="Philip Rebohle" \
  6939. year="2017" \
  6940. media="download" \
  6941. file1="dxvk-1.4.6.tar.gz" \
  6942. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6943. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6944. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6945. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6946. installed_file5="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6947. load_dxvk1046()
  6948. {
  6949. # https://github.com/doitsujin/dxvk
  6950. # Original sha256sum: 1aa069f5ea7d3d6e374bda332d12f9207f1a21e9811c4d4d82487416420ee73e
  6951. # Upstream later rebuilt with commit 1ae7d4b30283d2eb06b467c581aafdbbd9d36cdf: c9e3a96d8c5e693e20f69f27ac3f8b55198449fddd24205195476d6af7e8a339
  6952. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.4.6/dxvk-1.4.6.tar.gz" c9e3a96d8c5e693e20f69f27ac3f8b55198449fddd24205195476d6af7e8a339
  6953. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d10core,d3d10,d3d11"
  6954. }
  6955. w_metadata dxvk1050 dlls \
  6956. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.5)" \
  6957. publisher="Philip Rebohle" \
  6958. year="2017" \
  6959. media="download" \
  6960. file1="dxvk-1.5.tar.gz" \
  6961. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  6962. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6963. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6964. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6965. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6966. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6967. load_dxvk1050()
  6968. {
  6969. # https://github.com/doitsujin/dxvk
  6970. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.5/dxvk-1.5.tar.gz" 90cfae0bb43fed1e46442d20e2ab3bf448ebdff1e9f4f59841dc922aa3a36d3b
  6971. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  6972. }
  6973. w_metadata dxvk1051 dlls \
  6974. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.5.1)" \
  6975. publisher="Philip Rebohle" \
  6976. year="2017" \
  6977. media="download" \
  6978. file1="dxvk-1.5.1.tar.gz" \
  6979. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  6980. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6981. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  6982. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  6983. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  6984. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  6985. load_dxvk1051()
  6986. {
  6987. # https://github.com/doitsujin/dxvk
  6988. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.5.1/dxvk-1.5.1.tar.gz" 474ce9995edd47a3bd347a8f3263f35cf8df2676f5b16668bf38efa298d75c01
  6989. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  6990. }
  6991. w_metadata dxvk1052 dlls \
  6992. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.5.2)" \
  6993. publisher="Philip Rebohle" \
  6994. year="2017" \
  6995. media="download" \
  6996. file1="dxvk-1.5.2.tar.gz" \
  6997. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  6998. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  6999. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7000. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7001. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7002. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7003. load_dxvk1052()
  7004. {
  7005. # https://github.com/doitsujin/dxvk
  7006. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.5.2/dxvk-1.5.2.tar.gz" 684ba886b5ed922c2417753d8178f923c695258c69cc8f778bb59b99bbf62477
  7007. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7008. }
  7009. w_metadata dxvk1053 dlls \
  7010. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.5.3)" \
  7011. publisher="Philip Rebohle" \
  7012. year="2017" \
  7013. media="download" \
  7014. file1="dxvk-1.5.3.tar.gz" \
  7015. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7016. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7017. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7018. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7019. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7020. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7021. load_dxvk1053()
  7022. {
  7023. # https://github.com/doitsujin/dxvk
  7024. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.5.3/dxvk-1.5.3.tar.gz" b845c9c492e32648dee44d058c189eff8534e5490a80a3b2a921248bc72e33bd
  7025. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7026. }
  7027. w_metadata dxvk1054 dlls \
  7028. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.5.4)" \
  7029. publisher="Philip Rebohle" \
  7030. year="2017" \
  7031. media="download" \
  7032. file1="dxvk-1.5.4.tar.gz" \
  7033. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7034. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7035. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7036. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7037. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7038. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7039. load_dxvk1054()
  7040. {
  7041. # https://github.com/doitsujin/dxvk
  7042. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.5.4/dxvk-1.5.4.tar.gz" 8e4fd15525def9bcaa9cc1b4496f76a2664ba4806b02a5ac0eddd703d7bbdea7
  7043. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7044. }
  7045. w_metadata dxvk1055 dlls \
  7046. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.5.5)" \
  7047. publisher="Philip Rebohle" \
  7048. year="2017" \
  7049. media="download" \
  7050. file1="dxvk-1.5.5.tar.gz" \
  7051. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7052. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7053. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7054. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7055. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7056. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7057. load_dxvk1055()
  7058. {
  7059. # https://github.com/doitsujin/dxvk
  7060. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.5.5/dxvk-1.5.5.tar.gz" f4c57274ac85d71b192e2a0ac095f285e26cc054c87c6c34c081f919147539eb
  7061. helper_dxvk "${file1}" "4.20" "1.1.113" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7062. }
  7063. w_metadata dxvk1060 dlls \
  7064. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.6)" \
  7065. publisher="Philip Rebohle" \
  7066. year="2017" \
  7067. media="download" \
  7068. file1="dxvk-1.6.tar.gz" \
  7069. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7070. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7071. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7072. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7073. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7074. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7075. load_dxvk1060()
  7076. {
  7077. # https://github.com/doitsujin/dxvk
  7078. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.6/dxvk-1.6.tar.gz" a493e0802e02629244672c44ad92c40fa0813b38908677ae14ee07feefcf7227
  7079. helper_dxvk "${file1}" "5.3" "1.1.113" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7080. }
  7081. w_metadata dxvk1061 dlls \
  7082. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.6.1)" \
  7083. publisher="Philip Rebohle" \
  7084. year="2017" \
  7085. media="download" \
  7086. file1="dxvk-1.6.1.tar.gz" \
  7087. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7088. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7089. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7090. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7091. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7092. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7093. load_dxvk1061()
  7094. {
  7095. # https://github.com/doitsujin/dxvk
  7096. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.6.1/dxvk-1.6.1.tar.gz" cdef8735313ed9ccb7af23b37bcceaad54553e29505c269246d5e347f1359136
  7097. helper_dxvk "${file1}" "5.3" "1.1.113" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7098. }
  7099. w_metadata dxvk1070 dlls \
  7100. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.7)" \
  7101. publisher="Philip Rebohle" \
  7102. year="2017" \
  7103. media="download" \
  7104. file1="dxvk-1.7.tar.gz" \
  7105. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7106. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7107. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7108. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7109. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7110. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7111. load_dxvk1070()
  7112. {
  7113. # https://github.com/doitsujin/dxvk
  7114. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.7/dxvk-1.7.tar.gz" 67d78239906c24bd50a5ecbc2fd792c1721e274a7a60dd22f74b21b08ca4c7a1
  7115. helper_dxvk "${file1}" "5.8" "1.2.140" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7116. }
  7117. w_metadata dxvk1071 dlls \
  7118. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.7.1)" \
  7119. publisher="Philip Rebohle" \
  7120. year="2017" \
  7121. media="download" \
  7122. file1="dxvk-1.7.1.tar.gz" \
  7123. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7124. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7125. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7126. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7127. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7128. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7129. load_dxvk1071()
  7130. {
  7131. # https://github.com/doitsujin/dxvk
  7132. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.7.1/dxvk-1.7.1.tar.gz" 6ce66c4e01196ed022604e90383593aea02c9016bde92c6840aa58805d5fc588
  7133. helper_dxvk "${file1}" "5.8" "1.2.140" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7134. }
  7135. w_metadata dxvk1072 dlls \
  7136. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.7.2)" \
  7137. publisher="Philip Rebohle" \
  7138. year="2017" \
  7139. media="download" \
  7140. file1="dxvk-1.7.2.tar.gz" \
  7141. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7142. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7143. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7144. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7145. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7146. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7147. load_dxvk1072()
  7148. {
  7149. # https://github.com/doitsujin/dxvk
  7150. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.7.2/dxvk-1.7.2.tar.gz" 1662f6bda93faf4f6c8b57d656779b08925889dd6b794114be874d6deb97e15b
  7151. helper_dxvk "${file1}" "5.8" "1.2.140" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7152. }
  7153. w_metadata dxvk1073 dlls \
  7154. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.7.3)" \
  7155. publisher="Philip Rebohle" \
  7156. year="2017" \
  7157. media="download" \
  7158. file1="dxvk-1.7.3.tar.gz" \
  7159. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7160. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7161. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7162. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7163. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7164. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7165. load_dxvk1073()
  7166. {
  7167. # https://github.com/doitsujin/dxvk
  7168. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.7.3/dxvk-1.7.3.tar.gz" e4c2444256b7ad63455fa6329638e3f42900ec7462dc9c26da56187a2040aba0
  7169. helper_dxvk "${file1}" "5.8" "1.2.140" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7170. }
  7171. w_metadata dxvk1080 dlls \
  7172. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.8)" \
  7173. publisher="Philip Rebohle" \
  7174. year="2017" \
  7175. media="download" \
  7176. file1="dxvk-1.8.tar.gz" \
  7177. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7178. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7179. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7180. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7181. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7182. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7183. load_dxvk1080()
  7184. {
  7185. # https://github.com/doitsujin/dxvk
  7186. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.8/dxvk-1.8.tar.gz" e84f7ac494ac7f5013976744470899226d145e29617c407ff52870055bda476e
  7187. helper_dxvk "${file1}" "5.14" "1.2.140" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7188. }
  7189. w_metadata dxvk1081 dlls \
  7190. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.8.1)" \
  7191. publisher="Philip Rebohle" \
  7192. year="2017" \
  7193. media="download" \
  7194. file1="dxvk-1.8.1.tar.gz" \
  7195. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7196. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7197. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7198. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7199. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7200. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7201. load_dxvk1081()
  7202. {
  7203. # https://github.com/doitsujin/dxvk
  7204. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.8.1/dxvk-1.8.1.tar.gz" 756a09c46f8279ade84456e3af038f64613a51e00a2d4cfffa4c91c10ede60e8
  7205. helper_dxvk "${file1}" "5.14" "1.2.140" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7206. }
  7207. w_metadata dxvk1090 dlls \
  7208. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.9)" \
  7209. publisher="Philip Rebohle" \
  7210. year="2017" \
  7211. media="download" \
  7212. file1="dxvk-1.9.tar.gz" \
  7213. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7214. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7215. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7216. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7217. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7218. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7219. load_dxvk1090()
  7220. {
  7221. # https://github.com/doitsujin/dxvk
  7222. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.9/dxvk-1.9.tar.gz" 433868f8783887192a04b788203d6b4effe3168be762dd60df1c1b564421a6ed
  7223. helper_dxvk "${file1}" "5.14" "1.2.140" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7224. }
  7225. w_metadata dxvk1091 dlls \
  7226. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.9.1)" \
  7227. publisher="Philip Rebohle" \
  7228. year="2017" \
  7229. media="download" \
  7230. file1="dxvk-1.9.1.tar.gz" \
  7231. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7232. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7233. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7234. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7235. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7236. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7237. load_dxvk1091()
  7238. {
  7239. # https://github.com/doitsujin/dxvk
  7240. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.9.1/dxvk-1.9.1.tar.gz" ef7591d6effcca8a8352cea4fa50fe73aa1f10fd89cb475f2f14236e4340a007
  7241. helper_dxvk "${file1}" "5.14" "1.2.140" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7242. }
  7243. w_metadata dxvk1092 dlls \
  7244. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.9.2)" \
  7245. publisher="Philip Rebohle" \
  7246. year="2017" \
  7247. media="download" \
  7248. file1="dxvk-1.9.2.tar.gz" \
  7249. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7250. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7251. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7252. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7253. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7254. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7255. load_dxvk1092()
  7256. {
  7257. # https://github.com/doitsujin/dxvk
  7258. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.9.2/dxvk-1.9.2.tar.gz" 24bcee655767f4731b8d3883dd93ba4edc7f1e87421e15fab19499d57236b8e9
  7259. helper_dxvk "${file1}" "5.14" "1.2.140" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7260. }
  7261. w_metadata dxvk1093 dlls \
  7262. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.9.3)" \
  7263. publisher="Philip Rebohle" \
  7264. year="2017" \
  7265. media="download" \
  7266. file1="dxvk-1.9.3.tar.gz" \
  7267. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7268. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7269. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7270. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7271. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7272. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7273. load_dxvk1093()
  7274. {
  7275. # https://github.com/doitsujin/dxvk
  7276. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.9.3/dxvk-1.9.3.tar.gz" cfcf4fac1f6bfc5a09183e77362a0af7fead4e54961bb548aef3e6cddadbe9bf
  7277. helper_dxvk "${file1}" "5.14" "1.2.140" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7278. }
  7279. w_metadata dxvk1094 dlls \
  7280. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.9.4)" \
  7281. publisher="Philip Rebohle" \
  7282. year="2017" \
  7283. media="download" \
  7284. file1="dxvk-1.9.4.tar.gz" \
  7285. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7286. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7287. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7288. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7289. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7290. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7291. load_dxvk1094()
  7292. {
  7293. # https://github.com/doitsujin/dxvk
  7294. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.9.4/dxvk-1.9.4.tar.gz" 854f564c3b58a4cdf7b16eb9a4b6bc6ddc0f83d68c4f979a529fc23f7a770502
  7295. helper_dxvk "${file1}" "5.14" "1.2.140" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7296. }
  7297. w_metadata dxvk1100 dlls \
  7298. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.10)" \
  7299. publisher="Philip Rebohle" \
  7300. year="2017" \
  7301. media="download" \
  7302. file1="dxvk-1.10.tar.gz" \
  7303. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7304. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7305. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7306. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7307. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7308. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7309. load_dxvk1100()
  7310. {
  7311. # https://github.com/doitsujin/dxvk
  7312. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.10/dxvk-1.10.tar.gz" a15bc7c1df66158a205c498883b0b216390d58f4a128657990af357431b9ce77
  7313. helper_dxvk "${file1}" "5.14" "1.2.140" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7314. }
  7315. w_metadata dxvk1101 dlls \
  7316. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.10.1)" \
  7317. publisher="Philip Rebohle" \
  7318. year="2017" \
  7319. media="download" \
  7320. file1="dxvk-1.10.1.tar.gz" \
  7321. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7322. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7323. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7324. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7325. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7326. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7327. load_dxvk1101()
  7328. {
  7329. # https://github.com/doitsujin/dxvk
  7330. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.10.1/dxvk-1.10.1.tar.gz" dc349482cb0a73d4e29c82f8e9ff6031e09e176e84a97ffe91eac64422b307aa
  7331. helper_dxvk "${file1}" "5.14" "1.2.140" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7332. }
  7333. w_metadata dxvk1102 dlls \
  7334. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.10.2)" \
  7335. publisher="Philip Rebohle" \
  7336. year="2017" \
  7337. media="download" \
  7338. file1="dxvk-1.10.2.tar.gz" \
  7339. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7340. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7341. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7342. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7343. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7344. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7345. load_dxvk1102()
  7346. {
  7347. # https://github.com/doitsujin/dxvk
  7348. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.10.2/dxvk-1.10.2.tar.gz" bf97df2b8923cd8e6c646bd66bdb3d0894da1be05a6498c2dbc15b4d2e530c83
  7349. helper_dxvk "${file1}" "5.14" "1.2.140" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7350. }
  7351. w_metadata dxvk1103 dlls \
  7352. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (1.10.3)" \
  7353. publisher="Philip Rebohle" \
  7354. year="2022" \
  7355. media="download" \
  7356. file1="dxvk-1.10.3.tar.gz" \
  7357. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7358. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10.dll" \
  7359. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d10_1.dll" \
  7360. installed_file4="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7361. installed_file5="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7362. installed_file6="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7363. load_dxvk1103()
  7364. {
  7365. # https://github.com/doitsujin/dxvk
  7366. w_download "https://github.com/doitsujin/dxvk/releases/download/v1.10.3/dxvk-1.10.3.tar.gz" 8d1a3c912761b450c879f98478ae64f6f6639e40ce6848170a0f6b8596fd53c6
  7367. helper_dxvk "${file1}" "5.14" "1.2.140" "dxgi,d3d9,d3d10core,d3d10,d3d11"
  7368. }
  7369. w_metadata dxvk2000 dlls \
  7370. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (2.0)" \
  7371. publisher="Philip Rebohle" \
  7372. year="2022" \
  7373. media="download" \
  7374. file1="dxvk-2.0.tar.gz" \
  7375. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7376. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7377. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7378. installed_file4="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7379. load_dxvk2000()
  7380. {
  7381. # https://github.com/doitsujin/dxvk
  7382. w_download "https://github.com/doitsujin/dxvk/releases/download/v2.0/dxvk-2.0.tar.gz" 3852f8b4a0c23fd723c9ce06ba8c36d8f84d891755a5d00bec1cd7f609a62477
  7383. helper_dxvk "${file1}" "7.1" "1.3.204" "dxgi,d3d9,d3d10core,d3d11"
  7384. }
  7385. w_metadata dxvk2010 dlls \
  7386. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (2.1)" \
  7387. publisher="Philip Rebohle" \
  7388. year="2023" \
  7389. media="download" \
  7390. file1="dxvk-2.1.tar.gz" \
  7391. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7392. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7393. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7394. installed_file4="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7395. load_dxvk2010()
  7396. {
  7397. w_download "https://github.com/doitsujin/dxvk/releases/download/v2.1/dxvk-2.1.tar.gz" 329940b0c01226459f073d91ff1276d4d9c1c4c017303afe06193eb064502cde
  7398. helper_dxvk "${file1}" "7.1" "1.3.204" "dxgi,d3d9,d3d10core,d3d11"
  7399. }
  7400. #----------------------------------------------------------------
  7401. w_metadata dxvk dlls \
  7402. title="Vulkan-based D3D9/D3D10/D3D11 implementation for Linux / Wine (latest)" \
  7403. publisher="Philip Rebohle" \
  7404. year="2023" \
  7405. media="download" \
  7406. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9.dll" \
  7407. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d10core.dll" \
  7408. installed_file3="${W_SYSTEM32_DLLS_WIN}/d3d11.dll" \
  7409. installed_file4="${W_SYSTEM32_DLLS_WIN}/dxgi.dll"
  7410. load_dxvk()
  7411. {
  7412. # https://github.com/doitsujin/dxvk
  7413. _W_dxvk_version="$(w_get_github_latest_release doitsujin dxvk)"
  7414. _W_dxvk_version="${_W_dxvk_version#v}"
  7415. w_linkcheck_ignore=1 w_download "https://github.com/doitsujin/dxvk/releases/download/v${_W_dxvk_version}/dxvk-${_W_dxvk_version}.tar.gz"
  7416. helper_dxvk "dxvk-${_W_dxvk_version}.tar.gz" "7.1" "1.3.204" "dxgi,d3d9,d3d10core,d3d11"
  7417. unset _W_dxvk_version
  7418. }
  7419. #----------------------------------------------------------------
  7420. # $1 - dxvk-nvapi archive name (required)
  7421. # $2 - minimum Wine version (required)
  7422. # $3 - nvapi,[nvapi64] (required)
  7423. helper_dxvk_nvapi()
  7424. {
  7425. _W_package_archive="${1}"
  7426. _W_min_wine_version="${2}"
  7427. _W_dll_overrides="$(echo "${3}" | sed 's/,/ /g')"
  7428. # dxvk-nvapi repository, for (partial) NVAPI support
  7429. _W_repository="jp7677/dxvk-nvapi"
  7430. _W_supported_overrides="nvapi nvapi64"
  7431. _W_invalid_overrides="$(echo "${_W_dll_overrides}" | awk -vvalid_overrides_regex="$(echo "${_W_supported_overrides}" | sed 's/ /|/g')" '{ gsub(valid_overrides_regex,""); sub("[ ]*",""); print $0 }')"
  7432. if [ "${_W_invalid_overrides}" != "" ]; then
  7433. w_die "parameter (4) unsupported dll override: '${_W_invalid_overrides}' ; supported dll overrides: ${_W_supported_overrides}"
  7434. fi
  7435. _W_package_dir="${_W_package_archive%.tar.gz}"
  7436. _W_package_version="v${_W_package_dir#*-v}"
  7437. w_warn "Please refer to ${_W_repository#*/} version ${_W_package_version} release notes... See: https://github.com/${_W_repository}/releases/tag/${_W_package_version}"
  7438. w_warn "Please refer to current dxvk base graphics driver requirements... See: https://github.com/doitsujin/dxvk/wiki/Driver-support"
  7439. if [ "${_W_package_archive##*.}" = "zip" ]; then
  7440. w_try_unzip "${W_TMP}" "${W_CACHE}/${W_PACKAGE}/${_W_package_archive}"
  7441. else
  7442. w_try_cd "${W_TMP}"
  7443. w_try tar -zxf "${W_CACHE}/${W_PACKAGE}/${_W_package_archive}"
  7444. fi
  7445. w_try mv "${W_TMP}/x32/nvapi.dll" "${W_SYSTEM32_DLLS}/"
  7446. if test "${W_ARCH}" = "win64"; then
  7447. w_try mv "${W_TMP}/x64/nvapi64.dll" "${W_SYSTEM64_DLLS}/"
  7448. fi
  7449. # shellcheck disable=SC2086
  7450. w_override_dlls native ${_W_dll_overrides}
  7451. w_call dxvk
  7452. unset _W_dll _W_dll_overrides _W_invalid_overrides _W_min_wine_version \
  7453. _W_package_archive _W_package_dir _W_package_version \
  7454. _W_repository _W_supported_overrides
  7455. }
  7456. w_metadata dxvk_nvapi0061 dlls \
  7457. title="Alternative NVAPI Vulkan implementation on top of DXVK for Linux / Wine (0.6.1)" \
  7458. publisher="Jens Peters" \
  7459. year="2023" \
  7460. media="download" \
  7461. file1="dxvk-nvapi-v0.6.1.tar.gz" \
  7462. installed_file1="${W_SYSTEM32_DLLS_WIN}/nvapi.dll" \
  7463. installed_file2="${W_SYSTEM32_DLLS_WIN}/nvapi64.dll"
  7464. load_dxvk_nvapi0061()
  7465. {
  7466. w_download "https://github.com/jp7677/dxvk-nvapi/releases/download/v0.6.1/dxvk-nvapi-v0.6.1.tar.gz" c05196dd1ba10522e23ae8e30fec9c7e8ce624467558b1b3000499bf5b3d83aa
  7467. helper_dxvk_nvapi "${file1}" "7.1" "nvapi,nvapi64"
  7468. }
  7469. #----------------------------------------------------------------
  7470. # $1 - vkd3d-proton archive name (required)
  7471. helper_vkd3d_proton()
  7472. {
  7473. _W_package_archive="${1}"
  7474. _W_dll_overrides="d3d12 d3d12core"
  7475. case "${_W_package_archive}" in
  7476. vkd3d-proton*)
  7477. _W_repository="HansKristian-Work/vkd3d-proton"
  7478. ;;
  7479. *)
  7480. w_die "parameter (1): unsupported package archive repository: '${_W_package_archive}'; supported: vkd3d-proton"
  7481. ;;
  7482. esac
  7483. case "${_W_package_archive}" in
  7484. *master*)
  7485. _W_package_dir="build/vkd3d-proton-release"
  7486. _W_package_version="master"
  7487. w_warn "Using master ${_W_repository} build"
  7488. ;;
  7489. *)
  7490. _W_package_dir="${_W_package_archive%.tar.zst}"
  7491. _W_package_version="${_W_package_dir#*-}"
  7492. _W_package_version="${_W_package_version#*-}"
  7493. w_warn "Please refer to ${_W_repository#*/} version ${_W_package_version} release notes... See: https://github.com/${_W_repository}/releases/tag/${_W_package_version}"
  7494. ;;
  7495. esac
  7496. w_warn "Please refer to current vkd3d-proton base graphics driver requirements... See: https://github.com/HansKristian-Work/vkd3d-proton#drivers"
  7497. if [ "${_W_package_archive##*.}" = "zip" ]; then
  7498. w_try_unzip "${W_TMP}" "${W_CACHE}/${W_PACKAGE}/${_W_package_archive}"
  7499. elif [ "${_W_package_archive##*.}" = "zst" ]; then
  7500. w_try_cd "${W_TMP}"
  7501. w_try tar --use-compress-program=unzstd -xvf "${W_CACHE}/${W_PACKAGE}/${_W_package_archive}"
  7502. else
  7503. w_try_cd "${W_TMP}"
  7504. w_try tar -zxf "${W_CACHE}/${W_PACKAGE}/${_W_package_archive}"
  7505. fi
  7506. for _W_dll in ${_W_dll_overrides}; do
  7507. w_try mv "${W_TMP}/${_W_package_dir}/x86/${_W_dll}.dll" "${W_SYSTEM32_DLLS}/"
  7508. done
  7509. if test "${W_ARCH}" = "win64"; then
  7510. for _W_dll in ${_W_dll_overrides}; do
  7511. w_try mv "${W_TMP}/${_W_package_dir}/x64/${_W_dll}.dll" "${W_SYSTEM64_DLLS}/"
  7512. done
  7513. fi
  7514. # shellcheck disable=SC2086
  7515. w_override_dlls native ${_W_dll_overrides}
  7516. unset _W_dll _W_dll_overrides _W_package_archive _W_package_dir \
  7517. _W_package_version _W_repository
  7518. }
  7519. #----------------------------------------------------------------
  7520. w_metadata vkd3d dlls \
  7521. title="Vulkan-based D3D12 implementation for Linux / Wine (latest)" \
  7522. publisher="Hans-Kristian Arntzen " \
  7523. year="2020" \
  7524. media="download" \
  7525. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d12.dll" \
  7526. installed_file2="${W_SYSTEM32_DLLS_WIN}/d3d12core.dll"
  7527. load_vkd3d()
  7528. {
  7529. # https://github.com/HansKristian-Work/vkd3d-proton
  7530. _W_vkd3d_proton_version="$(w_get_github_latest_release HansKristian-Work vkd3d-proton)"
  7531. _W_vkd3d_proton_version="${_W_vkd3d_proton_version#v}"
  7532. w_linkcheck_ignore=1 w_download "https://github.com/HansKristian-Work/vkd3d-proton/releases/download/v${_W_vkd3d_proton_version}/vkd3d-proton-${_W_vkd3d_proton_version}.tar.zst"
  7533. helper_vkd3d_proton "vkd3d-proton-${_W_vkd3d_proton_version}.tar.zst"
  7534. unset _W_vkd3d_proton_version
  7535. }
  7536. #----------------------------------------------------------------
  7537. w_metadata dmusic32 dlls \
  7538. title="MS dmusic32.dll from DirectX user redistributable" \
  7539. publisher="Microsoft" \
  7540. year="2006" \
  7541. media="download" \
  7542. file1="../directx9/directx_apr2006_redist.exe" \
  7543. installed_file1="${W_SYSTEM32_DLLS_WIN}/dmusic32.dll"
  7544. load_dmusic32()
  7545. {
  7546. w_download_to directx9 https://web.archive.org/web/20100920035904/https://download.microsoft.com/download/3/9/7/3972f80c-5711-4e14-9483-959d48a2d03b/directx_apr2006_redist.exe dd8c3d401efe4561b67bd88475201b2f62f43cd23e4acc947bb34a659fa74952
  7547. w_try_cabextract -d "${W_TMP}" -F DirectX.cab "${W_CACHE}"/directx9/directx_apr2006_redist.exe
  7548. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F dmusic32.dll "${W_TMP}"/DirectX.cab
  7549. w_override_dlls native dmusic32
  7550. }
  7551. #----------------------------------------------------------------
  7552. w_metadata dmband dlls \
  7553. title="MS dmband.dll from DirectX user redistributable" \
  7554. publisher="Microsoft" \
  7555. year="2010" \
  7556. media="download" \
  7557. file1="../directx9/directx_feb2010_redist.exe" \
  7558. installed_file1="${W_SYSTEM32_DLLS_WIN}/dmband.dll"
  7559. load_dmband()
  7560. {
  7561. helper_directx_dl
  7562. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  7563. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmband.dll' "${W_TMP}/dxnt.cab"
  7564. w_override_dlls native dmband
  7565. w_try_regsvr dmband.dll
  7566. }
  7567. #----------------------------------------------------------------
  7568. w_metadata dmcompos dlls \
  7569. title="MS dmcompos.dll from DirectX user redistributable" \
  7570. publisher="Microsoft" \
  7571. year="2010" \
  7572. media="download" \
  7573. file1="../directx9/directx_feb2010_redist.exe" \
  7574. installed_file1="${W_SYSTEM32_DLLS_WIN}/dmcompos.dll"
  7575. load_dmcompos()
  7576. {
  7577. helper_directx_dl
  7578. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  7579. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmcompos.dll' "${W_TMP}/dxnt.cab"
  7580. w_override_dlls native dmcompos
  7581. w_try_regsvr dmcompos.dll
  7582. }
  7583. #----------------------------------------------------------------
  7584. w_metadata dmime dlls \
  7585. title="MS dmime.dll from DirectX user redistributable" \
  7586. publisher="Microsoft" \
  7587. year="2010" \
  7588. media="download" \
  7589. file1="../directx9/directx_feb2010_redist.exe" \
  7590. installed_file1="${W_SYSTEM32_DLLS_WIN}/dmime.dll"
  7591. load_dmime()
  7592. {
  7593. helper_directx_dl
  7594. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  7595. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmime.dll' "${W_TMP}/dxnt.cab"
  7596. w_override_dlls native dmime
  7597. w_try_regsvr dmime.dll
  7598. }
  7599. #----------------------------------------------------------------
  7600. w_metadata dmloader dlls \
  7601. title="MS dmloader.dll from DirectX user redistributable" \
  7602. publisher="Microsoft" \
  7603. year="2010" \
  7604. media="download" \
  7605. file1="../directx9/directx_feb2010_redist.exe" \
  7606. installed_file1="${W_SYSTEM32_DLLS_WIN}/dmloader.dll"
  7607. load_dmloader()
  7608. {
  7609. helper_directx_dl
  7610. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  7611. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmloader.dll' "${W_TMP}/dxnt.cab"
  7612. w_override_dlls native dmloader
  7613. w_try_regsvr dmloader.dll
  7614. }
  7615. #----------------------------------------------------------------
  7616. w_metadata dmscript dlls \
  7617. title="MS dmscript.dll from DirectX user redistributable" \
  7618. publisher="Microsoft" \
  7619. year="2010" \
  7620. media="download" \
  7621. file1="../directx9/directx_feb2010_redist.exe" \
  7622. installed_file1="${W_SYSTEM32_DLLS_WIN}/dmscript.dll"
  7623. load_dmscript()
  7624. {
  7625. helper_directx_dl
  7626. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  7627. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmscript.dll' "${W_TMP}/dxnt.cab"
  7628. w_override_dlls native dmscript
  7629. w_try_regsvr dmscript.dll
  7630. }
  7631. #----------------------------------------------------------------
  7632. w_metadata dmstyle dlls \
  7633. title="MS dmstyle.dll from DirectX user redistributable" \
  7634. publisher="Microsoft" \
  7635. year="2010" \
  7636. media="download" \
  7637. file1="../directx9/directx_feb2010_redist.exe" \
  7638. installed_file1="${W_SYSTEM32_DLLS_WIN}/dmstyle.dll"
  7639. load_dmstyle()
  7640. {
  7641. helper_directx_dl
  7642. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  7643. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmstyle.dll' "${W_TMP}/dxnt.cab"
  7644. w_override_dlls native dmstyle
  7645. w_try_regsvr dmstyle.dll
  7646. }
  7647. #----------------------------------------------------------------
  7648. w_metadata dmsynth dlls \
  7649. title="MS dmsynth.dll from DirectX user redistributable" \
  7650. publisher="Microsoft" \
  7651. year="2010" \
  7652. media="download" \
  7653. file1="../directx9/directx_feb2010_redist.exe" \
  7654. installed_file1="${W_SYSTEM32_DLLS_WIN}/dmsynth.dll"
  7655. load_dmsynth()
  7656. {
  7657. helper_directx_dl
  7658. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  7659. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmsynth.dll' "${W_TMP}/dxnt.cab"
  7660. w_override_dlls native dmsynth
  7661. w_try_regsvr dmsynth.dll
  7662. }
  7663. #----------------------------------------------------------------
  7664. w_metadata dmusic dlls \
  7665. title="MS dmusic.dll from DirectX user redistributable" \
  7666. publisher="Microsoft" \
  7667. year="2010" \
  7668. media="download" \
  7669. file1="../directx9/directx_feb2010_redist.exe" \
  7670. installed_file1="${W_SYSTEM32_DLLS_WIN}/dmusic.dll"
  7671. load_dmusic()
  7672. {
  7673. helper_directx_dl
  7674. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  7675. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dmusic.dll' "${W_TMP}/dxnt.cab"
  7676. w_override_dlls native dmusic
  7677. w_try_regsvr dmusic.dll
  7678. }
  7679. #----------------------------------------------------------------
  7680. w_metadata dswave dlls \
  7681. title="MS dswave.dll from DirectX user redistributable" \
  7682. publisher="Microsoft" \
  7683. year="2010" \
  7684. media="download" \
  7685. file1="../directx9/directx_feb2010_redist.exe" \
  7686. installed_file1="${W_SYSTEM32_DLLS_WIN}/dswave.dll"
  7687. load_dswave()
  7688. {
  7689. helper_directx_dl
  7690. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  7691. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dswave.dll' "${W_TMP}/dxnt.cab"
  7692. w_override_dlls native dswave
  7693. w_try_regsvr dswave.dll
  7694. }
  7695. #----------------------------------------------------------------
  7696. w_metadata dotnet11 dlls \
  7697. title="MS .NET 1.1" \
  7698. publisher="Microsoft" \
  7699. year="2003" \
  7700. media="download" \
  7701. conflicts="dotnet20sdk" \
  7702. file1="dotnetfx.exe" \
  7703. installed_file1="${W_WINDIR_WIN}/Microsoft.NET/Framework/v1.1.4322/ndpsetup.ico"
  7704. load_dotnet11()
  7705. {
  7706. # The installer itself doesn't support 64-bit
  7707. w_package_unsupported_win64
  7708. # https://www.microsoft.com/en-us/download/details.aspx?id=26
  7709. w_download https://web.archive.org/web/20210505032023/http://download.microsoft.com/download/a/a/c/aac39226-8825-44ce-90e3-bf8203e74006/dotnetfx.exe ba0e58ec93f2ffd54fc7c627eeca9502e11ab3c6fc85dcbeff113bd61d995bce
  7710. w_call remove_mono internal
  7711. w_call corefonts
  7712. w_call fontfix
  7713. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  7714. # Use builtin regsvcs.exe to work around https://bugs.winehq.org/show_bug.cgi?id=25120
  7715. if [ -n "${W_OPT_UNATTENDED}" ]; then
  7716. WINEDLLOVERRIDES="regsvcs.exe=b" w_ahk_do "
  7717. SetTitleMatchMode, 2
  7718. run, dotnetfx.exe /q /C:\"install /q\"
  7719. Loop
  7720. {
  7721. sleep 1000
  7722. ifwinexist, Fatal error, Failed to delay load library
  7723. {
  7724. WinClose, Fatal error, Failed to delay load library
  7725. continue
  7726. }
  7727. Process, exist, dotnetfx.exe
  7728. dotnet_pid = %ErrorLevel% ; Save the value immediately since ErrorLevel is often changed.
  7729. if dotnet_pid = 0
  7730. {
  7731. break
  7732. }
  7733. }
  7734. "
  7735. else
  7736. WINEDLLOVERRIDES="regsvcs.exe=b" w_try "${WINE}" dotnetfx.exe
  7737. fi
  7738. w_override_dlls native mscorwks
  7739. w_override_dlls native fusion
  7740. W_NGEN_CMD="w_try ${WINE} ${W_DRIVE_C}/windows/Microsoft.NET/Framework/v1.1.4322/ngen.exe executequeueditems"
  7741. }
  7742. verify_dotnet11()
  7743. {
  7744. w_dotnet_verify dotnet11
  7745. }
  7746. #----------------------------------------------------------------
  7747. w_metadata dotnet11sp1 dlls \
  7748. title="MS .NET 1.1 SP1" \
  7749. publisher="Microsoft" \
  7750. year="2004" \
  7751. media="download" \
  7752. file1="NDP1.1sp1-KB867460-X86.exe" \
  7753. installed_file1="${W_WINDIR_WIN}/Microsoft.NET/Framework/v1.1.4322/CONFIG/web_hightrust.config.default"
  7754. load_dotnet11sp1()
  7755. {
  7756. # The installer itself doesn't support 64-bit
  7757. w_package_unsupported_win64
  7758. w_download https://msassist.com/files/dotNETframework/NDP1.1sp1-KB867460-X86.exe 2c0a35409ff0873cfa28b70b8224e9aca2362241c1f0ed6f622fef8d4722fd9a
  7759. w_call remove_mono internal
  7760. w_call dotnet11
  7761. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  7762. # Use builtin regsvcs.exe to work around https://bugs.winehq.org/show_bug.cgi?id=25120
  7763. if [ -n "${W_OPT_UNATTENDED}" ]; then
  7764. WINEDLLOVERRIDES="regsvcs.exe=b" w_ahk_do "
  7765. SetTitleMatchMode, 2
  7766. run, NDP1.1sp1-KB867460-X86.exe /q /C:"install /q"
  7767. Loop
  7768. {
  7769. sleep 1000
  7770. ifwinexist, Fatal error, Failed to delay load library
  7771. {
  7772. WinClose, Fatal error, Failed to delay load library
  7773. continue
  7774. }
  7775. Process, exist, dotnetfx.exe
  7776. dotnet_pid = %ErrorLevel% ; Save the value immediately since ErrorLevel is often changed.
  7777. if dotnet_pid = 0
  7778. {
  7779. break
  7780. }
  7781. }
  7782. "
  7783. else
  7784. WINEDLLOVERRIDES="regsvcs.exe=b" w_try "${WINE}" "${W_CACHE}"/dotnet11sp1/NDP1.1sp1-KB867460-X86.exe
  7785. fi
  7786. w_override_dlls native mscorwks
  7787. W_NGEN_CMD="w_try ${WINE} ${W_DRIVE_C}/windows/Microsoft.NET/Framework/v1.1.4322/ngen.exe executequeueditems"
  7788. }
  7789. verify_dotnet11sp1()
  7790. {
  7791. w_dotnet_verify dotnet11sp1
  7792. }
  7793. #----------------------------------------------------------------
  7794. w_metadata dotnet20 dlls \
  7795. title="MS .NET 2.0" \
  7796. publisher="Microsoft" \
  7797. year="2006" \
  7798. media="download" \
  7799. conflicts="dotnet20sp1 dotnet20sp2 dotnet30sp1 dotnet35" \
  7800. file1="dotnetfx.exe" \
  7801. installed_file1="${W_WINDIR_WIN}/Microsoft.NET/Framework/v2.0.50727/MSBuild.exe"
  7802. load_dotnet20()
  7803. {
  7804. w_call remove_mono internal
  7805. w_call fontfix
  7806. if [ "${W_ARCH}" = "win32" ]; then
  7807. # https://www.microsoft.com/en-us/download/details.aspx?id=19
  7808. w_download https://download.lenovo.com/ibmdl/pub/pc/pccbbs/thinkvantage_en/dotnetfx.exe 46693d9b74d12454d117cc61ff2e9481cabb100b4d74eb5367d3cf88b89a0e71
  7809. # Needed for https://bugs.winehq.org/show_bug.cgi?id=12401
  7810. w_store_winver
  7811. w_set_winver win2k
  7812. # if dotnet11 if installed there is a warning dialog, but it still verifies
  7813. # dotnet11 doesn't work on 64-bit, so no need to run there
  7814. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  7815. if [ -n "${W_OPT_UNATTENDED}" ]; then
  7816. w_ahk_do "
  7817. SetTitleMatchMode, 2
  7818. ; FIXME: this isn't silent?
  7819. run, dotnetfx.exe /q /c:\"install.exe /q\"
  7820. Loop
  7821. {
  7822. sleep 1000
  7823. ifwinexist, .NET Framework Initialization Error
  7824. {
  7825. WinClose, .NET Framework Initialization Error
  7826. continue
  7827. }
  7828. Process, exist, dotnetfx.exe
  7829. dotnet_pid = %ErrorLevel%
  7830. if dotnet_pid = 0
  7831. {
  7832. break
  7833. }
  7834. }
  7835. "
  7836. else
  7837. w_try_ms_installer "${WINE}" dotnetfx.exe ${W_OPT_UNATTENDED:+/q /c:"install.exe /q"}
  7838. fi
  7839. w_restore_winver
  7840. # We can't stop installing dotnet20 in win2k mode until Wine supports
  7841. # reparse/junction points
  7842. # (see https://bugs.winehq.org/show_bug.cgi?id=10467#c57 )
  7843. # so for now just remove the bogus msvc*80.dll files it installs.
  7844. # See also https://bugs.winehq.org/show_bug.cgi?id=16577
  7845. # This affects Victoria 2 demo, see https://forum.paradoxplaza.com/forum/showthread.php?p=11523967
  7846. rm -f "${W_SYSTEM32_DLLS}"/msvc?80.dll
  7847. elif [ "${W_ARCH}" = "win64" ]; then
  7848. w_download https://web.archive.org/web/20060509045320/https://download.microsoft.com/download/a/3/f/a3f1bf98-18f3-4036-9b68-8e6de530ce0a/NetFx64.exe 7ea86dca8eeaedcaa4a17370547ca2cea9e9b6774972b8e03d2cb1fb0e798669
  7849. # validates successfully in win7 mode wine-3.19, so not setting winversion
  7850. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  7851. w_try "${WINE}" NetFx64.exe ${W_OPT_UNATTENDED:+/q /c:"install.exe /q"}
  7852. fi
  7853. w_override_dlls native mscorwks
  7854. W_NGEN_CMD="w_try ${WINE} ${W_DRIVE_C}/windows/Microsoft.NET/Framework/v2.0.50727/ngen.exe executequeueditems"
  7855. }
  7856. verify_dotnet20()
  7857. {
  7858. w_dotnet_verify dotnet20
  7859. }
  7860. #----------------------------------------------------------------
  7861. w_metadata dotnet20sdk apps \
  7862. title="MS .NET 2.0 SDK" \
  7863. publisher="Microsoft" \
  7864. year="2006" \
  7865. media="download" \
  7866. conflicts="dotnet11 dotnet20sp1 dotnet20sp2 dotnet30 dotnet40" \
  7867. file1="setup.exe" \
  7868. installed_file1="${W_PROGRAMS_X86_WIN}/Microsoft.NET/SDK/v2.0/Bin/cordbg.exe"
  7869. load_dotnet20sdk()
  7870. {
  7871. w_package_unsupported_win64
  7872. # https://www.microsoft.com/en-us/download/details.aspx?id=19988
  7873. w_download https://web.archive.org/web/20111102051348/https://download.microsoft.com/download/c/4/b/c4b15d7d-6f37-4d5a-b9c6-8f07e7d46635/setup.exe 1d7337bfbb2c65f43c82d188688ce152af403bcb67a2cc2a3cc68a580ecd8200
  7874. w_call remove_mono internal
  7875. w_call dotnet20
  7876. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  7877. w_ahk_do "
  7878. SetTitleMatchMode, 2
  7879. run, setup.exe ${W_OPT_UNATTENDED:+/q /c:"install.exe /q"}
  7880. Loop
  7881. {
  7882. sleep 1000
  7883. ifwinexist, Microsoft Document Explorer, Application Data folder
  7884. {
  7885. WinClose, Microsoft Document Explorer, Application Data folder
  7886. continue
  7887. }
  7888. ifwinexist, Microsoft CLR Debugger, Application Data folder
  7889. {
  7890. WinClose, Microsoft CLR Debugger, Application Data folder
  7891. continue
  7892. }
  7893. ; FIXME: only appears if dotnet30sp1 is run first?
  7894. ifwinexist, Microsoft .NET Framework 2.0 SDK Setup, This wizard will guide
  7895. {
  7896. ControlClick, Button22, Microsoft .NET Framework 2.0 SDK Setup
  7897. Winwait, Microsoft .NET Framework 2.0 SDK Setup, By clicking
  7898. sleep 100
  7899. ControlClick, Button21
  7900. sleep 100
  7901. ControlClick, Button18
  7902. WinWait, Microsoft .NET Framework 2.0 SDK Setup, Select from
  7903. sleep 100
  7904. ControlClick, Button12
  7905. WinWait, Microsoft .NET Framework 2.0 SDK Setup, Type the path
  7906. sleep 100
  7907. ControlClick, Button8
  7908. WinWait, Microsoft .NET Framework 2.0 SDK Setup, successfully installed
  7909. sleep 100
  7910. ControlClick, Button2
  7911. sleep 100
  7912. }
  7913. Process, exist, setup.exe
  7914. dotnet_pid = %ErrorLevel%
  7915. if dotnet_pid = 0
  7916. {
  7917. break
  7918. }
  7919. }
  7920. "
  7921. }
  7922. #----------------------------------------------------------------
  7923. w_metadata dotnet20sp1 dlls \
  7924. title="MS .NET 2.0 SP1" \
  7925. publisher="Microsoft" \
  7926. year="2008" \
  7927. media="download" \
  7928. conflicts="dotnet20sp2" \
  7929. file1="NetFx20SP1_x86.exe" \
  7930. installed_file1="${W_WINDIR_WIN}/dotnet20sp1.installed.workaround"
  7931. load_dotnet20sp1()
  7932. {
  7933. w_call remove_mono internal
  7934. WINEDLLOVERRIDES="ngen.exe,regsvcs.exe,mscorsvw.exe=b;${WINEDLLOVERRIDES}"
  7935. export WINEDLLOVERRIDES
  7936. w_store_winver
  7937. if [ "${W_ARCH}" = "win32" ]; then
  7938. # https://www.microsoft.com/en-us/download/details.aspx?id=16614
  7939. w_download https://download.microsoft.com/download/0/8/c/08c19fa4-4c4f-4ffb-9d6c-150906578c9e/NetFx20SP1_x86.exe c36c3a1d074de32d53f371c665243196a7608652a2fc6be9520312d5ce560871
  7940. exe="NetFx20SP1_x86.exe"
  7941. w_warn "Setting Windows version so installer works"
  7942. w_set_winver win2k
  7943. elif [ "${W_ARCH}" = "win64" ]; then
  7944. # https://www.microsoft.com/en-us/download/details.aspx?id=6041
  7945. w_download https://download.microsoft.com/download/9/8/6/98610406-c2b7-45a4-bdc3-9db1b1c5f7e2/NetFx20SP1_x64.exe 1731e53de5f48baae0963677257660df1329549e81c48b4d7db7f7f3f2329aab
  7946. exe="NetFx20SP1_x64.exe"
  7947. w_warn "Setting Windows version so installer works"
  7948. w_set_winver winxp
  7949. fi
  7950. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  7951. w_try_ms_installer "${WINE}" "${exe}" ${W_OPT_UNATTENDED:+/q}
  7952. if [ "${W_ARCH}" = "win32" ]; then
  7953. # We can't stop installing dotnet20sp1 in win2k mode until Wine supports
  7954. # reparse/junction points
  7955. # (see https://bugs.winehq.org/show_bug.cgi?id=10467#c57 )
  7956. # so for now just remove the bogus msvc*80.dll files it installs.
  7957. # See also https://bugs.winehq.org/show_bug.cgi?id=16577
  7958. # This affects Victoria 2 demo, see https://forum.paradoxplaza.com/forum/showthread.php?p=11523967
  7959. rm -f "${W_SYSTEM32_DLLS}"/msvc?80.dll
  7960. fi
  7961. w_restore_winver
  7962. W_NGEN_CMD="w_try ${WINE} ${W_DRIVE_C}/windows/Microsoft.NET/Framework/v2.0.50727/ngen.exe executequeueditems"
  7963. w_override_dlls native mscorwks
  7964. # Installs the same file(name)s as dotnet35sp1, let users install dotnet35sp1 after dotnet20sp1
  7965. w_try touch "${W_WINDIR_UNIX}/dotnet20sp1.installed.workaround"
  7966. }
  7967. verify_dotnet20sp1()
  7968. {
  7969. w_dotnet_verify dotnet20sp1
  7970. }
  7971. #----------------------------------------------------------------
  7972. w_metadata dotnet20sp2 dlls \
  7973. title="MS .NET 2.0 SP2" \
  7974. publisher="Microsoft" \
  7975. year="2009" \
  7976. media="download" \
  7977. conflicts="dotnet11" \
  7978. file1="NetFx20SP2_x86.exe" \
  7979. installed_file1="${W_WINDIR_WIN}/winsxs/manifests/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.3053_x-ww_b80fa8ca.cat"
  7980. load_dotnet20sp2()
  7981. {
  7982. w_call remove_mono internal
  7983. WINEDLLOVERRIDES="ngen.exe=n;regsvcs.exe,mscorsvw.exe=b;${WINEDLLOVERRIDES}"
  7984. export WINEDLLOVERRIDES
  7985. w_warn "Setting Windows version so installer works"
  7986. w_store_winver
  7987. w_set_winver winxp
  7988. if [ "${W_ARCH}" = "win32" ]; then
  7989. # https://www.microsoft.com/en-us/download/details.aspx?id=1639
  7990. w_download https://web.archive.org/web/20210329003118/http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe 6e3f363366e7d0219b7cb269625a75d410a5c80d763cc3d73cf20841084e851f
  7991. exe="NetFx20SP2_x86.exe"
  7992. elif [ "${W_ARCH}" = "win64" ]; then
  7993. # https://www.microsoft.com/en-us/download/details.aspx?id=1639
  7994. w_download https://web.archive.org/web/20210328110521/http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x64.exe 430315c97c57ac158e7311bbdbb7130de3e88dcf5c450a25117c74403e558fbe
  7995. exe="NetFx20SP2_x64.exe"
  7996. fi
  7997. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  7998. w_try_ms_installer "${WINE}" "${exe}" ${W_OPT_UNATTENDED:+ /q /c:"install.exe /q"}
  7999. if [ "${W_ARCH}" = "win32" ]; then
  8000. # We can't stop installing dotnet20sp1 in win2k mode until Wine supports
  8001. # reparse/junction points
  8002. # (see https://bugs.winehq.org/show_bug.cgi?id=10467#c57 )
  8003. # so for now just remove the bogus msvc*80.dll files it installs.
  8004. # See also https://bugs.winehq.org/show_bug.cgi?id=16577
  8005. # This affects Victoria 2 demo, see https://forum.paradoxplaza.com/forum/showthread.php?p=11523967
  8006. rm -f "${W_SYSTEM32_DLLS}"/msvc?80.dll
  8007. fi
  8008. w_restore_winver
  8009. w_override_dlls native mscorwks
  8010. W_NGEN_CMD="w_try ${WINE} ${W_DRIVE_C}/windows/Microsoft.NET/Framework/v2.0.50727/ngen.exe executequeueditems"
  8011. }
  8012. verify_dotnet20sp2()
  8013. {
  8014. w_dotnet_verify dotnet20sp2
  8015. }
  8016. #----------------------------------------------------------------
  8017. w_metadata dotnet30 dlls \
  8018. title="MS .NET 3.0" \
  8019. publisher="Microsoft" \
  8020. year="2006" \
  8021. media="download" \
  8022. conflicts="dotnet11 dotnet30sp1 dotnet35 dotnet35sp1" \
  8023. file1="dotnetfx3.exe" \
  8024. installed_file1="${W_WINDIR_WIN}/Microsoft.NET/Framework/v3.0/Microsoft .NET Framework 3.0/logo.bmp"
  8025. load_dotnet30()
  8026. {
  8027. # I can't find a 64-bit installer anywhere
  8028. w_package_unsupported_win64
  8029. # Originally at https://msdn.microsoft.com/en-us/netframework/bb264589.aspx
  8030. # No longer on microsoft.com, and archive.org is unreliable. Choose amongst the oldest/most reliable looking from
  8031. # http://www.filewatcher.com/m/dotnetfx3.exe.52770576-0.html
  8032. # (and verify sha256sum, of course ;))
  8033. # 2017/04/20: http://descargas.udenar.edu.co/Framework.net/dotnetfx3.exe
  8034. # 2019/08/18: ftp://support.danbit.dk/I/IPP15-C2D/Net%20Framework%203.0/dotnetfx3.exe
  8035. # 2020/04/12: couldn't find a working mirror, so back to archive.org for now:
  8036. w_download https://web.archive.org/web/20061130220825/http://download.microsoft.com/download/3/F/0/3F0A922C-F239-4B9B-9CB0-DF53621C57D9/dotnetfx3.exe 6cf8921e00f52bbd888aa7a520a7bac47e818e2a850bcc44494c64d6cbfafdac
  8037. w_call remove_mono internal
  8038. if test -f /proc/sys/kernel/yama/ptrace_scope; then
  8039. case $(cat /proc/sys/kernel/yama/ptrace_scope) in
  8040. 0) ;;
  8041. *) w_warn "If install fails, set /proc/sys/kernel/yama/ptrace_scope to 0. See https://bugs.winehq.org/show_bug.cgi?id=30410" ;;
  8042. esac
  8043. fi
  8044. case "${W_PLATFORM}" in
  8045. windows_cmd)
  8046. osver=$(cmd /c ver)
  8047. case "${osver}" in
  8048. *Version?6*) w_die "Vista and up bundle .NET 3.0, so you can't install it like this" ;;
  8049. esac
  8050. ;;
  8051. esac
  8052. # AF's workaround to avoid long pause
  8053. LANGPACKS_BASE_PATH="${W_WINDIR_UNIX}/SYSMSICache/Framework/v3.0"
  8054. test -d "${LANGPACKS_BASE_PATH}" || w_try_mkdir "${LANGPACKS_BASE_PATH}"
  8055. # shellcheck disable=SC1010
  8056. for lang in ar cs da de el es fi fr he it jp ko nb nl pl pt-BR pt-PT ru sv tr zh-CHS zh-CHT; do
  8057. ln -sf "${W_SYSTEM32_DLLS}/spupdsvc.exe" "${LANGPACKS_BASE_PATH}/dotnetfx3langpack${lang}.exe"
  8058. done
  8059. w_store_winver
  8060. w_set_winver winxp
  8061. # Delete FontCache 3.0 service, it's in Wine for Mono, breaks native .NET
  8062. # OK if this fails, that just means you have an older Wine.
  8063. "${WINE}" sc delete "FontCache3.0.0.0"
  8064. WINEDLLOVERRIDES="ngen.exe,mscorsvw.exe=b;${WINEDLLOVERRIDES}"
  8065. export WINEDLLOVERRIDES
  8066. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  8067. w_warn "Installing .NET 3.0 runtime silently, as otherwise it gets hidden behind taskbar. Installation usually takes about 3 minutes."
  8068. w_try "${WINE}" "${file1}" /q /c:"install.exe /q"
  8069. w_override_dlls native mscorwks
  8070. w_restore_winver
  8071. # Doesn't install any ngen.exe
  8072. # W_NGEN_CMD=""
  8073. }
  8074. verify_dotnet30()
  8075. {
  8076. w_dotnet_verify dotnet30
  8077. }
  8078. #----------------------------------------------------------------
  8079. w_metadata dotnet30sp1 dlls \
  8080. title="MS .NET 3.0 SP1" \
  8081. publisher="Microsoft" \
  8082. year="2007" \
  8083. media="download" \
  8084. conflicts="dotnet11 dotnet20sdk" \
  8085. file1="NetFx30SP1_x86.exe" \
  8086. installed_file1="${W_WINDIR_WIN}/dotnet30sp1.installed.workaround"
  8087. load_dotnet30sp1()
  8088. {
  8089. # I can't find a 64-bit installer anywhere
  8090. w_package_unsupported_win64
  8091. # FIXME: URL?
  8092. w_download https://download.microsoft.com/download/8/F/E/8FEEE89D-9E4F-4BA3-993E-0FFEA8E21E1B/NetFx30SP1_x86.exe 3100df4d4db3965ead9520c887a534115cf6fc7ba100abde45226958b865695b
  8093. # Recipe from https://bugs.winehq.org/show_bug.cgi?id=25060#c10
  8094. # 2020/10/19: w_download https://download.microsoft.com/download/2/5/2/2526f55d-32bc-410f-be18-164ba67ae07d/XPSEP%20XP%20and%20Server%202003%2032%20bit.msi 630c86a202c40cbcd430701977d4f1fefa6151624ef9a4870040dff45e547dea "XPSEP XP and Server 2003 32 bit.msi"
  8095. w_download https://web.archive.org/web/20200810211554if_/https://download.microsoft.com/download/2/5/2/2526f55d-32bc-410f-be18-164ba67ae07d/XPSEP%20XP%20and%20Server%202003%2032%20bit.msi 630c86a202c40cbcd430701977d4f1fefa6151624ef9a4870040dff45e547dea "XPSEP XP and Server 2003 32 bit.msi"
  8096. w_call remove_mono internal
  8097. w_call dotnet30
  8098. w_wineserver -w
  8099. w_call dotnet20sp1
  8100. w_wineserver -w
  8101. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  8102. "${WINE}" reg add "HKLM\\Software\\Microsoft\\Net Framework Setup\\NDP\\v3.0" /v Version /t REG_SZ /d "3.0" /f
  8103. "${WINE}" reg add "HKLM\\Software\\Microsoft-\\Net Framework Setup\\NDP\\v3.0" /v SP /t REG_DWORD /d 0001 /f
  8104. w_store_winver
  8105. w_set_winver winxp
  8106. "${WINE}" sc delete FontCache3.0.0.0
  8107. w_try_ms_installer "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/q}
  8108. w_override_dlls native mscorwks
  8109. w_restore_winver
  8110. # Doesn't install any ngen.exe
  8111. # W_NGEN_CMD=""
  8112. # Do not rely on temporary files. As a workaround, touch a file instead so that we know it's been installed for list-installed
  8113. w_try touch "${W_WINDIR_UNIX}/dotnet30sp1.installed.workaround"
  8114. }
  8115. verify_dotnet30sp1()
  8116. {
  8117. w_dotnet_verify dotnet30sp1
  8118. }
  8119. #----------------------------------------------------------------
  8120. w_metadata dotnet35 dlls \
  8121. title="MS .NET 3.5" \
  8122. publisher="Microsoft" \
  8123. year="2007" \
  8124. media="download" \
  8125. conflicts="dotnet11 dotnet20sdk dotnet20sp2 dotnet30" \
  8126. file1="dotnetfx35.exe" \
  8127. installed_file1="${W_WINDIR_WIN}/Microsoft.NET/Framework/v3.5/MSBuild.exe"
  8128. load_dotnet35()
  8129. {
  8130. # actually, fixed in 6.0-rc2, but w_package_broken() doesn't handle rc versions well
  8131. w_package_broken_win64 https://bugs.winehq.org/show_bug.cgi?id=49690 5.12 6.0
  8132. w_verify_cabextract_available
  8133. # https://www.microsoft.com/en-us/download/details.aspx?id=21
  8134. w_download https://download.microsoft.com/download/6/0/f/60fc5854-3cb8-4892-b6db-bd4f42510f28/dotnetfx35.exe 3e3a4104bad9a0c270ed5cbe8abb986de9afaf0281a98998bdbdc8eaab85c3b6
  8135. w_call remove_mono internal
  8136. w_store_winver
  8137. w_set_winver winxp
  8138. w_override_dlls native mscoree mscorwks
  8139. w_wineserver -w
  8140. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  8141. w_try_ms_installer "${WINE}" "${file1}" /lang:ENU ${W_OPT_UNATTENDED:+/q}
  8142. w_restore_winver
  8143. # Doesn't install any ngen.exe
  8144. # W_NGEN_CMD=""
  8145. }
  8146. verify_dotnet35()
  8147. {
  8148. w_dotnet_verify dotnet35
  8149. }
  8150. #----------------------------------------------------------------
  8151. w_metadata dotnet35sp1 dlls \
  8152. title="MS .NET 3.5 SP1" \
  8153. publisher="Microsoft" \
  8154. year="2008" \
  8155. media="download" \
  8156. conflicts="dotnet11 dotnet20sp1" \
  8157. file1="dotnetfx35.exe" \
  8158. installed_file1="${W_WINDIR_WIN}/Microsoft.NET/Framework/v3.5/msbuild.exe.config"
  8159. load_dotnet35sp1()
  8160. {
  8161. w_package_broken_win64 https://bugs.winehq.org/show_bug.cgi?id=49690 5.12 6.0
  8162. w_verify_cabextract_available
  8163. # Official version. See https://dotnet.microsoft.com/en-us/download/dotnet-framework/net35-sp1
  8164. w_download https://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe 0582515bde321e072f8673e829e175ed2e7a53e803127c50253af76528e66bc1
  8165. w_call remove_mono internal
  8166. w_store_winver
  8167. w_set_winver winxp
  8168. w_override_dlls native mscoree mscorwks
  8169. w_wineserver -w
  8170. # The installer is braindead and picks the lowest drive letter that's writable
  8171. # winetricks_set_wineprefix(), which is called by w_do_call() sets up this symlink so that wine
  8172. # can make a windows path to the cache (which is removed during cleanup).
  8173. # To avoid that, we sylmink the executable directly and remove the symlink
  8174. # and then the installer leaves the cruft on C:\ instead (assuming there's no other drives mounted).
  8175. #
  8176. # If the user has other drives mounted (or maybe if Z:\ is writable),
  8177. # then they have to clean up the mess themselves, sorry.
  8178. w_try rm "${WINETRICKS_CACHE_SYMLINK}"
  8179. w_try_cd "${W_TMP}"
  8180. w_try ln -s "${W_CACHE}/${W_PACKAGE}/${file1}" .
  8181. WINEDLLOVERRIDES="ngen.exe=n" w_try_ms_installer "${WINE}" dotnetfx35.exe /lang:ENU ${W_OPT_UNATTENDED:+/q}
  8182. w_try rm dotnetfx35.exe
  8183. w_restore_winver
  8184. # Doesn't install any ngen.exe
  8185. # W_NGEN_CMD=""
  8186. }
  8187. verify_dotnet35sp1()
  8188. {
  8189. w_dotnet_verify dotnet35sp1
  8190. }
  8191. #----------------------------------------------------------------
  8192. w_metadata dotnet40 dlls \
  8193. title="MS .NET 4.0" \
  8194. publisher="Microsoft" \
  8195. year="2011" \
  8196. media="download" \
  8197. conflicts="dotnet20sdk" \
  8198. file1="dotNetFx40_Full_x86_x64.exe" \
  8199. installed_file1="${W_WINDIR_WIN}/Microsoft.NET/Framework/v4.0.30319/ngen.exe"
  8200. load_dotnet40()
  8201. {
  8202. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49532" 5.12 5.18
  8203. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=52722" 7.5 7.6
  8204. w_package_warn_win64
  8205. case "${W_PLATFORM}" in
  8206. windows_cmd) ;;
  8207. *) w_warn "dotnet40 does not yet fully work or install on wine. Caveat emptor." ;;
  8208. esac
  8209. # Official version. See https://dotnet.microsoft.com/download/dotnet-framework/net40
  8210. w_download https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe 65e064258f2e418816b304f646ff9e87af101e4c9552ab064bb74d281c38659f
  8211. w_call remove_mono internal
  8212. w_store_winver
  8213. w_call winxp
  8214. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  8215. WINEDLLOVERRIDES=fusion=b w_try_ms_installer "${WINE}" dotNetFx40_Full_x86_x64.exe ${W_OPT_UNATTENDED:+/q /c:"install.exe /q"}
  8216. w_override_dlls native mscoree
  8217. "${WINE}" reg add "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full" /v Install /t REG_DWORD /d 0001 /f
  8218. "${WINE}" reg add "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full" /v Version /t REG_SZ /d "4.0.30319" /f
  8219. W_NGEN_CMD="${WINE} ${WINEPREFIX}/drive_c/windows/Microsoft.NET/Framework/v4.0.30319/ngen.exe executequeueditems"
  8220. # Avoid a popup on WINEPREFIX updates, see https://bugs.winehq.org/show_bug.cgi?id=41727#c5
  8221. "${WINE}" reg add "HKLM\\Software\\Microsoft\\.NETFramework" /v OnlyUseLatestCLR /t REG_DWORD /d 0001 /f
  8222. # See https://bugs.winehq.org/show_bug.cgi?id=47277#c9
  8223. case "${LANG}" in
  8224. C|en_US.UTF-8*) ;;
  8225. zh_CN*) w_warn "You may encounter infinite loops when trying to use applications that use WPF. Use LC_ALL=C when running your application as a workaround."
  8226. # Based on the bug, there may be other locales that are affected. But in the absence of a full list
  8227. # I don't think it's worth warning *every* non-en_US.UTF-8 user:
  8228. # *) w_warn "
  8229. esac
  8230. w_restore_winver
  8231. }
  8232. verify_dotnet40()
  8233. {
  8234. w_dotnet_verify dotnet40
  8235. }
  8236. #----------------------------------------------------------------
  8237. w_metadata dotnet40_kb2468871 dlls \
  8238. title="MS .NET 4.0 KB2468871" \
  8239. publisher="Microsoft" \
  8240. year="2011" \
  8241. media="download" \
  8242. conflicts="dotnet20sdk" \
  8243. file1="NDP40-KB2468871-v2-x86.exe"
  8244. load_dotnet40_kb2468871()
  8245. {
  8246. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49532" 5.12 5.18
  8247. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=52722" 7.5 7.6
  8248. w_call dotnet40
  8249. # Install KB2468871:
  8250. if [ "${W_ARCH}" = "win32" ]; then
  8251. w_download https://download.microsoft.com/download/2/B/F/2BF4D7D1-E781-4EE0-9E4F-FDD44A2F8934/NDP40-KB2468871-v2-x86.exe 8822672fc864544e0766c80b635973bd9459d719b1af75f51483ff36cfb26f03
  8252. w_try_7z "${W_TMP}" "${W_CACHE}/${W_PACKAGE}/NDP40-KB2468871-v2-x86.exe" NDP40-KB2468871.msp
  8253. elif [ "${W_ARCH}" = "win64" ]; then
  8254. w_download https://download.microsoft.com/download/2/B/F/2BF4D7D1-E781-4EE0-9E4F-FDD44A2F8934/NDP40-KB2468871-v2-x64.exe b1b53c3953377b111fe394dd57592d342cfc8a3261a5575253b211c1c2e48ff8
  8255. w_try_7z "${W_TMP}" "${W_CACHE}/${W_PACKAGE}/NDP40-KB2468871-v2-x64.exe" NDP40-KB2468871.msp
  8256. fi
  8257. w_try_cd "${W_TMP}"
  8258. WINEDLLOVERRIDES="ngen.exe=n" w_try "${WINE}" msiexec /p NDP40-KB2468871.msp
  8259. # See https://bugs.winehq.org/show_bug.cgi?id=47277#c9
  8260. case "${LANG}" in
  8261. C|en_US.UTF-8*) ;;
  8262. zh_CN*) w_warn "You may encounter infinite loops when trying to use applications that use WPF. Use LC_ALL=C when running your application as a workaround."
  8263. # Based on the bug, there may be other locales that are affected. But in the absence of a full list
  8264. # I don't think it's worth warning *every* non-en_US.UTF-8 user:
  8265. # *) w_warn "
  8266. esac
  8267. }
  8268. verify_dotnet40_kb2468871()
  8269. {
  8270. w_dotnet_verify dotnet40
  8271. }
  8272. #----------------------------------------------------------------
  8273. w_metadata dotnet45 dlls \
  8274. title="MS .NET 4.5" \
  8275. publisher="Microsoft" \
  8276. year="2012" \
  8277. media="download" \
  8278. conflicts="dotnet20sdk" \
  8279. file1="dotnetfx45_full_x86_x64.exe" \
  8280. installed_file1="${W_WINDIR_WIN}/Microsoft.NET/Framework/v4.0.30319/Microsoft.Windows.ApplicationServer.Applications.45.man"
  8281. load_dotnet45()
  8282. {
  8283. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49532" 5.12 5.18
  8284. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49897" 5.18 6.6
  8285. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=52722" 7.5 7.6
  8286. w_package_warn_win64
  8287. w_verify_cabextract_available
  8288. # Official version. See https://dotnet.microsoft.com/download/dotnet-framework/net45
  8289. w_download https://download.microsoft.com/download/b/a/4/ba4a7e71-2906-4b2d-a0e1-80cf16844f5f/dotnetfx45_full_x86_x64.exe a04d40e217b97326d46117d961ec4eda455e087b90637cb33dd6cc4a2c228d83
  8290. w_call remove_mono internal
  8291. # See https://appdb.winehq.org/objectManager.php?sClass=version&iId=25478 for Focht's recipe
  8292. # Seems unneeded in wine-2.0
  8293. # w_call dotnet35
  8294. w_call dotnet40
  8295. w_set_winver win7
  8296. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  8297. WINEDLLOVERRIDES=fusion=b w_try_ms_installer "${WINE}" dotnetfx45_full_x86_x64.exe ${W_OPT_UNATTENDED:+/q /c:"install.exe /q"}
  8298. w_override_dlls native mscoree
  8299. # Avoid a popup on WINEPREFIX updates, see https://bugs.winehq.org/show_bug.cgi?id=41727#c5
  8300. "${WINE}" reg add "HKLM\\Software\\Microsoft\\.NETFramework" /v OnlyUseLatestCLR /t REG_DWORD /d 0001 /f
  8301. w_warn "Setting Windows version to 2003, otherwise applications using .NET 4.5 will subtly fail"
  8302. w_set_winver win2k3
  8303. # See https://bugs.winehq.org/show_bug.cgi?id=47277#c9
  8304. case "${LANG}" in
  8305. C|en_US.UTF-8*) ;;
  8306. zh_CN*) w_warn "You may encounter infinite loops when trying to use applications that use WPF. Use LC_ALL=C when running your application as a workaround."
  8307. # Based on the bug, there may be other locales that are affected. But in the absence of a full list
  8308. # I don't think it's worth warning *every* non-en_US.UTF-8 user:
  8309. # *) w_warn "
  8310. esac
  8311. }
  8312. verify_dotnet45()
  8313. {
  8314. w_dotnet_verify dotnet45
  8315. }
  8316. #----------------------------------------------------------------
  8317. w_metadata dotnet452 dlls \
  8318. title="MS .NET 4.5.2" \
  8319. publisher="Microsoft" \
  8320. year="2012" \
  8321. media="download" \
  8322. conflicts="dotnet20sdk dotnet46 dotnet462" \
  8323. file1="NDP452-KB2901907-x86-x64-AllOS-ENU.exe" \
  8324. installed_file1="${W_WINDIR_WIN}/Microsoft.NET/Framework/v4.0.30319/Microsoft.Windows.ApplicationServer.Applications.45.man"
  8325. load_dotnet452()
  8326. {
  8327. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49532" 5.12 5.18
  8328. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49897" 5.18 6.6
  8329. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=52722" 7.5 7.6
  8330. w_package_warn_win64
  8331. w_verify_cabextract_available
  8332. # Official version. See https://dotnet.microsoft.com/download/dotnet-framework/net452
  8333. w_download https://download.microsoft.com/download/E/2/1/E21644B5-2DF2-47C2-91BD-63C560427900/NDP452-KB2901907-x86-x64-AllOS-ENU.exe 6c2c589132e830a185c5f40f82042bee3022e721a216680bd9b3995ba86f3781
  8334. w_call remove_mono internal
  8335. # See https://appdb.winehq.org/objectManager.php?sClass=version&iId=25478 for Focht's recipe
  8336. # Seems unneeded in wine-2.0
  8337. # w_call dotnet35
  8338. w_call dotnet40
  8339. w_set_winver win7
  8340. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  8341. WINEDLLOVERRIDES=fusion=b w_try_ms_installer "${WINE}" NDP452-KB2901907-x86-x64-AllOS-ENU.exe ${W_OPT_UNATTENDED:+/q /c:"install.exe /q"}
  8342. w_override_dlls native mscoree
  8343. w_warn "Setting Windows version to 2003, otherwise applications using .NET 4.5 will subtly fail"
  8344. w_set_winver win2k3
  8345. # See https://bugs.winehq.org/show_bug.cgi?id=47277#c9
  8346. case "${LANG}" in
  8347. C|en_US.UTF-8*) ;;
  8348. zh_CN*) w_warn "You may encounter infinite loops when trying to use applications that use WPF. Use LC_ALL=C when running your application as a workaround."
  8349. # Based on the bug, there may be other locales that are affected. But in the absence of a full list
  8350. # I don't think it's worth warning *every* non-en_US.UTF-8 user:
  8351. # *) w_warn "
  8352. esac
  8353. }
  8354. verify_dotnet452()
  8355. {
  8356. w_dotnet_verify dotnet452
  8357. }
  8358. #----------------------------------------------------------------
  8359. w_metadata dotnet46 dlls \
  8360. title="MS .NET 4.6" \
  8361. publisher="Microsoft" \
  8362. year="2015" \
  8363. media="download" \
  8364. file1="NDP46-KB3045557-x86-x64-AllOS-ENU.exe" \
  8365. conflicts="dotnet20sdk" \
  8366. installed_file1="${W_WINDIR_WIN}/Migration/WTR/netfx45_upgradecleanup.inf"
  8367. load_dotnet46()
  8368. {
  8369. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49532" 5.12 5.18
  8370. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=52722" 7.5 7.6
  8371. w_package_warn_win64
  8372. # Official version. See https://dotnet.microsoft.com/download/dotnet-framework/net46
  8373. w_download https://download.microsoft.com/download/6/F/9/6F9673B1-87D1-46C4-BF04-95F24C3EB9DA/enu_netfx/NDP46-KB3045557-x86-x64-AllOS-ENU_exe/NDP46-KB3045557-x86-x64-AllOS-ENU.exe b21d33135e67e3486b154b11f7961d8e1cfd7a603267fb60febb4a6feab5cf87
  8374. w_call remove_mono internal
  8375. w_call dotnet45
  8376. w_set_winver win7
  8377. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  8378. WINEDLLOVERRIDES=fusion=b w_try_ms_installer "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/q /c:"install.exe /q"}
  8379. w_override_dlls native mscoree
  8380. # See https://bugs.winehq.org/show_bug.cgi?id=47277#c9
  8381. case "${LANG}" in
  8382. C|en_US.UTF-8*) ;;
  8383. zh_CN*) w_warn "You may encounter infinite loops when trying to use applications that use WPF. Use LC_ALL=C when running your application as a workaround."
  8384. # Based on the bug, there may be other locales that are affected. But in the absence of a full list
  8385. # I don't think it's worth warning *every* non-en_US.UTF-8 user:
  8386. # *) w_warn "
  8387. esac
  8388. }
  8389. verify_dotnet46()
  8390. {
  8391. w_dotnet_verify dotnet46
  8392. }
  8393. #----------------------------------------------------------------
  8394. w_metadata dotnet461 dlls \
  8395. title="MS .NET 4.6.1" \
  8396. publisher="Microsoft" \
  8397. year="2015" \
  8398. media="download" \
  8399. file1="NDP461-KB3102436-x86-x64-AllOS-ENU.exe" \
  8400. conflicts="dotnet20sdk" \
  8401. installed_file1="${W_WINDIR_WIN}/dotnet461.installed.workaround"
  8402. load_dotnet461()
  8403. {
  8404. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49532" 5.12 5.18
  8405. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=52722" 7.5 7.6
  8406. w_package_warn_win64
  8407. # Official version. See https://dotnet.microsoft.com/download/dotnet-framework/net461
  8408. w_download https://download.microsoft.com/download/E/4/1/E4173890-A24A-4936-9FC9-AF930FE3FA40/NDP461-KB3102436-x86-x64-AllOS-ENU.exe beaa901e07347d056efe04e8961d5546c7518fab9246892178505a7ba631c301
  8409. w_call remove_mono internal
  8410. w_call dotnet46
  8411. w_set_winver win7
  8412. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  8413. WINEDLLOVERRIDES=fusion=b w_try_ms_installer "${WINE}" "${file1}" /sfxlang:1027 ${W_OPT_UNATTENDED:+/q /norestart}
  8414. w_override_dlls native mscoree
  8415. # Do not rely on temporary files. As a workaround, touch a file instead so that we know it's been installed for list-installed
  8416. w_try touch "${W_WINDIR_UNIX}/dotnet461.installed.workaround"
  8417. # See https://bugs.winehq.org/show_bug.cgi?id=47277#c9
  8418. case "${LANG}" in
  8419. C|en_US.UTF-8*) ;;
  8420. zh_CN*) w_warn "You may encounter infinite loops when trying to use applications that use WPF. Use LC_ALL=C when running your application as a workaround."
  8421. # Based on the bug, there may be other locales that are affected. But in the absence of a full list
  8422. # I don't think it's worth warning *every* non-en_US.UTF-8 user:
  8423. # *) w_warn "
  8424. esac
  8425. }
  8426. verify_dotnet461()
  8427. {
  8428. w_dotnet_verify dotnet461
  8429. }
  8430. #----------------------------------------------------------------
  8431. w_metadata dotnet462 dlls \
  8432. title="MS .NET 4.6.2" \
  8433. publisher="Microsoft" \
  8434. year="2016" \
  8435. media="download" \
  8436. conflicts="dotnet20sdk" \
  8437. installed_file1="${W_WINDIR_WIN}/dotnet462.installed.workaround"
  8438. load_dotnet462()
  8439. {
  8440. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49532" 5.12 5.18
  8441. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=52722" 7.5 7.6
  8442. w_package_warn_win64
  8443. # Official version. See https://dotnet.microsoft.com/download/dotnet-framework/net462
  8444. w_download https://download.visualstudio.microsoft.com/download/pr/8e396c75-4d0d-41d3-aea8-848babc2736a/80b431456d8866ebe053eb8b81a168b3/NDP462-KB3151800-x86-x64-AllOS-ENU.exe b4cbb4bc9a3983ec3be9f80447e0d619d15256a9ce66ff414ae6e3856705e237
  8445. file_package="NDP462-KB3151800-x86-x64-AllOS-ENU.exe"
  8446. w_call remove_mono internal
  8447. w_call dotnet461
  8448. w_set_winver win7
  8449. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  8450. WINEDLLOVERRIDES=fusion=b w_try_ms_installer "${WINE}" "${file_package}" ${W_OPT_UNATTENDED:+/sfxlang:1027 /q /norestart}
  8451. w_override_dlls native mscoree
  8452. # Unfortunately, dotnet462 install the same files that dotnet461 does, but with different checksums
  8453. # The only unique files are temporary ones. As a workaround, touch a file instead so that we know it's been installed for list-installed
  8454. w_try touch "${W_WINDIR_UNIX}/dotnet462.installed.workaround"
  8455. # See https://bugs.winehq.org/show_bug.cgi?id=47277#c9
  8456. case "${LANG}" in
  8457. C|en_US.UTF-8*) ;;
  8458. zh_CN*) w_warn "You may encounter infinite loops when trying to use applications that use WPF. Use LC_ALL=C when running your application as a workaround."
  8459. # Based on the bug, there may be other locales that are affected. But in the absence of a full list
  8460. # I don't think it's worth warning *every* non-en_US.UTF-8 user:
  8461. # *) w_warn "
  8462. esac
  8463. }
  8464. verify_dotnet462()
  8465. {
  8466. w_dotnet_verify dotnet462
  8467. }
  8468. #----------------------------------------------------------------
  8469. w_metadata dotnet471 dlls \
  8470. title="MS .NET 4.7.1" \
  8471. publisher="Microsoft" \
  8472. year="2017" \
  8473. media="download" \
  8474. file1="NDP471-KB4033342-x86-x64-AllOS-ENU.exe" \
  8475. conflicts="dotnet20sdk dotnet30sp1" \
  8476. installed_file1="${W_WINDIR_WIN}/dotnet471.installed.workaround"
  8477. load_dotnet471()
  8478. {
  8479. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49532" 5.12 5.18
  8480. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=52722" 7.5 7.6
  8481. w_package_warn_win64
  8482. # Official version. See https://dotnet.microsoft.com/download/dotnet-framework/net471
  8483. w_download https://download.visualstudio.microsoft.com/download/pr/4312fa21-59b0-4451-9482-a1376f7f3ba4/9947fce13c11105b48cba170494e787f/NDP471-KB4033342-x86-x64-AllOS-ENU.exe df6e700d37ff416e2e1d8463dededdf76522ceaf5bb4cc3f197a7f2b9eccc4ad
  8484. w_call remove_mono internal
  8485. w_call dotnet462
  8486. w_set_winver win7
  8487. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  8488. WINEDLLOVERRIDES=fusion=b w_try_ms_installer "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/sfxlang:1027 /q /norestart}
  8489. w_override_dlls native mscoree
  8490. # Do not rely on temporary files. As a workaround, touch a file instead so that we know it's been installed for list-installed
  8491. w_try touch "${W_WINDIR_UNIX}/dotnet471.installed.workaround"
  8492. # See https://bugs.winehq.org/show_bug.cgi?id=47277#c9
  8493. case "${LANG}" in
  8494. C|en_US.UTF-8*) ;;
  8495. zh_CN*) w_warn "You may encounter infinite loops when trying to use applications that use WPF. Use LC_ALL=C when running your application as a workaround."
  8496. # Based on the bug, there may be other locales that are affected. But in the absence of a full list
  8497. # I don't think it's worth warning *every* non-en_US.UTF-8 user:
  8498. # *) w_warn "
  8499. esac
  8500. }
  8501. verify_dotnet471()
  8502. {
  8503. w_dotnet_verify dotnet471
  8504. }
  8505. #----------------------------------------------------------------
  8506. w_metadata dotnet472 dlls \
  8507. title="MS .NET 4.7.2" \
  8508. publisher="Microsoft" \
  8509. year="2018" \
  8510. media="download" \
  8511. conflicts="dotnet20sdk" \
  8512. installed_file1="${W_WINDIR_WIN}/dotnet472.installed.workaround"
  8513. load_dotnet472()
  8514. {
  8515. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49532" 5.12 5.18
  8516. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=52722" 7.5 7.6
  8517. w_package_warn_win64
  8518. # Official version. See https://dotnet.microsoft.com/download/dotnet-framework/net472
  8519. w_download https://download.visualstudio.microsoft.com/download/pr/1f5af042-d0e4-4002-9c59-9ba66bcf15f6/089f837de42708daacaae7c04b7494db/NDP472-KB4054530-x86-x64-AllOS-ENU.exe 5cb624b97f9fd6d3895644c52231c9471cd88aacb57d6e198d3024a1839139f6
  8520. w_call remove_mono internal
  8521. w_call dotnet462
  8522. w_set_winver win7
  8523. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  8524. WINEDLLOVERRIDES=fusion=b w_try_ms_installer "${WINE}" NDP472-KB4054530-x86-x64-AllOS-ENU.exe ${W_OPT_UNATTENDED:+/sfxlang:1027 /q /norestart}
  8525. w_override_dlls native mscoree
  8526. # Do not rely on temporary files. As a workaround, touch a file instead so that we know it's been installed for list-installed
  8527. w_try touch "${W_WINDIR_UNIX}/dotnet472.installed.workaround"
  8528. # See https://bugs.winehq.org/show_bug.cgi?id=47277#c9
  8529. case "${LANG}" in
  8530. C|en_US.UTF-8*) ;;
  8531. zh_CN*) w_warn "You may encounter infinite loops when trying to use applications that use WPF. Use LC_ALL=C when running your application as a workaround."
  8532. # Based on the bug, there may be other locales that are affected. But in the absence of a full list
  8533. # I don't think it's worth warning *every* non-en_US.UTF-8 user:
  8534. # *) w_warn "
  8535. esac
  8536. }
  8537. verify_dotnet472()
  8538. {
  8539. w_dotnet_verify dotnet472
  8540. }
  8541. #----------------------------------------------------------------
  8542. w_metadata dotnet48 dlls \
  8543. title="MS .NET 4.8" \
  8544. publisher="Microsoft" \
  8545. year="2019" \
  8546. media="download" \
  8547. file1="ndp48-x86-x64-allos-enu.exe" \
  8548. conflicts="dotnet20sdk" \
  8549. installed_file1="${W_WINDIR_WIN}/dotnet48.installed.workaround"
  8550. load_dotnet48()
  8551. {
  8552. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49532" 5.12 5.18
  8553. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49897" 5.18 6.6
  8554. w_package_warn_win64
  8555. # Official version. See https://dotnet.microsoft.com/download/dotnet-framework/net48
  8556. w_download https://download.visualstudio.microsoft.com/download/pr/7afca223-55d2-470a-8edc-6a1739ae3252/abd170b4b0ec15ad0222a809b761a036/ndp48-x86-x64-allos-enu.exe 95889d6de3f2070c07790ad6cf2000d33d9a1bdfc6a381725ab82ab1c314fd53
  8557. w_call remove_mono internal
  8558. w_call dotnet40
  8559. w_set_winver win7
  8560. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  8561. WINEDLLOVERRIDES=fusion=b w_try_ms_installer "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/sfxlang:1027 /q /norestart}
  8562. w_override_dlls native mscoree
  8563. # Do not rely on temporary files. As a workaround, touch a file instead so that we know it's been installed for list-installed
  8564. w_try touch "${W_WINDIR_UNIX}/dotnet48.installed.workaround"
  8565. # See https://bugs.winehq.org/show_bug.cgi?id=47277#c9
  8566. case "${LANG}" in
  8567. C|en_US.UTF-8*) ;;
  8568. zh_CN*) w_warn "You may encounter infinite loops when trying to use applications that use WPF. Use LC_ALL=C when running your application as a workaround."
  8569. # Based on the bug, there may be other locales that are affected. But in the absence of a full list
  8570. # I don't think it's worth warning *every* non-en_US.UTF-8 user:
  8571. # *) w_warn "
  8572. esac
  8573. }
  8574. verify_dotnet48()
  8575. {
  8576. w_dotnet_verify dotnet48
  8577. }
  8578. #----------------------------------------------------------------
  8579. w_metadata dotnetcore2 dlls \
  8580. title="MS .NET Core Runtime 2.1 LTS" \
  8581. publisher="Microsoft" \
  8582. year="2020" \
  8583. media="download" \
  8584. file1="dotnet-runtime-2.1.17-win-x86.exe" \
  8585. installed_file1="${W_PROGRAMS_WIN}/dotnet/dotnet.exe"
  8586. load_dotnetcore2()
  8587. {
  8588. # Official version, see https://dotnet.microsoft.com/download/dotnet-core/2.1
  8589. w_download https://download.visualstudio.microsoft.com/download/pr/73a0ea97-57d6-4263-ac36-ea3a9b373bcf/cd5f7e08e749c1d3468cdae89e4518de/dotnet-runtime-2.1.17-win-x86.exe 706a7f0ad998c3c1b321e89e4bcd6304bef31c95c83eda119e8d4adccccbc915
  8590. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  8591. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/quiet}
  8592. if [ "${W_ARCH}" = "win64" ]; then
  8593. # Also install the 64-bit version
  8594. w_download https://download.visualstudio.microsoft.com/download/pr/cd223083-8c0e-4963-9fcd-fcf01a55e56c/15500e764899442ed6e014687caa34e9/dotnet-runtime-2.1.17-win-x64.exe 5a065ae6f9e031399cb7084c6315ce977342dec069cd6386caed1c5b69d49260
  8595. w_try "${WINE}" "dotnet-runtime-2.1.17-win-x64.exe" ${W_OPT_UNATTENDED:+/quiet}
  8596. fi
  8597. }
  8598. #----------------------------------------------------------------
  8599. w_metadata dotnetcore3 dlls \
  8600. title="MS .NET Core Runtime 3.1 LTS" \
  8601. publisher="Microsoft" \
  8602. year="2020" \
  8603. media="download" \
  8604. file1="dotnet-runtime-3.1.10-win-x86.exe" \
  8605. installed_file1="${W_PROGRAMS_WIN}/dotnet/dotnet.exe"
  8606. load_dotnetcore3()
  8607. {
  8608. # Official version, see https://dotnet.microsoft.com/download/dotnet-core/3.1
  8609. w_download https://download.visualstudio.microsoft.com/download/pr/abb3fb5d-4e82-4ca8-bc03-ac13e988e608/b34036773a72b30c5dc5520ee6a2768f/dotnet-runtime-3.1.10-win-x86.exe 6ae8d2fb7a23ac4770fa815bc27614b2db0e89f5c078eb2744771bf5541cdba3
  8610. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  8611. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/quiet}
  8612. if [ "${W_ARCH}" = "win64" ]; then
  8613. # Also install the 64-bit version
  8614. w_download https://download.visualstudio.microsoft.com/download/pr/9845b4b0-fb52-48b6-83cf-4c431558c29b/41025de7a76639eeff102410e7015214/dotnet-runtime-3.1.10-win-x64.exe 78ef39c732ec35e79a0c1a10010ea797733df2811d774709b0fde23dce02efdf
  8615. w_try "${WINE}" "dotnet-runtime-3.1.10-win-x64.exe" ${W_OPT_UNATTENDED:+/quiet}
  8616. fi
  8617. }
  8618. #----------------------------------------------------------------
  8619. w_metadata dotnetcoredesktop3 dlls \
  8620. title="MS .NET Core Desktop Runtime 3.1 LTS" \
  8621. publisher="Microsoft" \
  8622. year="2020" \
  8623. media="download" \
  8624. file1="windowsdesktop-runtime-3.1.10-win-x86.exe" \
  8625. installed_file1="${W_PROGRAMS_WIN}/dotnet/dotnet.exe"
  8626. load_dotnetcoredesktop3()
  8627. {
  8628. # Official version, see https://dotnet.microsoft.com/download/dotnet-core/3.1
  8629. w_download https://download.visualstudio.microsoft.com/download/pr/865d0be5-16e2-4b3d-a990-f4c45acd280c/ec867d0a4793c0b180bae85bc3a4f329/windowsdesktop-runtime-3.1.10-win-x86.exe 4da245d9048642ed3f25c04e8fa0156e1d2966b4d257c12a9a3d3a0c929102aa
  8630. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  8631. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/quiet}
  8632. if [ "${W_ARCH}" = "win64" ]; then
  8633. # Also install the 64-bit version
  8634. w_download https://download.visualstudio.microsoft.com/download/pr/513acf37-8da2-497d-bdaa-84d6e33c1fee/eb7b010350df712c752f4ec4b615f89d/windowsdesktop-runtime-3.1.10-win-x64.exe 32286b9a35d9a53d28807ef761f3dba43b71e602efd2b794f843fcf5ea8438a9
  8635. w_try "${WINE}" "windowsdesktop-runtime-3.1.10-win-x64.exe" ${W_OPT_UNATTENDED:+/quiet}
  8636. fi
  8637. }
  8638. #----------------------------------------------------------------
  8639. w_metadata dotnet6 dlls \
  8640. title="MS .NET Runtime 6.0 LTS" \
  8641. publisher="Microsoft" \
  8642. year="2023" \
  8643. media="download" \
  8644. file1="dotnet-runtime-6.0.19-win-x86.exe" \
  8645. installed_file1="${W_PROGRAMS_WIN}/dotnet/dotnet.exe"
  8646. load_dotnet6()
  8647. {
  8648. # Official version, see https://dotnet.microsoft.com/en-us/download/dotnet/6.0
  8649. w_download https://download.visualstudio.microsoft.com/download/pr/6b04af90-1760-4f04-93bc-548cc03f1d4b/1479bfb3a68bd45bdce774e18449fe6c/dotnet-runtime-6.0.19-win-x86.exe cc1e7714b2f988c779de37c831857e5fa9d9f3d3a53d02298679a2c514c55649
  8650. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  8651. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/quiet}
  8652. if [ "${W_ARCH}" = "win64" ]; then
  8653. # Also install the 64-bit version
  8654. w_download https://download.visualstudio.microsoft.com/download/pr/7bb7f85b-9bf0-4c6f-b3e4-a3832720f162/73e280cfd7f686c34748e0bf98d879c7/dotnet-runtime-6.0.19-win-x64.exe e9b1a354e9d207465fc635be80984d842f94d75171a141e51f3151bbfcb06945
  8655. w_try "${WINE}" "dotnet-runtime-6.0.19-win-x64.exe" ${W_OPT_UNATTENDED:+/quiet}
  8656. fi
  8657. }
  8658. #----------------------------------------------------------------
  8659. w_metadata dotnetdesktop6 dlls \
  8660. title="MS .NET Desktop Runtime 6.0 LTS" \
  8661. publisher="Microsoft" \
  8662. year="2023" \
  8663. media="download" \
  8664. file1="windowsdesktop-runtime-6.0.19-win-x86.exe" \
  8665. installed_file1="${W_PROGRAMS_WIN}/dotnet/dotnet.exe"
  8666. load_dotnetdesktop6()
  8667. {
  8668. # Official version, see https://dotnet.microsoft.com/en-us/download/dotnet/6.0
  8669. w_download https://download.visualstudio.microsoft.com/download/pr/1a0e6cd8-4c5b-4a25-8da6-6985792c5cad/aea270b977828772087496b7b073f383/windowsdesktop-runtime-6.0.19-win-x86.exe 9e0399dabe100ebe271b76615629891a10dc9b14aaedb3ec14d0e22e99925ddf
  8670. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  8671. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/quiet}
  8672. if [ "${W_ARCH}" = "win64" ]; then
  8673. # Also install the 64-bit version
  8674. w_download https://download.visualstudio.microsoft.com/download/pr/30841ca9-5538-40c3-9022-d1ba1e69f6e8/aa94715bc3d74ee0b2e27de757ef0cdb/windowsdesktop-runtime-6.0.19-win-x64.exe f95017731cd35fe71b27aa904fb64242b16f390c52ad6f9d464ddfe8c11325c9
  8675. w_try "${WINE}" "windowsdesktop-runtime-6.0.19-win-x64.exe" ${W_OPT_UNATTENDED:+/quiet}
  8676. fi
  8677. }
  8678. #----------------------------------------------------------------
  8679. w_metadata dotnet7 dlls \
  8680. title="MS .NET Runtime 7.0 LTS" \
  8681. publisher="Microsoft" \
  8682. year="2023" \
  8683. media="download" \
  8684. file1="dotnet-runtime-7.0.5-win-x86.exe" \
  8685. installed_file1="${W_PROGRAMS_WIN}/dotnet/dotnet.exe"
  8686. load_dotnet7()
  8687. {
  8688. # Official version, see https://dotnet.microsoft.com/en-us/download/dotnet/7.0
  8689. w_download https://download.visualstudio.microsoft.com/download/pr/da45af44-e437-41b5-a5de-be6698557272/e4aaf2eafc2e983c275189f4a4161bae/dotnet-runtime-7.0.5-win-x86.exe 372d868a6464954ba4b231626023fdafdde296e6f5402729614690b8734d682a
  8690. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  8691. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/quiet}
  8692. if [ "${W_ARCH}" = "win64" ]; then
  8693. # Also install the 64-bit version
  8694. w_download https://download.visualstudio.microsoft.com/download/pr/4b99bbc8-917a-417c-907b-d408341726a5/78b225344fbb9b80d3da3681e1d20d68/dotnet-runtime-7.0.5-win-x64.exe 4ea7291115899841bb2991aa08b529f03b23299611c856a6ad2e9373d02a1c6b
  8695. w_try "${WINE}" "dotnet-runtime-7.0.5-win-x64.exe" ${W_OPT_UNATTENDED:+/quiet}
  8696. fi
  8697. }
  8698. #----------------------------------------------------------------
  8699. w_metadata dotnetdesktop7 dlls \
  8700. title="MS .NET Desktop Runtime 7.0 LTS" \
  8701. publisher="Microsoft" \
  8702. year="2023" \
  8703. media="download" \
  8704. file1="windowsdesktop-runtime-7.0.5-win-x86.exe" \
  8705. installed_file1="${W_PROGRAMS_WIN}/dotnet/dotnet.exe"
  8706. load_dotnetdesktop7()
  8707. {
  8708. # Official version, see https://dotnet.microsoft.com/en-us/download/dotnet/7.0
  8709. w_download https://download.visualstudio.microsoft.com/download/pr/eb64dcd1-d277-4798-ada1-600805c9e2dc/fc73c843d66f3996e7ef22468f4902e6/windowsdesktop-runtime-7.0.5-win-x86.exe 96b5715a35f651e095cefb8d9346f21ad67a09e2693db763ac4321d97f8e0dd2
  8710. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  8711. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/quiet}
  8712. if [ "${W_ARCH}" = "win64" ]; then
  8713. # Also install the 64-bit version
  8714. w_download https://download.visualstudio.microsoft.com/download/pr/dffb1939-cef1-4db3-a579-5475a3061cdd/578b208733c914c7b7357f6baa4ecfd6/windowsdesktop-runtime-7.0.5-win-x64.exe 0be75f316589ca0e3daa2ef6586efb7aa7f585126e72edde6d114cb8082c3ca0
  8715. w_try "${WINE}" "windowsdesktop-runtime-7.0.5-win-x64.exe" ${W_OPT_UNATTENDED:+/quiet}
  8716. fi
  8717. }
  8718. #----------------------------------------------------------------
  8719. w_metadata dotnet_verifier dlls \
  8720. title="MS .NET Verifier" \
  8721. publisher="Microsoft" \
  8722. year="2016" \
  8723. media="download" \
  8724. file1="netfx_setupverifier_new.zip" \
  8725. installed_file1="${W_SYSTEM32_DLLS_WIN}/netfx_setupverifier.exe"
  8726. load_dotnet_verifier()
  8727. {
  8728. # https://blogs.msdn.microsoft.com/astebner/2008/10/13/net-framework-setup-verification-tool-users-guide/
  8729. # 2016/10/26: sha256sum 1daf4b1b27669b65f613e17814da3c8342d3bfa9520a65a880c58d6a2a6e32b5, adds .NET Framework 4.6.{1,2} support
  8730. # 2017/06/12: sha256sum 310a0341fbe68f5b8601f2d8deef5d05ca6bce50df03912df391bc843794ef60, adds .NET Framework 4.7 support
  8731. # 2018/06/03: sha256sum 13fd683fd604f9de09a9e649df303100b81e6797f868024d55e5c2f3c14aa9a6, adds .NET Framework 4.7.{1,2} support
  8732. w_download https://web.archive.org/web/20180802234935/https://msdnshared.blob.core.windows.net/media/2018/05/netfx_setupverifier_new.zip 13fd683fd604f9de09a9e649df303100b81e6797f868024d55e5c2f3c14aa9a6
  8733. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  8734. w_try_unzip "${W_SYSTEM32_DLLS}" netfx_setupverifier_new.zip netfx_setupverifier.exe
  8735. w_warn "You can run the .NET Verifier with \"${WINE} netfx_setupverifier.exe\""
  8736. }
  8737. #----------------------------------------------------------------
  8738. w_metadata dx8vb dlls \
  8739. title="MS dx8vb.dll from DirectX 8.1 runtime" \
  8740. publisher="Microsoft" \
  8741. year="2001" \
  8742. media="download" \
  8743. file1="DX81NTger.exe" \
  8744. installed_file1="${W_SYSTEM32_DLLS_WIN}/dx8vb.dll"
  8745. load_dx8vb()
  8746. {
  8747. # https://www.microsoft.com/de-de/download/details.aspx?id=10968
  8748. w_download https://download.microsoft.com/download/win2000pro/dx/8.1/NT5/DE/DX81NTger.exe 31513966a29dc100165072891d21b5c5e0dd2632abf3409a843cefb3a9886f13
  8749. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -F dx8vb.dll "${W_CACHE}/${W_PACKAGE}"/DX81NTger.exe
  8750. w_override_dlls native dx8vb
  8751. }
  8752. #----------------------------------------------------------------
  8753. w_metadata dxdiagn dlls \
  8754. title="DirectX Diagnostic Library" \
  8755. publisher="Microsoft" \
  8756. year="2011" \
  8757. media="download" \
  8758. conflicts="dxdiagn_feb2010" \
  8759. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  8760. installed_file1="${W_SYSTEM32_DLLS_WIN}/dxdiagn.dll"
  8761. load_dxdiagn()
  8762. {
  8763. helper_win7sp1 x86_microsoft-windows-d..x-directxdiagnostic_31bf3856ad364e35_6.1.7601.17514_none_25cb021dbc0611db/dxdiagn.dll
  8764. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-d..x-directxdiagnostic_31bf3856ad364e35_6.1.7601.17514_none_25cb021dbc0611db/dxdiagn.dll" "${W_SYSTEM32_DLLS}/dxdiagn.dll"
  8765. w_override_dlls native,builtin dxdiagn
  8766. w_try_regsvr dxdiagn.dll
  8767. if [ "${W_ARCH}" = "win64" ]; then
  8768. helper_win7sp1_x64 amd64_microsoft-windows-d..x-directxdiagnostic_31bf3856ad364e35_6.1.7601.17514_none_81e99da174638311/dxdiagn.dll
  8769. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-d..x-directxdiagnostic_31bf3856ad364e35_6.1.7601.17514_none_81e99da174638311/dxdiagn.dll" "${W_SYSTEM64_DLLS}/dxdiagn.dll"
  8770. w_try_regsvr64 dxdiagn.dll
  8771. fi
  8772. }
  8773. #----------------------------------------------------------------
  8774. w_metadata dxdiagn_feb2010 dlls \
  8775. title="DirectX Diagnostic Library (February 2010)" \
  8776. publisher="Microsoft" \
  8777. year="2010" \
  8778. media="download" \
  8779. conflicts="dxdiagn" \
  8780. file1="../directx9/directx_feb2010_redist.exe" \
  8781. installed_file1="${W_SYSTEM32_DLLS_WIN}/dxdiagn.dll"
  8782. load_dxdiagn_feb2010()
  8783. {
  8784. helper_directx_dl
  8785. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  8786. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dxdiagn.dll' "${W_TMP}/dxnt.cab"
  8787. w_override_dlls native dxdiagn
  8788. w_try_regsvr dxdiagn.dll
  8789. }
  8790. #----------------------------------------------------------------
  8791. w_metadata dsound dlls \
  8792. title="MS DirectSound from DirectX user redistributable" \
  8793. publisher="Microsoft" \
  8794. year="2010" \
  8795. media="download" \
  8796. file1="../directx9/directx_feb2010_redist.exe" \
  8797. installed_file1="${W_SYSTEM32_DLLS_WIN}/dsound.dll"
  8798. load_dsound()
  8799. {
  8800. helper_directx_dl
  8801. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  8802. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'dsound.dll' "${W_TMP}/dxnt.cab"
  8803. # Don't try to register native dsound; it doesn't export DllRegisterServer().
  8804. #w_try_regsvr32 dsound.dll
  8805. w_override_dlls native dsound
  8806. }
  8807. #----------------------------------------------------------------
  8808. w_metadata esent dlls \
  8809. title="MS Extensible Storage Engine" \
  8810. publisher="Microsoft" \
  8811. year="2011" \
  8812. media="download" \
  8813. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  8814. installed_file1="${W_SYSTEM32_DLLS_WIN}/esent.dll"
  8815. load_esent()
  8816. {
  8817. helper_win7sp1 x86_microsoft-windows-e..estorageengine-isam_31bf3856ad364e35_6.1.7601.17514_none_f3ebb0cc8a4dd814/esent.dll
  8818. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-e..estorageengine-isam_31bf3856ad364e35_6.1.7601.17514_none_f3ebb0cc8a4dd814/esent.dll" "${W_SYSTEM32_DLLS}/esent.dll"
  8819. if [ "${W_ARCH}" = "win64" ]; then
  8820. helper_win7sp1_x64 amd64_microsoft-windows-e..estorageengine-isam_31bf3856ad364e35_6.1.7601.17514_none_500a4c5042ab494a/esent.dll
  8821. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-e..estorageengine-isam_31bf3856ad364e35_6.1.7601.17514_none_500a4c5042ab494a/esent.dll" "${W_SYSTEM64_DLLS}/esent.dll"
  8822. fi
  8823. w_override_dlls native,builtin esent
  8824. }
  8825. #----------------------------------------------------------------
  8826. # $1 - faudio archive name (required)
  8827. helper_faudio()
  8828. {
  8829. faudio_archive="$1"
  8830. faudio_version="$(basename "${faudio_archive}" .tar.xz)"
  8831. w_try_cd "${W_TMP}"
  8832. w_try tar -Jxf "${W_CACHE}/${W_PACKAGE}/${faudio_archive}"
  8833. if [ -d "${faudio_version}/x32" ]; then
  8834. w_info "Installing 32-bit binaries since present; upstreams says they may be broken"
  8835. # They ship an installation script, but it's bash (and we have all needed functionality already)
  8836. # Unless they add something more complex, this should suffice:
  8837. for dll in "${faudio_version}/x32/"*.dll; do
  8838. shortdll="$(basename "${dll}" .dll)"
  8839. w_try_cp_dll "${dll}" "${W_SYSTEM32_DLLS}"
  8840. w_override_dlls native "${shortdll}"
  8841. done
  8842. fi
  8843. if [ "${W_ARCH}" = "win64" ]; then
  8844. for dll in "${faudio_version}/x64/"*.dll; do
  8845. # Note: 'libgcc_s_sjlj-1.dll' is not included in the 64-bit build
  8846. shortdll="$(basename "${dll}" .dll)"
  8847. w_try_cp_dll "${dll}" "${W_SYSTEM64_DLLS}"
  8848. w_override_dlls native "${shortdll}"
  8849. done
  8850. fi
  8851. }
  8852. #----------------------------------------------------------------
  8853. w_metadata faudio1901 dlls \
  8854. title="FAudio (xaudio reimplementation, with xna support) builds for win32 (19.01)" \
  8855. publisher="Kron4ek" \
  8856. year="2019" \
  8857. media="download" \
  8858. file1="faudio-19.01.tar.xz" \
  8859. installed_file1="${W_SYSTEM32_DLLS_WIN}/FAudio.dll"
  8860. load_faudio1901()
  8861. {
  8862. w_download https://github.com/Kron4ek/FAudio-Builds/releases/download/19.01/faudio-19.01.tar.xz f3439090ba36061ee47ebda93e409ae4b2d8886c780c86a197c66ff08b9b573f
  8863. helper_faudio "${file1}"
  8864. }
  8865. #----------------------------------------------------------------
  8866. w_metadata faudio1902 dlls \
  8867. title="FAudio (xaudio reimplementation, with xna support) builds for win32 (19.02)" \
  8868. publisher="Kron4ek" \
  8869. year="2019" \
  8870. media="download" \
  8871. file1="faudio-19.02.tar.xz" \
  8872. installed_file1="${W_SYSTEM32_DLLS_WIN}/FAudio.dll"
  8873. load_faudio1902()
  8874. {
  8875. w_download https://github.com/Kron4ek/FAudio-Builds/releases/download/19.02/faudio-19.02.tar.xz 849fec35482748a2b441d8dd7e9a171c7c5c2207d1037c7ffd0265e65f2a4b2b
  8876. helper_faudio "${file1}"
  8877. }
  8878. #----------------------------------------------------------------
  8879. w_metadata faudio1903 dlls \
  8880. title="FAudio (xaudio reimplementation, with xna support) builds for win32 (19.03)" \
  8881. publisher="Kron4ek" \
  8882. year="2019" \
  8883. media="download" \
  8884. file1="faudio-19.03.tar.xz" \
  8885. installed_file1="${W_SYSTEM32_DLLS_WIN}/FAudio.dll"
  8886. load_faudio1903()
  8887. {
  8888. w_download https://github.com/Kron4ek/FAudio-Builds/releases/download/19.03/faudio-19.03.tar.xz d5c62437fd5b185e82f464f6a82334af5d666cb506aba218358ea7a3697fdf63
  8889. helper_faudio "${file1}"
  8890. }
  8891. #----------------------------------------------------------------
  8892. w_metadata faudio1904 dlls \
  8893. title="FAudio (xaudio reimplementation, with xna support) builds for win32 (19.04)" \
  8894. publisher="Kron4ek" \
  8895. year="2019" \
  8896. media="download" \
  8897. file1="faudio-19.04.tar.xz" \
  8898. installed_file1="${W_SYSTEM32_DLLS_WIN}/FAudio.dll"
  8899. load_faudio1904()
  8900. {
  8901. w_download https://github.com/Kron4ek/FAudio-Builds/releases/download/19.04/faudio-19.04.tar.xz c364db1a18bfb6f6c0f375c641672ca40140b8e5db69dc2c8c9b41d79d0fc56f
  8902. helper_faudio "${file1}"
  8903. }
  8904. #----------------------------------------------------------------
  8905. w_metadata faudio1905 dlls \
  8906. title="FAudio (xaudio reimplementation, with xna support) builds for win32 (19.05)" \
  8907. publisher="Kron4ek" \
  8908. year="2019" \
  8909. media="download" \
  8910. file1="faudio-19.05.tar.xz" \
  8911. installed_file1="${W_SYSTEM32_DLLS_WIN}/FAudio.dll"
  8912. load_faudio1905()
  8913. {
  8914. w_download https://github.com/Kron4ek/FAudio-Builds/releases/download/19.05/faudio-19.05.tar.xz 94b44c43c0b2260f8061dd699292c8d58ce56fae330a53314417804df4f5f723
  8915. helper_faudio "${file1}"
  8916. }
  8917. #----------------------------------------------------------------
  8918. w_metadata faudio1906 dlls \
  8919. title="FAudio (xaudio reimplementation, with xna support) builds for win32 (19.06)" \
  8920. publisher="Kron4ek" \
  8921. year="2019" \
  8922. media="download" \
  8923. file1="faudio-19.06.tar.xz" \
  8924. installed_file1="${W_SYSTEM32_DLLS_WIN}/FAudio.dll"
  8925. load_faudio1906()
  8926. {
  8927. w_download https://github.com/Kron4ek/FAudio-Builds/releases/download/19.06/faudio-19.06.tar.xz 87639e30f9e913685829e05b925809598409e54c4c51e3d74b977cedd658aaf3
  8928. helper_faudio "${file1}"
  8929. }
  8930. #----------------------------------------------------------------
  8931. w_metadata faudio190607 dlls \
  8932. title="FAudio (xaudio reimplementation, with xna support) builds for win32 (19.06.07)" \
  8933. publisher="Kron4ek" \
  8934. year="2019" \
  8935. media="download" \
  8936. file1="faudio-19.06.07.tar.xz" \
  8937. installed_file1="${W_SYSTEM64_DLLS_WIN64}/FAudio.dll"
  8938. load_faudio190607()
  8939. {
  8940. # Starting in 19.06.07; before that ships them, but they're supposedly broken
  8941. w_package_unsupported_win32
  8942. w_download https://github.com/Kron4ek/FAudio-Builds/releases/download/19.06.07/faudio-19.06.07.tar.xz e17e3a9dadeb1017dc369fe0d46c3d1945ebceadb7ad2f94a3a1448435ab3f6c
  8943. helper_faudio "${file1}"
  8944. }
  8945. #----------------------------------------------------------------
  8946. w_metadata faudio dlls \
  8947. title="FAudio (xaudio reimplementation, with xna support) builds for win32 (20.07)" \
  8948. publisher="Kron4ek" \
  8949. year="2019" \
  8950. media="download" \
  8951. installed_file1="${W_SYSTEM64_DLLS_WIN64}/FAudio.dll"
  8952. load_faudio()
  8953. {
  8954. # Starting in 19.06.07; before that ships them, but they're supposedly broken
  8955. w_package_unsupported_win32
  8956. w_download_to "${W_TMP_EARLY}" "https://raw.githubusercontent.com/Kron4ek/FAudio-Builds/master/LATEST"
  8957. faudio_version="$(cat "${W_TMP_EARLY}/LATEST")"
  8958. w_linkcheck_ignore=1 w_download "https://github.com/Kron4ek/FAudio-Builds/releases/download/${faudio_version}/faudio-${faudio_version}.tar.xz"
  8959. helper_faudio "faudio-${faudio_version}.tar.xz"
  8960. }
  8961. #----------------------------------------------------------------
  8962. w_metadata filever dlls \
  8963. title="Microsoft's filever, for dumping file version info" \
  8964. publisher="Microsoft" \
  8965. year="20??" \
  8966. media="download" \
  8967. installed_file1="${W_SYSTEM32_DLLS_WIN}/filever.exe"
  8968. load_filever()
  8969. {
  8970. helper_winxpsp2_support_tools filever.exe
  8971. w_try_cp_dll "${W_TMP}/filever.exe" "${W_SYSTEM32_DLLS}/filever.exe"
  8972. }
  8973. #----------------------------------------------------------------
  8974. # $1 - gallium nine standalone archive name (required)
  8975. helper_galliumnine()
  8976. {
  8977. _W_galliumnine_archive="${1}"
  8978. _W_galliumnine_tmp="${W_TMP}/galliumnine"
  8979. w_try rm -rf "${_W_galliumnine_tmp}"
  8980. w_try_mkdir "${_W_galliumnine_tmp}"
  8981. w_try tar -C "${_W_galliumnine_tmp}" --strip-components=1 -zxf "${W_CACHE}/${W_PACKAGE}/${_W_galliumnine_archive}"
  8982. w_try mv "${_W_galliumnine_tmp}/lib32/d3d9-nine.dll.so" "${W_SYSTEM32_DLLS}/d3d9-nine.dll"
  8983. w_try mv "${_W_galliumnine_tmp}/bin32/ninewinecfg.exe.so" "${W_SYSTEM32_DLLS}/ninewinecfg.exe"
  8984. if test "${W_ARCH}" = "win64"; then
  8985. w_try mv "${_W_galliumnine_tmp}/lib64/d3d9-nine.dll.so" "${W_SYSTEM64_DLLS}/d3d9-nine.dll"
  8986. w_try mv "${_W_galliumnine_tmp}/bin64/ninewinecfg.exe.so" "${W_SYSTEM64_DLLS}/ninewinecfg.exe"
  8987. fi
  8988. w_try rm -rf "${_W_galliumnine_tmp}"
  8989. # use ninewinecfg to enable gallium nine
  8990. WINEDEBUG=-all w_try "${WINE_MULTI}" ninewinecfg -e
  8991. unset _W_galliumnine_tmp _W_galliumnine_archive
  8992. }
  8993. w_metadata galliumnine02 dlls \
  8994. title="Gallium Nine Standalone (v0.2)" \
  8995. publisher="Gallium Nine Team" \
  8996. year="2019" \
  8997. media="download" \
  8998. file1="gallium-nine-standalone-v0.2.tar.gz" \
  8999. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9-nine.dll" \
  9000. installed_file2="${W_SYSTEM32_DLLS_WIN}/ninewinecfg.exe" \
  9001. homepage="https://github.com/iXit/wine-nine-standalone"
  9002. load_galliumnine02()
  9003. {
  9004. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49676" 5.13
  9005. w_package_broken "https://github.com/iXit/wine-nine-standalone/issues/83" 5.14
  9006. w_package_broken "https://github.com/iXit/wine-nine-standalone/issues/149" 8.3
  9007. w_download "https://github.com/iXit/wine-nine-standalone/releases/download/v0.2/gallium-nine-standalone-v0.2.tar.gz" 6818fe890e343aa32d3d53179bfeb63df40977797bd7b6263e85e2bb57559313
  9008. helper_galliumnine "${file1}"
  9009. }
  9010. w_metadata galliumnine03 dlls \
  9011. title="Gallium Nine Standalone (v0.3)" \
  9012. publisher="Gallium Nine Team" \
  9013. year="2019" \
  9014. media="download" \
  9015. file1="gallium-nine-standalone-v0.3.tar.gz" \
  9016. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9-nine.dll" \
  9017. installed_file2="${W_SYSTEM32_DLLS_WIN}/ninewinecfg.exe" \
  9018. homepage="https://github.com/iXit/wine-nine-standalone"
  9019. load_galliumnine03()
  9020. {
  9021. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49676" 5.13
  9022. w_package_broken "https://github.com/iXit/wine-nine-standalone/issues/83" 5.14
  9023. w_package_broken "https://github.com/iXit/wine-nine-standalone/issues/149" 8.3
  9024. w_download "https://github.com/iXit/wine-nine-standalone/releases/download/v0.3/gallium-nine-standalone-v0.3.tar.gz" 8bb564073ab2198e5b9b870f7b8cac8d9bc20bc6accf66c4c798e4b450ec0c91
  9025. helper_galliumnine "${file1}"
  9026. }
  9027. w_metadata galliumnine04 dlls \
  9028. title="Gallium Nine Standalone (v0.4)" \
  9029. publisher="Gallium Nine Team" \
  9030. year="2019" \
  9031. media="download" \
  9032. file1="gallium-nine-standalone-v0.4.tar.gz" \
  9033. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9-nine.dll" \
  9034. installed_file2="${W_SYSTEM32_DLLS_WIN}/ninewinecfg.exe" \
  9035. homepage="https://github.com/iXit/wine-nine-standalone"
  9036. load_galliumnine04()
  9037. {
  9038. w_package_broken "https://bugs.winehq.org/show_bug.cgi?id=49676" 5.13
  9039. w_package_broken "https://github.com/iXit/wine-nine-standalone/issues/83" 5.14
  9040. w_package_broken "https://github.com/iXit/wine-nine-standalone/issues/149" 8.3
  9041. w_download "https://github.com/iXit/wine-nine-standalone/releases/download/v0.4/gallium-nine-standalone-v0.4.tar.gz" 4423c32d46419830c8e68fea86d28e740f17f182c365250c379b5493176e19ab
  9042. helper_galliumnine "${file1}"
  9043. }
  9044. w_metadata galliumnine05 dlls \
  9045. title="Gallium Nine Standalone (v0.5)" \
  9046. publisher="Gallium Nine Team" \
  9047. year="2019" \
  9048. media="download" \
  9049. file1="gallium-nine-standalone-v0.5.tar.gz" \
  9050. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9-nine.dll" \
  9051. installed_file2="${W_SYSTEM32_DLLS_WIN}/ninewinecfg.exe" \
  9052. homepage="https://github.com/iXit/wine-nine-standalone"
  9053. load_galliumnine05()
  9054. {
  9055. w_package_broken "https://github.com/iXit/wine-nine-standalone/issues/83" 5.14
  9056. w_package_broken "https://github.com/iXit/wine-nine-standalone/issues/149" 8.3
  9057. w_download "https://github.com/iXit/wine-nine-standalone/releases/download/v0.5/gallium-nine-standalone-v0.5.tar.gz" c46e06b13a3ba0adee75b27a8b54e9d772f83ed29dee5e203364460771fb1bcd
  9058. helper_galliumnine "${file1}"
  9059. }
  9060. w_metadata galliumnine06 dlls \
  9061. title="Gallium Nine Standalone (v0.6)" \
  9062. publisher="Gallium Nine Team" \
  9063. year="2020" \
  9064. media="download" \
  9065. file1="gallium-nine-standalone-v0.6.tar.gz" \
  9066. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9-nine.dll" \
  9067. installed_file2="${W_SYSTEM32_DLLS_WIN}/ninewinecfg.exe" \
  9068. homepage="https://github.com/iXit/wine-nine-standalone"
  9069. load_galliumnine06()
  9070. {
  9071. w_package_broken "https://github.com/iXit/wine-nine-standalone/issues/149" 8.3
  9072. w_download "https://github.com/iXit/wine-nine-standalone/releases/download/v0.6/gallium-nine-standalone-v0.6.tar.gz" 1a085b5175791414fdd513b5adb5682985917fef81e84f0116ef2b4d5295ad1c
  9073. helper_galliumnine "${file1}"
  9074. }
  9075. w_metadata galliumnine07 dlls \
  9076. title="Gallium Nine Standalone (v0.7)" \
  9077. publisher="Gallium Nine Team" \
  9078. year="2020" \
  9079. media="download" \
  9080. file1="gallium-nine-standalone-v0.7.tar.gz" \
  9081. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9-nine.dll" \
  9082. installed_file2="${W_SYSTEM32_DLLS_WIN}/ninewinecfg.exe" \
  9083. homepage="https://github.com/iXit/wine-nine-standalone"
  9084. load_galliumnine07()
  9085. {
  9086. w_package_broken "https://github.com/iXit/wine-nine-standalone/issues/149" 8.3
  9087. w_download "https://github.com/iXit/wine-nine-standalone/releases/download/v0.7/gallium-nine-standalone-v0.7.tar.gz" e0b3005280119732d2ca48a5aa5aad27eaf08e6e1dd5598652744a04554a9475
  9088. helper_galliumnine "${file1}"
  9089. }
  9090. w_metadata galliumnine08 dlls \
  9091. title="Gallium Nine Standalone (v0.8)" \
  9092. publisher="Gallium Nine Team" \
  9093. year="2021" \
  9094. media="download" \
  9095. file1="gallium-nine-standalone-v0.8.tar.gz" \
  9096. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9-nine.dll" \
  9097. installed_file2="${W_SYSTEM32_DLLS_WIN}/ninewinecfg.exe" \
  9098. homepage="https://github.com/iXit/wine-nine-standalone"
  9099. load_galliumnine08()
  9100. {
  9101. w_package_broken "https://github.com/iXit/wine-nine-standalone/issues/149" 8.3
  9102. w_download "https://github.com/iXit/wine-nine-standalone/releases/download/v0.8/gallium-nine-standalone-v0.8.tar.gz" 8d73dcf78e4b5edf7a3aea8c339459b5138acd1c957c91c5c06432cb2fc51893
  9103. helper_galliumnine "${file1}"
  9104. }
  9105. w_metadata galliumnine09 dlls \
  9106. title="Gallium Nine Standalone (v0.9)" \
  9107. publisher="Gallium Nine Team" \
  9108. year="2023" \
  9109. media="download" \
  9110. file1="gallium-nine-standalone-v0.9.tar.gz" \
  9111. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9-nine.dll" \
  9112. installed_file2="${W_SYSTEM32_DLLS_WIN}/ninewinecfg.exe" \
  9113. homepage="https://github.com/iXit/wine-nine-standalone"
  9114. load_galliumnine09()
  9115. {
  9116. w_package_broken "https://github.com/iXit/wine-nine-standalone/issues/149" "" 5.7
  9117. w_download "https://github.com/iXit/wine-nine-standalone/releases/download/v0.9/gallium-nine-standalone-v0.9.tar.gz" 0f6826e48cb979bc6d1fb85dbbb9da6025eb364af61f5ee8dbfd0058430778b1
  9118. helper_galliumnine "${file1}"
  9119. }
  9120. w_metadata galliumnine dlls \
  9121. title="Gallium Nine Standalone (latest)" \
  9122. publisher="Gallium Nine Team" \
  9123. year="2023" \
  9124. media="download" \
  9125. installed_file1="${W_SYSTEM32_DLLS_WIN}/d3d9-nine.dll" \
  9126. installed_file2="${W_SYSTEM32_DLLS_WIN}/ninewinecfg.exe" \
  9127. homepage="https://github.com/iXit/wine-nine-standalone"
  9128. load_galliumnine()
  9129. {
  9130. if w_wine_version_in ,5.7 ; then
  9131. w_call galliumnine08
  9132. return
  9133. fi
  9134. _W_galliumnine_version="$(w_get_github_latest_release iXit wine-nine-standalone)"
  9135. w_linkcheck_ignore=1 w_download "https://github.com/iXit/wine-nine-standalone/releases/download/${_W_galliumnine_version}/gallium-nine-standalone-${_W_galliumnine_version}.tar.gz"
  9136. helper_galliumnine "gallium-nine-standalone-${_W_galliumnine_version}.tar.gz"
  9137. unset _W_galliumnine_version
  9138. }
  9139. #----------------------------------------------------------------
  9140. w_metadata gdiplus dlls \
  9141. title="MS GDI+" \
  9142. publisher="Microsoft" \
  9143. year="2011" \
  9144. media="download" \
  9145. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  9146. installed_file1="${W_SYSTEM32_DLLS_WIN}/gdiplus.dll"
  9147. load_gdiplus()
  9148. {
  9149. # gdiplus has changed in win7. See https://bugs.winehq.org/show_bug.cgi?id=32163#c3
  9150. helper_win7sp1 x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_72d18a4386696c80/gdiplus.dll
  9151. w_try_cp_dll "${W_TMP}/x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_72d18a4386696c80/gdiplus.dll" "${W_SYSTEM32_DLLS}/gdiplus.dll"
  9152. if [ "${W_ARCH}" = "win64" ]; then
  9153. helper_win7sp1_x64 amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_2b24536c71ed437a/gdiplus.dll
  9154. w_try_cp_dll "${W_TMP}/amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.17514_none_2b24536c71ed437a/gdiplus.dll" "${W_SYSTEM64_DLLS}/gdiplus.dll"
  9155. fi
  9156. # For some reason, native, builtin isn't good enough...?
  9157. w_override_dlls native gdiplus
  9158. }
  9159. #----------------------------------------------------------------
  9160. w_metadata gdiplus_winxp dlls \
  9161. title="MS GDI+" \
  9162. publisher="Microsoft" \
  9163. year="2009" \
  9164. media="manual_download" \
  9165. file1="WindowsXP-KB975337-x86-ENU.exe" \
  9166. installed_file1="${W_SYSTEM32_DLLS_WIN}/gdiplus.dll"
  9167. load_gdiplus_winxp()
  9168. {
  9169. # https://www.microsoft.com/en-us/download/details.aspx?id=5339
  9170. w_download https://web.archive.org/web/20140615000000/http://download.microsoft.com/download/a/b/c/abc45517-97a0-4cee-a362-1957be2f24e1/WindowsXP-KB975337-x86-ENU.exe 699e76e9f100db3d50da8762c484a369df4698d4b84f7821d4df0e37ce68bcbe
  9171. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  9172. w_try "${WINE}" "${W_CACHE}/${W_PACKAGE}/${file1}" /x:. /q
  9173. w_try_cp_dll "${W_CACHE}/${W_PACKAGE}/asms/10/msft/windows/gdiplus/gdiplus.dll" "${W_SYSTEM32_DLLS}/gdiplus.dll"
  9174. # For some reason, native, builtin isn't good enough...?
  9175. w_override_dlls native gdiplus
  9176. }
  9177. #----------------------------------------------------------------
  9178. w_metadata glidewrapper dlls \
  9179. title="GlideWrapper" \
  9180. publisher="Rolf Neuberger" \
  9181. year="2005" \
  9182. media="download" \
  9183. file1="GlideWrapper084c.exe" \
  9184. installed_file1="${W_WINDIR_WIN}/glide3x.dll"
  9185. load_glidewrapper()
  9186. {
  9187. w_download http://www.vogonsdrivers.com/wrappers/files/Glide/OpenGL/Zeckensack/GlideWrapper084c.exe 3c4185bd7eac9bd50e0727a7b5165ec8273230455480cf94358e1bbd35921b69
  9188. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  9189. # The installer opens its README in a web browser, really annoying when doing make check/test:
  9190. # FIXME: maybe we should back up this key first?
  9191. if [ -n "${W_OPT_UNATTENDED}" ]; then
  9192. cat > "${W_TMP}"/disable-browser.reg <<_EOF_
  9193. REGEDIT4
  9194. [HKEY_CURRENT_USER\\Software\\Wine\\WineBrowser]
  9195. "Browsers"=""
  9196. _EOF_
  9197. w_try_regedit "${W_TMP_WIN}"\\disable-browser.reg
  9198. fi
  9199. # NSIS installer
  9200. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+ /S}
  9201. if [ -n "${W_OPT_UNATTENDED}" ]; then
  9202. "${WINE}" reg delete "HKEY_CURRENT_USER\\Software\\Wine\\WineBrowser" /v Browsers /f || true
  9203. fi
  9204. }
  9205. #----------------------------------------------------------------
  9206. w_metadata gfw dlls \
  9207. title="MS Games For Windows Live (xlive.dll)" \
  9208. publisher="Microsoft" \
  9209. year="2008" \
  9210. media="download" \
  9211. file1="gfwlivesetupmin.exe" \
  9212. installed_file1="${W_SYSTEM32_DLLS_WIN}/xlive.dll"
  9213. load_gfw()
  9214. {
  9215. # https://www.microsoft.com/games/en-us/live/pages/livejoin.aspx
  9216. # http://www.next-gen.biz/features/should-games-for-windows-live-die
  9217. w_download https://web.archive.org/web/20140730232216/https://download.microsoft.com/download/5/5/8/55846E20-4A46-4EF8-B272-7F988BC9090A/gfwlivesetupmin.exe b14609508e2f8dba0886ded84e2817ad532ebfa31f8a6d4be2e6a5a03a9d7c23
  9218. # Otherwise it leaves an arbitrarily named empty directory in ${W_CACHE}
  9219. w_try cp "${W_CACHE}/${W_PACKAGE}/gfwlivesetupmin.exe" "${W_TMP}"
  9220. w_try "${WINE}" "${W_TMP_WIN}\gfwlivesetupmin.exe" /nodotnet ${W_OPT_UNATTENDED:+/q}
  9221. w_call msasn1
  9222. }
  9223. #----------------------------------------------------------------
  9224. w_metadata glut dlls \
  9225. title="The glut utility library for OpenGL" \
  9226. publisher="Mark J. Kilgard" \
  9227. year="2001" \
  9228. media="download" \
  9229. file1="glut-3.7.6-bin.zip" \
  9230. installed_file1="c:/glut-3.7.6-bin/glut32.lib"
  9231. load_glut()
  9232. {
  9233. w_download https://downloads.sourceforge.net/colladaloader/glut-3.7.6-bin.zip 788e97653bfd527afbdc69e1b7c6bcf9cb45f33d13ddf9d676dc070da92f80d4
  9234. # FreeBSD unzip rm -rf's inside the target directory before extracting:
  9235. w_try_unzip "${W_TMP}" "${W_CACHE}"/glut/glut-3.7.6-bin.zip
  9236. w_try mv "${W_TMP}/glut-3.7.6-bin" "${W_DRIVE_C}"
  9237. w_try_cp_dll "${W_DRIVE_C}"/glut-3.7.6-bin/glut32.dll "${W_SYSTEM32_DLLS}"
  9238. w_warn "If you want to compile glut programs, add c:/glut-3.7.6-bin to LIB and INCLUDE"
  9239. }
  9240. #----------------------------------------------------------------
  9241. w_metadata gmdls dlls \
  9242. title="General MIDI DLS Collection" \
  9243. publisher="Microsoft / Roland" \
  9244. year="1999" \
  9245. media="download" \
  9246. file1="../directx9/directx_apr2006_redist.exe" \
  9247. installed_file1="${W_SYSTEM32_DLLS_WIN}/drivers/gm.dls"
  9248. load_gmdls()
  9249. {
  9250. w_download_to directx9 https://web.archive.org/web/20100920035904/https://download.microsoft.com/download/3/9/7/3972f80c-5711-4e14-9483-959d48a2d03b/directx_apr2006_redist.exe dd8c3d401efe4561b67bd88475201b2f62f43cd23e4acc947bb34a659fa74952
  9251. w_try_cabextract -d "${W_TMP}" -F DirectX.cab "${W_CACHE}"/directx9/directx_apr2006_redist.exe
  9252. w_try_cabextract -d "${W_TMP}" -F gm16.dls "${W_TMP}"/DirectX.cab
  9253. # When running in a 64bit prefix, syswow64/drivers doesn't exist
  9254. w_try_mkdir "${W_SYSTEM32_DLLS}"/drivers
  9255. w_try mv "${W_TMP}"/gm16.dls "${W_SYSTEM32_DLLS}"/drivers/gm.dls
  9256. if test "${W_ARCH}" = "win64"; then
  9257. w_try ln -s "${W_SYSTEM32_DLLS}"/drivers/gm.dls "${W_SYSTEM64_DLLS}"/drivers
  9258. fi
  9259. }
  9260. #----------------------------------------------------------------
  9261. # um, codecs are kind of clustered here. They probably deserve their own real category.
  9262. w_metadata allcodecs dlls \
  9263. title="All codecs (dirac, ffdshow, icodecs, cinepak, l3codecx, xvid) except wmp" \
  9264. publisher="various" \
  9265. year="1995-2009" \
  9266. media="download"
  9267. load_allcodecs()
  9268. {
  9269. w_call dirac
  9270. w_call l3codecx
  9271. w_call ffdshow
  9272. w_call icodecs
  9273. w_call cinepak
  9274. w_call xvid
  9275. }
  9276. #----------------------------------------------------------------
  9277. w_metadata dirac dlls \
  9278. title="The Dirac directshow filter v1.0.2" \
  9279. publisher="Dirac" \
  9280. year="2009" \
  9281. media="download" \
  9282. file1="DiracDirectShowFilter-1.0.2.exe" \
  9283. installed_file1="${W_PROGRAMS_X86_WIN}/Dirac/DiracDecoder.dll"
  9284. load_dirac()
  9285. {
  9286. w_download https://downloads.sourceforge.net/dirac/DiracDirectShowFilter-1.0.2.exe 7257de4be940405637bb5d11c1179f7db86f165f21fc0ba24f42a9ecbc55fe20
  9287. # Avoid mfc90 not found error. (DiracSplitter-libschroedinger.ax needs mfc90 to register itself, I think.)
  9288. w_call vcrun2008
  9289. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  9290. w_ahk_do "
  9291. SetTitleMatchMode, 2
  9292. run DiracDirectShowFilter-1.0.2.exe
  9293. WinWait, Dirac, Welcome
  9294. if ( w_opt_unattended > 0 ) {
  9295. ControlClick, Button2
  9296. WinWait, Dirac, License
  9297. Sleep 1000
  9298. ControlClick, Button2
  9299. WinWait, Dirac, Location
  9300. Sleep 1000
  9301. ControlClick, Button2
  9302. WinWait, Dirac, Components
  9303. Sleep 1000
  9304. ControlClick, Button2
  9305. WinWait, Dirac, environment
  9306. Sleep 1000
  9307. ControlCLick, Button1
  9308. WinWait, Dirac, installed
  9309. Sleep 1000
  9310. ControlClick, Button2
  9311. }
  9312. WinWaitClose
  9313. "
  9314. }
  9315. #----------------------------------------------------------------
  9316. w_metadata ffdshow dlls \
  9317. title="ffdshow video codecs" \
  9318. publisher="doom9 folks" \
  9319. year="2010" \
  9320. media="download" \
  9321. file1="ffdshow_beta7_rev3154_20091209.exe" \
  9322. installed_file1="${W_PROGRAMS_X86_WIN}/ffdshow/ff_liba52.dll" \
  9323. homepage="https://ffdshow-tryout.sourceforge.io/"
  9324. load_ffdshow()
  9325. {
  9326. w_download https://downloads.sourceforge.net/ffdshow-tryout/ffdshow_beta7_rev3154_20091209.exe 86fb22e9a79a1c83340a99fd5722974a4d03948109d404a383c4334fab8f8860
  9327. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  9328. w_try "${WINE}" ffdshow_beta7_rev3154_20091209.exe ${W_OPT_UNATTENDED:+/silent}
  9329. }
  9330. #----------------------------------------------------------------
  9331. w_metadata hid dlls \
  9332. title="MS hid" \
  9333. publisher="Microsoft" \
  9334. year="2003" \
  9335. media="download" \
  9336. file1="../win2ksp4/W2KSP4_EN.EXE" \
  9337. installed_file1="${W_SYSTEM32_DLLS_WIN}/hid.dll"
  9338. load_hid()
  9339. {
  9340. helper_win2ksp4 i386/hid.dl_
  9341. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/hid.dl_
  9342. w_override_dlls native hid
  9343. }
  9344. #----------------------------------------------------------------
  9345. w_metadata icodecs dlls \
  9346. title="Indeo codecs" \
  9347. publisher="Intel" \
  9348. year="1998" \
  9349. media="download" \
  9350. file1="codinstl.exe" \
  9351. installed_file1="${W_SYSTEM32_DLLS_WIN}/ir50_32.dll"
  9352. load_icodecs()
  9353. {
  9354. # Note: this codec is insecure, see
  9355. # https://support.microsoft.com/kb/954157
  9356. # Original source, ftp://download.intel.com/support/createshare/camerapack/codinstl.exe, had same checksum
  9357. # 2010/11/14: http://codec.alshow.co.kr/Down/codinstl.exe
  9358. # 2014/04/11: http://www.cucusoft.com/codecdownload/codinstl.exe (linked from http://www.cucusoft.com/codec.asp)
  9359. w_download "http://www.cucusoft.com/codecdownload/codinstl.exe" 0979d43568111cadf0b3bf43cd8d746ac3de505759c14f381592b4f8439f6c95
  9360. # Extract the installer so that we can use the included Install Shield
  9361. # response file for unattended installations
  9362. w_try_cabextract -d "${W_TMP}/codinstl/" "${W_CACHE}/${W_PACKAGE}/codinstl.exe"
  9363. w_try_cd "${W_TMP}/codinstl/"
  9364. w_try "${WINE}" "setup.exe" ${W_OPT_UNATTENDED:+/s}
  9365. # Work around bug in codec's installer?
  9366. # https://support.britannica.com/other/touchthesky/win/issues/TSTUw_150.htm
  9367. # https://appdb.winehq.org/objectManager.php?sClass=version&iId=7091
  9368. w_override_dlls native,builtin ir50_32
  9369. w_try_regsvr ir50_32
  9370. # Apparently some codecs are missing, see https://github.com/Winetricks/winetricks/issues/302
  9371. # Download at https://www.moviecodec.com/download-codec-packs/indeo-codecs-legacy-package-31/
  9372. w_download https://s3.amazonaws.com/moviecodec/files/iv5setup.exe 51bec25488b5b94eb3ce49b0a117618c9526161fd0753817a7a724ce25ff0cad
  9373. # Extract the installer so that we can create and use a pre-recorded
  9374. # Install Shield response file for unattended installations
  9375. w_try_cabextract -d "${W_TMP}/iv5setup/" "${W_CACHE}/${W_PACKAGE}/iv5setup.exe"
  9376. # Create the response file with the following excluded components
  9377. # - IV5 Directshow plugin (gives error about missing Ivfsrc.ax)
  9378. # - Web browser (Netscape) plugin
  9379. # http://www.silentinstall.org/InstallShield
  9380. cat > "${W_TMP}/iv5setup/setup.iss" <<_EOF_
  9381. [InstallShield Silent]
  9382. Version=v5.00.000
  9383. File=Response File
  9384. [File Transfer]
  9385. OverwriteReadOnly=NoToAll
  9386. [DlgOrder]
  9387. Dlg0=SdWelcome-0
  9388. Count=8
  9389. Dlg1=SdLicense-0
  9390. Dlg2=SdAskDestPath-0
  9391. Dlg3=SdSetupTypeEx-0
  9392. Dlg4=SdComponentDialog2-0
  9393. Dlg5=AskYesNo-0
  9394. Dlg6=SdStartCopy-0
  9395. Dlg7=SdFinish-0
  9396. [SdWelcome-0]
  9397. Result=1
  9398. [SdLicense-0]
  9399. Result=1
  9400. [SdAskDestPath-0]
  9401. szDir=C:\Program Files\Ligos\Indeo
  9402. Result=1
  9403. [SdSetupTypeEx-0]
  9404. Result=Custom
  9405. [SdComponentDialog2-0]
  9406. Indeo Audio Codec-type=string
  9407. Indeo Audio Codec-count=1
  9408. Indeo Audio Codec-0=Indeo Audio Codec\Indeo Audio Encoder
  9409. Component-type=string
  9410. Component-count=12
  9411. Component-0=Indeo Video 5 Quick Compressors
  9412. Component-1=Indeo® Video 5 Codec
  9413. Component-2=Indeo Video 4 Codec
  9414. Component-3=Indeo Video 3.2 Codec
  9415. Component-4=Indeo Audio Codec
  9416. Component-5=Indeo Video Raw (YVU9) Codec
  9417. Component-6=Indeo Video 4 Quick Compressors
  9418. Component-7=Indeo Video 5 Compressor Help Files
  9419. Component-8=Indeo Video 4 Compressor Help Files
  9420. Component-9=Indeo Software Release Notes
  9421. Component-10=Indeo Software Installation Source Code
  9422. Component-11=Indeo Software Uninstallation
  9423. Result=1
  9424. [AskYesNo-0]
  9425. Result=0
  9426. [SdStartCopy-0]
  9427. Result=1
  9428. [Application]
  9429. Name=Indeo® Software
  9430. Version=1.00.000
  9431. Company=Ligos
  9432. Lang=0009
  9433. [SdFinish-0]
  9434. Result=1
  9435. bOpt1=0
  9436. bOpt2=0
  9437. _EOF_
  9438. w_try_cd "${W_TMP}/iv5setup/"
  9439. w_try "${WINE}" "setup.exe" ${W_OPT_UNATTENDED:+/s}
  9440. # Note, this leaves a dangling explorer window.
  9441. # Wait for it to appear and kill it
  9442. while ! inode_pid=$(pgrep -f "explorer.exe.*Indeo"); do
  9443. sleep 1
  9444. done
  9445. kill -HUP "${inode_pid}"
  9446. }
  9447. #----------------------------------------------------------------
  9448. w_metadata iertutil dlls \
  9449. title="MS Runtime Utility" \
  9450. publisher="Microsoft" \
  9451. year="2011" \
  9452. media="download" \
  9453. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  9454. installed_file1="${W_SYSTEM32_DLLS_WIN}/iertutil.dll"
  9455. load_iertutil()
  9456. {
  9457. helper_win7sp1 x86_microsoft-windows-ie-runtimeutilities_31bf3856ad364e35_8.0.7601.17514_none_64655b7c61c841cb/iertutil.dll
  9458. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-ie-runtimeutilities_31bf3856ad364e35_8.0.7601.17514_none_64655b7c61c841cb/iertutil.dll" "${W_SYSTEM32_DLLS}/iertutil.dll"
  9459. if [ "${W_ARCH}" = "win64" ]; then
  9460. helper_win7sp1_x64 amd64_microsoft-windows-ie-runtimeutilities_31bf3856ad364e35_8.0.7601.17514_none_c083f7001a25b301/iertutil.dll
  9461. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-ie-runtimeutilities_31bf3856ad364e35_8.0.7601.17514_none_c083f7001a25b301/iertutil.dll" "${W_SYSTEM64_DLLS}/iertutil.dll"
  9462. fi
  9463. w_override_dlls native,builtin iertutil
  9464. }
  9465. #----------------------------------------------------------------
  9466. w_metadata itircl dlls \
  9467. title="MS itircl.dll" \
  9468. publisher="Microsoft" \
  9469. year="1999" \
  9470. media="download" \
  9471. file1="../hhw/htmlhelp.exe" \
  9472. installed_file1="${W_SYSTEM32_DLLS_WIN}/itircl.dll"
  9473. load_itircl()
  9474. {
  9475. # https://msdn.microsoft.com/en-us/library/windows/desktop/ms669985(v=vs.85).aspx
  9476. w_download_to hhw https://web.archive.org/web/20160423015142if_/http://download.microsoft.com/download/0/a/9/0a939ef6-e31c-430f-a3df-dfae7960d564/htmlhelp.exe b2b3140d42a818870c1ab13c1c7b8d4536f22bd994fa90aade89729a6009a3ae
  9477. w_try_cabextract -d "${W_TMP}" -F hhupd.exe "${W_CACHE}"/hhw/htmlhelp.exe
  9478. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -F itircl.dll "${W_TMP}"/hhupd.exe
  9479. w_override_dlls native itircl
  9480. w_try_regsvr itircl.dll
  9481. }
  9482. #----------------------------------------------------------------
  9483. w_metadata itss dlls \
  9484. title="MS itss.dll" \
  9485. publisher="Microsoft" \
  9486. year="1999" \
  9487. media="download" \
  9488. file1="../hhw/htmlhelp.exe" \
  9489. installed_file1="${W_SYSTEM32_DLLS_WIN}/itss.dll"
  9490. load_itss()
  9491. {
  9492. # https://msdn.microsoft.com/en-us/library/windows/desktop/ms669985(v=vs.85).aspx
  9493. w_download_to hhw https://web.archive.org/web/20160423015142if_/http://download.microsoft.com/download/0/a/9/0a939ef6-e31c-430f-a3df-dfae7960d564/htmlhelp.exe b2b3140d42a818870c1ab13c1c7b8d4536f22bd994fa90aade89729a6009a3ae
  9494. w_try_cabextract -d "${W_TMP}" -F hhupd.exe "${W_CACHE}"/hhw/htmlhelp.exe
  9495. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -F itss.dll "${W_TMP}"/hhupd.exe
  9496. w_override_dlls native itss
  9497. w_try_regsvr itss.dll
  9498. }
  9499. #----------------------------------------------------------------
  9500. w_metadata cinepak dlls \
  9501. title="Cinepak Codec" \
  9502. publisher="Radius" \
  9503. year="1995" \
  9504. media="download" \
  9505. file1="cvid32.zip" \
  9506. installed_file1="${W_SYSTEM32_DLLS_WIN}/iccvid.dll" \
  9507. homepage="http://www.probo.com/cinepak.php"
  9508. load_cinepak()
  9509. {
  9510. w_download "http://www.probo.com/pub/cinepak/cvid32.zip" a41984a954fe77557f228fa8a95cdc05db22bf9ff5429fe4307fd6fc51e11969
  9511. if [ -f "${W_SYSTEM32_DLLS}/iccvid.dll" ]; then
  9512. w_try rm -f "${W_SYSTEM32_DLLS}/iccvid.dll"
  9513. fi
  9514. w_try_unzip "${W_SYSTEM32_DLLS}" "${W_CACHE}/${W_PACKAGE}/${file1}" ICCVID.DLL
  9515. w_try mv -f "${W_SYSTEM32_DLLS}/ICCVID.DLL" "${W_SYSTEM32_DLLS}/iccvid_.dll"
  9516. w_try mv -f "${W_SYSTEM32_DLLS}/iccvid_.dll" "${W_SYSTEM32_DLLS}/iccvid.dll"
  9517. w_override_dlls native iccvid
  9518. }
  9519. #----------------------------------------------------------------
  9520. w_metadata jet40 dlls \
  9521. title="MS Jet 4.0 Service Pack 8" \
  9522. publisher="Microsoft" \
  9523. year="2003" \
  9524. media="download" \
  9525. file1="jet40sp8_9xnt.exe" \
  9526. installed_file1="${W_COMMONFILES_WIN}/Microsoft Shared/dao/dao360.dll"
  9527. load_jet40()
  9528. {
  9529. # Both mdac27/mdac28 are 32-bit only:
  9530. w_package_unsupported_win64
  9531. w_call mdac27
  9532. w_call wsh57
  9533. # https://support.microsoft.com/kb/239114
  9534. # See also https://bugs.winehq.org/show_bug.cgi?id=6085
  9535. # FIXME: "failed with error 2"
  9536. w_download https://web.archive.org/web/20210225171713/http://download.microsoft.com/download/4/3/9/4393c9ac-e69e-458d-9f6d-2fe191c51469/Jet40SP8_9xNT.exe b060246cd499085a31f15873689d5fa7df817e407c8261a5c71fa6b9f7042560
  9537. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  9538. w_try "${WINE}" jet40sp8_9xnt.exe ${W_OPT_UNATTENDED:+/q}
  9539. }
  9540. # FIXME: verify_jet40()
  9541. # See https://github.com/Winetricks/winetricks/issues/327,
  9542. # https://en.wikibooks.org/wiki/JET_Database/Creating_and_connecting, and
  9543. # https://msdn.microsoft.com/en-us/library/ms677200%28v=vs.85%29.aspx
  9544. #----------------------------------------------------------------
  9545. w_metadata ie8_kb2936068 dlls \
  9546. title="Cumulative Security Update for Internet Explorer 8" \
  9547. publisher="Microsoft" \
  9548. year="2014" \
  9549. media="download" \
  9550. file1="IE8-WindowsXP-KB2936068-x86-ENU.exe" \
  9551. installed_file1="${W_WINDIR_WIN}/KB2936068-IE8.log"
  9552. load_ie8_kb2936068()
  9553. {
  9554. w_call ie8
  9555. w_store_winver
  9556. if [ "${W_ARCH}" = "win32" ]; then
  9557. w_download https://download.microsoft.com/download/3/8/C/38CE0ABB-01FD-4C0A-A569-BC5E82C34A17/IE8-WindowsXP-KB2936068-x86-ENU.exe 8bda23c78cdcd9d01c364a01c6d639dfb2d11550a5521b8a81c808c1a2b1824e
  9558. w_set_winver winxp
  9559. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  9560. w_try_ms_installer "${WINE}" IE8-WindowsXP-KB2936068-x86-ENU.exe ${W_OPT_UNATTENDED:+/quiet /forcerestart}
  9561. else
  9562. w_download https://download.microsoft.com/download/4/C/5/4C5B97EA-8E28-4CBB-AF27-0AB0D386F4E9/IE8-WindowsServer2003.WindowsXP-KB2936068-x64-ENU.exe 40f42f2d98259dde860bd0dbe71b9a0c623c03e0feff738f67920e4be0845598
  9563. w_set_winver win2k3
  9564. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  9565. w_try_ms_installer "${WINE}" IE8-WindowsServer2003.WindowsXP-KB2936068-x64-ENU.exe ${W_OPT_UNATTENDED:+/quiet /forcerestart}
  9566. fi
  9567. w_restore_winver
  9568. }
  9569. #----------------------------------------------------------------
  9570. w_metadata ie8_tls12 dlls \
  9571. title="TLS 1.1 and 1.2 for Internet Explorer 8" \
  9572. publisher="Microsoft" \
  9573. year="2017" \
  9574. media="download" \
  9575. file1="windowsxp-kb4019276-x86-embedded-enu_3822fc1692076429a7dc051b00213d5e1240ce3d.exe" \
  9576. file2="ie8-windowsxp-kb4230450-x86-embedded-enu_d8b388624d07b6804485d347be4f74a985d50be7.exe" \
  9577. installed_file1="c:/windows/KB4230450-IE8.log"
  9578. load_ie8_tls12()
  9579. {
  9580. w_package_unsupported_win64
  9581. w_call ie8
  9582. w_set_winver winxp
  9583. "${WINE}" reg add "HKLM\\System\\WPA\\PosReady" /v Installed /t REG_DWORD /d 0001 /f
  9584. w_download http://download.windowsupdate.com/c/msdownload/update/software/updt/2017/10/windowsxp-kb4019276-x86-embedded-enu_3822fc1692076429a7dc051b00213d5e1240ce3d.exe 381abded5dd70a02bd54d4e8926e519ca6b306e26cbf10c45bbf1533bf57a026
  9585. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  9586. # Avoid permanent hang in attended mode; avoid long pause in unattended mode
  9587. w_try_ms_installer "${WINE}" "${file1}" /passive /norestart ${W_OPT_UNATTENDED:+/quiet}
  9588. "${WINE}" reg add "HKLM\\System\\CurrentControlSet\\Control\\SecurityProviders\\Schannel\\Protocols\\TLS 1.1\\Client" /v DisabledByDefault /t REG_DWORD /d 0000 /f
  9589. "${WINE}" reg add "HKLM\\System\\CurrentControlSet\\Control\\SecurityProviders\\Schannel\\Protocols\\TLS 1.2\\Client" /v DisabledByDefault /t REG_DWORD /d 0000 /f
  9590. w_download http://download.windowsupdate.com/c/msdownload/update/software/secu/2018/06/ie8-windowsxp-kb4230450-x86-embedded-enu_d8b388624d07b6804485d347be4f74a985d50be7.exe ec1183d4bfd0a92286678554f20a2d0f58c70ee9cb8ad90a5084812545b80068
  9591. # Force quiet mode to avoid permanent hang
  9592. w_try_ms_installer "${WINE}" ie8-windowsxp-kb4230450-x86-embedded-enu_d8b388624d07b6804485d347be4f74a985d50be7.exe /quiet
  9593. "${WINE}" reg add "HKLM\\Software\\Microsoft\\Internet Explorer\\AdvancedOptions\\CRYPTO\\TLS1.1" /v OSVersion /t REG_SZ /d "3.5.1.0.0" /f
  9594. "${WINE}" reg add "HKLM\\Software\\Microsoft\\Internet Explorer\\AdvancedOptions\\CRYPTO\\TLS1.2" /v OSVersion /t REG_SZ /d "3.5.1.0.0" /f
  9595. }
  9596. #----------------------------------------------------------------
  9597. w_metadata l3codecx dlls \
  9598. title="MPEG Layer-3 Audio Codec for Microsoft DirectShow" \
  9599. publisher="Microsoft" \
  9600. year="2010" \
  9601. media="download" \
  9602. file1="../directx9/directx_feb2010_redist.exe" \
  9603. installed_file1="${W_SYSTEM32_DLLS_WIN}/l3codecx.ax"
  9604. load_l3codecx()
  9605. {
  9606. helper_directx_dl
  9607. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  9608. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'l3codecx.ax' "${W_TMP}/dxnt.cab"
  9609. w_try_regsvr l3codecx.ax
  9610. }
  9611. #----------------------------------------------------------------
  9612. w_metadata lavfilters dlls \
  9613. title="LAV Filters" \
  9614. publisher="Hendrik Leppkes" \
  9615. year="2019" \
  9616. media="download" \
  9617. conflicts="lavfilters702" \
  9618. file1="LAVFilters-0.74.1-Installer.exe" \
  9619. installed_file1="${W_PROGRAMS_X86_WIN}/LAV Filters/x86/avfilter-lav-7.dll" \
  9620. homepage="https://github.com/Nevcairiel/LAVFilters"
  9621. load_lavfilters()
  9622. {
  9623. w_download https://github.com/Nevcairiel/LAVFilters/releases/download/0.74.1/LAVFilters-0.74.1-Installer.exe 181e24428eaa34d0121cd53ec829c18e52d028689e12a7326f952989daa44ddb
  9624. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  9625. w_try "${WINE}" LAVFilters-0.74.1-Installer.exe ${W_OPT_UNATTENDED:+ /VERYSILENT}
  9626. }
  9627. #----------------------------------------------------------------
  9628. w_metadata lavfilters702 dlls \
  9629. title="LAV Filters 0.70.2" \
  9630. publisher="Hendrik Leppkes" \
  9631. year="2017" \
  9632. media="download" \
  9633. conflicts="lavfilters" \
  9634. file1="LAVFilters-0.70.2-Installer.exe" \
  9635. installed_file1="${W_PROGRAMS_X86_WIN}/LAV Filters/x86/avfilter-lav-6.dll" \
  9636. homepage="https://github.com/Nevcairiel/LAVFilters"
  9637. load_lavfilters702()
  9638. {
  9639. w_download https://github.com/Nevcairiel/LAVFilters/releases/download/0.70.2/LAVFilters-0.70.2-Installer.exe 526e6f2de21759c0d5a60bfd2471880b5720cfb88a3b70163865a9d6cd2aa7cc
  9640. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  9641. w_try "${WINE}" LAVFilters-0.70.2-Installer.exe ${W_OPT_UNATTENDED:+ /VERYSILENT}
  9642. }
  9643. #----------------------------------------------------------------
  9644. # FIXME: installed location is
  9645. # $W_PROGRAMS_X86_WIN/Gemeinsame Dateien/System/ADO/msado26.tlb
  9646. # in German... need a variable W_COMMONFILES or something like that
  9647. w_metadata mdac27 dlls \
  9648. title="Microsoft Data Access Components 2.7 sp1" \
  9649. publisher="Microsoft" \
  9650. year="2006" \
  9651. media="download" \
  9652. file1="MDAC_TYP.EXE" \
  9653. installed_file1="${W_COMMONFILES_X86_WIN}/System/ADO/msado26.tlb"
  9654. load_mdac27()
  9655. {
  9656. w_package_unsupported_win64
  9657. # https://www.microsoft.com/downloads/en/details.aspx?FamilyId=9AD000F2-CAE7-493D-B0F3-AE36C570ADE8&displaylang=en
  9658. # Originally at: https://download.microsoft.com/download/3/b/f/3bf74b01-16ba-472d-9a8c-42b2b4fa0d76/mdac_typ.exe
  9659. # Mirror list: http://www.filewatcher.com/m/MDAC_TYP.EXE.5389224-0.html (5.14 MB MDAC_TYP.EXE)
  9660. # 2018/08/09: ftp.gunadarma.ac.id is dead, moved to archive.org
  9661. w_download https://web.archive.org/web/20060718123742/http://ftp.gunadarma.ac.id/pub/driver/itegno/USB%20Software/MDAC/MDAC_TYP.EXE 36d2a3099e6286ae3fab181a502a95fbd825fa5ddb30bf09b345abc7f1f620b4
  9662. load_native_mdac
  9663. w_store_winver
  9664. w_set_winver nt40
  9665. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  9666. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/q /C:"setup /qnt"}
  9667. w_restore_winver
  9668. }
  9669. #----------------------------------------------------------------
  9670. w_metadata mdac28 dlls \
  9671. title="Microsoft Data Access Components 2.8 sp1" \
  9672. publisher="Microsoft" \
  9673. year="2005" \
  9674. media="download" \
  9675. file1="MDAC_TYP.EXE" \
  9676. installed_file1="${W_COMMONFILES_X86_WIN}/System/ADO/msado27.tlb"
  9677. load_mdac28()
  9678. {
  9679. w_package_unsupported_win64
  9680. # https://www.microsoft.com/en-us/download/details.aspx?id=5793
  9681. w_download https://web.archive.org/web/20070127061938/https://download.microsoft.com/download/4/a/a/4aafff19-9d21-4d35-ae81-02c48dcbbbff/MDAC_TYP.EXE 157ebae46932cb9047b58aa849ac1885e8cbd2f218810cb83e57613b49c679d6
  9682. load_native_mdac
  9683. w_store_winver
  9684. w_set_winver nt40
  9685. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  9686. w_try "${WINE}" mdac_typ.exe ${W_OPT_UNATTENDED:+/q /C:"setup /qnt"}
  9687. w_restore_winver
  9688. }
  9689. #----------------------------------------------------------------
  9690. w_metadata mdx dlls \
  9691. title="Managed DirectX" \
  9692. publisher="Microsoft" \
  9693. year="2006" \
  9694. media="download" \
  9695. file1="../directx9/directx_feb2010_redist.exe" \
  9696. installed_file1="C:/windows/assembly/GAC/microsoft.directx/1.0.2902.0__31bf3856ad364e35/microsoft.directx.dll"
  9697. load_mdx()
  9698. {
  9699. helper_directx_Jun2010
  9700. w_try_cd "${W_TMP}"
  9701. w_try_cabextract -F "*MDX*" "${W_CACHE}"/directx9/${DIRECTX_NAME}
  9702. w_try_cabextract -F "*.cab" ./*Archive.cab
  9703. # Install assemblies
  9704. w_try_cabextract -d "${W_WINDIR_UNIX}/Microsoft.NET/DirectX for Managed Code/1.0.2902.0" -F "microsoft.directx*" ./*MDX1_x86.cab
  9705. for file in mdx_*.cab; do
  9706. ver="${file%%_x86.cab}"
  9707. ver="${ver##mdx_}"
  9708. w_try_cabextract -d "${W_WINDIR_UNIX}/Microsoft.NET/DirectX for Managed Code/${ver}" -F "microsoft.directx*" "${file}"
  9709. done
  9710. w_try_cabextract -d "${W_WINDIR_UNIX}/Microsoft.NET/DirectX for Managed Code/1.0.2911.0" -F "microsoft.directx.direct3dx*" ./*MDX1_x86.cab
  9711. # Add them to GAC
  9712. w_try_cd "${W_WINDIR_UNIX}/Microsoft.NET/DirectX for Managed Code"
  9713. for ver in *; do
  9714. (
  9715. w_try_cd "${ver}"
  9716. for asm in *.dll; do
  9717. name="${asm%%.dll}"
  9718. w_try_mkdir "${W_WINDIR_UNIX}/assembly/GAC/${name}/${ver}__31bf3856ad364e35"
  9719. w_try cp "${asm}" "${W_WINDIR_UNIX}/assembly/GAC/${name}/${ver}__31bf3856ad364e35"
  9720. done
  9721. )
  9722. done
  9723. # AssemblyFolders
  9724. cat > "${W_TMP}"/asmfolders.reg <<_EOF_
  9725. REGEDIT4
  9726. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\AssemblyFolders\\DX_1.0.2902.0]
  9727. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2902.0\\\\"
  9728. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\AssemblyFolders\\DX_1.0.2903.0]
  9729. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2903.0\\\\"
  9730. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\AssemblyFolders\\DX_1.0.2904.0]
  9731. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2904.0\\\\"
  9732. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\AssemblyFolders\\DX_1.0.2905.0]
  9733. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2905.0\\\\"
  9734. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\AssemblyFolders\\DX_1.0.2906.0]
  9735. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2906.0\\\\"
  9736. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\AssemblyFolders\\DX_1.0.2907.0]
  9737. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2907.0\\\\"
  9738. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\AssemblyFolders\\DX_1.0.2908.0]
  9739. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2908.0\\\\"
  9740. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\AssemblyFolders\\DX_1.0.2909.0]
  9741. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2909.0\\\\"
  9742. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\AssemblyFolders\\DX_1.0.2910.0]
  9743. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2910.0\\\\"
  9744. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\.NETFramework\\AssemblyFolders\\DX_1.0.2911.0]
  9745. @="C:\\\\windows\\\\Microsoft.NET\\\\DirectX for Managed Code\\\\1.0.2911.0\\\\"
  9746. _EOF_
  9747. w_try_regedit "${W_TMP_WIN}"\\asmfolders.reg
  9748. }
  9749. #----------------------------------------------------------------
  9750. w_metadata mf dlls \
  9751. title="MS Media Foundation" \
  9752. publisher="Microsoft" \
  9753. year="2011" \
  9754. media="download" \
  9755. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  9756. installed_file1="${W_SYSTEM32_DLLS_WIN}/mf.dll"
  9757. load_mf()
  9758. {
  9759. helper_win7sp1 x86_microsoft-windows-mediafoundation_31bf3856ad364e35_6.1.7601.17514_none_9e6699276b03c38e/mf.dll
  9760. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-mediafoundation_31bf3856ad364e35_6.1.7601.17514_none_9e6699276b03c38e/mf.dll" "${W_SYSTEM32_DLLS}/mf.dll"
  9761. if [ "${W_ARCH}" = "win64" ]; then
  9762. helper_win7sp1_x64 amd64_microsoft-windows-mediafoundation_31bf3856ad364e35_6.1.7601.17514_none_fa8534ab236134c4/mf.dll
  9763. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-mediafoundation_31bf3856ad364e35_6.1.7601.17514_none_fa8534ab236134c4/mf.dll" "${W_SYSTEM64_DLLS}/mf.dll"
  9764. fi
  9765. w_override_dlls native,builtin mf
  9766. }
  9767. #----------------------------------------------------------------
  9768. w_metadata mfc40 dlls \
  9769. title="MS mfc40 (Microsoft Foundation Classes from win7sp1)" \
  9770. publisher="Microsoft" \
  9771. year="1999" \
  9772. media="download" \
  9773. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  9774. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc40.dll"
  9775. load_mfc40()
  9776. {
  9777. helper_win7sp1 x86_microsoft-windows-mfc40_31bf3856ad364e35_6.1.7601.17514_none_5c06580240091047/mfc40.dll
  9778. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-mfc40_31bf3856ad364e35_6.1.7601.17514_none_5c06580240091047/mfc40.dll" "${W_SYSTEM32_DLLS}/mfc40.dll"
  9779. helper_win7sp1 x86_microsoft-windows-mfc40u_31bf3856ad364e35_6.1.7601.17514_none_f51a7bf0b3d25294/mfc40u.dll
  9780. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-mfc40u_31bf3856ad364e35_6.1.7601.17514_none_f51a7bf0b3d25294/mfc40u.dll" "${W_SYSTEM32_DLLS}/mfc40u.dll"
  9781. w_call msvcrt40
  9782. }
  9783. #----------------------------------------------------------------
  9784. w_metadata mfc70 dlls \
  9785. title="Visual Studio (.NET) 2002 mfc70 library" \
  9786. publisher="Microsoft" \
  9787. year="2006" \
  9788. media="download" \
  9789. file1="VS7.0sp1-KB924642-X86.exe" \
  9790. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc70.dll"
  9791. load_mfc70()
  9792. {
  9793. w_download https://download.microsoft.com/download/6/b/e/6be11d8a-e0c7-429c-ac8c-9860e313ced9/VS7.0sp1-KB924642-X86.exe 7173a950169a58c56d7174811a7cd50e6092046f1f083db9d2b03315347fc0f4
  9794. w_try_cabextract --directory="${W_TMP}" "${W_CACHE}/${W_PACKAGE}/${file1}" -F '*mfc*'
  9795. w_try_cp_dll "${W_TMP}"/FL_mfc70_dll_____X86.3643236F_FC70_11D3_A536_0090278A1BB8 "${W_SYSTEM32_DLLS}"/mfc70.dll
  9796. w_try_cp_dll "${W_TMP}"/FL_mfc70u_dll_____X86.3643236F_FC70_11D3_A536_0090278A1BB8 "${W_SYSTEM32_DLLS}"/mfc70u.dll
  9797. }
  9798. #----------------------------------------------------------------
  9799. w_metadata msaa dlls \
  9800. title="MS Active Accessibility (oleacc.dll, oleaccrc.dll, msaatext.dll)" \
  9801. publisher="Microsoft" \
  9802. year="2003" \
  9803. media="download" \
  9804. file1="MSAA20_RDK.exe" \
  9805. installed_file1="${W_SYSTEM32_DLLS_WIN}/oleacc.dll" \
  9806. installed_file2="${W_SYSTEM32_DLLS_WIN}/oleaccrc.dll" \
  9807. installed_file3="${W_SYSTEM32_DLLS_WIN}/msaatext.dll"
  9808. load_msaa()
  9809. {
  9810. w_download https://download.microsoft.com/download/c/1/c/c1cf13a6-4d7f-4b7d-9f67-51ef3a421fc7/MSAA20_RDK.exe 081e382f7e5b874ab143f0b073246fd31f84ae181df1838813b02935a951c9da
  9811. w_try_unzip "${W_TMP}/${W_PACKAGE}" "${W_CACHE}/${W_PACKAGE}"/MSAA20_RDK.exe
  9812. w_try cp "${W_TMP}/${W_PACKAGE}/oleaccW.dll" "${W_SYSTEM32_DLLS}/oleacc.dll"
  9813. w_try cp "${W_TMP}/${W_PACKAGE}/oleaccrc.dll" "${W_SYSTEM32_DLLS}/oleaccrc.dll"
  9814. w_try cp "${W_TMP}/${W_PACKAGE}/MSAATextW.dll" "${W_SYSTEM32_DLLS}/msaatext.dll"
  9815. w_override_dlls native,builtin oleacc oleaccrc msaatext
  9816. }
  9817. #----------------------------------------------------------------
  9818. w_metadata msacm32 dlls \
  9819. title="MS ACM32" \
  9820. publisher="Microsoft" \
  9821. year="2003" \
  9822. media="download" \
  9823. file1="../winxpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  9824. installed_file1="${W_SYSTEM32_DLLS_WIN}/msacm32.dll"
  9825. load_msacm32()
  9826. {
  9827. helper_winxpsp3 i386/msacm32.dl_
  9828. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/msacm32.dl_
  9829. w_override_dlls native,builtin msacm32
  9830. }
  9831. #----------------------------------------------------------------
  9832. w_metadata msasn1 dlls \
  9833. title="MS ASN1" \
  9834. publisher="Microsoft" \
  9835. year="2003" \
  9836. media="download" \
  9837. file1="../win2ksp4/W2KSP4_EN.EXE" \
  9838. installed_file1="${W_SYSTEM32_DLLS_WIN}/msasn1.dll"
  9839. load_msasn1()
  9840. {
  9841. helper_win2ksp4 i386/msasn1.dl_
  9842. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/msasn1.dl_
  9843. }
  9844. #----------------------------------------------------------------
  9845. w_metadata msctf dlls \
  9846. title="MS Text Service Module" \
  9847. publisher="Microsoft" \
  9848. year="2003" \
  9849. media="download" \
  9850. file1="../winxpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  9851. installed_file1="${W_SYSTEM32_DLLS_WIN}/msctf.dll"
  9852. load_msctf()
  9853. {
  9854. helper_winxpsp3 i386/msctf.dl_
  9855. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/msctf.dl_
  9856. w_override_dlls native,builtin msctf
  9857. }
  9858. #----------------------------------------------------------------
  9859. w_metadata msdelta dlls \
  9860. title="MSDelta differential compression library" \
  9861. publisher="Microsoft" \
  9862. year="2011" \
  9863. media="download" \
  9864. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  9865. installed_file1="${W_SYSTEM32_DLLS_WIN}/msdelta.dll"
  9866. load_msdelta()
  9867. {
  9868. helper_win7sp1 x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7601.17514_none_0b66cb34258c936f/msdelta.dll
  9869. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7601.17514_none_0b66cb34258c936f/msdelta.dll" "${W_SYSTEM32_DLLS}/msdelta.dll"
  9870. if [ "${W_ARCH}" = "win64" ]; then
  9871. helper_win7sp1_x64 amd64_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7601.17514_none_678566b7ddea04a5/msdelta.dll
  9872. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7601.17514_none_678566b7ddea04a5/msdelta.dll" "${W_SYSTEM64_DLLS}/msdelta.dll"
  9873. fi
  9874. w_override_dlls native,builtin msdelta
  9875. }
  9876. #----------------------------------------------------------------
  9877. w_metadata msdxmocx dlls \
  9878. title="MS Windows Media Player 2 ActiveX control for VB6" \
  9879. publisher="Microsoft" \
  9880. year="1999" \
  9881. media="download" \
  9882. file1="mpfull.exe" \
  9883. installed_file1="${W_SYSTEM32_DLLS_WIN}/msdxm.ocx"
  9884. load_msdxmocx()
  9885. {
  9886. # Previously at https://www.oldapps.com/windows_media_player.php?old_windows_media_player=3?download
  9887. # 2015/12/01: Iceweasel gave a security warning (!), but clamscan and virustotal.com report it as clean
  9888. #
  9889. # 2016/02/18: Since then, oldapps.com removed it. It's on a Finnish mirror, where it's been since 2001/10/20
  9890. # Found using http://www.filewatcher.com/m/mpfull.exe.3593680-0.html
  9891. # The sha256sum is different. Perhaps Iceweasel was right. This one is also clean according to clamscan/virustotal.com
  9892. # 2017/09/28: define.fi is down, these sites have mpfull.exe with the original sha256:
  9893. # http://hell.pl/agnus/windows95/
  9894. # http://zerosky.oldos.org/win9x.html
  9895. # https://sdfox7.com/win95/
  9896. w_download http://hell.pl/agnus/windows95/mpfull.exe a39b2b9735cedd513fcb78f8634695d35073e9d7e865e536a0da6db38c7225e4
  9897. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_CACHE}/${W_PACKAGE}/${file1}"
  9898. w_try_regsvr msdxm.ocx
  9899. }
  9900. #----------------------------------------------------------------
  9901. w_metadata msflxgrd dlls \
  9902. title="MS FlexGrid Control (msflxgrd.ocx)" \
  9903. publisher="Microsoft" \
  9904. year="2012" \
  9905. media="download" \
  9906. file1="../vb6sp6/VB60SP6-KB2708437-x86-ENU.msi" \
  9907. installed_file1="${W_SYSTEM32_DLLS_WIN}/msflxgrd.ocx"
  9908. load_msflxgrd()
  9909. {
  9910. helper_vb6sp6 "${W_TMP}" MSFlxGrd.ocx
  9911. w_try mv "${W_TMP}/MSFlxGrd.ocx" "${W_SYSTEM32_DLLS}/msflxgrd.ocx"
  9912. w_try_regsvr msflxgrd.ocx
  9913. }
  9914. #----------------------------------------------------------------
  9915. w_metadata mshflxgd dlls \
  9916. title="MS Hierarchical FlexGrid Control (mshflxgd.ocx)" \
  9917. publisher="Microsoft" \
  9918. year="2012" \
  9919. media="download" \
  9920. file1="../vb6sp6/VB60SP6-KB2708437-x86-ENU.msi" \
  9921. installed_file1="${W_SYSTEM32_DLLS_WIN}/mshflxgd.ocx"
  9922. load_mshflxgd()
  9923. {
  9924. helper_vb6sp6 "${W_TMP}" MShflxgd.ocx
  9925. w_try mv "${W_TMP}/MShflxgd.ocx" "${W_SYSTEM32_DLLS}/mshflxgd.ocx"
  9926. w_try_regsvr mshflxgd.ocx
  9927. }
  9928. #----------------------------------------------------------------
  9929. w_metadata mspatcha dlls \
  9930. title="MS mspatcha" \
  9931. publisher="Microsoft" \
  9932. year="2004" \
  9933. media="download" \
  9934. file1="../win2ksp4/W2KSP4_EN.EXE" \
  9935. installed_exe1="${W_SYSTEM32_DLLS_WIN}/mspatcha.dll"
  9936. load_mspatcha()
  9937. {
  9938. helper_win2ksp4 i386/mspatcha.dl_
  9939. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/mspatcha.dl_
  9940. w_override_dlls native,builtin mspatcha
  9941. }
  9942. #----------------------------------------------------------------
  9943. w_metadata msscript dlls \
  9944. title="MS Windows Script Control" \
  9945. publisher="Microsoft" \
  9946. year="2004" \
  9947. media="download" \
  9948. file1="../winxpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  9949. installed_file1="${W_SYSTEM32_DLLS_WIN}/msscript.ocx"
  9950. load_msscript()
  9951. {
  9952. helper_winxpsp3 i386/msscript.oc_
  9953. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/msscript.oc_
  9954. w_override_dlls native,builtin i386/msscript.ocx
  9955. }
  9956. #----------------------------------------------------------------
  9957. w_metadata msls31 dlls \
  9958. title="MS Line Services" \
  9959. publisher="Microsoft" \
  9960. year="2001" \
  9961. media="download" \
  9962. file1="InstMsiW.exe" \
  9963. installed_file1="${W_SYSTEM32_DLLS_WIN}/msls31.dll"
  9964. load_msls31()
  9965. {
  9966. # Needed by native RichEdit and Internet Explorer
  9967. # Originally at https://download.microsoft.com/download/WindowsInstaller/Install/2.0/NT45/EN-US/InstMsiW.exe
  9968. # Old mirror at https://ftp.hp.com/pub/softlib/software/msi/InstMsiW.exe
  9969. w_download https://web.archive.org/web/20160710055851if_/http://download.microsoft.com/download/WindowsInstaller/Install/2.0/NT45/EN-US/InstMsiW.exe 4c3516c0b5c2b76b88209b22e3bf1cb82d8e2de7116125e97e128952372eed6b
  9970. w_try_cabextract --directory="${W_TMP}" "${W_CACHE}"/msls31/InstMsiW.exe
  9971. w_try_cp_dll "${W_TMP}"/msls31.dll "${W_SYSTEM32_DLLS}"
  9972. }
  9973. #----------------------------------------------------------------
  9974. w_metadata msmask dlls \
  9975. title="MS Masked Edit Control" \
  9976. publisher="Microsoft" \
  9977. year="2009" \
  9978. media="download" \
  9979. file1="../vb6sp6/VB60SP6-KB2708437-x86-ENU.msi" \
  9980. installed_file1="${W_SYSTEM32_DLLS_WIN}/msmask32.ocx"
  9981. load_msmask()
  9982. {
  9983. helper_vb6sp6 "${W_TMP}" msmask32.ocx
  9984. w_try mv "${W_TMP}/msmask32.ocx" "${W_SYSTEM32_DLLS}/msmask32.ocx"
  9985. w_try_regsvr msmask32.ocx
  9986. }
  9987. #----------------------------------------------------------------
  9988. w_metadata msftedit dlls \
  9989. title="Microsoft RichEdit Control" \
  9990. publisher="Microsoft" \
  9991. year="2011" \
  9992. media="download" \
  9993. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  9994. installed_file1="${W_SYSTEM32_DLLS_WIN}/msftedit.dll"
  9995. load_msftedit()
  9996. {
  9997. helper_win7sp1 x86_microsoft-windows-msftedit_31bf3856ad364e35_6.1.7601.17514_none_d7d862f19573a5ff/msftedit.dll
  9998. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-msftedit_31bf3856ad364e35_6.1.7601.17514_none_d7d862f19573a5ff/msftedit.dll" "${W_SYSTEM32_DLLS}/msftedit.dll"
  9999. if [ "${W_ARCH}" = "win64" ]; then
  10000. helper_win7sp1_x64 amd64_microsoft-windows-msftedit_31bf3856ad364e35_6.1.7601.17514_none_33f6fe754dd11735/msftedit.dll
  10001. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-msftedit_31bf3856ad364e35_6.1.7601.17514_none_33f6fe754dd11735/msftedit.dll" "${W_SYSTEM64_DLLS}/msftedit.dll"
  10002. fi
  10003. w_override_dlls native,builtin msftedit
  10004. }
  10005. #----------------------------------------------------------------
  10006. w_metadata msvcrt40 dlls \
  10007. title="fixme" \
  10008. publisher="Microsoft" \
  10009. year="2011" \
  10010. media="download" \
  10011. file1="../winxpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  10012. installed_file1="${W_SYSTEM32_DLLS_WIN}/msvcrt40.dll"
  10013. load_msvcrt40()
  10014. {
  10015. helper_winxpsp3 i386/msvcrt40.dl_
  10016. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/msvcrt40.dl_
  10017. w_override_dlls native,builtin msvcrt40
  10018. }
  10019. #----------------------------------------------------------------
  10020. w_metadata msxml3 dlls \
  10021. title="MS XML Core Services 3.0" \
  10022. publisher="Microsoft" \
  10023. year="2005" \
  10024. media="download" \
  10025. file1="msxml3.msi" \
  10026. installed_file1="${W_SYSTEM32_DLLS_WIN}/msxml3.dll"
  10027. load_msxml3()
  10028. {
  10029. # Service Pack 7
  10030. # Originally at https://download.microsoft.com/download/8/8/8/888f34b7-4f54-4f06-8dac-fa29b19f33dd/msxml3.msi
  10031. # Mirror list: http://www.filewatcher.com/m/msxml3.msi.1070592-0.html
  10032. # Known bad sites (2017/06/11):
  10033. # ftp://support.danbit.dk/D/DVD-RW-USB2B/Driver/Installation/Data/Redist/msxml3.msi
  10034. # ftp://94.79.56.169/common/Client/MSXML%204.0%20Service%20Pack%202/msxml3.msi
  10035. w_download https://media.codeweavers.com/pub/other/msxml3.msi f9c678f8217e9d4f9647e8a1f6d89a7c26a57b9e9e00d39f7487493dd7b4e36c
  10036. # It won't install on top of Wine's msxml3, which has a pretty high version number, so delete Wine's fake DLL
  10037. rm "${W_SYSTEM32_DLLS}"/msxml3.dll
  10038. w_override_dlls native msxml3
  10039. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  10040. # See https://github.com/Winetricks/winetricks/issues/1086
  10041. # and https://bugs.winehq.org/show_bug.cgi?id=26925
  10042. if w_workaround_wine_bug 26925 "Forcing quiet install"; then
  10043. w_try "${WINE}" msiexec /i msxml3.msi /q
  10044. else
  10045. w_try "${WINE}" msiexec /i msxml3.msi ${W_OPT_UNATTENDED:+/q}
  10046. fi
  10047. }
  10048. #----------------------------------------------------------------
  10049. w_metadata msxml4 dlls \
  10050. title="MS XML Core Services 4.0" \
  10051. publisher="Microsoft" \
  10052. year="2009" \
  10053. media="download" \
  10054. file1="msxml.msi" \
  10055. installed_file1="${W_SYSTEM32_DLLS_WIN}/msxml4.dll"
  10056. load_msxml4()
  10057. {
  10058. # MS06-071: https://www.microsoft.com/en-us/download/details.aspx?id=11125
  10059. # w_download https://download.microsoft.com/download/e/2/e/e2e92e52-210b-4774-8cd9-3a7a0130141d/msxml4-KB927978-enu.exe 7602c2a6d2a46ef2b4028438d2cce67fe437a9bfb569249ea38141b4756b4e03
  10060. # MS07-042: https://www.microsoft.com/en-us/download/details.aspx?id=2386
  10061. # w_download https://download.microsoft.com/download/9/4/2/9422e6b6-08ee-49cb-9f05-6c6ee755389e/msxml4-KB936181-enu.exe 1ce9ff868816cfc9bf33e93fdf1552afce5b491443892babb521e74c05e45242
  10062. # SP3 (2009): https://www.microsoft.com/en-us/download/details.aspx?id=15697
  10063. w_download https://web.archive.org/web/20210506101448/http://download.microsoft.com/download/A/2/D/A2D8587D-0027-4217-9DAD-38AFDB0A177E/msxml.msi 47c2ae679c37815da9267c81fc3777de900ad2551c11c19c2840938b346d70bb
  10064. w_override_dlls native,builtin msxml4
  10065. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  10066. w_try "${WINE}" msiexec /i msxml.msi ${W_OPT_UNATTENDED:+/q}
  10067. }
  10068. #----------------------------------------------------------------
  10069. w_metadata msxml6 dlls \
  10070. title="MS XML Core Services 6.0 sp2" \
  10071. publisher="Microsoft" \
  10072. year="2014" \
  10073. media="download" \
  10074. file1="msxml6-KB2957482-enu-amd64.exe" \
  10075. installed_file1="${W_SYSTEM32_DLLS_WIN}/msxml6.dll"
  10076. load_msxml6()
  10077. {
  10078. # Service Pack 2
  10079. # https://www.microsoft.com/en-us/download/details.aspx?id=43253
  10080. # 64bit exe also includes 32bit dlls
  10081. w_download https://download.microsoft.com/download/2/7/7/277681BE-4048-4A58-ABBA-259C465B1699/msxml6-KB2957482-enu-amd64.exe 260cd870851ffc3c6d10b71691f134e20d8d03ac26073bb36951eacb7aa85897
  10082. w_try_cabextract --directory="${W_TMP}" "${W_CACHE}"/msxml6/msxml6-KB2957482-enu-amd64.exe
  10083. w_try_cabextract --directory="${W_TMP}" "${W_TMP}"/msxml6.msi
  10084. w_try_cp_dll "${W_TMP}"/msxml6.dll.86F857F6_A743_463D_B2FE_98CB5F727E09 "${W_SYSTEM32_DLLS}"/msxml6.dll
  10085. w_try_cp_dll "${W_TMP}"/msxml6r.dll.86F857F6_A743_463D_B2FE_98CB5F727E09 "${W_SYSTEM32_DLLS}"/msxml6r.dll
  10086. if [ "${W_ARCH}" = "win64" ]; then
  10087. w_try_cp_dll "${W_TMP}"/msxml6.dll.1ECC0691_D2EB_4A33_9CBF_5487E5CB17DB "${W_SYSTEM64_DLLS}"/msxml6.dll
  10088. w_try_cp_dll "${W_TMP}"/msxml6r.dll.1ECC0691_D2EB_4A33_9CBF_5487E5CB17DB "${W_SYSTEM64_DLLS}"/msxml6r.dll
  10089. fi
  10090. w_override_dlls native,builtin msxml6
  10091. }
  10092. #----------------------------------------------------------------
  10093. w_metadata nuget dlls \
  10094. title="NuGet Package manager" \
  10095. publisher="Outercurve Foundation" \
  10096. year="2013" \
  10097. media="download" \
  10098. file1="nuget.exe" \
  10099. installed_file1="${W_SYSTEM32_DLLS_WIN}/nuget.exe" \
  10100. homepage="https://nuget.org"
  10101. load_nuget()
  10102. {
  10103. w_call dotnet40
  10104. # Changes too rapidly to check shasum
  10105. w_download https://nuget.org/nuget.exe
  10106. w_try_cp_dll "${W_CACHE}/${W_PACKAGE}"/nuget.exe "${W_SYSTEM32_DLLS}"
  10107. w_warn "To run NuGet, use the command line \"${WINE} nuget\"."
  10108. }
  10109. #----------------------------------------------------------------
  10110. w_metadata ogg dlls \
  10111. title="OpenCodecs 0.85: FLAC, Speex, Theora, Vorbis, WebM" \
  10112. publisher="Xiph.Org Foundation" \
  10113. year="2011" \
  10114. media="download" \
  10115. file1="opencodecs_0.85.17777.exe" \
  10116. installed_file1="${W_PROGRAMS_X86_WIN}/Xiph.Org/Open Codecs/AxPlayer.dll" \
  10117. homepage="https://xiph.org/dshow"
  10118. load_ogg()
  10119. {
  10120. w_download https://downloads.xiph.org/releases/oggdsf/opencodecs_0.85.17777.exe fcec3cea637e806501aff447d902de3b5bfef226b629e43ab67e46dbb23f13e7
  10121. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  10122. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/S}
  10123. }
  10124. #----------------------------------------------------------------
  10125. w_metadata ole32 dlls \
  10126. title="MS ole32 Module (ole32.dll)" \
  10127. publisher="Microsoft" \
  10128. year="2004" \
  10129. media="download" \
  10130. file1="../winxpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  10131. installed_file1="${W_SYSTEM32_DLLS_WIN}/ole32.dll"
  10132. load_ole32()
  10133. {
  10134. # Some applications need this, for example Wechat.
  10135. helper_winxpsp3 i386/ole32.dl_
  10136. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/ole32.dl_
  10137. w_override_dlls native,builtin ole32
  10138. }
  10139. #----------------------------------------------------------------
  10140. w_metadata oleaut32 dlls \
  10141. title="MS oleaut32.dll" \
  10142. publisher="Microsoft" \
  10143. year="2011" \
  10144. media="download" \
  10145. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  10146. installed_file1="${W_SYSTEM32_DLLS_WIN}/oleaut32.dll"
  10147. load_oleaut32()
  10148. {
  10149. helper_win7sp1 x86_microsoft-windows-ole-automation_31bf3856ad364e35_6.1.7601.17514_none_bf07947959bc4c33/oleaut32.dll
  10150. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-ole-automation_31bf3856ad364e35_6.1.7601.17514_none_bf07947959bc4c33/oleaut32.dll" "${W_SYSTEM32_DLLS}/oleaut32.dll"
  10151. if [ "${W_ARCH}" = "win64" ]; then
  10152. helper_win7sp1_x64 amd64_microsoft-windows-ole-automation_31bf3856ad364e35_6.1.7601.17514_none_1b262ffd1219bd69/oleaut32.dll
  10153. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-ole-automation_31bf3856ad364e35_6.1.7601.17514_none_1b262ffd1219bd69/oleaut32.dll" "${W_SYSTEM64_DLLS}/oleaut32.dll"
  10154. fi
  10155. w_override_dlls native,builtin oleaut32
  10156. }
  10157. #----------------------------------------------------------------
  10158. w_metadata openal dlls \
  10159. title="OpenAL Runtime" \
  10160. publisher="Creative" \
  10161. year="2023" \
  10162. media="download" \
  10163. file1="oalinst.zip" \
  10164. installed_file1="${W_SYSTEM32_DLLS_WIN}/OpenAL32.dll"
  10165. load_openal()
  10166. {
  10167. # Official version
  10168. w_download https://www.openal.org/downloads/oalinst.zip d165bcb7628fd950d14847585468cc11943b2a1da92a59a839d397c68f9d4b06
  10169. w_try_unzip "${W_TMP}" "${W_CACHE}/${W_PACKAGE}/oalinst.zip"
  10170. w_try "${WINE}" "${W_TMP}/oalinst.exe" /silent
  10171. }
  10172. #----------------------------------------------------------------
  10173. w_metadata pdh dlls \
  10174. title="MS pdh.dll (Performance Data Helper)" \
  10175. publisher="Microsoft" \
  10176. year="2011" \
  10177. media="download" \
  10178. conflicts="pdh_nt4" \
  10179. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  10180. installed_file1="${W_SYSTEM32_DLLS_WIN}/pdh.dll"
  10181. load_pdh()
  10182. {
  10183. helper_win7sp1 x86_microsoft-windows-p..rastructureconsumer_31bf3856ad364e35_6.1.7601.17514_none_b5e3f88a8eb425e8/pdh.dll
  10184. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-p..rastructureconsumer_31bf3856ad364e35_6.1.7601.17514_none_b5e3f88a8eb425e8/pdh.dll" "${W_SYSTEM32_DLLS}/pdh.dll"
  10185. if [ "${W_ARCH}" = "win64" ]; then
  10186. helper_win7sp1_x64 amd64_microsoft-windows-p..rastructureconsumer_31bf3856ad364e35_6.1.7601.17514_none_1202940e4711971e/pdh.dll
  10187. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-p..rastructureconsumer_31bf3856ad364e35_6.1.7601.17514_none_1202940e4711971e/pdh.dll" "${W_SYSTEM64_DLLS}/pdh.dll"
  10188. fi
  10189. w_override_dlls native,builtin pdh
  10190. }
  10191. #----------------------------------------------------------------
  10192. w_metadata pdh_nt4 dlls \
  10193. title="MS pdh.dll (Performance Data Helper); WinNT 4.0 Version" \
  10194. publisher="Microsoft" \
  10195. year="1997" \
  10196. media="download" \
  10197. conflicts="pdh" \
  10198. file1="nt4pdhdll.exe" \
  10199. installed_file1="${W_SYSTEM32_DLLS_WIN}/pdh.dll"
  10200. load_pdh_nt4()
  10201. {
  10202. if [ "${W_ARCH}" = "win64" ]; then
  10203. w_warn "There is no 64-bit version of the WinNT 4.0 pdh.dll. If your program doesn't work then try a 32-bit wineprefix or use 'winetricks pdh' instead."
  10204. fi
  10205. w_download http://download.microsoft.com/download/winntsrv40/update/5.0.2195.2668/nt4/en-us/nt4pdhdll.exe a0a45ea8f4b82daaebcff7ad5bd1b7f5546e527e04790ca8c4c9b71b18c73e32
  10206. w_try_unzip "${W_TMP}/${W_PACKAGE}" "${W_CACHE}/${W_PACKAGE}"/nt4pdhdll.exe
  10207. w_try_cp_dll "${W_TMP}/${W_PACKAGE}/pdh.dll" "${W_SYSTEM32_DLLS}/pdh.dll"
  10208. w_override_dlls native,builtin pdh
  10209. }
  10210. #----------------------------------------------------------------
  10211. w_metadata peverify dlls \
  10212. title="MS peverify (from .NET 2.0 SDK)" \
  10213. publisher="Microsoft" \
  10214. year="2006" \
  10215. media="download" \
  10216. file1="../dotnet20sdk/setup.exe" \
  10217. installed_file1="${W_SYSTEM32_DLLS_WIN}/peverify.exe"
  10218. load_peverify()
  10219. {
  10220. w_download_to dotnet20sdk https://download.microsoft.com/download/c/4/b/c4b15d7d-6f37-4d5a-b9c6-8f07e7d46635/setup.exe 1d7337bfbb2c65f43c82d188688ce152af403bcb67a2cc2a3cc68a580ecd8200
  10221. # Seems to require dotnet20; at least doesn't work if dotnet40 is installed instead
  10222. w_call dotnet20
  10223. w_try_cabextract --directory="${W_TMP}" "${W_CACHE}/dotnet20sdk/setup.exe" -F netfxsd1.cab
  10224. w_try_cabextract --directory="${W_TMP}" "${W_TMP}/netfxsd1.cab" -F FL_PEVerify_exe_____X86.3643236F_FC70_11D3_A536_0090278A1BB8
  10225. w_try mv "${W_TMP}/FL_PEVerify_exe_____X86.3643236F_FC70_11D3_A536_0090278A1BB8" "${W_SYSTEM32_DLLS}/peverify.exe"
  10226. }
  10227. #----------------------------------------------------------------
  10228. w_metadata physx dlls \
  10229. title="PhysX" \
  10230. publisher="Nvidia" \
  10231. year="2021" \
  10232. media="download" \
  10233. file1="PhysX_9.21.0713_SystemSoftware.exe" \
  10234. load_physx()
  10235. {
  10236. w_get_sha256sum "${W_PROGRAMS_X86_UNIX}/NVIDIA Corporation/PhysX/Engine/86C5F4F22ECD/APEX_Particles_x64.dll"
  10237. if [ "${_W_gotsha256sum}"x = "b3991e0165a9802b60e2f7d14c1be5f879071999ae74a38263cec9bf043a9eaa"x ] ; then
  10238. w_warn "${W_PACKAGE} is already installed - not updating"
  10239. unset _W_gotsha256sum
  10240. return
  10241. else
  10242. unset _W_gotsha256sum
  10243. w_download https://us.download.nvidia.com/Windows/9.21.0713/PhysX_9.21.0713_SystemSoftware.exe 26d62c5c347c15cb27c3be92bf10706113511b48b28aecc09f61ee58b3b62778
  10244. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  10245. w_try "${WINE}" PhysX_9.21.0713_SystemSoftware.exe ${W_OPT_UNATTENDED:+/s}
  10246. fi
  10247. }
  10248. #----------------------------------------------------------------
  10249. w_metadata pngfilt dlls \
  10250. title="pngfilt.dll (from winxp)" \
  10251. publisher="Microsoft" \
  10252. year="2004" \
  10253. media="download" \
  10254. file1="../winxpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  10255. installed_file1="${W_SYSTEM32_DLLS_WIN}/pngfilt.dll"
  10256. load_pngfilt()
  10257. {
  10258. # Previously used https://www.microsoft.com/en-us/download/details.aspx?id=3907
  10259. # Now using winxp's dll
  10260. helper_winxpsp3 i386/pngfilt.dl_
  10261. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/pngfilt.dl_
  10262. w_try_regsvr pngfilt.dll
  10263. }
  10264. #----------------------------------------------------------------
  10265. w_metadata prntvpt dlls \
  10266. title="prntvpt.dll" \
  10267. publisher="Microsoft" \
  10268. year="2011" \
  10269. media="download" \
  10270. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  10271. installed_file1="${W_SYSTEM32_DLLS_WIN}/prntvpt.dll"
  10272. load_prntvpt()
  10273. {
  10274. helper_win7sp1 x86_microsoft-windows-p..g-printticket-win32_31bf3856ad364e35_6.1.7601.17514_none_1562129afd710f2c/prntvpt.dll
  10275. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-p..g-printticket-win32_31bf3856ad364e35_6.1.7601.17514_none_1562129afd710f2c/prntvpt.dll" "${W_SYSTEM32_DLLS}/prntvpt.dll"
  10276. w_override_dlls native,builtin prntvpt
  10277. w_try_regsvr prntvpt.dll
  10278. if [ "${W_ARCH}" = "win64" ]; then
  10279. helper_win7sp1_x64 amd64_microsoft-windows-p..g-printticket-win32_31bf3856ad364e35_6.1.7601.17514_none_7180ae1eb5ce8062/prntvpt.dll
  10280. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-p..g-printticket-win32_31bf3856ad364e35_6.1.7601.17514_none_7180ae1eb5ce8062/prntvpt.dll" "${W_SYSTEM64_DLLS}/prntvpt.dll"
  10281. w_try_regsvr64 prntvpt.dll
  10282. fi
  10283. }
  10284. #----------------------------------------------------------------
  10285. w_metadata python26 dlls \
  10286. title="Python interpreter 2.6.2" \
  10287. publisher="Python Software Foundaton" \
  10288. year="2009" \
  10289. media="download" \
  10290. file1="python-2.6.2.msi" \
  10291. installed_exe1="c:/Python26/python.exe"
  10292. load_python26()
  10293. {
  10294. w_download https://www.python.org/ftp/python/2.6.2/python-2.6.2.msi c2276b398864b822c25a7c240cb12ddb178962afd2e12d602f1a961e31ad52ff
  10295. w_download https://downloads.sourceforge.net/project/pywin32/pywin32/Build%20214/pywin32-214.win32-py2.6.exe dc311bbdc5868e3dd139dfc46136221b7f55c5613a98a5a48fa725a6c681cd40
  10296. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  10297. w_try "${WINE}" msiexec /i python-2.6.2.msi ALLUSERS=1 ${W_OPT_UNATTENDED:+/q}
  10298. w_ahk_do "
  10299. SetTitleMatchMode, 2
  10300. run pywin32-214.win32-py2.6.exe
  10301. WinWait, Setup, Wizard will install pywin32
  10302. if ( w_opt_unattended > 0 ) {
  10303. ControlClick Button2 ; next
  10304. WinWait, Setup, Python 2.6 is required
  10305. ControlClick Button3 ; next
  10306. WinWait, Setup, Click Next to begin
  10307. ControlClick Button3 ; next
  10308. WinWait, Setup, finished
  10309. ControlClick Button4 ; Finish
  10310. }
  10311. WinWaitClose
  10312. "
  10313. }
  10314. #----------------------------------------------------------------
  10315. w_metadata python27 dlls \
  10316. title="Python interpreter 2.7.16" \
  10317. publisher="Python Software Foundaton" \
  10318. year="2019" \
  10319. media="download" \
  10320. file1="python-2.7.16.msi" \
  10321. installed_exe1="c:/Python27/python.exe"
  10322. load_python27()
  10323. {
  10324. w_download https://www.python.org/ftp/python/2.7.16/python-2.7.16.msi d57dc3e1ba490aee856c28b4915d09e3f49442461e46e481bc6b2d18207831d7
  10325. w_download https://github.com/mhammond/pywin32/releases/download/b224/pywin32-224.win32-py2.7.exe 03bb02aff0ec604d1d5fefc699581ab599fff618eaddc8a721f2fa22e5572dd4
  10326. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  10327. w_try "${WINE}" msiexec /i python-2.7.16.msi ALLUSERS=1 ${W_OPT_UNATTENDED:+/q}
  10328. w_ahk_do "
  10329. SetTitleMatchMode, 2
  10330. run pywin32-224.win32-py2.7.exe
  10331. WinWait, Setup, Wizard will install pywin32
  10332. if ( w_opt_unattended > 0 ) {
  10333. ControlClick Button2 ; next
  10334. WinWait, Setup, Python 2.7 is required
  10335. ControlClick Button3 ; next
  10336. WinWait, Setup, Click Next to begin
  10337. ControlClick Button3 ; next
  10338. WinWait, Setup, finished
  10339. ControlClick Button4 ; Finish
  10340. }
  10341. WinWaitClose
  10342. "
  10343. }
  10344. #----------------------------------------------------------------
  10345. w_metadata qasf dlls \
  10346. title="qasf.dll" \
  10347. publisher="Microsoft" \
  10348. year="2011" \
  10349. media="download" \
  10350. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  10351. installed_file1="${W_SYSTEM32_DLLS_WIN}/qasf.dll"
  10352. load_qasf()
  10353. {
  10354. helper_win7sp1 x86_microsoft-windows-directshow-asf_31bf3856ad364e35_6.1.7601.17514_none_1cc4e9c15ccc8ae8/qasf.dll
  10355. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-directshow-asf_31bf3856ad364e35_6.1.7601.17514_none_1cc4e9c15ccc8ae8/qasf.dll" "${W_SYSTEM32_DLLS}/qasf.dll"
  10356. w_override_dlls native,builtin qasf
  10357. w_try_regsvr qasf.dll
  10358. if [ "${W_ARCH}" = "win64" ]; then
  10359. helper_win7sp1_x64 amd64_microsoft-windows-directshow-asf_31bf3856ad364e35_6.1.7601.17514_none_78e385451529fc1e/qasf.dll
  10360. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-directshow-asf_31bf3856ad364e35_6.1.7601.17514_none_78e385451529fc1e/qasf.dll" "${W_SYSTEM64_DLLS}/qasf.dll"
  10361. w_try_regsvr64 qasf.dll
  10362. fi
  10363. }
  10364. #----------------------------------------------------------------
  10365. w_metadata qcap dlls \
  10366. title="qcap.dll" \
  10367. publisher="Microsoft" \
  10368. year="2011" \
  10369. media="download" \
  10370. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  10371. installed_file1="${W_SYSTEM32_DLLS_WIN}/qcap.dll"
  10372. load_qcap()
  10373. {
  10374. helper_win7sp1 x86_microsoft-windows-directshow-capture_31bf3856ad364e35_6.1.7601.17514_none_bae08d1e7dcccf2a/qcap.dll
  10375. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-directshow-capture_31bf3856ad364e35_6.1.7601.17514_none_bae08d1e7dcccf2a/qcap.dll" "${W_SYSTEM32_DLLS}/qcap.dll"
  10376. w_override_dlls native,builtin qcap
  10377. w_try_regsvr qcap.dll
  10378. if [ "${W_ARCH}" = "win64" ]; then
  10379. helper_win7sp1_x64 amd64_microsoft-windows-directshow-capture_31bf3856ad364e35_6.1.7601.17514_none_16ff28a2362a4060/qcap.dll
  10380. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-directshow-capture_31bf3856ad364e35_6.1.7601.17514_none_16ff28a2362a4060/qcap.dll" "${W_SYSTEM64_DLLS}/qcap.dll"
  10381. w_try_regsvr64 qcap.dll
  10382. fi
  10383. }
  10384. #----------------------------------------------------------------
  10385. w_metadata qdvd dlls \
  10386. title="qdvd.dll" \
  10387. publisher="Microsoft" \
  10388. year="2011" \
  10389. media="download" \
  10390. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  10391. installed_file1="${W_SYSTEM32_DLLS_WIN}/qdvd.dll"
  10392. load_qdvd()
  10393. {
  10394. helper_win7sp1 x86_microsoft-windows-directshow-dvdsupport_31bf3856ad364e35_6.1.7601.17514_none_562994bd321aac67/qdvd.dll
  10395. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-directshow-dvdsupport_31bf3856ad364e35_6.1.7601.17514_none_562994bd321aac67/qdvd.dll" "${W_SYSTEM32_DLLS}/qdvd.dll"
  10396. w_override_dlls native,builtin qdvd
  10397. w_try_regsvr qdvd.dll
  10398. if [ "${W_ARCH}" = "win64" ]; then
  10399. helper_win7sp1_x64 amd64_microsoft-windows-directshow-dvdsupport_31bf3856ad364e35_6.1.7601.17514_none_b2483040ea781d9d/qdvd.dll
  10400. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-directshow-dvdsupport_31bf3856ad364e35_6.1.7601.17514_none_b2483040ea781d9d/qdvd.dll" "${W_SYSTEM64_DLLS}/qdvd.dll"
  10401. w_try_regsvr64 qdvd.dll
  10402. fi
  10403. }
  10404. #----------------------------------------------------------------
  10405. w_metadata qedit dlls \
  10406. title="qedit.dll" \
  10407. publisher="Microsoft" \
  10408. year="2011" \
  10409. media="download" \
  10410. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  10411. installed_file1="${W_SYSTEM32_DLLS_WIN}/qedit.dll"
  10412. load_qedit()
  10413. {
  10414. helper_win7sp1 x86_microsoft-windows-qedit_31bf3856ad364e35_6.1.7601.17514_none_5ca34698a5a970d2/qedit.dll
  10415. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-qedit_31bf3856ad364e35_6.1.7601.17514_none_5ca34698a5a970d2/qedit.dll" "${W_SYSTEM32_DLLS}/qedit.dll"
  10416. w_override_dlls native,builtin qedit
  10417. w_try_regsvr qedit.dll
  10418. if [ "${W_ARCH}" = "win64" ]; then
  10419. helper_win7sp1_x64 amd64_microsoft-windows-qedit_31bf3856ad364e35_6.1.7601.17514_none_b8c1e21c5e06e208/qedit.dll
  10420. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-qedit_31bf3856ad364e35_6.1.7601.17514_none_b8c1e21c5e06e208/qedit.dll" "${W_SYSTEM64_DLLS}/qedit.dll"
  10421. w_try_regsvr64 qedit.dll
  10422. fi
  10423. }
  10424. #----------------------------------------------------------------
  10425. w_metadata quartz dlls \
  10426. title="quartz.dll" \
  10427. publisher="Microsoft" \
  10428. year="2011" \
  10429. media="download" \
  10430. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  10431. installed_file1="${W_SYSTEM32_DLLS_WIN}/quartz.dll"
  10432. load_quartz()
  10433. {
  10434. helper_win7sp1 x86_microsoft-windows-directshow-core_31bf3856ad364e35_6.1.7601.17514_none_a877a1cc4c284497/quartz.dll
  10435. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-directshow-core_31bf3856ad364e35_6.1.7601.17514_none_a877a1cc4c284497/quartz.dll" "${W_SYSTEM32_DLLS}/quartz.dll"
  10436. w_override_dlls native,builtin quartz
  10437. w_try_regsvr quartz.dll
  10438. if [ "${W_ARCH}" = "win64" ]; then
  10439. helper_win7sp1_x64 amd64_microsoft-windows-directshow-core_31bf3856ad364e35_6.1.7601.17514_none_04963d500485b5cd/quartz.dll
  10440. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-directshow-core_31bf3856ad364e35_6.1.7601.17514_none_04963d500485b5cd/quartz.dll" "${W_SYSTEM64_DLLS}/quartz.dll"
  10441. w_try_regsvr64 quartz.dll
  10442. fi
  10443. }
  10444. #----------------------------------------------------------------
  10445. w_metadata quartz_feb2010 dlls \
  10446. title="quartz.dll (February 2010)" \
  10447. publisher="Microsoft" \
  10448. year="2010" \
  10449. media="download" \
  10450. conflicts="quartz" \
  10451. file1="../directx9/directx_feb2010_redist.exe" \
  10452. installed_file1="${W_SYSTEM32_DLLS_WIN}/quartz.dll"
  10453. load_quartz_feb2010()
  10454. {
  10455. helper_directx_dl
  10456. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  10457. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F quartz.dll "${W_TMP}/dxnt.cab"
  10458. w_override_dlls native,builtin quartz
  10459. w_try_regsvr quartz.dll
  10460. }
  10461. #----------------------------------------------------------------
  10462. w_metadata quicktime72 dlls \
  10463. title="Apple QuickTime 7.2" \
  10464. publisher="Apple" \
  10465. year="2010" \
  10466. media="download" \
  10467. file1="QuickTimeInstaller.exe" \
  10468. installed_file1="${W_WINDIR_WIN}/Installer/{95A890AA-B3B1-44B6-9C18-A8F7AB3EE7FC}/QTPlayer.ico"
  10469. load_quicktime72()
  10470. {
  10471. # https://support.apple.com/kb/DL837
  10472. w_download http://appldnld.apple.com.edgesuite.net/content.info.apple.com/QuickTime/061-2915.20070710.pO94c/QuickTimeInstaller.exe a42b93531910bdf1539cc5ae3199ade5a1ca63fd4ac971df74c345d8e1ee6593
  10473. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  10474. w_try "${WINE}" "${file1}" ALLUSERS=1 DESKTOP_SHORTCUTS=0 QTTaskRunFlags=0 QTINFO.BISQTPRO=1 SCHEDULE_ASUW=0 REBOOT_REQUIRED=No ${W_OPT_UNATTENDED:+/qn} > /dev/null 2>&1
  10475. if w_workaround_wine_bug 11681; then
  10476. # Following advice verified with test movies from
  10477. # https://support.apple.com/kb/HT1425
  10478. # in QuickTimePlayer.
  10479. case ${LANG} in
  10480. bg*) w_warn "В настройките на Quicktime, включете Разширени / Безопасен режим (gdi), иначе видеоклиповете няма да се възпроизвеждат." ;;
  10481. ru*) w_warn "В настройках Quicktime включите Дополнительно / Безопасный режим (только gdi), иначе видеофайлы не будут воспроизводиться." ;;
  10482. pt*) w_warn "Nas preferências do Quicktime, marque Advanced / Safe Mode (gdi), ou os vídeos não irão reproduzir." ;;
  10483. *) w_warn "In Quicktime preferences, check Advanced / Safe Mode (gdi), or movies won't play." ;;
  10484. esac
  10485. if [ -z "${W_OPT_UNATTENDED}" ]; then
  10486. w_try "${WINE}" control "${W_PROGRAMS_WIN}\\QuickTime\\QTSystem\\QuickTime.cpl"
  10487. else
  10488. # FIXME: script the control panel with AutoHotKey?
  10489. # We could probably also overwrite QuickTime.qtp but
  10490. # the format isn't known, so we'd have to override all other settings, too.
  10491. :
  10492. fi
  10493. fi
  10494. }
  10495. #----------------------------------------------------------------
  10496. w_metadata quicktime76 dlls \
  10497. title="Apple QuickTime 7.6" \
  10498. publisher="Apple" \
  10499. year="2010" \
  10500. media="download" \
  10501. file1="QuickTimeInstaller.exe" \
  10502. installed_file1="${W_WINDIR_WIN}/Installer/{57752979-A1C9-4C02-856B-FBB27AC4E02C}/QTPlayer.ico"
  10503. load_quicktime76()
  10504. {
  10505. # https://support.apple.com/kb/DL837
  10506. w_download http://appldnld.apple.com/QuickTime/041-0025.20101207.Ptrqt/QuickTimeInstaller.exe c2dcda76ed55428e406ad7e6acdc84e804d30752a1380c313394c09bb3e27f56
  10507. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  10508. w_try "${WINE}" QuickTimeInstaller.exe ALLUSERS=1 DESKTOP_SHORTCUTS=0 QTTaskRunFlags=0 QTINFO.BISQTPRO=1 SCHEDULE_ASUW=0 REBOOT_REQUIRED=No ${W_OPT_UNATTENDED:+/qn} > /dev/null 2>&1
  10509. if w_workaround_wine_bug 11681; then
  10510. # Following advice verified with test movies from
  10511. # https://support.apple.com/kb/HT1425
  10512. # in QuickTimePlayer.
  10513. case ${LANG} in
  10514. bg*) w_warn "В настройките на Quicktime, включете Разширени / Безопасен режим (gdi), иначе видеоклиповете няма да се възпроизвеждат." ;;
  10515. ru*) w_warn "В настройках Quicktime включите Дополнительно / Безопасный режим (только gdi), иначе видеофайлы не будут воспроизводиться." ;;
  10516. pt*) w_warn "Nas preferências do Quicktime, marque Advanced / Safe Mode (gdi), ou os vídeos não irão reproduzir." ;;
  10517. *) w_warn "In Quicktime preferences, check Advanced / Safe Mode (gdi), or movies won't play." ;;
  10518. esac
  10519. if [ -z "${W_OPT_UNATTENDED}" ]; then
  10520. w_try "${WINE}" control "${W_PROGRAMS_WIN}\\QuickTime\\QTSystem\\QuickTime.cpl"
  10521. else
  10522. # FIXME: script the control panel with AutoHotKey?
  10523. # We could probably also overwrite QuickTime.qtp but
  10524. # the format isn't known, so we'd have to override all other settings, too.
  10525. :
  10526. fi
  10527. fi
  10528. }
  10529. #----------------------------------------------------------------
  10530. w_metadata riched20 dlls \
  10531. title="MS RichEdit Control 2.0 (riched20.dll)" \
  10532. publisher="Microsoft" \
  10533. year="2004" \
  10534. media="download" \
  10535. file1="../win2ksp4/W2KSP4_EN.EXE" \
  10536. installed_file1="${W_SYSTEM32_DLLS_WIN}/riched20.dll"
  10537. load_riched20()
  10538. {
  10539. # FIXME: this verb used to also install riched32. Does anyone need that?
  10540. helper_win2ksp4 i386/riched20.dl_
  10541. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/riched20.dl_
  10542. w_override_dlls native,builtin riched20
  10543. # https://github.com/Winetricks/winetricks/issues/292
  10544. w_call msls31
  10545. }
  10546. #----------------------------------------------------------------
  10547. # Problem - riched20 and riched30 both install riched20.dll!
  10548. # We may need a better way to distinguish between installed files.
  10549. w_metadata riched30 dlls \
  10550. title="MS RichEdit Control 3.0 (riched20.dll, msls31.dll)" \
  10551. publisher="Microsoft" \
  10552. year="2001" \
  10553. media="download" \
  10554. file1="InstMsiA.exe" \
  10555. installed_file1="${W_SYSTEM32_DLLS_WIN}/riched20.dll" \
  10556. installed_file2="${W_SYSTEM32_DLLS_WIN}/msls31.dll"
  10557. load_riched30()
  10558. {
  10559. # http://www.novell.com/documentation/nm1/readmeen_web/readmeen_web.html#Akx3j64
  10560. # claims that Groupwise Messenger's View / Text Size command
  10561. # only works with riched30, and recommends getting it by installing
  10562. # msi 2, which just happens to come with riched30 version of riched20
  10563. # (though not with a corresponding riched32, which might be a problem)
  10564. # https://www.microsoft.com/en-us/download/details.aspx?id=21990
  10565. # Originally at https://download.microsoft.com/download/WindowsInstaller/Install/2.0/W9XMe/EN-US/InstMsiA.exe
  10566. # with sha256sum 536e4c8385d7d250fd5702a6868d1ed004692136eefad22252d0dac15f02563a
  10567. # Mirror list at http://www.filewatcher.com/m/InstMsiA.Exe.1707856-0.html
  10568. # But they all have a different sha256sum, 5ab8b82f578f09dbccf797754155e531b5996b532c1f19c531596ec07cc4b46d
  10569. # Since mirrors are dead, going back to the microsoft.com version, via archive.org
  10570. w_download https://web.archive.org/web/20060720160141/https://download.microsoft.com/download/WindowsInstaller/Install/2.0/W9XMe/EN-US/InstMsiA.exe 536e4c8385d7d250fd5702a6868d1ed004692136eefad22252d0dac15f02563a
  10571. w_try_cabextract --directory="${W_TMP}" "${W_CACHE}"/riched30/InstMsiA.exe
  10572. w_try_cp_dll "${W_TMP}"/riched20.dll "${W_SYSTEM32_DLLS}"
  10573. w_try_cp_dll "${W_TMP}"/msls31.dll "${W_SYSTEM32_DLLS}"
  10574. w_override_dlls native,builtin riched20
  10575. }
  10576. #----------------------------------------------------------------
  10577. w_metadata richtx32 dlls \
  10578. title="MS Rich TextBox Control 6.0" \
  10579. publisher="Microsoft" \
  10580. year="2012" \
  10581. media="download" \
  10582. file1="../vb6sp6/VB60SP6-KB2708437-x86-ENU.msi" \
  10583. installed_file1="${W_SYSTEM32_DLLS_WIN}/richtx32.ocx"
  10584. load_richtx32()
  10585. {
  10586. helper_vb6sp6 "${W_SYSTEM32_DLLS}" richtx32.ocx
  10587. w_try_regsvr richtx32.ocx
  10588. }
  10589. #----------------------------------------------------------------
  10590. w_metadata sapi dlls \
  10591. title="MS Speech API" \
  10592. publisher="Microsoft" \
  10593. year="2011" \
  10594. media="download" \
  10595. conflicts="speechsdk" \
  10596. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  10597. installed_file1="${W_SYSTEM32_DLLS_WIN}/sapi.dll"
  10598. load_sapi()
  10599. {
  10600. # This version of native SAPI needs to be directly in system32/syswow64
  10601. for stub in "${W_SYSTEM32_DLLS}/Speech" "${W_SYSTEM64_DLLS}/Speech"; do
  10602. if [ -d "${stub}" ]; then
  10603. w_try rm -rf "${stub}"
  10604. fi
  10605. done
  10606. helper_win7sp1 x86_microsoft-windows-speechcommon_31bf3856ad364e35_6.1.7601.17514_none_d809b28230ecfe46/sapi.dll
  10607. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-speechcommon_31bf3856ad364e35_6.1.7601.17514_none_d809b28230ecfe46/sapi.dll" "${W_SYSTEM32_DLLS}/sapi.dll"
  10608. w_override_dlls native sapi
  10609. w_try_regsvr sapi.dll
  10610. if [ "${W_ARCH}" = "win64" ]; then
  10611. helper_win7sp1_x64 amd64_microsoft-windows-speechcommon_31bf3856ad364e35_6.1.7601.17514_none_34284e05e94a6f7c/sapi.dll
  10612. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-speechcommon_31bf3856ad364e35_6.1.7601.17514_none_34284e05e94a6f7c/sapi.dll" "${W_SYSTEM64_DLLS}/sapi.dll"
  10613. w_try_regsvr64 sapi.dll
  10614. fi
  10615. }
  10616. #----------------------------------------------------------------
  10617. w_metadata sdl dlls \
  10618. title="Simple DirectMedia Layer" \
  10619. publisher="Sam Lantinga" \
  10620. year="2012" \
  10621. media="download" \
  10622. file1="SDL-1.2.15-win32.zip" \
  10623. installed_file1="${W_SYSTEM32_DLLS_WIN}/SDL.dll"
  10624. load_sdl()
  10625. {
  10626. # https://www.libsdl.org/download-1.2.php
  10627. w_download https://www.libsdl.org/release/SDL-1.2.15-win32.zip a28bbe38714ef7817b1c1e8082a48f391f15e4043402444b783952fca939edc1
  10628. w_try_unzip "${W_SYSTEM32_DLLS}" "${W_CACHE}"/sdl/SDL-1.2.15-win32.zip SDL.dll
  10629. }
  10630. #----------------------------------------------------------------
  10631. w_metadata secur32 dlls \
  10632. title="MS Security Support Provider Interface" \
  10633. publisher="Microsoft" \
  10634. year="2011" \
  10635. media="download" \
  10636. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  10637. installed_file1="${W_SYSTEM32_DLLS_WIN}/secur32.dll"
  10638. load_secur32()
  10639. {
  10640. w_warn "Installing native secur32 may lead to stack overflow crashes, see https://bugs.winehq.org/show_bug.cgi?id=45344"
  10641. helper_win7sp1 x86_microsoft-windows-lsa_31bf3856ad364e35_6.1.7601.17514_none_a851f4adbb0d5141/secur32.dll
  10642. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-lsa_31bf3856ad364e35_6.1.7601.17514_none_a851f4adbb0d5141/secur32.dll" "${W_SYSTEM32_DLLS}/secur32.dll"
  10643. if [ "${W_ARCH}" = "win64" ]; then
  10644. helper_win7sp1_x64 amd64_microsoft-windows-lsa_31bf3856ad364e35_6.1.7601.17514_none_04709031736ac277/secur32.dll
  10645. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-lsa_31bf3856ad364e35_6.1.7601.17514_none_04709031736ac277/secur32.dll" "${W_SYSTEM64_DLLS}/secur32.dll"
  10646. fi
  10647. w_override_dlls native,builtin secur32
  10648. }
  10649. #----------------------------------------------------------------
  10650. w_metadata setupapi dlls \
  10651. title="MS Setup API" \
  10652. publisher="Microsoft" \
  10653. year="2004" \
  10654. media="download" \
  10655. file1="../winxpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  10656. installed_file1="${W_SYSTEM32_DLLS_WIN}/setupapi.dll"
  10657. load_setupapi()
  10658. {
  10659. helper_winxpsp3 i386/setupapi.dl_
  10660. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/setupapi.dl_
  10661. w_override_dlls native,builtin setupapi
  10662. }
  10663. #----------------------------------------------------------------
  10664. w_metadata shockwave dlls \
  10665. title="Shockwave" \
  10666. publisher="Adobe" \
  10667. year="2018" \
  10668. media="download" \
  10669. file1="sw_lic_full_installer.msi" \
  10670. installed_file1="${W_SYSTEM32_DLLS_WIN}/Adobe/Shockwave 12/shockwave_Projector_Loader.dcr"
  10671. load_shockwave() {
  10672. # 2017/03/12: 39715a84b1d85347066fbf89a3af9f5e612b59402093b055cd423bd30a7f637d
  10673. # 2017/03/15: 58f2152bf726d52f08fb41f904c62ff00fdf748c8ce413e8c8547da3a21922ba
  10674. # 2017/08/03: bebebaef1644a994179a2e491ce3f55599d768f7c6019729f21e7029b1845b9c
  10675. # 2017/12/12: 0a9813ac55a8718440518dc2f5f410a3a065b422fe0618c073bfc631b9abf12c
  10676. # 2018/03/16: 4d7b408cf5b65a522b071d7d9ddbc5f6964911a7d55c418e31f393e6055cf796
  10677. # 2018/05/24: 2b03fa11ff6f31b3fef9313264f0ef356ee11d5bc3642c30a2482b4ac5dd0084
  10678. # 2018/06/14: a37f6c47b74fa3c96906e01b9b41d63c08d212fa3e357e354db1b5a93eb92c2f
  10679. # 2019/04/02: 8e414c1a218157d2b83877fb0b6a5002c2e9bff4dc2a3095bae774a13e3e9dbf
  10680. w_download https://fpdownload.macromedia.com/get/shockwave/default/english/win95nt/latest/sw_lic_full_installer.msi 8e414c1a218157d2b83877fb0b6a5002c2e9bff4dc2a3095bae774a13e3e9dbf
  10681. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  10682. w_try "${WINE}" msiexec /i sw_lic_full_installer.msi ${W_OPT_UNATTENDED:+/q}
  10683. }
  10684. #----------------------------------------------------------------
  10685. # While this is an sdk, some apps require it (those needing sapi.dll),
  10686. # so keeping in the dll category
  10687. w_metadata speechsdk dlls \
  10688. title="MS Speech SDK 5.1" \
  10689. publisher="Microsoft" \
  10690. year="2009" \
  10691. media="download" \
  10692. conflicts="sapi" \
  10693. file1="SpeechSDK51.exe" \
  10694. installed_file1="${W_PROGRAMS_X86_WIN}/Microsoft Speech SDK 5.1/Bin/SAPI51SampleApp.exe"
  10695. load_speechsdk()
  10696. {
  10697. w_package_unsupported_win64
  10698. # https://www.microsoft.com/en-us/download/details.aspx?id=10121
  10699. w_download https://web.archive.org/web/20110805062427/https://download.microsoft.com/download/B/4/3/B4314928-7B71-4336-9DE7-6FA4CF00B7B3/SpeechSDK51.exe 520aa5d1a72dc6f41dc9b8b88603228ffd5d5d6f696224fc237ec4828fe7f6e0
  10700. w_try_unzip "${W_TMP}" "${W_CACHE}"/speechsdk/SpeechSDK51.exe
  10701. # Otherwise it only installs the SDK and not the redistributable:
  10702. w_set_winver win2k
  10703. # Only added in wine-2.18
  10704. for stub in "${W_SYSTEM32_DLLS}/Speech/Common/sapi.dll" "${W_SYSTEM64_DLLS}/Speech/Common/sapi.dll"; do
  10705. if [ -f "${stub}" ]; then
  10706. w_try rm "${stub}"
  10707. fi
  10708. done
  10709. w_try_cd "${W_TMP}"
  10710. w_try "${WINE}" msiexec /i "Microsoft Speech SDK 5.1.msi" ${W_OPT_UNATTENDED:+/q}
  10711. # If sapi.dll isn't in original location, applications won't start, see
  10712. # e.g., https://bugs.winehq.org/show_bug.cgi?id=43841
  10713. w_try_mkdir "${W_SYSTEM32_DLLS}/Speech/Common/"
  10714. w_try ln -s "${W_COMMONFILES_X86}/Microsoft Shared/Speech/sapi.dll" "${W_SYSTEM32_DLLS}/Speech/Common"
  10715. w_override_dlls native sapi
  10716. # SAPI 5.1 doesn't work on vista and newer
  10717. w_set_winver winxp
  10718. }
  10719. #----------------------------------------------------------------
  10720. w_metadata tabctl32 dlls \
  10721. title="Microsoft Tabbed Dialog Control 6.0 (tabctl32.ocx)" \
  10722. publisher="Microsoft" \
  10723. year="2012" \
  10724. media="download" \
  10725. file1="../vb6sp6/VB60SP6-KB2708437-x86-ENU.msi" \
  10726. installed_file1="${W_SYSTEM32_DLLS_WIN}/tabctl32.ocx"
  10727. load_tabctl32()
  10728. {
  10729. helper_vb6sp6 "${W_TMP}" TabCtl32.ocx
  10730. w_try mv "${W_TMP}/TabCtl32.ocx" "${W_SYSTEM32_DLLS}/tabctl32.ocx"
  10731. w_try_regsvr tabctl32.ocx
  10732. }
  10733. #----------------------------------------------------------------
  10734. w_metadata updspapi dlls \
  10735. title="Windows Update Service API" \
  10736. publisher="Microsoft" \
  10737. year="2004" \
  10738. media="download" \
  10739. file1="../winxpsp3/WindowsXP-KB936929-SP3-x86-ENU.exe" \
  10740. installed_file1="${W_SYSTEM32_DLLS_WIN}/updspapi.dll"
  10741. load_updspapi()
  10742. {
  10743. helper_winxpsp3 i386/update/updspapi.dll
  10744. w_try_cp_dll "${W_TMP}"/i386/update/updspapi.dll "${W_SYSTEM32_DLLS}"
  10745. w_override_dlls native,builtin updspapi
  10746. }
  10747. #----------------------------------------------------------------
  10748. w_metadata urlmon dlls \
  10749. title="MS urlmon" \
  10750. publisher="Microsoft" \
  10751. year="2011" \
  10752. media="download" \
  10753. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  10754. installed_file1="${W_SYSTEM32_DLLS_WIN}/urlmon.dll"
  10755. load_urlmon()
  10756. {
  10757. helper_win7sp1 x86_microsoft-windows-i..ersandsecurityzones_31bf3856ad364e35_8.0.7601.17514_none_d1a4c8feac0dfcdb/urlmon.dll
  10758. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-i..ersandsecurityzones_31bf3856ad364e35_8.0.7601.17514_none_d1a4c8feac0dfcdb/urlmon.dll" "${W_SYSTEM32_DLLS}/urlmon.dll"
  10759. if [ "${W_ARCH}" = "win64" ]; then
  10760. helper_win7sp1_x64 amd64_microsoft-windows-i..ersandsecurityzones_31bf3856ad364e35_8.0.7601.17514_none_2dc36482646b6e11/urlmon.dll
  10761. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-i..ersandsecurityzones_31bf3856ad364e35_8.0.7601.17514_none_2dc36482646b6e11/urlmon.dll" "${W_SYSTEM64_DLLS}/urlmon.dll"
  10762. fi
  10763. w_override_dlls native,builtin urlmon
  10764. w_call iertutil
  10765. }
  10766. #----------------------------------------------------------------
  10767. w_metadata usp10 dlls \
  10768. title="Uniscribe" \
  10769. publisher="Microsoft" \
  10770. year="2011" \
  10771. media="download" \
  10772. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  10773. installed_file1="${W_SYSTEM32_DLLS_WIN}/usp10.dll"
  10774. load_usp10()
  10775. {
  10776. helper_win7sp1 x86_microsoft-windows-usp_31bf3856ad364e35_6.1.7601.17514_none_af01e2f9b6be7939/usp10.dll
  10777. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-usp_31bf3856ad364e35_6.1.7601.17514_none_af01e2f9b6be7939/usp10.dll" "${W_SYSTEM32_DLLS}/usp10.dll"
  10778. if [ "${W_ARCH}" = "win64" ]; then
  10779. helper_win7sp1_x64 amd64_microsoft-windows-usp_31bf3856ad364e35_6.1.7601.17514_none_0b207e7d6f1bea6f/usp10.dll
  10780. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-usp_31bf3856ad364e35_6.1.7601.17514_none_0b207e7d6f1bea6f/usp10.dll" "${W_SYSTEM64_DLLS}/usp10.dll"
  10781. fi
  10782. w_override_dlls native,builtin usp10
  10783. }
  10784. #----------------------------------------------------------------
  10785. w_metadata vb2run dlls \
  10786. title="MS Visual Basic 2 runtime" \
  10787. publisher="Microsoft" \
  10788. year="1993" \
  10789. media="download" \
  10790. file1="VBRUN200.EXE" \
  10791. installed_file1="${W_SYSTEM32_DLLS_WIN}/VBRUN200.DLL"
  10792. load_vb2run()
  10793. {
  10794. # Not referenced on MS web anymore, but the old Microsoft Software Library FTP still has it.
  10795. # See ftp://ftp.microsoft.com/Softlib/index.txt
  10796. # 2014/05/31: Microsoft FTP is down ftp://ftp.microsoft.com/Softlib/MSLFILES/VBRUN200.EXE
  10797. # 2015/08/10: chatnfiles is down, conradshome.com is up (and has a LOT of old MS installers archived!)
  10798. # 2018/11/15: now conradshome is down ,but quaddicted.com also has it (and a lot more)
  10799. w_download https://www.quaddicted.com/files/mirrors/ftp.planetquake.com/aoe/downloads/VBRUN200.EXE 4b0811d8fdcac1fd9411786c9119dc8d98d0540948211bdbc1ac682fbe5c0228
  10800. w_try_unzip "${W_TMP}" "${W_CACHE}"/vb2run/VBRUN200.EXE
  10801. w_try_cp_dll "${W_TMP}/VBRUN200.DLL" "${W_SYSTEM32_DLLS}"
  10802. }
  10803. #----------------------------------------------------------------
  10804. w_metadata vb3run dlls \
  10805. title="MS Visual Basic 3 runtime" \
  10806. publisher="Microsoft" \
  10807. year="1998" \
  10808. media="download" \
  10809. file1="vb3run.exe" \
  10810. installed_file1="${W_SYSTEM32_DLLS_WIN}/Vbrun300.dll"
  10811. load_vb3run()
  10812. {
  10813. # See https://support.microsoft.com/kb/196285
  10814. w_download https://download.microsoft.com/download/vb30/utility/1/w9xnt4/en-us/vb3run.exe 3ca3ad6332f83b5c2b86e4758afa400150f07ae66ce8b850d8f9d6bcd47ad4cd
  10815. w_try_unzip "${W_TMP}" "${W_CACHE}"/vb3run/vb3run.exe
  10816. w_try_cp_dll "${W_TMP}/Vbrun300.dll" "${W_SYSTEM32_DLLS}"
  10817. }
  10818. #----------------------------------------------------------------
  10819. w_metadata vb4run dlls \
  10820. title="MS Visual Basic 4 runtime" \
  10821. publisher="Microsoft" \
  10822. year="1998" \
  10823. media="download" \
  10824. file1="vb4run.exe" \
  10825. installed_file1="${W_SYSTEM32_DLLS_WIN}/Vb40032.dll"
  10826. load_vb4run()
  10827. {
  10828. # See https://support.microsoft.com/kb/196286
  10829. w_download https://download.microsoft.com/download/vb40ent/sample27/1/w9xnt4/en-us/vb4run.exe 40931308b5a137f9ce3e9da9b43f4ca6688e18b523687cfea8be6cdffa3153fb
  10830. w_try_unzip "${W_TMP}" "${W_CACHE}"/vb4run/vb4run.exe
  10831. w_try_cp_dll "${W_TMP}/Vb40032.dll" "${W_SYSTEM32_DLLS}"
  10832. w_try_cp_dll "${W_TMP}/Vb40016.dll" "${W_SYSTEM32_DLLS}"
  10833. }
  10834. #----------------------------------------------------------------
  10835. w_metadata vb5run dlls \
  10836. title="MS Visual Basic 5 runtime" \
  10837. publisher="Microsoft" \
  10838. year="2001" \
  10839. media="download" \
  10840. file1="msvbvm50.exe" \
  10841. installed_file1="${W_SYSTEM32_DLLS_WIN}/msvbvm50.dll"
  10842. load_vb5run()
  10843. {
  10844. w_download https://download.microsoft.com/download/vb50pro/utility/1/win98/en-us/msvbvm50.exe b5f8ea5b9d8b30822a2be2cdcb89cda99ec0149832659ad81f45360daa6e6965
  10845. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  10846. w_try "${WINE}" msvbvm50.exe ${W_OPT_UNATTENDED:+/q}
  10847. }
  10848. #----------------------------------------------------------------
  10849. w_metadata vb6run dlls \
  10850. title="MS Visual Basic 6 runtime sp6" \
  10851. publisher="Microsoft" \
  10852. year="2004" \
  10853. media="download" \
  10854. file1="vbrun60sp6.exe" \
  10855. installed_file1="${W_SYSTEM32_DLLS_WIN}/msvbvm60.dll"
  10856. load_vb6run()
  10857. {
  10858. # https://support.microsoft.com/kb/290887
  10859. if test ! -f "${W_CACHE}"/vb6run/vbrun60sp6.exe; then
  10860. w_download https://web.archive.org/web/20070204154430/https://download.microsoft.com/download/5/a/d/5ad868a0-8ecd-4bb0-a882-fe53eb7ef348/VB6.0-KB290887-X86.exe 467b5a10c369865f2021d379fc0933cb382146b702bbca4bcb703fc86f4322bb
  10861. w_try "${WINE}" "${W_CACHE}"/vb6run/VB6.0-KB290887-X86.exe "/T:${W_TMP_WIN}" /c ${W_OPT_UNATTENDED:+/q}
  10862. if test ! -f "${W_TMP}"/vbrun60sp6.exe; then
  10863. w_die vbrun60sp6.exe not found
  10864. fi
  10865. w_try mv "${W_TMP}"/vbrun60sp6.exe "${W_CACHE}"/vb6run
  10866. fi
  10867. # extract the files instead of using installer to avoid https://github.com/Winetricks/winetricks/issues/1806
  10868. w_try_cabextract -L "${W_CACHE}/${W_PACKAGE}/${file1}" -d "${W_TMP}"
  10869. for dll in asycfilt.dll comcat.dll msvbvm60.dll oleaut32.dll olepro32.dll stdole2.tlb; do
  10870. w_try mv "${W_TMP}/${dll}" "${W_SYSTEM32_DLLS}"
  10871. done
  10872. }
  10873. #----------------------------------------------------------------
  10874. winetricks_vcrun6_helper() {
  10875. if test ! -f "${W_CACHE}"/vcrun6/vcredist.exe; then
  10876. w_download_to vcrun6 https://download.microsoft.com/download/vc60pro/Update/2/W9XNT4/EN-US/VC6RedistSetup_deu.exe c2eb91d9c4448d50e46a32fecbcc3b418706d002beab9b5f4981de552098cee7
  10877. w_try "${WINE}" "${W_CACHE}"/vcrun6/VC6RedistSetup_deu.exe "/T:${W_TMP_WIN}" /c ${W_OPT_UNATTENDED:+/q}
  10878. if test ! -f "${W_TMP}"/vcredist.exe; then
  10879. w_die vcredist.exe not found
  10880. fi
  10881. mv "${W_TMP}"/vcredist.exe "${W_CACHE}"/vcrun6
  10882. fi
  10883. }
  10884. w_metadata vcrun6 dlls \
  10885. title="Visual C++ 6 SP4 libraries (mfc42, msvcp60, msvcirt)" \
  10886. publisher="Microsoft" \
  10887. year="2000" \
  10888. media="download" \
  10889. file1="VC6RedistSetup_deu.exe" \
  10890. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc42.dll"
  10891. load_vcrun6()
  10892. {
  10893. # Load the Visual C++ 6 runtime libraries, including the elusive mfc42u.dll
  10894. winetricks_vcrun6_helper
  10895. # extract the files instead of using installer to avoid https://github.com/Winetricks/winetricks/issues/1806
  10896. w_try_cabextract "${W_CACHE}/${W_PACKAGE}/${file1}" -d "${W_TMP}" -F vcredist.exe
  10897. w_try_cabextract "${W_TMP}/vcredist.exe" -d "${W_TMP}"
  10898. for dll in asycfilt.dll comcat.dll mfc42.dll mfc42u.dll msvcirt.dll msvcp60.dll msvcrt.dll oleaut32.dll olepro32.dll stdole2.tlb; do
  10899. w_try mv "${W_TMP}/${dll}" "${W_SYSTEM32_DLLS}"
  10900. done
  10901. # atla.dll lbecomes atl.dll (note: atlu.dll is unused)
  10902. w_try mv "${W_TMP}/atla.dll" "${W_SYSTEM32_DLLS}/atl.dll"
  10903. }
  10904. w_metadata mfc42 dlls \
  10905. title="Visual C++ 6 SP4 mfc42 library; part of vcrun6" \
  10906. publisher="Microsoft" \
  10907. year="2000" \
  10908. media="download" \
  10909. file1="../vcrun6/VC6RedistSetup_deu.exe" \
  10910. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc42u.dll"
  10911. load_mfc42()
  10912. {
  10913. winetricks_vcrun6_helper
  10914. w_try_cabextract "${W_CACHE}"/vcrun6/vcredist.exe -d "${W_SYSTEM32_DLLS}" -F "mfc42*.dll"
  10915. }
  10916. w_metadata msvcirt dlls \
  10917. title="Visual C++ 6 SP4 msvcirt library; part of vcrun6" \
  10918. publisher="Microsoft" \
  10919. year="2000" \
  10920. media="download" \
  10921. file1="../vcrun6/VC6RedistSetup_deu.exe" \
  10922. installed_file1="${W_SYSTEM32_DLLS_WIN}/msvcirt.dll"
  10923. load_msvcirt()
  10924. {
  10925. winetricks_vcrun6_helper
  10926. w_try_cabextract "${W_CACHE}"/vcrun6/vcredist.exe -d "${W_SYSTEM32_DLLS}" -F msvcirt.dll
  10927. }
  10928. #----------------------------------------------------------------
  10929. # FIXME: we don't currently have an install check that can distinguish
  10930. # between SP4 and SP6, it would have to check size or version of a file,
  10931. # or maybe a registry key.
  10932. w_metadata vcrun6sp6 dlls \
  10933. title="Visual C++ 6 SP6 libraries (with fixes in ATL and MFC)" \
  10934. publisher="Microsoft" \
  10935. year="2004" \
  10936. media="download" \
  10937. file1="VS6SP6.EXE" \
  10938. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc42.dll"
  10939. load_vcrun6sp6()
  10940. {
  10941. w_download https://www.ddsystem.com.br/update/setup/vb6+sp6/VS6SP6.EXE 7fa1d1778824b55a5fceb02f45c399b5d4e4dce7403661e67e587b5f455edbf3
  10942. # extract the files instead of using installer to avoid https://github.com/Winetricks/winetricks/issues/1806
  10943. w_try_cabextract "${W_CACHE}/${W_PACKAGE}/${file1}" -d "${W_TMP}" -F vcredist.exe
  10944. w_try_cabextract "${W_TMP}/vcredist.exe" -d "${W_TMP}"
  10945. for dll in asycfilt.dll comcat.dll mfc42.dll mfc42u.dll msvcirt.dll msvcp60.dll msvcrt.dll oleaut32.dll olepro32.dll stdole2.tlb; do
  10946. w_try mv "${W_TMP}/${dll}" "${W_SYSTEM32_DLLS}"
  10947. done
  10948. # atla.dll lbecomes atl.dll (note: atlu.dll is unused)
  10949. w_try mv "${W_TMP}/atla.dll" "${W_SYSTEM32_DLLS}/atl.dll"
  10950. }
  10951. #----------------------------------------------------------------
  10952. w_metadata vcrun2003 dlls \
  10953. title="Visual C++ 2003 libraries (mfc71,msvcp71,msvcr71)" \
  10954. publisher="Microsoft" \
  10955. year="2003" \
  10956. media="download" \
  10957. file1="BZEditW32_1.6.5.exe" \
  10958. installed_file1="${W_SYSTEM32_DLLS_WIN}/msvcp71.dll"
  10959. load_vcrun2003()
  10960. {
  10961. # Sadly, I know of no Microsoft URL for these
  10962. # winetricks-test can't handle ${file1} in url since it does a raw parsing :/
  10963. w_download https://sourceforge.net/projects/bzflag/files/bzedit%20win32/1.6.5/BZEditW32_1.6.5.exe 84d1bda5dbf814742898a2e1c0e4bc793e9bc1fba4b7a93d59a7ef12bd0fd802
  10964. w_try_7z "${W_SYSTEM32_DLLS}" "${W_CACHE}/vcrun2003/BZEditW32_1.6.5.exe" "mfc71.dll" "msvcp71.dll" "msvcr71.dll" -y
  10965. }
  10966. w_metadata mfc71 dlls \
  10967. title="Visual C++ 2003 mfc71 library; part of vcrun2003" \
  10968. publisher="Microsoft" \
  10969. year="2003" \
  10970. media="download" \
  10971. file1="BZEditW32_1.6.5.exe" \
  10972. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc71.dll"
  10973. load_mfc71()
  10974. {
  10975. w_download_to vcrun2003 https://sourceforge.net/projects/bzflag/files/bzedit%20win32/1.6.5/BZEditW32_1.6.5.exe 84d1bda5dbf814742898a2e1c0e4bc793e9bc1fba4b7a93d59a7ef12bd0fd802
  10976. w_try_7z "${W_SYSTEM32_DLLS}" "${W_CACHE}/vcrun2003/BZEditW32_1.6.5.exe" "mfc71.dll" -y
  10977. }
  10978. #----------------------------------------------------------------
  10979. # Temporary fix for bug 169
  10980. # The | symbol in installed_file1 means "or".
  10981. # (Adding an installed_file2 would mean 'and'.)
  10982. # Perhaps we should test for one if winxp mode, and the other if win7 mode;
  10983. # if that becomes important to get right, we'll do something like
  10984. # "if installed_file1 is just the single char @, call test_installed_$verb"
  10985. # and then define that function here.
  10986. w_metadata vcrun2005 dlls \
  10987. title="Visual C++ 2005 libraries (mfc80,msvcp80,msvcr80)" \
  10988. publisher="Microsoft" \
  10989. year="2011" \
  10990. media="download" \
  10991. file1="vcredist_x86.EXE" \
  10992. installed_file1="${W_WINDIR_WIN}/winsxs/x86_Microsoft.VC80.MFC_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_150c9e8b/mfc80.dll|${W_WINDIR_WIN}/winsxs/x86_microsoft.vc80.mfc_1fc8b3b9a1e18e3b_8.0.50727.6195_none_deadbeef/mfc80.dll"
  10993. load_vcrun2005()
  10994. {
  10995. # 2011/06: Security update, see
  10996. # https://technet.microsoft.com/library/security/ms11-025 or
  10997. # https://support.microsoft.com/kb/2538242
  10998. # Originally: 4ee4da0fe62d5fa1b5e80c6e6d88a4a2f8b3b140c35da51053d0d7b72a381d29
  10999. # 2021/05/25: 8648c5fc29c44b9112fe52f9a33f80e7fc42d10f3b5b42b2121542a13e44adfd
  11000. w_download https://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x86.EXE 8648c5fc29c44b9112fe52f9a33f80e7fc42d10f3b5b42b2121542a13e44adfd
  11001. # For native to be used, msvc* dlls must either be set to native only, OR
  11002. # set to native, builtin and remove wine's builtin manifest. Setting to native only breaks several apps,
  11003. # e.g., Dirac Codec and Ragnarok Online.
  11004. # For more info, see:
  11005. # https://bugs.winehq.org/show_bug.cgi?id=28225
  11006. # https://bugs.winehq.org/show_bug.cgi?id=33604
  11007. # https://bugs.winehq.org/show_bug.cgi?id=42859
  11008. w_override_dlls native,builtin atl80 msvcm80 msvcp80 msvcr80 vcomp
  11009. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  11010. w_try_ms_installer "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/q}
  11011. if [ "${W_ARCH}" = "win64" ] ;then
  11012. # Originally: 0551a61c85b718e1fa015b0c3e3f4c4eea0637055536c00e7969286b4fa663e0
  11013. # 2021/05/25: 4487570bd86e2e1aac29db2a1d0a91eb63361fcaac570808eb327cd4e0e2240d
  11014. w_download https://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x64.EXE 4487570bd86e2e1aac29db2a1d0a91eb63361fcaac570808eb327cd4e0e2240d
  11015. w_try_ms_installer "${WINE}" vcredist_x64.exe ${W_OPT_UNATTENDED:+/q}
  11016. fi
  11017. }
  11018. w_metadata mfc80 dlls \
  11019. title="Visual C++ 2005 mfc80 library; part of vcrun2005" \
  11020. publisher="Microsoft" \
  11021. year="2011" \
  11022. media="download" \
  11023. file1="../vcrun2005/vcredist_x86.EXE" \
  11024. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc80.dll"
  11025. load_mfc80()
  11026. {
  11027. w_download_to vcrun2005 https://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x86.EXE 8648c5fc29c44b9112fe52f9a33f80e7fc42d10f3b5b42b2121542a13e44adfd
  11028. w_try_cabextract --directory="${W_TMP}/win32" "${W_CACHE}"/vcrun2005/vcredist_x86.EXE -F 'vcredist.msi'
  11029. w_try_cabextract --directory="${W_TMP}/win32" "${W_TMP}/win32/vcredist.msi"
  11030. w_try_cp_dll "${W_TMP}/win32"/mfc80.dll.8.0.50727.6195.9BAE13A2_E7AF_D6C3_FF1F_C8B3B9A1E18E "${W_SYSTEM32_DLLS}"/mfc80.dll
  11031. w_try_cp_dll "${W_TMP}/win32"/mfc80u.dll.8.0.50727.6195.9BAE13A2_E7AF_D6C3_FF1F_C8B3B9A1E18E "${W_SYSTEM32_DLLS}"/mfc80u.dll
  11032. w_try_cp_dll "${W_TMP}/win32"/mfcm80.dll.8.0.50727.6195.9BAE13A2_E7AF_D6C3_FF1F_C8B3B9A1E18E "${W_SYSTEM32_DLLS}"/mfcm80.dll
  11033. w_try_cp_dll "${W_TMP}/win32"/mfcm80u.dll.8.0.50727.6195.9BAE13A2_E7AF_D6C3_FF1F_C8B3B9A1E18E "${W_SYSTEM32_DLLS}"/mfcm80u.dll
  11034. if [ "${W_ARCH}" = "win64" ]; then
  11035. w_download_to vcrun2005 https://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x64.EXE 4487570bd86e2e1aac29db2a1d0a91eb63361fcaac570808eb327cd4e0e2240d
  11036. w_try_cabextract --directory="${W_TMP}/win64" "${W_CACHE}"/vcrun2005/vcredist_x64.EXE -F 'vcredist.msi'
  11037. w_try_cabextract --directory="${W_TMP}/win64" "${W_TMP}/win64/vcredist.msi"
  11038. w_try_cp_dll "${W_TMP}/win64"/mfc80.dll.8.0.50727.6195.8731EA9C_B0D8_8F16_FF1F_C8B3B9A1E18E "${W_SYSTEM64_DLLS}"/mfc80.dll
  11039. w_try_cp_dll "${W_TMP}/win64"/mfc80u.dll.8.0.50727.6195.8731EA9C_B0D8_8F16_FF1F_C8B3B9A1E18E "${W_SYSTEM64_DLLS}"/mfc80u.dll
  11040. w_try_cp_dll "${W_TMP}/win64"/mfcm80.dll.8.0.50727.6195.8731EA9C_B0D8_8F16_FF1F_C8B3B9A1E18E "${W_SYSTEM64_DLLS}"/mfcm80.dll
  11041. w_try_cp_dll "${W_TMP}/win64"/mfcm80u.dll.8.0.50727.6195.8731EA9C_B0D8_8F16_FF1F_C8B3B9A1E18E "${W_SYSTEM64_DLLS}"/mfcm80u.dll
  11042. fi
  11043. }
  11044. #----------------------------------------------------------------
  11045. w_metadata vcrun2008 dlls \
  11046. title="Visual C++ 2008 libraries (mfc90,msvcp90,msvcr90)" \
  11047. publisher="Microsoft" \
  11048. year="2011" \
  11049. media="download" \
  11050. file1="vcredist_x86.exe" \
  11051. installed_file1="${W_PROGRAMS_X86_WIN}/Common Files/Microsoft Shared/VC/msdia90.dll"
  11052. load_vcrun2008()
  11053. {
  11054. # June 2011 security update, see
  11055. # https://technet.microsoft.com/library/security/ms11-025 or
  11056. # https://support.microsoft.com/kb/2538242
  11057. # Originally: 6b3e4c51c6c0e5f68c8a72b497445af3dbf976394cbb62aa23569065c28deeb6
  11058. # 2021/05/23: 8742bcbf24ef328a72d2a27b693cc7071e38d3bb4b9b44dec42aa3d2c8d61d92
  11059. w_download https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe 8742bcbf24ef328a72d2a27b693cc7071e38d3bb4b9b44dec42aa3d2c8d61d92
  11060. # For native to be used, msvc* dlls must either be set to native only, OR
  11061. # set to native, builtin and remove wine's builtin manifest. Setting to native only breaks several apps,
  11062. # e.g., Dirac Codec and Ragnarok Online.
  11063. # For more info, see:
  11064. # https://bugs.winehq.org/show_bug.cgi?id=28225
  11065. # https://bugs.winehq.org/show_bug.cgi?id=33604
  11066. # https://bugs.winehq.org/show_bug.cgi?id=42859
  11067. w_override_dlls native,builtin atl90 msvcm90 msvcp90 msvcr90 vcomp90
  11068. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  11069. w_try_ms_installer "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/q}
  11070. case "${W_ARCH}" in
  11071. win64)
  11072. # Also install the 64-bit version
  11073. # 2016/11/15: b811f2c047a3e828517c234bd4aa4883e1ec591d88fad21289ae68a6915a6665
  11074. # 2021/05/23: c5e273a4a16ab4d5471e91c7477719a2f45ddadb76c7f98a38fa5074a6838654
  11075. w_download https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe c5e273a4a16ab4d5471e91c7477719a2f45ddadb76c7f98a38fa5074a6838654
  11076. w_try_ms_installer "${WINE}" vcredist_x64.exe ${W_OPT_UNATTENDED:+/q}
  11077. ;;
  11078. esac
  11079. }
  11080. w_metadata mfc90 dlls \
  11081. title="Visual C++ 2008 mfc90 library; part of vcrun2008" \
  11082. publisher="Microsoft" \
  11083. year="2011" \
  11084. media="download" \
  11085. file1="../vcrun2008/vcredist_x86.exe" \
  11086. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc90.dll"
  11087. load_mfc90()
  11088. {
  11089. w_download_to vcrun2008 https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe 8742bcbf24ef328a72d2a27b693cc7071e38d3bb4b9b44dec42aa3d2c8d61d92
  11090. w_try_cabextract --directory="${W_TMP}/win32" "${W_CACHE}"/vcrun2008/vcredist_x86.exe -F 'vc_red.cab'
  11091. w_try_cabextract --directory="${W_TMP}/win32" "${W_TMP}/win32/vc_red.cab"
  11092. w_try_cp_dll "${W_TMP}/win32"/mfc90.dll.30729.6161.Microsoft_VC90_MFC_x86.QFE "${W_SYSTEM32_DLLS}"/mfc90.dll
  11093. w_try_cp_dll "${W_TMP}/win32"/mfc90u.dll.30729.6161.Microsoft_VC90_MFC_x86.QFE "${W_SYSTEM32_DLLS}"/mfc90u.dll
  11094. w_try_cp_dll "${W_TMP}/win32"/mfcm90.dll.30729.6161.Microsoft_VC90_MFC_x86.QFE "${W_SYSTEM32_DLLS}"/mfcm90.dll
  11095. w_try_cp_dll "${W_TMP}/win32"/mfcm90u.dll.30729.6161.Microsoft_VC90_MFC_x86.QFE "${W_SYSTEM32_DLLS}"/mfcm90u.dll
  11096. if [ "${W_ARCH}" = "win64" ]; then
  11097. w_download_to vcrun2008 https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe c5e273a4a16ab4d5471e91c7477719a2f45ddadb76c7f98a38fa5074a6838654
  11098. w_try_cabextract --directory="${W_TMP}/win64" "${W_CACHE}"/vcrun2008/vcredist_x64.exe -F 'vc_red.cab'
  11099. w_try_cabextract --directory="${W_TMP}/win64" "${W_TMP}/win64/vc_red.cab"
  11100. w_try_cp_dll "${W_TMP}/win64"/mfc90.dll.30729.6161.Microsoft_VC90_MFC_x64.QFE "${W_SYSTEM64_DLLS}"/mfc90.dll
  11101. w_try_cp_dll "${W_TMP}/win64"/mfc90u.dll.30729.6161.Microsoft_VC90_MFC_x64.QFE "${W_SYSTEM64_DLLS}"/mfc90u.dll
  11102. w_try_cp_dll "${W_TMP}/win64"/mfcm90.dll.30729.6161.Microsoft_VC90_MFC_x64.QFE "${W_SYSTEM64_DLLS}"/mfcm90.dll
  11103. w_try_cp_dll "${W_TMP}/win64"/mfcm90u.dll.30729.6161.Microsoft_VC90_MFC_x64.QFE "${W_SYSTEM64_DLLS}"/mfcm90u.dll
  11104. fi
  11105. }
  11106. #----------------------------------------------------------------
  11107. w_metadata vcrun2010 dlls \
  11108. title="Visual C++ 2010 libraries (mfc100,msvcp100,msvcr100)" \
  11109. publisher="Microsoft" \
  11110. year="2010" \
  11111. media="download" \
  11112. file1="vcredist_x86.exe" \
  11113. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc100.dll"
  11114. load_vcrun2010()
  11115. {
  11116. # See https://www.microsoft.com/en-us/download/details.aspx?id=5555
  11117. # Originally: 8162b2d665ca52884507ede19549e99939ce4ea4a638c537fa653539819138c8
  11118. # 2021/04/24: 31d32fa39d52cac9a765a43660431f7a127eee784b54b2f5e2af3e2b763a1af8
  11119. w_download https://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe 31d32fa39d52cac9a765a43660431f7a127eee784b54b2f5e2af3e2b763a1af8
  11120. w_override_dlls native,builtin msvcp100 msvcr100 vcomp100 atl100
  11121. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  11122. w_try_ms_installer "${WINE}" vcredist_x86.exe ${W_OPT_UNATTENDED:+/q}
  11123. case "${W_ARCH}" in
  11124. win64)
  11125. # Also install the 64-bit version
  11126. # https://www.microsoft.com/en-us/download/details.aspx?id=13523
  11127. # Originally: c6cd2d3f0b11dc2a604ffdc4dd97861a83b77e21709ba71b962a47759c93f4c8
  11128. # 2021/04/24: 2fddbc3aaaab784c16bc673c3bae5f80929d5b372810dbc28649283566d33255
  11129. w_download https://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe 2fddbc3aaaab784c16bc673c3bae5f80929d5b372810dbc28649283566d33255
  11130. w_try_ms_installer "${WINE}" vcredist_x64.exe ${W_OPT_UNATTENDED:+/q}
  11131. ;;
  11132. esac
  11133. }
  11134. w_metadata mfc100 dlls \
  11135. title="Visual C++ 2010 mfc100 library; part of vcrun2010" \
  11136. publisher="Microsoft" \
  11137. year="2010" \
  11138. media="download" \
  11139. file1="../vcrun2010/vcredist_x86.exe" \
  11140. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc100u.dll"
  11141. load_mfc100()
  11142. {
  11143. w_download_to vcrun2010 https://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe 31d32fa39d52cac9a765a43660431f7a127eee784b54b2f5e2af3e2b763a1af8
  11144. w_try_cabextract --directory="${W_TMP}/win32" "${W_CACHE}"/vcrun2010/vcredist_x86.exe -F '*.cab'
  11145. w_try_cabextract --directory="${W_TMP}/win32" "${W_TMP}/win32/vc_red.cab"
  11146. w_try_cp_dll "${W_TMP}/win32"/F_CENTRAL_mfc100_x86 "${W_SYSTEM32_DLLS}"/mfc100.dll
  11147. w_try_cp_dll "${W_TMP}/win32"/F_CENTRAL_mfc100u_x86 "${W_SYSTEM32_DLLS}"/mfc100u.dll
  11148. w_try_cp_dll "${W_TMP}/win32"/F_CENTRAL_mfcm100_x86 "${W_SYSTEM32_DLLS}"/mfcm100.dll
  11149. w_try_cp_dll "${W_TMP}/win32"/F_CENTRAL_mfcm100u_x86 "${W_SYSTEM32_DLLS}"/mfcm100u.dll
  11150. if [ "${W_ARCH}" = "win64" ]; then
  11151. w_download_to vcrun2010 https://download.microsoft.com/download/A/8/0/A80747C3-41BD-45DF-B505-E9710D2744E0/vcredist_x64.exe 2fddbc3aaaab784c16bc673c3bae5f80929d5b372810dbc28649283566d33255
  11152. w_try_cabextract --directory="${W_TMP}/win64" "${W_CACHE}"/vcrun2010/vcredist_x64.exe -F '*.cab'
  11153. w_try_cabextract --directory="${W_TMP}/win64" "${W_TMP}/win64/vc_red.cab"
  11154. w_try_cp_dll "${W_TMP}/win64"/F_CENTRAL_mfc100_x64 "${W_SYSTEM64_DLLS}"/mfc100.dll
  11155. w_try_cp_dll "${W_TMP}/win64"/F_CENTRAL_mfc100u_x64 "${W_SYSTEM64_DLLS}"/mfc100u.dll
  11156. w_try_cp_dll "${W_TMP}/win64"/F_CENTRAL_mfcm100_x64 "${W_SYSTEM64_DLLS}"/mfcm100.dll
  11157. w_try_cp_dll "${W_TMP}/win64"/F_CENTRAL_mfcm100u_x64 "${W_SYSTEM64_DLLS}"/mfcm100u.dll
  11158. fi
  11159. }
  11160. #----------------------------------------------------------------
  11161. w_metadata vcrun2012 dlls \
  11162. title="Visual C++ 2012 libraries (atl110,mfc110,mfc110u,msvcp110,msvcr110,vcomp110)" \
  11163. publisher="Microsoft" \
  11164. year="2012" \
  11165. media="download" \
  11166. file1="vcredist_x86.exe" \
  11167. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc110.dll"
  11168. load_vcrun2012()
  11169. {
  11170. # https://www.microsoft.com/en-us/download/details.aspx?id=30679
  11171. w_download https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe b924ad8062eaf4e70437c8be50fa612162795ff0839479546ce907ffa8d6e386
  11172. w_override_dlls native,builtin atl110 msvcp110 msvcr110 vcomp110
  11173. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  11174. w_try_ms_installer "${WINE}" vcredist_x86.exe ${W_OPT_UNATTENDED:+/q}
  11175. case "${W_ARCH}" in
  11176. win64)
  11177. # Also install the 64-bit version
  11178. # 2015/10/19: 681be3e5ba9fd3da02c09d7e565adfa078640ed66a0d58583efad2c1e3cc4064
  11179. w_download https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe 681be3e5ba9fd3da02c09d7e565adfa078640ed66a0d58583efad2c1e3cc4064
  11180. w_try_ms_installer "${WINE}" vcredist_x64.exe ${W_OPT_UNATTENDED:+/q}
  11181. ;;
  11182. esac
  11183. }
  11184. w_metadata mfc110 dlls \
  11185. title="Visual C++ 2012 mfc110 library; part of vcrun2012" \
  11186. publisher="Microsoft" \
  11187. year="2012" \
  11188. media="download" \
  11189. file1="../vcrun2012/vcredist_x86.exe" \
  11190. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc110u.dll"
  11191. load_mfc110()
  11192. {
  11193. w_download_to vcrun2012 https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe b924ad8062eaf4e70437c8be50fa612162795ff0839479546ce907ffa8d6e386
  11194. w_try_cabextract --directory="${W_TMP}/win32" "${W_CACHE}"/vcrun2012/vcredist_x86.exe -F 'a3'
  11195. w_try_cabextract --directory="${W_TMP}/win32" "${W_TMP}/win32/a3"
  11196. w_try_cp_dll "${W_TMP}/win32"/F_CENTRAL_mfc110_x86 "${W_SYSTEM32_DLLS}"/mfc110.dll
  11197. w_try_cp_dll "${W_TMP}/win32"/F_CENTRAL_mfc110u_x86 "${W_SYSTEM32_DLLS}"/mfc110u.dll
  11198. w_try_cp_dll "${W_TMP}/win32"/F_CENTRAL_mfcm110_x86 "${W_SYSTEM32_DLLS}"/mfcm110.dll
  11199. w_try_cp_dll "${W_TMP}/win32"/F_CENTRAL_mfcm110u_x86 "${W_SYSTEM32_DLLS}"/mfcm110u.dll
  11200. if [ "${W_ARCH}" = "win64" ]; then
  11201. w_download_to vcrun2012 https://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe 681be3e5ba9fd3da02c09d7e565adfa078640ed66a0d58583efad2c1e3cc4064
  11202. w_try_cabextract --directory="${W_TMP}/win64" "${W_CACHE}"/vcrun2012/vcredist_x64.exe -F 'a3'
  11203. w_try_cabextract --directory="${W_TMP}/win64" "${W_TMP}/win64/a3"
  11204. w_try_cp_dll "${W_TMP}/win64"/F_CENTRAL_mfc110_x64 "${W_SYSTEM64_DLLS}"/mfc110.dll
  11205. w_try_cp_dll "${W_TMP}/win64"/F_CENTRAL_mfc110u_x64 "${W_SYSTEM64_DLLS}"/mfc110u.dll
  11206. w_try_cp_dll "${W_TMP}/win64"/F_CENTRAL_mfcm110_x64 "${W_SYSTEM64_DLLS}"/mfcm110.dll
  11207. w_try_cp_dll "${W_TMP}/win64"/F_CENTRAL_mfcm110u_x64 "${W_SYSTEM64_DLLS}"/mfcm110u.dll
  11208. fi
  11209. }
  11210. #----------------------------------------------------------------
  11211. w_metadata vcrun2013 dlls \
  11212. title="Visual C++ 2013 libraries (mfc120,mfc120u,msvcp120,msvcr120,vcomp120)" \
  11213. publisher="Microsoft" \
  11214. year="2013" \
  11215. media="download" \
  11216. file1="vcredist_x86.exe" \
  11217. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc120.dll"
  11218. load_vcrun2013()
  11219. {
  11220. # https://support.microsoft.com/en-gb/help/3179560/update-for-visual-c-2013-and-visual-c-redistributable-package
  11221. # 2015/01/14: a22895e55b26202eae166838edbe2ea6aad00d7ea600c11f8a31ede5cbce2048
  11222. # 2019/03/24: 89f4e593ea5541d1c53f983923124f9fd061a1c0c967339109e375c661573c17
  11223. w_download https://download.microsoft.com/download/0/5/6/056dcda9-d667-4e27-8001-8a0c6971d6b1/vcredist_x86.exe 89f4e593ea5541d1c53f983923124f9fd061a1c0c967339109e375c661573c17
  11224. w_override_dlls native,builtin atl120 msvcp120 msvcr120 vcomp120
  11225. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  11226. w_try_ms_installer "${WINE}" vcredist_x86.exe ${W_OPT_UNATTENDED:+/q}
  11227. case "${W_ARCH}" in
  11228. win64)
  11229. # Also install the 64-bit version
  11230. # 2015/10/19: e554425243e3e8ca1cd5fe550db41e6fa58a007c74fad400274b128452f38fb8
  11231. # 2019/03/24: 20e2645b7cd5873b1fa3462b99a665ac8d6e14aae83ded9d875fea35ffdd7d7e
  11232. w_download https://download.microsoft.com/download/0/5/6/056dcda9-d667-4e27-8001-8a0c6971d6b1/vcredist_x64.exe 20e2645b7cd5873b1fa3462b99a665ac8d6e14aae83ded9d875fea35ffdd7d7e
  11233. w_try_ms_installer "${WINE}" vcredist_x64.exe ${W_OPT_UNATTENDED:+/q}
  11234. ;;
  11235. esac
  11236. }
  11237. w_metadata mfc120 dlls \
  11238. title="Visual C++ 2013 mfc120 library; part of vcrun2013" \
  11239. publisher="Microsoft" \
  11240. year="2013" \
  11241. media="download" \
  11242. file1="../vcrun2013/vcredist_x86.exe" \
  11243. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc120u.dll"
  11244. load_mfc120()
  11245. {
  11246. w_download_to vcrun2013 https://download.microsoft.com/download/0/5/6/056dcda9-d667-4e27-8001-8a0c6971d6b1/vcredist_x86.exe 89f4e593ea5541d1c53f983923124f9fd061a1c0c967339109e375c661573c17
  11247. w_try_cabextract --directory="${W_TMP}/win32" "${W_CACHE}"/vcrun2013/vcredist_x86.exe -F 'a3'
  11248. w_try_cabextract --directory="${W_TMP}/win32" "${W_TMP}/win32/a3"
  11249. w_try_cp_dll "${W_TMP}/win32"/F_CENTRAL_mfc120_x86 "${W_SYSTEM32_DLLS}"/mfc120.dll
  11250. w_try_cp_dll "${W_TMP}/win32"/F_CENTRAL_mfc120u_x86 "${W_SYSTEM32_DLLS}"/mfc120u.dll
  11251. w_try_cp_dll "${W_TMP}/win32"/F_CENTRAL_mfcm120_x86 "${W_SYSTEM32_DLLS}"/mfcm120.dll
  11252. w_try_cp_dll "${W_TMP}/win32"/F_CENTRAL_mfcm120u_x86 "${W_SYSTEM32_DLLS}"/mfcm120u.dll
  11253. if [ "${W_ARCH}" = "win64" ]; then
  11254. w_download_to vcrun2013 https://download.microsoft.com/download/0/5/6/056dcda9-d667-4e27-8001-8a0c6971d6b1/vcredist_x64.exe 20e2645b7cd5873b1fa3462b99a665ac8d6e14aae83ded9d875fea35ffdd7d7e
  11255. w_try_cabextract --directory="${W_TMP}/win64" "${W_CACHE}"/vcrun2013/vcredist_x64.exe -F 'a3'
  11256. w_try_cabextract --directory="${W_TMP}/win64" "${W_TMP}/win64/a3"
  11257. w_try_cp_dll "${W_TMP}/win64"/F_CENTRAL_mfc120_x64 "${W_SYSTEM64_DLLS}"/mfc120.dll
  11258. w_try_cp_dll "${W_TMP}/win64"/F_CENTRAL_mfc120u_x64 "${W_SYSTEM64_DLLS}"/mfc120u.dll
  11259. w_try_cp_dll "${W_TMP}/win64"/F_CENTRAL_mfcm120_x64 "${W_SYSTEM64_DLLS}"/mfcm120.dll
  11260. w_try_cp_dll "${W_TMP}/win64"/F_CENTRAL_mfcm120u_x64 "${W_SYSTEM64_DLLS}"/mfcm120u.dll
  11261. fi
  11262. }
  11263. #----------------------------------------------------------------
  11264. w_metadata vcrun2015 dlls \
  11265. title="Visual C++ 2015 libraries (concrt140.dll,mfc140.dll,mfc140u.dll,mfcm140.dll,mfcm140u.dll,msvcp140.dll,msvcp140_1.dll,msvcp140_atomic_wait.dll,vcamp140.dll,vccorlib140.dll,vcomp140.dll,vcruntime140.dll,vcruntime140_1.dll)" \
  11266. publisher="Microsoft" \
  11267. year="2015" \
  11268. media="download" \
  11269. conflicts="vcrun2017 vcrun2019 ucrtbase2019 vcrun2022" \
  11270. file1="vc_redist.x86.exe" \
  11271. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc140.dll"
  11272. load_vcrun2015()
  11273. {
  11274. # https://www.microsoft.com/en-us/download/details.aspx?id=53587
  11275. # 2022/09/16: dafb8b5f4b46bfaf7faa1d0ad05211f5c9855f0005cd603f8b5037b6a708d6b6
  11276. w_download https://download.microsoft.com/download/6/D/F/6DF3FF94-F7F9-4F0B-838C-A328D1A7D0EE/vc_redist.x86.exe dafb8b5f4b46bfaf7faa1d0ad05211f5c9855f0005cd603f8b5037b6a708d6b6
  11277. w_override_dlls native,builtin api-ms-win-crt-private-l1-1-0 api-ms-win-crt-conio-l1-1-0 api-ms-win-crt-convert-l1-1-0 api-ms-win-crt-environment-l1-1-0 api-ms-win-crt-filesystem-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 api-ms-win-crt-multibyte-l1-1-0 api-ms-win-crt-process-l1-1-0 api-ms-win-crt-runtime-l1-1-0 api-ms-win-crt-stdio-l1-1-0 api-ms-win-crt-string-l1-1-0 api-ms-win-crt-utility-l1-1-0 api-ms-win-crt-time-l1-1-0 atl140 concrt140 msvcp140 msvcp140_1 msvcp140_atomic_wait ucrtbase vcomp140 vccorlib140 vcruntime140 vcruntime140_1
  11278. if w_workaround_wine_bug 50894 "Working around failing wusa.exe lookup via C:\windows\SysNative"; then
  11279. w_store_winver
  11280. w_set_winver winxp
  11281. fi
  11282. # Setup will refuse to install ucrtbase because builtin's version number is higher, so manually replace it
  11283. # See https://bugs.winehq.org/show_bug.cgi?id=46317
  11284. w_try_cabextract --directory="${W_TMP}/win32" "${W_CACHE}"/vcrun2015/vc_redist.x86.exe -F 'a10'
  11285. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}/win32/a10" -F 'ucrtbase.dll'
  11286. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  11287. w_try_ms_installer "${WINE}" vc_redist.x86.exe ${W_OPT_UNATTENDED:+/q}
  11288. case "${W_ARCH}" in
  11289. win64)
  11290. # Also install the 64-bit version
  11291. # 2022/09/16: d7257265dbc0635c96dd67ddf938a09abe0866cb2d4fa05f8b758c8644e724e4
  11292. w_download https://download.microsoft.com/download/6/D/F/6DF3FF94-F7F9-4F0B-838C-A328D1A7D0EE/vc_redist.x64.exe d7257265dbc0635c96dd67ddf938a09abe0866cb2d4fa05f8b758c8644e724e4
  11293. # Also replace 64-bit ucrtbase.dll
  11294. w_try_cabextract --directory="${W_TMP}/win64" "${W_CACHE}"/vcrun2015/vc_redist.x64.exe -F 'a10'
  11295. w_try_cabextract --directory="${W_SYSTEM64_DLLS}" "${W_TMP}/win64/a10" -F 'ucrtbase.dll'
  11296. w_try_ms_installer "${WINE}" vc_redist.x64.exe ${W_OPT_UNATTENDED:+/q}
  11297. ;;
  11298. esac
  11299. w_restore_winver
  11300. }
  11301. w_metadata mfc140 dlls \
  11302. title="Visual C++ 2015 mfc140 library; part of vcrun2015" \
  11303. publisher="Microsoft" \
  11304. year="2015" \
  11305. media="download" \
  11306. file1="../vcrun2015/vc_redist.x86.exe" \
  11307. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc140u.dll"
  11308. load_mfc140()
  11309. {
  11310. w_download_to vcrun2015 https://download.microsoft.com/download/6/D/F/6DF3FF94-F7F9-4F0B-838C-A328D1A7D0EE/vc_redist.x86.exe dafb8b5f4b46bfaf7faa1d0ad05211f5c9855f0005cd603f8b5037b6a708d6b6
  11311. w_try_cabextract --directory="${W_TMP}/win32" "${W_CACHE}"/vcrun2015/vc_redist.x86.exe -F 'a11'
  11312. w_try_cabextract --directory="${W_TMP}/win32" "${W_TMP}/win32/a11"
  11313. w_try_cp_dll "${W_TMP}/win32"/mfc140.dll "${W_SYSTEM32_DLLS}"/mfc140.dll
  11314. w_try_cp_dll "${W_TMP}/win32"/mfc140u.dll "${W_SYSTEM32_DLLS}"/mfc140u.dll
  11315. w_try_cp_dll "${W_TMP}/win32"/mfcm140.dll "${W_SYSTEM32_DLLS}"/mfcm140.dll
  11316. w_try_cp_dll "${W_TMP}/win32"/mfcm140u.dll "${W_SYSTEM32_DLLS}"/mfcm140u.dll
  11317. if [ "${W_ARCH}" = "win64" ]; then
  11318. w_download_to vcrun2015 https://download.microsoft.com/download/6/D/F/6DF3FF94-F7F9-4F0B-838C-A328D1A7D0EE/vc_redist.x64.exe d7257265dbc0635c96dd67ddf938a09abe0866cb2d4fa05f8b758c8644e724e4
  11319. w_try_cabextract --directory="${W_TMP}/win64" "${W_CACHE}"/vcrun2015/vc_redist.x64.exe -F 'a11'
  11320. w_try_cabextract --directory="${W_TMP}/win64" "${W_TMP}/win64/a11"
  11321. w_try_cp_dll "${W_TMP}/win64"/mfc140.dll "${W_SYSTEM64_DLLS}"/mfc140.dll
  11322. w_try_cp_dll "${W_TMP}/win64"/mfc140u.dll "${W_SYSTEM64_DLLS}"/mfc140u.dll
  11323. w_try_cp_dll "${W_TMP}/win64"/mfcm140.dll "${W_SYSTEM64_DLLS}"/mfcm140.dll
  11324. w_try_cp_dll "${W_TMP}/win64"/mfcm140u.dll "${W_SYSTEM64_DLLS}"/mfcm140u.dll
  11325. fi
  11326. }
  11327. #----------------------------------------------------------------
  11328. w_metadata vcrun2017 dlls \
  11329. title="Visual C++ 2017 libraries (concrt140.dll,mfc140.dll,mfc140u.dll,mfcm140.dll,mfcm140u.dll,msvcp140.dll,msvcp140_1.dll,msvcp140_2.dll,msvcp140_atomic_wait.dll,vcamp140.dll,vccorlib140.dll,vcomp140.dll,vcruntime140.dll,vcruntime140_1.dll)" \
  11330. publisher="Microsoft" \
  11331. year="2017" \
  11332. media="download" \
  11333. conflicts="vcrun2015 vcrun2019 ucrtbase2019 vcrun2022" \
  11334. file1="vc_redist.x86.exe" \
  11335. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc140.dll"
  11336. load_vcrun2017()
  11337. {
  11338. # https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads
  11339. # 2017/10/02: 2da11e22a276be85970eaed255daf3d92af84e94142ec04252326a882e57303e
  11340. # 2019/03/17: 7355962b95d6a5441c304cd2b86baf37bc206f63349f4a02289bcfb69ef142d3
  11341. # 2019/08/14: 54ad46ae80984aa48cae6361213692c96b3639e322730d28c7fb93b183c761da
  11342. w_download https://aka.ms/vs/15/release/vc_redist.x86.exe 54ad46ae80984aa48cae6361213692c96b3639e322730d28c7fb93b183c761da
  11343. w_override_dlls native,builtin api-ms-win-crt-private-l1-1-0 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 api-ms-win-crt-runtime-l1-1-0 api-ms-win-crt-stdio-l1-1-0 api-ms-win-crt-time-l1-1-0 atl140 concrt140 msvcp140 msvcp140_1 msvcp140_2 msvcp140_atomic_wait ucrtbase vcamp140 vcomp140 vccorlib140 vcruntime140 vcruntime140_1
  11344. if w_workaround_wine_bug 50894 "Working around failing wusa.exe lookup via C:\windows\SysNative"; then
  11345. w_store_winver
  11346. w_set_winver winxp
  11347. fi
  11348. # Setup will refuse to install ucrtbase because builtin's version number is higher, so manually replace it
  11349. # See https://bugs.winehq.org/show_bug.cgi?id=46317
  11350. w_try_cabextract --directory="${W_TMP}/win32" "${W_CACHE}"/vcrun2017/vc_redist.x86.exe -F 'a10'
  11351. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}/win32/a10" -F 'ucrtbase.dll'
  11352. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  11353. w_try_ms_installer "${WINE}" vc_redist.x86.exe ${W_OPT_UNATTENDED:+/q}
  11354. case "${W_ARCH}" in
  11355. win64)
  11356. # Also install the 64-bit version
  11357. # https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads
  11358. # 2017/10/02: 7434bf559290cccc3dd3624f10c9e6422cce9927d2231d294114b2f929f0e465
  11359. # 2019/03/17: b192e143d55257a0a2f76be42e44ff8ee14014f3b1b196c6e59829b6b3ec453c
  11360. # 2019/08/14: 5b0cbb977f2f5253b1ebe5c9d30edbda35dbd68fb70de7af5faac6423db575b5
  11361. w_download https://aka.ms/vs/15/release/vc_redist.x64.exe 5b0cbb977f2f5253b1ebe5c9d30edbda35dbd68fb70de7af5faac6423db575b5
  11362. # Also replace 64-bit ucrtbase.dll
  11363. w_try_cabextract --directory="${W_TMP}/win64" "${W_CACHE}"/vcrun2017/vc_redist.x64.exe -F 'a10'
  11364. w_try_cabextract --directory="${W_SYSTEM64_DLLS}" "${W_TMP}/win64/a10" -F 'ucrtbase.dll'
  11365. w_try_ms_installer "${WINE}" vc_redist.x64.exe ${W_OPT_UNATTENDED:+/q}
  11366. ;;
  11367. esac
  11368. w_restore_winver
  11369. }
  11370. #----------------------------------------------------------------
  11371. w_metadata vcrun2019 dlls \
  11372. title="Visual C++ 2015-2019 libraries (concrt140.dll,mfc140.dll,mfc140u.dll,mfcm140.dll,mfcm140u.dll,msvcp140.dll,msvcp140_1.dll,msvcp140_2.dll,msvcp140_atomic_wait.dll,msvcp140_codecvt_ids.dll,vcamp140.dll,vccorlib140.dll,vcomp140.dll,vcruntime140.dll,vcruntime140_1.dll" \
  11373. publisher="Microsoft" \
  11374. year="2019" \
  11375. media="download" \
  11376. conflicts="vcrun2015 vcrun2017 vcrun2022" \
  11377. file1="vc_redist.x86.exe" \
  11378. installed_file1="${W_SYSTEM32_DLLS_WIN}/mfc140.dll"
  11379. load_vcrun2019()
  11380. {
  11381. # https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
  11382. # 2019/12/26: e59ae3e886bd4571a811fe31a47959ae5c40d87c583f786816c60440252cd7ec
  11383. # 2020/03/23: ac96016f1511ae3eb5ec9de04551146fe351b7f97858dcd67163912e2302f5d6
  11384. # 2020/05/20: a06aac66734a618ab33c1522920654ddfc44fc13cafaa0f0ab85b199c3d51dc0
  11385. # 2020/08/05: b4d433e2f66b30b478c0d080ccd5217ca2a963c16e90caf10b1e0592b7d8d519
  11386. # 2020/10/03: caa38fd474164a38ab47ac1755c8ccca5ccfacfa9a874f62609e6439924e87ec
  11387. # 2020/11/13: 50a3e92ade4c2d8f310a2812d46322459104039b9deadbd7fdd483b5c697c0c8
  11388. # 2021/03/09: 4521ed84b9b1679a706e719423d54ef5e413dc50dde1cf362232d7359d7e89c4
  11389. # 2021/03/28: e830c313aa99656748f9d2ed582c28101eaaf75f5377e3fb104c761bf3f808b2
  11390. # 2021/04/05: e830c313aa99656748f9d2ed582c28101eaaf75f5377e3fb104c761bf3f808b2
  11391. # 2021/04/13: 14563755ac24a874241935ef2c22c5fce973acb001f99e524145113b2dc638c1
  11392. # 2021/06/06: 91c21c93a88dd82e8ae429534dacbc7a4885198361eae18d82920c714e328cf9
  11393. # 2021/08/26: 1acd8d5ea1cdc3eb2eb4c87be3ab28722d0825c15449e5c9ceef95d897de52fa
  11394. # 2021/10/23: 80c7969f4e05002a0cd820b746e0acb7406d4b85e52ef096707315b390927824
  11395. # 2022/01/18: 4c6c420cf4cbf2c9c9ed476e96580ae92a97b2822c21329a2e49e8439ac5ad30
  11396. w_override_dlls native,builtin api-ms-win-crt-private-l1-1-0 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 api-ms-win-crt-runtime-l1-1-0 api-ms-win-crt-stdio-l1-1-0 api-ms-win-crt-time-l1-1-0 atl140 concrt140 msvcp140 msvcp140_1 msvcp140_2 msvcp140_atomic_wait msvcp140_codecvt_ids vcamp140 vccorlib140 vcomp140 vcruntime140
  11397. w_download https://aka.ms/vs/16/release/vc_redist.x86.exe 4c6c420cf4cbf2c9c9ed476e96580ae92a97b2822c21329a2e49e8439ac5ad30
  11398. if w_workaround_wine_bug 50894 "Working around failing wusa.exe lookup via C:\windows\SysNative"; then
  11399. w_store_winver
  11400. w_set_winver winxp
  11401. fi
  11402. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  11403. w_try_ms_installer "${WINE}" vc_redist.x86.exe ${W_OPT_UNATTENDED:+/q}
  11404. case "${W_ARCH}" in
  11405. win64)
  11406. # Also install the 64-bit version
  11407. # 2019/12/26: 40ea2955391c9eae3e35619c4c24b5aaf3d17aeaa6d09424ee9672aa9372aeed
  11408. # 2020/03/23: b6c82087a2c443db859fdbeaae7f46244d06c3f2a7f71c35e50358066253de52
  11409. # 2020/05/20: 7d7105c52fcd6766beee1ae162aa81e278686122c1e44890712326634d0b055e
  11410. # 2020/08/05: 952a0c6cb4a3dd14c3666ef05bb1982c5ff7f87b7103c2ba896354f00651e358
  11411. # 2020/10/03: 4b5890eb1aefdf8dfa3234b5032147eb90f050c5758a80901b201ae969780107
  11412. # 2020/11/13: b1a32c71a6b7d5978904fb223763263ea5a7eb23b2c44a0d60e90d234ad99178
  11413. # 2021/03/09: f299953673de262fefad9dd19bfbe6a5725a03ae733bebfec856f1306f79c9f7
  11414. # 2021/03/28: b6c82087a2c443db859fdbeaae7f46244d06c3f2a7f71c35e50358066253de52
  11415. # 2021/04/05: 015edd4e5d36e053b23a01adb77a2b12444d3fb6eccefe23e3a8cd6388616a16
  11416. # 2021/04/13: 52b196bbe9016488c735e7b41805b651261ffa5d7aa86eb6a1d0095be83687b2
  11417. # 2021/06/06: a1592d3da2b27230c087a3b069409c1e82c2664b0d4c3b511701624702b2e2a3
  11418. # 2021/08/26: 003063723b2131da23f40e2063fb79867bae275f7b5c099dbd1792e25845872b
  11419. # 2021/10/23: 9b9dd72c27ab1db081de56bb7b73bee9a00f60d14ed8e6fde45dab3e619b5f04
  11420. # 2022/01/18: 296f96cd102250636bcd23ab6e6cf70935337b1bbb3507fe8521d8d9cfaa932f
  11421. # vcruntime140_1 is only shipped on x64:
  11422. w_override_dlls native,builtin vcruntime140_1
  11423. w_download https://aka.ms/vs/16/release/vc_redist.x64.exe 296f96cd102250636bcd23ab6e6cf70935337b1bbb3507fe8521d8d9cfaa932f
  11424. w_try_ms_installer "${WINE}" vc_redist.x64.exe ${W_OPT_UNATTENDED:+/q}
  11425. ;;
  11426. esac
  11427. w_call ucrtbase2019
  11428. w_restore_winver
  11429. }
  11430. #----------------------------------------------------------------
  11431. w_metadata ucrtbase2019 dlls \
  11432. title="Visual C++ 2019 library (ucrtbase.dll)" \
  11433. publisher="Microsoft" \
  11434. year="2019" \
  11435. media="download" \
  11436. conflicts="vcrun2015 vcrun2017" \
  11437. file1="vc_redist.x86.exe" \
  11438. installed_file1="${W_SYSTEM32_DLLS_WIN}/ucrtbase.dll"
  11439. load_ucrtbase2019()
  11440. {
  11441. w_override_dlls native,builtin ucrtbase
  11442. # Microsoft download no longer containts ucrtbase so get the last known version from archive.org
  11443. w_download https://web.archive.org/web/20210415064013/https://download.visualstudio.microsoft.com/download/pr/85d47aa9-69ae-4162-8300-e6b7e4bf3cf3/14563755AC24A874241935EF2C22C5FCE973ACB001F99E524145113B2DC638C1/VC_redist.x86.exe 14563755ac24a874241935ef2c22c5fce973acb001f99e524145113b2dc638c1
  11444. w_try_cabextract --directory="${W_TMP}/win32" "${W_CACHE}"/"${W_PACKAGE}"/VC_redist.x86.exe -F 'a10'
  11445. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}/win32/a10" -F 'ucrtbase.dll'
  11446. case "${W_ARCH}" in
  11447. win64)
  11448. # Microsoft download no longer containts ucrtbase so get the last known version from archive.org
  11449. w_download https://web.archive.org/web/20210414165612/https://download.visualstudio.microsoft.com/download/pr/85d47aa9-69ae-4162-8300-e6b7e4bf3cf3/52B196BBE9016488C735E7B41805B651261FFA5D7AA86EB6A1D0095BE83687B2/VC_redist.x64.exe 52b196bbe9016488c735e7b41805b651261ffa5d7aa86eb6a1d0095be83687b2
  11450. w_try_cabextract --directory="${W_TMP}/win64" "${W_CACHE}"/"${W_PACKAGE}"/VC_redist.x64.exe -F 'a10'
  11451. w_try_cabextract --directory="${W_SYSTEM64_DLLS}" "${W_TMP}/win64/a10" -F 'ucrtbase.dll'
  11452. ;;
  11453. esac
  11454. }
  11455. #----------------------------------------------------------------
  11456. w_metadata vcrun2022 dlls \
  11457. title="Visual C++ 2015-2022 libraries (concrt140.dll,mfc140.dll,mfc140chs.dll,mfc140cht.dll,mfc140deu.dll,mfc140enu.dll,mfc140esn.dll,mfc140fra.dll,mfc140ita.dll,mfc140jpn.dll,mfc140kor.dll,mfc140rus.dll,mfc140u.dll,mfcm140.dll,mfcm140u.dll,msvcp140.dll,msvcp140_1.dll,msvcp140_2.dll,msvcp140_atomic_wait.dll,msvcp140_codecvt_ids.dll,vcamp140.dll,vccorlib140.dll,vcomp140.dll,vcruntime140.dll,vcruntime140_1.dll)" \
  11458. publisher="Microsoft" \
  11459. year="2022" \
  11460. media="download" \
  11461. conflicts="vcrun2015 vcrun2017 vcrun2019" \
  11462. file1="vc_redist.x86.exe" \
  11463. installed_file1="${W_SYSTEM32_DLLS_WIN}/vcruntime140.dll"
  11464. load_vcrun2022()
  11465. {
  11466. # https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
  11467. # 2022-08-05: 14.32.31332 @ https://download.visualstudio.microsoft.com/download/pr/7331f052-6c2d-4890-8041-8058fee5fb0f/CF92A10C62FFAB83B4A2168F5F9A05E5588023890B5C0CC7BA89ED71DA527B0F/VC_redist.x86.exe cf92a10c62ffab83b4a2168f5f9a05e5588023890b5c0cc7ba89ed71da527b0f
  11468. # 2023-04-30: 14.34.31938 @ https://download.visualstudio.microsoft.com/download/pr/b2519016-4a13-4120-936c-cae003d567c4/8AE59D82845159DB3A70763F5CB1571E45EBF6A1ADFECC47574BA17B019483A0/VC_redist.x86.exe 8ae59d82845159db3a70763f5cb1571e45ebf6a1adfecc47574ba17b019483a0
  11469. # 2023/07/04: 14.36.32532 @ https://download.visualstudio.microsoft.com/download/pr/eaab1f82-787d-4fd7-8c73-f782341a0c63/5365A927487945ECB040E143EA770ADBB296074ECE4021B1D14213BDE538C490/VC_redist.x86.exe 5365a927487945ecb040e143ea770adbb296074ece4021b1d14213bde538c490
  11470. w_override_dlls native,builtin concrt140 msvcp140 msvcp140_1 msvcp140_2 msvcp140_atomic_wait msvcp140_codecvt_ids vcamp140 vccorlib140 vcomp140 vcruntime140
  11471. w_download https://aka.ms/vs/17/release/vc_redist.x86.exe 5365a927487945ecb040e143ea770adbb296074ece4021b1d14213bde538c490
  11472. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  11473. w_try_ms_installer "${WINE}" vc_redist.x86.exe ${W_OPT_UNATTENDED:+/q}
  11474. case "${W_ARCH}" in
  11475. win64)
  11476. # Also install the 64-bit version
  11477. # 2022/08/05: 14.32.31332 @ https://download.visualstudio.microsoft.com/download/pr/7331f052-6c2d-4890-8041-8058fee5fb0f/CE6593A1520591E7DEA2B93FD03116E3FC3B3821A0525322B0A430FAA6B3C0B4/VC_redist.x64.exe 8ae59d82845159db3a70763f5cb1571e45ebf6a1adfecc47574ba17b019483a0
  11478. # 2023/04/30: 14.34.31938 @ https://download.visualstudio.microsoft.com/download/pr/8b92f460-7e03-4c75-a139-e264a770758d/26C2C72FBA6438F5E29AF8EBC4826A1E424581B3C446F8C735361F1DB7BEFF72/VC_redist.x64.exe 26c2c72fba6438f5e29af8ebc4826a1e424581b3c446f8c735361f1db7beff72
  11479. # 2023/07/04: 14.36.32532 @ https://download.visualstudio.microsoft.com/download/pr/eaab1f82-787d-4fd7-8c73-f782341a0c63/917C37D816488545B70AFFD77D6E486E4DD27E2ECE63F6BBAAF486B178B2B888/VC_redist.x64.exe 917c37d816488545b70affd77d6e486e4dd27e2ece63f6bbaaf486b178b2b888
  11480. # vcruntime140_1 is only shipped on x64:
  11481. w_override_dlls native,builtin vcruntime140_1
  11482. w_download https://aka.ms/vs/17/release/vc_redist.x64.exe 917c37d816488545b70affd77d6e486e4dd27e2ece63f6bbaaf486b178b2b888
  11483. w_try_ms_installer "${WINE}" vc_redist.x64.exe ${W_OPT_UNATTENDED:+/q}
  11484. ;;
  11485. esac
  11486. }
  11487. #----------------------------------------------------------------
  11488. w_metadata vjrun20 dlls \
  11489. title="MS Visual J# 2.0 SE libraries (requires dotnet20)" \
  11490. publisher="Microsoft" \
  11491. year="2007" \
  11492. media="download" \
  11493. file1="vjredist.exe" \
  11494. installed_file1="${W_WINDIR_WIN}/Microsoft.NET/Framework/VJSharp/VJSharpSxS10.dll"
  11495. load_vjrun20()
  11496. {
  11497. w_package_unsupported_win64
  11498. w_call dotnet20
  11499. # See https://www.microsoft.com/en-us/download/details.aspx?id=18084
  11500. w_download https://web.archive.org/web/20200803205240/https://download.microsoft.com/download/9/2/3/92338cd0-759f-4815-8981-24b437be74ef/vjredist.exe cf8f3dd4ad41453a302870b74de1c6489e7ed255ad3f652ce4af0b424a933b41
  11501. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  11502. w_try "${WINE}" vjredist.exe ${W_OPT_UNATTENDED:+/q /C:"install /qnt"}
  11503. }
  11504. #----------------------------------------------------------------
  11505. w_metadata vstools2019 apps \
  11506. title="MS Visual Studio Build Tools 2019" \
  11507. publisher="Microsoft" \
  11508. year="2019" \
  11509. media="download"
  11510. load_vstools2019()
  11511. {
  11512. w_call dotnet472
  11513. w_download https://aka.ms/vs/16/release/installer e653e715ddb8a08873e50a2fe091fca2ce77726b8b6ed2b99ed916d0e03c1fbe vstools2019.zip
  11514. w_try_unzip "${W_TMP}/vs_installer_16" "${W_CACHE}/${W_PACKAGE}/vstools2019.zip"
  11515. w_try "${WINE}" "${W_TMP}"/vs_installer_16/Contents/vs_installer.exe install \
  11516. --channelId VisualStudio.16.Release \
  11517. --channelUri "https://aka.ms/vs/16/release/channel" \
  11518. --productId "Microsoft.VisualStudio.Product.BuildTools" \
  11519. --add "Microsoft.VisualStudio.Workload.VCTools" \
  11520. --includeRecommended \
  11521. ${W_OPT_UNATTENDED:+--quiet}
  11522. }
  11523. #----------------------------------------------------------------
  11524. w_metadata webio dlls \
  11525. title="MS Windows Web I/O" \
  11526. publisher="Microsoft" \
  11527. year="2011" \
  11528. media="download" \
  11529. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  11530. installed_file1="${W_SYSTEM32_DLLS_WIN}/webio.dll"
  11531. load_webio()
  11532. {
  11533. helper_win7sp1 x86_microsoft-windows-webio_31bf3856ad364e35_6.1.7601.17514_none_5ef1a4093cf55387/webio.dll
  11534. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-webio_31bf3856ad364e35_6.1.7601.17514_none_5ef1a4093cf55387/webio.dll" "${W_SYSTEM32_DLLS}/webio.dll"
  11535. if [ "${W_ARCH}" = "win64" ]; then
  11536. helper_win7sp1_x64 amd64_microsoft-windows-webio_31bf3856ad364e35_6.1.7601.17514_none_bb103f8cf552c4bd/webio.dll
  11537. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-webio_31bf3856ad364e35_6.1.7601.17514_none_bb103f8cf552c4bd/webio.dll" "${W_SYSTEM64_DLLS}/webio.dll"
  11538. fi
  11539. w_override_dlls native,builtin webio
  11540. }
  11541. #----------------------------------------------------------------
  11542. w_metadata windowscodecs dlls \
  11543. title="MS Windows Imaging Component" \
  11544. publisher="Microsoft" \
  11545. year="2006" \
  11546. media="download" \
  11547. file1="wic_x86_enu.exe" \
  11548. installed_file1="${W_SYSTEM32_DLLS_WIN}/WindowsCodecs.dll"
  11549. load_windowscodecs()
  11550. {
  11551. # Separate 32/64-bit installers:
  11552. if [ "${W_ARCH}" = "win32" ] ; then
  11553. # https://www.microsoft.com/en-us/download/details.aspx?id=32
  11554. w_download https://web.archive.org/web/20200810071051if_/https://download.microsoft.com/download/f/f/1/ff178bb1-da91-48ed-89e5-478a99387d4f/wic_x86_enu.exe 196868b09d87ae04e4ab42b4a3e0abbb160500e8ff13deb38e2956ee854868b1
  11555. EXE="wic_x86_enu.exe"
  11556. elif [ "${W_ARCH}" = "win64" ] ; then
  11557. # https://www.microsoft.com/en-us/download/details.aspx?id=1385
  11558. w_download https://web.archive.org/web/20191125095535if_/http://download.microsoft.com/download/6/4/5/645fed5f-a6e7-44d9-9d10-fe83348796b0/wic_x64_enu.exe 5822fecd69a90c2833965a25e8779000825d69cc8c9250933f0ab70df52171e1
  11559. EXE="wic_x64_enu.exe"
  11560. else
  11561. w_die "Invalid W_ARCH value, ${W_ARCH}"
  11562. fi
  11563. # Avoid a file existence check.
  11564. w_try rm -f "${W_SYSTEM32_DLLS}"/windowscodecs.dll "${W_SYSTEM32_DLLS}"/windowscodecsext.dll "${W_SYSTEM32_DLLS}"/wmphoto.dll "${W_SYSTEM32_DLLS}"/photometadatahandler.dll
  11565. if [ "${W_ARCH}" = "win64" ]; then
  11566. w_try rm -f "${W_SYSTEM64_DLLS}"/windowscodecs.dll "${W_SYSTEM64_DLLS}"/windowscodecsext.dll "${W_SYSTEM64_DLLS}"/wmphoto.dll "${W_SYSTEM64_DLLS}"/photometadatahandler.dll
  11567. fi
  11568. # AF says in AppDB entry for .NET 3.0 that windowscodecs has to be native only
  11569. w_override_dlls native windowscodecs windowscodecsext
  11570. # Previously this was winxp, but that didn't work for 64-bit, see https://github.com/Winetricks/winetricks/issues/970
  11571. w_store_winver
  11572. w_set_winver win2k3
  11573. # Always run the WIC installer in passive mode.
  11574. # See https://bugs.winehq.org/show_bug.cgi?id=16876 and
  11575. # https://bugs.winehq.org/show_bug.cgi?id=23232
  11576. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  11577. if w_workaround_wine_bug 32859 "Working around possibly broken libX11"; then
  11578. # shellcheck disable=SC2086
  11579. w_try ${W_TASKSET} "${WINE}" "${EXE}" /passive
  11580. else
  11581. w_try "${WINE}" "${EXE}" /passive
  11582. fi
  11583. w_restore_winver
  11584. }
  11585. #----------------------------------------------------------------
  11586. w_metadata winhttp dlls \
  11587. title="MS Windows HTTP Services" \
  11588. publisher="Microsoft" \
  11589. year="2005" \
  11590. media="download" \
  11591. file1="../win2ksp4/W2KSP4_EN.EXE" \
  11592. installed_file1="${W_SYSTEM32_DLLS_WIN}/winhttp.dll"
  11593. load_winhttp()
  11594. {
  11595. # 2017/10/12: Can't use win7's version, as that need webio.dll, which wants ntdll.EtwEventActivityIdControl.
  11596. # Should get that into wine{,-stable} so we can use win7 version in the long run
  11597. # See https://github.com/Winetricks/winetricks/issues/831
  11598. helper_win2ksp4 i386/new/winhttp.dl_
  11599. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/new/winhttp.dl_
  11600. w_override_dlls native,builtin winhttp
  11601. }
  11602. #----------------------------------------------------------------
  11603. w_metadata wininet dlls \
  11604. title="MS Windows Internet API" \
  11605. publisher="Microsoft" \
  11606. year="2011" \
  11607. media="download" \
  11608. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  11609. installed_file1="${W_SYSTEM32_DLLS_WIN}/wininet.dll"
  11610. load_wininet()
  11611. {
  11612. helper_win7sp1 x86_microsoft-windows-i..tocolimplementation_31bf3856ad364e35_8.0.7601.17514_none_1eaaa4a07717236e/wininet.dll
  11613. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-i..tocolimplementation_31bf3856ad364e35_8.0.7601.17514_none_1eaaa4a07717236e/wininet.dll" "${W_SYSTEM32_DLLS}/wininet.dll"
  11614. if [ "${W_ARCH}" = "win64" ]; then
  11615. helper_win7sp1_x64 amd64_microsoft-windows-i..tocolimplementation_31bf3856ad364e35_8.0.7601.17514_none_7ac940242f7494a4/wininet.dll
  11616. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-i..tocolimplementation_31bf3856ad364e35_8.0.7601.17514_none_7ac940242f7494a4/wininet.dll" "${W_SYSTEM64_DLLS}/wininet.dll"
  11617. fi
  11618. w_override_dlls native,builtin wininet
  11619. w_call iertutil
  11620. }
  11621. #----------------------------------------------------------------
  11622. w_metadata wininet_win2k dlls \
  11623. title="MS Windows Internet API" \
  11624. publisher="Microsoft" \
  11625. year="2008" \
  11626. media="download" \
  11627. file1="../win2ksp4/W2KSP4_EN.EXE" \
  11628. installed_file1="${W_SYSTEM32_DLLS_WIN}/wininet.dll"
  11629. load_wininet_win2k()
  11630. {
  11631. helper_win2ksp4 i386/wininet.dl_
  11632. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_TMP}"/i386/wininet.dl_
  11633. w_override_dlls native,builtin wininet
  11634. }
  11635. #----------------------------------------------------------------
  11636. w_metadata wmi dlls \
  11637. title="Windows Management Instrumentation (aka WBEM) Core 1.5" \
  11638. publisher="Microsoft" \
  11639. year="2000" \
  11640. media="download" \
  11641. file1="wmi9x.exe" \
  11642. installed_file1="${W_SYSTEM32_DLLS_WIN}/wbem/wbemcore.dll"
  11643. load_wmi()
  11644. {
  11645. w_package_unsupported_win64
  11646. # WMI for NT4.0 need validation: https://www.microsoft.com/en-us/download/details.aspx?id=7665
  11647. # See also https://www.microsoft.com/en-us/download/details.aspx?id=16510
  11648. # Originally at: https://download.microsoft.com/download/platformsdk/wmi9x/1.5/W9X/EN-US/wmi9x.exe
  11649. # Mirror list: https://filemare.com/en-us/search/wmi9x.exe/761569271
  11650. # 2017/10/14: ftp://59.124.141.94 is dead, using ftp://82.162.138.211
  11651. # 2018/06/03: ftp://82.162.138.211 is dead, moved to ftp://ftp.espe.edu.ec
  11652. # 2019/12/22: all ftp mirrors I found are dead, so use wayback machine for original MS url
  11653. w_download https://web.archive.org/web/20051221074940/https://download.microsoft.com/download/platformsdk/wmi9x/1.5/W9X/EN-US/wmi9x.exe 1d5d94050354b164c6a19531df151e0703d5eb39cebf4357ee2cfc340c2509d0
  11654. w_store_winver
  11655. w_set_winver win98
  11656. w_override_dlls native,builtin wbemprox wmiutils
  11657. # Note: there is a crash in the background towards the end, doesn't seem to hurt; see https://bugs.winehq.org/show_bug.cgi?id=7920
  11658. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  11659. w_try "${WINE}" wmi9x.exe ${W_OPT_UNATTENDED:+/S}
  11660. w_killall "WinMgmt.exe"
  11661. w_restore_winver
  11662. }
  11663. #----------------------------------------------------------------
  11664. w_metadata wmv9vcm dlls \
  11665. title="MS Windows Media Video 9 Video Compression Manager" \
  11666. publisher="Microsoft" \
  11667. year="2013" \
  11668. media="download" \
  11669. file1="WindowsServer2003-WindowsMedia-KB2845142-x86-ENU.exe" \
  11670. installed_file1="${W_SYSTEM32_DLLS_WIN}/wmv9vcm.dll"
  11671. load_wmv9vcm()
  11672. {
  11673. # https://www.microsoft.com/en-us/download/details.aspx?id=39486
  11674. # See also https://www.microsoft.com/en-us/download/details.aspx?id=6191
  11675. w_download https://download.microsoft.com/download/2/8/D/28DA9C3E-6DA2-456F-BD33-1F937EB6E0FF/WindowsServer2003-WindowsMedia-KB2845142-x86-ENU.exe 51e11691339c1c817b12f92e613145ffcd7b6f7e869d994cc8dbc4591b24f155
  11676. w_try_cabextract --directory="${W_TMP}" "${W_CACHE}/${W_PACKAGE}/${file1}"
  11677. w_try_cp_dll "${W_TMP}"/wm64/wmv9vcm.dll "${W_SYSTEM32_DLLS}"
  11678. # Register codec:
  11679. cat > "${W_TMP}"/tmp.reg <<_EOF_
  11680. REGEDIT4
  11681. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32]
  11682. "vidc.WMV3"="wmv9vcm.dll"
  11683. _EOF_
  11684. w_try_regedit "${W_TMP_WIN}"\\tmp.reg
  11685. }
  11686. #----------------------------------------------------------------
  11687. w_metadata wsh57 dlls \
  11688. title="MS Windows Script Host 5.7" \
  11689. publisher="Microsoft" \
  11690. year="2007" \
  11691. media="download" \
  11692. file1="scripten.exe" \
  11693. installed_file1="${W_SYSTEM32_DLLS_WIN}/scrrun.dll"
  11694. load_wsh57()
  11695. {
  11696. # See also https://www.microsoft.com/en-us/download/details.aspx?id=8247
  11697. w_download https://download.microsoft.com/download/4/4/d/44de8a9e-630d-4c10-9f17-b9b34d3f6417/scripten.exe 63c781b9e50bfd55f10700eb70b5c571a9bedfd8d35af29f6a22a77550df5e7b
  11698. w_try_cabextract -d "${W_SYSTEM32_DLLS}" "${W_CACHE}"/wsh57/scripten.exe
  11699. # Wine doesn't provide the other dll's (yet?)
  11700. w_override_dlls native,builtin jscript scrrun vbscript cscript.exe wscript.exe
  11701. w_try_regsvr dispex.dll jscript.dll scrobj.dll scrrun.dll vbscript.dll wshcon.dll wshext.dll
  11702. }
  11703. #----------------------------------------------------------------
  11704. w_metadata xact dlls \
  11705. title="MS XACT Engine (32-bit only)" \
  11706. publisher="Microsoft" \
  11707. year="2010" \
  11708. media="download" \
  11709. file1="../directx9/directx_Jun2010_redist.exe" \
  11710. installed_file1="${W_SYSTEM32_DLLS_WIN}/xactengine2_0.dll"
  11711. load_xact()
  11712. {
  11713. helper_directx_Jun2010
  11714. # Extract xactengine?_?.dll, X3DAudio?_?.dll, xaudio?_?.dll, xapofx?_?.dll
  11715. w_try_cabextract -d "${W_TMP}" -L -F '*_xact_*x86*' "${W_CACHE}/directx9/${DIRECTX_NAME}"
  11716. w_try_cabextract -d "${W_TMP}" -L -F '*_x3daudio_*x86*' "${W_CACHE}/directx9/${DIRECTX_NAME}"
  11717. w_try_cabextract -d "${W_TMP}" -L -F '*_xaudio_*x86*' "${W_CACHE}/directx9/${DIRECTX_NAME}"
  11718. for x in "${W_TMP}"/*.cab ; do
  11719. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'xactengine*.dll' "${x}"
  11720. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'xaudio*.dll' "${x}"
  11721. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'x3daudio*.dll' "${x}"
  11722. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'xapofx*.dll' "${x}"
  11723. done
  11724. # Don't install 64-bit xact DLLs by default. They are broken in Wine, see:
  11725. # https://bugs.winehq.org/show_bug.cgi?id=41618#c5
  11726. w_override_dlls native,builtin xaudio2_0 xaudio2_1 xaudio2_2 xaudio2_3 xaudio2_4 xaudio2_5 xaudio2_6 xaudio2_7
  11727. w_override_dlls native,builtin x3daudio1_0 x3daudio1_1 x3daudio1_2 x3daudio1_3 x3daudio1_4 x3daudio1_5 x3daudio1_6 x3daudio1_7
  11728. w_override_dlls native,builtin xapofx1_1 xapofx1_2 xapofx1_3 xapofx1_4 xapofx1_5
  11729. w_override_dlls native,builtin xactengine2_0 xactengine2_10 xactengine2_1 xactengine2_2 xactengine2_3 xactengine2_4 xactengine2_5 xactengine2_6 xactengine2_7 xactengine2_8 xactengine2_9 xactengine3_0 xactengine3_1 xactengine3_2 xactengine3_3 xactengine3_4 xactengine3_5 xactengine3_6 xactengine3_7
  11730. # Register xactengine?_?.dll
  11731. for x in "${W_SYSTEM32_DLLS}"/xactengine* ; do
  11732. w_try_regsvr "$(basename "${x}")"
  11733. done
  11734. # and xaudio?_?.dll, but not xaudio2_8 (unsupported)
  11735. for x in 0 1 2 3 4 5 6 7 ; do
  11736. w_try_regsvr "$(basename "${W_SYSTEM32_DLLS}/xaudio2_${x}")"
  11737. done
  11738. }
  11739. #----------------------------------------------------------------
  11740. w_metadata xact_x64 dlls \
  11741. title="MS XACT Engine (64-bit only)" \
  11742. publisher="Microsoft" \
  11743. year="2010" \
  11744. media="download" \
  11745. file1="../directx9/directx_Jun2010_redist.exe" \
  11746. installed_file1="${W_SYSTEM64_DLLS_WIN64:-does_not_exist}/xactengine2_0.dll"
  11747. load_xact_x64()
  11748. {
  11749. w_package_unsupported_win32
  11750. if w_workaround_wine_bug 41618; then
  11751. w_warn "While this helps some games, it completely breaks others. You've been warned."
  11752. fi
  11753. helper_directx_Jun2010
  11754. # Extract xactengine?_?.dll, X3DAudio?_?.dll, xaudio?_?.dll, xapofx?_?.dll
  11755. w_try_cabextract -d "${W_TMP}" -L -F '*_xact_*x64*' "${W_CACHE}/directx9/${DIRECTX_NAME}"
  11756. w_try_cabextract -d "${W_TMP}" -L -F '*_x3daudio_*x64*' "${W_CACHE}/directx9/${DIRECTX_NAME}"
  11757. w_try_cabextract -d "${W_TMP}" -L -F '*_xaudio_*x64*' "${W_CACHE}/directx9/${DIRECTX_NAME}"
  11758. for x in "${W_TMP}"/*.cab ; do
  11759. w_try_cabextract -d "${W_SYSTEM64_DLLS}" -L -F 'xactengine*.dll' "${x}"
  11760. w_try_cabextract -d "${W_SYSTEM64_DLLS}" -L -F 'xaudio*.dll' "${x}"
  11761. w_try_cabextract -d "${W_SYSTEM64_DLLS}" -L -F 'x3daudio*.dll' "${x}"
  11762. w_try_cabextract -d "${W_SYSTEM64_DLLS}" -L -F 'xapofx*.dll' "${x}"
  11763. done
  11764. w_override_dlls native,builtin xaudio2_0 xaudio2_1 xaudio2_2 xaudio2_3 xaudio2_4 xaudio2_5 xaudio2_6 xaudio2_7
  11765. w_override_dlls native,builtin x3daudio1_0 x3daudio1_1 x3daudio1_2 x3daudio1_3 x3daudio1_4 x3daudio1_5 x3daudio1_6 x3daudio1_7
  11766. w_override_dlls native,builtin xapofx1_1 xapofx1_2 xapofx1_3 xapofx1_4 xapofx1_5
  11767. w_override_dlls native,builtin xactengine2_0 xactengine2_10 xactengine2_1 xactengine2_2 xactengine2_3 xactengine2_4 xactengine2_5 xactengine2_6 xactengine2_7 xactengine2_8 xactengine2_9 xactengine3_0 xactengine3_1 xactengine3_2 xactengine3_3 xactengine3_4 xactengine3_5 xactengine3_6 xactengine3_7
  11768. # Register xactengine?_?.dll
  11769. for x in "${W_SYSTEM64_DLLS}"/xactengine* ; do
  11770. w_try_regsvr64 "$(basename "${x}")"
  11771. done
  11772. # and xaudio?_?.dll, but not xaudio2_8 (unsupported)
  11773. for x in 0 1 2 3 4 5 6 7 ; do
  11774. w_try_regsvr64 "$(basename "${W_SYSTEM64_DLLS}/xaudio2_${x}")"
  11775. done
  11776. }
  11777. #----------------------------------------------------------------
  11778. w_metadata xinput dlls \
  11779. title="Microsoft XInput (Xbox controller support)" \
  11780. publisher="Microsoft" \
  11781. year="2010" \
  11782. media="download" \
  11783. file1="../directx9/directx_feb2010_redist.exe" \
  11784. installed_file1="${W_SYSTEM32_DLLS_WIN}/xinput1_1.dll"
  11785. load_xinput()
  11786. {
  11787. helper_directx_Jun2010
  11788. w_try_cabextract -d "${W_TMP}" -L -F '*_xinput_*x86*' "${W_CACHE}"/directx9/${DIRECTX_NAME}
  11789. for x in "${W_TMP}"/*.cab; do
  11790. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F 'xinput*.dll' "${x}"
  11791. done
  11792. if test "${W_ARCH}" = "win64"; then
  11793. w_try_cabextract -d "${W_TMP}" -L -F '*_xinput_*x64*' "${W_CACHE}"/directx9/${DIRECTX_NAME}
  11794. for x in "${W_TMP}"/*x64.cab; do
  11795. w_try_cabextract -d "${W_SYSTEM64_DLLS}" -L -F 'xinput*.dll' "${x}"
  11796. done
  11797. fi
  11798. w_override_dlls native xinput1_1
  11799. w_override_dlls native xinput1_2
  11800. w_override_dlls native xinput1_3
  11801. w_override_dlls native xinput9_1_0
  11802. }
  11803. #----------------------------------------------------------------
  11804. w_metadata xmllite dlls \
  11805. title="MS xmllite dll" \
  11806. publisher="Microsoft" \
  11807. year="2011" \
  11808. media="download" \
  11809. file1="../win7sp1/windows6.1-KB976932-X86.exe" \
  11810. installed_file1="${W_SYSTEM32_DLLS_WIN}/xmllite.dll"
  11811. load_xmllite()
  11812. {
  11813. helper_win7sp1 x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7601.17514_none_0b66cb34258c936f/xmllite.dll
  11814. w_try_cp_dll "${W_TMP}/x86_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7601.17514_none_0b66cb34258c936f/xmllite.dll" "${W_SYSTEM32_DLLS}/xmllite.dll"
  11815. if [ "${W_ARCH}" = "win64" ]; then
  11816. helper_win7sp1_x64 amd64_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7601.17514_none_678566b7ddea04a5/xmllite.dll "${W_SYSTEM64_DLLS}/xmllite.dll"
  11817. w_try_cp_dll "${W_TMP}/amd64_microsoft-windows-servicingstack_31bf3856ad364e35_6.1.7601.17514_none_678566b7ddea04a5/xmllite.dll" "${W_SYSTEM64_DLLS}/xmllite.dll"
  11818. fi
  11819. w_override_dlls native,builtin xmllite
  11820. }
  11821. #----------------------------------------------------------------
  11822. w_metadata xna31 dlls \
  11823. title="MS XNA Framework Redistributable 3.1" \
  11824. publisher="Microsoft" \
  11825. year="2009" \
  11826. media="download" \
  11827. file1="xnafx31_redist.msi" \
  11828. installed_file1="C:/windows/assembly/GAC_32/Microsoft.Xna.Framework.Game/3.1.0.0__6d5c3888ef60e27d/Microsoft.Xna.Framework.Game.dll"
  11829. load_xna31()
  11830. {
  11831. w_call dotnet20sp2
  11832. w_download https://web.archive.org/web/20120325004645/https://download.microsoft.com/download/5/9/1/5912526C-B950-4662-99B6-119A83E60E5C/xnafx31_redist.msi 187e7e6b08fe35428d945612a7d258bfed25fad53cc54882983abdc73fe60f91
  11833. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  11834. w_try "${WINE}" msiexec ${W_OPT_UNATTENDED:+/quiet} /i "${file1}"
  11835. }
  11836. #----------------------------------------------------------------
  11837. w_metadata xna40 dlls \
  11838. title="MS XNA Framework Redistributable 4.0" \
  11839. publisher="Microsoft" \
  11840. year="2010" \
  11841. media="download" \
  11842. file1="xnafx40_redist.msi" \
  11843. installed_file1="${W_PROGRAMS_X86_WIN}/Common Files/Microsoft Shared/XNA/Framework/v4.0/XnaNative.dll"
  11844. load_xna40()
  11845. {
  11846. if w_workaround_wine_bug 30718; then
  11847. export COMPlus_OnlyUseLatestCLR=1
  11848. w_call dotnet40
  11849. fi
  11850. # https://www.microsoft.com/en-us/download/details.aspx?id=20914
  11851. w_download https://web.archive.org/web/20120325002813/https://download.microsoft.com/download/A/C/2/AC2C903B-E6E8-42C2-9FD7-BEBAC362A930/xnafx40_redist.msi e6c41d692ebcba854dad4b1c52bb7ddd05926bad3105595d6596b8bab01c25e7
  11852. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  11853. w_try "${WINE}" msiexec ${W_OPT_UNATTENDED:+/quiet} /i "${file1}"
  11854. }
  11855. #----------------------------------------------------------------
  11856. w_metadata xvid dlls \
  11857. title="Xvid Video Codec" \
  11858. publisher="xvid.org" \
  11859. year="2009" \
  11860. media="download" \
  11861. file1="Xvid-1.3.2-20110601.exe" \
  11862. installed_file1="${W_PROGRAMS_X86_WIN}/Xvid/xvid.ico"
  11863. load_xvid()
  11864. {
  11865. w_call vcrun6
  11866. # 2011/06/03: http://www.koepi.info/Xvid-1.3.2-20110601.exe
  11867. # 2022/09/08: https://s3.amazonaws.com/moviecodec/files/Xvid-1.3.2-20110601.exe
  11868. w_download https://s3.amazonaws.com/moviecodec/files/Xvid-1.3.2-20110601.exe 74b23965cebe59e388eab6dba224b6b751ef4519454cc12086ade51c81f0a33c
  11869. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  11870. # This will give a warning about Windows Media Player being out of date.
  11871. # Turns out it's not checking the wmp version, but the presence of ${W_SYSTEM32_DLLS}/l3codecp.acm
  11872. # http://websvn.xvid.org/cvs/viewvc.cgi/trunk/xvidextra/src/installer/xvid.xml?view=diff&pathrev=2159&r1=2006&r2=2007
  11873. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+ --mode unattended --decode_divx 1 --decode_3ivx 1 --decode_other 1}
  11874. }
  11875. #######################
  11876. # fonts
  11877. #######################
  11878. w_metadata baekmuk fonts \
  11879. title="Baekmuk Korean fonts" \
  11880. publisher="Wooderart Inc. / kldp.net" \
  11881. year="1999" \
  11882. media="download" \
  11883. file1="fonts-baekmuk_2.2.orig.tar.gz" \
  11884. installed_file1="${W_FONTSDIR_WIN}/batang.ttf"
  11885. load_baekmuk()
  11886. {
  11887. # See http://kldp.net/projects/baekmuk for project page
  11888. # Need to download from Debian as the project page has unique captcha tokens per visitor
  11889. w_download "https://deb.debian.org/debian/pool/main/f/fonts-baekmuk/fonts-baekmuk_2.2.orig.tar.gz" 08ab7dffb55d5887cc942ce370f5e33b756a55fbb4eaf0b90f244070e8d51882
  11890. w_try_cd "${W_TMP}"
  11891. w_try tar -zxf "${W_CACHE}/${W_PACKAGE}/${file1}" baekmuk-ttf-2.2/ttf
  11892. w_try_cp_font_files baekmuk-ttf-2.2/ttf/ "${W_FONTSDIR_UNIX}"
  11893. w_register_font batang.ttf "Baekmuk Batang"
  11894. w_register_font gulim.ttf "Baekmuk Gulim"
  11895. w_register_font dotum.ttf "Baekmuk Dotum"
  11896. w_register_font hline.ttf "Baekmuk Headline"
  11897. }
  11898. #----------------------------------------------------------------
  11899. w_metadata cjkfonts fonts \
  11900. title="All Chinese, Japanese, Korean fonts and aliases" \
  11901. publisher="Various" \
  11902. date="1999-2019" \
  11903. media="download"
  11904. load_cjkfonts()
  11905. {
  11906. w_call fakechinese
  11907. w_call fakejapanese
  11908. w_call fakekorean
  11909. w_call unifont
  11910. }
  11911. #----------------------------------------------------------------
  11912. w_metadata calibri fonts \
  11913. title="MS Calibri font" \
  11914. publisher="Microsoft" \
  11915. year="2007" \
  11916. media="download" \
  11917. file1="PowerPointViewer.exe" \
  11918. installed_file1="${W_FONTSDIR_WIN}/calibri.ttf"
  11919. load_calibri()
  11920. {
  11921. helper_pptfonts "CALIBRI*.TTF"
  11922. w_register_font calibri.ttf "Calibri"
  11923. w_register_font calibrib.ttf "Calibri Bold"
  11924. w_register_font calibrii.ttf "Calibri Italic"
  11925. w_register_font calibriz.ttf "Calibri Bold Italic"
  11926. }
  11927. #----------------------------------------------------------------
  11928. w_metadata cambria fonts \
  11929. title="MS Cambria font" \
  11930. publisher="Microsoft" \
  11931. year="2009" \
  11932. media="download" \
  11933. file1="PowerPointViewer.exe" \
  11934. installed_file1="${W_FONTSDIR_WIN}/cambria.ttc"
  11935. load_cambria()
  11936. {
  11937. helper_pptfonts "CAMBRIA*.TT*"
  11938. w_register_font cambria.ttc "Cambria & Cambria Math"
  11939. w_register_font cambriab.ttf "Cambria Bold"
  11940. w_register_font cambriai.ttf "Cambria Italic"
  11941. w_register_font cambriaz.ttf "Cambria Bold Italic"
  11942. }
  11943. #----------------------------------------------------------------
  11944. w_metadata candara fonts \
  11945. title="MS Candara font" \
  11946. publisher="Microsoft" \
  11947. year="2009" \
  11948. media="download" \
  11949. file1="PowerPointViewer.exe" \
  11950. installed_file1="${W_FONTSDIR_WIN}/candara.ttf"
  11951. load_candara()
  11952. {
  11953. helper_pptfonts "CANDARA*.TTF"
  11954. w_register_font candara.ttf "Candara"
  11955. w_register_font candarab.ttf "Candara Bold"
  11956. w_register_font candarai.ttf "Candara Italic"
  11957. w_register_font candaraz.ttf "Candara Bold Italic"
  11958. }
  11959. #----------------------------------------------------------------
  11960. w_metadata consolas fonts \
  11961. title="MS Consolas console font" \
  11962. publisher="Microsoft" \
  11963. year="2011" \
  11964. media="download" \
  11965. file1="PowerPointViewer.exe" \
  11966. installed_file1="${W_FONTSDIR_WIN}/consola.ttf"
  11967. load_consolas()
  11968. {
  11969. helper_pptfonts "CONSOLA*.TTF"
  11970. w_register_font consola.ttf "Consolas"
  11971. w_register_font consolab.ttf "Consolas Bold"
  11972. w_register_font consolai.ttf "Consolas Italic"
  11973. w_register_font consolaz.ttf "Consolas Bold Italic"
  11974. }
  11975. #----------------------------------------------------------------
  11976. w_metadata constantia fonts \
  11977. title="MS Constantia font" \
  11978. publisher="Microsoft" \
  11979. year="2009" \
  11980. media="download" \
  11981. file1="PowerPointViewer.exe" \
  11982. installed_file1="${W_FONTSDIR_WIN}/constan.ttf"
  11983. load_constantia()
  11984. {
  11985. helper_pptfonts "CONSTAN*.TTF"
  11986. w_register_font constan.ttf "Constantia"
  11987. w_register_font constanb.ttf "Constantia Bold"
  11988. w_register_font constani.ttf "Constantia Italic"
  11989. w_register_font constanz.ttf "Constantia Bold Italic"
  11990. }
  11991. #----------------------------------------------------------------
  11992. w_metadata corbel fonts \
  11993. title="MS Corbel font" \
  11994. publisher="Microsoft" \
  11995. year="2009" \
  11996. media="download" \
  11997. file1="PowerPointViewer.exe" \
  11998. installed_file1="${W_FONTSDIR_WIN}/corbel.ttf"
  11999. load_corbel()
  12000. {
  12001. helper_pptfonts "CORBEL*.TTF"
  12002. w_register_font corbel.ttf "Corbel"
  12003. w_register_font corbelb.ttf "Corbel Bold"
  12004. w_register_font corbeli.ttf "Corbel Italic"
  12005. w_register_font corbelz.ttf "Corbel Bold Italic"
  12006. }
  12007. #----------------------------------------------------------------
  12008. w_metadata meiryo fonts \
  12009. title="MS Meiryo font" \
  12010. publisher="Microsoft" \
  12011. year="2009" \
  12012. media="download" \
  12013. conflicts="fakejapanese_vlgothic" \
  12014. file1="PowerPointViewer.exe" \
  12015. installed_file1="${W_FONTSDIR_WIN}/meiryo.ttc"
  12016. load_meiryo()
  12017. {
  12018. helper_pptfonts "MEIRYO*.TTC"
  12019. w_register_font meiryo.ttc "Meiryo & Meiryo Italic & Meiryo UI & Meiryo UI Italic"
  12020. w_register_font meiryob.ttc "Meiryo Bold & Meiryo Bold Italic & Meiryo UI Bold & Meiryo UI Bold Italic"
  12021. }
  12022. #----------------------------------------------------------------
  12023. w_metadata pptfonts fonts \
  12024. title="All MS PowerPoint Viewer fonts" \
  12025. publisher="various" \
  12026. date="2007-2009" \
  12027. media="download"
  12028. load_pptfonts()
  12029. {
  12030. w_call calibri
  12031. w_call cambria
  12032. w_call candara
  12033. w_call consolas
  12034. w_call constantia
  12035. w_call corbel
  12036. w_call meiryo
  12037. }
  12038. helper_pptfonts()
  12039. {
  12040. # download PowerPointViewer, extract the given files, and copy them to $W_FONTSDIR_UNIX
  12041. # Font registration should still be done by the respective verbs
  12042. # $1 - font pattern to extract
  12043. pptfont="$1"
  12044. w_download_to PowerPointViewer "https://web.archive.org/web/20171225132744if_/https://download.microsoft.com/download/E/6/7/E675FFFC-2A6D-4AB0-B3EB-27C9F8C8F696/PowerPointViewer.exe" 249473568eba7a1e4f95498acba594e0f42e6581add4dead70c1dfb908a09423
  12045. w_try_cabextract -d "${W_TMP}" -F "ppviewer.cab" "${W_CACHE}/PowerPointViewer/PowerPointViewer.exe"
  12046. w_try_cabextract -d "${W_TMP}" -F "${pptfont}" "${W_TMP}/ppviewer.cab"
  12047. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}" "${pptfont}"
  12048. }
  12049. #----------------------------------------------------------------
  12050. w_metadata andale fonts \
  12051. title="MS Andale Mono font" \
  12052. publisher="Microsoft" \
  12053. year="2008" \
  12054. media="download" \
  12055. file1="andale32.exe" \
  12056. installed_file1="${W_FONTSDIR_WIN}/andalemo.ttf"
  12057. load_andale()
  12058. {
  12059. w_download_to corefonts "https://mirrors.kernel.org/gentoo/distfiles/andale32.exe" 0524fe42951adc3a7eb870e32f0920313c71f170c859b5f770d82b4ee111e970
  12060. w_try_cabextract -d "${W_TMP}" "${W_CACHE}"/corefonts/andale32.exe
  12061. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}" "AndaleMo.TTF"
  12062. w_register_font andalemo.ttf "Andale Mono"
  12063. }
  12064. #----------------------------------------------------------------
  12065. w_metadata arial fonts \
  12066. title="MS Arial / Arial Black fonts" \
  12067. publisher="Microsoft" \
  12068. year="2008" \
  12069. media="download" \
  12070. file1="arial32.exe" \
  12071. installed_file1="${W_FONTSDIR_WIN}/arial.ttf"
  12072. load_arial()
  12073. {
  12074. w_download_to corefonts "https://mirrors.kernel.org/gentoo/distfiles/arial32.exe" 85297a4d146e9c87ac6f74822734bdee5f4b2a722d7eaa584b7f2cbf76f478f6
  12075. w_download_to corefonts "https://mirrors.kernel.org/gentoo/distfiles/arialb32.exe" a425f0ffb6a1a5ede5b979ed6177f4f4f4fdef6ae7c302a7b7720ef332fec0a8
  12076. w_try_cabextract -d "${W_TMP}" "${W_CACHE}"/corefonts/arial32.exe
  12077. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}" "Arial*.TTF"
  12078. w_register_font arialbd.ttf "Arial Bold"
  12079. w_register_font arialbi.ttf "Arial Bold Italic"
  12080. w_register_font ariali.ttf "Arial Italic"
  12081. w_register_font arial.ttf "Arial"
  12082. w_try_cabextract -d "${W_TMP}" "${W_CACHE}"/corefonts/arialb32.exe
  12083. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}" "AriBlk.TTF"
  12084. w_register_font ariblk.ttf "Arial Black"
  12085. }
  12086. #----------------------------------------------------------------
  12087. w_metadata comicsans fonts \
  12088. title="MS Comic Sans fonts" \
  12089. publisher="Microsoft" \
  12090. year="2008" \
  12091. media="download" \
  12092. file1="comic32.exe" \
  12093. installed_file1="${W_FONTSDIR_WIN}/comic.ttf"
  12094. load_comicsans()
  12095. {
  12096. w_download_to corefonts "https://mirrors.kernel.org/gentoo/distfiles/comic32.exe" 9c6df3feefde26d4e41d4a4fe5db2a89f9123a772594d7f59afd062625cd204e
  12097. w_try_cabextract -d "${W_TMP}" "${W_CACHE}"/corefonts/comic32.exe
  12098. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}" "Comic*.TTF"
  12099. w_register_font comicbd.ttf "Comic Sans MS Bold"
  12100. w_register_font comic.ttf "Comic Sans MS"
  12101. }
  12102. #----------------------------------------------------------------
  12103. w_metadata courier fonts \
  12104. title="MS Courier fonts" \
  12105. publisher="Microsoft" \
  12106. year="2008" \
  12107. media="download" \
  12108. file1="courie32.exe" \
  12109. installed_file1="${W_FONTSDIR_WIN}/cour.ttf"
  12110. load_courier()
  12111. {
  12112. w_download_to corefonts "https://mirrors.kernel.org/gentoo/distfiles/courie32.exe" bb511d861655dde879ae552eb86b134d6fae67cb58502e6ff73ec5d9151f3384
  12113. w_try_cabextract -d "${W_TMP}" "${W_CACHE}"/corefonts/courie32.exe
  12114. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}" "cour*.ttf"
  12115. w_register_font courbd.ttf "Courier New Bold"
  12116. w_register_font courbi.ttf "Courier New Bold Italic"
  12117. w_register_font couri.ttf "Courier New Italic"
  12118. w_register_font cour.ttf "Courier New"
  12119. }
  12120. #----------------------------------------------------------------
  12121. w_metadata georgia fonts \
  12122. title="MS Georgia fonts" \
  12123. publisher="Microsoft" \
  12124. year="2008" \
  12125. media="download" \
  12126. file1="georgi32.exe" \
  12127. installed_file1="${W_FONTSDIR_WIN}/georgia.ttf"
  12128. load_georgia()
  12129. {
  12130. w_download_to corefonts "https://mirrors.kernel.org/gentoo/distfiles/georgi32.exe" 2c2c7dcda6606ea5cf08918fb7cd3f3359e9e84338dc690013f20cd42e930301
  12131. w_try_cabextract -d "${W_TMP}" "${W_CACHE}"/corefonts/georgi32.exe
  12132. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}" "Georgia*.TTF"
  12133. w_register_font georgiab.ttf "Georgia Bold"
  12134. w_register_font georgiai.ttf "Georgia Italic"
  12135. w_register_font georgia.ttf "Georgia"
  12136. w_register_font georgiaz.ttf "Georgia Bold Italic"
  12137. }
  12138. #----------------------------------------------------------------
  12139. w_metadata impact fonts \
  12140. title="MS Impact fonts" \
  12141. publisher="Microsoft" \
  12142. year="2008" \
  12143. media="download" \
  12144. file1="impact32.exe" \
  12145. installed_file1="${W_FONTSDIR_WIN}/impact.ttf"
  12146. load_impact()
  12147. {
  12148. w_download_to corefonts "https://mirrors.kernel.org/gentoo/distfiles/impact32.exe" 6061ef3b7401d9642f5dfdb5f2b376aa14663f6275e60a51207ad4facf2fccfb
  12149. w_try_cabextract -d "${W_TMP}" "${W_CACHE}"/corefonts/impact32.exe
  12150. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}" "Impact.TTF"
  12151. w_register_font impact.ttf "Impact"
  12152. }
  12153. #----------------------------------------------------------------
  12154. w_metadata times fonts \
  12155. title="MS Times fonts" \
  12156. publisher="Microsoft" \
  12157. year="2008" \
  12158. media="download" \
  12159. file1="times32.exe" \
  12160. installed_file1="${W_FONTSDIR_WIN}/times.ttf"
  12161. load_times()
  12162. {
  12163. w_download_to corefonts "https://mirrors.kernel.org/gentoo/distfiles/times32.exe" db56595ec6ef5d3de5c24994f001f03b2a13e37cee27bc25c58f6f43e8f807ab
  12164. w_try_cabextract -d "${W_TMP}" "${W_CACHE}"/corefonts/times32.exe
  12165. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}" "Times*.TTF"
  12166. w_register_font timesbd.ttf "Times New Roman Bold"
  12167. w_register_font timesbi.ttf "Times New Roman Bold Italic"
  12168. w_register_font timesi.ttf "Times New Roman Italic"
  12169. w_register_font times.ttf "Times New Roman"
  12170. }
  12171. #----------------------------------------------------------------
  12172. w_metadata trebuchet fonts \
  12173. title="MS Trebuchet fonts" \
  12174. publisher="Microsoft" \
  12175. year="2008" \
  12176. media="download" \
  12177. file1="trebuchet32.exe" \
  12178. installed_file1="${W_FONTSDIR_WIN}/trebuc.ttf"
  12179. load_trebuchet()
  12180. {
  12181. w_download_to corefonts "https://mirrors.kernel.org/gentoo/distfiles/trebuc32.exe" 5a690d9bb8510be1b8b4fe49f1f2319651fe51bbe54775ddddd8ef0bd07fdac9
  12182. w_try_cabextract -d "${W_TMP}" "${W_CACHE}"/corefonts/trebuc32.exe
  12183. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}" "[tT]rebuc*.ttf"
  12184. w_register_font trebucbd.ttf "Trebuchet MS Bold"
  12185. w_register_font trebucbi.ttf "Trebuchet MS Bold Italic"
  12186. w_register_font trebucit.ttf "Trebuchet MS Italic"
  12187. w_register_font trebuc.ttf "Trebuchet MS"
  12188. }
  12189. #----------------------------------------------------------------
  12190. w_metadata verdana fonts \
  12191. title="MS Verdana fonts" \
  12192. publisher="Microsoft" \
  12193. year="2008" \
  12194. media="download" \
  12195. file1="verdan32.exe" \
  12196. installed_file1="${W_FONTSDIR_WIN}/verdana.ttf"
  12197. load_verdana()
  12198. {
  12199. w_download_to corefonts "https://mirrors.kernel.org/gentoo/distfiles/verdan32.exe" c1cb61255e363166794e47664e2f21af8e3a26cb6346eb8d2ae2fa85dd5aad96
  12200. w_try_cabextract -d "${W_TMP}" "${W_CACHE}"/corefonts/verdan32.exe
  12201. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}" "Verdana*.TTF"
  12202. w_register_font verdanab.ttf "Verdana Bold"
  12203. w_register_font verdanai.ttf "Verdana Italic"
  12204. w_register_font verdana.ttf "Verdana"
  12205. w_register_font verdanaz.ttf "Verdana Bold Italic"
  12206. }
  12207. #----------------------------------------------------------------
  12208. w_metadata webdings fonts \
  12209. title="MS Webdings fonts" \
  12210. publisher="Microsoft" \
  12211. year="2008" \
  12212. media="download" \
  12213. file1="webdin32.exe" \
  12214. installed_file1="${W_FONTSDIR_WIN}/webdings.ttf"
  12215. load_webdings()
  12216. {
  12217. w_download_to corefonts "https://mirrors.kernel.org/gentoo/distfiles/webdin32.exe" 64595b5abc1080fba8610c5c34fab5863408e806aafe84653ca8575bed17d75a
  12218. w_try_cabextract -d "${W_TMP}" "${W_CACHE}"/corefonts/webdin32.exe
  12219. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}" "Webdings.TTF"
  12220. w_register_font webdings.ttf "Webdings"
  12221. }
  12222. #----------------------------------------------------------------
  12223. w_metadata corefonts fonts \
  12224. title="MS Arial, Courier, Times fonts" \
  12225. publisher="Microsoft" \
  12226. year="2008" \
  12227. media="download" \
  12228. file1="arial32.exe" \
  12229. installed_file1="${W_FONTSDIR_WIN}/corefonts.installed"
  12230. load_corefonts()
  12231. {
  12232. # Natively installed versions of these fonts will cause the installers
  12233. # to exit silently. Because there are apps out there that depend on the
  12234. # files being present in the Windows font directory we use cabextract
  12235. # to obtain the files and register the fonts by hand.
  12236. w_call andale
  12237. w_call arial
  12238. w_call comicsans
  12239. w_call courier
  12240. w_call georgia
  12241. w_call impact
  12242. w_call times
  12243. w_call trebuchet
  12244. w_call verdana
  12245. w_call webdings
  12246. touch "${W_FONTSDIR_UNIX}/corefonts.installed"
  12247. }
  12248. #----------------------------------------------------------------
  12249. w_metadata droid fonts \
  12250. title="Droid fonts" \
  12251. publisher="Ascender Corporation" \
  12252. year="2009" \
  12253. media="download" \
  12254. file1="DroidSans-Bold.ttf" \
  12255. installed_file1="${W_FONTSDIR_WIN}/droidsans-bold.ttf"
  12256. do_droid() {
  12257. w_download "${_W_droid_url}${1}?raw=true" "$3" "$1"
  12258. w_try_cp_font_files "${W_CACHE}/droid" "${W_FONTSDIR_UNIX}" "$1"
  12259. w_register_font "$(echo "$1" | tr "[:upper:]" "[:lower:]")" "$2"
  12260. }
  12261. load_droid()
  12262. {
  12263. # See https://en.wikipedia.org/wiki/Droid_(font)
  12264. # Old URL was http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=data/fonts/'
  12265. # Then it was https://github.com/android/platform_frameworks_base/blob/master/data/fonts/
  12266. # but the fonts are no longer in master. Using an older commit instead:
  12267. _W_droid_url="https://github.com/android/platform_frameworks_base/blob/feef9887e8f8eb6f64fc1b4552c02efb5755cdc1/data/fonts/"
  12268. do_droid DroidSans-Bold.ttf "Droid Sans Bold" 2f529a3e60c007979d95d29794c3660694217fb882429fb33919d2245fe969e9
  12269. do_droid DroidSansFallback.ttf "Droid Sans Fallback" 05d71b179ef97b82cf1bb91cef290c600a510f77f39b4964359e3ef88378c79d
  12270. do_droid DroidSansJapanese.ttf "Droid Sans Japanese" 935867c21b8484c959170e62879460ae9363eae91f9b35e4519d24080e2eac30
  12271. do_droid DroidSansMono.ttf "Droid Sans Mono" 12b552de765dc1265d64f9f5566649930dde4dba07da0251d9f92801e70a1047
  12272. do_droid DroidSans.ttf "Droid Sans" f51b88945f4c1b236f44b8d55a2d304316869127e95248c435c23f1e4142a7db
  12273. do_droid DroidSerif-BoldItalic.ttf "Droid Serif Bold Italic" 3fdf15b911c04317e5881ae1e4b9faefcdc4bf4cfb60223597d5c9455c3e4156
  12274. do_droid DroidSerif-Bold.ttf "Droid Serif Bold" d28533eed8368f047eb5f57a88a91ba2ffc8b69a2dec5e50fe3f0c11ae3f4d8e
  12275. do_droid DroidSerif-Italic.ttf "Droid Serif Italic" 8a55a4823886234792991dd304dfa1fa120ae99483ec6c2255597d7d913b9a55
  12276. do_droid DroidSerif-Regular.ttf "Droid Serif" 22aea9471bea5bce1ec3bf7136c84f075b3d11cf09dffdc3dba05e570094cbde
  12277. unset _W_droid_url
  12278. }
  12279. #----------------------------------------------------------------
  12280. w_metadata eufonts fonts \
  12281. title="Updated fonts for Romanian and Bulgarian" \
  12282. publisher="Microsoft" \
  12283. year="2008" \
  12284. media="download" \
  12285. file1="EUupdate.EXE" \
  12286. installed_file1="${W_FONTSDIR_WIN}/trebucbd.ttf"
  12287. load_eufonts()
  12288. {
  12289. # https://www.microsoft.com/en-us/download/details.aspx?id=16083
  12290. # Previously at https://download.microsoft.com/download/a/1/8/a180e21e-9c2b-4b54-9c32-bf7fd7429970/EUupdate.EXE
  12291. # 2020/09/11: https://sourceforge.net/projects/mscorefonts2/files/cabs/EUupdate.EXE
  12292. w_download "https://sourceforge.net/projects/mscorefonts2/files/cabs/EUupdate.EXE" 464dd2cd5f09f489f9ac86ea7790b7b8548fc4e46d9f889b68d2cdce47e09ea8
  12293. w_try_cabextract -d "${W_TMP}" "${W_CACHE}"/eufonts/EUupdate.EXE
  12294. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}"
  12295. w_register_font arialbd.ttf "Arial Bold"
  12296. w_register_font arialbi.ttf "Arial Bold Italic"
  12297. w_register_font ariali.ttf "Arial Italic"
  12298. w_register_font arial.ttf "Arial"
  12299. w_register_font timesbd.ttf "Times New Roman Bold"
  12300. w_register_font timesbi.ttf "Times New Roman Bold Italic"
  12301. w_register_font timesi.ttf "Times New Roman Italic"
  12302. w_register_font times.ttf "Times New Roman"
  12303. w_register_font trebucbd.ttf "Trebuchet MS Bold"
  12304. w_register_font trebucbi.ttf "Trebuchet MS Bold Italic"
  12305. w_register_font trebucit.ttf "Trebuchet MS Italic"
  12306. w_register_font trebuc.ttf "Trebuchet MS"
  12307. w_register_font verdanab.ttf "Verdana Bold"
  12308. w_register_font verdanai.ttf "Verdana Italian"
  12309. w_register_font verdana.ttf "Verdana"
  12310. w_register_font verdanaz.ttf "Verdana Bold Italic"
  12311. }
  12312. #----------------------------------------------------------------
  12313. w_metadata fakechinese fonts \
  12314. title="Creates aliases for Chinese fonts using Source Han Sans fonts" \
  12315. publisher="Adobe" \
  12316. year="2019"
  12317. load_fakechinese()
  12318. {
  12319. # Loads Source Han Sans fonts and sets aliases for Microsoft Chinese fonts
  12320. # Reference : https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_fonts
  12321. w_call sourcehansans
  12322. # Simplified Chinese
  12323. w_register_font_replacement "Dengxian" "Source Han Sans SC"
  12324. w_register_font_replacement "FangSong" "Source Han Sans SC"
  12325. w_register_font_replacement "KaiTi" "Source Han Sans SC"
  12326. w_register_font_replacement "Microsoft YaHei" "Source Han Sans SC"
  12327. w_register_font_replacement "Microsoft YaHei UI" "Source Han Sans SC"
  12328. w_register_font_replacement "NSimSun" "Source Han Sans SC"
  12329. w_register_font_replacement "SimHei" "Source Han Sans SC"
  12330. w_register_font_replacement "SimKai" "Source Han Sans SC"
  12331. w_register_font_replacement "SimSun" "Source Han Sans SC"
  12332. w_register_font_replacement "SimSun-ExtB" "Source Han Sans SC"
  12333. # Traditional Chinese
  12334. w_register_font_replacement "DFKai-SB" "Source Han Sans TC"
  12335. w_register_font_replacement "Microsoft JhengHei" "Source Han Sans TC"
  12336. w_register_font_replacement "Microsoft JhengHei UI" "Source Han Sans TC"
  12337. w_register_font_replacement "MingLiU" "Source Han Sans TC"
  12338. w_register_font_replacement "PMingLiU" "Source Han Sans TC"
  12339. w_register_font_replacement "MingLiU-ExtB" "Source Han Sans TC"
  12340. w_register_font_replacement "PMingLiU-ExtB" "Source Han Sans TC"
  12341. }
  12342. #----------------------------------------------------------------
  12343. w_metadata fakejapanese fonts \
  12344. title="Creates aliases for Japanese fonts using Source Han Sans fonts" \
  12345. publisher="Adobe" \
  12346. year="2019"
  12347. load_fakejapanese()
  12348. {
  12349. # Loads Source Han Sans fonts and sets aliases for Microsoft Japanese fonts
  12350. # Reference : https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_fonts
  12351. w_call sourcehansans
  12352. w_register_font_replacement "Meiryo" "Source Han Sans"
  12353. w_register_font_replacement "Meiryo UI" "Source Han Sans"
  12354. w_register_font_replacement "MS Gothic" "Source Han Sans"
  12355. w_register_font_replacement "MS PGothic" "Source Han Sans"
  12356. w_register_font_replacement "MS Mincho" "Source Han Sans"
  12357. w_register_font_replacement "MS PMincho" "Source Han Sans"
  12358. w_register_font_replacement "MS UI Gothic" "Source Han Sans"
  12359. w_register_font_replacement "UD Digi KyoKasho N-R" "Source Han Sans"
  12360. w_register_font_replacement "UD Digi KyoKasho NK-R" "Source Han Sans"
  12361. w_register_font_replacement "UD Digi KyoKasho NP-R" "Source Han Sans"
  12362. w_register_font_replacement "Yu Gothic" "Source Han Sans"
  12363. w_register_font_replacement "Yu Gothic UI" "Source Han Sans"
  12364. w_register_font_replacement "Yu Mincho" "Source Han Sans"
  12365. w_register_font_replacement "メイリオ" "Source Han Sans"
  12366. w_register_font_replacement "MS ゴシック" "Source Han Sans"
  12367. w_register_font_replacement "MS Pゴシック" "Source Han Sans"
  12368. w_register_font_replacement "MS 明朝" "Source Han Sans"
  12369. w_register_font_replacement "MS P明朝" "Source Han Sans"
  12370. }
  12371. #----------------------------------------------------------------
  12372. w_metadata fakejapanese_ipamona fonts \
  12373. title="Creates aliases for Japanese fonts using IPAMona fonts" \
  12374. publisher="Jun Kobayashi" \
  12375. year="2008"
  12376. load_fakejapanese_ipamona()
  12377. {
  12378. w_call ipamona
  12379. # Aliases to set:
  12380. # MS UI Gothic --> IPAMonaUIGothic
  12381. # MS Gothic (MS ゴシック) --> IPAMonaGothic
  12382. # MS PGothic (MS Pゴシック) --> IPAMonaPGothic
  12383. # MS Mincho (MS 明朝) --> IPAMonaMincho
  12384. # MS PMincho (MS P明朝) --> IPAMonaPMincho
  12385. w_register_font_replacement "MS UI Gothic" "IPAMonaUIGothic"
  12386. w_register_font_replacement "MS Gothic" "IPAMonaGothic"
  12387. w_register_font_replacement "MS PGothic" "IPAMonaPGothic"
  12388. w_register_font_replacement "MS Mincho" "IPAMonaMincho"
  12389. w_register_font_replacement "MS PMincho" "IPAMonaPMincho"
  12390. w_register_font_replacement "MS ゴシック" "IPAMonaGothic"
  12391. w_register_font_replacement "MS Pゴシック" "IPAMonaPGothic"
  12392. w_register_font_replacement "MS 明朝" "IPAMonaMincho"
  12393. w_register_font_replacement "MS P明朝" "IPAMonaPMincho"
  12394. }
  12395. #----------------------------------------------------------------
  12396. w_metadata fakejapanese_vlgothic fonts \
  12397. title="Creates aliases for Japanese Meiryo fonts using VLGothic fonts" \
  12398. publisher="Project Vine / Daisuke Suzuki" \
  12399. conflicts="meiryo" \
  12400. year="2014"
  12401. load_fakejapanese_vlgothic()
  12402. {
  12403. w_call vlgothic
  12404. # Aliases to set:
  12405. # Meiryo UI --> VL Gothic
  12406. # Meiryo (メイリオ) --> VL Gothic
  12407. w_register_font_replacement "Meiryo UI" "VL Gothic"
  12408. w_register_font_replacement "Meiryo" "VL Gothic"
  12409. w_register_font_replacement "メイリオ" "VL Gothic"
  12410. }
  12411. #----------------------------------------------------------------
  12412. w_metadata fakekorean fonts \
  12413. title="Creates aliases for Korean fonts using Source Han Sans fonts" \
  12414. publisher="Adobe" \
  12415. year="2019"
  12416. load_fakekorean()
  12417. {
  12418. # Loads Source Han Sans fonts and sets aliases for Microsoft Korean fonts
  12419. # Reference : https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_fonts
  12420. w_call sourcehansans
  12421. w_register_font_replacement "Batang" "Source Han Sans K"
  12422. w_register_font_replacement "BatangChe" "Source Han Sans K"
  12423. w_register_font_replacement "Dotum" "Source Han Sans K"
  12424. w_register_font_replacement "DotumChe" "Source Han Sans K"
  12425. w_register_font_replacement "Gulim" "Source Han Sans K"
  12426. w_register_font_replacement "GulimChe" "Source Han Sans K"
  12427. w_register_font_replacement "Gungsuh" "Source Han Sans K"
  12428. w_register_font_replacement "GungsuhChe" "Source Han Sans K"
  12429. w_register_font_replacement "Malgun Gothic" "Source Han Sans K"
  12430. w_register_font_replacement "바탕" "Source Han Sans K"
  12431. w_register_font_replacement "바탕체" "Source Han Sans K"
  12432. w_register_font_replacement "돋움" "Source Han Sans K"
  12433. w_register_font_replacement "돋움체" "Source Han Sans K"
  12434. w_register_font_replacement "굴림" "Source Han Sans K"
  12435. w_register_font_replacement "굴림체" "Source Han Sans K"
  12436. w_register_font_replacement "맑은 고딕" "Source Han Sans K"
  12437. }
  12438. #----------------------------------------------------------------
  12439. w_metadata ipamona fonts \
  12440. title="IPAMona Japanese fonts" \
  12441. publisher="Jun Kobayashi" \
  12442. year="2008" \
  12443. media="download" \
  12444. file1="opfc-ModuleHP-1.1.1_withIPAMonaFonts-1.0.8.tar.gz" \
  12445. installed_file1="${W_FONTSDIR_WIN}/ipag-mona.ttf" \
  12446. homepage="http://www.geocities.jp/ipa_mona/"
  12447. load_ipamona()
  12448. {
  12449. w_download "https://web.archive.org/web/20190309175311/http://www.geocities.jp/ipa_mona/opfc-ModuleHP-1.1.1_withIPAMonaFonts-1.0.8.tar.gz" ab77beea3b051abf606cd8cd3badf6cb24141ef145c60f508fcfef1e3852bb9d
  12450. w_try_cd "${W_TMP}"
  12451. w_try tar -zxf "${W_CACHE}/${W_PACKAGE}/${file1}" "${file1%.tar.gz}/fonts"
  12452. w_try_cp_font_files "${file1%.tar.gz}/fonts" "${W_FONTSDIR_UNIX}"
  12453. w_register_font ipagui-mona.ttf "IPAMonaUIGothic"
  12454. w_register_font ipag-mona.ttf "IPAMonaGothic"
  12455. w_register_font ipagp-mona.ttf "IPAMonaPGothic"
  12456. w_register_font ipam-mona.ttf "IPAMonaMincho"
  12457. w_register_font ipamp-mona.ttf "IPAMonaPMincho"
  12458. }
  12459. #----------------------------------------------------------------
  12460. w_metadata liberation fonts \
  12461. title="Red Hat Liberation fonts (Mono, Sans, SansNarrow, Serif)" \
  12462. publisher="Red Hat" \
  12463. year="2008" \
  12464. media="download" \
  12465. file1="liberation-fonts-ttf-1.07.4.tar.gz" \
  12466. installed_file1="${W_FONTSDIR_WIN}/liberationmono-bolditalic.ttf"
  12467. load_liberation()
  12468. {
  12469. # https://pagure.io/liberation-fonts
  12470. w_download "https://releases.pagure.org/liberation-fonts/liberation-fonts-ttf-1.07.4.tar.gz" 61a7e2b6742a43c73e8762cdfeaf6dfcf9abdd2cfa0b099a9854d69bc4cfee5c
  12471. w_try_cd "${W_TMP}"
  12472. w_try tar -zxf "${W_CACHE}/${W_PACKAGE}/${file1}"
  12473. w_try_cp_font_files "${file1%.tar.gz}" "${W_FONTSDIR_UNIX}"
  12474. w_register_font liberationmono-bolditalic.ttf "Liberation Mono Bold Italic"
  12475. w_register_font liberationmono-bold.ttf "Liberation Mono Bold"
  12476. w_register_font liberationmono-italic.ttf "Liberation Mono Italic"
  12477. w_register_font liberationmono-regular.ttf "Liberation Mono"
  12478. w_register_font liberationsans-bolditalic.ttf "Liberation Sans Bold Italic"
  12479. w_register_font liberationsans-bold.ttf "Liberation Sans Bold"
  12480. w_register_font liberationsans-italic.ttf "Liberation Sans Italic"
  12481. w_register_font liberationsans-regular.ttf "Liberation Sans"
  12482. w_register_font liberationsansnarrow-bolditalic.ttf "Liberation Sans Narrow Bold Italic"
  12483. w_register_font liberationsansnarrow-bold.ttf "Liberation Sans Narrow Bold"
  12484. w_register_font liberationsansnarrow-italic.ttf "Liberation Sans Narrow Italic"
  12485. w_register_font liberationsansnarrow-regular.ttf "Liberation Sans Narrow"
  12486. w_register_font liberationserif-bolditalic.ttf "Liberation Serif Bold Italic"
  12487. w_register_font liberationserif-bold.ttf "Liberation Serif Bold"
  12488. w_register_font liberationserif-italic.ttf "Liberation Serif Italic"
  12489. w_register_font liberationserif-regular.ttf "Liberation Serif"
  12490. }
  12491. #----------------------------------------------------------------
  12492. w_metadata lucida fonts \
  12493. title="MS Lucida Console font" \
  12494. publisher="Microsoft" \
  12495. year="1998" \
  12496. media="download" \
  12497. file1="eurofixi.exe" \
  12498. installed_file1="${W_FONTSDIR_WIN}/lucon.ttf"
  12499. load_lucida()
  12500. {
  12501. # The site supports https with Let's Encrypt, but that cert fails with curl (which breaks src/linkcheck.sh)
  12502. w_download "http://ftpmirror.your.org/pub/misc/ftp.microsoft.com/bussys/winnt/winnt-public/fixes/usa/NT40TSE/hotfixes-postSP3/Euro-fix/eurofixi.exe" 41f272a33521f6e15f2cce9ff1e049f2badd5ff0dc327fc81b60825766d5b6c7
  12503. w_try_cabextract -d "${W_TMP}" -F "lucon.ttf" "${W_CACHE}"/lucida/eurofixi.exe
  12504. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}"
  12505. w_register_font lucon.ttf "Lucida Console"
  12506. }
  12507. #----------------------------------------------------------------
  12508. w_metadata opensymbol fonts \
  12509. title="OpenSymbol fonts (replacement for Wingdings)" \
  12510. publisher="libreoffice.org" \
  12511. year="2022" \
  12512. media="download" \
  12513. file1="fonts-opensymbol_102.11+LibO7.0.4-4+deb11u7_all.deb" \
  12514. installed_file1="${W_FONTSDIR_WIN}/opens___.ttf"
  12515. load_opensymbol()
  12516. {
  12517. # The OpenSymbol fonts are a replacement for the Windows Wingdings font from OpenOffice.org.
  12518. # Need to w_download Debian since I can't find a standalone download from OpenOffice
  12519. # Note: The source download package on debian is for _all_ of OpenOffice, which is 266 MB.
  12520. w_download https://cdn-aws.deb.debian.org/debian-security/pool/updates/main/libr/libreoffice/fonts-opensymbol_102.11+LibO7.0.4-4+deb11u7_all.deb 56932af381469673cea780c452644c193ec963e37756a3030428445d8fbc67c3
  12521. w_try_cd "${W_TMP}"
  12522. w_try_ar "${W_CACHE}/${W_PACKAGE}/${file1}" data.tar.xz
  12523. w_try tar -Jxf "${W_TMP}/data.tar.xz" ./usr/share/fonts/truetype/libreoffice/opens___.ttf
  12524. w_try_cp_font_files "usr/share/fonts/truetype/libreoffice" "${W_FONTSDIR_UNIX}"
  12525. w_register_font opens___.ttf "OpenSymbol"
  12526. }
  12527. #----------------------------------------------------------------
  12528. w_metadata sourcehansans fonts \
  12529. title="Source Han Sans fonts" \
  12530. publisher="Adobe" \
  12531. year="2021" \
  12532. media="download" \
  12533. file1="SourceHanSans.ttc.zip" \
  12534. installed_file1="${W_FONTSDIR_WIN}/sourcehansans.ttc"
  12535. load_sourcehansans()
  12536. {
  12537. w_download "https://github.com/adobe-fonts/source-han-sans/releases/download/2.004R/SourceHanSans.ttc.zip" 6f59118a9adda5a7fe4e9e6bb538309f7e1d3c5411f9a9d32af32a79501b7e4f
  12538. w_try_unzip "${W_TMP}" "${W_CACHE}/${W_PACKAGE}/${file1}"
  12539. w_try mv "${W_TMP}/SourceHanSans.ttc" "${W_TMP}/sourcehansans_.ttc"
  12540. w_try mv "${W_TMP}/sourcehansans_.ttc" "${W_TMP}/sourcehansans.ttc"
  12541. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}" "*.ttc"
  12542. # Simplified Chinese
  12543. w_register_font sourcehansans.ttc "Source Han Sans SC ExtraLight"
  12544. w_register_font sourcehansans.ttc "Source Han Sans SC Light"
  12545. w_register_font sourcehansans.ttc "Source Han Sans SC Normal"
  12546. w_register_font sourcehansans.ttc "Source Han Sans SC"
  12547. w_register_font sourcehansans.ttc "Source Han Sans SC Medium"
  12548. w_register_font sourcehansans.ttc "Source Han Sans SC Bold"
  12549. w_register_font sourcehansans.ttc "Source Han Sans SC Heavy"
  12550. # Traditional Chinese (Taiwan)
  12551. w_register_font sourcehansans.ttc "Source Han Sans TC ExtraLight"
  12552. w_register_font sourcehansans.ttc "Source Han Sans TC Light"
  12553. w_register_font sourcehansans.ttc "Source Han Sans TC Normal"
  12554. w_register_font sourcehansans.ttc "Source Han Sans TC"
  12555. w_register_font sourcehansans.ttc "Source Han Sans TC Medium"
  12556. w_register_font sourcehansans.ttc "Source Han Sans TC Bold"
  12557. w_register_font sourcehansans.ttc "Source Han Sans TC Heavy"
  12558. # Japanese
  12559. w_register_font sourcehansans.ttc "Source Han Sans ExtraLight"
  12560. w_register_font sourcehansans.ttc "Source Han Sans Light"
  12561. w_register_font sourcehansans.ttc "Source Han Sans Normal"
  12562. w_register_font sourcehansans.ttc "Source Han Sans"
  12563. w_register_font sourcehansans.ttc "Source Han Sans Medium"
  12564. w_register_font sourcehansans.ttc "Source Han Sans Bold"
  12565. w_register_font sourcehansans.ttc "Source Han Sans Heavy"
  12566. # Korean
  12567. w_register_font sourcehansans.ttc "Source Han Sans K ExtraLight"
  12568. w_register_font sourcehansans.ttc "Source Han Sans K Light"
  12569. w_register_font sourcehansans.ttc "Source Han Sans K Normal"
  12570. w_register_font sourcehansans.ttc "Source Han Sans K"
  12571. w_register_font sourcehansans.ttc "Source Han Sans K Medium"
  12572. w_register_font sourcehansans.ttc "Source Han Sans K Bold"
  12573. w_register_font sourcehansans.ttc "Source Han Sans K Heavy"
  12574. }
  12575. #----------------------------------------------------------------
  12576. w_metadata tahoma fonts \
  12577. title="MS Tahoma font (not part of corefonts)" \
  12578. publisher="Microsoft" \
  12579. year="1999" \
  12580. media="download" \
  12581. file1="IELPKTH.CAB" \
  12582. installed_file1="${W_FONTSDIR_WIN}/tahoma.ttf"
  12583. load_tahoma()
  12584. {
  12585. # Formerly at https://download.microsoft.com/download/ie55sp2/Install/5.5_SP2/WIN98Me/EN-US/IELPKTH.CAB
  12586. w_download https://downloads.sourceforge.net/corefonts/OldFiles/IELPKTH.CAB c1be3fb8f0042570be76ec6daa03a99142c88367c1bc810240b85827c715961a
  12587. w_try_cabextract -d "${W_TMP}" "${W_CACHE}/${W_PACKAGE}/${file1}"
  12588. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}" "*.TTF"
  12589. w_register_font tahoma.ttf "Tahoma"
  12590. w_register_font tahomabd.ttf "Tahoma Bold"
  12591. }
  12592. #----------------------------------------------------------------
  12593. w_metadata takao fonts \
  12594. title="Takao Japanese fonts" \
  12595. publisher="Jun Kobayashi" \
  12596. year="2010" \
  12597. media="download" \
  12598. file1="takao-fonts-ttf-003.02.01.zip" \
  12599. installed_file1="${W_FONTSDIR_WIN}/takaogothic.ttf"
  12600. load_takao()
  12601. {
  12602. # The Takao font provides Japanese glyphs. May also be needed with fakejapanese function above.
  12603. # See https://launchpad.net/takao-fonts for project page
  12604. w_download "https://launchpad.net/takao-fonts/trunk/003.02.01/+download/takao-fonts-ttf-003.02.01.zip" 2f526a16c7931958f560697d494d8304949b3ce0aef246fb0c727fbbcc39089e
  12605. w_try_unzip "${W_TMP}" "${W_CACHE}"/takao/takao-fonts-ttf-003.02.01.zip
  12606. w_try_cp_font_files "${W_TMP}/takao-fonts-ttf-003.02.01" "${W_FONTSDIR_UNIX}"
  12607. w_register_font takaogothic.ttf "TakaoGothic"
  12608. w_register_font takaopgothic.ttf "TakaoPGothic"
  12609. w_register_font takaomincho.ttf "TakaoMincho"
  12610. w_register_font takaopmincho.ttf "TakaoPMincho"
  12611. w_register_font takaoexgothic.ttf "TakaoExGothic"
  12612. w_register_font takaoexmincho.ttf "TakaoExMincho"
  12613. }
  12614. #----------------------------------------------------------------
  12615. w_metadata uff fonts \
  12616. title="Ubuntu Font Family" \
  12617. publisher="Ubuntu" \
  12618. year="2010" \
  12619. media="download" \
  12620. file1="ubuntu-font-family-0.83.zip" \
  12621. installed_file1="${W_FONTSDIR_WIN}/ubuntu-r.ttf" \
  12622. homepage="https://launchpad.net/ubuntu-font-family"
  12623. load_uff()
  12624. {
  12625. w_download "https://assets.ubuntu.com/v1/fad7939b-ubuntu-font-family-0.83.zip" 456d7d42797febd0d7d4cf1b782a2e03680bb4a5ee43cc9d06bda172bac05b42 ubuntu-font-family-0.83.zip
  12626. w_try_unzip "${W_TMP}" "${W_CACHE}/${W_PACKAGE}/${file1}"
  12627. w_try_cp_font_files "${W_TMP}/$(basename "${file1}" .zip)" "${W_FONTSDIR_UNIX}"
  12628. w_register_font ubuntu-bi.ttf "Ubuntu Bold Italic"
  12629. w_register_font ubuntu-b.ttf "Ubuntu Bold"
  12630. w_register_font ubuntu-c.ttf "Ubuntu Condensed"
  12631. w_register_font ubuntu-i.ttf "Ubuntu Italic"
  12632. w_register_font ubuntu-li.ttf "Ubuntu Light Italic"
  12633. w_register_font ubuntu-l.ttf "Ubuntu Light"
  12634. w_register_font ubuntu-mi.ttf "Ubuntu Medium Italic"
  12635. w_register_font ubuntumono-bi.ttf "Ubuntu Mono Bold Italic"
  12636. w_register_font ubuntumono-b.ttf "Ubuntu Mono Bold"
  12637. w_register_font ubuntumono-ri.ttf "Ubuntu Mono Italic"
  12638. w_register_font ubuntumono-r.ttf "Ubuntu Mono"
  12639. w_register_font ubuntu-m.ttf "Ubuntu Medium"
  12640. w_register_font ubuntu-ri.ttf "Ubuntu Italic"
  12641. w_register_font ubuntu-r.ttf "Ubuntu"
  12642. }
  12643. #----------------------------------------------------------------
  12644. w_metadata vlgothic fonts \
  12645. title="VLGothic Japanese fonts" \
  12646. publisher="Project Vine / Daisuke Suzuki" \
  12647. year="2014" \
  12648. media="download" \
  12649. file1="VLGothic-20141206.tar.xz" \
  12650. installed_file1="${W_FONTSDIR_WIN}/vl-gothic-regular.ttf" \
  12651. homepage="https://ja.osdn.net/projects/vlgothic"
  12652. load_vlgothic()
  12653. {
  12654. w_download "https://ja.osdn.net/projects/vlgothic/downloads/62375/VLGothic-20141206.tar.xz" 982040db2f9cb73d7c6ab7d9d163f2ed46d1180f330c9ba2fae303649bf8102d
  12655. w_try_cd "${W_TMP}"
  12656. w_try tar -Jxf "${W_CACHE}/vlgothic/VLGothic-20141206.tar.xz"
  12657. w_try_cp_font_files "${W_TMP}/VLGothic" "${W_FONTSDIR_UNIX}"
  12658. w_register_font vl-gothic-regular.ttf "VL Gothic"
  12659. w_register_font vl-pgothic-regular.ttf "VL PGothic"
  12660. }
  12661. #----------------------------------------------------------------
  12662. w_metadata wenquanyi fonts \
  12663. title="WenQuanYi CJK font" \
  12664. publisher="wenq.org" \
  12665. year="2009" \
  12666. media="download" \
  12667. file1="wqy-microhei-0.2.0-beta.tar.gz" \
  12668. installed_file1="${W_FONTSDIR_WIN}/wqy-microhei.ttc"
  12669. load_wenquanyi()
  12670. {
  12671. # See http://wenq.org/enindex.cgi
  12672. # Donate at http://wenq.org/enindex.cgi?Download(en)#MicroHei_Beta if you want to help support free CJK font development
  12673. w_download "https://downloads.sourceforge.net/wqy/wqy-microhei-0.2.0-beta.tar.gz" 2802ac8023aa36a66ea6e7445854e3a078d377ffff42169341bd237871f7213e
  12674. w_try_cd "${W_TMP}"
  12675. w_try tar -zxf "${W_CACHE}/${W_PACKAGE}/${file1}"
  12676. w_try_cp_font_files "${W_TMP}/wqy-microhei" "${W_FONTSDIR_UNIX}" "*.ttc"
  12677. w_register_font wqy-microhei.ttc "WenQuanYi Micro Hei"
  12678. }
  12679. #----------------------------------------------------------------
  12680. w_metadata wenquanyizenhei fonts \
  12681. title="WenQuanYi ZenHei font" \
  12682. publisher="wenq.org" \
  12683. year="2009" \
  12684. media="download" \
  12685. file1="wqy-zenhei-0.8.38-1.tar.gz" \
  12686. installed_file1="${W_FONTSDIR_WIN}/wqy-zenhei.ttc"
  12687. load_wenquanyizenhei()
  12688. {
  12689. # See http://wenq.org/wqy2/index.cgi?ZenHei
  12690. # Donate at http://wenq.org/wqy2/index.cgi?Donation if you want to help support free font development
  12691. w_download "http://downloads.sourceforge.net/wqy/wqy-zenhei-0.8.38-1.tar.gz" 6018eb54243eddc41e9cbe0b71feefa5cb2570ecbaccd39daa025961235dea22
  12692. w_try_cd "${W_TMP}"
  12693. w_try tar -zxf "${W_CACHE}/${W_PACKAGE}/${file1}"
  12694. w_try_cp_font_files "${W_TMP}/wqy-zenhei" "${W_FONTSDIR_UNIX}" "*.ttc"
  12695. w_register_font wqy-zenhei.ttc "WenQuanYi Zen Hei"
  12696. }
  12697. #----------------------------------------------------------------
  12698. w_metadata unifont fonts \
  12699. title="Unifont alternative to Arial Unicode MS" \
  12700. publisher="Roman Czyborra / GNU" \
  12701. year="2021" \
  12702. media="download" \
  12703. file1="unifont-13.0.06.ttf" \
  12704. installed_file1="${W_FONTSDIR_WIN}/unifont.ttf"
  12705. load_unifont()
  12706. {
  12707. # The GNU Unifont provides glyphs for just about everything in common language. It is intended for multilingual usage.
  12708. # See https://unifoundry.com/unifont/index.html for project page.
  12709. w_download "https://unifoundry.com/pub/unifont/unifont-13.0.06/font-builds/unifont-13.0.06.ttf" d73c0425811ffd366b0d1973e9338bac26fe7cf085760a12e10c61241915e742
  12710. w_try cp "${W_CACHE}/${W_PACKAGE}/${file1}" "${W_TMP}/unifont.ttf"
  12711. w_try_cp_font_files "${W_TMP}" "${W_FONTSDIR_UNIX}"
  12712. w_register_font unifont.ttf "Unifont"
  12713. w_register_font_replacement "Arial Unicode MS" "Unifont"
  12714. }
  12715. #----------------------------------------------------------------
  12716. w_metadata allfonts fonts \
  12717. title="All fonts" \
  12718. publisher="various" \
  12719. year="1998-2010" \
  12720. media="download"
  12721. load_allfonts()
  12722. {
  12723. # This verb uses reflection, should probably do it portably instead, but that would require keeping it up to date
  12724. for file in "${WINETRICKS_METADATA}"/fonts/*.vars; do
  12725. cmd=$(basename "${file}" .vars)
  12726. case ${cmd} in
  12727. # "fake*" verbs need to be skipped because
  12728. # this "allfonts" verb is intended to only install real fonts and
  12729. # adding font replacements at the same time may invalidate the replacements
  12730. # "pptfonts" can be skipped because it only calls other verbs for installing fonts
  12731. # See https://github.com/Winetricks/winetricks/issues/899
  12732. allfonts|cjkfonts|fake*|pptfonts) ;;
  12733. *) w_call "${cmd}";;
  12734. esac
  12735. done
  12736. }
  12737. #######################
  12738. # apps
  12739. #######################
  12740. #----------------------------------------------------------------
  12741. w_metadata 3m_library apps \
  12742. title="3M Cloud Library" \
  12743. publisher="3M Company" \
  12744. year="2015" \
  12745. media="download" \
  12746. file1="cloudLibrary-2.1.1702011951-Setup.exe" \
  12747. installed_exe1="${W_PROGRAMS_X86_WIN}/cloudLibrary/cloudLibrary.exe" \
  12748. homepage="https://www.yourcloudlibrary.com/"
  12749. load_3m_library()
  12750. {
  12751. w_download https://usestrwebaccess.blob.core.windows.net/apps/pc/cloudLibrary-2.1.1702011951-Setup.exe bb3d854cc525c065e7298423bf0019309f4b65497c1d8bc6af09460cd6fcb57f
  12752. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  12753. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/S}
  12754. }
  12755. #----------------------------------------------------------------
  12756. w_metadata 7zip apps \
  12757. title="7-Zip 19.00" \
  12758. publisher="Igor Pavlov" \
  12759. year="2019" \
  12760. media="download" \
  12761. file1="7z1900.exe" \
  12762. installed_exe1="${W_PROGRAMS_X86_WIN}/7-Zip/7zFM.exe"
  12763. load_7zip()
  12764. {
  12765. w_download https://www.7-zip.org/a/7z1900.exe 759aa04d5b03ebeee13ba01df554e8c962ca339c74f56627c8bed6984bb7ef80
  12766. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  12767. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/S}
  12768. }
  12769. #----------------------------------------------------------------
  12770. w_metadata adobe_diged apps \
  12771. title="Adobe Digital Editions 1.7" \
  12772. publisher="Adobe" \
  12773. year="2011" \
  12774. media="download" \
  12775. file1="setup.exe" \
  12776. installed_exe1="${W_PROGRAMS_X86_WIN}/Adobe/Adobe Digital Editions/digitaleditions.exe" \
  12777. homepage="https://www.adobe.com/solutions/ebook/digital-editions.html"
  12778. load_adobe_diged()
  12779. {
  12780. w_download https://kb2.adobe.com/cps/403/kb403051/attachments/setup.exe 4ebe0fcefbe68900ca6bf499432030c9f8eb8828f8cb5a7e1fd1a16c0eba918e
  12781. # NSIS installer
  12782. w_try "${WINE}" "${W_CACHE}/${W_PACKAGE}/setup.exe" ${W_OPT_UNATTENDED:+ /S}
  12783. }
  12784. #----------------------------------------------------------------
  12785. w_metadata adobe_diged4 apps \
  12786. title="Adobe Digital Editions 4.5" \
  12787. publisher="Adobe" \
  12788. year="2015" \
  12789. media="download" \
  12790. file1="ADE_4.5_Installer.exe" \
  12791. installed_exe1="${W_PROGRAMS_X86_WIN}/Adobe/Adobe Digital Editions 4.5/DigitalEditions.exe" \
  12792. homepage="https://www.adobe.com/solutions/ebook/digital-editions.html"
  12793. load_adobe_diged4()
  12794. {
  12795. w_download https://download.adobe.com/pub/adobe/digitaleditions/ADE_4.5_Installer.exe a21a9d5389728fdac6a7288953dddeea774ef2bee07f1caf7ea20bbed8f5a2c6
  12796. if w_workaround_wine_bug 32323; then
  12797. w_call corefonts
  12798. fi
  12799. if [ ! -x "$(command -v winbindd 2>/dev/null)" ]; then
  12800. w_warn "Adobe Digital Editions 4.5 requires winbind (part of Samba) to be installed, but winbind was not detected."
  12801. fi
  12802. w_call dotnet40
  12803. #w_call win7
  12804. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  12805. if test "${W_OPT_UNATTENDED}"; then
  12806. # Silent install (/S) pops up an advertisement that AHK has trouble dismissing
  12807. w_try_7z "${W_PROGRAMS_X86_UNIX}/Adobe/Adobe Digital Editions 4.5" "${file1}" -y
  12808. else
  12809. "${WINE}" "${file1}"
  12810. fi
  12811. }
  12812. #----------------------------------------------------------------
  12813. w_metadata autohotkey apps \
  12814. title="AutoHotKey" \
  12815. publisher="autohotkey.org" \
  12816. year="2010" \
  12817. media="download" \
  12818. file1="AutoHotkey_1.1.36.01_setup.exe" \
  12819. installed_exe1="${W_PROGRAMS_X86_WIN}/AutoHotkey/AutoHotkey.exe"
  12820. load_autohotkey()
  12821. {
  12822. w_download https://github.com/AutoHotkey/AutoHotkey/releases/download/v1.1.36.01/AutoHotkey_1.1.36.01_setup.exe 62734d219f14a942986e62d6c0fef0c2315bc84acd963430aed788c36e67e1ff
  12823. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  12824. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/S}
  12825. }
  12826. #----------------------------------------------------------------
  12827. w_metadata busybox apps \
  12828. title="BusyBox FRP-4621-gf3c5e8bc3" \
  12829. publisher="Ron Yorston / Busybox authors" \
  12830. year="2021" \
  12831. media="download" \
  12832. file1="busybox-w32-FRP-4621-gf3c5e8bc3.exe" \
  12833. installed_exe1="${W_SYSTEM32_DLLS_WIN}/busybox.exe"
  12834. load_busybox()
  12835. {
  12836. w_download https://frippery.org/files/busybox/busybox-w32-FRP-4621-gf3c5e8bc3.exe 58c9da9ba094eade662572f9a725a6af44350dc3ff5a7897696926c651fdb582
  12837. if test "${W_ARCH}" = "win64"; then
  12838. w_download https://frippery.org/files/busybox/busybox-w64-FRP-4621-gf3c5e8bc3.exe 7109bc6f129ab7ce466f7b3175ca830316184b431d16a965ade17b93c035ec7c
  12839. w_try_cp_dll "${W_CACHE}/${W_PACKAGE}/${file1}" "${W_SYSTEM32_DLLS}/busybox.exe"
  12840. w_try_cp_dll "${W_CACHE}/${W_PACKAGE}/busybox-w64-FRP-4621-gf3c5e8bc3.exe" "${W_SYSTEM64_DLLS}/busybox.exe"
  12841. else
  12842. w_try_cp_dll "${W_CACHE}/${W_PACKAGE}/${file1}" "${W_SYSTEM32_DLLS}/busybox.exe"
  12843. fi
  12844. }
  12845. #----------------------------------------------------------------
  12846. w_metadata cmake apps \
  12847. title="CMake 2.8" \
  12848. publisher="Kitware" \
  12849. year="2013" \
  12850. media="download" \
  12851. file1="cmake-2.8.11.2-win32-x86.exe" \
  12852. installed_exe1="${W_PROGRAMS_X86_WIN}/CMake 2.8/bin/cmake-gui.exe"
  12853. load_cmake()
  12854. {
  12855. w_download https://www.cmake.org/files/v2.8/cmake-2.8.11.2-win32-x86.exe cb6a7df8fd6f2eca66512279991f3c2349e3f788477c3be8eaa362d46c21dbf0
  12856. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  12857. w_try "${WINE}" cmake-2.8.11.2-win32-x86.exe ${W_OPT_UNATTENDED:+/S}
  12858. }
  12859. #----------------------------------------------------------------
  12860. w_metadata colorprofile apps \
  12861. title="Standard RGB color profile" \
  12862. publisher="Microsoft" \
  12863. year="2005" \
  12864. media="download" \
  12865. file1="ColorProfile.exe" \
  12866. installed_exe1="${W_WINDIR_WIN}/system32/spool/drivers/color/sRGB Color Space Profile.icm"
  12867. load_colorprofile()
  12868. {
  12869. w_download https://download.microsoft.com/download/whistler/hwdev1/1.0/wxp/en-us/ColorProfile.exe d04ac910acdd97abd663f559bebc6440d8d68664bf977ec586035247d7b0f728
  12870. w_try_unzip "${W_TMP}" "${W_CACHE}"/colorprofile/ColorProfile.exe
  12871. # It's in system32 for both win32/win64
  12872. w_try_mkdir "${W_WINDIR_UNIX}"/system32/spool/drivers/color
  12873. w_try cp -f "${W_TMP}/sRGB Color Space Profile.icm" "${W_WINDIR_UNIX}"/system32/spool/drivers/color
  12874. }
  12875. #----------------------------------------------------------------
  12876. w_metadata controlpad apps \
  12877. title="MS ActiveX Control Pad" \
  12878. publisher="Microsoft" \
  12879. year="1997" \
  12880. media="download" \
  12881. file1="setuppad.exe" \
  12882. installed_exe1="${W_PROGRAMS_X86_WIN}/ActiveX Control Pad/PED.EXE"
  12883. load_controlpad()
  12884. {
  12885. # https://msdn.microsoft.com/en-us/library/ms968493.aspx
  12886. w_call wsh57
  12887. w_download https://download.microsoft.com/download/activexcontrolpad/install/4.0.0.950/win98mexp/en-us/setuppad.exe eab94091ac391f9bbc8e355a1d231e6a08b8dbbb0f6539245b7f0c58d94f420c
  12888. w_try_cabextract --directory="${W_TMP}" "${W_CACHE}"/controlpad/setuppad.exe
  12889. echo "If setup says 'Unable to start DDE ...', press Ignore"
  12890. w_try_cd "${W_TMP}"
  12891. w_try "${WINE}" setup ${W_OPT_UNATTENDED:+/qt}
  12892. if ! test -f "${W_SYSTEM32_DLLS}"/FM20.DLL; then
  12893. w_die "Install failed. Please report, If you just wanted fm20.dll, try installing art2min instead."
  12894. fi
  12895. }
  12896. #----------------------------------------------------------------
  12897. w_metadata controlspy apps \
  12898. title="Control Spy 6 " \
  12899. publisher="Microsoft" \
  12900. year="2005" \
  12901. media="download" \
  12902. file1="ControlSpyV6.exe" \
  12903. installed_exe1="${W_PROGRAMS_X86_WIN}/Microsoft/ControlSpy/ControlSpyV6.exe"
  12904. load_controlspy()
  12905. {
  12906. # Originally at https://download.microsoft.com/download/a/3/1/a315b133-03a8-4845-b428-ec585369b285/ControlSpy.msi
  12907. # 2019/04/11: changed to https://github.com/pywinauto/pywinauto/blob/master/apps/ControlSpy_20/ControlSpyV6.exe
  12908. # Unfortunately that means no V5 of ControlSpy :/
  12909. w_download https://github.com/pywinauto/pywinauto/blob/master/apps/ControlSpy_20/ControlSpyV6.exe
  12910. w_try_mkdir "${W_PROGRAMS_X86_UNIX}/Microsoft/ControlSpy"
  12911. w_try cp "${W_CACHE}/${W_PACKAGE}/${file1}" "${W_PROGRAMS_X86_UNIX}/Microsoft/ControlSpy"
  12912. }
  12913. #----------------------------------------------------------------
  12914. # dxdiag is a system component that one usually adds to an existing wineprefix,
  12915. # so it belongs in 'dlls', not apps.
  12916. w_metadata dxdiag dlls \
  12917. title="DirectX Diagnostic Tool" \
  12918. publisher="Microsoft" \
  12919. year="2010" \
  12920. media="download" \
  12921. file1="../directx9/directx_feb2010_redist.exe" \
  12922. installed_file1="${W_SYSTEM32_DLLS_WIN}/dxdiag.exe"
  12923. load_dxdiag()
  12924. {
  12925. helper_directx_dl
  12926. w_call gmdls
  12927. w_try_cabextract -d "${W_TMP}" -L -F dxnt.cab "${W_CACHE}"/directx9/${DIRECTX_NAME}
  12928. w_try_cabextract -d "${W_SYSTEM32_DLLS}" -L -F "dxdiag.exe" "${W_TMP}/dxnt.cab"
  12929. w_try_mkdir "${W_WINDIR_UNIX}/help"
  12930. w_try_cabextract -d "${W_WINDIR_UNIX}/help" -L -F "dxdiag.chm" "${W_TMP}/dxnt.cab"
  12931. w_override_dlls native dxdiag.exe
  12932. if w_workaround_wine_bug 49996; then
  12933. w_call dxdiagn_feb2010
  12934. fi
  12935. if w_workaround_wine_bug 9027; then
  12936. w_call dmband
  12937. w_call dmime
  12938. w_call dmstyle
  12939. w_call dmsynth
  12940. w_call dmusic
  12941. fi
  12942. }
  12943. #----------------------------------------------------------------
  12944. w_metadata dxwnd apps \
  12945. title="Window hooker to run fullscreen programs in window and much more..." \
  12946. publisher="ghotik" \
  12947. year="2011" \
  12948. media="download" \
  12949. file1="v2_05_88_build.rar" \
  12950. installed_exe1="${W_PROGRAMS_X86_WIN}/dxwnd/dxwnd.exe" \
  12951. homepage="https://dxwnd.sourceforge.io"
  12952. load_dxwnd()
  12953. {
  12954. # 2022/10/02 v2_05_88_build.rar a80ad1246493b3b34fba2131494052423ac298a39592d4e06a685568b829922e
  12955. w_download https://versaweb.dl.sourceforge.net/project/dxwnd/Latest%20build/v2_05_88_build.rar a80ad1246493b3b34fba2131494052423ac298a39592d4e06a685568b829922e
  12956. w_try_7z "${W_PROGRAMS_X86_UNIX}"/dxwnd "${W_CACHE}"/"${W_PACKAGE}"/"${file1}" -aoa
  12957. }
  12958. #----------------------------------------------------------------
  12959. w_metadata emu8086 apps \
  12960. title="emu8086" \
  12961. publisher="emu8086.com" \
  12962. year="2015" \
  12963. media="download" \
  12964. file1="emu8086v408r11.zip" \
  12965. installed_exe1="c:/emu8086/emu8086.exe"
  12966. load_emu8086()
  12967. {
  12968. # 2018/11/15: emu8086.com is down
  12969. # w_download http://www.emu8086.com/files/emu8086v408r11.zip d56d6e42fe170c52df5abd6002b1e8fef0b840eb8d8807d77819fe1fc2e17afd
  12970. w_download https://web.archive.org/web/20160206003914if_/http://emu8086.com/files/emu8086v408r11.zip d56d6e42fe170c52df5abd6002b1e8fef0b840eb8d8807d77819fe1fc2e17afd
  12971. w_try_unzip "${W_TMP}" "${W_CACHE}/${W_PACKAGE}/${file1}"
  12972. w_try "${WINE}" "${W_TMP}/Setup.exe" ${W_OPT_UNATTENDED:+/silent}
  12973. }
  12974. #----------------------------------------------------------------
  12975. w_metadata ev3 apps \
  12976. title="Lego Mindstorms EV3 Home Edition" \
  12977. publisher="Lego" \
  12978. year="2014" \
  12979. media="download" \
  12980. file1="LMS-EV3-WIN32-ENUS-01-02-01-full-setup.exe" \
  12981. installed_exe1="${W_PROGRAMS_X86_WIN}/LEGO Software/LEGO MINDSTORMS EV3 Home Edition/MindstormsEV3.exe"
  12982. load_ev3()
  12983. {
  12984. if w_workaround_wine_bug 40192 "Installing vcrun2005 as Wine does not have MFC80.dll"; then
  12985. w_call vcrun2005
  12986. fi
  12987. if w_workaround_wine_bug 40193 "Installing IE8 as built-in Gecko is not sufficient"; then
  12988. w_call ie8
  12989. fi
  12990. w_call dotnet40
  12991. # 2016/03/22: LMS-EV3-WIN32-ENUS-01-02-01-full-setup.exe c47341f08242f0f6f01996530e7c93bda2d666747ada60ab93fa773a55d40a19
  12992. 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 c47341f08242f0f6f01996530e7c93bda2d666747ada60ab93fa773a55d40a19
  12993. w_try_cd "${W_CACHE}"/"${W_PACKAGE}"
  12994. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/qb /AcceptLicenses yes}
  12995. if w_workaround_wine_bug 40729 "Setting override for urlmon.dll to native to avoid crash"; then
  12996. w_override_dlls native urlmon
  12997. fi
  12998. }
  12999. #----------------------------------------------------------------
  13000. w_metadata firefox apps \
  13001. title="Firefox 51.0" \
  13002. publisher="Mozilla" \
  13003. year="2017" \
  13004. media="download" \
  13005. file1="FirefoxSetup51.0.exe" \
  13006. installed_exe1="${W_PROGRAMS_X86_WIN}/Mozilla Firefox/firefox.exe"
  13007. load_firefox()
  13008. {
  13009. w_download "https://download.mozilla.org/?product=firefox-51.0-SSL&os=win&lang=en-US" 05fa9ae012eca560f42d593e75eb37045a54e4978b665b51f6a61e4a2d376eb8 FirefoxSetup51.0.exe
  13010. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13011. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+ -ms}
  13012. }
  13013. #----------------------------------------------------------------
  13014. w_metadata fontxplorer apps \
  13015. title="Font Xplorer 1.2.2" \
  13016. publisher="Moon Software" \
  13017. year="2001" \
  13018. media="download" \
  13019. file1="Font_Xplorer_122_Free.exe" \
  13020. installed_file1="${W_PROGRAMS_X86_WIN}/Font Xplorer/FXplorer.exe" \
  13021. homepage="http://www.moonsoftware.com/fxplorer.asp"
  13022. load_fontxplorer()
  13023. {
  13024. # 2011/05/15: http://www.moonsoftware.com/files/legacy/Font_Xplorer_122_Free.exe e3a53841c133e2ecfeb75c7ea277e23011317bb031f8caf423b7e9b7f92d85e0
  13025. # 2019/06/14: http://www.moonsoftware.com/files/legacy/Font_Xplorer_122_Free.exe is dead
  13026. w_download https://web.archive.org/web/20190217101943/http://www.moonsoftware.com/files/legacy/Font_Xplorer_122_Free.exe e3a53841c133e2ecfeb75c7ea277e23011317bb031f8caf423b7e9b7f92d85e0
  13027. w_try_cd "${W_CACHE}/fontxplorer"
  13028. w_try "${WINE}" Font_Xplorer_122_Free.exe ${W_OPT_UNATTENDED:+/S}
  13029. w_killall "explorer.exe"
  13030. }
  13031. #----------------------------------------------------------------
  13032. w_metadata foobar2000 apps \
  13033. title="foobar2000 v1.4" \
  13034. publisher="Peter Pawlowski" \
  13035. year="2018" \
  13036. media="manual_download" \
  13037. file1="foobar2000_v1.4.exe" \
  13038. installed_exe1="${W_PROGRAMS_X86_WIN}/foobar2000/foobar2000.exe"
  13039. load_foobar2000()
  13040. {
  13041. # 2016/12/21: 1.3.14 - 72d024d258c2f3b6cea62dc47fb613848202e7f33f2331f6b2e0a8e61daffcb6
  13042. # 2018/07/25: 1.4 - 7c048faecfec79f9ec2b332b2c68b25e0d0219b47a7c679fe56f2ec05686a96a
  13043. w_download_manual https://www.foobar2000.org/download foobar2000_v1.4.exe 7c048faecfec79f9ec2b332b2c68b25e0d0219b47a7c679fe56f2ec05686a96a
  13044. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13045. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/S}
  13046. }
  13047. #----------------------------------------------------------------
  13048. w_metadata hhw apps \
  13049. title="HTML Help Workshop" \
  13050. publisher="Microsoft" \
  13051. year="2000" \
  13052. media="download" \
  13053. file1="htmlhelp.exe" \
  13054. installed_exe1="${W_PROGRAMS_X86_WIN}/HTML Help Workshop/hhw.exe"
  13055. load_hhw()
  13056. {
  13057. w_call mfc40
  13058. # https://msdn.microsoft.com/en-us/library/windows/desktop/ms669985(v=vs.85).aspx
  13059. w_download https://web.archive.org/web/20160423015142if_/http://download.microsoft.com/download/0/a/9/0a939ef6-e31c-430f-a3df-dfae7960d564/htmlhelp.exe b2b3140d42a818870c1ab13c1c7b8d4536f22bd994fa90aade89729a6009a3ae
  13060. # htmlhelp.exe automatically runs hhupd.exe. It shows a dialog that says
  13061. # "This computer already has a newer version of HTML Help."
  13062. # because of Wine's built-in hhctrl.ocx and it copys files only when
  13063. # Windows version is "Windows 98", "Windows 95", "Windows NT 4.0",
  13064. # or "Windows NT 3.51". 64-bit prefixes can't use any of them.
  13065. #
  13066. # So we need the following steps:
  13067. # 1. Run htmlhelp.exe to unpack its contents
  13068. # 2. Edit htmlhelp.inf not to run hhupd.exe
  13069. # 3. Run setup.exe
  13070. w_try "${WINE}" "${W_CACHE}/${W_PACKAGE}"/htmlhelp.exe /C "/T:${W_TMP_WIN}" ${W_OPT_UNATTENDED:+/q}
  13071. w_try_cd "${W_TMP}"
  13072. w_try sed -i "s/RunPostSetupCommands=HHUpdate//" htmlhelp.inf
  13073. w_try "${WINE}" setup.exe
  13074. if w_workaround_wine_bug 7517; then
  13075. w_call itircl
  13076. w_call itss
  13077. fi
  13078. }
  13079. #----------------------------------------------------------------
  13080. w_metadata iceweasel apps \
  13081. title="GNU Icecat 31.7.0" \
  13082. publisher="GNU Foundation" \
  13083. year="2015" \
  13084. media="download" \
  13085. file1="icecat-31.7.0.en-US.win32.zip" \
  13086. installed_exe1="${W_PROGRAMS_X86_WIN}/icecat/icecat.exe"
  13087. load_iceweasel()
  13088. {
  13089. w_download https://ftp.gnu.org/gnu/gnuzilla/31.7.0/icecat-31.7.0.en-US.win32.zip 27d10e63ab9ea4e6995c235b92258b379f79433a06a12e4ad16811801cf81e36
  13090. w_try_unzip "${W_PROGRAMS_X86_UNIX}" "${W_CACHE}/${W_PACKAGE}/${file1}"
  13091. }
  13092. #----------------------------------------------------------------
  13093. w_metadata irfanview apps \
  13094. title="Irfanview" \
  13095. publisher="Irfan Skiljan" \
  13096. year="2016" \
  13097. media="download" \
  13098. file1="iview444_setup.exe" \
  13099. installed_file1="${W_PROGRAMS_X86_WIN}/IrfanView/i_view32.exe" \
  13100. homepage="https://www.irfanview.com/"
  13101. load_irfanview()
  13102. {
  13103. w_download http://download.betanews.com/download/967963863-1/iview444_setup.exe 71b44cd3d14376bbb619b2fe8a632d29200385738dd186680e988ce32662b3d6
  13104. if w_workaround_wine_bug 657 "Installing mfc42"; then
  13105. w_call mfc42
  13106. fi
  13107. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13108. if test "${W_OPT_UNATTENDED}"; then
  13109. w_ahk_do "
  13110. SetWinDelay 200
  13111. SetTitleMatchMode, 2
  13112. run ${file1}
  13113. winwait, Setup, This program will install
  13114. winactivate, Setup, This program will install
  13115. Sleep 900
  13116. ControlClick, Button7 ; Uncheck All
  13117. Sleep 900
  13118. ControlClick, Button4 ; Create start menu icons
  13119. Sleep 900
  13120. ControlClick, Button11 ; Next
  13121. Sleep 900
  13122. winwait, Setup, version
  13123. Sleep 900
  13124. ControlClick, Button11 ; Next
  13125. Sleep 900
  13126. winwait, Setup, associate extensions
  13127. Sleep 900
  13128. ControlClick, Button1 ; Images Only associations
  13129. Sleep 900
  13130. ControlClick, Button16 ; Next
  13131. Sleep 1000
  13132. winwait, Setup, INI
  13133. Sleep 1000
  13134. ControlClick, Button21 ; Next
  13135. Sleep 1000
  13136. winwait, Setup, You want to change
  13137. winactivate, Setup, really
  13138. Sleep 900
  13139. ControlClick, Button1 ; Yes
  13140. Sleep 900
  13141. winwait, Setup, successful
  13142. winactivate, Setup, successful
  13143. Sleep 900
  13144. ControlClick, Button1 ; no load webpage
  13145. Sleep 900
  13146. ControlClick, Button2 ; no start irfanview
  13147. Sleep 900
  13148. ControlClick, Button25 ; done
  13149. Sleep 900
  13150. winwaitclose
  13151. "
  13152. else
  13153. w_try "${WINE}" "${file1}"
  13154. fi
  13155. }
  13156. #----------------------------------------------------------------
  13157. # FIXME: ie6 always installs to C:/Program Files even if LANG is de_DE.utf-8,
  13158. # so we have to hard code that, but that breaks on 64-bit Windows.
  13159. w_metadata ie6 dlls \
  13160. title="Internet Explorer 6" \
  13161. publisher="Microsoft" \
  13162. year="2002" \
  13163. media="download" \
  13164. conflicts="ie7 ie8" \
  13165. file1="ie60.exe" \
  13166. installed_file1="c:/Program Files/Internet Explorer/iedetect.dll"
  13167. load_ie6()
  13168. {
  13169. w_package_unsupported_win64
  13170. w_download https://web.archive.org/web/20150411022055if_/http://download.oldapps.com/Internet_Explorer/ie60.exe e34e0557d939e7e83185f5354403df99c92a3f3ff80f5ee0c75f6843eaa6efb2
  13171. w_try_cd "${W_TMP}"
  13172. "${WINE}" "${W_CACHE}/${W_PACKAGE}/${file1}"
  13173. # Unregister Wine IE
  13174. if [ ! -f "${W_SYSTEM32_DLLS}"/plugin.ocx ]; then
  13175. w_override_dlls builtin iexplore.exe
  13176. w_try "${WINE}" iexplore -unregserver
  13177. fi
  13178. # Change the override to the native so we are sure we use and register them
  13179. w_override_dlls native,builtin iexplore.exe inetcpl.cpl itircl itss jscript mlang mshtml msimtf shdoclc shdocvw shlwapi
  13180. # Remove the fake DLLs, if any
  13181. mv "${W_PROGRAMS_UNIX}/Internet Explorer/iexplore.exe" "${W_PROGRAMS_UNIX}/Internet Explorer/iexplore.exe.bak"
  13182. for dll in itircl itss jscript mlang mshtml msimtf shdoclc shdocvw; do
  13183. test -f "${W_SYSTEM32_DLLS}"/${dll}.dll &&
  13184. mv "${W_SYSTEM32_DLLS}"/${dll}.dll "${W_SYSTEM32_DLLS}"/${dll}.dll.bak
  13185. done
  13186. # The installer doesn't want to install iexplore.exe in XP mode.
  13187. w_store_winver
  13188. w_set_winver win2k
  13189. # Workaround https://bugs.winehq.org/show_bug.cgi?id=21009
  13190. # FIXME: seems this didn't get migrated to Github?
  13191. # See also https://code.google.com/p/winezeug/issues/detail?id=78
  13192. rm -f "${W_SYSTEM32_DLLS}"/browseui.dll "${W_SYSTEM32_DLLS}"/inseng.dll
  13193. # Otherwise regsvr32 crashes later
  13194. rm -f "${W_SYSTEM32_DLLS}"/inetcpl.cpl
  13195. # Work around https://bugs.winehq.org/show_bug.cgi?id=25432
  13196. w_try_cabextract -F inseng.dll "${W_TMP}/IE 6.0 Full/ACTSETUP.CAB"
  13197. mv inseng.dll "${W_SYSTEM32_DLLS}"
  13198. w_override_dlls native inseng
  13199. w_try_cd "${W_TMP}/IE 6.0 Full"
  13200. w_try_ms_installer "${WINE}" IE6SETUP.EXE ${W_OPT_UNATTENDED:+/q:a /r:n /c:"ie6wzd /S:""#e"" /q:a /r:n"}
  13201. # Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed
  13202. # FIXME: whittle down this list
  13203. w_try_cd "${W_SYSTEM32_DLLS}"
  13204. for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \
  13205. dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll imgutil.dll \
  13206. inetcomm.dll inetcpl.cpl inseng.dll isetup.dll jscript.dll laprxy.dll \
  13207. mlang.dll mshtml.dll mshtmled.dll msi.dll msident.dll \
  13208. msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \
  13209. ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \
  13210. rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \
  13211. shdocvw.dll shell32.dll vbscript.dll webcheck.dll \
  13212. wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \
  13213. plugin.ocx proctexe.ocx tdc.ocx webcheck.dll wshom.ocx; do
  13214. "${WINE}" regsvr32 /i ${i} > /dev/null 2>&1
  13215. done
  13216. # Set Windows version back to the default. Leave at win2k for better rendering (is there a bug for that?)
  13217. w_restore_winver
  13218. # the ie6 we use these days lacks pngfilt, so grab that
  13219. w_call pngfilt
  13220. w_call msls31
  13221. }
  13222. #----------------------------------------------------------------
  13223. w_metadata ie7 dlls \
  13224. title="Internet Explorer 7" \
  13225. publisher="Microsoft" \
  13226. year="2008" \
  13227. media="download" \
  13228. conflicts="ie6 ie8" \
  13229. file1="IE7-WindowsXP-x86-enu.exe" \
  13230. installed_file1="${W_WINDIR_WIN}/ie7.log"
  13231. load_ie7()
  13232. {
  13233. w_package_unsupported_win64
  13234. # Unregister Wine IE
  13235. if grep -q -i "wine placeholder" "${W_PROGRAMS_X86_UNIX}/Internet Explorer/iexplore.exe"; then
  13236. w_override_dlls builtin iexplore.exe
  13237. w_try "${WINE}" iexplore -unregserver
  13238. fi
  13239. # Change the override to the native so we are sure we use and register them
  13240. w_override_dlls native,builtin ieproxy ieframe itircl itss jscript mshtml msimtf shdoclc shdocvw shlwapi urlmon wininet xmllite
  13241. # IE7 installer will check the version number of iexplore.exe which causes IE7 installer to fail on wine-1.9.0+
  13242. w_override_dlls native iexplore.exe
  13243. # Bundled updspapi cannot work on Wine
  13244. w_override_dlls builtin updspapi
  13245. # Remove the fake DLLs from the existing WINEPREFIX
  13246. if [ -f "${W_PROGRAMS_X86_UNIX}/Internet Explorer/iexplore.exe" ]; then
  13247. mv "${W_PROGRAMS_X86_UNIX}/Internet Explorer/iexplore.exe" "${W_PROGRAMS_X86_UNIX}/Internet Explorer/iexplore.exe.bak"
  13248. fi
  13249. for dll in itircl itss jscript mshtml msimtf shdoclc shdocvw urlmon; do
  13250. test -f "${W_SYSTEM32_DLLS}"/${dll}.dll &&
  13251. mv "${W_SYSTEM32_DLLS}"/${dll}.dll "${W_SYSTEM32_DLLS}"/${dll}.dll.bak
  13252. done
  13253. # See https://bugs.winehq.org/show_bug.cgi?id=16013
  13254. # Find instructions to create this file in dlls/wintrust/tests/crypt.c
  13255. w_download https://github.com/Winetricks/winetricks/raw/master/files/winetest.cat 5d18ab44fc289100ccf4b51cf614cc2d36f7ca053e557e2ba973811293c97d38
  13256. # Put a dummy catalog file in place
  13257. w_try_mkdir "${W_SYSTEM32_DLLS}"/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295ee\}
  13258. w_try cp -f "${W_CACHE}"/ie7/winetest.cat "${W_SYSTEM32_DLLS}"/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295ee\}/oem0.cat
  13259. # KLUDGE: if / is writable (as on OS X?), having a Z: mapping to it
  13260. # causes ie7 to put temporary directories on Z:\.
  13261. # So hide it temporarily. This is not very robust!
  13262. if [ -w / ] && [ -h "${WINEPREFIX}/dosdevices/z:" ]; then
  13263. w_try rm -f "${WINEPREFIX}/dosdevices/z:.bak_wt"
  13264. w_try mv "${WINEPREFIX}/dosdevices/z:" "${WINEPREFIX}/dosdevices/z:.bak_wt"
  13265. _W_restore_z=1
  13266. fi
  13267. # Install
  13268. # Microsoft took this down (as of 2020/08/08), but the latest snapshot on archive.org (2020/06/20) gives a different binary.
  13269. # The snapshot just before that (2020/06/17) is fine, however:
  13270. w_download https://web.archive.org/web/20200617171343/https://download.microsoft.com/download/3/8/8/38889DC1-848C-4BF2-8335-86C573AD86D9/IE7-WindowsXP-x86-enu.exe bf5c325bbe3f4174869b2a8ff75f92833e7f7debe64777ed0faf293c7725cbef
  13271. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13272. # IE7 requires winxp to install:
  13273. w_set_winver winxp
  13274. w_try_ms_installer "${WINE}" IE7-WindowsXP-x86-enu.exe ${W_OPT_UNATTENDED:+/quiet}
  13275. if [ "${_W_restore_z}" = 1 ]; then
  13276. # END KLUDGE: restore Z:, assuming that the user didn't kill us
  13277. w_try mv "${WINEPREFIX}/dosdevices/z:.bak_wt" "${WINEPREFIX}/dosdevices/z:"
  13278. fi
  13279. # Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed
  13280. # FIXME: whittle down this list
  13281. w_try_cd "${W_SYSTEM32_DLLS}"
  13282. for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \
  13283. dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \
  13284. imgutil.dll inetcomm.dll inseng.dll isetup.dll jscript.dll laprxy.dll \
  13285. mlang.dll mshtml.dll mshtmled.dll msi.dll msident.dll \
  13286. msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \
  13287. ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \
  13288. rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \
  13289. shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \
  13290. wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \
  13291. plugin.ocx proctexe.ocx tdc.ocx webcheck.dll wshom.ocx; do
  13292. "${WINE}" regsvr32 /i ${i} > /dev/null 2>&1
  13293. done
  13294. # Builtin ieproxy is in system32, but ie7's lives in Program Files. Native
  13295. # CLSID path will get overwritten on prefix update. Setting ieproxy to
  13296. # native doesn't help because setupapi ignores DLL overrides. To work
  13297. # around this problem, copy native ieproxy to system32.
  13298. w_try_cp_dll "${W_PROGRAMS_X86_UNIX}/Internet Explorer/ieproxy.dll" "${W_SYSTEM32_DLLS}"
  13299. # Seeing is believing
  13300. case ${WINETRICKS_GUI} in
  13301. none)
  13302. w_warn "To start ie7, use the command \"${WINE}\" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore.exe'"
  13303. ;;
  13304. *)
  13305. w_warn "Starting ie7. To start it later, use the command \"${WINE}\" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore.exe'"
  13306. "${WINE}" "${W_PROGRAMS_WIN}\\Internet Explorer\\iexplore.exe" http://www.example.com/ > /dev/null 2>&1 &
  13307. ;;
  13308. esac
  13309. unset _W_restore_z
  13310. }
  13311. #----------------------------------------------------------------
  13312. w_metadata ie8 dlls \
  13313. title="Internet Explorer 8" \
  13314. publisher="Microsoft" \
  13315. year="2009" \
  13316. media="download" \
  13317. conflicts="ie6 ie7" \
  13318. file1="IE8-WindowsXP-x86-ENU.exe" \
  13319. installed_file1="${W_WINDIR_WIN}/ie8_main.log"
  13320. load_ie8()
  13321. {
  13322. w_store_winver
  13323. if [ "${W_ARCH}" = "win32" ]; then
  13324. # Bundled in Windows 7, so refuses to install. Works with XP:
  13325. w_set_winver winxp
  13326. else
  13327. # Bundled in Windows 7, so refuses to install. Works with Win2003:
  13328. w_set_winver win2k3
  13329. fi
  13330. # Unregister Wine IE
  13331. #if [ ! -f "$W_SYSTEM32_DLLS"/plugin.ocx ]; then
  13332. if grep -q -i "wine placeholder" "${W_PROGRAMS_X86_UNIX}/Internet Explorer/iexplore.exe"; then
  13333. w_override_dlls builtin iexplore.exe
  13334. w_try "${WINE}" iexplore -unregserver
  13335. fi
  13336. w_call msls31
  13337. # Change the override to the native so we are sure we use and register them
  13338. w_override_dlls native,builtin ieframe ieproxy itircl itss jscript msctf mshtml shdoclc shdocvw shlwapi urlmon wininet xmllite
  13339. # IE8 installer will check the version number of iexplore.exe which causes IE8 installer to fail on wine-1.9.0+
  13340. w_override_dlls native iexplore.exe
  13341. # Bundled updspapi cannot work on Wine
  13342. w_override_dlls builtin updspapi
  13343. # See https://bugs.winehq.org/show_bug.cgi?id=16013
  13344. # Find instructions to create this file in dlls/wintrust/tests/crypt.c
  13345. w_download https://github.com/Winetricks/winetricks/raw/master/files/winetest.cat 5d18ab44fc289100ccf4b51cf614cc2d36f7ca053e557e2ba973811293c97d38
  13346. # Put a dummy catalog file in place
  13347. w_try_mkdir "${W_SYSTEM32_DLLS}"/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295ee\}
  13348. w_try cp -f "${W_CACHE}"/ie8/winetest.cat "${W_SYSTEM32_DLLS}"/catroot/\{f750e6c3-38ee-11d1-85e5-00c04fc295ee\}/oem0.cat
  13349. if [ "${W_ARCH}" = "win32" ]; then
  13350. w_download https://download.microsoft.com/download/C/C/0/CC0BD555-33DD-411E-936B-73AC6F95AE11/IE8-WindowsXP-x86-ENU.exe 5a2c6c82774bfe99b175f50a05b05bcd1fac7e9d0e54db2534049209f50cd6ef
  13351. else
  13352. w_download https://download.microsoft.com/download/7/5/4/754D6601-662D-4E39-9788-6F90D8E5C097/IE8-WindowsServer2003-x64-ENU.exe bcff753e92ceabf31cfefaa6def146335c7cb27a50b95cd4f4658a0c3326f499
  13353. fi
  13354. # Remove the fake DLLs from the existing WINEPREFIX
  13355. if [ -f "${W_PROGRAMS_X86_UNIX}/Internet Explorer/iexplore.exe" ]; then
  13356. w_try mv "${W_PROGRAMS_X86_UNIX}/Internet Explorer/iexplore.exe" "${W_PROGRAMS_X86_UNIX}/Internet Explorer/iexplore.exe.bak"
  13357. fi
  13358. if [ "${W_ARCH}" = "win64" ]; then
  13359. if [ -f "${W_PROGRAMS_UNIX}/Internet Explorer/iexplore.exe" ]; then
  13360. w_try mv "${W_PROGRAMS_UNIX}/Internet Explorer/iexplore.exe" "${W_PROGRAMS_UNIX}/Internet Explorer/iexplore.exe.bak"
  13361. fi
  13362. fi
  13363. # Replace the fake DLLs by copies from the bundle
  13364. if [ "${W_ARCH}" = "win32" ]; then
  13365. for dll in browseui inseng itircl itss jscript mshtml shdoclc shdocvw shlwapi urlmon; do
  13366. test -f "${W_SYSTEM32_DLLS}"/${dll}.dll &&
  13367. w_try mv "${W_SYSTEM32_DLLS}"/${dll}.dll "${W_SYSTEM32_DLLS}"/${dll}.dll.bak &&
  13368. w_try_cabextract --directory="${W_SYSTEM32_DLLS}" "${W_CACHE}"/ie8/IE8-WindowsXP-x86-ENU.exe -F ${dll}.dll
  13369. done
  13370. else
  13371. for dll in browseui inseng jscript mshtml shdocvw shlwapi urlmon; do
  13372. test -f "${W_SYSTEM32_DLLS}"/${dll}.dll &&
  13373. w_try mv "${W_SYSTEM32_DLLS}"/${dll}.dll "${W_SYSTEM32_DLLS}"/${dll}.dll.bak &&
  13374. w_try_cabextract --directory="${W_CACHE}"/ie8 "${W_CACHE}"/ie8/IE8-WindowsServer2003-x64-ENU.exe -F wow/w${dll}.dll &&
  13375. w_try mv "${W_CACHE}"/ie8/wow/w${dll}.dll "${W_SYSTEM32_DLLS}"/${dll}.dll
  13376. test -f "${W_SYSTEM64_DLLS}"/${dll}.dll &&
  13377. w_try mv "${W_SYSTEM64_DLLS}"/${dll}.dll "${W_SYSTEM64_DLLS}"/${dll}.dll.bak
  13378. w_try_cabextract --directory="${W_SYSTEM64_DLLS}" "${W_CACHE}"/ie8/IE8-WindowsServer2003-x64-ENU.exe -F ${dll}.dll
  13379. done
  13380. fi
  13381. # KLUDGE: if / is writable (as on OS X?), having a Z: mapping to it
  13382. # causes ie7 to put temporary directories on Z:\.
  13383. # So hide it temporarily. This is not very robust!
  13384. if [ -w / ] && [ -h "${WINEPREFIX}/dosdevices/z:" ]; then
  13385. w_try rm -f "${WINEPREFIX}/dosdevices/z:.bak_wt"
  13386. w_try mv "${WINEPREFIX}/dosdevices/z:" "${WINEPREFIX}/dosdevices/z:.bak_wt"
  13387. _W_restore_z=1
  13388. fi
  13389. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13390. # FIXME: There's an option for /updates-noupdates to disable checking for updates, but that
  13391. # forces the install to fail on Wine. Not sure if it's an IE8 or Wine bug...
  13392. # FIXME: can't check status, as it always reports failure on wine?
  13393. if [ "${W_ARCH}" = "win32" ]; then
  13394. "${WINE}" IE8-WindowsXP-x86-ENU.exe ${W_OPT_UNATTENDED:+/quiet /forcerestart}
  13395. else
  13396. "${WINE}" IE8-WindowsServer2003-x64-ENU.exe ${W_OPT_UNATTENDED:+/quiet /forcerestart}
  13397. fi
  13398. if [ "${_W_restore_z}" = 1 ]; then
  13399. # END KLUDGE: restore Z:, assuming that the user didn't kill us
  13400. w_try mv "${WINEPREFIX}/dosdevices/z:.bak_wt" "${WINEPREFIX}/dosdevices/z:"
  13401. fi
  13402. # Work around DLL registration bug until ierunonce/RunOnce/wineboot is fixed
  13403. # FIXME: whittle down this list
  13404. for i in actxprxy.dll browseui.dll browsewm.dll cdfview.dll ddraw.dll \
  13405. dispex.dll dsound.dll iedkcs32.dll iepeers.dll iesetup.dll \
  13406. imgutil.dll inetcomm.dll isetup.dll jscript.dll laprxy.dll \
  13407. mlang.dll msctf.dll mshtml.dll mshtmled.dll msi.dll msimtf.dll msident.dll \
  13408. msoeacct.dll msrating.dll mstime.dll msxml3.dll occache.dll \
  13409. ole32.dll oleaut32.dll olepro32.dll pngfilt.dll quartz.dll \
  13410. rpcrt4.dll rsabase.dll rsaenh.dll scrobj.dll scrrun.dll \
  13411. shdocvw.dll shell32.dll urlmon.dll vbscript.dll webcheck.dll \
  13412. wshcon.dll wshext.dll asctrls.ocx hhctrl.ocx mscomct2.ocx \
  13413. plugin.ocx proctexe.ocx tdc.ocx uxtheme.dll webcheck.dll wshom.ocx; do
  13414. "${WINE}" regsvr32 /i ${i} > /dev/null 2>&1
  13415. if [ "${W_ARCH}" = "win64" ]; then
  13416. "${WINE64}" regsvr32 /i ${i} > /dev/null 2>&1
  13417. fi
  13418. done
  13419. if w_workaround_wine_bug 25648 "Setting TabProcGrowth=0 to avoid hang"; then
  13420. cat > "${W_TMP}"/set-tabprocgrowth.reg <<_EOF_
  13421. REGEDIT4
  13422. [HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\Main]
  13423. "TabProcGrowth"=dword:00000000
  13424. _EOF_
  13425. w_try_regedit "${W_TMP_WIN}"\\set-tabprocgrowth.reg
  13426. fi
  13427. # Builtin ieproxy is in system32, but ie8's lives in Program Files. Native
  13428. # CLSID path will get overwritten on prefix update. Setting ieproxy to
  13429. # native doesn't help because setupapi ignores DLL overrides. To work
  13430. # around this problem, copy native ieproxy to system32.
  13431. w_try_cp_dll "${W_PROGRAMS_X86_UNIX}/Internet Explorer/ieproxy.dll" "${W_SYSTEM32_DLLS}"
  13432. if [ "${W_ARCH}" = "win64" ]; then
  13433. w_try_cp_dll "${W_PROGRAMS_UNIX}/Internet Explorer/ieproxy.dll" "${W_SYSTEM64_DLLS}"
  13434. fi
  13435. if w_workaround_wine_bug 53103 "Running a no-op command so that ie8 finishes bootstrapping" 7.5; then
  13436. w_wineserver -w
  13437. w_try "${WINE}" xcopy /? > /dev/null
  13438. w_wineserver -w
  13439. fi
  13440. # Seeing is believing
  13441. if [ "${WINETRICKS_GUI}" != "none" ]; then
  13442. if [ "${W_ARCH}" = "win32" ]; then
  13443. w_warn "Starting ie8 ..."
  13444. else
  13445. w_warn "Starting ie8 (64-bit) ..."
  13446. fi
  13447. "${WINE}" "${W_PROGRAMS_WIN}\\Internet Explorer\\iexplore.exe" http://www.example.com > /dev/null 2>&1 &
  13448. fi
  13449. if [ "${W_ARCH}" = "win32" ]; then
  13450. w_warn "To start ie8, from a terminal shell, use the command \"${WINE}\" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore.exe'"
  13451. else
  13452. w_warn "To start ie8 (32-bit), from a terminal shell, use the command \"${WINE}\" '${W_PROGRAMS_X86_WIN}\\\\Internet Explorer\\\\iexplore.exe'\nTo start ie8 (64-bit), from a terminal shell, use the command \"${WINE}\" '${W_PROGRAMS_WIN}\\\\Internet Explorer\\\\iexplore.exe'"
  13453. fi
  13454. w_restore_winver
  13455. unset _W_restore_z
  13456. }
  13457. #----------------------------------------------------------------
  13458. w_metadata kindle apps \
  13459. title="Amazon Kindle" \
  13460. publisher="Amazon" \
  13461. year="2017" \
  13462. media="download" \
  13463. file1="KindleForPC-installer-1.16.44025.exe" \
  13464. installed_exe1="${W_PROGRAMS_WIN}/Amazon/Kindle/Kindle.exe" \
  13465. homepage="https://www.amazon.com/kindle-dbs/fd/kcp"
  13466. load_kindle()
  13467. {
  13468. if w_workaround_wine_bug 43508; then
  13469. w_warn "Using an older version of Kindle (1.16.44025) to work around https://bugs.winehq.org/show_bug.cgi?id=43508"
  13470. fi
  13471. # Originally at: https://s3.amazonaws.com/kindleforpc/44025/KindleForPC-installer-1.16.44025.exe
  13472. w_download https://web.archive.org/web/20160817182927/https://s3.amazonaws.com/kindleforpc/44025/KindleForPC-installer-1.16.44025.exe 2655fa8be7b8f4659276c46ef9f3fede847135bf6e5c1de136c9de7af6cac1e2
  13473. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13474. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+ /S}
  13475. if w_workaround_wine_bug 35041 && [ -n "${W_TASKSET}" ] ; then
  13476. w_warn "You may need to run with ${W_TASKSET} to avoid a libX11 crash."
  13477. fi
  13478. if w_workaround_wine_bug 29045; then
  13479. w_call corefonts
  13480. fi
  13481. w_warn "If kindle does not load for you, try increasing your open file limit"
  13482. }
  13483. #----------------------------------------------------------------
  13484. w_metadata kobo apps \
  13485. title="Kobo e-book reader" \
  13486. publisher="Kobo" \
  13487. year="2011" \
  13488. media="download" \
  13489. file1="KoboSetup.exe" \
  13490. installed_exe1="${W_PROGRAMS_X86_WIN}/Kobo/Kobo.exe" \
  13491. homepage="http://www.borders.com/online/store/MediaView_ereaderapps"
  13492. load_kobo()
  13493. {
  13494. w_download http://download.kobobooks.com/desktop/1/KoboSetup.exe 721e76c06820058422f06420400a0b1286662196d6178d70c4592fd8034704c4
  13495. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13496. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+ /S}
  13497. }
  13498. #----------------------------------------------------------------
  13499. w_metadata mingw apps \
  13500. title="Minimalist GNU for Windows, including GCC for Windows" \
  13501. publisher="GNU" \
  13502. year="2013" \
  13503. media="download" \
  13504. file1="mingw-get-setup.exe" \
  13505. installed_exe1="c:/MinGW/bin/gcc.exe" \
  13506. homepage="http://mingw.org/wiki/Getting_Started"
  13507. load_mingw()
  13508. {
  13509. w_download "https://downloads.sourceforge.net/mingw/files/mingw-get-setup.exe" aab27bd5547d35dc159288f3b5b8760f21b0cfec86e8f0032b49dd0410f232bc
  13510. if test "${W_OPT_UNATTENDED}"; then
  13511. w_info "FYI: Quiet mode will install these mingw packages: 'gcc msys-base'"
  13512. fi
  13513. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13514. w_ahk_do "
  13515. run, ${file1}
  13516. WinWait, MinGW Installation Manager Setup Tool
  13517. if ( w_opt_unattended > 0 ) {
  13518. WinActivate
  13519. Sleep, 1000
  13520. ControlClick, Button1 ; Install
  13521. ; Window title is blank
  13522. WinWait, , Step 1: Specify Installation Preferences
  13523. Sleep, 1000
  13524. ControlClick, Button10 ; Continue
  13525. Sleep, 1000
  13526. WinWait, , Step 2: Download and Set Up MinGW Installation Manager
  13527. ; This takes a while
  13528. WinWait, , Catalogue update completed
  13529. Sleep, 1000
  13530. ControlClick, Button4 ; Continue
  13531. ; This window appears in background, but isn't active because of another popup
  13532. ; We may need to wait for that to disappear first
  13533. WinWait, MinGW Installation Manager
  13534. Sleep, 1000
  13535. WinClose, MinGW Installation Manager
  13536. }
  13537. WinWaitClose, MinGW Installation Manager
  13538. "
  13539. w_append_path 'C:\MinGW\bin'
  13540. w_try "${WINE}" mingw-get update
  13541. w_try "${WINE}" mingw-get install gcc msys-base
  13542. }
  13543. #----------------------------------------------------------------
  13544. w_metadata mozillabuild apps \
  13545. title="Mozilla build environment" \
  13546. publisher="Mozilla Foundation" \
  13547. year="2015" \
  13548. media="download" \
  13549. file1="MozillaBuildSetup-2.0.0.exe" \
  13550. installed_file1="c:/mozilla-build/moztools/bin/nsinstall.exe" \
  13551. homepage="https://wiki.mozilla.org/MozillaBuild"
  13552. load_mozillabuild()
  13553. {
  13554. w_download https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-2.0.0.exe d5ffe52fe634fb7ed02e61041cc183c3af92039ee74e794f7ae83a408e4cf3f5
  13555. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13556. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/S}
  13557. }
  13558. #----------------------------------------------------------------
  13559. w_metadata mpc apps \
  13560. title="Media Player Classic - Home Cinema" \
  13561. publisher="doom9 folks" \
  13562. year="2014" \
  13563. media="download" \
  13564. file1="MPC-HC.1.7.5.x86.exe" \
  13565. installed_file1="${W_PROGRAMS_X86_WIN}/MPC-HC/mpc-hc.exe" \
  13566. homepage="https://mpc-hc.sourceforge.io/"
  13567. load_mpc()
  13568. {
  13569. w_download https://downloads.sourceforge.net/project/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC_v1.7.5_x86/MPC-HC.1.7.5.x86.exe 1d690da5b330f723aea4a294d478828395d321b59fc680f2b971e8b16b8bd33d
  13570. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13571. w_try "${WINE}" MPC-HC.1.7.5.x86.exe ${W_OPT_UNATTENDED:+ /VERYSILENT}
  13572. }
  13573. #----------------------------------------------------------------
  13574. w_metadata mspaint apps \
  13575. title="MS Paint" \
  13576. publisher="Microsoft" \
  13577. year="2010" \
  13578. media="download" \
  13579. file1="windowsxp-kb978706-x86-enu_f4e076b3867c2f08b6d258316aa0e11d6822b8d7.exe" \
  13580. installed_file1="${W_WINDIR_WIN}/mspaint.exe"
  13581. load_mspaint()
  13582. {
  13583. if w_workaround_wine_bug 657 "Native mspaint.exe from XP requires mfc42.dll"; then
  13584. w_call mfc42
  13585. fi
  13586. # Originally at: https://download.microsoft.com/download/0/A/4/0A40DF5C-2BAE-4C63-802A-84C33B34AC98/WindowsXP-KB978706-x86-ENU.exe
  13587. # Mirror list: http://www.filewatcher.com/_/?q=WindowsXP-KB978706-x86-ENU.exe
  13588. w_download http://download.windowsupdate.com/msdownload/update/software/secu/2010/01/windowsxp-kb978706-x86-enu_f4e076b3867c2f08b6d258316aa0e11d6822b8d7.exe 93ed34ab6c0d01a323ce10992d1c1ca27d1996fef82f0864d83e7f5ac6f9b24b
  13589. w_try "${WINE}" "${W_CACHE}/${W_PACKAGE}/${file1}" /q /x:"${W_TMP}/${file1}"
  13590. w_try cp -f "${W_TMP}/${file1}/SP3GDR/mspaint.exe" "${W_WINDIR_UNIX}"/mspaint.exe
  13591. }
  13592. #----------------------------------------------------------------
  13593. w_metadata mt4 apps \
  13594. title="Meta Trader 4" \
  13595. year="2005" \
  13596. media="download" \
  13597. file1="mt4setup.exe"
  13598. load_mt4()
  13599. {
  13600. w_download https://web.archive.org/web/20160112133258/https://download.mql5.com/cdn/web/metaquotes.software.corp/mt4/mt4setup.exe?utm_campaign=www.metatrader4.com 96c82266e18cc4ada1bbc0cd0ada74c3a31d18914fb1a36626f4596c8bacb6f0 mt4setup.exe
  13601. if w_workaround_wine_bug 7156 "${title} needs wingdings.ttf, installing opensymbol"; then
  13602. w_call opensymbol
  13603. fi
  13604. # Opens a webpage
  13605. WINEDLLOVERRIDES="winebrowser.exe="
  13606. export WINEDLLOVERRIDES
  13607. # No documented silent install option, unfortunately.
  13608. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13609. w_ahk_do "
  13610. Run, ${file1}
  13611. SetTitleMatchMode, RegEx
  13612. WinWaitActive, 4 Setup
  13613. Sleep, 200
  13614. ControlClick, Button1
  13615. Sleep, 200
  13616. ControlClick, Button3
  13617. WinWaitClose ; Wait for installer to finish
  13618. Process, Wait, Terminal.exe
  13619. WinWaitActive, ahk_class #32770
  13620. Process, Close, Terminal.exe
  13621. "
  13622. }
  13623. #----------------------------------------------------------------
  13624. w_metadata njcwp_trial apps \
  13625. title="NJStar Chinese Word Processor trial" \
  13626. publisher="NJStar" \
  13627. year="2015" \
  13628. media="download" \
  13629. file1="njcwp610sw15918.exe" \
  13630. installed_exe1="${W_PROGRAMS_X86_WIN}/NJStar Chinese WP6/NJStar.exe" \
  13631. homepage="https://www.njstar.com/cms/njstar-chinese-word-processor"
  13632. load_njcwp_trial()
  13633. {
  13634. w_download http://ftp.njstar.com/sw/njcwp610sw15918.exe 7afa6dfc431f058d1397ac7100d5650b97347e1f37f81a2e2d2ee5dfdff4660b
  13635. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13636. if test "${W_OPT_UNATTENDED}"; then
  13637. w_ahk_do "
  13638. SetTitleMatchMode, 2
  13639. run ${file1}
  13640. WinWait, Setup, Welcome
  13641. ControlClick Button2 ; next
  13642. WinWait, Setup, License
  13643. ControlClick Button2 ; agree
  13644. WinWait, Setup, Install
  13645. ControlClick Button2 ; install
  13646. WinWait, Setup, Completing
  13647. ControlClick Button4 ; do not launch
  13648. ControlClick Button2 ; finish
  13649. WinWaitClose
  13650. "
  13651. else
  13652. w_try "${WINE}" "${file1}"
  13653. fi
  13654. }
  13655. #----------------------------------------------------------------
  13656. w_metadata njjwp_trial apps \
  13657. title="NJStar Japanese Word Processor trial" \
  13658. publisher="NJStar" \
  13659. year="2009" \
  13660. media="download" \
  13661. file1="njjwp610sw15918.exe" \
  13662. installed_exe1="${W_PROGRAMS_X86_WIN}/NJStar Japanese WP6/NJStarJ.exe" \
  13663. homepage="https://www.njstar.com/cms/njstar-japanese-word-processor"
  13664. load_njjwp_trial()
  13665. {
  13666. w_download http://ftp.njstar.com/sw/njjwp610sw15918.exe 7f36138c3d19539cb73d757cd42a6f7afebdaf9cfed0cf9bc483c33e519e2a26
  13667. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13668. if test "${W_OPT_UNATTENDED}"; then
  13669. w_ahk_do "
  13670. SetTitleMatchMode, 2
  13671. run ${file1}
  13672. WinWait, Setup, Welcome
  13673. ControlClick Button2 ; next
  13674. WinWait, Setup, License
  13675. ControlClick Button2 ; agree
  13676. WinWait, Setup, Install
  13677. ControlClick Button2 ; install
  13678. WinWait, Setup, Completing
  13679. ControlClick Button4 ; do not launch
  13680. ControlClick Button2 ; finish
  13681. WinWaitClose
  13682. "
  13683. else
  13684. w_try "${WINE}" "${file1}"
  13685. fi
  13686. }
  13687. #----------------------------------------------------------------
  13688. w_metadata nook apps \
  13689. title="Nook for PC (e-book reader)" \
  13690. publisher="Barnes & Noble" \
  13691. year="2011" \
  13692. media="download" \
  13693. file1="bndr2_setup_latest.exe" \
  13694. installed_exe1="${W_PROGRAMS_X86_WIN}/Barnes & Noble/BNDesktopReader/BNDReader.exe" \
  13695. homepage="https://www.barnesandnoble.com/h/nook/apps"
  13696. load_nook()
  13697. {
  13698. # Dates from curl --head
  13699. # 2012/03/07: sha256sum 436616d99f0e2351909ab53d910b505c7a3fca248876ebb835fd7bce4aad9720
  13700. w_download http://images.barnesandnoble.com/PResources/download/eReader2/bndr2_setup_latest.exe 436616d99f0e2351909ab53d910b505c7a3fca248876ebb835fd7bce4aad9720
  13701. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13702. # Exits with 199 for some reason..
  13703. "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+ /S}
  13704. status=$?
  13705. case ${status} in
  13706. 0|199) echo "Successfully installed ${W_PACKAGE}" ;;
  13707. *) w_die "Failed to install ${W_PACKAGE}" ;;
  13708. esac
  13709. }
  13710. #----------------------------------------------------------------
  13711. w_metadata npp apps \
  13712. title="Notepad++" \
  13713. publisher="Don Ho" \
  13714. year="2019" \
  13715. media="download" \
  13716. file1="npp.7.7.1.Installer.exe" \
  13717. installed_exe1="${W_PROGRAMS_X86_WIN}/Notepad++/notepad++.exe"
  13718. load_npp()
  13719. {
  13720. w_download https://notepad-plus-plus.org/repository/7.x/7.7.1/npp.7.7.1.Installer.exe 6787c524b0ac30a698237ffb035f932d7132343671b8fe8f0388ed380d19a51c
  13721. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13722. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/S}
  13723. }
  13724. #----------------------------------------------------------------
  13725. w_metadata office2003pro apps \
  13726. title="Microsoft Office 2003 Professional" \
  13727. publisher="Microsoft" \
  13728. year="2002" \
  13729. media="cd" \
  13730. file1="setup.exe" \
  13731. installed_exe1="${W_PROGRAMS_X86_WIN}/Microsoft Office/Office11/WINWORD.EXE"
  13732. load_office2003pro()
  13733. {
  13734. w_mount OFFICE11
  13735. w_read_key
  13736. w_ahk_do "
  13737. if ( w_opt_unattended > 0 ) {
  13738. run ${W_ISO_MOUNT_LETTER}:setup.exe /EULA_ACCEPT=YES /PIDKEY=${W_KEY}
  13739. } else {
  13740. run ${W_ISO_MOUNT_LETTER}:setup.exe
  13741. }
  13742. SetTitleMatchMode, 2
  13743. WinWait,Microsoft Office 2003 Setup, Welcome
  13744. if ( w_opt_unattended > 0 ) {
  13745. Sleep 500
  13746. WinWait,Microsoft Office 2003 Setup,Key
  13747. Sleep 500
  13748. ControlClick Button1 ; Next
  13749. WinWait,Microsoft Office 2003 Setup,Initials
  13750. Sleep 500
  13751. ControlClick Button1 ; Next
  13752. WinWait,Microsoft Office 2003 Setup,End-User
  13753. Sleep 500
  13754. ControlClick Button1 ; I accept
  13755. ControlClick Button2 ; Next
  13756. WinWait,Microsoft Office 2003 Setup,Recommended
  13757. Sleep 500
  13758. ControlClick Button7 ; Next
  13759. WinWait,Microsoft Office 2003 Setup,Summary
  13760. Sleep 500
  13761. ControlClick Button1 ; Install
  13762. }
  13763. WinWait,Microsoft Office 2003 Setup,Completed
  13764. if ( w_opt_unattended > 0 ) {
  13765. Sleep 500
  13766. ControlClick Button2 ; Finish
  13767. }
  13768. WinWaitClose
  13769. "
  13770. }
  13771. #----------------------------------------------------------------
  13772. w_metadata office2007pro apps \
  13773. title="Microsoft Office 2007 Professional" \
  13774. publisher="Microsoft" \
  13775. year="2006" \
  13776. media="cd" \
  13777. file1="setup.exe" \
  13778. installed_file1="${W_PROGRAMS_X86_WIN}/Microsoft Office/Office12/WINWORD.EXE"
  13779. load_office2007pro()
  13780. {
  13781. if w_workaround_wine_bug 14980 "Using native riched20"; then
  13782. w_override_app_dlls winword.exe n riched20
  13783. w_override_app_dlls excel.exe n riched20
  13784. w_override_app_dlls powerpnt.exe n riched20
  13785. w_override_app_dlls msaccess.exe n riched20
  13786. w_override_app_dlls outlook.exe n riched20
  13787. w_override_app_dlls mspub.exe n riched20
  13788. w_override_app_dlls infopath.exe n riched20
  13789. fi
  13790. w_mount OFFICE12
  13791. w_read_key
  13792. if [ -n "${W_OPT_UNATTENDED}" ]; then
  13793. # See
  13794. # https://blogs.technet.microsoft.com/office_resource_kit/2009/01/29/configure-a-silent-install-of-the-2007-office-system-with-config-xml/
  13795. # https://www.symantec.com/connect/articles/office-2007-silent-installation-lessons-learned
  13796. cat > "${W_TMP}"/config.xml <<__EOF__
  13797. <Configuration Product="ProPlus">
  13798. <Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
  13799. <PIDKEY Value="${W_KEY}" />
  13800. </Configuration>
  13801. __EOF__
  13802. "${WINE}" "${W_ISO_MOUNT_LETTER}":setup.exe /config "${W_TMP_WIN}"\\config.xml
  13803. status=$?
  13804. case ${status} in
  13805. 0|43) ;;
  13806. 78)
  13807. w_die "Installing ${W_PACKAGE} failed, product key ${W_KEY} \
  13808. might be wrong. Try again without -q, or put correct key in \
  13809. ${W_CACHE}/${W_PACKAGE}/key.txt and rerun."
  13810. ;;
  13811. *)
  13812. w_die "Installing ${W_PACKAGE} failed."
  13813. ;;
  13814. esac
  13815. else
  13816. w_try "${WINE}" "${W_ISO_MOUNT_LETTER}":setup.exe
  13817. fi
  13818. }
  13819. #----------------------------------------------------------------
  13820. w_metadata office2013pro apps \
  13821. title="Microsoft Office 2013 Professional" \
  13822. publisher="Microsoft" \
  13823. year="2013" \
  13824. media="download" \
  13825. file1="setup.exe" \
  13826. installed_file1="${W_PROGRAMS_X86_WIN}/Microsoft Office/Office15/WINWORD.EXE"
  13827. load_office2013pro()
  13828. {
  13829. w_package_unsupported_win64
  13830. if [ ! -x "$(command -v ntlm_auth 2>/dev/null)" ]; then
  13831. w_die "winbind (part of samba) is required for the installation"
  13832. fi
  13833. # link from https://www.askvg.com/direct-download-link-microsoft-office-2013-professional-plus-free-trial/
  13834. w_download https://web.archive.org/web/20130324022555/http://care.dlservice.microsoft.com/dl/download/2/9/C/29CC45EF-4CDA-4710-9FB3-1489786570A1/OfficeProfessionalPlus_x86_en-us.img 236f8faae3f979ec72592a63784bba2f0d614916350c44631221b88ae9dae206 "OFFICE15.iso"
  13835. w_set_winver win7
  13836. w_call corefonts
  13837. w_call tahoma
  13838. w_call riched20
  13839. if w_workaround_wine_bug 43581 "Wine has problems parsing some regex strings during installation"; then
  13840. w_call msxml6
  13841. fi
  13842. case "${WINETRICKS_ISO_MOUNT}" in
  13843. # archivemount > 0.8.8: works
  13844. # archivemount <= 0.8.8: cannot finish installation due to path issue
  13845. archivemount)
  13846. _W_last_bad_ver=0.8.8
  13847. _W_tool_ver="$(archivemount --version 2>&1 | head -n 1 | cut -d ' ' -f3)"
  13848. _W_pos_am_ver="$(printf "%s\\n%s" "${_W_tool_ver}" "${_W_last_bad_ver}" | sort -t. -k 1,1n -k 2,2n -k 3,3n | grep -n "^${_W_tool_ver}\$" | cut -d : -f1 | head -n 1)"
  13849. if test "${_W_pos_am_ver}" = "2"; then
  13850. W_USE_USERMOUNT=1
  13851. else
  13852. w_warn "archivemount <= ${_W_last_bad_ver} has path issue and cannot be used."
  13853. fi
  13854. unset _W_last_bad_ver _W_tool_ver _W_pos_am_ver
  13855. ;;
  13856. # fuseiso: works
  13857. # hdiutil: partially tested (only mounting/unmounting and copying files)
  13858. *) W_USE_USERMOUNT=1 ;;
  13859. esac
  13860. w_mount OFFICE15
  13861. if [ -n "${W_OPT_UNATTENDED}" ]; then
  13862. cat > "${W_TMP}"/config.xml <<_EOF_
  13863. <Configuration Product="ProPlus">
  13864. <Display Level="none" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
  13865. </Configuration>
  13866. _EOF_
  13867. w_try "${WINE}" "${W_ISO_MOUNT_LETTER}:${file1}" /config "${W_TMP_WIN}"\\config.xml
  13868. else
  13869. w_try "${WINE}" "${W_ISO_MOUNT_LETTER}:${file1}"
  13870. fi
  13871. w_wineserver -w
  13872. w_umount
  13873. w_warn "Microsoft Office 2013 is far away from running stable under wine 3.3. It should not be used in a productive environment."
  13874. }
  13875. #----------------------------------------------------------------
  13876. w_metadata ollydbg110 apps \
  13877. title="OllyDbg" \
  13878. publisher="ollydbg.de" \
  13879. year="2004" \
  13880. media="download" \
  13881. file1="odbg110.zip" \
  13882. installed_file1="c:/ollydbg110/OLLYDBG.EXE" \
  13883. homepage="http://ollydbg.de"
  13884. load_ollydbg110()
  13885. {
  13886. # The GUI is unreadable without having corefonts installed.
  13887. w_call corefonts
  13888. w_download http://www.ollydbg.de/odbg110.zip 73b1770f28893dab22196eb58d45ede8ddf5444009960ccc0107d09881a7cd1e
  13889. w_try_unzip "${W_DRIVE_C}/ollydbg110" "${W_CACHE}/${W_PACKAGE}"/odbg110.zip
  13890. }
  13891. #----------------------------------------------------------------
  13892. w_metadata ollydbg200 apps \
  13893. title="OllyDbg" \
  13894. publisher="ollydbg.de" \
  13895. year="2010" \
  13896. media="download" \
  13897. file1="odbg200.zip" \
  13898. installed_file1="c:/ollydbg200/ollydbg.exe" \
  13899. homepage="http://ollydbg.de"
  13900. load_ollydbg200()
  13901. {
  13902. # The GUI is unreadable without having corefonts installed.
  13903. w_call corefonts
  13904. w_download http://www.ollydbg.de/odbg200.zip 93dfd6348323db33f2005fc1fb8ff795256ae91d464dd186adc29c4314ed647c
  13905. w_try_unzip "${W_DRIVE_C}/ollydbg200" "${W_CACHE}/${W_PACKAGE}"/odbg200.zip
  13906. }
  13907. #----------------------------------------------------------------
  13908. w_metadata ollydbg201 apps \
  13909. title="OllyDbg" \
  13910. publisher="ollydbg.de" \
  13911. year="2013" \
  13912. media="download" \
  13913. file1="odbg201.zip" \
  13914. installed_file1="c:/ollydbg201/ollydbg.exe" \
  13915. homepage="http://ollydbg.de"
  13916. load_ollydbg201()
  13917. {
  13918. # The GUI is unreadable without having corefonts installed.
  13919. w_call corefonts
  13920. w_download http://www.ollydbg.de/odbg201.zip 29244e551be31f347db00503c512058086f55b43c93c1ae93729b15ce6e087a5
  13921. w_try_unzip "${W_DRIVE_C}/ollydbg201" "${W_CACHE}/${W_PACKAGE}"/odbg201.zip
  13922. # ollydbg201 is affected by Wine bug 36012 if debug symbols are available.
  13923. # As a workaround native 'dbghelp' can be installed. We don't do this automatically
  13924. # because for some people it might work even without additional workarounds.
  13925. # Older versions of OllyDbg were not affected by this bug.
  13926. }
  13927. #----------------------------------------------------------------
  13928. w_metadata openwatcom apps \
  13929. title="Open Watcom C/C++ compiler (can compile win16 code!)" \
  13930. publisher="Watcom" \
  13931. year="2010" \
  13932. media="download" \
  13933. file1="open-watcom-c-win32-1.9.exe" \
  13934. installed_file1="c:/WATCOM/owsetenv.bat" \
  13935. homepage="http://www.openwatcom.org"
  13936. load_openwatcom()
  13937. {
  13938. # 2016/03/11: upstream http://www.openwatcom.org appears to be dead (404)
  13939. # 2019/06/14: now at https://sourceforge.net/projects/openwatcom/files/open-watcom-1.9/open-watcom-c-win32-1.9.exe/download
  13940. w_download https://sourceforge.net/projects/openwatcom/files/open-watcom-1.9/open-watcom-c-win32-1.9.exe 040c910aba304fdb5f39b8fe508cd3c772b1da1f91a58179fa0895e0b2bf190b
  13941. if [ -n "${W_OPT_UNATTENDED}" ]; then
  13942. # Options documented at http://bugzilla.openwatcom.org/show_bug.cgi?id=898
  13943. # But they don't seem to work on Wine, so jam them into setup.inf
  13944. # Pick smallest installation that supports 16-bit C and C++
  13945. w_try_cd "${W_TMP}"
  13946. cp "${W_CACHE}/${W_PACKAGE}/${file1}" .
  13947. w_try_unzip . "${file1}" setup.inf
  13948. sed -i 's/tools16=.*/tools16=true/' setup.inf
  13949. w_try zip -f "${file1}"
  13950. w_try "${WINE}" "${file1}" -s
  13951. else
  13952. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13953. w_try "${WINE}" "${file1}"
  13954. fi
  13955. if test ! -f "${W_DRIVE_C}"/WATCOM/binnt/wcc.exe; then
  13956. w_warn "c:/watcom/binnt/wcc.exe not found; you probably didn't select 16-bit tools, and won't be able to build win16test."
  13957. fi
  13958. }
  13959. #----------------------------------------------------------------
  13960. w_metadata origin apps \
  13961. title="EA Origin" \
  13962. publisher="EA" \
  13963. year="2011" \
  13964. media="download" \
  13965. file1="OriginSetup.exe" \
  13966. file2="version_v2.dll" \
  13967. installed_file1="${W_PROGRAMS_X86_WIN}/Origin/Origin.exe" \
  13968. homepage="https://www.origin.com/"
  13969. load_origin()
  13970. {
  13971. w_download_to origin https://taskinoz.com/downloads/OriginSetup-10.5.119.52718.exe ed6ee5174f697744ac7c5783ff9021da603bbac42ae9836cd468d432cadc9779 OriginSetup.exe
  13972. w_download_to origin https://github.com/p0358/Fuck_off_EA_App/releases/download/v2/version.dll 5f0bbb15f7cff8540642c28739db0cd6b15e77e5935f4e6701351eea86d929ab version_v2.dll
  13973. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  13974. w_try "${WINE}" "${file1}" /NoLaunch ${W_OPT_UNATTENDED:+/SILENT}
  13975. if w_workaround_wine_bug 32342 "QtWebEngineProcess.exe crashes when updating or launching Origin (missing fonts)"; then
  13976. w_call corefonts
  13977. fi
  13978. if w_workaround_wine_bug 36863 "Disabling Origin In-game overlay."; then
  13979. w_override_dlls disabled igoproxy.exe
  13980. w_override_dlls disabled igoproxy64.exe
  13981. fi
  13982. if w_workaround_wine_bug 44985 "Disabling libglesv2 to make Store and Library function correctly."; then
  13983. w_override_app_dlls Origin.exe disabled libglesv2
  13984. fi
  13985. # Avoids "An unexpected error has occurred. Please try again in a few moments. Error: 327684:3"
  13986. # Games won't register correctly unless disabled
  13987. if w_workaround_wine_bug 52781 "Origin does not notice games exiting, does not allow them to be relaunched."; then
  13988. w_override_app_dlls Origin.exe disabled gameux
  13989. fi
  13990. if [ "$(uname -s)" = "Darwin" ]; then
  13991. w_override_app_dlls EALink.exe disabled d3d10
  13992. w_override_app_dlls EALink.exe disabled d3d10core
  13993. w_override_app_dlls EALink.exe disabled d3d12
  13994. w_override_app_dlls EALink.exe disabled d3d11
  13995. w_override_app_dlls EALink.exe disabled dxgi
  13996. w_override_app_dlls Origin.exe disabled dxgi
  13997. fi
  13998. w_warn "Workaround Forced EA app upgrade."
  13999. w_try cp -f "${W_CACHE}/${W_PACKAGE}/version_v2.dll" "${W_PROGRAMS_X86_UNIX}/Origin/version.dll"
  14000. w_override_app_dlls Origin.exe native version
  14001. w_warn "Pretend EA app is installed"
  14002. cat > "${W_TMP}"/ea-app.reg <<_EOF_
  14003. REGEDIT4
  14004. [HKEY_LOCAL_MACHINE\\Software\\Electronic Arts\\EA Desktop]
  14005. "InstallSuccessful"="true"
  14006. _EOF_
  14007. w_try_regedit "${W_TMP}"/ea-app.reg
  14008. }
  14009. #----------------------------------------------------------------
  14010. w_metadata protectionid apps \
  14011. title="Protection ID" \
  14012. publisher="CDKiLLER & TippeX" \
  14013. year="2016" \
  14014. media="manual_download" \
  14015. file1="ProtectionId.685.December.2016.rar" \
  14016. installed_file1="${W_SYSTEM32_DLLS_WIN}/protection_id.exe"
  14017. load_protectionid()
  14018. {
  14019. w_download "https://web.archive.org/web/20181209123344/https://pid.wiretarget.com/?f=ProtectionId.685.December.2016.rar" 27a84d740c9fb96cc866438a2b5cd4afc350affc8b7a0122c28c651af3559aea ProtectionId.685.December.2016.rar
  14020. w_try_cd "${W_SYSTEM32_DLLS}"
  14021. w_try_unrar "${W_CACHE}/${W_PACKAGE}/${file1}"
  14022. # ProtectionId.685.December.2016 has a different executable name than usual, this may need to be disabled on next update:
  14023. w_try mv Protection_ID.eXe protection_id_.exe
  14024. w_try mv protection_id_.exe protection_id.exe
  14025. }
  14026. #----------------------------------------------------------------
  14027. w_metadata psdk2003 apps \
  14028. title="MS Platform SDK 2003" \
  14029. publisher="Microsoft" \
  14030. year="2003" \
  14031. media="download" \
  14032. file1="5.2.3790.1830.15.PlatformSDK_Svr2003SP1_rtm.img" \
  14033. installed_file1="${W_PROGRAMS_X86_WIN}/Microsoft Platform SDK/SetEnv.Cmd"
  14034. load_psdk2003()
  14035. {
  14036. w_package_unsupported_win64
  14037. w_call mfc42
  14038. # https://www.microsoft.com/en-us/download/details.aspx?id=15656
  14039. w_download https://download.microsoft.com/download/7/5/e/75ec7f04-4c8c-4f38-b582-966e76602643/5.2.3790.1830.15.PlatformSDK_Svr2003SP1_rtm.img 7ef138b07a8ed2e008371d8602900eb68e86ac2a832d16b53f462a9e64f24d53
  14040. # Unpack ISO (how handy that 7z can do this!)
  14041. # Only the Windows version of 7z can handle .img files?
  14042. WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip
  14043. w_try_cd "${W_PROGRAMS_X86_UNIX}"/7-Zip
  14044. w_try "${WINE}" 7z.exe x -y -o"${W_TMP_WIN}" "${W_CACHE_WIN}\\psdk2003\\5.2.3790.1830.15.PlatformSDK_Svr2003SP1_rtm.img"
  14045. w_try_cd "${W_TMP}/Setup"
  14046. # Sanity check...
  14047. w_verify_sha256sum d2605ae6f35a7fcc209e1d8dfbdfdb42afcb61e7d173f58fd608ae31db4ab1e7 PSDK-x86.msi
  14048. w_try "${WINE}" msiexec /i PSDK-x86.msi ${W_OPT_UNATTENDED:+/qb}
  14049. }
  14050. #----------------------------------------------------------------
  14051. w_metadata psdkwin71 apps \
  14052. title="MS Windows 7.1 SDK" \
  14053. publisher="Microsoft" \
  14054. year="2010" \
  14055. media="download" \
  14056. file1="winsdk_web.exe" \
  14057. installed_exe1="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin/SetEnv.Cmd"
  14058. load_psdkwin71()
  14059. {
  14060. w_call dotnet20
  14061. w_call dotnet40
  14062. w_call mfc42 # need mfc42u, or setup will abort
  14063. # https://www.microsoft.com/en-us/download/details.aspx?id=3138
  14064. w_download https://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/winsdk_web.exe 9ea8d82a66a33946e8673df92d784971b35b8f65ade3e0325855be8490e3d51d
  14065. # don't have a working unattended recipe. Maybe we'll have to
  14066. # do an AutoHotKey script until Microsoft gets its act together:
  14067. # https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/c053b616-7d5b-405d-9841-ec465a8e21d5/
  14068. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14069. w_try "${WINE}" winsdk_web.exe
  14070. if w_workaround_wine_bug 21362; then
  14071. # Assume user installed in default location
  14072. cat > "${W_TMP}"/set-psdk71.reg <<_EOF_
  14073. REGEDIT4
  14074. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Microsoft SDKs]
  14075. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Microsoft SDKs\\Windows]
  14076. "CurrentVersion"="v7.1"
  14077. "CurrentInstallFolder"="C:\\\\Program Files\\\\Microsoft SDKs\\\\Windows\\\\v7.1\\\\"
  14078. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Microsoft SDKs\\Windows\\v7.1]
  14079. "InstallationFolder"="C:\\\\Program Files\\\\Microsoft SDKs\\\\Windows\\\\v7.1\\\\"
  14080. "ProductVersion"="7.0.7600.0.30514"
  14081. "ProductName"="Microsoft Windows SDK for Windows 7 (7.0.7600.0.30514)"
  14082. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Microsoft SDKs\\Windows\\v7.1\\WinSDKBuild]
  14083. "ComponentName"="Microsoft Windows SDK Headers and Libraries"
  14084. "InstallationFolder"="C:\\\\Program Files\\\\Microsoft SDKs\\\\Windows\\\\v7.1\\\\"
  14085. "ProductVersion"="7.0.7600.0.30514"
  14086. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Microsoft SDKs\\Windows\\v7.1\\WinSDKTools]
  14087. "ComponentName"="Microsoft Windows SDK Headers and Libraries"
  14088. "InstallationFolder"="C:\\\\Program Files\\\\Microsoft SDKs\\\\Windows\\\\v7.1\\\\bin\\\\"
  14089. "ProductVersion"="7.0.7600.0.30514"
  14090. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Microsoft SDKs\\Windows\\v7.1\\WinSDKWin32Tools]
  14091. "ComponentName"="Microsoft Windows SDK Utilities for Win32 Development"
  14092. "InstallationFolder"="C:\\\\Program Files\\\\Microsoft SDKs\\\\Windows\\\\v7.1\\\\bin\\\\"
  14093. "ProductVersion"="7.0.7600.0.30514"
  14094. _EOF_
  14095. w_try_regedit "${W_TMP_WIN}"\\set-psdk71.reg
  14096. fi
  14097. }
  14098. #----------------------------------------------------------------
  14099. w_metadata qq apps \
  14100. title="QQ 8.9.6(Chinese chat app)" \
  14101. publisher="Tencent" \
  14102. year="2017" \
  14103. media="download" \
  14104. file1="QQ8.9.6.exe" \
  14105. file2="QQ.tar.gz"\
  14106. installed_exe1="${W_PROGRAMS_X86_WIN}/Tencent/QQ/Bin/QQScLauncher.exe" \
  14107. homepage="https://www.qq.com/" \
  14108. unattended="no"
  14109. load_qq()
  14110. {
  14111. w_download https://dldir1.qq.com/qqfile/qq/QQ8.9.6/22404/QQ8.9.6.exe d207f49a642be21c4e1b14fc9f4cf47a6a9a2718afbc8bd0685b607b65424ef6
  14112. w_download https://hillwoodhome.net/wine/QQ.tar.gz eb5cd6371eb75ec9e2fc0271199df05cbb9f38a60c2e81d5d8ac7daeb40aba62
  14113. if w_workaround_wine_bug 5162 "Installing native riched20 to work around can't input username."; then
  14114. w_call riched20
  14115. fi
  14116. # Make sure chinese fonts are available
  14117. w_call fakechinese
  14118. # uses mfc42u.dll
  14119. w_call mfc42
  14120. if w_workaround_wine_bug 38171 "Installing desktop file to work around bug"; then
  14121. w_try_cd "${W_TMP}/"
  14122. tar -zxf "${W_CACHE}/qq/QQ.tar.gz"
  14123. w_try_mkdir "${HOME}/.local/share/applications/wine/Programs/腾讯软件/QQ"
  14124. w_try_mkdir "${HOME}/.local/share/icons/hicolor/48x48/apps"
  14125. w_try_mkdir "${HOME}/.local/share/icons/hicolor/256x256/apps"
  14126. w_try mv QQ/腾讯QQ.desktop ~/.local/share/applications/wine/Programs/腾讯软件/QQ
  14127. w_try mv QQ/48x48/QQ.png ~/.local/share/icons/hicolor/48x48/apps
  14128. w_try mv QQ/256x256/QQ.png ~/.local/share/icons/hicolor/256x256/apps
  14129. # shellcheck disable=SC1001
  14130. echo Exec=env WINEPREFIX="${WINEPREFIX}" "${WINE}" \""${W_PROGRAMS_X86_WIN}"/Tencent/QQ/bin/QQScLauncher.exe\" >> "${HOME}/.local/share/applications/wine/Programs/腾讯软件/QQ/腾讯QQ.desktop"
  14131. fi
  14132. if w_workaround_wine_bug 37680 "Disable txplatform.exe to work around QQ can't be quit cleanly"; then
  14133. w_override_dlls disabled txplatform.exe
  14134. fi
  14135. # Disable update, stay on the version.
  14136. w_override_dlls disabled txupd.exe
  14137. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14138. w_try "${WINE}" "${file1}"
  14139. }
  14140. #----------------------------------------------------------------
  14141. w_metadata qqintl apps \
  14142. title="QQ International Instant Messenger 2.11" \
  14143. publisher="Tencent" \
  14144. year="2014" \
  14145. media="download" \
  14146. file1="QQIntl2.11.exe" \
  14147. installed_exe1="${W_PROGRAMS_X86_WIN}/Tencent/QQIntl/Bin/QQ.exe" \
  14148. homepage="https://www.imqq.com/" \
  14149. unattended="no"
  14150. load_qqintl()
  14151. {
  14152. w_download https://dldir1.qq.com/qqfile/QQIntl/QQi_PC/QQIntl2.11.exe a08e5d8432ad41745cfe92479a9a0c3328a546c27f05486392ca7b77b1cb02a8
  14153. if w_workaround_wine_bug 33086 "Installing native riched20 to allow typing in username"; then
  14154. w_call riched20
  14155. fi
  14156. if w_workaround_wine_bug 37617 "Installing native wininet to work around crash"; then
  14157. w_call wininet
  14158. fi
  14159. if w_workaround_wine_bug 37680 "Disable txplatform.exe to work around QQ can't be quit cleanly"; then
  14160. w_override_dlls disabled txplatform.exe
  14161. fi
  14162. # Make sure chinese fonts are available
  14163. w_call fakechinese
  14164. # wants mfc80u.dll
  14165. w_call vcrun2005
  14166. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14167. w_try "${WINE}" "${file1}"
  14168. }
  14169. #----------------------------------------------------------------
  14170. w_metadata safari apps \
  14171. title="Safari" \
  14172. publisher="Apple" \
  14173. year="2010" \
  14174. media="download" \
  14175. file1="SafariSetup.exe" \
  14176. installed_exe1="${W_PROGRAMS_X86_WIN}/Safari/Safari.exe"
  14177. load_safari()
  14178. {
  14179. w_download http://appldnld.apple.com.edgesuite.net/content.info.apple.com/Safari5/061-7138.20100607.Y7U87/SafariSetup.exe a5b44032fe9cd0ede8571023912c91b1dcca106ad6a65a822be9ebd405510939
  14180. if [ -n "${W_OPT_UNATTENDED}" ]; then
  14181. w_warn "Safari's silent install is broken under Wine. See https://bugs.winehq.org/show_bug.cgi?id=23493. You should do a regular install if you want to use Safari."
  14182. fi
  14183. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14184. w_try "${WINE_MULTI}" SafariSetup.exe ${W_OPT_UNATTENDED:+/qn}
  14185. }
  14186. #----------------------------------------------------------------
  14187. w_metadata sketchup apps \
  14188. title="SketchUp 8" \
  14189. publisher="Google" \
  14190. year="2012" \
  14191. media="download" \
  14192. file1="GoogleSketchUpWEN.exe" \
  14193. installed_exe1="${W_PROGRAMS_X86_WIN}/Google/Google SketchUp 8/SketchUp.exe"
  14194. load_sketchup()
  14195. {
  14196. w_download https://dl.google.com/sketchup/GoogleSketchUpWEN.exe e50c1b36131d72437eb32a124a5208fad22dc22b843683cfb520e1ef172b8352
  14197. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14198. w_ahk_do "
  14199. SetTitleMatchMode, 2
  14200. run GoogleSketchUpWEN.exe
  14201. WinWait, SketchUp, Welcome
  14202. if ( w_opt_unattended > 0 ) {
  14203. Sleep 4000
  14204. Send {Enter}
  14205. WinWait, SketchUp, License
  14206. Sleep 1000
  14207. ControlClick Button1 ; accept
  14208. Sleep 1000
  14209. ControlClick Button4 ; Next
  14210. WinWait, SketchUp, Destination
  14211. Sleep 1000
  14212. ControlClick Button1 ; Next
  14213. WinWait, SketchUp, Ready
  14214. Sleep 1000
  14215. ControlClick Button1 ; Install
  14216. }
  14217. WinWait, SketchUp, Completed
  14218. if ( w_opt_unattended > 0 ) {
  14219. Sleep 1000
  14220. ControlClick Button1 ; Finish
  14221. }
  14222. WinWaitClose
  14223. "
  14224. }
  14225. #----------------------------------------------------------------
  14226. w_metadata steam apps \
  14227. title="Steam" \
  14228. publisher="Valve" \
  14229. year="2010" \
  14230. media="download" \
  14231. file1="SteamInstall.msi" \
  14232. installed_exe1="${W_PROGRAMS_X86_WIN}/Steam/Steam.exe"
  14233. load_steam()
  14234. {
  14235. # 2016/10/28: 029f918a29b2b311711788e8a477c8de529c11d7dba3caf99cbbde5a983efdad
  14236. # 2018/06/01: 3bc6942fe09f10ed3447bccdcf4a70ed369366fef6b2c7f43b541f1a3c5d1c51
  14237. # 2021/03/27: 874788b45dfc043289ba05387e83f27b4a046004a88a4c5ee7c073187ff65b9d
  14238. # 2022/03/27: 3b616cb0beaacffb53884b5ba0453312d2577db598d2a877a3b251125fb281a1
  14239. w_download http://media.steampowered.com/client/installer/SteamSetup.exe 3b616cb0beaacffb53884b5ba0453312d2577db598d2a877a3b251125fb281a1
  14240. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14241. w_try "${WINE}" SteamSetup.exe ${W_OPT_UNATTENDED:+ /S}
  14242. # Not all users need this disabled, but let's play it safe for now
  14243. if w_workaround_wine_bug 22053 "Disabling gameoverlayrenderer to prevent game crashes on some machines."; then
  14244. w_override_dlls disabled gameoverlayrenderer
  14245. fi
  14246. if w_workaround_wine_bug 44985 "Disabling libglesv2 to make Store and Library function correctly." 7.0,; then
  14247. w_override_dlls disabled libglesv2
  14248. w_warn "Steam needs to be launched with -noreactlogin"
  14249. fi
  14250. if [ "$(uname -s)" = "Darwin" ] && w_workaround_wine_bug 49839 "Steamwebhelper.exe crashes when running Steam."; then
  14251. w_warn "Steam must be launched with -allosarches -cef-force-32bit -cef-in-process-gpu -no-cef-sandbox"
  14252. fi
  14253. # vulkandriverquery & vulkandriverquery64 crash a lot on macOS
  14254. if [ "$(uname -s)" = "Darwin" ]; then
  14255. w_call nocrashdialog
  14256. fi
  14257. # Otherwise Steam Store and Library don't show
  14258. w_call corefonts
  14259. }
  14260. #----------------------------------------------------------------
  14261. w_metadata ubisoftconnect apps \
  14262. title="Ubisoft Connect" \
  14263. publisher="Ubisoft" \
  14264. year="2020" \
  14265. media="download" \
  14266. file1="UbisoftConnectInstaller.exe" \
  14267. installed_exe1="${W_PROGRAMS_X86_WIN}/Ubisoft/Ubisoft Game Launcher/UbisoftConnect.exe"
  14268. load_ubisoftconnect()
  14269. {
  14270. # Changes too frequently, don't check anymore
  14271. w_download https://ubistatic3-a.akamaihd.net/orbit/launcher_installer/UbisoftConnectInstaller.exe
  14272. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14273. # NSIS installer
  14274. w_try "${WINE}" UbisoftConnectInstaller.exe ${W_OPT_UNATTENDED:+ /S}
  14275. }
  14276. #----------------------------------------------------------------
  14277. w_metadata utorrent apps \
  14278. title="µTorrent 2.2.1" \
  14279. publisher="BitTorrent" \
  14280. year="2011" \
  14281. media="manual_download" \
  14282. file1="utorrent_2.2.1.exe" \
  14283. installed_exe1="${W_WINDIR_WIN}/utorrent.exe"
  14284. load_utorrent()
  14285. {
  14286. # BitTorrent client supported on Windows, OS X, Linux through Wine
  14287. # 2012/03/07: sha256sum ec2c086ff784b06e4ff05243164ddb768b81ee32096afed6d5e574ff350b619e
  14288. w_download_manual "https://www.oldapps.com/utorrent.php?old_utorrent=38" utorrent_2.2.1.exe ec2c086ff784b06e4ff05243164ddb768b81ee32096afed6d5e574ff350b619e
  14289. w_try cp -f "${W_CACHE}/utorrent/${file1}" "${W_WINDIR_UNIX}"/utorrent.exe
  14290. }
  14291. #----------------------------------------------------------------
  14292. w_metadata utorrent3 apps \
  14293. title="µTorrent 3.4" \
  14294. publisher="BitTorrent" \
  14295. year="2011" \
  14296. media="download" \
  14297. file1="uTorrent.exe" \
  14298. installed_exe1="c:/users/${LOGNAME}/Application Data/uTorrent/uTorrent.exe"
  14299. load_utorrent3()
  14300. {
  14301. # 2017/03/26: sha256sum 482cfc0759f484ad4e6547cc160ef3f08057cb05969242efd75a51525ab9bd92
  14302. w_download https://download-new.utorrent.com/endpoint/utorrent/os/windows/track/stable/ 482cfc0759f484ad4e6547cc160ef3f08057cb05969242efd75a51525ab9bd92 uTorrent.exe
  14303. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14304. # If you don't use /PERFORMINSTALL, it just runs µTorrent
  14305. # FIXME: That's no longer a quiet option, though..
  14306. "${WINE}" "${file1}" /PERFORMINSTALL /NORUN
  14307. # dang installer exits with status 1 on success
  14308. status=$?
  14309. case ${status} in
  14310. 0|1) ;;
  14311. *) w_die "Note: utorrent installer returned status '${status}'. Aborting." ;;
  14312. esac
  14313. }
  14314. #----------------------------------------------------------------
  14315. w_metadata vc2005express apps \
  14316. title="MS Visual C++ 2005 Express" \
  14317. publisher="Microsoft" \
  14318. year="2005" \
  14319. media="download" \
  14320. file1="VC.iso" \
  14321. installed_exe1="${W_PROGRAMS_X86_WIN}/Microsoft Visual Studio 8/Common7/IDE/VCExpress.exe"
  14322. load_vc2005express()
  14323. {
  14324. # Thanks to https://blogs.msdn.microsoft.com/astebner/2006/03/14/how-to-create-an-installable-layout-for-visual-studio-2005-express-editions/
  14325. # for the recipe
  14326. w_call dotnet20
  14327. # https://blogs.msdn.microsoft.com/astebner/2006/03/14/how-to-create-an-installable-layout-for-visual-studio-2005-express-editions/
  14328. # https://go.microsoft.com/fwlink/?linkid=57034
  14329. w_download https://download.microsoft.com/download/A/9/1/A91D6B2B-A798-47DF-9C7E-A97854B7DD18/VC.iso 5ae700d0285d94ec6df23828c7dc9f5634cd250363bed72e486916af22ff9545
  14330. # Unpack ISO (how handy that 7z can do this!)
  14331. w_try_7z "${W_TMP}" "${W_CACHE}"/vc2005express/VC.iso
  14332. w_try_cd "${W_TMP}"
  14333. if [ -n "${W_OPT_UNATTENDED}" ]; then
  14334. chmod +x Ixpvc.exe
  14335. # Add /qn after ReallySuppress for a really silent install (but then you won't see any errors)
  14336. w_try "${WINE}" Ixpvc.exe /t:"${W_TMP_WIN}" /q:a /c:"msiexec /i vcsetup.msi VSEXTUI=1 ADDLOCAL=ALL REBOOT=ReallySuppress"
  14337. else
  14338. w_try "${WINE}" setup.exe
  14339. w_ahk_do "
  14340. SetTitleMatchMode, 2
  14341. WinWait, Visual C++ 2005 Express Edition Setup
  14342. WinWaitClose, Visual C++ 2005 Express Edition Setup
  14343. "
  14344. fi
  14345. }
  14346. #----------------------------------------------------------------
  14347. w_metadata vc2005expresssp1 apps \
  14348. title="MS Visual C++ 2005 Express SP1" \
  14349. publisher="Microsoft" \
  14350. year="2007" \
  14351. media="download" \
  14352. file1="VS80sp1-KB926748-X86-INTL.exe"
  14353. load_vc2005expresssp1()
  14354. {
  14355. w_call vc2005express
  14356. # https://www.microsoft.com/en-us/download/details.aspx?id=804
  14357. if w_workaround_wine_bug 37375; then
  14358. w_warn "Installer currently fails"
  14359. fi
  14360. w_download https://web.archive.org/web/20110624054336/https://download.microsoft.com/download/7/7/3/7737290f-98e8-45bf-9075-85cc6ae34bf1/VS80sp1-KB926748-X86-INTL.exe a959d1ea52674b5338473be32a1370f9ec80df84629a2ed3471aa911b42d9e50
  14361. w_try "${WINE}" "${W_CACHE}"/vc2005expresssp1/VS80sp1-KB926748-X86-INTL.exe ${W_OPT_UNATTENDED:+/q}
  14362. }
  14363. #----------------------------------------------------------------
  14364. w_metadata vc2005trial apps \
  14365. title="MS Visual C++ 2005 Trial" \
  14366. publisher="Microsoft" \
  14367. year="2005" \
  14368. media="download" \
  14369. file1="En_vs_2005_vsts_180_Trial.img" \
  14370. installed_exe1="${W_PROGRAMS_X86_WIN}/Microsoft Visual Studio 8/Common7/IDE/devenv.exe"
  14371. load_vc2005trial()
  14372. {
  14373. w_call dotnet20
  14374. # Without mfc42.dll, pidgen.dll won't load, and the app claims "A trial edition is already installed..."
  14375. w_call mfc42
  14376. w_download https://download.microsoft.com/download/6/f/5/6f5f7a01-50bb-422d-8742-c099c8896969/En_vs_2005_vsts_180_Trial.img 3ae9f611c60c64d82e1fa9c94714aa6b6c10f6c2c05446e14b5afb5a257f86dc
  14377. # Unpack ISO (how handy that 7z can do this!)
  14378. # Only the Windows version of 7z can handle .img files?
  14379. WINETRICKS_OPT_SHAREDPREFIX=1 w_call 7zip
  14380. w_try_cd "${W_PROGRAMS_X86_UNIX}"/7-Zip
  14381. w_try "${WINE}" 7z.exe x -y -o"${W_TMP_WIN}" "${W_CACHE_WIN}\\vc2005trial\\En_vs_2005_vsts_180_Trial.img"
  14382. w_try_cd "${W_TMP}"
  14383. # Sanity check...
  14384. w_verify_sha256sum e1d5ddd4bad46c2efe8105f8d73bd62857f6218942d3b9ac5da0e1a6a0a217e0 vs/wcu/runmsi.exe
  14385. w_try_cd vs/Setup
  14386. w_ahk_do "
  14387. SetTitleMatchMode 2
  14388. run setup.exe
  14389. winwait, Visual Studio, Setup is loading
  14390. if ( w_opt_unattended > 0 ) {
  14391. winwait, Visual Studio, Loading completed
  14392. sleep 1000
  14393. controlclick, button2
  14394. winwait, Visual Studio, Select features
  14395. sleep 1000
  14396. controlclick, button38
  14397. sleep 1000
  14398. controlclick, button40
  14399. winwait, Visual Studio, You have chosen
  14400. sleep 1000
  14401. controlclick, button1
  14402. winwait, Visual Studio, Select features
  14403. sleep 1000
  14404. controlclick, button11
  14405. }
  14406. ; this can take a while
  14407. winwait, Finish Page
  14408. if ( w_opt_unattended > 0 ) {
  14409. sleep 1000
  14410. controlclick, button2
  14411. }
  14412. winwaitclose, Finish Page
  14413. "
  14414. }
  14415. #----------------------------------------------------------------
  14416. w_metadata vc2008express apps \
  14417. title="MS Visual C++ 2008 Express" \
  14418. publisher="Microsoft" \
  14419. year="2008" \
  14420. media="download" \
  14421. file1="VS2008ExpressENUX1397868.iso" \
  14422. installed_exe1="${W_PROGRAMS_X86_WIN}/Microsoft Visual Studio 9.0/Common7/IDE/VCExpress.exe"
  14423. load_vc2008express()
  14424. {
  14425. w_verify_cabextract_available
  14426. w_call dotnet35
  14427. # This is the version without SP1 baked in. (SP1 requires dotnet35sp1, which doesn't work yet.)
  14428. w_download https://download.microsoft.com/download/8/B/5/8B5804AD-4990-40D0-A6AA-CE894CBBB3DC/VS2008ExpressENUX1397868.iso 632318ef0df5bad58fcb99852bd251243610e7a4d84213c45b4f693605a13ead
  14429. # Unpack ISO
  14430. w_try_7z "${W_TMP}" "${W_CACHE}"/vc2008express/VS2008ExpressENUX1397868.iso
  14431. # See also https://blogs.msdn.microsoft.com/astebner/2008/04/25/a-simpler-way-to-silently-install-visual-studio-2008-express-editions-with-a-caveat/
  14432. w_try_cd "${W_TMP}"/VCExpress
  14433. w_try "${WINE}" setup.exe ${W_OPT_UNATTENDED:+/q}
  14434. }
  14435. #----------------------------------------------------------------
  14436. w_metadata vc2010express apps \
  14437. title="MS Visual C++ 2010 Express" \
  14438. publisher="Microsoft" \
  14439. year="2010" \
  14440. media="download" \
  14441. file1="VS2010Express1.iso" \
  14442. installed_exe1="${W_PROGRAMS_X86_WIN}/Microsoft Visual Studio 10.0/Common7/IDE/VCExpress.exe"
  14443. load_vc2010express()
  14444. {
  14445. # Originally at: https://download.microsoft.com/download/1/E/5/1E5F1C0A-0D5B-426A-A603-1798B951DDAE/VS2010Express1.iso
  14446. # Mirror list at: http://www.filewatcher.com/_/?q=VS2010Express1.iso
  14447. # Formerly at: ftp://www.daba.lv/pub/Programmeeshana/VisualStudio/VS2010Express1.iso a9d5dcdf55e539a06547a8ebbc63d55dc167113e09ee9e42096ab9098313039b
  14448. w_download https://debian.fmi.uni-sofia.bg/~aangelov/VS2010Express1.iso a9d5dcdf55e539a06547a8ebbc63d55dc167113e09ee9e42096ab9098313039b
  14449. # Uninstall wine-mono, installer doesn't attempt to install native .Net if mono is installed,
  14450. # Then the installer throws an exception and fails
  14451. # See https://github.com/Winetricks/winetricks/issues/1165
  14452. w_call remove_mono internal
  14453. # dotnet40 leaves winver at win2k, which causes vc2010 to abort on
  14454. # start because it looks for c:\users\$LOGNAME\Application Data
  14455. w_set_winver winxp
  14456. if w_workaround_wine_bug 12501 "Installing mspatcha to work around bug in SQL Server install"; then
  14457. w_call mspatcha
  14458. fi
  14459. # Unpack ISO
  14460. # This must happen after w_call or W_TMP will be blown away
  14461. w_try_7z "${W_TMP}" "${W_CACHE}"/vc2010express/VS2010Express1.iso
  14462. w_try_cd "${W_TMP}"/VCExpress
  14463. w_try "${WINE}" setup.exe ${W_OPT_UNATTENDED:+/q}
  14464. }
  14465. #----------------------------------------------------------------
  14466. w_metadata vlc apps \
  14467. title="VLC media player 2.2.1" \
  14468. publisher="VideoLAN" \
  14469. year="2015" \
  14470. media="download" \
  14471. file1="vlc-2.2.1-win32.exe" \
  14472. installed_file1="${W_PROGRAMS_X86_WIN}/VideoLAN/VLC/vlc.exe" \
  14473. homepage="https://www.videolan.org/vlc/"
  14474. load_vlc()
  14475. {
  14476. w_download https://get.videolan.org/vlc/2.2.1/win32/vlc-2.2.1-win32.exe 2eaa3881b01a2464d2a155ad49cc78162571dececcef555400666c719a60794d
  14477. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14478. w_try "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+ /S}
  14479. }
  14480. #----------------------------------------------------------------
  14481. w_metadata winamp apps \
  14482. title="Winamp" \
  14483. publisher="Radionomy (AOL (Nullsoft))" \
  14484. year="2013" \
  14485. media="download" \
  14486. file1="winamp5666_full_all_redux.exe" \
  14487. installed_exe1="${W_PROGRAMS_X86_WIN}/Winamp/winamp.exe" \
  14488. homepage="https://www.winamp.com/"
  14489. load_winamp()
  14490. {
  14491. w_info "may send information while installing, see https://www.microsoft.com/security/portal/Threat/Encyclopedia/Entry.aspx?threatid=159633"
  14492. # 2019/12/11: previously at https://winampplugins.co.uk/Winamp/winamp5666_full_all_redux.exe
  14493. w_download http://www.meggamusic.co.uk/winamp/winamp5666_full_all_redux.exe ea9a6ba81475d49876d0b8b300d93f28f7959b8e99ce4372dbde746567e14002
  14494. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14495. if [ -n "${W_OPT_UNATTENDED}" ]; then
  14496. w_ahk_do "
  14497. SetWinDelay 500
  14498. SetTitleMatchMode, 2
  14499. Run ${file1}
  14500. WinWait, Installer Language, Please select
  14501. Sleep 500
  14502. ControlClick, Button1 ; OK
  14503. WinWait, Winamp Installer, Welcome to the Winamp installer
  14504. Sleep 500
  14505. ControlClick, Button2 ; Next
  14506. WinWait, Winamp Installer, License Agreement
  14507. Sleep 500
  14508. ControlClick, Button2 ; I Agree
  14509. WinWait, Winamp Installer, Choose Install Location
  14510. Sleep 500
  14511. ControlClick, Button2 ; Next
  14512. WinWait, Winamp Installer, Choose Components
  14513. Sleep 500
  14514. ControlClick, Button2 ; Next for Full install
  14515. WinWait, Winamp Installer, Choose Start Options
  14516. Sleep 500
  14517. ControlClick, Button4 ; uncheck start menu entry
  14518. Sleep 500
  14519. ControlClick, Button5 ; uncheck ql icon
  14520. Sleep 500
  14521. ControlClick, Button6 ; uncheck deskto icon
  14522. Sleep 500
  14523. ControlClick, Button2 ; Install
  14524. WinWait, Winamp Installer, Installation Complete
  14525. Sleep 500
  14526. ControlClick, Button4 ; uncheck launch when complete
  14527. Sleep 500
  14528. ControlClick, Button2 ; Finish
  14529. WinWaitClose
  14530. "
  14531. else
  14532. w_try "${WINE}" "${file1}"
  14533. fi
  14534. }
  14535. #----------------------------------------------------------------
  14536. w_metadata winrar apps \
  14537. title="WinRAR 6.11" \
  14538. publisher="RARLAB" \
  14539. year="1993" \
  14540. media="download" \
  14541. file1="winrar-x32-611.exe" \
  14542. installed_exe1="${W_PROGRAMS_WIN}/WinRAR/WinRAR.exe"
  14543. load_winrar()
  14544. {
  14545. _W_winrar_url="https://www.win-rar.com/fileadmin/winrar-versions"
  14546. _W_winrar_ver="611"
  14547. if [ "${W_ARCH}" = "win32" ]; then
  14548. _W_winrar_exe="winrar-x32-${_W_winrar_ver}.exe"
  14549. else
  14550. _W_winrar_exe="winrar-x64-${_W_winrar_ver}.exe"
  14551. fi
  14552. case ${LANG} in
  14553. bg*)
  14554. if [ "${W_ARCH}" = "win32" ]; then
  14555. w_download "${_W_winrar_url}/${_W_winrar_exe}" 91fd68051f6adb05f8fc92621b7ddd42c8a0d32b0db7ee4c1a35262442ccd96c
  14556. else
  14557. w_download "${_W_winrar_url}/${_W_winrar_exe}" 08359eeb32aab2cc5421b73d7f5072a6d33bb613f8b5bce5675e70be01aee832
  14558. fi
  14559. ;;
  14560. da*)
  14561. _W_winrar_exe="${_W_winrar_exe%.exe}dk.exe"
  14562. if [ "${W_ARCH}" = "win32" ]; then
  14563. w_download "${_W_winrar_url}/${_W_winrar_exe}" 0d42fef9e9dc906cbf75d230dbfc902e1c95a2d5fbf6994d53686ac80300733a
  14564. else
  14565. w_download "${_W_winrar_url}/${_W_winrar_exe}" cb1f96cb804d1f89447a53968c3e3a83409b7b3fb6876e0be614b4932c674251
  14566. fi
  14567. ;;
  14568. de*)
  14569. _W_winrar_exe="${_W_winrar_exe%.exe}d.exe"
  14570. if [ "${W_ARCH}" = "win32" ]; then
  14571. w_download "${_W_winrar_url}/${_W_winrar_exe}" 3ed5607cefe225ad72b407be7ca2c1dddfde765ac6d78406b104d674f0444e2d
  14572. else
  14573. w_download "${_W_winrar_url}/${_W_winrar_exe}" 7247dc5ea61348bd2b9bea59b19ab05dbb2db67f6001e921a3456de7274ccf9f
  14574. fi
  14575. ;;
  14576. pl*)
  14577. _W_winrar_exe="${_W_winrar_exe%.exe}pl.exe"
  14578. if [ "${W_ARCH}" = "win32" ]; then
  14579. w_download "${_W_winrar_url}/${_W_winrar_exe}" 2011f899d3a2b48aade49642d2f0b6f0d79730cece119a305c83fa17d317107e
  14580. else
  14581. w_download "${_W_winrar_url}/${_W_winrar_exe}" 9171eab706208f6febe4dcd2b475cbc2894b834ad112c89eb0a494bb3643360c
  14582. fi
  14583. ;;
  14584. pt*)
  14585. _W_winrar_exe="${_W_winrar_exe%.exe}pt.exe"
  14586. if [ "${W_ARCH}" = "win32" ]; then
  14587. w_download "${_W_winrar_url}/${_W_winrar_exe}" d3e37bbfa6ea268093c37f2ce4fc7a14833eaf7c01b51cf25be1714f37435e02
  14588. else
  14589. w_download "${_W_winrar_url}/${_W_winrar_exe}" 1e9c9a49426a2292ee5a97ff8a77b34598966ce45b1bffc9464e7110b236471b
  14590. fi
  14591. ;;
  14592. ru*)
  14593. _W_winrar_exe="${_W_winrar_exe%.exe}ru.exe"
  14594. if [ "${W_ARCH}" = "win32" ]; then
  14595. w_download "${_W_winrar_url}/${_W_winrar_exe}" 6d70cbf9b7a8de9e825e619128ef3555600b14a062ff90cf2ab47edd3ca6ecf2
  14596. else
  14597. w_download "${_W_winrar_url}/${_W_winrar_exe}" f32ad8fc89a9bcfc1477e60de6d1ac9681f6eae6ff033aacdb6e0b75e7712910
  14598. fi
  14599. ;;
  14600. uk*)
  14601. _W_winrar_exe="${_W_winrar_exe%.exe}uk.exe"
  14602. if [ "${W_ARCH}" = "win32" ]; then
  14603. w_download "${_W_winrar_url}/${_W_winrar_exe}" d4e9cb5e4d488ee47f6b1bb694a792fb7f661e401128fe59bc8cb63372003d5f
  14604. else
  14605. w_download "${_W_winrar_url}/${_W_winrar_exe}" c54197b003c39e2ae27c33319302c893f8ed9d04f22166f79ab1ff1dc82b6ccf
  14606. fi
  14607. ;;
  14608. zh_CN*)
  14609. _W_winrar_exe="${_W_winrar_exe%.exe}sc.exe"
  14610. if [ "${W_ARCH}" = "win32" ]; then
  14611. w_download "${_W_winrar_url}/${_W_winrar_exe}" cfcebea91ee1837950bed722a92d240bbdcafc7e1fcb76e9fc5d9ce4acea6ccd
  14612. else
  14613. w_download "${_W_winrar_url}/${_W_winrar_exe}" a364612c5acc56c057fec0428220eca991b58a47bd3a7ae4c1b4e0a644ad79da
  14614. fi
  14615. ;;
  14616. zh_TW*|zh_HK*)
  14617. _W_winrar_exe="${_W_winrar_exe%.exe}tc.exe"
  14618. if [ "${W_ARCH}" = "win32" ]; then
  14619. w_download "${_W_winrar_url}/${_W_winrar_exe}" 7ffbd880bc92442c84413397028ef65a16cde9fa87eff0a55dc5a93c61d68b84
  14620. else
  14621. w_download "${_W_winrar_url}/${_W_winrar_exe}" 126ac1b858f769d5dffb39cff603bf0ec79dc21b8d7b79e92e29463d1786996a
  14622. fi
  14623. ;;
  14624. *)
  14625. if [ "${W_ARCH}" = "win32" ]; then
  14626. w_download "${_W_winrar_url}/${_W_winrar_exe}" 6124fce45e0413021160eaf4b4652ae6b6bdd4967082094f7d457207aa349f1f
  14627. else
  14628. w_download "${_W_winrar_url}/${_W_winrar_exe}" 3023edb4fc3f7c2ebad157b182b62848423f6fa20d180b0df689cbb503a49684
  14629. fi
  14630. ;;
  14631. esac
  14632. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14633. w_try "${WINE}" "${_W_winrar_exe}" ${W_OPT_UNATTENDED:+/S}
  14634. }
  14635. #----------------------------------------------------------------
  14636. w_metadata wme9 apps \
  14637. title="MS Windows Media Encoder 9 (broken in Wine)" \
  14638. publisher="Microsoft" \
  14639. year="2002" \
  14640. media="download" \
  14641. file1="WMEncoder.exe" \
  14642. installed_file1="${W_PROGRAMS_X86_WIN}/Windows Media Components/Encoder/wmenc.exe"
  14643. load_wme9()
  14644. {
  14645. w_package_unsupported_win64
  14646. # See also https://www.microsoft.com/en-us/download/details.aspx?id=17792
  14647. # Formerly at: https://download.microsoft.com/download/8/1/f/81f9402f-efdd-439d-b2a4-089563199d47/WMEncoder.exe
  14648. # Mirror list: http://www.filewatcher.com/_/?q=WMEncoder.exe
  14649. # 2018-06-11: https://people.ok.ubc.ca/mberger/MiscSW/WMEncoder.exe
  14650. # 2022-03-31: http://galinet13.free.fr/codec/WMEncoder.exe
  14651. w_download http://galinet13.free.fr/codec/WMEncoder.exe 19d1610d12b51c969f64703c4d3a76aae30dee526bae715381b5f3369f717d76
  14652. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14653. w_try "${WINE}" WMEncoder.exe ${W_OPT_UNATTENDED:+/q}
  14654. }
  14655. #----------------------------------------------------------------
  14656. # helper - not useful by itself
  14657. load_wm9codecs()
  14658. {
  14659. # Note: must install WMP9 or 10 first, or installer will complain and abort.
  14660. # The Microsoft page says that is supports XP, but in both 32/64 prefixes, it gives a message box saying it requires win98/winme/win2k
  14661. w_package_unsupported_win64
  14662. # See https://www.microsoft.com/en-us/download/details.aspx?id=507
  14663. # Used by direct calls from load_wmp9, so we have to specify cache directory.
  14664. # http://birds.camden.rutgers.edu/
  14665. w_download_to wm9codecs http://birds.camden.rutgers.edu/WM9Codecs9x.exe f25adf6529745a772c4fdd955505e7fcdc598b8a031bb0ce7e5856da5e5fcc95
  14666. w_try_cd "${W_CACHE}/wm9codecs"
  14667. w_set_winver win2k
  14668. w_try "${WINE}" WM9Codecs9x.exe ${W_OPT_UNATTENDED:+/q}
  14669. }
  14670. w_metadata wmp9 dlls \
  14671. title="Windows Media Player 9" \
  14672. publisher="Microsoft" \
  14673. year="2003" \
  14674. media="download" \
  14675. file1="MPSetup.exe" \
  14676. installed_file1="${W_SYSTEM32_DLLS_WIN}"/l3codeca.acm
  14677. load_wmp9()
  14678. {
  14679. w_skip_windows wmp9 && return
  14680. # Not really expected to work well yet; see
  14681. # https://appdb.winehq.org/appview.php?versionId=1449
  14682. # This version of Windows Media Player can be installed only on Windows 98 Second Edition, Windows Millennium Edition, Windows 2000, Windows XP, and Windows .NET Server.
  14683. w_call wsh57
  14684. w_store_winver
  14685. w_set_winver winxp
  14686. # See also https://support.microsoft.com/en-us/help/18612/windows-media-player
  14687. w_download https://web.archive.org/web/20180404022333if_/download.microsoft.com/download/1/b/c/1bc0b1a3-c839-4b36-8f3c-19847ba09299/MPSetup.exe 678c102847c18a92abf13c3fae404c3473a0770c871a046b45efe623c9938fc0
  14688. # remove builtin placeholders to allow update
  14689. rm -f "${W_SYSTEM32_DLLS}"/wmvcore.dll "${W_SYSTEM32_DLLS}"/wmp.dll
  14690. rm -f "${W_PROGRAMS_X86_UNIX}/Windows Media Player/wmplayer.exe"
  14691. # need native overrides to allow update and later checks to succeed
  14692. w_override_dlls native l3codeca.acm wmp wmplayer.exe wmvcore
  14693. # FIXME: should we override quartz? Builtin crashes when you play
  14694. # anything, but maybe that's bug 30557 and only affects new systems?
  14695. # Wine's pidgen is too stubby, crashes, see Wine bug 31111
  14696. w_override_app_dlls MPSetup.exe native pidgen
  14697. # The installer doesn't work in modern wine, in either 32 or 64-bit prefixes.
  14698. # https://bugs.winehq.org/show_bug.cgi?id=52772
  14699. # Luckily, it's just a wrapper for the real installer, which does still work:
  14700. w_try_cd "${W_TMP}"
  14701. w_try_cabextract "${W_CACHE}/${W_PACKAGE}/MPSetup.exe"
  14702. if [ "${W_ARCH}" = "win64" ]; then
  14703. # https://github.com/Winetricks/winetricks/issues/1087
  14704. w_try sed -i 's/IsWow64Process/IsNow64Process/' setup_wm.exe
  14705. w_try "${WINE}" setup_wm.exe ${W_OPT_UNATTENDED:+/Quiet}
  14706. w_warn "wm9codecs is not supported in win64 prefixes. If you need those codecs, reinstall wmp9 in a 32-bit prefix."
  14707. else
  14708. w_try "${WINE}" setup_wm.exe ${W_OPT_UNATTENDED:+/Quiet}
  14709. load_wm9codecs
  14710. fi
  14711. w_restore_winver
  14712. }
  14713. #----------------------------------------------------------------
  14714. w_metadata wmp10 dlls \
  14715. title="Windows Media Player 10" \
  14716. publisher="Microsoft" \
  14717. year="2006" \
  14718. media="download" \
  14719. file1="MP10Setup.exe" \
  14720. installed_file1="${W_SYSTEM32_DLLS_WIN}/l3codecp.acm"
  14721. load_wmp10()
  14722. {
  14723. w_package_unsupported_win64
  14724. # FIXME: what versions of Windows are really bundled with wmp10?
  14725. w_skip_windows wmp10 && return
  14726. # See https://appdb.winehq.org/appview.php?iVersionId=3212
  14727. w_call wsh57
  14728. # https://www.microsoft.com/en-us/download/details.aspx?id=20426
  14729. w_download https://web.archive.org/web/20200803205216/https://download.microsoft.com/download/1/2/a/12a31f29-2fa9-4f50-b95d-e45ef7013f87/MP10Setup.exe c1e71784c530035916aad5b09fa002abfbb7569b75208dd79351f29c6d197e03
  14730. w_store_winver
  14731. w_set_winver winxp
  14732. # remove builtin placeholders to allow update
  14733. rm -f "${W_SYSTEM32_DLLS}"/wmvcore.dll "${W_SYSTEM32_DLLS}"/wmp.dll
  14734. rm -f "${W_PROGRAMS_X86_UNIX}/Windows Media Player/wmplayer.exe"
  14735. # need native overrides to allow update and later checks to succeed
  14736. w_override_dlls native l3codeca.acm wmp wmplayer.exe wmvcore
  14737. # Crashes on exit, but otherwise ok; see https://bugs.winehq.org/show_bug.cgi?id=12633
  14738. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14739. w_try_cabextract -d "${W_TMP}" ./MP10Setup.exe
  14740. w_try_cd "${W_TMP}"
  14741. "${WINE}" setup_wm.exe ${W_OPT_UNATTENDED:+/Quiet}
  14742. # Disable WMP's services, since they depend on unimplemented stuff, they trigger the GUI debugger several times
  14743. w_try_regedit /D "HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\Cdr4_2K"
  14744. w_try_regedit /D "HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\Cdralw2k"
  14745. load_wm9codecs
  14746. w_restore_winver
  14747. }
  14748. #----------------------------------------------------------------
  14749. w_metadata wmp11 dlls \
  14750. title="Windows Media Player 11" \
  14751. publisher="Microsoft" \
  14752. year="2007" \
  14753. media="download" \
  14754. file1="wmp11-windowsxp-x86-enu.exe" \
  14755. installed_file1="${W_PROGRAMS_X86_WIN}/Windows Media Player/wmplayer.exe"
  14756. load_wmp11()
  14757. {
  14758. # See https://appdb.winehq.org/objectManager.php?sClass=version&iId=32057
  14759. w_call wsh57
  14760. w_call gdiplus
  14761. if [ "${W_ARCH}" = "win32" ]; then
  14762. # https://appdb.winehq.org/objectManager.php?sClass=version&iId=8150
  14763. w_download https://web.archive.org/web/20170628063001/http://download.microsoft.com/download/0/9/5/0953e553-3bb6-44b1-8973-106f1b7e5049/wmp11-windowsxp-x86-enu.exe ffd321a441a67001a893f3bde4bb1afba07d4d2c9659bfdb0fbb057e7945d970
  14764. installer_exe=wmp11-windowsxp-x86-enu.exe
  14765. wmf_exe=wmfdist11.exe
  14766. wmp_exe=wmp11.exe
  14767. elif [ "${W_ARCH}" = "win64" ]; then
  14768. # https://appdb.winehq.org/objectManager.php?sClass=version&iId=32057
  14769. w_download https://web.archive.org/web/20190512112704/https://download.microsoft.com/download/3/0/8/3080C52C-2517-43DE-BDB4-B7EAFD88F084/wmp11-windowsxp-x64-enu.exe 5af407cf336849aff435044ec28f066dd523bbdc22d1ce7aaddb5263084f5526
  14770. installer_exe=wmp11-windowsxp-x64-enu.exe
  14771. wmf_exe=wmfdist11-64.exe
  14772. wmp_exe=wmp11-64.exe
  14773. fi
  14774. w_store_winver
  14775. w_set_winver winxp
  14776. # remove builtin placeholders to allow update
  14777. w_try rm -f "${W_PROGRAMS_UNIX}/Windows Media Player/wmplayer.exe" \
  14778. "${W_SYSTEM32_DLLS}"/wmp.dll "${W_SYSTEM32_DLLS}"/wmvcore.dll "${W_SYSTEM32_DLLS}"/mfplat.dll "${W_SYSTEM32_DLLS}"/wmasf.dll \
  14779. "${W_SYSTEM32_DLLS}"/wmpnssci.dll \
  14780. "${W_SYSTEM64_DLLS}"/wmp.dll "${W_SYSTEM64_DLLS}"/wmvcore.dll "${W_SYSTEM64_DLLS}"/mfplat.dll "${W_SYSTEM64_DLLS}"/wmasf.dll \
  14781. "${W_SYSTEM64_DLLS}"/wmpnssci.dll
  14782. # need native overrides to allow update and later checks to succeed
  14783. w_override_dlls native l3codeca.acm mfplat wmasf wmp wmplayer.exe wmpnssci wmvcore
  14784. w_try_cd "${W_TMP}"
  14785. # https://bugs.winehq.org/show_bug.cgi?id=10219#c1
  14786. w_try_cabextract "${W_CACHE}/${W_PACKAGE}/${installer_exe}"
  14787. "${WINE}" "${wmf_exe}" /quiet
  14788. "${WINE}" "${wmp_exe}" /quiet
  14789. # Disable WMP's services, since they depend on unimplemented stuff, they trigger the GUI debugger several times
  14790. w_try_regedit /D "HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\Cdr4_2K"
  14791. w_try_regedit /D "HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services\\Cdralw2k"
  14792. w_restore_winver
  14793. }
  14794. #----------------------------------------------------------------
  14795. # Benchmarks
  14796. #----------------------------------------------------------------
  14797. w_metadata 3dmark2000 benchmarks \
  14798. title="3DMark2000" \
  14799. publisher="MadOnion.com" \
  14800. year="2000" \
  14801. media="download" \
  14802. file1="3dmark2000_v11_100308.exe" \
  14803. installed_file1="${W_PROGRAMS_X86_WIN}/MadOnion.com/3DMark2000/3DMark2000.exe"
  14804. load_3dmark2000()
  14805. {
  14806. # https://www.futuremark.com/download/3dmark2000/
  14807. if ! test -f "${W_CACHE}/${W_PACKAGE}/3dmark2000_v11_100308.exe"; then
  14808. w_download http://www.ocinside.de/download/3dmark2000_v11_100308.exe 1b392776fd377de8cc6db7c1d8b1565485e20816d1b053de3f16a743e629048d
  14809. fi
  14810. w_try_unzip "${W_TMP}/${W_PACKAGE}" "${W_CACHE}/${W_PACKAGE}"/3dmark2000_v11_100308.exe
  14811. w_try_cd "${W_TMP}/${W_PACKAGE}"
  14812. w_ahk_do "
  14813. SetTitleMatchMode, 2
  14814. run Setup.exe
  14815. WinWait Welcome
  14816. ;ControlClick Button1 ; Next
  14817. Sleep 1000
  14818. Send {Enter} ; Next
  14819. WinWait License
  14820. ;ControlClick Button2 ; Yes
  14821. Sleep 1000
  14822. Send {Enter} ; Yes
  14823. ;WinWaitClose ahk_class #32770 ; License
  14824. WinWait ahk_class #32770, Destination
  14825. ;ControlClick Button1 ; Next
  14826. Sleep 1000
  14827. Send {Enter} ; Next
  14828. ;WinWaitClose ahk_class #32770 ; Destination
  14829. WinWait, Start
  14830. ;ControlClick Button1 ; Next
  14831. Sleep 1000
  14832. Send {Enter} ; Next
  14833. WinWait Registration
  14834. ControlClick Button1 ; Next
  14835. WinWait Complete
  14836. Sleep 1000
  14837. ControlClick Button1 ; Unclick View Readme
  14838. ;ControlClick Button4 ; Finish
  14839. Send {Enter} ; Finish
  14840. WinWaitClose
  14841. "
  14842. }
  14843. #----------------------------------------------------------------
  14844. w_metadata 3dmark2001 benchmarks \
  14845. title="3DMark2001" \
  14846. publisher="MadOnion.com" \
  14847. year="2001" \
  14848. media="download" \
  14849. file1="3dmark2001se_330_100308.exe" \
  14850. installed_file1="${W_PROGRAMS_X86_WIN}/MadOnion.com/3DMark2001 SE/3DMark2001SE.exe"
  14851. load_3dmark2001()
  14852. {
  14853. # https://www.futuremark.com/download/3dmark2001/
  14854. if ! test -f "${W_CACHE}/${W_PACKAGE}"/3dmark2001se_330_100308.exe; then
  14855. w_download http://www.ocinside.de/download/3dmark2001se_330_100308.exe e34dfd32ef8fe8018a6f41f33fc3ab6dba45f2e90881688ac75a18b97dcd8813
  14856. fi
  14857. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14858. w_ahk_do "
  14859. SetWinDelay 1000
  14860. SetTitleMatchMode, 2
  14861. run 3dmark2001se_330_100308.exe
  14862. WinWait ahk_class #32770 ; welcome
  14863. if ( w_opt_unattended > 0 ) {
  14864. ControlClick Button2 ; Next
  14865. sleep 5000
  14866. WinWait ahk_class #32770 ; License
  14867. ControlClick Button2 ; Next
  14868. WinWait ahk_class #32770, Destination
  14869. ControlClick Button1 ; Next
  14870. WinWait ahk_class #32770, Start
  14871. ControlClick Button1 ; Next
  14872. WinWait,, Registration
  14873. ControlClick Button2 ; Next
  14874. }
  14875. WinWait,, Complete
  14876. if ( w_opt_unattended > 0 ) {
  14877. ControlClick Button1 ; Unclick View Readme
  14878. ControlClick Button4 ; Finish
  14879. }
  14880. WinWaitClose
  14881. "
  14882. }
  14883. #----------------------------------------------------------------
  14884. w_metadata 3dmark03 benchmarks \
  14885. title="3D Mark 03" \
  14886. publisher="Futuremark" \
  14887. year="2003" \
  14888. media="manual_download" \
  14889. file1="3DMark03_v360_1901.exe" \
  14890. installed_exe1="${W_PROGRAMS_X86_WIN}/Futuremark/3DMark03/3DMark03.exe"
  14891. load_3dmark03()
  14892. {
  14893. # https://www.futuremark.com/benchmarks/3dmark03/download/
  14894. if ! test -f "${W_CACHE}/${W_PACKAGE}/3DMark03_v360_1901.exe"; then
  14895. w_download_manual https://www.futuremark.com/download/3dmark03/ 3DMark03_v360_1901.exe 86d7f73747944c553e47e6ab5a74138e8bbca07fab8216ae70a61ac7f9a1c468
  14896. fi
  14897. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14898. w_warn "Don't use mouse while this installer is running. Sorry..."
  14899. # This old installer doesn't seem to be scriptable the usual way, so spray and pray.
  14900. w_ahk_do "
  14901. SetTitleMatchMode, 2
  14902. run 3DMark03_v360_1901.exe
  14903. WinWait 3DMark03 - InstallShield Wizard, Welcome
  14904. if ( w_opt_unattended > 0 ) {
  14905. WinActivate
  14906. Send {Enter}
  14907. Sleep 2000
  14908. WinWait 3DMark03 - InstallShield Wizard, License
  14909. WinActivate
  14910. ; Accept license
  14911. Send a
  14912. Send {Enter}
  14913. Sleep 2000
  14914. ; Choose Destination
  14915. Send {Enter}
  14916. Sleep 2000
  14917. ; Begin install
  14918. Send {Enter}
  14919. ; Wait for install to finish
  14920. WinWait 3DMark03, Registration
  14921. ; Purchase later
  14922. Send {Tab}
  14923. Send {Tab}
  14924. Send {Enter}
  14925. }
  14926. WinWait, 3DMark03 - InstallShield Wizard, Complete
  14927. if ( w_opt_unattended > 0 ) {
  14928. ; Uncheck readme
  14929. Send {Space}
  14930. Send {Tab}
  14931. Send {Tab}
  14932. Send {Enter}
  14933. }
  14934. WinWaitClose, 3DMark03 - InstallShield Wizard, Complete
  14935. "
  14936. }
  14937. #----------------------------------------------------------------
  14938. w_metadata 3dmark05 benchmarks \
  14939. title="3D Mark 05" \
  14940. publisher="Futuremark" \
  14941. year="2005" \
  14942. media="download" \
  14943. file1="3dmark05_v130_1901.exe" \
  14944. installed_exe1="${W_PROGRAMS_X86_WIN}/Futuremark/3DMark05/3DMark05.exe"
  14945. load_3dmark05()
  14946. {
  14947. # https://www.futuremark.com/download/3dmark05/
  14948. if ! test -f "${W_CACHE}/${W_PACKAGE}/3DMark05_v130_1901.exe"; then
  14949. w_download http://www.ocinside.de/download/3dmark05_v130_1901.exe af97f20665090985ee8a4ba83d137e796bfe12e0dfb7fe285712fae198b34334
  14950. fi
  14951. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14952. w_ahk_do "
  14953. run 3DMark05_v130_1901.exe
  14954. WinWait ahk_class #32770, Welcome
  14955. if ( w_opt_unattended > 0 ) {
  14956. Send {Enter}
  14957. WinWait, ahk_class #32770, License
  14958. ControlClick Button1 ; Accept
  14959. ControlClick Button4 ; Next
  14960. WinWait, ahk_class #32770, Destination
  14961. ControlClick Button1 ; Next
  14962. WinWait, ahk_class #32770, Install
  14963. ControlClick Button1 ; Install
  14964. WinWait, ahk_class #32770, Purchase
  14965. ControlClick Button4 ; Later
  14966. }
  14967. WinWait, ahk_class #32770, Complete
  14968. if ( w_opt_unattended > 0 ) {
  14969. ControlClick Button1 ; Uncheck view readme
  14970. ControlClick Button3 ; Finish
  14971. }
  14972. WinWaitClose, ahk_class #32770, Complete
  14973. "
  14974. if w_workaround_wine_bug 22392; then
  14975. w_warn "You must run the app with the -nosysteminfo option to avoid a crash on startup"
  14976. fi
  14977. }
  14978. #----------------------------------------------------------------
  14979. w_metadata 3dmark06 benchmarks \
  14980. title="3D Mark 06" \
  14981. publisher="Futuremark" \
  14982. year="2006" \
  14983. media="manual_download" \
  14984. file1="3DMark06_v121_installer.exe" \
  14985. installed_exe1="${W_PROGRAMS_X86_WIN}/Futuremark/3DMark06/3DMark06.exe"
  14986. load_3dmark06()
  14987. {
  14988. w_download_manual https://www.futuremark.com/support/downloads 3DMark06_v121_installer.exe 362ebafd2b9c89a59a233e4328596438b74a32827feb65fe2837154c60a37da3
  14989. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  14990. w_ahk_do "
  14991. run ${file1}
  14992. WinWait ahk_class #32770, Welcome
  14993. if ( w_opt_unattended > 0 ) {
  14994. Send {Enter}
  14995. WinWait, ahk_class #32770, License
  14996. ControlClick Button1 ; Accept
  14997. ControlClick Button4 ; Next
  14998. WinWait, ahk_class #32770, Destination
  14999. ControlClick Button1 ; Next
  15000. WinWait, ahk_class #32770, Install
  15001. ControlClick Button1 ; Install
  15002. WinWait ahk_class OpenAL Installer
  15003. ControlClick Button2 ; OK
  15004. WinWait ahk_class #32770
  15005. ControlClick Button1 ; OK
  15006. }
  15007. WinWait, ahk_class #32770, Complete
  15008. if ( w_opt_unattended > 0 ) {
  15009. ControlClick Button1 ; Uncheck view readme
  15010. ControlClick Button3 ; Finish
  15011. }
  15012. WinWaitClose, ahk_class #32770, Complete
  15013. "
  15014. if w_workaround_wine_bug 24417 "Installing shader compiler..."; then
  15015. # "Demo" button doesn't work without this. d3dcompiler_43 related.
  15016. w_call d3dx9_28
  15017. w_call d3dx9_36
  15018. fi
  15019. if w_workaround_wine_bug 22392; then
  15020. w_warn "You must run the app with the -nosysteminfo option to avoid a crash on startup"
  15021. fi
  15022. }
  15023. #----------------------------------------------------------------
  15024. w_metadata stalker_pripyat_bench benchmarks \
  15025. title="S.T.A.L.K.E.R.: Call of Pripyat benchmark" \
  15026. publisher="GSC Game World" \
  15027. year="2009" \
  15028. media="manual_download" \
  15029. file1="stkcop-bench-setup.exe" \
  15030. installed_exe1="${W_PROGRAMS_X86_WIN}/Call Of Pripyat Benchmark/Benchmark.exe"
  15031. load_stalker_pripyat_bench()
  15032. {
  15033. # Much faster
  15034. w_download_manual http://www.bigdownload.com/games/stalker-call-of-pripyat/pc/stalker-call-of-pripyat-benchmark stkcop-bench-setup.exe 8c810fba1bbb9c58fc01f4f602479886680c9f4b491dd0afe935e27083f54845
  15035. #w_download https://files.gsc-game.com/st/bench/stkcop-bench-setup.exe 8c810fba1bbb9c58fc01f4f602479886680c9f4b491dd0afe935e27083f54845
  15036. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  15037. # FIXME: a bit fragile, if you're browsing the web while installing, it sometimes gets stuck.
  15038. w_ahk_do "
  15039. SetTitleMatchMode, 2
  15040. run ${file1}
  15041. WinWait,Setup - Call Of Pripyat Benchmark
  15042. if ( w_opt_unattended > 0 ) {
  15043. sleep 1000
  15044. ControlClick TNewButton1 ; Next
  15045. WinWait,Setup - Call Of Pripyat Benchmark,License
  15046. sleep 1000
  15047. ControlClick TNewRadioButton1 ; accept
  15048. sleep 1000
  15049. ControlClick TNewButton2 ; Next
  15050. WinWait,Setup - Call Of Pripyat Benchmark,Destination
  15051. sleep 1000
  15052. ControlClick TNewButton3 ; Next
  15053. WinWait,Setup - Call Of Pripyat Benchmark,shortcuts
  15054. sleep 1000
  15055. ControlClick TNewButton4 ; Next
  15056. WinWait,Setup - Call Of Pripyat Benchmark,performed
  15057. sleep 1000
  15058. ControlClick TNewButton4 ; Next
  15059. WinWait,Setup - Call Of Pripyat Benchmark,ready
  15060. sleep 1000
  15061. ControlClick, TNewButton4 ; Next (nah, who reads doc?)
  15062. }
  15063. WinWait,Setup - Call Of Pripyat Benchmark,finished
  15064. if ( w_opt_unattended > 0 ) {
  15065. sleep 1000
  15066. Send {Space} ; uncheck launch
  15067. sleep 1000
  15068. ControlClick TNewButton4 ; Finish
  15069. }
  15070. WinWaitClose,Setup - Call Of Pripyat Benchmark,finished
  15071. "
  15072. if w_workaround_wine_bug 24868; then
  15073. w_call d3dx9_31
  15074. w_call d3dx9_42
  15075. fi
  15076. }
  15077. #----------------------------------------------------------------
  15078. w_metadata unigine_heaven benchmarks \
  15079. title="Unigen Heaven 2.1 Benchmark" \
  15080. publisher="Unigen" \
  15081. year="2010" \
  15082. media="manual_download" \
  15083. file1="Unigine_Heaven-2.1.msi"
  15084. load_unigine_heaven()
  15085. {
  15086. w_download_manual "https://www.fileplanet.com/212489/210000/fileinfo/Unigine-'Heaven'-Benchmark-2.1-%28Windows%29" 47113b285253a1ebce04527a31d734c0dfce5724e8d2643c6c1b822a940e7073
  15087. w_try_cd "${W_CACHE}/${W_PACKAGE}"
  15088. w_ahk_do "
  15089. SetWinDelay 1000
  15090. SetTitleMatchMode, 2
  15091. run msiexec /i ${file1}
  15092. if ( w_opt_unattended > 0 ) {
  15093. WinWait ahk_class MsiDialogCloseClass
  15094. Send {Enter}
  15095. WinWait ahk_class MsiDialogCloseClass, License
  15096. ControlClick Button1 ; Accept
  15097. ControlClick Button3 ; Accept
  15098. WinWait ahk_class MsiDialogCloseClass, Choose
  15099. ControlClick Button1 ; Typical
  15100. WinWait ahk_class MsiDialogCloseClass, Ready
  15101. ControlClick Button2 ; Install
  15102. ; FIXME: on systems with OpenAL already (Win7?), the next four lines
  15103. ; are not needed. We should somehow wait for either OpenAL window
  15104. ; *or* Completed window.
  15105. WinWait ahk_class OpenAL Installer
  15106. ControlClick Button2 ; OK
  15107. WinWait ahk_class #32770
  15108. ControlClick Button1 ; OK
  15109. }
  15110. WinWait ahk_class MsiDialogCloseClass, Completed
  15111. if ( w_opt_unattended > 0 ) {
  15112. ControlClick Button1 ; Finish
  15113. Send {Enter}
  15114. }
  15115. winwaitclose
  15116. "
  15117. }
  15118. #----------------------------------------------------------------
  15119. w_metadata wglgears benchmarks \
  15120. title="wglgears" \
  15121. publisher="Clinton L. Jeffery" \
  15122. year="2005" \
  15123. media="download" \
  15124. file1="wglgears.exe" \
  15125. installed_exe1="${W_SYSTEM32_DLLS_WIN}/wglgears.exe"
  15126. load_wglgears()
  15127. {
  15128. # Original site http://www2.cs.uidaho.edu/~jeffery/win32/wglgears.exe is 403 as of 2019/04/07
  15129. w_download https://web.archive.org/web/20091001002702/http://www2.cs.uidaho.edu/~jeffery/win32/wglgears.exe 858ba95ea3c9af4ded1f4100e59b6e8e57024f3efef56304dbd48106e8f2f6f7
  15130. cp "${W_CACHE}"/wglgears/wglgears.exe "${W_SYSTEM32_DLLS}"
  15131. chmod +x "${W_SYSTEM32_DLLS}/wglgears.exe"
  15132. }
  15133. #######################
  15134. # settings
  15135. #######################
  15136. ####
  15137. # settings->desktop
  15138. #----------------------------------------------------------------
  15139. # DirectInput settings
  15140. w_metadata mwo=force settings \
  15141. title_uk="Встановити примусове DirectInput MouseWarpOverride (необхідно для деяких ігор)" \
  15142. title="Set DirectInput MouseWarpOverride to force (needed by some games)"
  15143. w_metadata mwo=enabled settings \
  15144. title_uk="Увімкнути DirectInput MouseWarpOverride (за замовчуванням)" \
  15145. title="Set DirectInput MouseWarpOverride to enabled (default)"
  15146. w_metadata mwo=disable settings \
  15147. title_uk="Вимкнути DirectInput MouseWarpOverride" \
  15148. title="Set DirectInput MouseWarpOverride to disable"
  15149. load_mwo()
  15150. {
  15151. # Filter out/correct bad or partial values
  15152. # Confusing because dinput uses 'disable', but d3d uses 'disabled'
  15153. # see alloc_device() in dlls/dinput/mouse.c
  15154. case "$1" in
  15155. enable*) arg=enabled;;
  15156. disable*) arg=disable;;
  15157. force) arg=force;;
  15158. *) w_die "illegal value $1 for MouseWarpOverride";;
  15159. esac
  15160. echo "Setting MouseWarpOverride to ${arg}"
  15161. cat > "${W_TMP}"/set-mwo.reg <<_EOF_
  15162. REGEDIT4
  15163. [HKEY_CURRENT_USER\\Software\\Wine\\DirectInput]
  15164. "MouseWarpOverride"="${arg}"
  15165. _EOF_
  15166. w_try_regedit "${W_TMP}"/set-mwo.reg
  15167. }
  15168. #----------------------------------------------------------------
  15169. w_metadata fontfix settings \
  15170. title_uk="Перевірка шрифтів" \
  15171. title="Check for broken fonts"
  15172. load_fontfix()
  15173. {
  15174. # Focht says Samyak is bad news, and font substitution isn't a good workaround.
  15175. # I've seen psdkwin7 setup crash because of this; the symptom was a messagebox saying
  15176. # SDKSetup encountered an error: The type initializer for 'Microsoft.WizardFramework.WizardSettings' threw an exception
  15177. # and WINEDEBUG=+relay,+seh shows an exception very quickly after
  15178. # Call KERNEL32.CreateFileW(0c83b36c L"Z:\\USR\\SHARE\\FONTS\\TRUETYPE\\TTF-ORIYA-FONTS\\SAMYAK-ORIYA.TTF",80000000,00000001,00000000,00000003,00000080,00000000) ret=70d44091
  15179. if [ -x "$(command -v xlsfonts 2>/dev/null)" ] ; then
  15180. if xlsfonts 2>/dev/null | grep -E -i "samyak.*oriya" ; then
  15181. 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."
  15182. fi
  15183. else
  15184. w_warn "xlsfonts not found. If you have (older versions of) Samyak/Oriya fonts installed, you may get crashes/bugs. If so, uninstall, then logout/login again to resolve."
  15185. fi
  15186. }
  15187. #----------------------------------------------------------------
  15188. w_metadata fontsmooth=disable settings \
  15189. title_uk="Вимкнути згладжування шрифту" \
  15190. title="Disable font smoothing"
  15191. w_metadata fontsmooth=bgr settings \
  15192. title_uk="Увімкнути субпіксельне згладжування шрифту для BGR LCD моніторів" \
  15193. title="Enable subpixel font smoothing for BGR LCDs"
  15194. w_metadata fontsmooth=rgb settings \
  15195. title_uk="Увімкнути субпіксельне згладжування шрифту для RGB LCD моніторів" \
  15196. title="Enable subpixel font smoothing for RGB LCDs"
  15197. w_metadata fontsmooth=gray settings \
  15198. title_uk="Увімкнути субпіксельне згладжування шрифту" \
  15199. title="Enable subpixel font smoothing"
  15200. load_fontsmooth()
  15201. {
  15202. case "$1" in
  15203. disable) FontSmoothing=0; FontSmoothingOrientation=1; FontSmoothingType=0;;
  15204. gray|grey) FontSmoothing=2; FontSmoothingOrientation=1; FontSmoothingType=1;;
  15205. bgr) FontSmoothing=2; FontSmoothingOrientation=0; FontSmoothingType=2;;
  15206. rgb) FontSmoothing=2; FontSmoothingOrientation=1; FontSmoothingType=2;;
  15207. *) w_die "unknown font smoothing type $1";;
  15208. esac
  15209. echo "Setting font smoothing to $1"
  15210. cat > "${W_TMP}"/fontsmooth.reg <<_EOF_
  15211. REGEDIT4
  15212. [HKEY_CURRENT_USER\\Control Panel\\Desktop]
  15213. "FontSmoothing"="${FontSmoothing}"
  15214. "FontSmoothingGamma"=dword:00000578
  15215. "FontSmoothingOrientation"=dword:0000000${FontSmoothingOrientation}
  15216. "FontSmoothingType"=dword:0000000${FontSmoothingType}
  15217. _EOF_
  15218. w_try_regedit "${W_TMP_WIN}"\\fontsmooth.reg
  15219. }
  15220. #----------------------------------------------------------------
  15221. # Mac Driver settings
  15222. w_metadata macdriver=mac settings \
  15223. title_uk="Увімкнути рідний Mac Quartz драйвер (за замовчуванням)" \
  15224. title="Enable the Mac native Quartz driver (default)"
  15225. w_metadata macdriver=x11 settings \
  15226. title_uk="Вимкнути рідний Mac Quartz драйвер та використовувати замість нього X11" \
  15227. title="Disable the Mac native Quartz driver, use X11 instead"
  15228. load_macdriver()
  15229. {
  15230. echo "Setting MacDriver to ${arg}"
  15231. cat > "${W_TMP}"/set-mac.reg <<_EOF_
  15232. REGEDIT4
  15233. [HKEY_CURRENT_USER\\Software\\Wine\\Drivers]
  15234. "Graphics"="${arg}"
  15235. _EOF_
  15236. w_try_regedit "${W_TMP}"/set-mac.reg
  15237. }
  15238. #----------------------------------------------------------------
  15239. w_metadata mackeyremap=both settings \
  15240. title="Enable mapping opt->alt and cmd->ctrl keys for the Mac native driver"
  15241. w_metadata mackeyremap=left settings \
  15242. title="Enable mapping of left opt->alt and cmd->ctrl keys for the Mac native driver"
  15243. w_metadata mackeyremap=none settings \
  15244. title="Do not remap keys for the Mac native driver (default)"
  15245. load_mackeyremap()
  15246. {
  15247. case "$1" in
  15248. both|y) arg=both; _W_arg_l=y; _W_arg_r=y ;;
  15249. left) arg=left; _W_arg_l=y; _W_arg_r=n ;;
  15250. none|n) arg=none; _W_arg_l=n; _W_arg_r=n ;;
  15251. *) w_die "illegal value $1 for MacKeyRemap";;
  15252. esac
  15253. echo "Setting MacKeyRemap to ${arg}"
  15254. cat > "${W_TMP}"/set-mackeyremap.reg <<_EOF_
  15255. REGEDIT4
  15256. [HKEY_CURRENT_USER\\Software\\Wine\\Mac Driver]
  15257. "LeftCommandIsCtrl"="${_W_arg_l}"
  15258. "LeftOptionIsAlt"="${_W_arg_l}"
  15259. "RightCommandIsCtrl"="${_W_arg_r}"
  15260. "RightOptionIsAlt"="${_W_arg_r}"
  15261. _EOF_
  15262. w_try_regedit "${W_TMP}"/set-mackeyremap.reg
  15263. unset _W_arg_l _W_arg_r
  15264. }
  15265. #----------------------------------------------------------------
  15266. # X11 Driver settings
  15267. w_metadata grabfullscreen=y settings \
  15268. title_uk="Примусове захоплення курсору для повноекранних вікон (необхідно для деяких ігор)" \
  15269. title="Force cursor clipping for full-screen windows (needed by some games)"
  15270. w_metadata grabfullscreen=n settings \
  15271. title_uk="Вимкнути примусове захоплення курсору для повноекранних вікон (за замовчуванням)" \
  15272. title="Disable cursor clipping for full-screen windows (default)"
  15273. load_grabfullscreen()
  15274. {
  15275. case "$1" in
  15276. y|n) arg=$1;;
  15277. *) w_die "illegal value $1 for GrabFullscreen";;
  15278. esac
  15279. echo "Setting GrabFullscreen to ${arg}"
  15280. cat > "${W_TMP}"/set-gfs.reg <<_EOF_
  15281. REGEDIT4
  15282. [HKEY_CURRENT_USER\\Software\\Wine\\X11 Driver]
  15283. "GrabFullscreen"="${arg}"
  15284. _EOF_
  15285. w_try_regedit "${W_TMP}"/set-gfs.reg
  15286. }
  15287. w_metadata windowmanagerdecorated=y settings \
  15288. title_uk="Дозволити менеджеру вікон декорувати вікна (за замовчуванням)" \
  15289. title="Allow the window manager to decorate windows (default)"
  15290. w_metadata windowmanagerdecorated=n settings \
  15291. title_uk="Не дозволяти менеджеру вікон декорувати вікна" \
  15292. title="Prevent the window manager from decorating windows"
  15293. #----------------------------------------------------------------
  15294. w_metadata usetakefocus=y settings \
  15295. title_cz="Aktivovat UseTakeFocus" \
  15296. title_uk="Увімкнути фокусування на вікні" \
  15297. title_sk="Aktivovať UseTakeFocus" \
  15298. title_tlh="Qorwagh buSchoH \'e\' chu\'" \
  15299. title="Enable UseTakeFocus"
  15300. w_metadata usetakefocus=n settings \
  15301. title_cz="Deaktivovat UseTakeFocus (výchozí)" \
  15302. title_uk="Вимкнути фокусування на вікні (за замовчуванням)" \
  15303. title_sk="Deaktivovať UseTakeFocus (výchozí)" \
  15304. title_tlh="Qorwagh buSchoH \'e\' chu\'Ha\' (DuH choHlu\'pu\'be\'bogh)" \
  15305. title="Disable UseTakeFocus (default)"
  15306. load_usetakefocus()
  15307. {
  15308. case "$1" in
  15309. y) arg="Y";;
  15310. n) arg="N";;
  15311. *) w_die "illegal value $1 for UseTakeFocus";;
  15312. esac
  15313. echo "Setting UseTakeFocus to ${arg}"
  15314. cat > "${W_TMP}"/set-usetakefocus.reg <<_EOF_
  15315. REGEDIT4
  15316. [HKEY_CURRENT_USER\\Software\\Wine\\X11 Driver]
  15317. "UseTakeFocus"="${arg}"
  15318. _EOF_
  15319. w_try_regedit "${W_TMP}"/set-usetakefocus.reg
  15320. }
  15321. #----------------------------------------------------------------
  15322. load_windowmanagerdecorated()
  15323. {
  15324. case "$1" in
  15325. y|n) arg=$1;;
  15326. *) w_die "illegal value $1 for Decorated";;
  15327. esac
  15328. echo "Setting Decorated to ${arg}"
  15329. cat > "${W_TMP}"/set-wmd.reg <<_EOF_
  15330. REGEDIT4
  15331. [HKEY_CURRENT_USER\\Software\\Wine\\X11 Driver]
  15332. "Decorated"="${arg}"
  15333. _EOF_
  15334. w_try_regedit "${W_TMP}"/set-wmd.reg
  15335. }
  15336. w_metadata windowmanagermanaged=y settings \
  15337. title_uk="Дозволити менеджеру вікон керування вікнами (за замовчуванням)" \
  15338. title="Allow the window manager to control windows (default)"
  15339. w_metadata windowmanagermanaged=n settings \
  15340. title_uk="Не дозволяти менеджеру вікон керування вікнами" \
  15341. title="Prevent the window manager from controlling windows"
  15342. #----------------------------------------------------------------
  15343. load_windowmanagermanaged()
  15344. {
  15345. case "$1" in
  15346. y|n) arg=$1;;
  15347. *) w_die "illegal value $1 for Managed";;
  15348. esac
  15349. echo "Setting Managed to ${arg}"
  15350. cat > "${W_TMP}"/set-wmm.reg <<_EOF_
  15351. REGEDIT4
  15352. [HKEY_CURRENT_USER\\Software\\Wine\\X11 Driver]
  15353. "Managed"="${arg}"
  15354. _EOF_
  15355. w_try_regedit "${W_TMP}"/set-wmm.reg
  15356. }
  15357. #----------------------------------------------------------------
  15358. w_metadata vd=off settings \
  15359. title_uk="Вимкнути віртуальний робочий стіл" \
  15360. title="Disable virtual desktop"
  15361. w_metadata vd=640x480 settings \
  15362. title_uk="Увімкнути віртуальний робочий стіл та встановити розмір 640x480" \
  15363. title="Enable virtual desktop, set size to 640x480"
  15364. w_metadata vd=800x600 settings \
  15365. title_uk="Увімкнути віртуальний робочий стіл та встановити розмір 800x600" \
  15366. title="Enable virtual desktop, set size to 800x600"
  15367. w_metadata vd=1024x768 settings \
  15368. title_uk="Увімкнути віртуальний робочий стіл та встановити розмір 1024x768" \
  15369. title="Enable virtual desktop, set size to 1024x768"
  15370. w_metadata vd=1280x1024 settings \
  15371. title_uk="Увімкнути віртуальний робочий стіл та встановити розмір 1280x1024" \
  15372. title="Enable virtual desktop, set size to 1280x1024"
  15373. w_metadata vd=1440x900 settings \
  15374. title_uk="Увімкнути віртуальний робочий стіл та встановити розмір 1440x900" \
  15375. title="Enable virtual desktop, set size to 1440x900"
  15376. load_vd()
  15377. {
  15378. size="$1"
  15379. case ${size} in
  15380. off|disabled)
  15381. cat > "${W_TMP}"/vd.reg <<_EOF_
  15382. REGEDIT4
  15383. [HKEY_CURRENT_USER\\Software\\Wine\\Explorer]
  15384. "Desktop"=-
  15385. [HKEY_CURRENT_USER\\Software\\Wine\\Explorer\\Desktops]
  15386. "Default"=-
  15387. _EOF_
  15388. ;;
  15389. [1-9]*x[1-9]*)
  15390. cat > "${W_TMP}"/vd.reg <<_EOF_
  15391. REGEDIT4
  15392. [HKEY_CURRENT_USER\\Software\\Wine\\Explorer]
  15393. "Desktop"="Default"
  15394. [HKEY_CURRENT_USER\\Software\\Wine\\Explorer\\Desktops]
  15395. "Default"="${size}"
  15396. _EOF_
  15397. ;;
  15398. *)
  15399. w_die "you want a virtual desktop of ${size}? I don't understand."
  15400. ;;
  15401. esac
  15402. w_try_regedit "${W_TMP_WIN}"/vd.reg
  15403. w_wineserver -w
  15404. }
  15405. #----------------------------------------------------------------
  15406. # MIME-type file associations settings
  15407. w_metadata mimeassoc=on settings \
  15408. title="Enable exporting MIME-type file associations to the native desktop (default)"
  15409. w_metadata mimeassoc=off settings \
  15410. title="Disable exporting MIME-type file associations to the native desktop"
  15411. load_mimeassoc()
  15412. {
  15413. case "$1" in
  15414. off) arg=N;;
  15415. on) arg=Y;;
  15416. *) w_die "illegal value $1 for mimeassoc";;
  15417. esac
  15418. echo "Setting mimeassoc to ${arg}"
  15419. cat > "${W_TMP}"/set-mimeassoc.reg <<_EOF_
  15420. REGEDIT4
  15421. [HKEY_CURRENT_USER\\Software\\Wine\\FileOpenAssociations]
  15422. "Enable"="${arg}"
  15423. _EOF_
  15424. w_try_regedit "${W_TMP}"/set-mimeassoc.reg
  15425. }
  15426. ####
  15427. # settings->direct3d
  15428. winetricks_set_wined3d_var()
  15429. {
  15430. # Filter out/correct bad or partial values
  15431. # Confusing because dinput uses 'disable', but d3d uses 'disabled'
  15432. # see wined3d_dll_init() in dlls/wined3d/wined3d_main.c
  15433. # and DllMain() in dlls/ddraw/main.c
  15434. case $2 in
  15435. disable*) arg=disabled;;
  15436. enable*) arg=enabled;;
  15437. hard*) arg=hardware;;
  15438. repack) arg=repack;;
  15439. arb|backbuffer|fbo|gdi|gl|glsl|no3d|none|readdraw|readtex|texdraw|textex|vulkan|auto) arg=$2;;
  15440. [0-9]*) arg=$2;;
  15441. *) w_die "illegal value $2 for $1";;
  15442. esac
  15443. echo "Setting Direct3D/$1 to ${arg}"
  15444. cat > "${W_TMP}"/set-wined3d.reg <<_EOF_
  15445. REGEDIT4
  15446. [HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]
  15447. "$1"="${arg}"
  15448. _EOF_
  15449. w_try_regedit "${W_TMP_WIN}"\\set-wined3d.reg
  15450. }
  15451. #----------------------------------------------------------------
  15452. # CheckFloatConstants settings
  15453. w_metadata cfc=enabled settings \
  15454. title_uk="Увімкнути CheckFloatConstants" \
  15455. title="Enable CheckFloatConstants"
  15456. w_metadata cfc=disabled settings \
  15457. title_uk="Вимкнути CheckFloatConstants (за замовчуванням)" \
  15458. title="Disable CheckFloatConstants (default)"
  15459. load_cfc()
  15460. {
  15461. winetricks_set_wined3d_var CheckFloatConstants "$1"
  15462. }
  15463. #----------------------------------------------------------------
  15464. # CSMT settings
  15465. w_metadata csmt=force settings \
  15466. title_uk="Увімкнути та примусити серіалізацію команд OpenGL або Vulkan між кількома потоками команд в одній програмі" \
  15467. title="Enable and force serialisation of OpenGL or Vulkan commands between multiple command streams in the same application"
  15468. w_metadata csmt=on settings \
  15469. title_uk="Увімкнути Command Stream Multithreading (за замовчуванням)" \
  15470. title="Enable Command Stream Multithreading (default)"
  15471. w_metadata csmt=off settings \
  15472. title_uk="Вимкнути Command Stream Multithreading"\
  15473. title="Disable Command Stream Multithreading"
  15474. load_csmt()
  15475. {
  15476. case "$1" in
  15477. off) arg=0;;
  15478. on) arg=1;;
  15479. force) arg=3;;
  15480. *) w_die "illegal value $1 for csmt";;
  15481. esac
  15482. echo "Setting csmt to ${arg}"
  15483. cat > "${W_TMP}"/set-csmt.reg <<_EOF_
  15484. REGEDIT4
  15485. [HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]
  15486. "csmt"=dword:${arg}
  15487. _EOF_
  15488. w_try_regedit "${W_TMP}"/set-csmt.reg
  15489. }
  15490. #----------------------------------------------------------------
  15491. # DirectDraw settings
  15492. w_metadata gsm=0 settings \
  15493. title_uk="Встановити MaxShaderModelGS на 0" \
  15494. title="Set MaxShaderModelGS to 0"
  15495. w_metadata gsm=1 settings \
  15496. title_uk="Встановити MaxShaderModelGS на 1" \
  15497. title="Set MaxShaderModelGS to 1"
  15498. w_metadata gsm=2 settings \
  15499. title_uk="Встановити MaxShaderModelGS на 2" \
  15500. title="Set MaxShaderModelGS to 2"
  15501. w_metadata gsm=3 settings \
  15502. title_uk="Встановити MaxShaderModelGS на 3" \
  15503. title="Set MaxShaderModelGS to 3"
  15504. load_gsm()
  15505. {
  15506. winetricks_set_wined3d_var MaxShaderModelGS "$1"
  15507. }
  15508. #----------------------------------------------------------------
  15509. w_metadata npm=repack settings \
  15510. title_uk="Встановити NonPower2Mode на repack" \
  15511. title="Set NonPower2Mode to repack"
  15512. load_npm()
  15513. {
  15514. winetricks_set_wined3d_var NonPower2Mode "$1"
  15515. }
  15516. #----------------------------------------------------------------
  15517. w_metadata orm=fbo settings \
  15518. title_uk="Встановити OffscreenRenderingMode=fbo (за замовчуванням)" \
  15519. title="Set OffscreenRenderingMode=fbo (default)"
  15520. w_metadata orm=backbuffer settings \
  15521. title_uk="Встановити OffscreenRenderingMode=backbuffer" \
  15522. title="Set OffscreenRenderingMode=backbuffer"
  15523. load_orm()
  15524. {
  15525. winetricks_set_wined3d_var OffscreenRenderingMode "$1"
  15526. }
  15527. #----------------------------------------------------------------
  15528. w_metadata psm=0 settings \
  15529. title_uk="Встановити MaxShaderModelPS на 0" \
  15530. title="Set MaxShaderModelPS to 0"
  15531. w_metadata psm=1 settings \
  15532. title_uk="Встановити MaxShaderModelPS на 1" \
  15533. title="Set MaxShaderModelPS to 1"
  15534. w_metadata psm=2 settings \
  15535. title_uk="Встановити MaxShaderModelPS на 2" \
  15536. title="Set MaxShaderModelPS to 2"
  15537. w_metadata psm=3 settings \
  15538. title_uk="Встановити MaxShaderModelPS на 3" \
  15539. title="Set MaxShaderModelPS to 3"
  15540. load_psm()
  15541. {
  15542. winetricks_set_wined3d_var MaxShaderModelPS "$1"
  15543. }
  15544. #----------------------------------------------------------------
  15545. w_metadata shader_backend=glsl settings \
  15546. title_uk="Встановити shader_backend на glsl" \
  15547. title="Set shader_backend to glsl"
  15548. w_metadata shader_backend=arb settings \
  15549. title_uk="Встановити shader_backend на arb" \
  15550. title="Set shader_backend to arb"
  15551. w_metadata shader_backend=none settings \
  15552. title_uk="Встановити shader_backend на none" \
  15553. title="Set shader_backend to none"
  15554. load_shader_backend()
  15555. {
  15556. winetricks_set_wined3d_var shader_backend "$1"
  15557. }
  15558. #----------------------------------------------------------------
  15559. w_metadata ssm=disabled settings \
  15560. title_uk="Вимкнути Struct Shader Math (за замовчуванням)" \
  15561. title="Disable Struct Shader Math (default)"
  15562. w_metadata ssm=enabled settings \
  15563. title_uk="Увімкнути Struct Shader Math"\
  15564. title="Enable Struct Shader Math"
  15565. load_ssm()
  15566. {
  15567. case "$1" in
  15568. disabled) arg=0;;
  15569. enabled) arg=1;;
  15570. *) w_die "illegal value $1 for csmt";;
  15571. esac
  15572. echo "Setting strict_shader_math to ${arg}"
  15573. cat > "${W_TMP}"/set-ssm.reg <<_EOF_
  15574. REGEDIT4
  15575. [HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]
  15576. "strict_shader_math"=dword:${arg}
  15577. _EOF_
  15578. w_try_regedit "${W_TMP}"/set-ssm.reg
  15579. }
  15580. #----------------------------------------------------------------
  15581. w_metadata renderer=gdi settings \
  15582. title_uk="Встановити renderer на gdi" \
  15583. title="Set renderer to gdi"
  15584. w_metadata renderer=gl settings \
  15585. title_uk="Встановити renderer на gl" \
  15586. title="Set renderer to gl"
  15587. w_metadata renderer=no3d settings \
  15588. title_uk="Встановити renderer на no3d" \
  15589. title="Set renderer to no3d"
  15590. w_metadata renderer=vulkan settings \
  15591. title_uk="Встановити renderer на vulkan" \
  15592. title="Set renderer to vulkan"
  15593. load_renderer()
  15594. {
  15595. winetricks_set_wined3d_var renderer "$1"
  15596. }
  15597. #----------------------------------------------------------------=
  15598. w_metadata rtlm=auto settings \
  15599. title_uk="Встановити RenderTargetLockMode на авто (за замовчуванням)" \
  15600. title="Set RenderTargetLockMode to auto (default)"
  15601. w_metadata rtlm=disabled settings \
  15602. title_uk="Вимкнути RenderTargetLockMode" \
  15603. title="Set RenderTargetLockMode to disabled"
  15604. w_metadata rtlm=readdraw settings \
  15605. title_uk="Встановити RenderTargetLockMode на readdraw" \
  15606. title="Set RenderTargetLockMode to readdraw"
  15607. w_metadata rtlm=readtex settings \
  15608. title_uk="Встановити RenderTargetLockMode на readtex" \
  15609. title="Set RenderTargetLockMode to readtex"
  15610. w_metadata rtlm=texdraw settings \
  15611. title_uk="Встановити RenderTargetLockMode на texdraw" \
  15612. title="Set RenderTargetLockMode to texdraw"
  15613. w_metadata rtlm=textex settings \
  15614. title_uk="Встановити RenderTargetLockMode на textex" \
  15615. title="Set RenderTargetLockMode to textex"
  15616. load_rtlm()
  15617. {
  15618. winetricks_set_wined3d_var RenderTargetLockMode "$1"
  15619. }
  15620. #----------------------------------------------------------------
  15621. w_metadata set_mididevice settings \
  15622. title="Set MIDImap device to the value specified in the MIDI_DEVICE environment variable"
  15623. load_set_mididevice()
  15624. {
  15625. if [ -z "${MIDI_DEVICE}" ]; then
  15626. MIDI_DEVICE=$(w_question "Please specify MIDImap device: ")
  15627. [ -z "${MIDI_DEVICE}" ] && w_die "Please specify device in MIDI_DEVICE environment variable."
  15628. fi
  15629. echo "Setting MIDI device to \"${MIDI_DEVICE}\""
  15630. cat > "${W_TMP}"/set-mididevice.reg <<_EOF_
  15631. REGEDIT4
  15632. [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Multimedia\MIDIMap]
  15633. "CurrentInstrument"="${MIDI_DEVICE}"
  15634. _EOF_
  15635. w_try_regedit "${W_TMP_WIN}"\\set-mididevice.reg
  15636. }
  15637. #----------------------------------------------------------------
  15638. w_metadata videomemorysize=default settings \
  15639. title_uk="Дати можливість Wine визначити розмір відеопам'яті" \
  15640. title="Let Wine detect amount of video card memory"
  15641. w_metadata videomemorysize=512 settings \
  15642. title_uk="Повідомити Wine про 512МБ відеопам'яті" \
  15643. title="Tell Wine your video card has 512MB RAM"
  15644. w_metadata videomemorysize=1024 settings \
  15645. title_uk="Повідомити Wine про 1024МБ відеопам'яті" \
  15646. title="Tell Wine your video card has 1024MB RAM"
  15647. w_metadata videomemorysize=2048 settings \
  15648. title_uk="Повідомити Wine про 2048МБ відеопам'яті" \
  15649. title="Tell Wine your video card has 2048MB RAM"
  15650. load_videomemorysize()
  15651. {
  15652. size="$1"
  15653. echo "Setting video memory size to ${size}"
  15654. case ${size} in
  15655. default)
  15656. cat > "${W_TMP}"/set-video.reg <<_EOF_
  15657. REGEDIT4
  15658. [HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]
  15659. "VideoMemorySize"=-
  15660. _EOF_
  15661. ;;
  15662. *)
  15663. cat > "${W_TMP}"/set-video.reg <<_EOF_
  15664. REGEDIT4
  15665. [HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]
  15666. "VideoMemorySize"="${size}"
  15667. _EOF_
  15668. ;;
  15669. esac
  15670. w_try_regedit "${W_TMP_WIN}"\\set-video.reg
  15671. }
  15672. #----------------------------------------------------------------
  15673. w_metadata vsm=0 settings \
  15674. title_uk="Встановити MaxShaderModelVS на 0" \
  15675. title="Set MaxShaderModelVS to 0"
  15676. w_metadata vsm=1 settings \
  15677. title_uk="Встановити MaxShaderModelVS на 1" \
  15678. title="Set MaxShaderModelVS to 1"
  15679. w_metadata vsm=2 settings \
  15680. title_uk="Встановити MaxShaderModelVS на 2" \
  15681. title="Set MaxShaderModelVS to 2"
  15682. w_metadata vsm=3 settings \
  15683. title_uk="Встановити MaxShaderModelVS на 3" \
  15684. title="Set MaxShaderModelVS to 3"
  15685. load_vsm()
  15686. {
  15687. winetricks_set_wined3d_var MaxShaderModelVS "$1"
  15688. }
  15689. ####
  15690. # settings->debug
  15691. #----------------------------------------------------------------
  15692. w_metadata autostart_winedbg=enabled settings \
  15693. title="Automatically launch winedbg when an unhandled exception occurs (default)"
  15694. w_metadata autostart_winedbg=disabled settings \
  15695. title="Prevent winedbg from launching when an unhandled exception occurs"
  15696. load_autostart_winedbg()
  15697. {
  15698. case "${arg}" in
  15699. # accidentally commited as enable/disable, so accept that, but prefer enabled/disabled
  15700. enable|enabled) _W_debugger_value="winedbg --auto %ld %ld";;
  15701. disable|disabled) _W_debugger_value="false";;
  15702. *) w_die "Unexpected argument '${arg}'. Should be enable/disable";;
  15703. esac
  15704. echo "Setting HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug\\Debugger to '${arg}'"
  15705. cat > "${W_TMP}"/autostart_winedbg.reg <<_EOF_
  15706. REGEDIT4
  15707. [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug]
  15708. "Debugger"="${_W_debugger_value}"
  15709. _EOF_
  15710. w_try_regedit "${W_TMP_WIN}"\\autostart_winedbg.reg
  15711. w_backup_reg_file "${W_TMP}"/autostart_winedbg.reg
  15712. unset _W_debugger_value
  15713. }
  15714. #----------------------------------------------------------------
  15715. w_metadata heapcheck settings \
  15716. title_uk="Увімкнути накопичувальну перевірку GlobalFlag" \
  15717. title="Enable heap checking with GlobalFlag"
  15718. load_heapcheck()
  15719. {
  15720. cat > "${W_TMP}"/heapcheck.reg <<_EOF_
  15721. REGEDIT4
  15722. [HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager]
  15723. "GlobalFlag"=dword:00200030
  15724. _EOF_
  15725. w_try_regedit "${W_TMP_WIN}"\\heapcheck.reg
  15726. }
  15727. #----------------------------------------------------------------
  15728. w_metadata nocrashdialog settings \
  15729. title_uk="Вимкнути діалог про помилку" \
  15730. title="Disable crash dialog"
  15731. load_nocrashdialog()
  15732. {
  15733. echo "Disabling graphical crash dialog"
  15734. cat > "${W_TMP}"/crashdialog.reg <<_EOF_
  15735. REGEDIT4
  15736. [HKEY_CURRENT_USER\\Software\\Wine\\WineDbg]
  15737. "ShowCrashDialog"=dword:00000000
  15738. _EOF_
  15739. w_try_cd "${W_TMP}"
  15740. w_try_regedit crashdialog.reg
  15741. }
  15742. w_metadata set_userpath settings \
  15743. title_uk="" \
  15744. title="set user PATH variable in wine prefix specified by native and/or wine paths in WINEPATH environment variable with ';' as path separator"
  15745. load_set_userpath()
  15746. {
  15747. wineuserpath=$(winepath -w "${WINEPATH}" | sed 's,\\,\\\\,g')
  15748. cat > "${W_TMP}"/setuserpath.reg <<_EOF_
  15749. REGEDIT4
  15750. [HKEY_CURRENT_USER\\Environment]
  15751. "PATH"="${wineuserpath}"
  15752. _EOF_
  15753. w_try_cd "${W_TMP}"
  15754. w_try_regedit setuserpath.reg
  15755. }
  15756. ####
  15757. # settings->misc
  15758. w_metadata alldlls=default settings \
  15759. title_uk="Видалити всі перевизначення DLL" \
  15760. title="Remove all DLL overrides"
  15761. w_metadata alldlls=builtin settings \
  15762. title_uk="Перевизначити найбільш поширені DLL на вбудовані" \
  15763. title="Override most common DLLs to builtin"
  15764. load_alldlls()
  15765. {
  15766. case "$1" in
  15767. default) w_override_no_dlls ;;
  15768. builtin) w_override_all_dlls ;;
  15769. esac
  15770. }
  15771. #----------------------------------------------------------------
  15772. w_metadata bad settings \
  15773. title="Fake verb that always returns false"
  15774. load_bad()
  15775. {
  15776. w_die "${W_PACKAGE} failed!"
  15777. }
  15778. #----------------------------------------------------------------
  15779. w_metadata forcemono settings \
  15780. title_uk="Примусове використання mono замість .NET (для налагодження)" \
  15781. title="Force using Mono instead of .NET (for debugging)"
  15782. load_forcemono()
  15783. {
  15784. w_override_dlls native mscoree
  15785. w_override_dlls disabled mscorsvw.exe
  15786. }
  15787. #----------------------------------------------------------------
  15788. w_metadata good settings \
  15789. title="Fake verb that always returns true"
  15790. load_good()
  15791. {
  15792. w_info "${W_PACKAGE} succeeded!"
  15793. }
  15794. #----------------------------------------------------------------
  15795. w_metadata hidewineexports=enable settings \
  15796. title="Enable hiding Wine exports from applications (wine-staging)"
  15797. w_metadata hidewineexports=disable settings \
  15798. title="Disable hiding Wine exports from applications (wine-staging)"
  15799. load_hidewineexports()
  15800. {
  15801. # Wine exports some functions allowing apps to query the Wine version and
  15802. # information about the host environment. Using these functions, some apps
  15803. # will intentionally terminate if they can detect that they are running in
  15804. # a Wine environment.
  15805. #
  15806. # Hiding these Wine exports is only available in wine-staging.
  15807. # See https://bugs.winehq.org/show_bug.cgi?id=38656
  15808. case ${arg} in
  15809. enable)
  15810. _W_registry_value="\"Y\""
  15811. ;;
  15812. disable)
  15813. _W_registry_value="-"
  15814. ;;
  15815. *) w_die "Unexpected argument, ${arg}";;
  15816. esac
  15817. cat > "${W_TMP}"/set-wineexports.reg <<_EOF_
  15818. REGEDIT4
  15819. [HKEY_CURRENT_USER\\Software\\Wine]
  15820. "HideWineExports"=${_W_registry_value}
  15821. _EOF_
  15822. w_try_regedit "${W_TMP}"/set-wineexports.reg
  15823. }
  15824. #----------------------------------------------------------------
  15825. w_metadata hosts settings \
  15826. title_uk="Додати порожні файли у C:\\windows\\system32\\drivers\\etc\\{hosts,services}" \
  15827. title="Add empty C:\\windows\\system32\\drivers\\etc\\{hosts,services} files"
  15828. load_hosts()
  15829. {
  15830. # Create fake system32\drivers\etc\hosts and system32\drivers\etc\services files.
  15831. # The hosts file is used to map network names to IP addresses without DNS.
  15832. # The services file is used map service names to network ports.
  15833. # Some apps depend on these files, but they're not implemented in Wine.
  15834. # Fortunately, empty files in the correct location satisfy those apps.
  15835. # See https://bugs.winehq.org/show_bug.cgi?id=12076
  15836. # It's in system32 for both win32/win64
  15837. w_try_mkdir "${W_WINDIR_UNIX}"/system32/drivers/etc
  15838. touch "${W_WINDIR_UNIX}"/system32/drivers/etc/hosts
  15839. touch "${W_WINDIR_UNIX}"/system32/drivers/etc/services
  15840. }
  15841. #----------------------------------------------------------------
  15842. w_metadata isolate_home settings \
  15843. title_uk="Видалити посилання на вино преміум на \$HOME" \
  15844. title="Remove wineprefix links to \$HOME"
  15845. load_isolate_home()
  15846. {
  15847. w_skip_windows isolate_home && return
  15848. LANG=C find "${WINEPREFIX}/drive_c/users/${USER}" -type l | while IFS= read -r _W_symlink; do
  15849. # handle chained symlinks, which ultimately resolve outside $HOME, by using first symlink
  15850. _W_target="$(readlink "${_W_symlink}")"
  15851. if echo "${_W_target}" | grep -q "^${_W_symlink}"; then
  15852. echo "leaving symlink pointing inside the prefix: ${_W_symlink} -> ${_W_target}"
  15853. elif test -f "${_W_target}"; then
  15854. echo "ignoring file symlink: ${_W_symlink} -> ${_W_target}"
  15855. elif echo "${_W_target}" | grep -q "^${HOME}"; then
  15856. echo "removing directory symlink ${_W_symlink} -> ${_W_target} ..."
  15857. w_try rm -f "${_W_symlink}"
  15858. w_try_mkdir "${_W_symlink}"
  15859. else
  15860. echo "leaving data directory symlink not pointing to \$HOME: ${_W_symlink} -> ${_W_target}"
  15861. fi
  15862. done
  15863. # Workaround for:
  15864. # https://bugs.winehq.org/show_bug.cgi?id=22450 (sandbox verb)
  15865. # https://bugs.winehq.org/show_bug.cgi?id=22974 (isolate_home, sandbox verbs)
  15866. echo disable > "${WINEPREFIX}/.update-timestamp"
  15867. }
  15868. #----------------------------------------------------------------
  15869. w_metadata native_mdac settings \
  15870. title_uk="Перевизначити odbc32, odbccp32 та oledb32" \
  15871. title="Override odbc32, odbccp32 and oledb32"
  15872. load_native_mdac()
  15873. {
  15874. # Set those overrides globally so user programs get MDAC's ODBC
  15875. # instead of Wine's unixodbc
  15876. w_override_dlls native,builtin msado15
  15877. # For a while, this wasn't set (i.e., it was set to `builtin`, not `native,builtin`)
  15878. # See:
  15879. # https://github.com/Winetricks/winetricks/issues/1448
  15880. # https://github.com/Winetricks/winetricks/issues/1737
  15881. # https://github.com/Winetricks/winetricks/issues/1841
  15882. #
  15883. # https://bugs.winehq.org/show_bug.cgi?id=3158
  15884. # https://bugs.winehq.org/show_bug.cgi?id=3161
  15885. # https://bugs.winehq.org/show_bug.cgi?id=50460
  15886. # et al..
  15887. w_override_dlls native,builtin odbccp32
  15888. # https://github.com/Winetricks/winetricks/issues/1839
  15889. if w_wine_version_in ,6.21 ; then
  15890. w_override_dlls native,builtin msdasql
  15891. fi
  15892. w_override_dlls native,builtin mtxdm odbc32 oledb32
  15893. }
  15894. #----------------------------------------------------------------
  15895. w_metadata native_oleaut32 settings \
  15896. title_uk="Перевизначити oleaut32" \
  15897. title="Override oleaut32"
  15898. load_native_oleaut32()
  15899. {
  15900. w_override_dlls native,builtin oleaut32
  15901. }
  15902. #----------------------------------------------------------------
  15903. w_metadata remove_mono settings \
  15904. title_uk="Видалити вбудоване wine-mono" \
  15905. title="Remove builtin wine-mono"
  15906. load_remove_mono()
  15907. {
  15908. # Wine before 4.6 installs 'Wine Mono'
  15909. # Beginning in 4.6, if using a shared install (i.e., a distro mono package or a tarball manually
  15910. # extracted to /usr/share/wine/mono, or equivalent), only 'Wine Mono Windows Support' will be installed.
  15911. # If using the old .msi installer, *both* tarballs are installed.
  15912. #
  15913. # So, we uninstall anything that has 'Wine Mono' in the name to handle both cases.
  15914. # If wine uninstaller can't find the application it will return 0 anyway.
  15915. mono_uuid="$("${WINE_ARCH}" uninstaller --list | grep 'Wine Mono' | cut -f1 -d\|)"
  15916. if test "${mono_uuid}"; then
  15917. for uuid in ${mono_uuid}; do
  15918. "${WINE_ARCH}" uninstaller --remove "${uuid}"
  15919. done
  15920. elif [ -z "$1" ] || [ "$1" != "internal" ]; then
  15921. # Bail out if mono isn't installed, so we don't break .Net setups
  15922. w_warn "Mono does not appear to be installed."
  15923. return
  15924. fi
  15925. "${WINE_ARCH}" reg delete "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v3.5" /f || true
  15926. "${WINE_ARCH}" reg delete "HKLM\\Software\\Microsoft\\NET Framework Setup\\NDP\\v4" /f || true
  15927. w_try rm -f "${W_WINDIR_UNIX}/system32/mscoree.dll"
  15928. if [ "${W_ARCH}" = "win64" ]; then
  15929. w_try rm -f "${W_WINDIR_UNIX}/syswow64/mscoree.dll"
  15930. fi
  15931. }
  15932. #----------------------------------------------------------------
  15933. w_metadata sandbox settings \
  15934. title_uk="Пісочниця wineprefix - видалити посилання до HOME" \
  15935. title="Sandbox the wineprefix - remove links to \$HOME"
  15936. load_sandbox()
  15937. {
  15938. w_skip_windows sandbox && return
  15939. # Unmap drive Z
  15940. w_try rm -f "${WINEPREFIX}/dosdevices/z:"
  15941. # Disable unixfs
  15942. # Unfortunately, when you run with a different version of Wine, Wine will recreate this key.
  15943. # See https://bugs.winehq.org/show_bug.cgi?id=22450
  15944. w_try_regedit /D "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Desktop\\Namespace\\{9D20AAE8-0625-44B0-9CA7-71889C2254D9}"
  15945. w_call isolate_home
  15946. }
  15947. ####
  15948. # settings->sound
  15949. #----------------------------------------------------------------
  15950. w_metadata sound=alsa settings \
  15951. title_uk="Встановити звуковий драйвер ALSA" \
  15952. title="Set sound driver to ALSA"
  15953. w_metadata sound=coreaudio settings \
  15954. title_uk="Встановити звуковий драйвер Mac CoreAudio" \
  15955. title="Set sound driver to Mac CoreAudio"
  15956. w_metadata sound=disabled settings \
  15957. title_uk="Вимкнути звуковий драйвер" \
  15958. title="Set sound driver to disabled"
  15959. w_metadata sound=oss settings \
  15960. title_uk="Встановити звуковий драйвер OSS" \
  15961. title="Set sound driver to OSS"
  15962. w_metadata sound=pulse settings \
  15963. title_uk="Встановити звуковий драйвер PulseAudio" \
  15964. title="Set sound driver to PulseAudio"
  15965. load_sound()
  15966. {
  15967. echo "Setting sound driver to $1"
  15968. cat > "${W_TMP}"/set-sound.reg <<_EOF_
  15969. REGEDIT4
  15970. [HKEY_CURRENT_USER\\Software\\Wine\\Drivers]
  15971. "Audio"="$1"
  15972. _EOF_
  15973. w_try_regedit "${W_TMP_WIN}"\\set-sound.reg
  15974. }
  15975. # settings->winversions
  15976. #----------------------------------------------------------------
  15977. w_metadata nt351 settings \
  15978. title_uk="Встановити версію Windows NT 3.51" \
  15979. title="Set Windows version to Windows NT 3.51"
  15980. load_nt351()
  15981. {
  15982. w_package_unsupported_win64
  15983. w_set_winver nt351
  15984. }
  15985. #----------------------------------------------------------------
  15986. w_metadata nt40 settings \
  15987. title_uk="Встановити версію Windows NT 4.0" \
  15988. title="Set Windows version to Windows NT 4.0"
  15989. load_nt40()
  15990. {
  15991. w_package_unsupported_win64
  15992. w_set_winver nt40
  15993. }
  15994. #----------------------------------------------------------------
  15995. w_metadata vista settings \
  15996. title_uk="Встановити версію Windows Vista" \
  15997. title="Set Windows version to Windows Vista"
  15998. load_vista()
  15999. {
  16000. w_set_winver vista
  16001. }
  16002. #----------------------------------------------------------------
  16003. w_metadata win20 settings \
  16004. title_uk="Встановити версію Windows 2.0" \
  16005. title="Set Windows version to Windows 2.0"
  16006. load_win20()
  16007. {
  16008. w_package_unsupported_win64
  16009. w_set_winver win20
  16010. }
  16011. #----------------------------------------------------------------
  16012. w_metadata win2k settings \
  16013. title_uk="Встановити версію Windows 2000" \
  16014. title="Set Windows version to Windows 2000"
  16015. load_win2k()
  16016. {
  16017. w_package_unsupported_win64
  16018. w_set_winver win2k
  16019. }
  16020. #----------------------------------------------------------------
  16021. w_metadata win2k3 settings \
  16022. title_uk="Встановити версію Windows 2003" \
  16023. title="Set Windows version to Windows 2003"
  16024. load_win2k3()
  16025. {
  16026. w_set_winver win2k3
  16027. }
  16028. #----------------------------------------------------------------
  16029. w_metadata win2k8 settings \
  16030. title_uk="Встановити версію Windows 2008" \
  16031. title="Set Windows version to Windows 2008"
  16032. load_win2k8()
  16033. {
  16034. w_set_winver win2k8
  16035. }
  16036. #----------------------------------------------------------------
  16037. w_metadata win2k8r2 settings \
  16038. title_uk="Встановити версію Windows 2008 R2" \
  16039. title="Set Windows version to Windows 2008 R2"
  16040. load_win2k8r2()
  16041. {
  16042. w_set_winver win2k8r2
  16043. }
  16044. #----------------------------------------------------------------
  16045. w_metadata win30 settings \
  16046. title_uk="Встановити версію Windows 3.0" \
  16047. title="Set Windows version to Windows 3.0"
  16048. load_win30()
  16049. {
  16050. w_package_unsupported_win64
  16051. w_set_winver win30
  16052. }
  16053. #----------------------------------------------------------------
  16054. w_metadata win31 settings \
  16055. title_uk="Встановити версію Windows 3.1" \
  16056. title="Set Windows version to Windows 3.1"
  16057. load_win31()
  16058. {
  16059. w_package_unsupported_win64
  16060. w_set_winver win31
  16061. }
  16062. #----------------------------------------------------------------
  16063. w_metadata win7 settings \
  16064. title_uk="Встановити версію Windows 7" \
  16065. title="Set Windows version to Windows 7"
  16066. load_win7()
  16067. {
  16068. w_set_winver win7
  16069. }
  16070. #----------------------------------------------------------------
  16071. w_metadata win8 settings \
  16072. title_uk="Встановити версію Windows 8" \
  16073. title="Set Windows version to Windows 8"
  16074. load_win8()
  16075. {
  16076. w_set_winver win8
  16077. }
  16078. #----------------------------------------------------------------
  16079. w_metadata win81 settings \
  16080. title_uk="Встановити версію Windows 8.1" \
  16081. title="Set Windows version to Windows 8.1"
  16082. load_win81()
  16083. {
  16084. w_set_winver win81
  16085. }
  16086. #----------------------------------------------------------------
  16087. w_metadata win10 settings \
  16088. title_uk="Встановити версію Windows 10" \
  16089. title="Set Windows version to Windows 10"
  16090. load_win10()
  16091. {
  16092. w_set_winver win10
  16093. }
  16094. #----------------------------------------------------------------
  16095. w_metadata win11 settings \
  16096. title_uk="Встановити версію Windows 11" \
  16097. title="Set Windows version to Windows 11"
  16098. load_win11()
  16099. {
  16100. w_set_winver win11
  16101. }
  16102. #----------------------------------------------------------------
  16103. w_metadata win95 settings \
  16104. title_uk="Встановити версію Windows 95" \
  16105. title="Set Windows version to Windows 95"
  16106. load_win95()
  16107. {
  16108. w_package_unsupported_win64
  16109. w_set_winver win95
  16110. }
  16111. #----------------------------------------------------------------
  16112. w_metadata win98 settings \
  16113. title_uk="Встановити версію Windows 98" \
  16114. title="Set Windows version to Windows 98"
  16115. load_win98()
  16116. {
  16117. w_package_unsupported_win64
  16118. w_set_winver win98
  16119. }
  16120. #----------------------------------------------------------------
  16121. w_metadata winme settings \
  16122. title_uk="Встановити версію Windows ME" \
  16123. title="Set Windows version to Windows ME"
  16124. load_winme()
  16125. {
  16126. w_package_unsupported_win64
  16127. w_set_winver winme
  16128. }
  16129. #----------------------------------------------------------------
  16130. # Really, we should support other values, since winetricks did
  16131. w_metadata winver= settings \
  16132. title_uk="Встановити версію Windows за замовчуванням (Windows 7)" \
  16133. title="Set Windows version to default (win7)"
  16134. load_winver()
  16135. {
  16136. w_set_winver win7
  16137. }
  16138. #----------------------------------------------------------------
  16139. w_metadata winxp settings \
  16140. title_uk="Встановити версію Windows XP" \
  16141. title="Set Windows version to Windows XP"
  16142. load_winxp()
  16143. {
  16144. w_set_winver winxp
  16145. }
  16146. #---- Main Program ----
  16147. # In GUI mode, allow a user to select an arbitrary executable and start it
  16148. winetricks_misc_exe()
  16149. {
  16150. _W_title="Select the exectuable to run"
  16151. _W_filter="*.exe *.msi *.msu"
  16152. case "${WINETRICKS_GUI}" in
  16153. *zenity) _W_exe="$("${WINETRICKS_GUI}" --file-selection --file-filter="${_W_filter}" --title="${_W_title}")" ;;
  16154. *kdialog) _W_exe="$("${WINETRICKS_GUI}" --getopenfilename "${HOME}" "${_W_filter}")" ;;
  16155. *) w_die "winetricks_misc_exe only support zenity/kdialog at this time" ;;
  16156. esac
  16157. # Using start.exe so that .exe/.msi/.msu will work without extra fuss
  16158. "${WINE}" start.exe "$(w_winepath -w "${_W_exe}")"
  16159. }
  16160. winetricks_stats_save()
  16161. {
  16162. # Save opt-in status
  16163. if test "${WINETRICKS_STATS_REPORT}"; then
  16164. if test ! -d "${W_CACHE}"; then
  16165. w_try_mkdir "${W_CACHE}"
  16166. fi
  16167. echo "${WINETRICKS_STATS_REPORT}" > "${W_CACHE}"/track_usage
  16168. fi
  16169. }
  16170. winetricks_stats_init()
  16171. {
  16172. # Load opt-in status if not already set by a command-line option
  16173. if test ! "${WINETRICKS_STATS_REPORT}" && test -f "${W_CACHE}"/track_usage; then
  16174. WINETRICKS_STATS_REPORT=$(cat "${W_CACHE}"/track_usage)
  16175. fi
  16176. if test ! "${WINETRICKS_STATS_REPORT}"; then
  16177. # No opt-in status found. If GUI active, ask user whether they would like to opt in.
  16178. case ${WINETRICKS_GUI} in
  16179. zenity)
  16180. case ${LANG} in
  16181. bg*)
  16182. title="Еднократен въпрос относно подпомагането на развитието на Winetricks"
  16183. question="Искате ли да включите изпращането на статистически данни? Може да го изключите по всяко време с командата winetricks --optout"
  16184. thanks="Благодаря! Този въпрос няма да се появи отново. Запомнете, може да го изключите по всяко време с командата winetricks --optout"
  16185. declined="Добре. Този въпрос няма да се появи отново."
  16186. ;;
  16187. de*)
  16188. title="Einmalige Frage zur Hilfe an der Winetricks Entwicklung"
  16189. 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"
  16190. thanks="Danke! Sie bekommen diese Frage nicht mehr gestellt. Sie können die Übermittlung jederzeit mit 'winetricks --optout' wieder ausschalten"
  16191. declined="OK, Winetricks wird *keine* Statistiken übermitteln. Sie bekommen diese Frage nicht mehr gestellt."
  16192. ;;
  16193. pl*)
  16194. title="Jednorazowe pytanie dotyczące pomocy w rozwoju Winetricks"
  16195. question="Czy chcesz pomóc w rozwoju Winetricks pozwalając na wysyłanie statystyk przez program? Możesz wyłączyć tą opcję w każdej chwili z użyciem komendy 'winetricks --optout'."
  16196. thanks="Dziękujemy! Nie otrzymasz już tego pytania. Pamiętaj, ze możesz wyłączyć tą opcję komendą 'winetricks --optout'"
  16197. declined="OK, Winetricks *nie* będzie wysyłać statystyk. Nie otrzymasz już tego pytania."
  16198. ;;
  16199. pt*)
  16200. title="Pergunta única sobre ajudar no desenvolvimento do Winetricks"
  16201. question="Você gostaria de ajudar no desenvolvimento do winetricks, permitindo que o winetricks relate estatísticas? Você pode desativar o relatório a qualquer momento com o comando 'winetricks --optout'"
  16202. thanks="Obrigado! Esta pergunta não será feita novamente. Lembre-se, você pode desativar o relatório a qualquer momento com o comando 'winetricks --optout'"
  16203. declined="OK, winetricks *não* reportará estatísticas. Esta pergunta não será feita novamente."
  16204. ;;
  16205. ru*)
  16206. title="Помощь в разработке Winetricks"
  16207. question="Вы хотите помочь разработке winetricks, отправляя статистику? Вы можете отключить отправку статистики в любое время с помощью команды 'winetricks --optout'"
  16208. thanks="Спасибо! Этот вопрос больше не появится. Помните: вы можете отключить отправку статистики в любое время с помощью команды 'winetricks --optout'"
  16209. declined="OK, winetricks НЕ будет отправлять статистику. Этот вопрос больше не появится."
  16210. ;;
  16211. uk*)
  16212. title="Допомога в розробці Winetricks"
  16213. question="Ви хочете допомогти в розробці Winetricks дозволивши звітувати статистику?\\nВи можете в будь-який час вимкнути цю опцію за допомогою команди 'winetricks --optout'"
  16214. thanks="Дякуємо! Ви більше не отримуватиме це питання знову. Пам'ятайте, що ви можете будь-коли вимкнути звітність за допомогою команди 'winetricks --optout'"
  16215. declined="Надсилання звітності Winetricks вимкнено. Ви більше не отримуватиме це питання знову."
  16216. ;;
  16217. *)
  16218. title="One-time question about helping Winetricks development"
  16219. 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'"
  16220. thanks="Thanks! You won't be asked this question again. Remember, you can turn reporting off at any time with the command 'winetricks --optout'"
  16221. declined="OK, winetricks will *not* report statistics. You won't be asked this question again."
  16222. ;;
  16223. esac
  16224. if ${WINETRICKS_GUI} --question --text "${question}" --title "${title}"; then
  16225. ${WINETRICKS_GUI} --info --text "${thanks}"
  16226. WINETRICKS_STATS_REPORT=1
  16227. else
  16228. ${WINETRICKS_GUI} --info --text "${declined}"
  16229. WINETRICKS_STATS_REPORT=0
  16230. fi
  16231. winetricks_stats_save
  16232. ;;
  16233. esac
  16234. fi
  16235. }
  16236. # Retrieve a short string with the operating system name and version
  16237. winetricks_os_description()
  16238. {
  16239. (
  16240. case "${W_PLATFORM}" in
  16241. windows_cmd) echo "windows" ;;
  16242. *) echo "${WINETRICKS_WINE_VERSION}" ;;
  16243. esac
  16244. ) | tr '\012' ' '
  16245. }
  16246. winetricks_stats_report()
  16247. {
  16248. winetricks_download_setup
  16249. # If user has opted in to usage tracking, report what he used (if anything)
  16250. case "${WINETRICKS_STATS_REPORT}" in
  16251. 1) ;;
  16252. *) return;;
  16253. esac
  16254. BREADCRUMBS_FILE="${WINETRICKS_WORKDIR}"/breadcrumbs
  16255. if test -f "${BREADCRUMBS_FILE}"; then
  16256. WINETRICKS_STATS_BREADCRUMBS=$(tr '\012' ' ' < "${BREADCRUMBS_FILE}")
  16257. 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."
  16258. report="os=$(winetricks_os_description)&winetricks=${WINETRICKS_VERSION}&breadcrumbs=${WINETRICKS_STATS_BREADCRUMBS}"
  16259. report="$(echo "${report}" | sed 's/ /%20/g')"
  16260. # Just do a HEAD request with the raw command line.
  16261. # Yes, this can be fooled by caches. That's ok.
  16262. # Note: these downloads are expected to fail (the resource won't exist), so don't use w_try and use '|| true' to ignore the expected errors
  16263. if [ "${WINETRICKS_DOWNLOADER}" = "wget" ] ; then
  16264. ${torify} wget --timeout "${WINETRICKS_DOWNLOADER_TIMEOUT}" \
  16265. --tries "${WINETRICKS_DOWNLOADER_RETRIES}" \
  16266. --spider "http://kegel.com/data/winetricks-usage?${report}" > /dev/null 2>&1 || true
  16267. elif [ "${WINETRICKS_DOWNLOADER}" = "curl" ] ; then
  16268. ${torify} curl --connect-timeout "${WINETRICKS_DOWNLOADER_TIMEOUT}" \
  16269. --retry "${WINETRICKS_DOWNLOADER_RETRIES}" \
  16270. -I "http://kegel.com/data/winetricks-usage?${report}" > /dev/null 2>&1 || true
  16271. elif [ "${WINETRICKS_DOWNLOADER}" = "aria2c" ] ; then
  16272. ${torify} aria2c \
  16273. ${aria2c_torify_opts:+"${aria2c_torify_opts}"} \
  16274. --connect-timeout="${WINETRICKS_DOWNLOADER_TIMEOUT}" \
  16275. --daemon=false \
  16276. --enable-rpc=false \
  16277. --input-file='' \
  16278. --max-tries="${WINETRICKS_DOWNLOADER_RETRIES}" \
  16279. --save-session='' \
  16280. "http://kegel.com/data/winetricks-usage?${report}" > /dev/null 2>&1 || true
  16281. else
  16282. w_die "Here be dragons"
  16283. fi
  16284. fi
  16285. }
  16286. winetricks_stats_log_command()
  16287. {
  16288. # log what we execute for possible later statistics reporting
  16289. echo "$*" >> "${WINETRICKS_WORKDIR}"/breadcrumbs
  16290. # and for the user's own reference later, when figuring out what he did
  16291. case "${W_PLATFORM}" in
  16292. windows_cmd) _W_LOGDIR="${W_WINDIR_UNIX}"/Temp ;;
  16293. *) _W_LOGDIR="${WINEPREFIX}" ;;
  16294. esac
  16295. w_try_mkdir "${_W_LOGDIR}"
  16296. echo "$*" >> "${_W_LOGDIR}"/winetricks.log
  16297. unset _W_LOGDIR
  16298. }
  16299. # Launch a new terminal window if in GUI, or
  16300. # spawn a shell in the current window if command line.
  16301. # New shell contains proper WINEPREFIX and WINE environment variables.
  16302. # May be useful when debugging verbs.
  16303. winetricks_shell()
  16304. {
  16305. (
  16306. _W_escape() { printf "'%s'\\n" "$(printf '%s' "$1" | sed -e "s/'/'\\\\''/g")"; }
  16307. w_try_cd "${W_DRIVE_C}"
  16308. export WINE
  16309. case ${WINETRICKS_GUI} in
  16310. none)
  16311. WINEDEBUG=-all ${SHELL} "${@}"
  16312. ;;
  16313. *)
  16314. for term in gnome-terminal konsole Terminal xterm; do
  16315. if test "$(command -v ${term} 2>/dev/null)"; then
  16316. if [ -n "${*}" ]; then
  16317. # Convert the list of arguments into a single
  16318. # string while single quoting each argument.
  16319. _W_args=""
  16320. for arg in "$@"; do
  16321. _W_args="${_W_args}$(_W_escape "${arg}") "
  16322. done
  16323. WINEDEBUG=-all ${term} -e "${_W_args}"
  16324. else
  16325. WINEDEBUG=-all ${term}
  16326. fi
  16327. break
  16328. fi
  16329. done
  16330. ;;
  16331. esac
  16332. )
  16333. }
  16334. # Usage: execute_command verb[=argument]
  16335. execute_command()
  16336. {
  16337. case "$1" in
  16338. *=*) arg=$(echo "$1" | sed 's/.*=//'); cmd=$(echo "$1" | sed 's/=.*//');;
  16339. *) cmd="$1"; arg="" ;;
  16340. esac
  16341. case "$1" in
  16342. # FIXME: avoid duplicated code
  16343. apps|benchmarks|dlls|fonts|prefix|settings)
  16344. WINETRICKS_CURMENU="$1"
  16345. ;;
  16346. # Late options
  16347. -*)
  16348. if ! winetricks_handle_option "$1"; then
  16349. winetricks_usage
  16350. exit 1
  16351. fi
  16352. ;;
  16353. # Hard-coded verbs
  16354. main) WINETRICKS_CURMENU=main ;;
  16355. help) w_open_webpage https://github.com/Winetricks/winetricks/wiki ;;
  16356. list) winetricks_list_all ;;
  16357. list-cached) winetricks_list_cached ;;
  16358. list-download) winetricks_list_download ;;
  16359. list-manual-download) winetricks_list_manual_download ;;
  16360. list-installed) winetricks_list_installed ;;
  16361. list-all)
  16362. old_menu="${WINETRICKS_CURMENU}"
  16363. for WINETRICKS_CURMENU in apps benchmarks dlls fonts prefix settings; do
  16364. echo "===== ${WINETRICKS_CURMENU} ====="
  16365. winetricks_list_all
  16366. done
  16367. WINETRICKS_CURMENU="${old_menu}"
  16368. ;;
  16369. unattended) winetricks_set_unattended 1 ;;
  16370. attended) winetricks_set_unattended 0 ;;
  16371. arch=*) winetricks_set_winearch "${arg}" ;;
  16372. prefix=*) winetricks_set_wineprefix "${arg}" ;;
  16373. annihilate) winetricks_annihilate_wineprefix ;;
  16374. folder) w_open_folder "${WINEPREFIX}" ;;
  16375. winecfg) "${WINE}" winecfg ;;
  16376. regedit) "${WINE}" regedit ;;
  16377. taskmgr) "${WINE}" taskmgr & ;;
  16378. explorer) "${WINE}" explorer & ;;
  16379. uninstaller) "${WINE}" uninstaller ;;
  16380. shell) winetricks_shell ;;
  16381. winecmd) winetricks_shell "${WINE}" "cmd.exe" ;;
  16382. wine_misc_exe) winetricks_misc_exe ;;
  16383. # These have to come before *=disabled to avoid looking like DLLs
  16384. cfc=disable*) w_call cfc=disabled ;;
  16385. fontsmooth=disable*) w_call fontsmooth=disable ;;
  16386. mwo=disable*) w_call mwo=disable ;; # FIXME: relax matching so we can handle these spelling differences in verb instead of here
  16387. rtlm=disable*) w_call rtlm=disabled ;;
  16388. sound=disable*) w_call sound=disabled ;;
  16389. ssm=disable*) w_call ssm=disabled ;;
  16390. # Hacks for backwards compatibility
  16391. # 2017/03/22: add deprecation notices
  16392. cc580) w_warn "Calling cc580 is deprecated, please use comctl32 instead" ; w_call comctl32 ;;
  16393. comdlg32.ocx) w_warn "Calling comdlg32.ocx is deprecated, please use comdlg32ocx instead" ; w_call comdlg32ocx ;;
  16394. dotnet1) w_warn "Calling dotnet1 is deprecated, please use dotnet11 instead" ; w_call dotnet11 ;;
  16395. dotnet2) w_warn "Calling dotnet2 is deprecated, please use dotnet20 instead" ; w_call dotnet20 ;;
  16396. ddr=gdi) w_warn "Calling ddr=gdi is deprecated, please use renderer=gdi or renderer=no3d instead" ; w_call renderer=gdi ;;
  16397. ddr=opengl) w_warn "Calling ddr=opengl is deprecated, please use renderer=gl instead" ; w_call renderer=gl ;;
  16398. dxsdk_nov2006) w_warn "Calling dxsdk_nov2006 is deprecated, please use dxsdk_aug2006 instead"; w_call dxsdk_aug2006 ;;
  16399. dxvk054|dxvk54) w_warn "Calling $1 is deprecated, please use dxvk0054 instead" ; w_call dxvk0054 ;;
  16400. dxvk060|dxvk60) w_warn "Calling $1 is deprecated, please use dxvk0060 instead" ; w_call dxvk0060 ;;
  16401. dxvk061|dxvk61) w_warn "Calling $1 is deprecated, please use dxvk0061 instead" ; w_call dxvk0061 ;;
  16402. dxvk062|dxvk62) w_warn "Calling $1 is deprecated, please use dxvk0062 instead" ; w_call dxvk0062 ;;
  16403. dxvk063|dxvk63) w_warn "Calling $1 is deprecated, please use dxvk0063 instead" ; w_call dxvk0063 ;;
  16404. dxvk064|dxvk64) w_warn "Calling $1 is deprecated, please use dxvk0064 instead" ; w_call dxvk0064 ;;
  16405. dxvk065|dxvk65) w_warn "Calling $1 is deprecated, please use dxvk0065 instead" ; w_call dxvk0065 ;;
  16406. dxvk070|dxvk70) w_warn "Calling $1 is deprecated, please use dxvk0070 instead" ; w_call dxvk0070 ;;
  16407. dxvk071|dxvk71) w_warn "Calling $1 is deprecated, please use dxvk0071 instead" ; w_call dxvk0071 ;;
  16408. dxvk072|dxvk72) w_warn "Calling $1 is deprecated, please use dxvk0072 instead" ; w_call dxvk0072 ;;
  16409. dxvk080|dxvk80) w_warn "Calling $1 is deprecated, please use dxvk0080 instead" ; w_call dxvk0080 ;;
  16410. dxvk081|dxvk81) w_warn "Calling $1 is deprecated, please use dxvk0081 instead" ; w_call dxvk0081 ;;
  16411. dxvk090|dxvk90) w_warn "Calling $1 is deprecated, please use dxvk0090 instead" ; w_call dxvk0090 ;;
  16412. dxvk091|dxvk91) w_warn "Calling $1 is deprecated, please use dxvk0091 instead" ; w_call dxvk0091 ;;
  16413. dxvk092|dxvk92) w_warn "Calling $1 is deprecated, please use dxvk0092 instead" ; w_call dxvk0092 ;;
  16414. dxvk093|dxvk93) w_warn "Calling $1 is deprecated, please use dxvk0093 instead" ; w_call dxvk0093 ;;
  16415. dxvk094|dxvk94) w_warn "Calling $1 is deprecated, please use dxvk0094 instead" ; w_call dxvk0094 ;;
  16416. dxvk095|dxvk95) w_warn "Calling $1 is deprecated, please use dxvk0095 instead" ; w_call dxvk0095 ;;
  16417. dxvk096|dxvk96) w_warn "Calling $1 is deprecated, please use dxvk0096 instead" ; w_call dxvk0096 ;;
  16418. dxvk100) w_warn "Calling dxvk100 is deprecated, please use dxvk1000 instead" ; w_call dxvk1000 ;;
  16419. dxvk101) w_warn "Calling dxvk101 is deprecated, please use dxvk1001 instead" ; w_call dxvk1001 ;;
  16420. dxvk102) w_warn "Calling dxvk102 is deprecated, please use dxvk1002 instead" ; w_call dxvk1002 ;;
  16421. dxvk103) w_warn "Calling dxvk103 is deprecated, please use dxvk1003 instead" ; w_call dxvk1003 ;;
  16422. dxvk111) w_warn "Calling dxvk111 is deprecated, please use dxvk1011 instead" ; w_call dxvk1011 ;;
  16423. dxvk120) w_warn "Calling dxvk120 is deprecated, please use dxvk1020 instead" ; w_call dxvk1020 ;;
  16424. dxvk121) w_warn "Calling dxvk121 is deprecated, please use dxvk1021 instead" ; w_call dxvk1021 ;;
  16425. dxvk122) w_warn "Calling dxvk122 is deprecated, please use dxvk1022 instead" ; w_call dxvk1022 ;;
  16426. dxvk123) w_warn "Calling dxvk123 is deprecated, please use dxvk1023 instead" ; w_call dxvk1023 ;;
  16427. dxvk130) w_warn "Calling dxvk130 is deprecated, please use dxvk1030 instead" ; w_call dxvk1030 ;;
  16428. dxvk131) w_warn "Calling dxvk131 is deprecated, please use dxvk1031 instead" ; w_call dxvk1031 ;;
  16429. dxvk132) w_warn "Calling dxvk132 is deprecated, please use dxvk1032 instead" ; w_call dxvk1032 ;;
  16430. dxvk133) w_warn "Calling dxvk133 is deprecated, please use dxvk1033 instead" ; w_call dxvk1033 ;;
  16431. dxvk134) w_warn "Calling dxvk134 is deprecated, please use dxvk1034 instead" ; w_call dxvk1034 ;;
  16432. dxvk140) w_warn "Calling dxvk140 is deprecated, please use dxvk1040 instead" ; w_call dxvk1040 ;;
  16433. dxvk141) w_warn "Calling dxvk141 is deprecated, please use dxvk1041 instead" ; w_call dxvk1041 ;;
  16434. dxvk142) w_warn "Calling dxvk142 is deprecated, please use dxvk1042 instead" ; w_call dxvk1042 ;;
  16435. dxvk143) w_warn "Calling dxvk143 is deprecated, please use dxvk1043 instead" ; w_call dxvk1043 ;;
  16436. dxvk144) w_warn "Calling dxvk144 is deprecated, please use dxvk1044 instead" ; w_call dxvk1044 ;;
  16437. dxvk145) w_warn "Calling dxvk145 is deprecated, please use dxvk1045 instead" ; w_call dxvk1045 ;;
  16438. dxvk146) w_warn "Calling dxvk146 is deprecated, please use dxvk1046 instead" ; w_call dxvk1046 ;;
  16439. dxvk150) w_warn "Calling dxvk150 is deprecated, please use dxvk1050 instead" ; w_call dxvk1050 ;;
  16440. dxvk151) w_warn "Calling dxvk151 is deprecated, please use dxvk1051 instead" ; w_call dxvk1051 ;;
  16441. dxvk152) w_warn "Calling dxvk152 is deprecated, please use dxvk1052 instead" ; w_call dxvk1052 ;;
  16442. dxvk153) w_warn "Calling dxvk153 is deprecated, please use dxvk1053 instead" ; w_call dxvk1053 ;;
  16443. dxvk154) w_warn "Calling dxvk154 is deprecated, please use dxvk1054 instead" ; w_call dxvk1054 ;;
  16444. dxvk155) w_warn "Calling dxvk155 is deprecated, please use dxvk1055 instead" ; w_call dxvk1055 ;;
  16445. dxvk160) w_warn "Calling dxvk160 is deprecated, please use dxvk1060 instead" ; w_call dxvk1060 ;;
  16446. dxvk161) w_warn "Calling dxvk161 is deprecated, please use dxvk1061 instead" ; w_call dxvk1061 ;;
  16447. dxvk170) w_warn "Calling dxvk170 is deprecated, please use dxvk1070 instead" ; w_call dxvk1070 ;;
  16448. dxvk171) w_warn "Calling dxvk171 is deprecated, please use dxvk1071 instead" ; w_call dxvk1071 ;;
  16449. dxvk172) w_warn "Calling dxvk172 is deprecated, please use dxvk1072 instead" ; w_call dxvk1072 ;;
  16450. dxvk173) w_warn "Calling dxvk173 is deprecated, please use dxvk1073 instead" ; w_call dxvk1073 ;;
  16451. dxvk180) w_warn "Calling dxvk180 is deprecated, please use dxvk1080 instead" ; w_call dxvk1080 ;;
  16452. dxvk181) w_warn "Calling dxvk181 is deprecated, please use dxvk1081 instead" ; w_call dxvk1081 ;;
  16453. dxvk190) w_warn "Calling dxvk190 is deprecated, please use dxvk1090 instead" ; w_call dxvk1090 ;;
  16454. dxvk191) w_warn "Calling dxvk191 is deprecated, please use dxvk1091 instead" ; w_call dxvk1091 ;;
  16455. dxvk192) w_warn "Calling dxvk192 is deprecated, please use dxvk1092 instead" ; w_call dxvk1092 ;;
  16456. dxvk193) w_warn "Calling dxvk193 is deprecated, please use dxvk1093 instead" ; w_call dxvk1093 ;;
  16457. dxvk194) w_warn "Calling dxvk194 is deprecated, please use dxvk1094 instead" ; w_call dxvk1094 ;;
  16458. # art2kmin also comes with fm20.dll
  16459. fm20) w_warn "Calling fm20 is deprecated, please use controlpad instead" ; w_call controlpad ;;
  16460. fontsmooth-bgr) w_warn "Calling fontsmooth-bgr is deprecated, please use fontsmooth=bgr instead" ; w_call fontsmooth=bgr ;;
  16461. fontsmooth-disable) w_warn "Calling fontsmooth-disable is deprecated, please use fontsmooth=disable instead" ; w_call fontsmooth=disable ;;
  16462. fontsmooth-gray) w_warn "Calling fontsmooth-gray is deprecated, please use fontsmooth=gray instead" ; w_call fontsmooth=gray ;;
  16463. fontsmooth-rgb) w_warn "Calling fontsmooth-rgb is deprecated, please use fontsmooth=rgb instead" ; w_call fontsmooth=rgb ;;
  16464. glsl=enabled) w_warn "Calling glsl=enabled is deprecated, please use shader_backend=glsl instead" ; w_call shader_backend=glsl ;;
  16465. glsl=disabled) w_warn "Calling glsl=disabled is deprecated, please use shader_backend=arb instead" ; w_call shader_backend=arb ;;
  16466. glsl-disable) w_warn "Calling glsl-disable is deprecated, please use glsl=disabled instead" ; w_call glsl=disabled ;;
  16467. glsl-enable) w_warn "Calling glsl-enable is deprecated, please use glsl=enabled instead" ; w_call glsl=enabled ;;
  16468. ie6_full) w_warn "Calling ie6_full is deprecated, please use ie6 instead" ; w_call ie6 ;;
  16469. # FIXME: use wsh57 instead?
  16470. jscript) w_warn "Calling jscript is deprecated, please use wsh57 instead" ; w_call wsh57 ;;
  16471. npm-repack) w_warn "Calling npm-repack is deprecated, please use npm=repack instead" ; w_call npm=repack ;;
  16472. oss) w_warn "Calling oss is deprecated, please use sound=oss instead" ; w_call sound=oss ;;
  16473. psdkwin7) w_warn "psdkwin7 has been removed, use psdkwin71 instead"; w_call psdkwin71 ;;
  16474. python) w_warn "Calling python is deprecated, please use python26 instead" ; w_call python26 ;;
  16475. strictdrawordering=enabled) w_warn "Calling strictdrawordering=enabled is deprecated, please use csmt=enabled instead" ; w_call csmt=enabled ;;
  16476. strictdrawordering=disabled) w_warn "Calling strictdrawordering=disabled is deprecated, please use csmt=disabled instead" ; w_call csmt=disabled ;;
  16477. vbrun60) w_warn "Calling vbrun60 is deprecated, please use vb6run instead" ; w_call vb6run ;;
  16478. vcrun2005sp1) w_warn "Calling vcrun2005sp1 is deprecated, please use vcrun2005 instead" ; w_call vcrun2005 ;;
  16479. vcrun2008sp1) w_warn "Calling vcrun2008sp1 is deprecated, please use vcrun2008 instead" ; w_call vcrun2008 ;;
  16480. wsh56|wsh56js|wsh56vb) w_warn "Calling wsh56 is deprecated, please use wsh57 instead" ; w_call wsh57 ;;
  16481. # See https://github.com/Winetricks/winetricks/issues/747
  16482. xact_jun2010) w_warn "Calling xact_jun2010 is deprecated, please use xact instead" ; w_call xact ;;
  16483. xlive) w_warn "Calling xlive is deprecated, please use gfw instead" ; w_call gfw ;;
  16484. # Use winecfg if you want a GUI for plain old DLL overrides
  16485. alldlls=*) w_call "$1" ;;
  16486. *=native) w_do_call native "${cmd}";;
  16487. *=builtin) w_do_call builtin "${cmd}";;
  16488. *=default) w_do_call default "${cmd}";;
  16489. *=disabled) w_do_call disabled "${cmd}";;
  16490. vd=*) w_do_call "${cmd}";;
  16491. # Normal verbs, with metadata and load_ functions
  16492. *)
  16493. if winetricks_metadata_exists "$1"; then
  16494. w_call "$1"
  16495. else
  16496. echo "Unknown arg $1"
  16497. winetricks_usage
  16498. exit 1
  16499. fi
  16500. ;;
  16501. esac
  16502. }
  16503. if ! test "${WINETRICKS_LIB}"; then
  16504. # If user opted out, save that preference now.
  16505. winetricks_stats_save
  16506. # If user specifies menu on command line, execute that command, but don't commit to command-line mode
  16507. # FIXME: this code is duplicated several times; unify it
  16508. if echo "${WINETRICKS_CATEGORIES}" | grep -w "$1" > /dev/null; then
  16509. WINETRICKS_CURMENU=$1
  16510. shift
  16511. fi
  16512. case "$1" in
  16513. die) w_die "we who are about to die salute you." ;;
  16514. volnameof=*)
  16515. # Debug code. Remove later?
  16516. # Since Linux's volname command can't handle DVDs, winetricks has its own,
  16517. # implemented using dd, old gum, and some string I had laying around.
  16518. # You can try it like this:
  16519. # winetricks volnameof=/dev/sr0
  16520. # or
  16521. # winetricks volnameof=foo.iso
  16522. # This will read the volname from the given image and put it to stdout.
  16523. winetricks_volname "${1#volnameof=}"
  16524. ;;
  16525. "")
  16526. if [ -z "${DISPLAY}" ]; then
  16527. if [ "$(uname -s)" = "Darwin" ]; then
  16528. echo "Running on OSX, but DISPLAY is not set...probably using Mac Driver."
  16529. else
  16530. echo "DISPLAY not set, not defaulting to gui"
  16531. winetricks_usage
  16532. exit 0
  16533. fi
  16534. fi
  16535. # GUI case
  16536. # No non-option arguments given, so read them from GUI, and loop until user quits
  16537. if [ "${WINETRICKS_GUI}" = "none" ]; then
  16538. winetricks_detect_gui --gui
  16539. fi
  16540. winetricks_detect_sudo
  16541. test -z "${WINETRICKS_ISO_MOUNT}" && winetricks_detect_iso_mount
  16542. while true; do
  16543. case ${WINETRICKS_CURMENU} in
  16544. main) verbs=$(winetricks_mainmenu) ;;
  16545. prefix)
  16546. verbs=$(winetricks_prefixmenu);
  16547. # Cheezy hack: choosing 'attended' or 'unattended' leaves you in same menu
  16548. case "${verbs}" in
  16549. attended) winetricks_set_unattended 0 ; continue;;
  16550. unattended) winetricks_set_unattended 1 ; continue;;
  16551. esac
  16552. ;;
  16553. mkprefix) verbs=$(winetricks_mkprefixmenu) ;;
  16554. settings) verbs=$(winetricks_settings_menu) ;;
  16555. *) verbs="$(winetricks_showmenu)" ;;
  16556. esac
  16557. if test "${verbs}" = ""; then
  16558. # "user didn't pick anything, back up a level in the menu"
  16559. case "${WINETRICKS_CURMENU}-${WINETRICKS_OPT_SHAREDPREFIX}" in
  16560. apps-0|benchmarks-0|main-*) WINETRICKS_CURMENU=prefix ;;
  16561. prefix-*) break ;;
  16562. *) WINETRICKS_CURMENU=main ;;
  16563. esac
  16564. elif echo "${WINETRICKS_CATEGORIES}" | grep -w "${verbs}" > /dev/null; then
  16565. WINETRICKS_CURMENU=${verbs}
  16566. else
  16567. winetricks_stats_init
  16568. # Otherwise user picked one or more real verbs.
  16569. case "${verbs}" in
  16570. prefix=*|arch=*)
  16571. # prefix menu is special, it only returns one verb, and the
  16572. # verb can contain spaces. If a 32bit wineprefix is created via
  16573. # the GUI, this may have an "arch=* " prefix
  16574. _W_arch=$(echo "${verbs}" | grep -o 'arch=.*' | cut -d' ' -f1)
  16575. _W_prefix=$(echo "${verbs}" | grep -o 'prefix=.*')
  16576. _W_prefix_name="${_W_prefix#*=}"
  16577. if [ -n "${_W_arch}" ]; then
  16578. execute_command "${_W_arch}"
  16579. fi
  16580. execute_command "${_W_prefix}"
  16581. # after picking a prefix, want to land in main.
  16582. WINETRICKS_CURMENU=main ;;
  16583. *)
  16584. for verb in ${verbs}; do
  16585. execute_command "${verb}"
  16586. done
  16587. case "${WINETRICKS_CURMENU}-${WINETRICKS_OPT_SHAREDPREFIX}" in
  16588. prefix-*|apps-0|benchmarks-0)
  16589. # After installing isolated app, return to prefix picker
  16590. WINETRICKS_CURMENU=prefix
  16591. ;;
  16592. *)
  16593. # Otherwise go to main menu.
  16594. WINETRICKS_CURMENU=main
  16595. ;;
  16596. esac
  16597. ;;
  16598. esac
  16599. fi
  16600. done
  16601. ;;
  16602. *)
  16603. winetricks_stats_init
  16604. # Command-line case
  16605. winetricks_detect_sudo
  16606. test -z "${WINETRICKS_ISO_MOUNT}" && winetricks_detect_iso_mount
  16607. # User gave command-line arguments, so just run those verbs and exit
  16608. for verb; do
  16609. case ${verb} in
  16610. *.verb)
  16611. # Load the verb file
  16612. # shellcheck disable=SC1090
  16613. case ${verb} in
  16614. */*) . "${verb}" ;;
  16615. *) . ./"${verb}" ;;
  16616. esac
  16617. # And forget that the verb comes from a file
  16618. verb="$(echo "${verb}" | sed 's,.*/,,;s,.verb,,')"
  16619. ;;
  16620. esac
  16621. execute_command "${verb}"
  16622. done
  16623. ;;
  16624. esac
  16625. winetricks_stats_report
  16626. fi
  16627. # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4