1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665 |
- <?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:2329,476</string>
- </value>
- </item>
- <item>
- <key>
- <string>MainForm/Location</string>
- </key>
- <value>
- <string>System.Drawing.Point:-6,1300</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:152</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:# Script version: 1.3.0.0
- #
- # Changelog
- # evaluate custom variables rather than using variables' CachedContent
- #
- # Requires:
- # chocolateypackageupdater
- # >=ketarin-1.8.5
- #
- # To configure Ketarin:
- # 1. Copy this file
- # 2. Navigate to: Ketarin >> File >> Settings >> Commands tab
- # 3a. >> Before updating an application
- # 3b. >> Command >> Powershell script
- # 3c. Remove any existing text and paste this file into text area
- # Package variables to be checked for content
- $vars = "version","url","url64","checksum","checksumx64","packageGuid","nopush"
- $hash = @{}
- # Build hash using $vars for $hash.keys and corresponding content, if any, to $hash.values
- foreach ($var in $vars) {
- if ($app.variables.ContainsKey($var)) {
- #$hash[$var] = $app.variables.item($var).cachedcontent
- $hash[$var] = $app.variables.ReplaceAllInString("{$var}")
- } else {
- $hash[$var] = "{$var}"
- }
- Write-Host "`$hash[$var] is: $($hash[$var])"
- }
- Write-Host @"
- Running:
- chocopkgup $($hash["nopush"]) ``
- --packagename=$app ``
- --version=`"$($hash["version"])`" ``
- --url=`"$($hash["url"])`" ``
- --urlx64=`"$($hash["url64"])`" ``
- --checksum=`"$($hash["checksum"])`" ``
- --c64=`"$($hash["checksumx64"])`" ``
- --pg=`"$($hash["packageguid"])`" ``
- --debug
- "@
- # Using corresponding hash values of keys from $vars, set parameters of
- # https://chocolatey.org/packages/chocolateypackageupdater
- chocopkgup $hash["nopush"] `
- --packagename=$app `
- --version="$($hash["version"])" `
- --url="$($hash["url"])" `
- --urlx64="$($hash["url64"])" `
- --checksum="$($hash["checksum"])" `
- --c64="$($hash["checksumx64"])" `
- --pg="$($hash["packageguid"])" `
- --debug</string>
- </value>
- </item>
- <item>
- <key>
- <string>PreUpdateCommandType</string>
- </key>
- <value>
- <string>System.String:PowerShell</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>packageGuid</string>
- </key>
- <value>
- <string>{packageGuid}</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>checksum64file</string>
- </key>
- <value>
- <string>{checksum64file}</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:397,147</string>
- </value>
- </item>
- <item>
- <key>
- <string>SetPlaceholderDialog/Location</string>
- </key>
- <value>
- <string>System.Drawing.Point:1118,929</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:-11,212</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:1825,423</string>
- </value>
- </item>
- <item>
- <key>
- <string>LogDialog/Location</string>
- </key>
- <value>
- <string>System.Drawing.Point:-7,747</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 6.8.0.0
- ///
- /// Changelog: Calc SHA256 sums
- /// Ticket: https://github.com/dtgm/chocolatey-packages/issues/196
- ///
- // 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 = app.Variables.ReplaceAllInString("{cscript}");
- // 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 = app.Variables.ReplaceAllInString("{chocoPkgOut}");
- 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 varSaveDir = app.Variables.ReplaceAllInString("{saveDir}");
- // custom variables used in this script
- string saveFileName64 = String.Concat(varAppname, "_64_", varVersion, ".", varChecksum64ext);
- string savePath64 = Path.Combine(varSaveDir, saveFileName64);
- // equivalent to ketarin variable "{file}"
- string savePath = app.PreviousLocation;
- string pkgPath = Path.Combine(varChocoPkgOutput, varAppname, varVersion);
- 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);
- /* DEBUG
- MessageBox.Show(varSaveDir + System.Environment.NewLine
- + saveFileName64 + System.Environment.NewLine
- + savePath64);*/
- // do not re-push package if package already created
- DateTime today = DateTime.Today;
- DateTime pkgCreateDate = File.GetCreationTime(pkgPath);
- if (today > pkgCreateDate) {
- return;
- }
- // if package variable 'checksum' does not exist or is null
- if (varChecksum == "{checksum}") {
- // 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();
- //MessageBox.Show(replaceChecksum);
- 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);
- //MessageBox.Show(contents);
- contents = contents.Replace("{checksum}", replaceChecksum);
- //MessageBox.Show(contents);
- // Make files writable
- // File.SetAttributes(file, FileAttributes.Normal);
- File.WriteAllText(file, contents);
- } catch (Exception ex) {
- Console.WriteLine(ex.Message);
- }
- }
- }
- // only get checksum if checksumx64 does NOT exist and 'checksum64file' DOES exists
- if (varChecksumx64 == "{checksumx64}" && varChecksum64File != "{checksum64file}") {
- // TODO: verify and validate URI checksum64file points to a downloadable file
-
- // we must download the file to calculate checksum ... may as well save it
- 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();
- //MessageBox.Show(replace64Checksum);
- 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);
- //MessageBox.Show(contents);
- contents = contents.Replace("{checksumx64}", replace64Checksum);
- //MessageBox.Show(contents);
- File.WriteAllText(file, contents);
- } catch (Exception ex) {
- Console.WriteLine(ex.Message);
- }
- }
- }
- // attempt to fix chocopkgup failure when faced with letters in version variable
- // ...what was I thinking? no, seriously.
- /*
- 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();
- }
- }</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-automatic" />
- <Variable Name="null" Content="null" />
- <Variable Name="chocoPkgOut" Content="C:\code\chocolatey-packages\automatic\_output" />
- <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="cscript" Content="2" />
- </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 = app.Variables.ReplaceAllInString("{chocoPkgOutput}");
- 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);
- 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>
|