Acrobat Manifest

[Windows]SCUP用のcabファイルを解凍してAcrobatのアップデータのURLを取得する



ダウンロード - acrobatwindows.zip



AcrobatWin.scpt

AppleScript サンプルコード

【スクリプトエディタで開く】 |

AppleScript サンプルソース(参考)
行番号ソース
001#!/usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003(*
004Windows版のアップデータのURLを全部取得します
005出力テキストの下部が新しいバージョンになります
006解凍に7zzを指定しています
007*)
008----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
009use AppleScript version "2.8"
010use framework "Foundation"
011use framework "AppKit"
012use scripting additions
013
014property refMe : a reference to current application
015
016property refNSNotFound : a reference to 9.22337203685477E+18 + 5807
017
018##############################
019#7zaのパス
020set aliasPathToMe to (path to me) as alias
021tell application "Finder"
022  set aliasContainerDirPath to (container of aliasPathToMe) as alias
023  set aliasBinPath to (file "7zz" of folder "bin" of folder aliasContainerDirPath) as alias
024end tell
025set strBinPath to (POSIX path of aliasBinPath) as text
026#通常はこちら
027#set strBinPath to ("/usr/local/bin/7za") as text
028#set strBinPath to ("/usr/local/bin/7zz") as text
029
030
031##############################
032#ダイアログ
033
034set listSCUP to {"ReaderCatalog-DC.cab", "ReaderCatalog-2020.cab", "ReaderCatalog-2017.cab", "ReaderCatalog-2015.cab", "AcrobatCatalog-DC.cab", "AcrobatCatalog-2020.cab", "AcrobatCatalog-2017.cab", "AcrobatCatalog-2015.cab", "AcrobatCatalog-Classic.cab"} as list
035
036
037set strName to (name of current application) as text
038if strName is "osascript" then
039  tell application "Finder" to activate
040else
041  tell current application to activate
042end if
043###
044set strTitle to ("選んでください") as text
045set strPrompt to ("選んだ項目で戻します") as text
046try
047  set objResponse to (choose from list listSCUP with title strTitle with prompt strPrompt default items (item 1 of listSCUP) OK button name "OK" cancel button name "キャンセル" with empty selection allowed without multiple selections allowed)
048on error
049  log "エラーしました"
050  return "エラーしました"
051end try
052log class of objResponse
053if (class of objResponse) is boolean then
054  return "キャンセルしましたA"
055else if (class of objResponse) is list then
056  if objResponse is {} then
057    return "キャンセルしましたB"
058  else
059    set strResponse to (item 1 of objResponse) as text
060  end if
061end if
062
063
064##############################
065#ダウンロードするURL
066set ocidURLComponents to refMe's NSURLComponents's alloc()'s init()
067ocidURLComponents's setScheme:("https")
068ocidURLComponents's setHost:("armmf.adobe.com")
069ocidURLComponents's setPath:("/arm-manifests/win/SCUP/" & strResponse & "")
070set ocidURL to ocidURLComponents's |URL|()
071log ocidURL's absoluteString() as text
072set ocidFileName to ocidURL's lastPathComponent()
073##############################
074#起動時に削除される項目にダウンロード
075set appFileManager to refMe's NSFileManager's defaultManager()
076set ocidTempDirURL to appFileManager's temporaryDirectory()
077set ocidUUID to refMe's NSUUID's alloc()'s init()
078set ocidUUIDString to ocidUUID's UUIDString
079set ocidSaveDirPathURL to ocidTempDirURL's URLByAppendingPathComponent:(ocidUUIDString) isDirectory:(true)
080#フォルダを作っておく
081set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
082ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
083set listDone to appFileManager's createDirectoryAtURL:(ocidSaveDirPathURL) withIntermediateDirectories:(true) attributes:(ocidAttrDict) |error| :(reference)
084if (item 1 of listDone) is true then
085  log "createDirectoryAtURL 正常処理"
086else if (item 2 of listDone) (missing value) then
087  log (item 2 of listDone)'s code() as text
088  log (item 2 of listDone)'s localizedDescription() as text
089  return "createDirectoryAtURL エラーしました"
090end if
091#保存パス
092set ocidSaveFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:(ocidFileName) isDirectory:(false)
093
094##############################
095#NSDATAでダウンロード
096set ocidOption to (refMe's NSDataReadingMappedIfSafe)
097set listResponse to refMe's NSData's alloc()'s initWithContentsOfURL:(ocidURL) options:(ocidOption) |error| :(reference)
098if (item 2 of listResponse) = (missing value) then
099  log "正常処理"
100  set ocidReadData to (item 1 of listResponse)
101else if (item 2 of listResponse) (missing value) then
102  log (item 2 of listResponse)'s code() as text
103  log (item 2 of listResponse)'s localizedDescription() as text
104  return "エラーしました"
105end if
106
107##############################
108#保存
109set ocidOption to (refMe's NSDataWritingAtomic)
110set listDone to ocidReadData's writeToURL:(ocidSaveFilePathURL) options:(ocidOption) |error| :(reference)
111if (item 1 of listDone) is true then
112  log "正常処理"
113else if (item 2 of listDone) (missing value) then
114  log (item 2 of listDone)'s code() as text
115  log (item 2 of listDone)'s localizedDescription() as text
116  return "エラーしました"
117end if
118##############################
119#PKG解凍
120set strPkgPath to (ocidSaveFilePathURL's |path|()) as text
121#解凍先
122set strDistPath to (ocidSaveDirPathURL's |path|()) as text
123#コマンド実行
124set strComandText to ("pushd \"" & strDistPath & "\" && \"" & strBinPath & "\"  e  \"" & strPkgPath & "\"") as text
125log strComandText
126try
127  do shell script strComandText
128on error
129  doOpenSystemPref()
130  return "7zaでエラーになりました"
131end try
132delay 1
133##############################
134#マニフェスト読み込み
135#XMLパス
136if strResponse contains "Acrobat" then
137  set ocidXmlFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:("Acrobat_Catalog.xml") isDirectory:(false)
138else
139  set ocidXmlFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:("Reader_Catalog.xml") isDirectory:(false)
140end if
141##############################
142#NSDATAに読み込み
143set ocidOption to (refMe's NSDataReadingMappedIfSafe)
144set listResponse to refMe's NSData's alloc()'s initWithContentsOfURL:(ocidXmlFilePathURL) options:(ocidOption) |error| :(reference)
145if (item 2 of listResponse) = (missing value) then
146  log "initWithContentsOfURL 正常処理"
147  set ocidReadData to (item 1 of listResponse)
148else if (item 2 of listResponse) (missing value) then
149  log (item 2 of listResponse)'s code() as text
150  log (item 2 of listResponse)'s localizedDescription() as text
151  return "initWithContentsOfURL エラーしました"
152end if
153##############################
154#XMLに読み込む
155set ocidOption to (refMe's NSXMLNodePreserveAll) + (refMe's NSXMLDocumentTidyXML)
156set listResponse to refMe's NSXMLDocument's alloc()'s initWithData:(ocidReadData) options:(ocidOption) |error| :(reference)
157if (item 2 of listResponse) = (missing value) then
158  log "initWithData 正常処理"
159  set ocidXMLDoc to (item 1 of listResponse)
160else if (item 2 of listResponse) (missing value) then
161  log (item 2 of listResponse)'s code() as text
162  log (item 2 of listResponse)'s localizedDescription() as text
163  log "initWithData エラー 警告がありました"
164  set ocidXMLDoc to (item 1 of listResponse)
165end if
166##############################
167#出力用テキスト
168set ocidOutPutstring to refMe's NSMutableString's alloc()'s initWithCapacity:(0)
169ocidOutPutstring's appendString:("Windows版  " & strResponse & " の最新パッチURL\n\n")
170ocidOutPutstring's appendString:("----+----1----+----2----+-----3----+----4----+----5----+----6----+----7\n\n")
171##############################
172#XML解析
173set ocidStringArrayM to refMe's NSMutableArray's alloc()'s init()
174#ROOT
175set ocidRootElement to ocidXMLDoc's rootElement()
176set ocidPackageArray to ocidRootElement's elementsForName:("smc:SoftwareDistributionPackage")
177#set ocidPackageItems to ocidPackageArray's firstObject()
178repeat with itemPackageArray in ocidPackageArray
179  set ocidSetURLstring to refMe's NSMutableString's alloc()'s init()
180  (ocidSetURLstring's appendString:(""))
181  
182  
183  #
184  set ocidLocalizedArray to (itemPackageArray's elementsForName:("sdp:LocalizedProperties"))
185  set ocidLocalized to ocidLocalizedArray's firstObject()
186  set ocidTitleArray to (ocidLocalized's elementsForName:("sdp:Title"))
187  set ocidLocalized to (ocidTitleArray's firstObject())'s stringValue()
188  (ocidSetURLstring's appendString:(ocidLocalized as text))
189  (ocidSetURLstring's appendString:("\n"))
190  #
191  set ocidItemArray to (itemPackageArray's elementsForName:("sdp:InstallableItem"))
192  set ocidInstallItem to ocidItemArray's firstObject()
193  set ocidFileElementArray to (ocidInstallItem's elementsForName:("sdp:OriginFile"))
194  set ocidFileElementItem to ocidFileElementArray's firstObject()
195  set ocidURI to (ocidFileElementItem's attributeForName:("OriginUri"))'s stringValue()
196  (ocidSetURLstring's appendString:(ocidURI as text))
197  (ocidSetURLstring's appendString:("\n\n"))
198  #
199  (ocidStringArrayM's addObject:(ocidSetURLstring))
200end repeat
201#
202set ocidSortedArray to ocidStringArrayM's sortedArrayUsingSelector:("localizedStandardCompare:")
203set ocidEnuArray to ocidSortedArray's reverseObjectEnumerator()
204set ocidReverseArray to ocidEnuArray's allObjects()
205set ocidJoinText to ocidReverseArray's componentsJoinedByString:("")
206ocidOutPutstring's appendString:(ocidJoinText)
207
208
209##############################
210#テキスト保存
211set ocidSaveTextFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:("AcrobatSCAManifest.txt") isDirectory:(false)
212set listDone to ocidOutPutstring's writeToURL:(ocidSaveTextFilePathURL) atomically:(true) encoding:(refMe's NSUTF8StringEncoding) |error| :(reference)
213if (item 1 of listDone) is true then
214  log "writeToURL 正常処理"
215else if (item 2 of listDone) (missing value) then
216  log (item 2 of listDone)'s code() as text
217  log (item 2 of listDone)'s localizedDescription() as text
218  return "writeToURL エラーしました"
219end if
220
221##############################
222#開く
223set appSharedWorkspace to refMe's NSWorkspace's sharedWorkspace()
224set boolDone to appSharedWorkspace's openURL:(ocidSaveTextFilePathURL)
225
226if (boolDone) is true then
227  return "正常処理"
228else if (boolDone) is false then
229  return "エラーしました"
230end if
231
232
233
234
235##############################
236#システム設定 オープン
237
238to doOpenSystemPref()
239  set strBundleID to ("com.apple.systempreferences") as text
240  ###URLにする
241  set ocidURLComponents to refMe's NSURLComponents's alloc()'s init()
242  ###スキーム
243  ocidURLComponents's setScheme:("x-apple.systempreferences")
244  ###パネルIDをパスにセット
245  ocidURLComponents's setPath:("com.apple.settings.PrivacySecurity.extension")
246  ###アンカーをクエリーとして追加
247  ocidURLComponents's setQuery:("Security")
248  set ocidOpenAppURL to ocidURLComponents's |URL|
249  set strOpenAppURL to ocidOpenAppURL's absoluteString() as text
250  ###ワークスペースで開く
251  set appShardWorkspace to refMe's NSWorkspace's sharedWorkspace()
252  set boolDone to appShardWorkspace's openURL:(ocidOpenAppURL)
253  log boolDone
254  if boolDone is false then
255    tell application id "com.apple.systempreferences"
256      activate
257      set miniaturized of the settings window to false
258    end tell
259    tell application id "com.apple.finder"
260      open location "x-apple.systempreferences:com.apple.settings.PrivacySecurity.extension?Security"
261    end tell
262    tell application id "com.apple.systempreferences"
263      reveal anchor "Security" of pane id "com.apple.settings.PrivacySecurity.extension"
264    end tell
265    tell application id "com.apple.systempreferences" to activate
266  end if
267  ###開くのを待つ
268  repeat 10 times
269    tell application id "com.apple.systempreferences"
270      set boolFrontMost to frontmost as boolean
271    end tell
272    if boolFrontMost is true then
273      delay 1
274      exit repeat
275    else
276      tell application id "com.apple.systempreferences" to activate
277      delay 0.5
278    end if
279  end repeat
280  ###パネルを確認して
281  repeat 10 times
282    tell application id "com.apple.systempreferences"
283      activate
284      tell current pane
285        set strPaneID to id
286      end tell
287    end tell
288    if strPaneID is "com.apple.systempreferences.GeneralSettings" then
289      delay 0.5
290    else if strPaneID is "com.apple.settings.PrivacySecurity.extension" then
291      exit repeat
292    end if
293  end repeat
294  ###アンカーを再指定
295  tell application "System Settings"
296    tell pane id "com.apple.settings.PrivacySecurity.extension"
297      tell anchor "Security"
298        try
299          reveal
300        end try
301        
302      end tell
303    end tell
304  end tell
305end doOpenSystemPref
AppleScriptで生成しました

|

【Acrobat】アップデーターのURLを取得する

アップデーターのURLを取得する必要があるのだけど
色々盛り込もう!として失敗したバターン
必要最低限の情報で良い場合

広範囲に網羅した方がいい場合

判断を間違えたやつ



ダウンロード - getupdaterurl.zip




AppleScript サンプルコード

【スクリプトエディタで開く】 |

AppleScript サンプルソース(参考)
行番号ソース
001#!/usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003#
004# com.cocolog-nifty.quicktimer.icefloe
005#
006#
007----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
008use AppleScript version "2.8"
009use framework "Foundation"
010use framework "AppKit"
011use scripting additions
012property refMe : a reference to current application
013
014#
015set aliasPathToMe to (path to me) as alias
016set strPathToMe to (POSIX path of aliasPathToMe) as text
017set ocidPathToMeStr to refMe's NSString's stringWithString:(strPathToMe)
018set ocidPathToMe to ocidPathToMeStr's stringByStandardizingPath()
019set ocidPathToMeURL to refMe's NSURL's alloc()'s initFileURLWithPath:(ocidPathToMe) isDirectory:(false)
020set ocidContainerDirPathURL to ocidPathToMeURL's URLByDeletingLastPathComponent()
021set ocidPrefDirPathURL to ocidContainerDirPathURL's URLByAppendingPathComponent:("Registered Products") isDirectory:(true)
022#URLの収集
023set appFileManager to refMe's NSFileManager's defaultManager()
024set ocidOption to (refMe's NSDirectoryEnumerationSkipsHiddenFiles)
025set ocidKeyArray to refMe's NSMutableArray's alloc()'s init()
026ocidKeyArray's addObject:(refMe's NSURLPathKey)
027set listSubPathResult to (appFileManager's contentsOfDirectoryAtURL:(ocidPrefDirPathURL) includingPropertiesForKeys:(ocidKeyArray) options:(ocidOption) |error| :(reference))
028set ocidSubPathURLArray to item 1 of listSubPathResult
029#収集ARRAY
030set ocidManifestArray to refMe's NSMutableArray's alloc()'s init()
031set ocidServicesUpdaterArray to refMe's NSMutableArray's alloc()'s init()
032set ocidARMDCArray to refMe's NSMutableArray's alloc()'s init()
033#収集したURL
034repeat with itemSubPath in ocidSubPathURLArray
035  set ocidSubPathURLstring to itemSubPath's absoluteString()
036  set boolContainARM to (ocidSubPathURLstring's containsString:("ARM"))
037  set boolContainServicesupdater to (ocidSubPathURLstring's containsString:("servicesupdater"))
038  if boolContainARM is true then
039    (ocidARMDCArray's addObject:(itemSubPath))
040  else if boolContainServicesupdater is true then
041    (ocidServicesUpdaterArray's addObject:(itemSubPath))
042  else
043    (ocidManifestArray's addObject:(itemSubPath))
044  end if
045end repeat
046##収集用Array
047set ocidOutputArrayM to refMe's NSMutableArray's alloc()'s init()
048
049
050####################################
051#Manifest
052repeat with itemURL in ocidManifestArray
053  #マニフェストのURLを取得
054  set ocidManifestURL to doGetManifest(itemURL)
055  #拡張子置換
056  set ocidBaseManifestURL to ocidManifestURL's URLByDeletingPathExtension()
057  set ocidManifestURL to (ocidBaseManifestURL's URLByAppendingPathExtension:("arm"))
058  log ocidManifestURL's absoluteString() as text
059  #マニフェストをダウンロード
060  set ocidManifestFileURL to doURL2Download(ocidManifestURL)
061  #pkgを解凍してXMLのパスの取得
062  set ocidXmlFilePathURL to doExpand2Pkg(ocidManifestFileURL)
063  log ocidXmlFilePathURL's absoluteString() as text
064  #解凍したマニフェストからURLを取り出し
065  set ocidURLArray to doGetPkgURL(ocidXmlFilePathURL)
066  (ocidOutputArrayM's addObjectsFromArray:(ocidURLArray))
067end repeat
068#ソート
069set ocidDescriptor to refMe's NSSortDescriptor's sortDescriptorWithKey:("absoluteString") ascending:(false) selector:("localizedStandardCompare:")
070set ocidDescriptorArray to refMe's NSArray's arrayWithObject:(ocidDescriptor)
071set ocidSortedArray to ocidOutputArrayM's sortedArrayUsingDescriptors:(ocidDescriptorArray)
072#
073set ocidSCAArrayM to refMe's NSMutableArray's alloc()'s init()
074set ocidDCArrayM to refMe's NSMutableArray's alloc()'s init()
075set ocidClassicArrayM to refMe's NSMutableArray's alloc()'s init()
076
077repeat with itemURL in ocidSortedArray
078  set ocidURLString to itemURL's absoluteString()
079  set boolSCA to (ocidURLString's containsString:("SCA"))
080  set boolDC to (ocidURLString's containsString:("DC"))
081  if boolSCA is true then
082    (ocidSCAArrayM's addObject:(ocidURLString))
083  else if boolDC is true then
084    (ocidDCArrayM's addObject:(ocidURLString))
085  else
086    (ocidClassicArrayM's addObject:(ocidURLString))
087  end if
088end repeat
089#ソート
090set ocidDescriptor to refMe's NSSortDescriptor's sortDescriptorWithKey:("self") ascending:(false) selector:("localizedStandardCompare:")
091set ocidDescriptorArray to refMe's NSArray's arrayWithObject:(ocidDescriptor)
092set ocidSCAArray to ocidSCAArrayM's sortedArrayUsingDescriptors:(ocidDescriptorArray)
093set ocidDCArray to ocidDCArrayM's sortedArrayUsingDescriptors:(ocidDescriptorArray)
094set ocidClassicArray to ocidClassicArrayM's sortedArrayUsingDescriptors:(ocidDescriptorArray)
095
096####################################
097set strDateString to doGetDateNo({"GGyy年MM月dd日EEEE", 2})
098
099#出力
100set ocidOutputString to refMe's NSMutableString's alloc()'s init()
101
102ocidOutputString's setString:(strDateString & ":取得 Acrobatアップデーター\n")
103ocidOutputString's appendString:("https://ardownload3でエラーになる場合は\nardownload2とardownloadを試してみてください\n")
104ocidOutputString's appendString:("dmg版が存在する場合もあります。拡張子をdmgにして試してみだくさい\n")
105ocidOutputString's appendString:("古いバージョンはすでにサーバーから削除されているpkgもあります\n")
106ocidOutputString's appendString:("incr: 差分アップデータ サイズが小さい\n")
107ocidOutputString's appendString:("MUI: マルチリンガル版\n")
108ocidOutputString's appendString:("Mini: SCA版Reader\n")
109ocidOutputString's appendString:("Inter: SCA版Standard\n")
110ocidOutputString's appendString:("FULL: SCA版Pro\n")
111ocidOutputString's appendString:("Next: SCA版BETA\n")
112
113ocidOutputString's appendString:("\n--\n")
114ocidOutputString's appendString:("【DC】Document Cloud版\n")
115ocidOutputString's appendString:("【DC】Reader無償版\n")
116repeat with itemString in ocidDCArray
117  set boolReader to (itemString's containsString:("Rdr"))
118  if boolReader is true then
119    (ocidOutputString's appendString:(itemString))
120    (ocidOutputString's appendString:("\n"))
121  end if
122end repeat
123(ocidOutputString's appendString:("\n"))
124ocidOutputString's appendString:("【DC】 Pro有償版\n")
125repeat with itemString in ocidDCArray
126  set boolAcro to (itemString's containsString:("/acrobat/"))
127  if boolAcro is true then
128    (ocidOutputString's appendString:(itemString))
129    (ocidOutputString's appendString:("\n"))
130  end if
131end repeat
132
133ocidOutputString's appendString:("\n--\n")
134ocidOutputString's appendString:("【SCA】Single Client App Unified App版\n")
135ocidOutputString's appendString:("Reader Mini無償版\n")
136ocidOutputString's appendString:("【SCA】 Classic Reader\n")
137set boolFirstItem to (missing value)
138repeat with itemString in ocidSCAArray
139  set boolReader to (itemString's containsString:("Rdr"))
140  if boolReader is true then
141    if boolFirstItem is missing value then
142      set boolScaDc to (itemString's containsString:("/AcrobatDC/"))
143      if boolScaDc is true then
144        (ocidOutputString's appendString:("【SCA】 DC Reader\n"))
145        set boolFirstItem to true
146      end if
147    end if
148    (ocidOutputString's appendString:(itemString))
149    (ocidOutputString's appendString:("\n"))
150  end if
151end repeat
152(ocidOutputString's appendString:("\n"))
153ocidOutputString's appendString:("Acrobat 有償版\n")
154ocidOutputString's appendString:("【SCA】 Classic DC\n")
155set boolFirstItem to (missing value)
156repeat with itemString in ocidSCAArray
157  set boolReader to (itemString's containsString:("AcrobatSCA"))
158  if boolReader is true then
159    if boolFirstItem is missing value then
160      set boolScaDc to (itemString's containsString:("/AcrobatDC/"))
161      if boolScaDc is true then
162        (ocidOutputString's appendString:("【SCA】 DC Reader\n"))
163        set boolFirstItem to true
164      end if
165    end if
166    (ocidOutputString's appendString:(itemString))
167    (ocidOutputString's appendString:("\n"))
168  end if
169end repeat
170ocidOutputString's appendString:("\n--\n")
171ocidOutputString's appendString:("【2020】Classic Track版\n")
172ocidOutputString's appendString:("【2020】Reader\n")
173repeat with itemString in ocidClassicArrayM
174  set itemString to (itemString's stringByReplacingOccurrencesOfString:("https://ardownload2.adobe.com") withString:("https://ardownload3.adobe.com"))
175  set itemString to (itemString's stringByReplacingOccurrencesOfString:("http://ardownload.adobe.com") withString:("https://ardownload3.adobe.com"))
176  
177  set bool2020 to (itemString's containsString:("/Acrobat2020/"))
178  if bool2020 is true then
179    set boolReader to (itemString's containsString:("/reader/"))
180    if boolReader is true then
181      (ocidOutputString's appendString:(itemString))
182      (ocidOutputString's appendString:("\n"))
183    end if
184  end if
185  
186end repeat
187
188
189ocidOutputString's appendString:("【2020】製品版\n")
190repeat with itemString in ocidClassicArrayM
191  set itemString to (itemString's stringByReplacingOccurrencesOfString:("https://ardownload2.adobe.com") withString:("https://ardownload3.adobe.com"))
192  set itemString to (itemString's stringByReplacingOccurrencesOfString:("http://ardownload.adobe.com") withString:("https://ardownload3.adobe.com"))
193  
194  set bool2020 to (itemString's containsString:("/Acrobat2020/"))
195  if bool2020 is true then
196    set boolReader to (itemString's containsString:("/reader/"))
197    if boolReader is false then
198      (ocidOutputString's appendString:(itemString))
199      (ocidOutputString's appendString:("\n"))
200    end if
201  end if
202  
203end repeat
204
205ocidOutputString's appendString:("\n--\n")
206ocidOutputString's appendString:("【旧製品】Classic Track版(リンク切れ多いです)\n")
207ocidOutputString's appendString:("【旧製品】Reader版\n")
208repeat with itemString in ocidClassicArrayM
209  set itemString to (itemString's stringByReplacingOccurrencesOfString:("https://ardownload2.adobe.com") withString:("https://ardownload3.adobe.com"))
210  set itemString to (itemString's stringByReplacingOccurrencesOfString:("http://ardownload.adobe.com") withString:("https://ardownload3.adobe.com"))
211  
212  set bool2020 to (itemString's containsString:("/Acrobat2020/"))
213  if bool2020 is false then
214    set boolReader to (itemString's containsString:("/reader/"))
215    if boolReader is true then
216      (ocidOutputString's appendString:(itemString))
217      (ocidOutputString's appendString:("\n"))
218    end if
219  end if
220  
221end repeat
222ocidOutputString's appendString:("【旧製品】製品版\n")
223repeat with itemString in ocidClassicArrayM
224  set itemString to (itemString's stringByReplacingOccurrencesOfString:("https://ardownload2.adobe.com") withString:("https://ardownload3.adobe.com"))
225  set itemString to (itemString's stringByReplacingOccurrencesOfString:("http://ardownload.adobe.com") withString:("https://ardownload3.adobe.com"))
226  
227  set bool2020 to (itemString's containsString:("/Acrobat2020/"))
228  if bool2020 is false then
229    set boolReader to (itemString's containsString:("/reader/"))
230    if boolReader is false then
231      (ocidOutputString's appendString:(itemString))
232      (ocidOutputString's appendString:("\n"))
233    end if
234  end if
235  
236end repeat
237
238
239
240
241############
242#
243set ociURLlistFilePathURL to ocidContainerDirPathURL's URLByAppendingPathComponent:("URLlist/URLlist.txt") isDirectory:(true)
244#
245set listReadStrings to refMe's NSString's alloc()'s initWithContentsOfURL:(ociURLlistFilePathURL) encoding:(refMe's NSUTF8StringEncoding) |error| :(reference)
246set ocidReadStrings to (item 1 of listReadStrings)
247(ocidOutputString's appendString:("\n"))
248(ocidOutputString's appendString:("------------------------------\n"))
249(ocidOutputString's appendString:("新規インストーラーリスト\n"))
250(ocidOutputString's appendString:(ocidReadStrings))
251
252############
253#
254#テンポラリ(再起動時に自動削除)
255set appFileManager to refMe's NSFileManager's defaultManager()
256set ocidTempDirURL to appFileManager's temporaryDirectory()
257set ocidUUID to refMe's NSUUID's alloc()'s init()
258set ocidUUIDString to ocidUUID's UUIDString
259set ocidSaveDirPathURL to ocidTempDirURL's URLByAppendingPathComponent:(ocidUUIDString) isDirectory:(true)
260#保存先ディレクトリ
261set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
262ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
263set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidSaveDirPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error| :(reference)
264#ログファイルパス
265set ocidSaveFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:("index.txt") isDirectory:(false)
266#
267
268
269set listDone to ocidOutputString's writeToURL:(ocidSaveFilePathURL) atomically:(true) encoding:(refMe's NSUTF8StringEncoding) |error| :(reference)
270if (item 1 of listDone) is true then
271  set appSharedWorkspace to refMe's NSWorkspace's sharedWorkspace()
272  set boolDone to appSharedWorkspace's openURL:(ocidSaveFilePathURL)
273  return "writeToURL 正常終了"
274else if (item 1 of listDone) is false then
275  log (item 2 of listDone)'s localizedDescription() as text
276  return "保存に失敗しました"
277end if
278
279
280
281
282
283return
284
285############
286#XMLからURLを取得
287to doGetPkgURL(argXmlFilePathURL)
288  #NSXML
289  set ocidOption to (refMe's NSDataReadingMappedIfSafe)
290  set listResponse to refMe's NSData's alloc()'s initWithContentsOfURL:(argXmlFilePathURL) options:(ocidOption) |error| :(reference)
291  if (item 2 of listResponse) = (missing value) then
292    log "initWithContentsOfURL 正常処理"
293    set ocidHTMLData to (item 1 of listResponse)
294  else if (item 2 of listResponse) (missing value) then
295    log (item 2 of listResponse)'s code() as text
296    log (item 2 of listResponse)'s localizedDescription() as text
297    return "NSDATAエラーしました"
298  end if
299  #XML
300  set ocidOption to (refMe's NSXMLNodePreserveAll) + (refMe's NSXMLDocumentTidyXML)
301  set listResponse to refMe's NSXMLDocument's alloc()'s initWithData:(ocidHTMLData) options:(ocidOption) |error| :(reference)
302  if (item 2 of listResponse) = (missing value) then
303    log "initWithData 正常処理"
304    set ocidXMLDoc to (item 1 of listResponse)
305  else if (item 2 of listResponse) (missing value) then
306    log (item 2 of listResponse)'s code() as text
307    log (item 2 of listResponse)'s localizedDescription() as text
308    log "NSXMLDocumentエラー 警告がありました"
309    set ocidXMLDoc to (item 1 of listResponse)
310  end if
311  set listResponse to (ocidXMLDoc's nodesForXPath:"//dItem"  |error| :(reference))
312  set ocidElementArray to (item 1 of listResponse)
313  #戻し用のArray
314  set ocidURLArray to refMe's NSMutableArray's alloc()'s init()
315  #エレメントの数だけ繰り返し
316  repeat with itemElement in ocidElementArray
317    #アトリビュートを取り出して
318    set ocidHost to (itemElement's attributeForName:("httpURLBase"))'s stringValue()
319    set ocidPath to (itemElement's attributeForName:("URL"))'s stringValue()
320    set ocidFile to (itemElement's attributeForName:("fileName"))'s stringValue()
321    #URLにして
322    set ocidHostURL to (refMe's NSURL's alloc()'s initWithString:(ocidHost))
323    set ocidURL to (ocidHostURL's URLByAppendingPathComponent:(ocidPath))
324    set ocidURL to (ocidURL's URLByAppendingPathComponent:(ocidFile))
325    #戻し用のArrayに追加
326    (ocidURLArray's addObject:(ocidURL))
327  end repeat
328  return ocidURLArray
329  
330end doGetPkgURL
331
332############
333#マニフェストのURL
334to doGetManifest(argPlistFilePathURL)
335  set listResponse to refMe's NSDictionary's alloc()'s initWithContentsOfURL:(argPlistFilePathURL) |error| :(reference)
336  set ocidPlistDict to (item 1 of listResponse)
337  set ocidManifestDict to ocidPlistDict's objectForKey:("ManifestFileURL")
338  set ocidURLbase to ocidManifestDict's valueForKey:("httpsURLBase")
339  set ocidURLpath to ocidManifestDict's valueForKey:("URL")
340  #
341  set ocidURLhost to refMe's NSURL's alloc()'s initWithString:(ocidURLbase)
342  set ocidURL to ocidURLhost's URLByAppendingPathComponent:(ocidURLpath)
343  return ocidURL
344  
345end doGetManifest
346
347
348############
349#ローカルのインストール済みのバージョン
350to doGetProductVersion(argPlistFilePathURL)
351  set listResponse to refMe's NSDictionary's alloc()'s initWithContentsOfURL:(argPlistFilePathURL) |error| :(reference)
352  set ocidPlistDict to (item 1 of listResponse)
353  set ocidProductPathArray to ocidPlistDict's objectForKey:("Version")
354  -->この戻り値はテキストなので
355  set ocidAppPlistPathStr to ocidProductPathArray's firstObject()
356  -->パスにしてから
357  set ocidAppPlistPath to ocidAppPlistPathStr's stringByStandardizingPath()
358  -->ファイルパスURLにする
359  set ocidAppPlistPathURL to refMe's NSURL's alloc()'s initFileURLWithPath:(ocidAppPlistPath)
360  #
361  set listResponse to refMe's NSDictionary's alloc()'s initWithContentsOfURL:(ocidAppPlistPathURL) |error| :(reference)
362  set ocidAppPlistDict to (item 1 of listResponse)
363  
364  if ocidAppPlistDict  (missing value) then
365    set ocidProductVersion to ocidAppPlistDict's valueForKey:("CFBundleVersion")
366    if ocidProductVersion = (missing value) then
367      set ocidVersionKey to ocidProductPathArray's lastObject()
368      set ocidProductVersion to ocidAppPlistDict's valueForKey:(ocidVersionKey)
369    end if
370    set ocidProductVersion to (ocidProductVersion's stringByReplacingOccurrencesOfString:(" ") withString:(""))
371    
372  else if ocidAppPlistDict = (missing value) then
373    set ocidProductVersion to (missing value)
374  end if
375  return ocidProductVersion
376  
377end doGetProductVersion
378
379
380############
381#バージョンURLの取得
382to doGetVersion(argPlistFilePathURL)
383  set listResponse to refMe's NSDictionary's alloc()'s initWithContentsOfURL:(argPlistFilePathURL) |error| :(reference)
384  set ocidPlistDict to (item 1 of listResponse)
385  set ocidVersionFileURLDict to ocidPlistDict's objectForKey:("VersionFileURL")
386  set ocidURLbase to ocidVersionFileURLDict's valueForKey:("httpsURLBase")
387  set ocidURLpath to ocidVersionFileURLDict's valueForKey:("URL")
388  set ocidURLhost to refMe's NSURL's alloc()'s initWithString:(ocidURLbase)
389  set ocidURL to ocidURLhost's URLByAppendingPathComponent:(ocidURLpath)
390  #
391  set listReadStrings to refMe's NSString's alloc()'s initWithContentsOfURL:(ocidURL) encoding:(refMe's NSUTF8StringEncoding) |error| :(reference)
392  set ocidReadStrings to (item 1 of listReadStrings)
393  set boolNotFound to ocidReadStrings's containsString:("Not Found")
394  if boolNotFound is true then
395    set ocidReadStrings to (missing value)
396  end if
397  return ocidReadStrings
398  
399end doGetVersion
400
401############
402#解凍
403to doExpand2Pkg(argURL)
404  #テンポラリ(再起動時に自動削除)
405  set appFileManager to refMe's NSFileManager's defaultManager()
406  set ocidTempDirURL to appFileManager's temporaryDirectory()
407  set ocidUUID to refMe's NSUUID's alloc()'s init()
408  set ocidUUIDString to ocidUUID's UUIDString
409  set ocidSaveDirPathURL to ocidTempDirURL's URLByAppendingPathComponent:(ocidUUIDString) isDirectory:(true)
410  #保存先ディレクトリ
411  set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
412  ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
413  set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidSaveDirPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error| :(reference)
414  #ログファイルパス
415  set ocidLogFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:("exec.log") isDirectory:(false)
416  set ocidLogFilePath to ocidLogFilePathURL's |path|()
417  #ログファイル生成
418  set ocidNulString to refMe's NSString's alloc()'s init()
419  set listDone to ocidNulString's writeToURL:(ocidLogFilePathURL) atomically:(true) encoding:(refMe's NSUTF8StringEncoding) |error| :(reference)
420  #ログファイルのアクセス権 644
421  ocidAttrDict's setValue:(420) forKey:(refMe's NSFilePosixPermissions)
422  set listDone to appFileManager's setAttributes:(ocidAttrDict) ofItemAtPath:(ocidLogFilePath) |error| :(reference)
423  #パスにする
424  set ocidFilePath to argURL's |path|()
425  set ocidExpandDirPathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:("Expand") isDirectory:(true)
426  set ocidExpandDirPath to ocidExpandDirPathURL's |path|()
427  #コマンド実行
428  set strComandText to "/usr/sbin/pkgutil  --expand-full  \"" & (ocidFilePath as text) & "\" \"" & (ocidExpandDirPath as text) & "\"" as text
429  log strComandText
430  #コマンド実行
431  set ocidTermTask to refMe's NSTask's alloc()'s init()
432  ocidTermTask's setLaunchPath:("/bin/zsh")
433  set ocidArgumentsArray to refMe's NSMutableArray's alloc()'s init()
434  ocidArgumentsArray's addObject:("-c")
435  ocidArgumentsArray's addObject:(strComandText)
436  ocidTermTask's setArguments:(ocidArgumentsArray)
437  set ocidOutPut to refMe's NSPipe's pipe()
438  set ocidError to refMe's NSPipe's pipe()
439  ocidTermTask's setStandardOutput:(ocidOutPut)
440  ocidTermTask's setStandardError:(ocidError)
441  ocidTermTask's setCurrentDirectoryURL:(ocidSaveDirPathURL)
442  set listDoneReturn to ocidTermTask's launchAndReturnError:(reference)
443  if (item 1 of listDoneReturn) is (false) then
444    log "エラーコード:" & (item 2 of listDoneReturn)'s code() as text
445    log "エラードメイン:" & (item 2 of listDoneReturn)'s domain() as text
446    log "Description:" & (item 2 of listDoneReturn)'s localizedDescription() as text
447    log "FailureReason:" & (item 2 of listDoneReturn)'s localizedFailureReason() as text
448  end if
449  #終了待ち
450  ocidTermTask's waitUntilExit()
451  #標準出力をログに
452  set ocidOutPutData to ocidOutPut's fileHandleForReading()
453  set listResponse to ocidOutPutData's readDataToEndOfFileAndReturnError:(reference)
454  set ocidStdOut to (item 1 of listResponse)
455  set ocidStdOut to refMe's NSString's alloc()'s initWithData:(ocidStdOut) encoding:(refMe's NSUTF8StringEncoding)
456  ##これが戻り値
457  log ocidStdOut as text
458  set listDone to ocidStdOut's writeToURL:(ocidLogFilePathURL) atomically:(true) encoding:(refMe's NSUTF8StringEncoding) |error| :(reference)
459  #
460  set ocidAssetDirPathURL to ocidExpandDirPathURL's URLByAppendingPathComponent:("ASSET") isDirectory:(true)
461  set appFileManager to refMe's NSFileManager's defaultManager()
462  set ocidOption to (refMe's NSDirectoryEnumerationSkipsHiddenFiles)
463  set ocidKeyArray to refMe's NSMutableArray's alloc()'s init()
464  ocidKeyArray's addObject:(refMe's NSURLPathKey)
465  set listSubPathResult to (appFileManager's contentsOfDirectoryAtURL:(ocidAssetDirPathURL) includingPropertiesForKeys:(ocidKeyArray) options:(ocidOption) |error| :(reference))
466  set ocidSubPathURLArray to item 1 of listSubPathResult
467  set ocidXmlFilePathURL to ocidSubPathURLArray's firstObject()
468  return ocidXmlFilePathURL
469  
470end doExpand2Pkg
471
472
473############
474#ダウンロード
475to doURL2Download(argURL)
476  #テンポラリ(再起動時に自動削除)
477  set appFileManager to refMe's NSFileManager's defaultManager()
478  set ocidTempDirURL to appFileManager's temporaryDirectory()
479  set ocidUUID to refMe's NSUUID's alloc()'s init()
480  set ocidUUIDString to ocidUUID's UUIDString
481  set ocidSaveDirPathURL to ocidTempDirURL's URLByAppendingPathComponent:(ocidUUIDString) isDirectory:(true)
482  #保存先ディレクトリ
483  set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
484  ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
485  set listBoolMakeDir to appFileManager's createDirectoryAtURL:(ocidSaveDirPathURL) withIntermediateDirectories:true attributes:(ocidAttrDict) |error| :(reference)
486  #保存先パス
487  set ocidFileName to argURL's lastPathComponent()
488  set ocidSaveFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:(ocidFileName) isDirectory:(false)
489  ##NSDATAに読み込む
490  set ocidOption to (refMe's NSDataReadingMappedIfSafe)
491  set listResponse to refMe's NSData's alloc()'s initWithContentsOfURL:(argURL) options:(ocidOption) |error| :(reference)
492  if (item 2 of listResponse) = (missing value) then
493    log "initWithContentsOfURL 正常処理"
494    set ocidReadData to (item 1 of listResponse)
495  else if (item 2 of listResponse) (missing value) then
496    set strErrorNO to (item 2 of listResponse)'s code() as text
497    set strErrorMes to (item 2 of listResponse)'s localizedDescription() as text
498    refMe's NSLog("■:" & strErrorNO & strErrorMes)
499    return "initWithContentsOfURL エラーしました" & strErrorNO & strErrorMes
500  end if
501  ##NSDataで保存
502  set ocidOption to (refMe's NSDataWritingAtomic)
503  set listDone to ocidReadData's writeToURL:(ocidSaveFilePathURL) options:(ocidOption) |error| :(reference)
504  if (item 1 of listDone) is true then
505    log "writeToURL 正常処理"
506  else if (item 2 of listDone) (missing value) then
507    set strErrorNO to (item 2 of listDone)'s code() as text
508    set strErrorMes to (item 2 of listDone)'s localizedDescription() as text
509    refMe's NSLog("■:" & strErrorNO & strErrorMes)
510    return "writeToURL エラーしました" & strErrorNO & strErrorMes
511  end if
512  return ocidSaveFilePathURL
513  
514end doURL2Download
515
516
517
518################################
519# 日付 doGetDateNo(argDateFormat,argCalendarNO)
520# argCalendarNO 1 NSCalendarIdentifierGregorian 西暦
521# argCalendarNO 2 NSCalendarIdentifierJapanese 和暦
522################################
523to doGetDateNo({argDateFormat, argCalendarNO})
524  ##渡された値をテキストで確定させて
525  set strDateFormat to argDateFormat as text
526  set intCalendarNO to argCalendarNO as integer
527  ###日付情報の取得
528  set ocidDate to current application's NSDate's |date|()
529  ###日付のフォーマットを定義(日本語)
530  set ocidFormatterJP to current application's NSDateFormatter's alloc()'s init()
531  ###和暦 西暦 カレンダー分岐
532  if intCalendarNO = 1 then
533    set ocidCalendarID to (current application's NSCalendarIdentifierGregorian)
534  else if intCalendarNO = 2 then
535    set ocidCalendarID to (current application's NSCalendarIdentifierJapanese)
536  else
537    set ocidCalendarID to (current application's NSCalendarIdentifierISO8601)
538  end if
539  set ocidCalendarJP to current application's NSCalendar's alloc()'s initWithCalendarIdentifier:(ocidCalendarID)
540  set ocidTimezoneJP to current application's NSTimeZone's alloc()'s initWithName:("Asia/Tokyo")
541  set ocidLocaleJP to current application's NSLocale's alloc()'s initWithLocaleIdentifier:("ja_JP_POSIX")
542  ###設定
543  ocidFormatterJP's setTimeZone:(ocidTimezoneJP)
544  ocidFormatterJP's setLocale:(ocidLocaleJP)
545  ocidFormatterJP's setCalendar:(ocidCalendarJP)
546  # ocidFormatterJP's setDateStyle:(current application's NSDateFormatterNoStyle)
547  # ocidFormatterJP's setDateStyle:(current application's NSDateFormatterShortStyle)
548  # ocidFormatterJP's setDateStyle:(current application's NSDateFormatterMediumStyle)
549  # ocidFormatterJP's setDateStyle:(current application's NSDateFormatterLongStyle)
550  ocidFormatterJP's setDateStyle:(current application's NSDateFormatterFullStyle)
551  ###渡された値でフォーマット定義
552  ocidFormatterJP's setDateFormat:(strDateFormat)
553  ###フォーマット適応
554  set ocidDateAndTime to ocidFormatterJP's stringFromDate:(ocidDate)
555  ###テキストで戻す
556  set strDateAndTime to ocidDateAndTime as text
557  return strDateAndTime
558end doGetDateNo
559
560
561
562
563return
564#以下URLのメモ
565"/arm-manifests/mac/Acrobat2015/acrobat/AcrobatManifest.arm"
566"/arm-manifests/mac/Acrobat2015/acrobat/current_version.txt"
567"/arm-manifests/mac/ServicesUpdater/acrobat/2015/AcroManifest.arm"
568"/arm-manifests/mac/ServicesUpdater/acrobat/2015/current_version.txt"
569
570"/arm-manifests/mac/Acrobat2015/reader/ReaderManifest.arm"
571"/arm-manifests/mac/Acrobat2015/reader/current_version.txt"
572"/arm-manifests/mac/ServicesUpdater/reader/2015/RdrManifest.arm"
573"/arm-manifests/mac/ServicesUpdater/reader/2015/current_version.txt"
574
575"/arm-manifests/mac/Acrobat2017/acrobat/AcrobatManifest.arm"
576"/arm-manifests/mac/Acrobat2017/acrobat/current_version.txt"
577"/arm-manifests/mac/ServicesUpdater/acrobat/2017/AcroManifest.arm"
578"/arm-manifests/mac/ServicesUpdater/acrobat/2017/current_version.txt"
579
580"/arm-manifests/mac/Acrobat2017/reader/ReaderManifest.arm"
581"/arm-manifests/mac/Acrobat2017/reader/current_version.txt"
582"/arm-manifests/mac/ServicesUpdater/reader/2017/RdrManifest.arm"
583"/arm-manifests/mac/ServicesUpdater/reader/2017/current_version.txt"
584
585"/arm-manifests/mac/Acrobat2020/acrobat/AcrobatManifest.arm"
586"/arm-manifests/mac/Acrobat2020/acrobat/current_version.txt"
587"/arm-manifests/mac/ServicesUpdater/acrobat/2020/AcroManifest.arm"
588"/arm-manifests/mac/ServicesUpdater/acrobat/2020/current_version.txt"
589
590"/arm-manifests/mac/Acrobat2020/reader/ReaderManifest.arm"
591"/arm-manifests/mac/Acrobat2020/reader/current_version.txt"
592"/arm-manifests/mac/ServicesUpdater/reader/2020/RdrManifest.arm"
593"/arm-manifests/mac/ServicesUpdater/reader/2020/current_version.txt"
594
595"/arm-manifests/mac/AcrobatDC/acrobat/AcrobatManifest.arm"
596"/arm-manifests/mac/AcrobatDC/acrobat/current_version.txt"
597"/arm-manifests/mac/ServicesUpdater/acrobat/DC/AcroManifest.arm"
598"/arm-manifests/mac/ServicesUpdater/acrobat/DC/current_version.txt"
599
600"/arm-manifests/mac/AcrobatDC/reader/ReaderManifest.arm"
601"/arm-manifests/mac/AcrobatDC/reader/current_version.txt"
602"/arm-manifests/mac/ServicesUpdater/reader/DC/RdrManifest.arm"
603"/arm-manifests/mac/ServicesUpdater/reader/DC/current_version.txt"
604
605"/arm-manifests/mac/AcrobatDC/acrobatSCA/AcrobatSCAManifest.arm"
606"/arm-manifests/mac/AcrobatDC/acrobatSCA/current_version.txt"
607"/arm-manifests/mac/ServicesUpdater/acrobatSCA/DC/AcroSCAManifest.arm"
608"/arm-manifests/mac/ServicesUpdater/acrobatSCA/DC/current_version.txt"
609
610"/arm-manifests/mac/Classic/acrobatSCA/AcrobatSCAManifest.arm"
611"/arm-manifests/mac/Classic/acrobatSCA/current_version.txt"
612"/arm-manifests/mac/ServicesUpdater/acrobatSCA/Classic/AcroSCAManifest.arm"
613"/arm-manifests/mac/ServicesUpdater/acrobatSCA/Classic/current_version.txt"
614
615
616"/arm-manifests/mac/ARMDC/ARMDCHelperManifest.arm"
617"/arm-manifests/mac/ARMDC/current_version.txt"
618"/Library/Application Support/Adobe/ARMDC/Application/Acrobat Update Helper.app/Contents/Info.plist"
619
AppleScriptで生成しました

|

[Windows・Mac]Acrobat製品版・Acrobat Reader無償版のCatalogとManifestのURL

ダウンロードURLは
macOS DC製品版はこちら Reader無償版はこちら
Window DC製品版はこちら Reader無償版はこちら



A:Manifest=マニフェスト:最新版のみのパッチのURL
B:Catalog=カタログ:適応可能なパッチの全てのURL


macOS用
A:Manifest=マニフェスト:最新版のみのパッチのURL
SCA(SingleClientApp) Unified App版
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/acrobatSCA/AcrobatSCAManifest.arm
AcrobatDC
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/acrobat/AcrobatManifest.arm"
https://armmf.adobe.com/arm-manifests/mac/Acrobat2020/acrobat/AcrobatManifest.arm
https://armmf.adobe.com/arm-manifests/mac/Acrobat2017/acrobat/AcrobatManifest.arm
https://armmf.adobe.com/arm-manifests/mac/Acrobat2015/acrobat/AcrobatManifest.arm
Classic
https://armmf.adobe.com/arm-manifests/mac/Classic/acrobatSCA/AcrobatSCAManifest.arm
Reader
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/ReaderManifest.arm
https://armmf.adobe.com/arm-manifests/mac/Acrobat2020/reader/ReaderManifest.arm
https://armmf.adobe.com/arm-manifests/mac/Acrobat2017/reader/ReaderManifest.arm
https://armmf.adobe.com/arm-manifests/mac/Acrobat2015/reader/ReaderManifest.arm


macOS用
B:Catalog=カタログ:適応可能なパッチの全てURL
MacOS用のCatalog=CABファイルは無い



macOS用
最新バージョン番号取得
SCA(SingleClientApp) Unified App版
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/acrobatSCA/current_version.txt
Acrobat
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/acrobat/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2020/acrobat/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2017/acrobat/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2015/acrobat/current_version.txt
Classic
https://armmf.adobe.com/arm-manifests/mac/Classic/acrobatSCA/current_version.txt
Reader
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2020/reader/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2017/reader/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2015/reader/current_version.txt


Windows用


Windows用
A:Manifest=マニフェスト:最新版のみのパッチのURL
32BIT Reader
https://armmf.adobe.com/arm-manifests/win/ReaderDCManifest.msi
https://armmf.adobe.com/arm-manifests/win/ReaderDCManifest3.msi
32BIT Acrobat
https://armmf.adobe.com/arm-manifests/win/AcrobatDCManifest.msi
https://armmf.adobe.com/arm-manifests/win/AcrobatDCManifest3.msi
ARM-WIN
https://armmf.adobe.com/arm-manifests/win/ArmManifest.msi
https://armmf.adobe.com/arm-manifests/win/ArmManifest3.msi
64BIT Reader Acrobat両方
https://armmf.adobe.com/arm-manifests/win/AcrobatDCx64Manifest3.msi
2020
https://armmf.adobe.com/arm-manifests/win/Acrobat2020Manifest3.msi
https://armmf.adobe.com/arm-manifests/win/Reader2020Manifest3.msi
classic
https://armmf.adobe.com/arm-manifests/win/AcrobatClassicx64Manifest3.msi


Windows用
B:Catalog=カタログ:適応可能なパッチ全てのURL
DC
https://armmf.adobe.com/arm-manifests/win/SCUP/ReaderCatalog-DC.cab
https://armmf.adobe.com/arm-manifests/win/SCUP/AcrobatCatalog-DC.cab
2020
https://armmf.adobe.com/arm-manifests/win/SCUP/AcrobatCatalog-2020.cab
https://armmf.adobe.com/arm-manifests/win/SCUP/ReaderCatalog-2020.cab
Classic
https://armmf.adobe.com/arm-manifests/win/SCUP/AcrobatCatalog-Classic.cab


ここから更新前の内容と同じ


Adobeの掲示板にも書き込みました

Mac版です
Windowsはこちら
Acrobat Classicが SCA (SingleClientApp)版 Unified App 版として追加された
バージョン取得テキスト

■SCA(SingleClientApp) Unified App版
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/acrobatSCA/current_version.txt
Acrobat
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/acrobat/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2020/acrobat/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2017/acrobat/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2015/acrobat/current_version.txt
#新しく追加されたクラッシック リーダー版は無い
https://armmf.adobe.com/arm-manifests/mac/Classic/acrobatSCA/current_version.txt

Reader
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2020/reader/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2017/reader/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2015/reader/current_version.txt



マニフェスト
■SCA(SingleClientApp) Unified App版
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/acrobatSCA/AcrobatSCAManifest.arm
Acrobat
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/acrobat/AcrobatManifest.arm"
https://armmf.adobe.com/arm-manifests/mac/Acrobat2020/acrobat/AcrobatManifest.arm
https://armmf.adobe.com/arm-manifests/mac/Acrobat2017/acrobat/AcrobatManifest.arm
https://armmf.adobe.com/arm-manifests/mac/Acrobat2015/acrobat/AcrobatManifest.arm
#新しく追加されたクラッシック
https://armmf.adobe.com/arm-manifests/mac/Classic/acrobatSCA/AcrobatSCAManifest.arm

Reader
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/ReaderManifest.arm
https://armmf.adobe.com/arm-manifests/mac/Acrobat2020/reader/ReaderManifest.arm
https://armmf.adobe.com/arm-manifests/mac/Acrobat2017/reader/ReaderManifest.arm
https://armmf.adobe.com/arm-manifests/mac/Acrobat2015/reader/ReaderManifest.arm




ここからは先の更新前の記事と同じ


1:macOS用
2:Windows用


1:macOS用
AppleScript
1−1:従来版
1−1−1:従来版 Acrobat製品版
【従来版】Acrobat DC製品版 の最新のアップデートPKGのURLを取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-3a0ba2.html


1−1−2:従来版 Reader版
【従来版】Acrobat Readerの最新のアップデートPKGのURLを取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-8b37a3.html


1−2:SCA版
【SCA版】Acrobat 最新版のアップデートPKGのURLを取得する(製品版DCとReader版Mini両方含みます)
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-d64536.html


1−3:Acrobat Classic SCA版
https://quicktimer.cocolog-nifty.com/icefloe/2024/08/post-dd47d7.html




BASH
1−1:従来版
1−1−1:従来版 Acrobat製品版
[bash]従来版 Acrobat製品版 インストールパッケージURL取得
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-8ad0c6.html

1−1−2:従来版 Reader版
[bash]従来版 Reader版 インストールパッケージURL取得
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-d68468.html

1−2:SCA版
[bash]SCA(SingleClientApp) Unified App版の最新アップデータのURLを取得する(製品版FULLとReader版Mini両方含みます)
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-cc8915.html

1−3:Acrobat Classic SCA版
https://quicktimer.cocolog-nifty.com/icefloe/2024/08/post-dd47d7.html



2:Windows用
A:アップデータ全部URLのセット
https://quicktimer.cocolog-nifty.com/icefloe/files/acrobatwindows.zip

B:最新版のみ取得のセット
https://quicktimer.cocolog-nifty.com/icefloe/files/acrobatwindowsmanifest.zip

最新アップデート64bitのみ
[Manifest] Acrobat とReader の64 bit Windows版の最新版のみ アップデータのURLを取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-7670ef.html

2−1:Acrobat製品版
全部のパッチURL
[Windows]Windows版のAcrobat製品版のアップデータのURLを『全部』取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-714cce.html

2−1−1:32bit版
[Manifest] Acrobat 32 bit Windows版の最新版のみ アップデータのURLを取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-8e7003.html

2−1−2:64bit版
[Manifest] Acrobat 64 bit Windows版の最新版のみ アップデータのURLを取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-2ca2e7.html

2−2:Reader版
全部のパッチURL
[Windows]Windows版のAcrobat Reader版のアップデータのURLを『全部』取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-544fa7.html

2−2−1:32bit版
[Manifest] Reader 32 bit Windows版の最新版のみ アップデータのURLを取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-d33532.html

2−2−2:64bit版
[Manifest] Reader 64 bit Windows版の最新版のみ アップデータのURLを取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-7dcf98.html

|

Acobat SCA版FULLインストーラーによるアップデート(要は入れ替え)


AppleScript サンプルコード

【スクリプトエディタで開く】 |

AppleScript サンプルソース(参考)
行番号ソース
001#!/usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003(*
004SCA版のAcrobatの
005最新アップデーターのURLを取得
006インストール(アップデート)を試みます
007最新のパッケージを上書き(入れ替え)インストールです
008
009設定項目があります 必須
010管理者 ID と パスワード
011
012配布して利用する場合
013アプリケーションにして実行専用にしてください
014-->ユーザーにパスワードを教えたくないケース用
015
016com.cocolog-nifty.quicktimer.icefloe *)
017----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
018use AppleScript version "2.8"
019use framework "Foundation"
020use framework "AppKit"
021use scripting additions
022
023property refMe : a reference to current application
024
025property refNSNotFound : a reference to 9.22337203685477E+18 + 5807
026
027#適応するパッケージ名の一部
028set strPkgKey to ("AcrobatSCADCUpd24") as text
029#set strPkgKey to ("AcrobatSCADC24") as text
030
031set strAdminName to ("管理者のショートユーザー名") as text
032set strAdminPW to ("管理者パスワード") as text
033
034
035##############################
036#バージョン番号URL
037set ocidURLComponents to refMe's NSURLComponents's alloc()'s init()
038ocidURLComponents's setScheme:"https"
039ocidURLComponents's setHost:"armmf.adobe.com"
040ocidURLComponents's setPath:"/arm-manifests/mac/AcrobatDC/acrobat/current_version.txt"
041set ocidURLStrings to ocidURLComponents's |URL|'s absoluteString()
042set ocidURL to refMe's NSURL's alloc()'s initWithString:(ocidURLStrings)
043log ocidURL's absoluteString() as text
044
045##############################
046#起動時に削除される項目にダウンロード
047set appFileManager to refMe's NSFileManager's defaultManager()
048set ocidTempDirURL to appFileManager's temporaryDirectory()
049set ocidUUID to refMe's NSUUID's alloc()'s init()
050set ocidUUIDString to ocidUUID's UUIDString
051set ocidSaveDirPathURL to ocidTempDirURL's URLByAppendingPathComponent:(ocidUUIDString) isDirectory:(true)
052#フォルダを作っておく
053set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
054ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
055set listDone to appFileManager's createDirectoryAtURL:(ocidSaveDirPathURL) withIntermediateDirectories:(true) attributes:(ocidAttrDict) |error| :(reference)
056if (item 2 of listDone) ≠ (missing value) then
057  log (item 2 of listDone)'s code() as text
058  log (item 2 of listDone)'s localizedDescription() as text
059  return "createDirectoryAtURL エラーしました"
060end if
061
062#保存パス
063set strSaveFileName to "AcrobatSCAInstaller.pkg" as text
064set ocidSavePkgFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:(strSaveFileName) isDirectory:(false)
065set strPkgFilePath to ocidSavePkgFilePathURL's |path| as text
066
067
068##############################
069#NSDATAでダウンロード
070set ocidOption to (refMe's NSDataReadingMappedIfSafe)
071set listResponse to refMe's NSData's alloc()'s initWithContentsOfURL:(ocidURL) options:(ocidOption) |error| :(reference)
072if (item 2 of listResponse) = (missing value) then
073  set ocidReadData to (item 1 of listResponse)
074else if (item 2 of listResponse) ≠ (missing value) then
075  log (item 2 of listResponse)'s code() as text
076  log (item 2 of listResponse)'s localizedDescription() as text
077  return "エラーしました"
078end if
079##############################
080#テキストにする NSString's
081set ocidReadStrings to refMe's NSString's alloc()'s initWithData:(ocidReadData) encoding:(refMe's NSUTF8StringEncoding)
082#ここまでのデータをクリアしておく
083set ocidReadData to (missing value)
084#改行をUNIXに強制
085set ocidReadStringsTMP to (ocidReadStrings's stringByReplacingOccurrencesOfString:("\n\r") withString:("\n"))
086set ocidReadStringsTMP to (ocidReadStringsTMP's stringByReplacingOccurrencesOfString:("\r") withString:("\n"))
087set ocidReadStrings to (ocidReadStringsTMP's stringByReplacingOccurrencesOfString:("\n\n") withString:("\n"))
088set ocidReadStrings to (ocidReadStringsTMP's stringByReplacingOccurrencesOfString:(".") withString:(""))
089
090set strVersion to ocidReadStrings as text
091
092##############################
093#インストールパッケージURL
094set ocidURLComponents to refMe's NSURLComponents's alloc()'s init()
095ocidURLComponents's setScheme:("https")
096ocidURLComponents's setHost:("ardownload3.adobe.com")
097set strSetPath to ("/pub/adobe/acrobat/mac/AcrobatDC/" & strVersion & "/AcrobatSCADC" & strVersion & "_MUI.pkg") as text
098ocidURLComponents's setPath:(strSetPath)
099set ocidURLStrings to ocidURLComponents's |URL|'s absoluteString()
100set ocidURL to refMe's NSURL's alloc()'s initWithString:(ocidURLStrings)
101log ocidURL's absoluteString() as text
102
103
104##############################
105#NSDATAでダウンロード
106set ocidOption to (refMe's NSDataReadingMappedIfSafe)
107set listResponse to refMe's NSData's alloc()'s initWithContentsOfURL:(ocidURL) options:(ocidOption) |error| :(reference)
108if (item 2 of listResponse) = (missing value) then
109  set ocidReadData to (item 1 of listResponse)
110else if (item 2 of listResponse) ≠ (missing value) then
111  log (item 2 of listResponse)'s code() as text
112  log (item 2 of listResponse)'s localizedDescription() as text
113  return "エラーしました"
114end if
115
116##############################
117#保存
118set ocidOption to (refMe's NSDataWritingAtomic)
119set listDone to ocidReadData's writeToURL:(ocidSavePkgFilePathURL) options:(ocidOption) |error| :(reference)
120if (item 2 of listDone) ≠ (missing value) then
121  log (item 2 of listDone)'s code() as text
122  log (item 2 of listDone)'s localizedDescription() as text
123  return "エラーしました"
124end if
125
126##############################
127#インストール実行
128set strCommandText to ("/bin/zsh -c '/usr/bin/sudo /usr/sbin/installer -pkg \"" & strPkgFilePath & "\" -target / -dumplog -allowUntrusted -lang ja'")
129log strCommandText
130try
131  ##UIを使ったインストールをする場合
132  # do shell script strCommandText
133  
134  ##アプリケーションにして実行する場合
135  do shell script strCommandText user name strAdminName password strAdminPW with administrator privileges
136on error
137  return "インストールに失敗しました"
138end try
139
AppleScriptで生成しました

|

Adobe Acrobat SCA(SingleClientApp) Unified App版 最新アップデートを適応する


AppleScript サンプルコード

【スクリプトエディタで開く】 |

AppleScript サンプルソース(参考)
行番号ソース
001#!/usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003(*
004SCA版のAcrobatの
005最新アップデーターのURLを取得
006インストール(アップデート)を試みます
007com.cocolog-nifty.quicktimer.icefloe *)
008----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
009use AppleScript version "2.8"
010use framework "Foundation"
011use framework "AppKit"
012use scripting additions
013
014property refMe : a reference to current application
015
016property refNSNotFound : a reference to 9.22337203685477E+18 + 5807
017
018#適応するパッケージ名の一部
019set strPkgKey to ("AcrobatSCADCUpd24") as text
020#set strPkgKey to ("AcrobatSCADC24") as text
021
022set strAdminName to ("管理者のショートユーザー名") as text
023set strAdminPW to ("管理者パスワード") as text
024
025##############################
026#ダウンロードするURL
027set ocidURLComponents to refMe's NSURLComponents's alloc()'s init()
028ocidURLComponents's setScheme:"https"
029ocidURLComponents's setHost:"armmf.adobe.com"
030ocidURLComponents's setPath:"/arm-manifests/mac/AcrobatDC/acrobatSCA/AcrobatSCAManifest.arm"
031set ocidURLStrings to ocidURLComponents's |URL|'s absoluteString()
032set ocidURL to refMe's NSURL's alloc()'s initWithString:(ocidURLStrings)
033log ocidURL's absoluteString() as text
034
035##############################
036#起動時に削除される項目にダウンロード
037set appFileManager to refMe's NSFileManager's defaultManager()
038set ocidTempDirURL to appFileManager's temporaryDirectory()
039set ocidUUID to refMe's NSUUID's alloc()'s init()
040set ocidUUIDString to ocidUUID's UUIDString
041set ocidSaveDirPathURL to ocidTempDirURL's URLByAppendingPathComponent:(ocidUUIDString) isDirectory:(true)
042#フォルダを作っておく
043set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
044ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
045set listDone to appFileManager's createDirectoryAtURL:(ocidSaveDirPathURL) withIntermediateDirectories:(true) attributes:(ocidAttrDict) |error| :(reference)
046if (item 2 of listDone) ≠ (missing value) then
047  log (item 2 of listDone)'s code() as text
048  log (item 2 of listDone)'s localizedDescription() as text
049  return "createDirectoryAtURL エラーしました"
050end if
051#保存パス
052set strSaveFileName to "AcrobatSCAManifest.pkg" as text
053set ocidSaveFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:(strSaveFileName) isDirectory:(false)
054
055##############################
056#NSDATAでダウンロード
057set ocidOption to (refMe's NSDataReadingMappedIfSafe)
058set listResponse to refMe's NSData's alloc()'s initWithContentsOfURL:(ocidURL) options:(ocidOption) |error| :(reference)
059if (item 2 of listResponse) = (missing value) then
060  set ocidReadData to (item 1 of listResponse)
061else if (item 2 of listResponse) ≠ (missing value) then
062  log (item 2 of listResponse)'s code() as text
063  log (item 2 of listResponse)'s localizedDescription() as text
064  return "エラーしました"
065end if
066
067##############################
068#保存
069set ocidOption to (refMe's NSDataWritingAtomic)
070set listDone to ocidReadData's writeToURL:(ocidSaveFilePathURL) options:(ocidOption) |error| :(reference)
071if (item 2 of listDone) ≠ (missing value) then
072  log (item 2 of listDone)'s code() as text
073  log (item 2 of listDone)'s localizedDescription() as text
074  return "エラーしました"
075end if
076
077##############################
078#PKG解凍
079set strPkgPath to (ocidSaveFilePathURL's |path|()) as text
080#解凍先
081set ocidDistDirPathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:("UnArchived") isDirectory:(true)
082set strDistPath to (ocidDistDirPathURL's |path|()) as text
083#コマンド実行
084set strComandText to ("/usr/sbin/pkgutil  --expand  \"" & strPkgPath & "\" \"" & strDistPath & "\"") as text
085log strComandText
086try
087  do shell script strComandText
088on error
089  return "pkgutilでエラーになりました"
090end try
091
092##############################
093#マニフェスト読み込み
094#XMLパス
095set ocidXmlFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:("UnArchived/ASSET/AcrobatSCAManifest.xml") isDirectory:(true)
096##############################
097#NSDATAに読み込み
098set ocidOption to (refMe's NSDataReadingMappedIfSafe)
099set listResponse to refMe's NSData's alloc()'s initWithContentsOfURL:(ocidXmlFilePathURL) options:(ocidOption) |error| :(reference)
100if (item 2 of listResponse) = (missing value) then
101  set ocidReadData to (item 1 of listResponse)
102else if (item 2 of listResponse) ≠ (missing value) then
103  log (item 2 of listResponse)'s code() as text
104  log (item 2 of listResponse)'s localizedDescription() as text
105  return "initWithContentsOfURL エラーしました"
106end if
107##############################
108#XMLに読み込む
109set ocidOption to (refMe's NSXMLNodePreserveAll) + (refMe's NSXMLDocumentTidyHTML)
110set listResponse to refMe's NSXMLDocument's alloc()'s initWithData:(ocidReadData) options:(ocidOption) |error| :(reference)
111if (item 2 of listResponse) = (missing value) then
112  set ocidXMLDoc to (item 1 of listResponse)
113else if (item 2 of listResponse) ≠ (missing value) then
114  log (item 2 of listResponse)'s code() as text
115  log (item 2 of listResponse)'s localizedDescription() as text
116  log "initWithData エラー 警告がありました"
117  set ocidXMLDoc to (item 1 of listResponse)
118end if
119##############################
120#URL収集用
121set ocidURLArray to refMe's NSMutableArray's alloc()'s initWithCapacity:(0)
122
123##############################
124#XML解析
125#ROOT
126set ocidRootElement to ocidXMLDoc's rootElement()
127set ocidActionItemsArray to ocidRootElement's elementsForName:("DownloadActionItems")
128set ocidActionItems to ocidActionItemsArray's firstObject()
129set ocidItemArray to (ocidActionItems's elementsForName:("dItem"))
130repeat with itemArray in ocidItemArray
131  
132  set ocidID to (itemArray's attributeForName:("id"))'s stringValue()
133  set ocidHost to (itemArray's attributeForName:("httpURLBase"))'s stringValue()
134  set ocidPath to (itemArray's attributeForName:("URL"))'s stringValue()
135  set ocidLastPath to (itemArray's attributeForName:("fileName"))'s stringValue()
136  
137  if (ocidLastPath as text) contains strPkgKey then
138    if (ocidLastPath as text) contains "incr.pkg" then
139      log "差分アップデータあり"
140    else
141      set ocidPkgURL to (refMe's NSURL's alloc()'s initWithString:(ocidHost))
142      set ocidPkgURL to (ocidPkgURL's URLByAppendingPathComponent:(ocidPath))
143      set ocidPkgURL to (ocidPkgURL's URLByAppendingPathComponent:(ocidLastPath))
144      set ocidSetURL to ocidPkgURL's absoluteString()
145      (ocidURLArray's addObject:(ocidSetURL))
146    end if
147  end if
148end repeat
149
150##############################
151#結果
152
153set numCntUrlArray to ocidURLArray's |count|()
154if numCntUrlArray > 1 then
155  display alert "バックアップバージョンあり処理終了" giving up after 2
156  return "バックアップバージョンあり処理終了"
157else if numCntUrlArray = 0 then
158  display alert "URL収集失敗処理終了" giving up after 2
159  return "URL収集失敗処理終了"
160else if numCntUrlArray = 1 then
161  set ocidPkgURLstr to ocidURLArray's firstObject()
162  set ocidPkgURL to refMe's NSURL's alloc()'s initWithString:(ocidPkgURLstr)
163end if
164
165##############################
166#NSDATAでダウンロード
167set ocidOption to (refMe's NSDataReadingMappedIfSafe)
168set listResponse to refMe's NSData's alloc()'s initWithContentsOfURL:(ocidPkgURL) options:(ocidOption) |error| :(reference)
169if (item 2 of listResponse) = (missing value) then
170  set ocidPkgData to (item 1 of listResponse)
171else if (item 2 of listResponse) ≠ (missing value) then
172  log (item 2 of listResponse)'s code() as text
173  log (item 2 of listResponse)'s localizedDescription() as text
174  return "エラーしました"
175end if
176
177##############################
178#保存パス
179set ocidFileName to ocidPkgURL's lastPathComponent()
180set ocidPkgFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:(ocidFileName) isDirectory:(false)
181#保存
182set ocidOption to (refMe's NSDataWritingAtomic)
183set listDone to ocidPkgData's writeToURL:(ocidPkgFilePathURL) options:(ocidOption) |error| :(reference)
184if (item 2 of listDone) ≠ (missing value) then
185  log (item 2 of listDone)'s code() as text
186  log (item 2 of listDone)'s localizedDescription() as text
187  return "エラーしました"
188end if
189
190##############################
191#インストール実行
192set strPkgFilePath to (ocidPkgFilePathURL's |path|()) as text
193set strCommandText to ("/bin/zsh -c '/usr/bin/sudo /usr/sbin/installer -pkg \"" & strPkgFilePath & "\" -target / -dumplog -allowUntrusted -lang ja'")
194log strCommandText
195try
196  ##UIを使ったインストールをする場合
197  # do shell script strCommandText
198  
199  ##アプリケーションにして実行する場合
200  do shell script strCommandText user name strAdminName password strAdminPW with administrator privileges
201on error
202  return "インストールに失敗しました"
203end try
204
AppleScriptで生成しました

|

[Manifest] AcrobatのアップデータURLを取得する(まとめ)更新

Adobeの掲示板にも書き込みました

Mac版です
Windowsはこちら
Acrobat Classicが SCA (SingleClientApp)版 Unified App 版として追加された
バージョン取得テキスト

■SCA(SingleClientApp) Unified App版
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/acrobatSCA/current_version.txt
Acrobat
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/acrobat/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2020/acrobat/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2017/acrobat/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2015/acrobat/current_version.txt
#新しく追加されたクラッシック リーダー版は無い
https://armmf.adobe.com/arm-manifests/mac/Classic/acrobatSCA/current_version.txt

Reader
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2020/reader/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2017/reader/current_version.txt
https://armmf.adobe.com/arm-manifests/mac/Acrobat2015/reader/current_version.txt



マニフェスト
■SCA(SingleClientApp) Unified App版
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/acrobatSCA/AcrobatSCAManifest.arm
Acrobat
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/acrobat/AcrobatManifest.arm"
https://armmf.adobe.com/arm-manifests/mac/Acrobat2020/acrobat/AcrobatManifest.arm
https://armmf.adobe.com/arm-manifests/mac/Acrobat2017/acrobat/AcrobatManifest.arm
https://armmf.adobe.com/arm-manifests/mac/Acrobat2015/acrobat/AcrobatManifest.arm
#新しく追加されたクラッシック
https://armmf.adobe.com/arm-manifests/mac/Classic/acrobatSCA/AcrobatSCAManifest.arm

Reader
https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/ReaderManifest.arm
https://armmf.adobe.com/arm-manifests/mac/Acrobat2020/reader/ReaderManifest.arm
https://armmf.adobe.com/arm-manifests/mac/Acrobat2017/reader/ReaderManifest.arm
https://armmf.adobe.com/arm-manifests/mac/Acrobat2015/reader/ReaderManifest.arm




ここからは先の更新前の記事と同じ


1:macOS用
2:Windows用


1:macOS用
AppleScript
1−1:従来版
1−1−1:従来版 Acrobat製品版
【従来版】Acrobat DC製品版 の最新のアップデートPKGのURLを取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-3a0ba2.html


1−1−2:従来版 Reader版
【従来版】Acrobat Readerの最新のアップデートPKGのURLを取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-8b37a3.html


1−2:SCA版
【SCA版】Acrobat 最新版のアップデートPKGのURLを取得する(製品版DCとReader版Mini両方含みます)
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-d64536.html


1−3:Acrobat Classic SCA版
https://quicktimer.cocolog-nifty.com/icefloe/2024/08/post-dd47d7.html




BASH
1−1:従来版
1−1−1:従来版 Acrobat製品版
[bash]従来版 Acrobat製品版 インストールパッケージURL取得
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-8ad0c6.html

1−1−2:従来版 Reader版
[bash]従来版 Reader版 インストールパッケージURL取得
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-d68468.html

1−2:SCA版
[bash]SCA(SingleClientApp) Unified App版の最新アップデータのURLを取得する(製品版FULLとReader版Mini両方含みます)
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-cc8915.html

1−3:Acrobat Classic SCA版
https://quicktimer.cocolog-nifty.com/icefloe/2024/08/post-dd47d7.html



2:Windows用
A:アップデータ全部URLのセット
https://quicktimer.cocolog-nifty.com/icefloe/files/acrobatwindows.zip

B:最新版のみ取得のセット
https://quicktimer.cocolog-nifty.com/icefloe/files/acrobatwindowsmanifest.zip

最新アップデート64bitのみ
[Manifest] Acrobat とReader の64 bit Windows版の最新版のみ アップデータのURLを取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-7670ef.html

2−1:Acrobat製品版
全部のパッチURL
[Windows]Windows版のAcrobat製品版のアップデータのURLを『全部』取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-714cce.html

2−1−1:32bit版
[Manifest] Acrobat 32 bit Windows版の最新版のみ アップデータのURLを取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-8e7003.html

2−1−2:64bit版
[Manifest] Acrobat 64 bit Windows版の最新版のみ アップデータのURLを取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-2ca2e7.html

2−2:Reader版
全部のパッチURL
[Windows]Windows版のAcrobat Reader版のアップデータのURLを『全部』取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-544fa7.html

2−2−1:32bit版
[Manifest] Reader 32 bit Windows版の最新版のみ アップデータのURLを取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-d33532.html

2−2−2:64bit版
[Manifest] Reader 64 bit Windows版の最新版のみ アップデータのURLを取得する
https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-7dcf98.html

|

Acrobat SCA (SingleClientApp)版 Unified App 版 現時点まとめ(更新)

ClassicTrackに変更が入った
Gvfzj7ca4aandxe

バージョン確認用のテキストURLは
https://armmf.adobe.com/arm-manifests/mac/Classic/acrobatSCA/current_version.txt
マニフェストXMLのURLは
https://armmf.adobe.com/arm-manifests/mac/Classic/acrobatSCA/AcrobatSCAManifest.arm

AcrobatSCAManifest.arm
こちらは圧縮pkg形式なので
/usr/sbin/pkgutil --expand で解凍
解凍されると
ASSET/AcrobatSCAManifest.xmlにマニフェストのXMLが入っている

ダウンロードファイル
https://www.adobe.com/devnet-docs/acrobatetk/tools/ReleaseNotesDC/acrobatclassic/acrobatclassicbase.html#acrobatclassic
について
ClassicトラックにもかかわらずSCAの文字がありバージョンも24になっている
設定ファイルも別となり
完全ではないが※、別アプリとして運用可能だし
同時起動できる

20240821053229_1404x366
※設定ファイルのplistは同時起動で同時に書き込みとか?で
ファイル破損はある話なので、あくまでも同時起動はオマケ的
20240821053439_990x886




それ以前の情報はこちらから
https://quicktimer.cocolog-nifty.com/icefloe/2024/07/post-d15048.html

Gpdgwdjacaetdlt22

|

[bash]従来版 Reader版 インストールパッケージURL取得


サンプルコード

サンプルソース(参考)
行番号ソース
001#!/bin/bash
002#com.cocolog-nifty.quicktimer.icefloe
003# 従来版の 製品版Acrobat用です
004# SCA版 と 従来版のReader用は別です
005# <https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-04a154.html>
006#IDにFullが付くのはは新規インストールや上書きインストール用です
007#################################################
008#ダウンロード先を確保
009LOCAL_TMP_DIR=$(/usr/bin/mktemp -d)
010/bin/echo "TMPDIR:" "$LOCAL_TMP_DIR"
011#保存先のパス
012STR_PKG_FILE_PATH="${LOCAL_TMP_DIR}/ReaderManifest.pkg"
013#ダウンロードURL
014STR_URL="https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/ReaderManifest.arm"
015#ダウンロード
016if ! /usr/bin/curl -L -o "$STR_PKG_FILE_PATH" "$STR_URL" --connect-timeout 20; then
017  /bin/echo "ファイルのダウンロードに失敗しました HTTP1.1で再トライします"
018  if ! /usr/bin/curl -L -o "$STR_PKG_FILE_PATH" "$STR_URL" --http1.1 --connect-timeout 20; then
019    /bin/echo "ファイルのダウンロードに失敗しました"
020    exit 1
021  fi
022fi
023#################################################
024#解凍先パス
025STR_EXPAND_DIR_PATH="${LOCAL_TMP_DIR}/ReaderManifest"
026#解凍
027/usr/sbin/pkgutil --expand-full "$STR_PKG_FILE_PATH" "$STR_EXPAND_DIR_PATH"
028
029#################################################
030#出力用のテキスト
031STR_OUTPUT_TEXT=""
032#テキスト保存先
033STR_TEXT_FILE_PATH="${LOCAL_TMP_DIR}/ReaderManifest/ReaderManifest.txt"
034#XML保存先
035STR_XML_FILE_PATH="${LOCAL_TMP_DIR}/ReaderManifest/ASSET/ReaderManifest.xml"
036#XML読み込み
037XML_READ_DATA=$(/usr/bin/xmllint --format "$STR_XML_FILE_PATH")
038#XMLをdItemだけ読み込んで
039STR_DITEM=$(/bin/echo "$XML_READ_DATA" | /usr/bin/xmllint --xpath '//dItem' -)
040#改行でリストにする
041IFS=$'\n' read -r -d '' -a LIST_DITEM <<<"$STR_DITEM"
042for ITEM_DITEM in "${LIST_DITEM[@]}"; do
043  #ID
044  STR_ID=$(/bin/echo "$ITEM_DITEM" | /usr/bin/xmllint --xpath 'string(/dItem/@id)' -)
045  #URLだけ必要な場合はここを出力しなければいい
046  /bin/echo "ID : " "$STR_ID" >>"$STR_TEXT_FILE_PATH"
047  #httpURLBase
048  STR_URLBASE=$(/bin/echo "$ITEM_DITEM" | /usr/bin/xmllint --xpath 'string(/dItem/@httpURLBase)' -)
049  /bin/echo "STR_URLBASE : " "$STR_URLBASE"
050  #httpURLBase
051  STR_URL_PATH=$(/bin/echo "$ITEM_DITEM" | /usr/bin/xmllint --xpath 'string(/dItem/@URL)' -)
052  /bin/echo "STR_URL_PATH : " "$STR_URL_PATH"
053  #fileName
054  STR_FILE_NAME=$(/bin/echo "$ITEM_DITEM" | /usr/bin/xmllint --xpath 'string(/dItem/@fileName)' -)
055  /bin/echo "STR_FILE_NAME : " "$STR_FILE_NAME"
056
057  STR_OUTPUT_TEXT="${STR_URLBASE}/${STR_URL_PATH}/${STR_FILE_NAME}"
058  /bin/echo "$STR_OUTPUT_TEXT" >>"$STR_TEXT_FILE_PATH"
059  /bin/echo "" >>"$STR_TEXT_FILE_PATH"
060done
061
062#################################################
063#収集したURLテキストを開く
064/usr/bin/open "$STR_TEXT_FILE_PATH"
065
066exit 0
AppleScriptで生成しました

|

[bash]従来版 Acrobat製品版 インストールパッケージURL取得


サンプルコード

サンプルソース(参考)
行番号ソース
001#!/bin/bash
002#com.cocolog-nifty.quicktimer.icefloe
003# 従来版の 製品版Acrobat用です
004# SCA版 と 従来版のReader用は別です
005# <https://quicktimer.cocolog-nifty.com/icefloe/2024/06/post-04a154.html>
006#
007#################################################
008#ダウンロード先を確保
009LOCAL_TMP_DIR=$(/usr/bin/mktemp -d)
010/bin/echo "TMPDIR:" "$LOCAL_TMP_DIR"
011#保存先のパス
012STR_PKG_FILE_PATH="${LOCAL_TMP_DIR}/AcrobatManifest.pkg"
013#ダウンロードURL
014STR_URL="https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/acrobat/AcrobatManifest.arm"
015#ダウンロード
016if ! /usr/bin/curl -L -o "$STR_PKG_FILE_PATH" "$STR_URL" --connect-timeout 20; then
017  /bin/echo "ファイルのダウンロードに失敗しました HTTP1.1で再トライします"
018  if ! /usr/bin/curl -L -o "$STR_PKG_FILE_PATH" "$STR_URL" --http1.1 --connect-timeout 20; then
019    /bin/echo "ファイルのダウンロードに失敗しました"
020    exit 1
021  fi
022fi
023#################################################
024#解凍先パス
025STR_EXPAND_DIR_PATH="${LOCAL_TMP_DIR}/AcrobatManifest"
026#解凍
027/usr/sbin/pkgutil --expand-full "$STR_PKG_FILE_PATH" "$STR_EXPAND_DIR_PATH"
028
029#################################################
030#出力用のテキスト
031STR_OUTPUT_TEXT=""
032#テキスト保存先
033STR_TEXT_FILE_PATH="${LOCAL_TMP_DIR}/AcrobatManifest/AcrobatManifest.txt"
034#XML保存先
035STR_XML_FILE_PATH="${LOCAL_TMP_DIR}/AcrobatManifest/ASSET/AcrobatManifest.xml"
036#XML読み込み
037XML_READ_DATA=$(/usr/bin/xmllint --format "$STR_XML_FILE_PATH")
038#XMLをdItemだけ読み込んで
039STR_DITEM=$(/bin/echo "$XML_READ_DATA" | /usr/bin/xmllint --xpath '//dItem' -)
040#改行でリストにする
041IFS=$'\n' read -r -d '' -a LIST_DITEM <<<"$STR_DITEM"
042for ITEM_DITEM in "${LIST_DITEM[@]}"; do
043  #ID
044  STR_ID=$(/bin/echo "$ITEM_DITEM" | /usr/bin/xmllint --xpath 'string(/dItem/@id)' -)
045  #URLだけ必要な場合はここを出力しなければいい
046  /bin/echo "ID : " "$STR_ID" >>"$STR_TEXT_FILE_PATH"
047  #httpURLBase
048  STR_URLBASE=$(/bin/echo "$ITEM_DITEM" | /usr/bin/xmllint --xpath 'string(/dItem/@httpURLBase)' -)
049  /bin/echo "STR_URLBASE : " "$STR_URLBASE"
050  #httpURLBase
051  STR_URL_PATH=$(/bin/echo "$ITEM_DITEM" | /usr/bin/xmllint --xpath 'string(/dItem/@URL)' -)
052  /bin/echo "STR_URL_PATH : " "$STR_URL_PATH"
053  #fileName
054  STR_FILE_NAME=$(/bin/echo "$ITEM_DITEM" | /usr/bin/xmllint --xpath 'string(/dItem/@fileName)' -)
055  /bin/echo "STR_FILE_NAME : " "$STR_FILE_NAME"
056
057  STR_OUTPUT_TEXT="${STR_URLBASE}/${STR_URL_PATH}/${STR_FILE_NAME}"
058  /bin/echo "$STR_OUTPUT_TEXT" >>"$STR_TEXT_FILE_PATH"
059  /bin/echo "" >>"$STR_TEXT_FILE_PATH"
060done
061
062#################################################
063#収集したURLテキストを開く
064/usr/bin/open "$STR_TEXT_FILE_PATH"
065
066exit 0
AppleScriptで生成しました

|

【SCA版】Acrobat 最新版のアップデートPKGと新規インストール用のPKGのURLを取得する(製品版DCとReader版Mini両方含みます)


AppleScript サンプルコード

【スクリプトエディタで開く】 |

AppleScript サンプルソース(参考)
行番号ソース
001#! /usr/bin/env osascript
002----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
003(*
004シングルクライアントアプリケーションSCA版のAcrobatの
005最新アップデーターのURLを取得します
006com.cocolog-nifty.quicktimer.icefloe *)
007----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
008use AppleScript version "2.8"
009use framework "Foundation"
010use framework "AppKit"
011use scripting additions
012
013property refMe : a reference to current application
014
015property refNSNotFound : a reference to 9.22337203685477E+18 + 5807
016
017
018##############################
019#ダウンロードするURL
020set ocidURLComponents to refMe's NSURLComponents's alloc()'s init()
021ocidURLComponents's setScheme:"https"
022ocidURLComponents's setHost:"armmf.adobe.com"
023ocidURLComponents's setPath:"/arm-manifests/mac/AcrobatDC/acrobatSCA/AcrobatSCAManifest.arm"
024set ocidURLStrings to ocidURLComponents's |URL|'s absoluteString()
025set ocidURL to refMe's NSURL's alloc()'s initWithString:(ocidURLStrings)
026log ocidURL's absoluteString() as text
027
028##############################
029#起動時に削除される項目にダウンロード
030set appFileManager to refMe's NSFileManager's defaultManager()
031set ocidTempDirURL to appFileManager's temporaryDirectory()
032set ocidUUID to refMe's NSUUID's alloc()'s init()
033set ocidUUIDString to ocidUUID's UUIDString
034set ocidSaveDirPathURL to ocidTempDirURL's URLByAppendingPathComponent:(ocidUUIDString) isDirectory:(true)
035#フォルダを作っておく
036set ocidAttrDict to refMe's NSMutableDictionary's alloc()'s initWithCapacity:0
037ocidAttrDict's setValue:(511) forKey:(refMe's NSFilePosixPermissions)
038set listDone to appFileManager's createDirectoryAtURL:(ocidSaveDirPathURL) withIntermediateDirectories:(true) attributes:(ocidAttrDict) |error| :(reference)
039if (item 1 of listDone) is true then
040  log "createDirectoryAtURL 正常処理"
041else if (item 2 of listDone) ≠ (missing value) then
042  log (item 2 of listDone)'s code() as text
043  log (item 2 of listDone)'s localizedDescription() as text
044  return "createDirectoryAtURL エラーしました"
045end if
046#保存パス
047set strSaveFileName to "AcrobatSCAManifest.pkg" as text
048set ocidSaveFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:(strSaveFileName) isDirectory:(false)
049
050##############################
051#NSDATAでダウンロード
052set ocidOption to (refMe's NSDataReadingMappedIfSafe)
053set listResponse to refMe's NSData's alloc()'s initWithContentsOfURL:(ocidURL) options:(ocidOption) |error| :(reference)
054if (item 2 of listResponse) = (missing value) then
055  log "正常処理"
056  set ocidReadData to (item 1 of listResponse)
057else if (item 2 of listResponse) ≠ (missing value) then
058  log (item 2 of listResponse)'s code() as text
059  log (item 2 of listResponse)'s localizedDescription() as text
060  return "エラーしました"
061end if
062
063##############################
064#保存
065set ocidOption to (refMe's NSDataWritingAtomic)
066set listDone to ocidReadData's writeToURL:(ocidSaveFilePathURL) options:(ocidOption) |error| :(reference)
067if (item 1 of listDone) is true then
068  log "正常処理"
069else if (item 2 of listDone) ≠ (missing value) then
070  log (item 2 of listDone)'s code() as text
071  log (item 2 of listDone)'s localizedDescription() as text
072  return "エラーしました"
073end if
074##############################
075#PKG解凍
076set strPkgPath to (ocidSaveFilePathURL's |path|()) as text
077#解凍先
078set ocidDistDirPathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:("UnArchived") isDirectory:(true)
079set strDistPath to (ocidDistDirPathURL's |path|()) as text
080#コマンド実行
081set strComandText to ("/usr/sbin/pkgutil  --expand  \"" & strPkgPath & "\" \"" & strDistPath & "\"") as text
082log strComandText
083try
084  do shell script strComandText
085on error
086  return "pkgutilでエラーになりました"
087end try
088
089##############################
090#マニフェスト読み込み
091#XMLパス
092set ocidXmlFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:("UnArchived/ASSET/AcrobatSCAManifest.xml") isDirectory:(true)
093##############################
094#NSDATAに読み込み
095set ocidOption to (refMe's NSDataReadingMappedIfSafe)
096set listResponse to refMe's NSData's alloc()'s initWithContentsOfURL:(ocidXmlFilePathURL) options:(ocidOption) |error| :(reference)
097if (item 2 of listResponse) = (missing value) then
098  log "initWithContentsOfURL 正常処理"
099  set ocidReadData to (item 1 of listResponse)
100else if (item 2 of listResponse) ≠ (missing value) then
101  log (item 2 of listResponse)'s code() as text
102  log (item 2 of listResponse)'s localizedDescription() as text
103  return "initWithContentsOfURL エラーしました"
104end if
105##############################
106#XMLに読み込む
107set ocidOption to (refMe's NSXMLNodePreserveAll) + (refMe's NSXMLDocumentTidyHTML)
108set listResponse to refMe's NSXMLDocument's alloc()'s initWithData:(ocidReadData) options:(ocidOption) |error| :(reference)
109if (item 2 of listResponse) = (missing value) then
110  log "initWithData 正常処理"
111  set ocidXMLDoc to (item 1 of listResponse)
112else if (item 2 of listResponse) ≠ (missing value) then
113  log (item 2 of listResponse)'s code() as text
114  log (item 2 of listResponse)'s localizedDescription() as text
115  log "initWithData エラー 警告がありました"
116  set ocidXMLDoc to (item 1 of listResponse)
117end if
118##############################
119#出力用テキスト
120set ocidOutPutstring to refMe's NSMutableString's alloc()'s initWithCapacity:(0)
121ocidOutPutstring's appendString:("SCA版 Acrobatの最新パッチURL\n\n")
122set strSetInfoStr to ("dld_Patch_Mini_Incr:旧称Readerの差分パッチ\ndld_Patch_Mini_Cumulative:旧称Readerの累積パッチ\ndld_Patch_Combined_Incr:製品版DCの差分パッチ\ndld_Mini_Full: Reader版Miniの新規インストーラー上書き用\ndld_Acrobat_Full:製品版DCの新規インストーラー上書き用\ndld_Patch_Combined_Cumulative:製品版DCの累積パッチ\n") as text
123ocidOutPutstring's appendString:(strSetInfoStr)
124ocidOutPutstring's appendString:("\n")
125##############################
126#XML解析
127#ROOT
128set ocidRootElement to ocidXMLDoc's rootElement()
129set ocidActionItemsArray to ocidRootElement's elementsForName:("DownloadActionItems")
130set ocidActionItems to ocidActionItemsArray's firstObject()
131set ocidItemArray to (ocidActionItems's elementsForName:("dItem"))
132repeat with itemArray in ocidItemArray
133  (ocidOutPutstring's appendString:("----+----1----+----2----+-----3----+----4----+----5----+----6----+----7"))
134  (ocidOutPutstring's appendString:("\n"))
135  set ocidID to (itemArray's attributeForName:("id"))'s stringValue()
136  (ocidOutPutstring's appendString:(ocidID))
137  (ocidOutPutstring's appendString:("\n"))
138  #URL
139  set ocidHost to (itemArray's attributeForName:("httpURLBase"))'s stringValue()
140  set ocidPath to (itemArray's attributeForName:("URL"))'s stringValue()
141  set ocidLastPath to (itemArray's attributeForName:("fileName"))'s stringValue()
142  set ocidPkgURL to (refMe's NSURL's alloc()'s initWithString:(ocidHost))
143  set ocidPkgURL to (ocidPkgURL's URLByAppendingPathComponent:(ocidPath))
144  set ocidPkgURL to (ocidPkgURL's URLByAppendingPathComponent:(ocidLastPath))
145  set ocidSetURL to ocidPkgURL's absoluteString()
146  (ocidOutPutstring's appendString:(ocidSetURL))
147  (ocidOutPutstring's appendString:("\n"))
148  # log (itemArray's attributeForName:("signingEntity"))'s stringValue as text
149  # log (itemArray's attributeForName:("hashValue"))'s stringValue as text
150  #PKGのファイルサイズ
151  set ocidFileSizeStr to (itemArray's attributeForName:("size"))'s stringValue()
152  set ocidFileSizeDec to (refMe's NSDecimalNumber's alloc()'s initWithString:(ocidFileSizeStr))
153  set ocidThousandDec to (refMe's NSDecimalNumber's alloc()'s initWithString:("1000000"))
154  set ocidMBDec to (ocidFileSizeDec's decimalNumberByDividingBy:(ocidThousandDec))
155  set ocidFormatter to refMe's NSNumberFormatter's alloc()'s init()
156  (ocidFormatter's setRoundingMode:(refMe's NSNumberFormatterRoundFloor))
157  (ocidFormatter's setNumberStyle:(refMe's NSNumberFormatterDecimalStyle))
158  (ocidFormatter's setMaximumFractionDigits:(2))
159  set ocidMBstr to (ocidFormatter's stringFromNumber:(ocidMBDec))
160  (ocidOutPutstring's appendString:(ocidMBstr))
161  (ocidOutPutstring's appendString:(" MB"))
162  (ocidOutPutstring's appendString:("\n"))
163  
164end repeat
165
166
167##############################
168#テキスト保存
169set ocidSaveTextFilePathURL to ocidSaveDirPathURL's URLByAppendingPathComponent:("AcrobatSCAManifest.txt") isDirectory:(false)
170set listDone to ocidOutPutstring's writeToURL:(ocidSaveTextFilePathURL) atomically:(true) encoding:(refMe's NSUTF8StringEncoding) |error| :(reference)
171if (item 1 of listDone) is true then
172  log "writeToURL 正常処理"
173else if (item 2 of listDone) ≠ (missing value) then
174  log (item 2 of listDone)'s code() as text
175  log (item 2 of listDone)'s localizedDescription() as text
176  return "writeToURL エラーしました"
177end if
178
179##############################
180#開く
181set appSharedWorkspace to refMe's NSWorkspace's sharedWorkspace()
182set boolDone to appSharedWorkspace's openURL:(ocidSaveTextFilePathURL)
183
184if (boolDone) is true then
185  return "正常処理"
186else if (boolDone) is false then
187  return "エラーしました"
188end if
189
AppleScriptで生成しました

|

より以前の記事一覧

その他のカテゴリー

Accessibility Acrobat Acrobat 2020 Acrobat 2024 Acrobat AddOn Acrobat Annotation Acrobat AppleScript Acrobat ARMDC Acrobat AV2 Acrobat BookMark Acrobat Classic Acrobat DC Acrobat Dialog Acrobat Distiller Acrobat Form Acrobat GentechAI Acrobat JS Acrobat JS Word Search Acrobat Maintenance Acrobat Manifest Acrobat Menu Acrobat Merge Acrobat Open Acrobat PDFPage Acrobat Plugin Acrobat Preferences Acrobat Preflight Acrobat Print Acrobat Python Acrobat Reader Acrobat Reader Localized Acrobat Reference Acrobat Registered Products Acrobat SCA Acrobat SCA Updater Acrobat Sequ Acrobat Sign Acrobat Stamps Acrobat URL List Mac Acrobat URL List Windows Acrobat Watermark Acrobat Windows Acrobat Windows Reader Admin Admin Account Admin Apachectl Admin ConfigCode Admin configCode Admin Device Management Admin LaunchServices Admin Locationd Admin loginitem Admin Maintenance Admin Mobileconfig Admin NetWork Admin Permission Admin Pkg Admin Power Management Admin Printer Admin Printer Basic Admin Printer Custompapers Admin SetUp Admin SMB Admin softwareupdate Admin Support Admin System Information Admin TCC Admin Tools Admin Umask Admin Users Admin Volumes Admin XProtect Adobe Adobe AUSST Adobe Bridge Adobe Documents Adobe FDKO Adobe Fonts Adobe Reference Adobe RemoteUpdateManager Adobe Sap Code AppKit Apple AppleScript AppleScript Duplicate AppleScript entire contents AppleScript List AppleScript ObjC AppleScript Osax AppleScript PDF AppleScript Pictures AppleScript record AppleScript Video Applications AppStore Archive Archive Keka Attributes Automator BackUp Barcode Barcode Decode Barcode QR Bash Basic Basic Path Bluetooth BOX Browser Calendar CD/DVD Choose Chrome Chromedriver CIImage CityCode CloudStorage Color Color NSColor Color NSColorList com.apple.LaunchServices.OpenWith Console Contacts CotEditor CURL current application Date&Time delimiters Desktop Desktop Position Device Diff Disk do shell script Dock Dock Launchpad DropBox Droplet eMail Encode % Encode Decode Encode HTML Entity Encode UTF8 Error EXIFData exiftool ffmpeg File File Name Finder Finder Window Firefox Folder FolderAction Font List FontCollections Fonts Fonts Asset_Font Fonts ATS Fonts Emoji Fonts Maintenance Fonts Morisawa Fonts Python Fonts Variable Foxit GIF github Guide HTML Icon Icon Assets.car Illustrator Image Events ImageOptim Input Dictionary iPhone iWork Javascript Jedit Ω Json Label Language Link locationd lsappinfo m3u8 Mail Map Math Media Media AVAsset Media AVconvert Media AVFoundation Media AVURLAsset Media Movie Media Music Memo Messages Microsoft Microsoft Edge Microsoft Excel Microsoft Fonts Microsoft Office Microsoft Office Link Microsoft OneDrive Microsoft Teams Mouse Music Node Notes NSArray NSArray Sort NSAttributedString NSBezierPath NSBitmapImageRep NSBundle NSCFBoolean NSCharacterSet NSData NSDecimalNumber NSDictionary NSError NSEvent NSFileAttributes NSFileManager NSFileManager enumeratorAtURL NSFont NSFontManager NSGraphicsContext NSGraphicsContext Crop NSImage NSIndex NSKeyedArchiver NSKeyedUnarchiver NSLocale NSMetadataItem NSMutableArray NSMutableDictionary NSMutableString NSNotFound NSNumber NSOpenPanel NSPasteboard NSpoint NSPredicate NSRange NSRect NSRegularExpression NSRunningApplication NSScreen NSSet NSSize NSString NSString stringByApplyingTransform NSStringCompareOptions NSTask NSTimeZone NSUbiquitous NSURL NSURL File NSURLBookmark NSURLComponents NSURLResourceKey NSURLSession NSUserDefaults NSUUID NSView NSWorkspace Numbers OAuth PDF PDF Image2PDF PDF MakePDF PDF nUP PDF Pymupdf PDF Pypdf PDFContext PDFDisplayBox PDFImageRep PDFKit PDFKit Annotation PDFKit AnnotationWidget PDFKit DocumentPermissions PDFKit OCR PDFKit Outline PDFKit Start PDFPage PDFPage Rotation PDFView perl Photoshop PlistBuddy pluginkit plutil postalcode PostScript PowerShell prefPane Preview Python Python eyed3 Python pip QuickLook QuickTime ReadMe Regular Expression Reminders ReName Repeat RTF Safari SaveFile ScreenCapture ScreenSaver Script Editor Script Menu SF Symbols character id SF Symbols Entity Shortcuts Shortcuts Events sips Skype Slack Sound Spotlight sqlite StandardAdditions StationSearch Subtitles LRC Subtitles SRT Subtitles VTT Swift swiftDialog System Events System Settings TemporaryItems Terminal Text Text CSV Text MD Text TSV TextEdit Tools Translate Trash Twitter Typography UI Unit Conversion UTType valueForKeyPath Video VisionKit Visual Studio Code VMware Fusion Wacom Weather webarchive webp Wifi Windows XML XML EPUB XML HTML XML LSSharedFileList XML LSSharedFileList sfl2 XML LSSharedFileList sfl3 XML objectsForXQuery XML OPML XML Plist XML Plist System Events XML RSS XML savedSearch XML SVG XML TTML XML webloc XML xmllint XML XMP YouTube Zero Padding zoom