12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648 |
- <?xml version="1.0" encoding="utf-8"?>
- <Ketarin>
- <Settings>
- <dictionary>
- <item>
- <key>
- <string>AuthorGuid</string>
- </key>
- <value>
- <string>System.String:{75a093b7-da5f-493a-b8f0-22c278f874c1}</string>
- </value>
- </item>
- <item>
- <key>
- <string>LastUpdateCheck</string>
- </key>
- <value>
- <string>AAEAAAD/////AQAAAAAAAAAEAQAAAA9TeXN0ZW0uRGF0ZVRpbWUCAAAABXRpY2tzCGRhdGVEYXRhAAAJEOGhVC47mtII4aFULjua0ogL</string>
- </value>
- </item>
- <item>
- <key>
- <string>MainForm/Size</string>
- </key>
- <value>
- <string>System.Drawing.Size:1046,476</string>
- </value>
- </item>
- <item>
- <key>
- <string>MainForm/Location</string>
- </key>
- <value>
- <string>System.Drawing.Point:203,77</string>
- </value>
- </item>
- <item>
- <key>
- <string>MainForm/WindowState</string>
- </key>
- <value>
- <string>System.Int32:0</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Application:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Application:Width</string>
- </key>
- <value>
- <string>System.Int32:126</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Application:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:0</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Last updated:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Last updated:Width</string>
- </key>
- <value>
- <string>System.Int32:96</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Last updated:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:2</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Progress:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Progress:Width</string>
- </key>
- <value>
- <string>System.Int32:100</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Progress:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:4</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Target:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Target:Width</string>
- </key>
- <value>
- <string>System.Int32:0</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Target:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:5</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Category:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Category:Width</string>
- </key>
- <value>
- <string>System.Int32:80</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Category:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:15</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Status:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Status:Width</string>
- </key>
- <value>
- <string>System.Int32:79</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Status:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:6</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/LastSortColumn</string>
- </key>
- <value>
- <string>System.String:Application</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/LastSortOrder</string>
- </key>
- <value>
- <string>System.Int32:1</string>
- </value>
- </item>
- <item>
- <key>
- <string>Ketarin/ShowGroups</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>Ketarin/ShowStatusBar</string>
- </key>
- <value>
- <string>System.Boolean:False</string>
- </value>
- </item>
- <item>
- <key>
- <string>Ketarin/ShowLog</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>Ketarin/AutoScroll</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>PreUpdateCommand</string>
- </key>
- <value>
- <string>System.String:REM https://chocolatey.org/packages/chocolateypackageupdater
- SET URL={url}
- IF '%URL%'=='' SET URL={preupdate-url}
- chocopkgup {nopush} {force} --pf="{autoPackagesFolder}" --packagename="{appname}" --version="{version}" --url="%URL%" --urlx64="{url64}" --checksum="{checksum}" --c64="{checksumx64}" --debug</string>
- </value>
- </item>
- <item>
- <key>
- <string>PreUpdateCommandType</string>
- </key>
- <value>
- <string>System.String:Batch</string>
- </value>
- </item>
- <item>
- <key>
- <string>CustomColumns</string>
- </key>
- <value>
- <string>System.String:<?xml version="1.0" encoding="utf-16"?>
- <dictionary>
- <item>
- <key>
- <string>version</string>
- </key>
- <value>
- <string>{version}</string>
- </value>
- </item>
- <item>
- <key>
- <string>filesize</string>
- </key>
- <value>
- <string>{filesize:formatfilesize}</string>
- </value>
- </item>
- <item>
- <key>
- <string>host</string>
- </key>
- <value>
- <string>{url:regex:(?&lt;=//)([\w-]+\.)*(?=[\w-]+\.[\w-]+(?=/))}</string>
- </value>
- </item>
- <item>
- <key>
- <string>fileDate</string>
- </key>
- <value>
- <string>{f:yyyy}-{f:MM}-{f:dd} {f:HH}:{f:mm}</string>
- </value>
- </item>
- <item>
- <key>
- <string>fixedUrl</string>
- </key>
- <value>
- <string>{property:FixedDownloadUrl:regex:(?&lt;=//).*}</string>
- </value>
- </item>
- <item>
- <key>
- <string>referer</string>
- </key>
- <value>
- <string>{property:HttpReferer}</string>
- </value>
- </item>
- <item>
- <key>
- <string>user-agent</string>
- </key>
- <value>
- <string>{property:UserAgent}</string>
- </value>
- </item>
- <item>
- <key>
- <string>delPrevFile</string>
- </key>
- <value>
- <string>{property:DeletePreviousFile:multireplace:,:True,False:X,}</string>
- </value>
- </item>
- <item>
- <key>
- <string>varChgInd</string>
- </key>
- <value>
- <string>{property:VariableChangeIndicator}</string>
- </value>
- </item>
- <item>
- <key>
- <string>cscript</string>
- </key>
- <value>
- <string>{cscript}</string>
- </value>
- </item>
- <item>
- <key>
- <string>enabled</string>
- </key>
- <value>
- <string>{property:Enabled}</string>
- </value>
- </item>
- <item>
- <key>
- <string>nopush</string>
- </key>
- <value>
- <string>{nopush}</string>
- </value>
- </item>
- <item>
- <key>
- <string>domain</string>
- </key>
- <value>
- <string>{url:regex:(?&lt;=//[\w-]+\.)*[\w-]+\.[\w-]+(?=/)}</string>
- </value>
- </item>
- <item>
- <key>
- <string>url64</string>
- </key>
- <value>
- <string>{url64}</string>
- </value>
- </item>
- <item>
- <key>
- <string>hashInternal</string>
- </key>
- <value>
- <string>{hash}</string>
- </value>
- </item>
- <item>
- <key>
- <string>hashType</string>
- </key>
- <value>
- <string>{property:HashType:replace:None:}</string>
- </value>
- </item>
- <item>
- <key>
- <string>proto</string>
- </key>
- <value>
- <string>{url:regex:.*?(?=.//)}</string>
- </value>
- </item>
- <item>
- <key>
- <string>bytes</string>
- </key>
- <value>
- <string>{filesize}</string>
- </value>
- </item>
- <item>
- <key>
- <string>hashExternal</string>
- </key>
- <value>
- <string>{checksum}</string>
- </value>
- </item>
- <item>
- <key>
- <string>checksum64</string>
- </key>
- <value>
- <string>{checksumx64}</string>
- </value>
- </item>
- </dictionary></string>
- </value>
- </item>
- <item>
- <key>
- <string>CustomColumn</string>
- </key>
- <value>
- <string p6:nil="true" xmlns:p6="http://www.w3.org/2001/XMLSchema-instance" />
- </value>
- </item>
- <item>
- <key>
- <string>CustomColumn2</string>
- </key>
- <value>
- <string p6:nil="true" xmlns:p6="http://www.w3.org/2001/XMLSchema-instance" />
- </value>
- </item>
- <item>
- <key>
- <string>UpdateAtStartup</string>
- </key>
- <value>
- <string>System.Boolean:False</string>
- </value>
- </item>
- <item>
- <key>
- <string>AvoidFileHippoBeta</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>ConnectionTimeout</string>
- </key>
- <value>
- <string>AAEAAAD/////AQAAAAAAAAAEAQAAAA5TeXN0ZW0uRGVjaW1hbAQAAAAFZmxhZ3MCaGkCbG8DbWlkAAAAAAgICAgAAAAAAAAAADwAAAAAAAAACw==</string>
- </value>
- </item>
- <item>
- <key>
- <string>ThreadCount</string>
- </key>
- <value>
- <string>System.Int32:4</string>
- </value>
- </item>
- <item>
- <key>
- <string>RetryCount</string>
- </key>
- <value>
- <string>System.Int32:2</string>
- </value>
- </item>
- <item>
- <key>
- <string>UpdateOnlineDatabase</string>
- </key>
- <value>
- <string>System.Boolean:False</string>
- </value>
- </item>
- <item>
- <key>
- <string>MinimizeToTray</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>CreateDatabaseBackups</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>OpenWebsiteOnDoubleClick</string>
- </key>
- <value>
- <string>System.Boolean:False</string>
- </value>
- </item>
- <item>
- <key>
- <string>ProxyPort</string>
- </key>
- <value>
- <string>AAEAAAD/////AQAAAAAAAAAEAQAAAA5TeXN0ZW0uRGVjaW1hbAQAAAAFZmxhZ3MCaGkCbG8DbWlkAAAAAAgICAgAAAAAAAAAALgiAAAAAAAACw==</string>
- </value>
- </item>
- <item>
- <key>
- <string>ProxyServer</string>
- </key>
- <value>
- <string>System.String:</string>
- </value>
- </item>
- <item>
- <key>
- <string>ProxyUser</string>
- </key>
- <value>
- <string>System.String:</string>
- </value>
- </item>
- <item>
- <key>
- <string>ProxyPassword</string>
- </key>
- <value>
- <string>System.String:</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Version:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Version:Width</string>
- </key>
- <value>
- <string>System.Int32:99</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Version:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:1</string>
- </value>
- </item>
- <item>
- <key>
- <string>SetPlaceholderDialog/Size</string>
- </key>
- <value>
- <string>System.Drawing.Size:699,157</string>
- </value>
- </item>
- <item>
- <key>
- <string>SetPlaceholderDialog/Location</string>
- </key>
- <value>
- <string>System.Drawing.Point:0,0</string>
- </value>
- </item>
- <item>
- <key>
- <string>SetPlaceholderDialog/WindowState</string>
- </key>
- <value>
- <string>System.Int32:0</string>
- </value>
- </item>
- <item>
- <key>
- <string>EditVariablesDialog/Size</string>
- </key>
- <value>
- <string>System.Drawing.Size:1004,492</string>
- </value>
- </item>
- <item>
- <key>
- <string>EditVariablesDialog/Location</string>
- </key>
- <value>
- <string>System.Drawing.Point:66,65</string>
- </value>
- </item>
- <item>
- <key>
- <string>EditVariablesDialog/WindowState</string>
- </key>
- <value>
- <string>System.Int32:0</string>
- </value>
- </item>
- <item>
- <key>
- <string>ApplicationJobDialog/Size</string>
- </key>
- <value>
- <string>System.Drawing.Size:507,507</string>
- </value>
- </item>
- <item>
- <key>
- <string>ApplicationJobDialog/Location</string>
- </key>
- <value>
- <string>System.Drawing.Point:173,12</string>
- </value>
- </item>
- <item>
- <key>
- <string>ApplicationJobDialog/WindowState</string>
- </key>
- <value>
- <string>System.Int32:0</string>
- </value>
- </item>
- <item>
- <key>
- <string>LogDialog/Size</string>
- </key>
- <value>
- <string>System.Drawing.Size:1143,423</string>
- </value>
- </item>
- <item>
- <key>
- <string>LogDialog/Location</string>
- </key>
- <value>
- <string>System.Drawing.Point:116,360</string>
- </value>
- </item>
- <item>
- <key>
- <string>LogDialog/WindowState</string>
- </key>
- <value>
- <string>System.Int32:0</string>
- </value>
- </item>
- <item>
- <key>
- <string>ErrorsDialog/Size</string>
- </key>
- <value>
- <string>System.Drawing.Size:1096,965</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvErrors/Application:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvErrors/Application:Width</string>
- </key>
- <value>
- <string>System.Int32:98</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvErrors/Application:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:-1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvErrors/Error:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvErrors/Error:Width</string>
- </key>
- <value>
- <string>System.Int32:952</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvErrors/Error:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:-1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvErrors/LastSortColumn</string>
- </key>
- <value>
- <string>System.String:Application</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvErrors/LastSortOrder</string>
- </key>
- <value>
- <string>System.Int32:1</string>
- </value>
- </item>
- <item>
- <key>
- <string>ProgressDialog/Size</string>
- </key>
- <value>
- <string>System.Drawing.Size:302,112</string>
- </value>
- </item>
- <item>
- <key>
- <string>Hotkey: OpenWebsite</string>
- </key>
- <value>
- <string>System.String:</string>
- </value>
- </item>
- <item>
- <key>
- <string>Hotkey: Edit</string>
- </key>
- <value>
- <string>System.String:</string>
- </value>
- </item>
- <item>
- <key>
- <string>Hotkey: Update</string>
- </key>
- <value>
- <string>System.String:</string>
- </value>
- </item>
- <item>
- <key>
- <string>Hotkey: ForceDownload</string>
- </key>
- <value>
- <string>System.String:</string>
- </value>
- </item>
- <item>
- <key>
- <string>Hotkey: InstallSelected</string>
- </key>
- <value>
- <string>System.String:</string>
- </value>
- </item>
- <item>
- <key>
- <string>Hotkey: OpenFile</string>
- </key>
- <value>
- <string>System.String:</string>
- </value>
- </item>
- <item>
- <key>
- <string>Hotkey: OpenFolder</string>
- </key>
- <value>
- <string>System.String:</string>
- </value>
- </item>
- <item>
- <key>
- <string>Hotkey: CheckUpdate</string>
- </key>
- <value>
- <string>System.String:</string>
- </value>
- </item>
- <item>
- <key>
- <string>Hotkey: UpdateAndInstall</string>
- </key>
- <value>
- <string>System.String:</string>
- </value>
- </item>
- <item>
- <key>
- <string>InstallingApplicationsDialog/Size</string>
- </key>
- <value>
- <string>System.Drawing.Size:406,250</string>
- </value>
- </item>
- <item>
- <key>
- <string>InstallingApplicationsDialog/Location</string>
- </key>
- <value>
- <string>System.Drawing.Point:164,724</string>
- </value>
- </item>
- <item>
- <key>
- <string>InstallingApplicationsDialog/WindowState</string>
- </key>
- <value>
- <string>System.Int32:0</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLog/Time:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLog/Time:Width</string>
- </key>
- <value>
- <string>System.Int32:55</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLog/Time:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:-1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLog/Message:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLog/Message:Width</string>
- </key>
- <value>
- <string>System.Int32:310</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLog/Message:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:-1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLog/LastSortColumn</string>
- </key>
- <value>
- <string>System.String:Time</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLog/LastSortOrder</string>
- </key>
- <value>
- <string>System.Int32:0</string>
- </value>
- </item>
- <item>
- <key>
- <string>InstallingApplicationsDialog/Expanded</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>DefaultCommand</string>
- </key>
- <value>
- <string>System.String:////////////////////////////////////////////////////////////////////////////////////////
- /// version ? Lots of changes
- ///
- /// Changelog:
- /// - Allow for non-versioned output folder paths
- /// - Logging!
- /// - Call choco directly, expected to be at the default location.
- ///
- // REQUIRES:
- // global vars: saveDir=corresponds to download location of installer file
- // app vars: nopush, checksum64file=corresponds to 64 bit install file
- // file vars: same as specified by chocopkgup
- // get package variable 'cscript'
- string varCScript = "";
- varCScript = app.Variables.ReplaceAllInString("{cscript}").Trim();
- Ketarin.Forms.LogDialog.Log(app,"cscript='" + varCScript + "'");
- Ketarin.Forms.LogDialog.Log(app,"If cscript is set to 1, checksums will be calculated but the package won't be pushed.");
- Ketarin.Forms.LogDialog.Log(app,"If cscript is set to 2, checksums will be calculated AND the package will be pushed.");
- // determine whether we run this by checking cscript exists AND is 1 or 2
- if ((varCScript == "1") || (varCScript == "2"))
- {
- // ketarin variables we pass for this script to use
- string varAppname = app.Variables.ReplaceAllInString("{appname}");
- string varVersion = app.Variables.ReplaceAllInString("{version}");
- string varChocoPkgOutput = System.IO.Path.Combine(app.Variables.ReplaceAllInString("{autoPackagesFolder}"), "_output");
- string varChecksum = app.Variables.ReplaceAllInString("{checksum}");
- string varChecksumx64 = app.Variables.ReplaceAllInString("{checksumx64}");
- string varChecksum64File = app.Variables.ReplaceAllInString("{url64}");
- string varSaveDir = app.Variables.ReplaceAllInString("{saveDir}");
- // custom variables used in this script
- // equivalent to ketarin variable "{file}"
- string savePath = app.PreviousLocation;
- string pkgPath = System.IO.Path.Combine(varChocoPkgOutput, varAppname, varVersion);
- if (!System.IO.Directory.Exists(pkgPath))
- {
- pkgPath = System.IO.Path.Combine(varChocoPkgOutput, varAppname);
- Ketarin.Forms.LogDialog.Log(app,"Using the output folder without a version");
- }
- Ketarin.Forms.LogDialog.Log(app, "Using package file at " + pkgPath);
- string fileNameNuspec = System.String.Concat(varAppname, ".nuspec");
- string fileUriNuspec = System.IO.Path.Combine(pkgPath, fileNameNuspec);
- string fileNameNupkg = System.String.Concat(varAppname, ".", varVersion, ".nupkg");
- string fileUriNupkg = System.IO.Path.Combine(pkgPath, fileNameNupkg);
- //MessageBox.Show("pkgPath=" + pkgPath + System.Environment.NewLine
- // + "savePath=" + savePath);
- // do not re-push package if package already created
- System.DateTime today = System.DateTime.Today;
- System.DateTime pkgCreateDate = System.IO.File.GetCreationTime(pkgPath);
- if (today > pkgCreateDate)
- {
- return;
- }
- // calculate SHA256 from {url} Note we are leveraging ketarin's downloaded copy
- System.IO.FileStream fileSha = new System.IO.FileStream(savePath, System.IO.FileMode.Open);
- System.Security.Cryptography.SHA256 sha256 = new System.Security.Cryptography.SHA256Managed();
- byte[] retValSha = sha256.ComputeHash(fileSha);
- fileSha.Close();
- // build string from byte value
- System.Text.StringBuilder sbSha = new System.Text.StringBuilder();
- for (int i = 0; i < retValSha.Length; i++)
- {
- sbSha.Append(retValSha[i].ToString("x2"));
- }
- // find $pkgPath -iname "*.nuspec" -o -iname "*.ps1" -exec sed -i 's/'$sbSha'/{checksum}/g' '{}' \;
- string replaceChecksum = sbSha.ToString();
- Ketarin.Forms.LogDialog.Log(app, "Checksum for url is " + replaceChecksum);
- //MessageBox.Show(replaceChecksum);
- System.Collections.Generic.List<string> pkgFileList = new System.Collections.Generic.List<string>(System.IO.Directory.GetFiles(pkgPath, "*.ps1", System.IO.SearchOption.AllDirectories));
- string[] filesNuspec = System.IO.Directory.GetFiles(pkgPath, "*.nuspec", System.IO.SearchOption.AllDirectories);
- pkgFileList.AddRange(filesNuspec);
- string[] files = pkgFileList.ToArray();
- foreach (string file in files)
- {
- try
- {
- string contents = System.IO.File.ReadAllText(file);
- //MessageBox.Show(contents);
- contents = contents.Replace("{checksum}", replaceChecksum);
- //MessageBox.Show(contents);
- // Make files writable
- // File.SetAttributes(file, FileAttributes.Normal);
- System.IO.File.WriteAllText(file, contents);
- }
- catch (System.Exception ex)
- {
- System.Console.WriteLine(ex.Message);
- }
- }
- // Get Checksum for 64bit file if url64 exists
- if (varChecksum64File != "{url64}" && varChecksum64File != "\"\"" && !System.String.IsNullOrEmpty(varChecksum64File))
- {
- // TODO: verify and validate URI checksum64file points to a downloadable file
- // string varChecksum64basefile = app.Variables.ReplaceAllInString("{url64:basefile}");
- string varChecksum64ext = app.Variables.ReplaceAllInString("{url64:ext}");
- string saveFileName64 = System.String.Concat(varAppname, "_64_", varVersion, ".", varChecksum64ext);
- string savePath64 = System.IO.Path.Combine(varSaveDir, saveFileName64);
- // we must download the file to calculate checksum ... may as well save it
- Ketarin.Forms.LogDialog.Log(app, "Downloading '" + varChecksum64File + "' to '" + savePath64 + "'.");
- System.Net.WebClient webClient = new System.Net.WebClient();
- webClient.DownloadFile(varChecksum64File, savePath64);
- // calculate SHA256 from file of url pointed to by 'checksum64file'
- System.IO.FileStream file64Sha = new System.IO.FileStream(savePath64, System.IO.FileMode.Open);
- System.Security.Cryptography.SHA256 sha256_64 = new System.Security.Cryptography.SHA256Managed();
- byte[] retVal64Sha = sha256_64.ComputeHash(file64Sha);
- file64Sha.Close();
- // build string from byte value
- System.Text.StringBuilder sb64Sha = new System.Text.StringBuilder();
- for (int i = 0; i < retVal64Sha.Length; i++)
- {
- sb64Sha.Append(retVal64Sha[i].ToString("x2"));
- }
- // find $pkgPath -iname "*.nuspec" -o -iname "*.ps1" -exec sed -i 's/'$sb64Sha'/{checksumx64}/g' '{}' \;
- // Note chocopkgup will strip 1 set of curly braces so {{checksum}} becomes {checksum}
- string replace64Checksum = sb64Sha.ToString();
- Ketarin.Forms.LogDialog.Log(app, "Checksum for url64 is " + replace64Checksum);
- foreach (string file in files)
- {
- try
- {
- string contents = System.IO.File.ReadAllText(file);
- //MessageBox.Show(contents);
- contents = contents.Replace("{checksumx64}", replace64Checksum);
- //MessageBox.Show(contents);
- System.IO.File.WriteAllText(file, contents);
- }
- catch (System.Exception ex)
- {
- System.Console.WriteLine(ex.Message);
- }
- }
- }
- // delete existing nupkg made by chocopkgup; we leverage chocopkgup to create the structure/files in destination
- Ketarin.Forms.LogDialog.Log(app, "Deleting the existing nupkg before repacking at " + fileUriNupkg);
- System.Diagnostics.Process process1 = new System.Diagnostics.Process();
- System.Diagnostics.ProcessStartInfo proc1 = new System.Diagnostics.ProcessStartInfo();
- proc1.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
- proc1.UseShellExecute = true;
- proc1.WorkingDirectory = pkgPath;
- proc1.FileName = "cmd.exe";
- proc1.Arguments = "/c " + "del /f " + fileUriNupkg;
- process1.StartInfo = proc1;
- process1.Start();
- process1.WaitForExit(30000);
- // create a new nupkg
- Ketarin.Forms.LogDialog.Log(app, "Packing up the package, this time with checksums");
- System.Diagnostics.Process process2 = new System.Diagnostics.Process();
- System.Diagnostics.ProcessStartInfo proc2 = new System.Diagnostics.ProcessStartInfo();
- proc2.WindowStyle = System.Diagnostics.ProcessWindowStyle.Minimized;
- proc2.UseShellExecute = false;
- proc2.WorkingDirectory = pkgPath;
- proc2.FileName = "C:\\ProgramData\\Chocolatey\\bin\\choco.exe";
- proc2.Arguments = "pack " + fileUriNuspec;
- proc2.RedirectStandardOutput = true;
- proc2.RedirectStandardError = true;
- proc2.CreateNoWindow = true;
- process2.StartInfo = proc2;
- process2.OutputDataReceived += (s, e) => { if (e != null) Ketarin.Forms.LogDialog.Log(app, e.Data); };
- process2.ErrorDataReceived += (s, e) => { if (e != null) Ketarin.Forms.LogDialog.Log(app, e.Data); };
- process2.EnableRaisingEvents = true;
- process2.Start();
- process2.BeginErrorReadLine();
- process2.BeginOutputReadLine();
- process2.WaitForExit(30000);
- process2.StartInfo = proc2;
- process2.Start();
- // push the nupkg
- if (varCScript == "2")
- {
- System.Threading.Thread.Sleep(2000);
- System.Int32 exitCode = -1;
- Ketarin.Forms.LogDialog.Log(app, "Pushing the package");
- System.Diagnostics.Process process3 = new System.Diagnostics.Process();
- System.Diagnostics.ProcessStartInfo proc3 = new System.Diagnostics.ProcessStartInfo();
- proc3.WindowStyle = System.Diagnostics.ProcessWindowStyle.Minimized;
- proc3.UseShellExecute = false;
- proc3.WorkingDirectory = pkgPath;
- proc3.FileName = "C:\\ProgramData\\Chocolatey\\bin\\choco.exe";
- // find nupkg in pkgPath
- string[] pushPkg = System.IO.Directory.GetFiles(pkgPath, "*.nupkg", System.IO.SearchOption.TopDirectoryOnly);
- foreach (System.String file in pushPkg)
- {
- Ketarin.Forms.LogDialog.Log(app, "Pushing " + file + " to dot org");
- proc3.Arguments = "push " + file;
- }
- proc3.RedirectStandardOutput = true;
- proc3.RedirectStandardError = true;
- proc3.CreateNoWindow = true;
- process3.StartInfo = proc3;
- process3.OutputDataReceived += (s, e) => { if (e != null) Ketarin.Forms.LogDialog.Log(app, e.Data); };
- process3.ErrorDataReceived += (s, e) => { if (e != null) Ketarin.Forms.LogDialog.Log(app, e.Data); };
- process3.EnableRaisingEvents = true;
- process3.Start();
- process3.BeginErrorReadLine();
- process3.BeginOutputReadLine();
- System.Boolean exited = process3.WaitForExit(120000);
- if (exited)
- {
- exitCode = process3.ExitCode;
- }
- if (exitCode != 0)
- {
- throw new System.Exception("Push did not finish successfully. See the log for details.");
- Ketarin.Forms.LogDialog.Log(app, "This is a failure. However Ketarin doesn't error on post updates.");
- }
- }
- }</string>
- </value>
- </item>
- <item>
- <key>
- <string>DefaultCommandType</string>
- </key>
- <value>
- <string>System.String:CS</string>
- </value>
- </item>
- <item>
- <key>
- <string>PostUpdateCommand</string>
- </key>
- <value>
- <string>System.String:</string>
- </value>
- </item>
- <item>
- <key>
- <string>PostUpdateCommandType</string>
- </key>
- <value>
- <string>System.String:Batch</string>
- </value>
- </item>
- <item>
- <key>
- <string>DefaultApplication</string>
- </key>
- <value>
- <string>System.String:<?xml version="1.0" encoding="utf-8"?>
- <Jobs>
- <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <WebsiteUrl />
- <UserAgent />
- <UserNotes />
- <LastFileSize>0</LastFileSize>
- <LastFileDate xsi:nil="true" />
- <IgnoreFileInformation>false</IgnoreFileInformation>
- <DownloadBeta>Default</DownloadBeta>
- <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
- <VariableChangeIndicator />
- <HashVariable />
- <HashType>None</HashType>
- <CanBeShared>true</CanBeShared>
- <ShareApplication>false</ShareApplication>
- <ExclusiveDownload>false</ExclusiveDownload>
- <HttpReferer />
- <SetupInstructions />
- <Variables>
- <item>
- <key>
- <string>nopush</string>
- </key>
- <value>
- <UrlVariable>
- <RegexRightToLeft>false</RegexRightToLeft>
- <VariableType>Textual</VariableType>
- <Regex />
- <TextualContent>--nopush</TextualContent>
- <Name>nopush</Name>
- </UrlVariable>
- </value>
- </item>
- <item>
- <key>
- <string>version</string>
- </key>
- <value>
- <UrlVariable>
- <RegexRightToLeft>false</RegexRightToLeft>
- <VariableType>RegularExpression</VariableType>
- <Regex>Last program version.*?([\d\.]+)</Regex>
- <Url>x</Url>
- <Name>version</Name>
- </UrlVariable>
- </value>
- </item>
- <item>
- <key>
- <string>url</string>
- </key>
- <value>
- <UrlVariable>
- <RegexRightToLeft>false</RegexRightToLeft>
- <VariableType>Textual</VariableType>
- <Regex />
- <TextualContent>{getUrl}</TextualContent>
- <Name>url</Name>
- </UrlVariable>
- </value>
- </item>
- <item>
- <key>
- <string>url64</string>
- </key>
- <value>
- <UrlVariable>
- <RegexRightToLeft>false</RegexRightToLeft>
- <VariableType>Textual</VariableType>
- <Regex />
- <TextualContent>{getUrl64}</TextualContent>
- <Name>url64</Name>
- </UrlVariable>
- </value>
- </item>
- <item>
- <key>
- <string>getUrl</string>
- </key>
- <value>
- <UrlVariable>
- <RegexRightToLeft>false</RegexRightToLeft>
- <VariableType>RegularExpression</VariableType>
- <Regex>[^ "'&lt;&gt;\*]+\.exe</Regex>
- <Url>x</Url>
- <Name>getUrl</Name>
- </UrlVariable>
- </value>
- </item>
- <item>
- <key>
- <string>getUrl64</string>
- </key>
- <value>
- <UrlVariable>
- <RegexRightToLeft>false</RegexRightToLeft>
- <VariableType>RegularExpression</VariableType>
- <Regex>[^ "'&lt;&gt;\*]+\.exe</Regex>
- <Url>x</Url>
- <Name>getUrl64</Name>
- </UrlVariable>
- </value>
- </item>
- <item>
- <key>
- <string>checksum</string>
- </key>
- <value>
- <UrlVariable>
- <RegexRightToLeft>false</RegexRightToLeft>
- <VariableType>RegularExpression</VariableType>
- <Regex>[A-Fa-f0-9]{32}</Regex>
- <Url>md5</Url>
- <TextualContent>{checksum}</TextualContent>
- <Name>checksum</Name>
- </UrlVariable>
- </value>
- </item>
- <item>
- <key>
- <string>checksumx64</string>
- </key>
- <value>
- <UrlVariable>
- <RegexRightToLeft>false</RegexRightToLeft>
- <VariableType>RegularExpression</VariableType>
- <Regex>(?&lt;=ResponseUri: )[^\r\n]+</Regex>
- <Url>{url64}</Url>
- <TextualContent>{checksum}</TextualContent>
- <Name>checksumx64</Name>
- </UrlVariable>
- </value>
- </item>
- <item>
- <key>
- <string>checksum64file</string>
- </key>
- <value>
- <UrlVariable>
- <RegexRightToLeft>false</RegexRightToLeft>
- <VariableType>Textual</VariableType>
- <Regex />
- <TextualContent>{url64}</TextualContent>
- <Name>checksum64file</Name>
- </UrlVariable>
- </value>
- </item>
- <item>
- <key>
- <string>cscript</string>
- </key>
- <value>
- <UrlVariable>
- <RegexRightToLeft>false</RegexRightToLeft>
- <VariableType>Textual</VariableType>
- <Regex />
- <TextualContent>0</TextualContent>
- <Name>cscript</Name>
- </UrlVariable>
- </value>
- </item>
- </Variables>
- <ExecuteCommand />
- <ExecutePreCommand />
- <ExecuteCommandType>Batch</ExecuteCommandType>
- <ExecutePreCommandType>Batch</ExecutePreCommandType>
- <Category />
- <SourceType>FixedUrl</SourceType>
- <DeletePreviousFile>false</DeletePreviousFile>
- <Enabled>true</Enabled>
- <FileHippoId />
- <TargetPath>{saveDir}\{appname}_{version}.{url:ext}</TargetPath>
- <FixedDownloadUrl>{url}</FixedDownloadUrl>
- <Name>x </Name>
- </ApplicationJob>
- </Jobs></string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/x:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/x:Width</string>
- </key>
- <value>
- <string>System.Int32:89</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/x:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:-1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Filesize:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Filesize:Width</string>
- </key>
- <value>
- <string>System.Int32:68</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Filesize:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:5</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/url:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/url:Width</string>
- </key>
- <value>
- <string>System.Int32:147</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/url:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:-1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/host:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/host:Width</string>
- </key>
- <value>
- <string>System.Int32:120</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/host:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:10</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/packageGuid:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/packageGuid:Width</string>
- </key>
- <value>
- <string>System.Int32:77</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/packageGuid:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:14</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/fileDate:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/fileDate:Width</string>
- </key>
- <value>
- <string>System.Int32:97</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/fileDate:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:3</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/fixedUrl:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/fixedUrl:Width</string>
- </key>
- <value>
- <string>System.Int32:96</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/fixedUrl:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:9</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/referer:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/referer:Width</string>
- </key>
- <value>
- <string>System.Int32:65</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/referer:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:13</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/User-Agent:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/User-Agent:Width</string>
- </key>
- <value>
- <string>System.Int32:80</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/User-Agent:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:8</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/DeletePreviousFile:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/DeletePreviousFile:Width</string>
- </key>
- <value>
- <string>System.Int32:41</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/DeletePreviousFile:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:20</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/VariableChangeIndicator:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/VariableChangeIndicator:Width</string>
- </key>
- <value>
- <string>System.Int32:55</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/VariableChangeIndicator:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:15</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/github:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/github:Width</string>
- </key>
- <value>
- <string>System.Int32:64</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/github:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:16</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/kde:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/kde:Width</string>
- </key>
- <value>
- <string>System.Int32:49</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/kde:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:17</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/cscript:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/cscript:Width</string>
- </key>
- <value>
- <string>System.Int32:32</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/cscript:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:22</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/enabled:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/enabled:Width</string>
- </key>
- <value>
- <string>System.Int32:60</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/enabled:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:26</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/nopush:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/nopush:Width</string>
- </key>
- <value>
- <string>System.Int32:60</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/nopush:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:23</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/domainname:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/domainname:Width</string>
- </key>
- <value>
- <string>System.Int32:166</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/domainname:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:10</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/domain:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/domain:Width</string>
- </key>
- <value>
- <string>System.Int32:141</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/domain:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:17</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/checksum64file:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/checksum64file:Width</string>
- </key>
- <value>
- <string>System.Int32:91</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/checksum64file:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:25</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Target2:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Target2:Width</string>
- </key>
- <value>
- <string>System.Int32:60</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/Target2:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:-1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/AppName:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/AppName:Width</string>
- </key>
- <value>
- <string>System.Int32:164</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/AppName:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:-1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/version:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/version:Width</string>
- </key>
- <value>
- <string>System.Int32:120</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/version:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/filesize:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/filesize:Width</string>
- </key>
- <value>
- <string>System.Int32:68</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/filesize:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:8</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/user-agent:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/user-agent:Width</string>
- </key>
- <value>
- <string>System.Int32:60</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/user-agent:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:12</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/delPrevFile:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/delPrevFile:Width</string>
- </key>
- <value>
- <string>System.Int32:60</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/delPrevFile:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:27</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/varChangeIndicator:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/varChangeIndicator:Width</string>
- </key>
- <value>
- <string>System.Int32:60</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/varChangeIndicator:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:20</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/varChgInd:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/varChgInd:Width</string>
- </key>
- <value>
- <string>System.Int32:82</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/varChgInd:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:16</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/url64:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/url64:Width</string>
- </key>
- <value>
- <string>System.Int32:60</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/url64:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:24</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/hash:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/hash:Width</string>
- </key>
- <value>
- <string>System.Int32:60</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/hash:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:24</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/hashType:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/hashType:Width</string>
- </key>
- <value>
- <string>System.Int32:60</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/hashType:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:18</string>
- </value>
- </item>
- <item>
- <key>
- <string>ImportFromDatabaseDialog/Size</string>
- </key>
- <value>
- <string>System.Drawing.Size:524,1596</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApplications/Application name:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApplications/Application name:Width</string>
- </key>
- <value>
- <string>System.Int32:291</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApplications/Application name:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:-1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApplications/Last updated:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApplications/Last updated:Width</string>
- </key>
- <value>
- <string>System.Int32:130</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApplications/Last updated:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:-1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApplications/Uses:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApplications/Uses:Width</string>
- </key>
- <value>
- <string>System.Int32:40</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApplications/Uses:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:-1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApplications/LastSortColumn</string>
- </key>
- <value>
- <string>System.String:Application name</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApplications/LastSortOrder</string>
- </key>
- <value>
- <string>System.Int32:1</string>
- </value>
- </item>
- <item>
- <key>
- <string>ChooseAppsToInstallDialog/Size</string>
- </key>
- <value>
- <string>System.Drawing.Size:618,433</string>
- </value>
- </item>
- <item>
- <key>
- <string>ChooseAppsToInstallDialog/Location</string>
- </key>
- <value>
- <string>System.Drawing.Point:675,637</string>
- </value>
- </item>
- <item>
- <key>
- <string>ChooseAppsToInstallDialog/WindowState</string>
- </key>
- <value>
- <string>System.Int32:0</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApps/Name:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApps/Name:Width</string>
- </key>
- <value>
- <string>System.Int32:263</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApps/Name:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:-1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApps/LastSortColumn</string>
- </key>
- <value>
- <string>System.String:Name</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvApps/LastSortOrder</string>
- </key>
- <value>
- <string>System.Int32:1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLists/Name:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLists/Name:Width</string>
- </key>
- <value>
- <string>System.Int32:80</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLists/Name:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:-1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLists/Applications:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLists/Applications:Width</string>
- </key>
- <value>
- <string>System.Int32:80</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLists/Applications:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:-1</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLists/LastSortColumn</string>
- </key>
- <value>
- <string>System.String:Name</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvLists/LastSortOrder</string>
- </key>
- <value>
- <string>System.Int32:0</string>
- </value>
- </item>
- <item>
- <key>
- <string>ChooseAppsToInstallDialog/ListsView</string>
- </key>
- <value>
- <string>System.Int32:4</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/proto:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/proto:Width</string>
- </key>
- <value>
- <string>System.Int32:60</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/proto:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:11</string>
- </value>
- </item>
- <item>
- <key>
- <string>CopyFileInstructionDialog/Size</string>
- </key>
- <value>
- <string>System.Drawing.Size:402,163</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/bytes:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/bytes:Width</string>
- </key>
- <value>
- <string>System.Int32:71</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/bytes:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:7</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/hashExtVar:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/hashExtVar:Width</string>
- </key>
- <value>
- <string>System.Int32:60</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/hashExtVar:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:23</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/hashInternal:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/hashInternal:Width</string>
- </key>
- <value>
- <string>System.Int32:60</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/hashInternal:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:19</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/hashExternal:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/hashExternal:Width</string>
- </key>
- <value>
- <string>System.Int32:60</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/hashExternal:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:20</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/checksum64:Visibility</string>
- </key>
- <value>
- <string>System.Boolean:True</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/checksum64:Width</string>
- </key>
- <value>
- <string>System.Int32:33</string>
- </value>
- </item>
- <item>
- <key>
- <string>olvJobs/checksum64:LastDisplayIndex</string>
- </key>
- <value>
- <string>System.Int32:21</string>
- </value>
- </item>
- </dictionary>
- </Settings>
- <GlobalVariables>
- <Variable Name="7z" Content="7z.exe" />
- <Variable Name="saveDir" Content="c:\chocolatey-auto-save" />
- <Variable Name="autoPackagesFolder" Content="c:\code\chocolatey-packages\automatic" />
- <Variable Name="nopush" Content="--nopush" />
- <Variable Name="cscript" Content="2" />
- <Variable Name="null" Content="null" />
- <Variable Name="ie32" Content="Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)" />
- <Variable Name="ie64" Content="Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Media Center PC 5.0; SLCC1; Tablet PC 2.0; .NET4.0C)" />
- <Variable Name="firefox" Content="Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10" />
- <Variable Name="opera" Content="Opera/9.80 (Windows NT 6.1; U; en) Presto/2.6.30 Version/10.62" />
- <Variable Name="chrome" Content="Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3" />
- <Variable Name="wget" Content="wget/1.9+cvs-stable+(red+hat+modified)" />
- <Variable Name="curl" Content="pycurl/7.18.2" />
- <Variable Name="checksum" Content="{checksum}" />
- <Variable Name="checksumx64" Content="{checksumx64}" />
- <Variable Name="packageGuid" Content="{packageGuid}" />
- <Variable Name="url64" Content="{url64}" />
- <Variable Name="force" Content=" " />
- </GlobalVariables>
- <CodeSnippets>
- <Snippet Guid="7158800B-A188-4CAB-927C-31AA36FDD049" Name="chocopkgup" Type="1">chocopkgup {nopush} --packagename={appname} --version={version} --pg="{packageGuid}" --url="{preupdate-url}" --urlx64="{url64}" --packagepath="{file}" --checksum="{checksum}" --c64="{checksumx64}" --debug</Snippet>
- <Snippet Guid="BB8AF683-DA06-4C20-8434-9F854C46B961" Name="cs" Type="0">////////////////////////////////////////////////////////////////////////////////////////
- /// version 6.5
- ///
- /// FIX: do not re-push package if package already created
- ///
- // REQUIRES:
- // global vars: workdir=corresponds to download location of installer file
- // app vars: nopush, checksum64file=corresponds to 64 bit install file
- // file vars: same as specified by chocopkgup
- string varCScript = app.Variables.ReplaceAllInString("{cscript}");
- if ((varCScript == "1") || (varCScript == "2")) {
- string varAppname = app.Variables.ReplaceAllInString("{appname}");
- string varVersion = app.Variables.ReplaceAllInString("{version}");
- string varChocoPkgOutput = System.IO.Path.Combine(app.Variables.ReplaceAllInString("{autoPackagesFolder}"), "_output");
- string varChecksum = app.Variables.ReplaceAllInString("{checksum}");
- string varChecksumx64 = app.Variables.ReplaceAllInString("{checksumx64}");
- string varChecksum64File = app.Variables.ReplaceAllInString("{checksum64file}");
- string varChecksum64basefile = app.Variables.ReplaceAllInString("{checksum64file:basefile}");
- string varChecksum64ext = app.Variables.ReplaceAllInString("{checksum64file:ext}");
- string varWorkdir = app.Variables.ReplaceAllInString("{workdir}");
- string saveFileName64 = String.Concat(varChecksum64basefile, ".", varChecksum64ext);
- // equivalent to ketarin variable "{file}"
- //string savePath = app.PreviousLocation;
- string savePath = app.PreviousLocation;
- string pkgPath = Path.Combine(varChocoPkgOutput, varAppname, varVersion);
- if (!System.IO.Directory.Exists(pkgPath)) {
- pkgPath = Path.Combine(varChocoPkgOutput, varAppname);
- }
- string fileNameNuspec = String.Concat(varAppname, ".nuspec");
- string fileUriNuspec = Path.Combine(pkgPath, fileNameNuspec);
- string fileNameNupkg = String.Concat(varAppname, ".", varVersion, ".nupkg");
- string fileUriNupkg = Path.Combine(pkgPath, fileNameNupkg);
- // do not re-push package if package already created
- DateTime today = DateTime.Today;
- DateTime pkgCreateDate = File.GetCreationTime(pkgPath);
- if (today > pkgCreateDate) {
- return;
- }
- if (varChecksum == "{checksum}") {
- // calculate SHA1
- System.IO.FileStream fileSha1 = new System.IO.FileStream(savePath, System.IO.FileMode.Open);
- System.Security.Cryptography.SHA1 sha1 = new System.Security.Cryptography.SHA1CryptoServiceProvider();
- byte[] retValSha1 = sha1.ComputeHash(fileSha1);
- fileSha1.Close();
- // create a string
- System.Text.StringBuilder sbSha1 = new System.Text.StringBuilder();
- for (int i = 0; i < retValSha1.Length; i++) {
- sbSha1.Append(retValSha1[i].ToString("x2"));
- }
- string replaceChecksum = sbSha1.ToString();
- List<string> fileList = new List<string>(Directory.GetFiles(pkgPath, "*.ps1", SearchOption.AllDirectories));
- string[] filesNuspec = Directory.GetFiles(pkgPath, "*.nuspec", SearchOption.AllDirectories);
- fileList.AddRange(filesNuspec);
- string[] files = fileList.ToArray();
- foreach (string file in files) {
- try {
- string contents = File.ReadAllText(file);
- contents = contents.Replace("{checksum}", replaceChecksum);
- // Make files writable
- // File.SetAttributes(file, FileAttributes.Normal);
- File.WriteAllText(file, contents);
- } catch (Exception ex) {
- Console.WriteLine(ex.Message);
- }
- }
- }
- // only get checksum if {checksum64file} exists and points to a downloadable file
- if (varChecksumx64 == "{checksumx64}" && varChecksum64File != "{checksum64file}") {
- string savePath64 = Path.Combine(varWorkdir, saveFileName64);
- System.Net.WebClient webClient = new System.Net.WebClient();
- webClient.DownloadFile(varChecksum64File, savePath64);
- // calculate SHA1
- System.IO.FileStream file64Sha1 = new System.IO.FileStream(savePath64, System.IO.FileMode.Open);
- System.Security.Cryptography.SHA1 sha164 = new System.Security.Cryptography.SHA1CryptoServiceProvider();
- byte[] retVal64Sha1 = sha164.ComputeHash(file64Sha1);
- file64Sha1.Close();
- // create a string
- System.Text.StringBuilder sb64Sha1 = new System.Text.StringBuilder();
- for (int i = 0; i < retVal64Sha1.Length; i++) {
- sb64Sha1.Append(retVal64Sha1[i].ToString("x2"));
- }
- string replace64Checksum = sb64Sha1.ToString();
- List<string> fileList = new List<string>(Directory.GetFiles(pkgPath, "*.ps1", SearchOption.AllDirectories));
- string[] filesNuspec = Directory.GetFiles(pkgPath, "*.nuspec", SearchOption.AllDirectories);
- fileList.AddRange(filesNuspec);
- string[] files = fileList.ToArray();
- foreach (string file in files) {
- try {
- string contents = File.ReadAllText(file);
- contents = contents.Replace("{checksumx64}", replace64Checksum);
- File.WriteAllText(file, contents);
- } catch (Exception ex) {
- Console.WriteLine(ex.Message);
- }
- }
- }
- int checkBeta = varVersion.Split('-').Length;
- if ( checkBeta == 2) {
- string strPre = varVersion.Split('-')[1];
- string strReplace = String.Concat(strPre, "</version>");
- string strCheck = String.Concat(".", DateTime.Now.ToString("yyyyMMdd"), "</version>");
- string[] fileNuspec = Directory.GetFiles(pkgPath, "*.nuspec", SearchOption.AllDirectories);
- foreach (string file in fileNuspec) {
- string contents = File.ReadAllText(file);
- contents = contents.Replace(strCheck, strReplace);
- File.WriteAllText(file, contents);
- }
- }
- // delete existing nupkg made by chocopkgup; we leverage chocopkgup to create the structure/files in destination
- System.Diagnostics.Process process1 = new System.Diagnostics.Process();
- System.Diagnostics.ProcessStartInfo proc1 = new System.Diagnostics.ProcessStartInfo();
- proc1.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
- proc1.UseShellExecute = true;
- proc1.WorkingDirectory = pkgPath;
- proc1.FileName = "cmd.exe";
- proc1.Arguments = "/c "+"del /f " + fileUriNupkg;
- process1.StartInfo = proc1;
- process1.Start();
- // create a new nupkg
- System.Diagnostics.Process process2 = new System.Diagnostics.Process();
- System.Diagnostics.ProcessStartInfo proc2 = new System.Diagnostics.ProcessStartInfo();
- proc2.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
- proc2.UseShellExecute = true;
- proc2.WorkingDirectory = pkgPath;
- proc2.FileName = "cmd.exe";
- proc2.Arguments = "/c "+"choco pack "+fileUriNuspec+" -d";
- process2.StartInfo = proc2;
- process2.Start();
- // push the nupkg
- if (varCScript == "2") {
- System.Diagnostics.Process process3 = new System.Diagnostics.Process();
- System.Diagnostics.ProcessStartInfo proc3 = new System.Diagnostics.ProcessStartInfo();
- proc3.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
- proc3.UseShellExecute = true;
- proc3.WorkingDirectory = pkgPath;
- proc3.FileName = "cmd.exe";
- // find nupkg in pkgPath
- string[] pushPkg = Directory.GetFiles(pkgPath, "*.nupkg", SearchOption.TopDirectoryOnly);
- foreach (String file in pushPkg) {
- proc3.Arguments = "/c "+"cpush " + file + " -d";
- }
- process3.StartInfo = proc3;
- System.Threading.Thread.Sleep(2000);
- process3.Start();
- }
- }</Snippet>
- </CodeSnippets>
- <SetupLists />
- </Ketarin>
|