Skip to content

Instantly share code, notes, and snippets.

@danielbayley
Last active May 12, 2025 11:53
Show Gist options
  • Save danielbayley/edc811d24c981e8916973bccf6035701 to your computer and use it in GitHub Desktop.
Save danielbayley/edc811d24c981e8916973bccf6035701 to your computer and use it in GitHub Desktop.

Revisions

  1. danielbayley revised this gist May 12, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion starcraft-mass-recall.rb
    Original file line number Diff line number Diff line change
    @@ -84,7 +84,7 @@
    actual = Digest::MD5.file zip
    raise ChecksumMismatchError.new token, md5, actual, zip if actual != md5

    UnpackStrategy::Zip.new(zip).extract to: Dir.pwd
    UnpackStrategy::Zip.new(zip).extract to: Pathname.pwd
    end
    FileUtils.mv Dir["Extras/*"], "#{@cask.name.first}/Extras", force: true
    FileUtils.ln_sf "#{suite}/Support/SC2Switcher.app", "#{suite}/#{@cask.name.first}.app"
  2. danielbayley revised this gist May 12, 2025. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions starcraft-mass-recall.rb
    Original file line number Diff line number Diff line change
    @@ -79,10 +79,10 @@
    resources.merge(language).each do |*, (id, zip, md5)|
    url = file_url[id, zip]

    curl_download url, to: zip unless File.exist? zip
    ::Utils::Curl.curl_download url, to: zip unless File.exist? zip

    actual = Digest::MD5.file zip
    raise CaskSha256MismatchError.new token, md5, actual, zip if actual != md5
    raise ChecksumMismatchError.new token, md5, actual, zip if actual != md5

    UnpackStrategy::Zip.new(zip).extract to: Dir.pwd
    end
  3. danielbayley revised this gist Apr 12, 2025. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions starcraft-mass-recall.rb
    Original file line number Diff line number Diff line change
    @@ -64,6 +64,7 @@
    regex %r{Version</h\d>.*<div.*>(\d+(?:\.\d+)+)</div>}m
    end

    depends_on arch: :x86_64
    depends_on macos: ">= :el_capitan"

    suite = "#{appdir}/StarCraft II"
  4. danielbayley revised this gist Jun 8, 2021. 1 changed file with 58 additions and 38 deletions.
    96 changes: 58 additions & 38 deletions starcraft-mass-recall.rb
    Original file line number Diff line number Diff line change
    @@ -1,71 +1,92 @@
    cask "starcraft-mass-recall" do
    version "7.3.1"
    sha256 "473a086aa3eccc1e86e300ef1f4ebc8381fb4090e7fa2e2da1945d9299279eff"
    version "8.0.1"
    sha256 "76750def5b63cf58afeb63e9948b5efec23adb436964eb730fe5d800d5a89e3b"

    resources = {
    mod: ["3246208", "SCMR_v#{version}.zip"],
    assets: ["3239552", "SCMRassets_v#{version}.zip", "9277d51c89e3cc473a3b5d588c2f3cdb"],
    cinematics: ["2819339", "SCMRcinematics_v7.2.zip", "f19ea12979eb8eaf703ed00ef33b7912"],
    redux: ["3246278", "Enslavers_Redux_v#{version}.zip", "b61129ef7df2004faa4c08480e447f31"],
    }

    language "en", default: true do
    [
    ["2857/297/SCMRlocal_v#{version.major_minor}", "17c3dcf94fd69c1482a454626448a023"],
    ["2819/339/SCMRcinematics_v#{version.major}.2", "f19ea12979eb8eaf703ed00ef33b7912"],
    ]
    {
    local: ["3147425", "SCMRlocal_v#{version.major_minor}_EN.zip", "1a029f3f082353859ac3979d00781628"],
    }
    end
    language "de" do
    [
    ["2748/113/SCMRlocal_v#{version.major}.1_DE", "c18f1bef103d861d4fe93219ec736850"],
    ["2748/960/SCMRcinematics_v#{version.major}.1_DE", "ec1286ba8c03701663b7f5fbac3ad7d5"],
    ]
    {
    local: ["3273584", "SCMRlocal_v#{version}_DE.zip", "74d0b9a4b392188c2421611251dd4304"],
    cinematics: ["3273570", "SCMRcinematics_v#{version}_DE.zip", "3a137c249971c863b84c388f23458e4b"],
    }
    end
    language "pl" do
    {
    local: [
    "3269534", "SCMRlocal_#{version.dots_to_underscores}_PL_SS_ENSR_1_2.zip",
    "249b1be2ff52f37de78487a4d2174d7f"
    ],
    }
    end
    language "es" do
    {
    local: [
    "3222127", "SCMR+v#{version.major_minor}+Latam+Spanish+Localization.zip",
    "ee11307e9ad8105ea3e5cd75d97e8cc1"
    ],
    }
    end
    language "ru" do
    ["2866/453/SCMRlocal+v#{version.major_minor}+(Russian)", "b8efce71c59badad2fa0d336dce1d11b"]
    {
    local: ["3163569", "SCMRlocal_RUS_v#{version.major}.zip", "36e37bd9e4814bbb3b67d6aee841e85e"],
    redux: ["3178333", "Enslavers_Redux_RUS_v#{version.major}.zip", "dfd2c54813f3e7a769f6d58043054a3f"],
    stukov: ["3178335", "Stukov_Series_RUS_v#{version.major}.zip", "2ff9f042cd73de0a57f03956e5a20bbf"],
    }
    end
    language "ko" do
    ["2815/486/SCMRlocal_v#{version.major}.1_KR", "92f0c8b1dfc91701139b139839b5a07b"]
    { local: ["2815486", "SCMRlocal_v7.1_KR.zip", "92f0c8b1dfc91701139b139839b5a07b"] }
    end
    language "pl" do
    [
    "2882/341/SCMRlocal_#{version.major_minor.dots_to_underscores}_PL_v_1",
    "aa11225e6ed00a5012393ba22d7bf3d0",
    ]

    cdn = "media.forgecdn.net/"
    file_url = lambda do |id, file, *|
    split = id.unpack("a4a*").join "/"
    "https://#{cdn}files/#{split}/#{file}"
    end

    # media.forgecdn.net/ was verified as official when first introduced to the cask
    url "https://media.forgecdn.net/files/2931/253/SCMR_v#{version}.zip"
    appcast "https://raw.githubusercontent.com/abrahamYG/sc2-campaign-sources/master/sources/#{token}.json",
    must_contain: "v#{version.major_minor}"
    url file_url[*resources.shift.last], verified: cdn
    name "StarCraft Mass Recall"
    desc "Starcraft II engine recreation of classic Starcraft and Brood War campaigns"
    homepage "https://sc2mapster.com/projects/#{token}"

    livecheck do
    url "https://starcraft.fandom.com/wiki/StarCraft:_Mass_Recall"
    strategy :page_match
    regex %r{Version</h\d>.*<div.*>(\d+(?:\.\d+)+)</div>}m
    end

    depends_on macos: ">= :el_capitan"

    suite = "#{appdir}/StarCraft II"
    artifact name.first, target: "#{suite}/Maps/#{name.first}"
    artifact "Mods/SCMRmod.SC2Mod", target: "#{suite}/Mods/SCMRmod.SC2Mod"
    artifact "Mods/SCMRassets.SC2Mod", target: "#{suite}/Mods/SCMRassets.SC2Mod"
    artifact "Mods/SCMRlocal.SC2Mod", target: "#{suite}/Mods/SCMRlocal.SC2Mod"
    artifact "Mods/SCMRcinematics.SC2Mod", target: "#{suite}/Mods/SCMRcinematics.SC2Mod"
    artifact "Mods/SCMRmod.SC2Mod", target: "#{suite}/Mods/SCMRmod.SC2Mod"

    preflight do
    resources = [
    "https://edge.forgecdn.net/files/2857/290/SCMRassets_v#{version.major_minor}.zip",
    "5690c24797e1d8778654950272bf641a",
    *language.map { |path, checksum| ["https://edge.forgecdn.net/files/#{path}.zip", checksum] }.flatten,
    "https://edge.forgecdn.net/files/2857/320/SCMREnslaversRedux_v#{version.major_minor}.zip",
    "ed9761c20c581fa6d9412ffe86fb460d",
    ]

    Dir.chdir(staged_path) do
    Hash[*resources].each do |url, checksum|
    zip = File.basename CGI.unescape URI.parse(url.to_s).path
    resources.merge(language).each do |*, (id, zip, md5)|
    url = file_url[id, zip]

    curl_download url.to_s, to: zip unless File.exist? zip
    curl_download url, to: zip unless File.exist? zip

    actual = Digest::MD5.file zip
    raise CaskSha256MismatchError.new token, checksum, actual, zip if actual != checksum
    raise CaskSha256MismatchError.new token, md5, actual, zip if actual != md5

    UnpackStrategy::Zip.new(zip).extract to: Dir.pwd
    end
    FileUtils.mv "Extras/8. Enslavers Redux", "#{@cask.name.first}/Extras/8. Enslavers Redux"
    FileUtils.ln_s "#{suite}/Support/SC2Switcher.app", "#{suite}/#{@cask.name.first}.app"
    FileUtils.mv Dir["Extras/*"], "#{@cask.name.first}/Extras", force: true
    FileUtils.ln_sf "#{suite}/Support/SC2Switcher.app", "#{suite}/#{@cask.name.first}.app"
    FileUtils.rm Dir["*.zip"]
    end
    end
    @@ -77,6 +98,5 @@
    zap trash: [
    "#{banks}/SCMR.SC2Bank",
    "#{application_support}/*/Multiplayer/#{name.first}*.SC2*",
    ],
    rmdir: banks
    ], rmdir: banks
    end
  5. danielbayley revised this gist Nov 11, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion starcraft-mass-recall.rb
    Original file line number Diff line number Diff line change
    @@ -79,4 +79,4 @@
    "#{application_support}/*/Multiplayer/#{name.first}*.SC2*",
    ],
    rmdir: banks
    end
    end
  6. danielbayley revised this gist Nov 10, 2020. 1 changed file with 11 additions and 15 deletions.
    26 changes: 11 additions & 15 deletions starcraft-mass-recall.rb
    Original file line number Diff line number Diff line change
    @@ -8,22 +8,18 @@
    ["2819/339/SCMRcinematics_v#{version.major}.2", "f19ea12979eb8eaf703ed00ef33b7912"],
    ]
    end

    language "de" do
    [
    ["2748/113/SCMRlocal_v#{version.major}.1_DE", "c18f1bef103d861d4fe93219ec736850"],
    ["2748/960/SCMRcinematics_v#{version.major}.1_DE", "ec1286ba8c03701663b7f5fbac3ad7d5"],
    ]
    end

    language "ru" do
    ["2866/453/SCMRlocal+v#{version.major_minor}+(Russian)", "b8efce71c59badad2fa0d336dce1d11b"]
    end

    language "ko" do
    ["2815/486/SCMRlocal_v#{version.major}.1_KR", "92f0c8b1dfc91701139b139839b5a07b"]
    end

    language "pl" do
    [
    "2882/341/SCMRlocal_#{version.major_minor.dots_to_underscores}_PL_v_1",
    @@ -36,7 +32,7 @@
    appcast "https://raw.githubusercontent.com/abrahamYG/sc2-campaign-sources/master/sources/#{token}.json",
    must_contain: "v#{version.major_minor}"
    name "StarCraft Mass Recall"
    desc "Starcraft 2 engine mod that recreates the classic Starcraft and Brood War gameplay as well as the entire single-player campaigns"
    desc "Starcraft II engine recreation of classic Starcraft and Brood War campaigns"
    homepage "https://sc2mapster.com/projects/#{token}"

    depends_on macos: ">= :el_capitan"
    @@ -50,12 +46,12 @@

    preflight do
    resources = [
    "https://edge.forgecdn.net/files/2857/290/SCMRassets_v#{version.major_minor}.zip",
    "5690c24797e1d8778654950272bf641a",
    *language.map { |path, checksum| ["https://edge.forgecdn.net/files/#{path}.zip", checksum] }.flatten,
    "https://edge.forgecdn.net/files/2857/320/SCMREnslaversRedux_v#{version.major_minor}.zip",
    "ed9761c20c581fa6d9412ffe86fb460d",
    ]
    "https://edge.forgecdn.net/files/2857/290/SCMRassets_v#{version.major_minor}.zip",
    "5690c24797e1d8778654950272bf641a",
    *language.map { |path, checksum| ["https://edge.forgecdn.net/files/#{path}.zip", checksum] }.flatten,
    "https://edge.forgecdn.net/files/2857/320/SCMREnslaversRedux_v#{version.major_minor}.zip",
    "ed9761c20c581fa6d9412ffe86fb460d",
    ]

    Dir.chdir(staged_path) do
    Hash[*resources].each do |url, checksum|
    @@ -79,8 +75,8 @@
    application_support = "~/Library/Application Support/Blizzard/StarCraft II"
    banks = "#{application_support}/Banks"
    zap trash: [
    "#{banks}/SCMR.SC2Bank",
    "#{application_support}/*/Multiplayer/#{name.first}*.SC2*",
    ],
    "#{banks}/SCMR.SC2Bank",
    "#{application_support}/*/Multiplayer/#{name.first}*.SC2*",
    ],
    rmdir: banks
    end
    end
  7. danielbayley revised this gist Oct 28, 2020. 1 changed file with 28 additions and 27 deletions.
    55 changes: 28 additions & 27 deletions starcraft-mass-recall.rb
    Original file line number Diff line number Diff line change
    @@ -1,59 +1,60 @@
    cask 'starcraft-mass-recall' do
    version '7.3.1'
    sha256 '473a086aa3eccc1e86e300ef1f4ebc8381fb4090e7fa2e2da1945d9299279eff'
    cask "starcraft-mass-recall" do
    version "7.3.1"
    sha256 "473a086aa3eccc1e86e300ef1f4ebc8381fb4090e7fa2e2da1945d9299279eff"

    language 'en', default: true do
    language "en", default: true do
    [
    ["2857/297/SCMRlocal_v#{version.major_minor}", '17c3dcf94fd69c1482a454626448a023'],
    ["2819/339/SCMRcinematics_v#{version.major}.2", 'f19ea12979eb8eaf703ed00ef33b7912'],
    ["2857/297/SCMRlocal_v#{version.major_minor}", "17c3dcf94fd69c1482a454626448a023"],
    ["2819/339/SCMRcinematics_v#{version.major}.2", "f19ea12979eb8eaf703ed00ef33b7912"],
    ]
    end

    language 'de' do
    language "de" do
    [
    ["2748/113/SCMRlocal_v#{version.major}.1_DE", 'c18f1bef103d861d4fe93219ec736850'],
    ["2748/960/SCMRcinematics_v#{version.major}.1_DE", 'ec1286ba8c03701663b7f5fbac3ad7d5'],
    ["2748/113/SCMRlocal_v#{version.major}.1_DE", "c18f1bef103d861d4fe93219ec736850"],
    ["2748/960/SCMRcinematics_v#{version.major}.1_DE", "ec1286ba8c03701663b7f5fbac3ad7d5"],
    ]
    end

    language 'ru' do
    ["2866/453/SCMRlocal+v#{version.major_minor}+(Russian)", 'b8efce71c59badad2fa0d336dce1d11b']
    language "ru" do
    ["2866/453/SCMRlocal+v#{version.major_minor}+(Russian)", "b8efce71c59badad2fa0d336dce1d11b"]
    end

    language 'ko' do
    ["2815/486/SCMRlocal_v#{version.major}.1_KR", '92f0c8b1dfc91701139b139839b5a07b']
    language "ko" do
    ["2815/486/SCMRlocal_v#{version.major}.1_KR", "92f0c8b1dfc91701139b139839b5a07b"]
    end

    language 'pl' do
    language "pl" do
    [
    "2882/341/SCMRlocal_#{version.major_minor.dots_to_underscores}_PL_v_1",
    'aa11225e6ed00a5012393ba22d7bf3d0',
    "aa11225e6ed00a5012393ba22d7bf3d0",
    ]
    end

    # media.forgecdn.net was verified as official when first introduced to the cask
    # media.forgecdn.net/ was verified as official when first introduced to the cask
    url "https://media.forgecdn.net/files/2931/253/SCMR_v#{version}.zip"
    appcast "https://raw.githubusercontent.com/abrahamYG/sc2-campaign-sources/master/sources/#{token}.json",
    must_contain: "v#{version.major_minor}"
    name 'StarCraft Mass Recall'
    name "StarCraft Mass Recall"
    desc "Starcraft 2 engine mod that recreates the classic Starcraft and Brood War gameplay as well as the entire single-player campaigns"
    homepage "https://sc2mapster.com/projects/#{token}"

    depends_on macos: '>= :el_capitan'
    depends_on macos: ">= :el_capitan"

    suite = "#{appdir}/StarCraft II"
    artifact name.first, target: "#{suite}/Maps/#{name.first}"
    artifact 'Mods/SCMRassets.SC2Mod', target: "#{suite}/Mods/SCMRassets.SC2Mod"
    artifact 'Mods/SCMRlocal.SC2Mod', target: "#{suite}/Mods/SCMRlocal.SC2Mod"
    artifact 'Mods/SCMRcinematics.SC2Mod', target: "#{suite}/Mods/SCMRcinematics.SC2Mod"
    artifact 'Mods/SCMRmod.SC2Mod', target: "#{suite}/Mods/SCMRmod.SC2Mod"
    artifact "Mods/SCMRassets.SC2Mod", target: "#{suite}/Mods/SCMRassets.SC2Mod"
    artifact "Mods/SCMRlocal.SC2Mod", target: "#{suite}/Mods/SCMRlocal.SC2Mod"
    artifact "Mods/SCMRcinematics.SC2Mod", target: "#{suite}/Mods/SCMRcinematics.SC2Mod"
    artifact "Mods/SCMRmod.SC2Mod", target: "#{suite}/Mods/SCMRmod.SC2Mod"

    preflight do
    resources = [
    "https://edge.forgecdn.net/files/2857/290/SCMRassets_v#{version.major_minor}.zip",
    '5690c24797e1d8778654950272bf641a',
    "5690c24797e1d8778654950272bf641a",
    *language.map { |path, checksum| ["https://edge.forgecdn.net/files/#{path}.zip", checksum] }.flatten,
    "https://edge.forgecdn.net/files/2857/320/SCMREnslaversRedux_v#{version.major_minor}.zip",
    'ed9761c20c581fa6d9412ffe86fb460d',
    "ed9761c20c581fa6d9412ffe86fb460d",
    ]

    Dir.chdir(staged_path) do
    @@ -67,15 +68,15 @@

    UnpackStrategy::Zip.new(zip).extract to: Dir.pwd
    end
    FileUtils.mv 'Extras/8. Enslavers Redux', "#{@cask.name.first}/Extras/8. Enslavers Redux"
    FileUtils.mv "Extras/8. Enslavers Redux", "#{@cask.name.first}/Extras/8. Enslavers Redux"
    FileUtils.ln_s "#{suite}/Support/SC2Switcher.app", "#{suite}/#{@cask.name.first}.app"
    FileUtils.rm Dir['*.zip']
    FileUtils.rm Dir["*.zip"]
    end
    end

    uninstall delete: "#{suite}/#{name.first}.app", rmdir: "#{suite}/M{od,ap}s"

    application_support = '~/Library/Application Support/Blizzard/StarCraft II'
    application_support = "~/Library/Application Support/Blizzard/StarCraft II"
    banks = "#{application_support}/Banks"
    zap trash: [
    "#{banks}/SCMR.SC2Bank",
  8. danielbayley revised this gist Jul 5, 2020. 1 changed file with 70 additions and 21 deletions.
    91 changes: 70 additions & 21 deletions starcraft-mass-recall.rb
    Original file line number Diff line number Diff line change
    @@ -1,36 +1,85 @@
    cask 'starcraft-mass-recall' do
    version '7.1'
    sha256 '598144fe86e3aa5fb8099ae9c60445a52155fa416eca5e7eba7ec1ecfad32983'
    version '7.3.1'
    sha256 '473a086aa3eccc1e86e300ef1f4ebc8381fb4090e7fa2e2da1945d9299279eff'

    language 'en', default: true do
    [
    ["2857/297/SCMRlocal_v#{version.major_minor}", '17c3dcf94fd69c1482a454626448a023'],
    ["2819/339/SCMRcinematics_v#{version.major}.2", 'f19ea12979eb8eaf703ed00ef33b7912'],
    ]
    end

    language 'de' do
    [
    ["2748/113/SCMRlocal_v#{version.major}.1_DE", 'c18f1bef103d861d4fe93219ec736850'],
    ["2748/960/SCMRcinematics_v#{version.major}.1_DE", 'ec1286ba8c03701663b7f5fbac3ad7d5'],
    ]
    end

    language 'ru' do
    ["2866/453/SCMRlocal+v#{version.major_minor}+(Russian)", 'b8efce71c59badad2fa0d336dce1d11b']
    end

    language 'ko' do
    ["2815/486/SCMRlocal_v#{version.major}.1_KR", '92f0c8b1dfc91701139b139839b5a07b']
    end

    language 'pl' do
    [
    "2882/341/SCMRlocal_#{version.major_minor.dots_to_underscores}_PL_v_1",
    'aa11225e6ed00a5012393ba22d7bf3d0',
    ]
    end

    # media.forgecdn.net was verified as official when first introduced to the cask
    url "https://media.forgecdn.net/files/2734/228/SCMR_v#{version}.zip"
    name 'StarCraft: Mass Recall'
    homepage 'https://sc2mapster.com/projects/starcraft-mass-recall'
    url "https://media.forgecdn.net/files/2931/253/SCMR_v#{version}.zip"
    appcast "https://raw.githubusercontent.com/abrahamYG/sc2-campaign-sources/master/sources/#{token}.json",
    must_contain: "v#{version.major_minor}"
    name 'StarCraft Mass Recall'
    homepage "https://sc2mapster.com/projects/#{token}"

    depends_on macos: '>= :el_capitan'

    artifact 'Mods/SCMRassets.SC2Mod', target: "#{appdir}/StarCraft II/Mods/SCMRassets.SC2Mod"
    artifact 'Mods/SCMRcinematics.SC2Mod', target: "#{appdir}/StarCraft II/Mods/SCMRcinematics.SC2Mod"
    artifact 'Mods/SCMRlocal.SC2Mod', target: "#{appdir}/StarCraft II/Mods/SCMRlocal.SC2Mod"
    artifact 'Mods/SCMRmod.SC2Mod', target: "#{appdir}/StarCraft II/Mods/SCMRmod.SC2Mod"
    artifact 'Starcraft Mass Recall', target: "#{appdir}/StarCraft II/Maps/Starcraft Mass Recall"
    suite = "#{appdir}/StarCraft II"
    artifact name.first, target: "#{suite}/Maps/#{name.first}"
    artifact 'Mods/SCMRassets.SC2Mod', target: "#{suite}/Mods/SCMRassets.SC2Mod"
    artifact 'Mods/SCMRlocal.SC2Mod', target: "#{suite}/Mods/SCMRlocal.SC2Mod"
    artifact 'Mods/SCMRcinematics.SC2Mod', target: "#{suite}/Mods/SCMRcinematics.SC2Mod"
    artifact 'Mods/SCMRmod.SC2Mod', target: "#{suite}/Mods/SCMRmod.SC2Mod"

    preflight do
    url = "https://media.forgecdn.net/files/2734/872/SCMR_v#{version}_Mods.zip"
    `/usr/bin/curl -L --progress-bar #{url} | /usr/bin/tar -xC #{staged_path}`
    resources = [
    "https://edge.forgecdn.net/files/2857/290/SCMRassets_v#{version.major_minor}.zip",
    '5690c24797e1d8778654950272bf641a',
    *language.map { |path, checksum| ["https://edge.forgecdn.net/files/#{path}.zip", checksum] }.flatten,
    "https://edge.forgecdn.net/files/2857/320/SCMREnslaversRedux_v#{version.major_minor}.zip",
    'ed9761c20c581fa6d9412ffe86fb460d',
    ]

    Dir.chdir(staged_path) do
    Hash[*resources].each do |url, checksum|
    zip = File.basename CGI.unescape URI.parse(url.to_s).path

    curl_download url.to_s, to: zip unless File.exist? zip

    actual = Digest::MD5.file zip
    raise CaskSha256MismatchError.new token, checksum, actual, zip if actual != checksum

    url = "https://media.forgecdn.net/files/2730/622/SCMRcinematics_v#{version}.zip"
    `/usr/bin/curl -L --progress-bar #{url} | /usr/bin/tar -xC #{staged_path}`
    UnpackStrategy::Zip.new(zip).extract to: Dir.pwd
    end
    FileUtils.mv 'Extras/8. Enslavers Redux', "#{@cask.name.first}/Extras/8. Enslavers Redux"
    FileUtils.ln_s "#{suite}/Support/SC2Switcher.app", "#{suite}/#{@cask.name.first}.app"
    FileUtils.rm Dir['*.zip']
    end
    end

    uninstall rmdir: [
    "#{appdir}/StarCraft II/Mods",
    "#{appdir}/StarCraft II/Maps",
    ]
    uninstall delete: "#{suite}/#{name.first}.app", rmdir: "#{suite}/M{od,ap}s"

    application_support = '~/Library/Application Support/Blizzard/StarCraft II'
    banks = "#{application_support}/Banks"
    zap trash: [
    '~/Library/Application Support/Blizzard/StarCraft II/Banks/SCMR.SC2Bank',
    '~/Library/Application Support/Blizzard/StarCraft II/*/Multiplayer/Starcraft Mass Recall*.SC2*',
    "#{banks}/SCMR.SC2Bank",
    "#{application_support}/*/Multiplayer/#{name.first}*.SC2*",
    ],
    rmdir: '~/Library/Application Support/Blizzard/StarCraft II/Banks'
    rmdir: banks
    end
  9. danielbayley revised this gist Jul 4, 2019. 1 changed file with 7 additions and 6 deletions.
    13 changes: 7 additions & 6 deletions starcraft-mass-recall.rb
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,9 @@
    cask 'starcraft-mass-recall' do
    version '7.0'
    sha256 'b75c9cd040365c645ab69812a4dcf9f2861da206b495c4809c2b7db6e4e20545'
    version '7.1'
    sha256 '598144fe86e3aa5fb8099ae9c60445a52155fa416eca5e7eba7ec1ecfad32983'

    # media.forgecdn.net was verified as official when first introduced to the cask
    url "https://media.forgecdn.net/files/2654/551/SCMR_v#{version}.zip"
    appcast 'https://sc2mapster.com/projects/starcraft-mass-recall/files'
    url "https://media.forgecdn.net/files/2734/228/SCMR_v#{version}.zip"
    name 'StarCraft: Mass Recall'
    homepage 'https://sc2mapster.com/projects/starcraft-mass-recall'

    @@ -17,8 +16,10 @@
    artifact 'Starcraft Mass Recall', target: "#{appdir}/StarCraft II/Maps/Starcraft Mass Recall"

    preflight do
    # dropbox.com/s/m3bwn32gs2jrtdp was verified as official when first introduced to the cask
    url = 'https://dropbox.com/s/m3bwn32gs2jrtdp/SCMRcinematics.SC2Mod?dl=1'
    url = "https://media.forgecdn.net/files/2734/872/SCMR_v#{version}_Mods.zip"
    `/usr/bin/curl -L --progress-bar #{url} | /usr/bin/tar -xC #{staged_path}`

    url = "https://media.forgecdn.net/files/2730/622/SCMRcinematics_v#{version}.zip"
    `/usr/bin/curl -L --progress-bar #{url} | /usr/bin/tar -xC #{staged_path}`
    end

  10. danielbayley revised this gist Jan 11, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions starcraft-mass-recall.rb
    Original file line number Diff line number Diff line change
    @@ -17,6 +17,7 @@
    artifact 'Starcraft Mass Recall', target: "#{appdir}/StarCraft II/Maps/Starcraft Mass Recall"

    preflight do
    # dropbox.com/s/m3bwn32gs2jrtdp was verified as official when first introduced to the cask
    url = 'https://dropbox.com/s/m3bwn32gs2jrtdp/SCMRcinematics.SC2Mod?dl=1'
    `/usr/bin/curl -L --progress-bar #{url} | /usr/bin/tar -xC #{staged_path}`
    end
  11. danielbayley revised this gist Jan 11, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion starcraft-mass-recall.rb
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@
    artifact 'Starcraft Mass Recall', target: "#{appdir}/StarCraft II/Maps/Starcraft Mass Recall"

    preflight do
    url = "https://dropbox.com/s/0j5ysa75p89bg4u/SCMRcinematics_v#{version}.zip?dl=1"
    url = 'https://dropbox.com/s/m3bwn32gs2jrtdp/SCMRcinematics.SC2Mod?dl=1'
    `/usr/bin/curl -L --progress-bar #{url} | /usr/bin/tar -xC #{staged_path}`
    end

  12. danielbayley revised this gist Jan 7, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions starcraft-mass-recall.rb
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,7 @@

    # media.forgecdn.net was verified as official when first introduced to the cask
    url "https://media.forgecdn.net/files/2654/551/SCMR_v#{version}.zip"
    appcast 'https://sc2mapster.com/projects/starcraft-mass-recall/files'
    name 'StarCraft: Mass Recall'
    homepage 'https://sc2mapster.com/projects/starcraft-mass-recall'

  13. danielbayley created this gist Jan 7, 2019.
    33 changes: 33 additions & 0 deletions starcraft-mass-recall.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    cask 'starcraft-mass-recall' do
    version '7.0'
    sha256 'b75c9cd040365c645ab69812a4dcf9f2861da206b495c4809c2b7db6e4e20545'

    # media.forgecdn.net was verified as official when first introduced to the cask
    url "https://media.forgecdn.net/files/2654/551/SCMR_v#{version}.zip"
    name 'StarCraft: Mass Recall'
    homepage 'https://sc2mapster.com/projects/starcraft-mass-recall'

    depends_on macos: '>= :el_capitan'

    artifact 'Mods/SCMRassets.SC2Mod', target: "#{appdir}/StarCraft II/Mods/SCMRassets.SC2Mod"
    artifact 'Mods/SCMRcinematics.SC2Mod', target: "#{appdir}/StarCraft II/Mods/SCMRcinematics.SC2Mod"
    artifact 'Mods/SCMRlocal.SC2Mod', target: "#{appdir}/StarCraft II/Mods/SCMRlocal.SC2Mod"
    artifact 'Mods/SCMRmod.SC2Mod', target: "#{appdir}/StarCraft II/Mods/SCMRmod.SC2Mod"
    artifact 'Starcraft Mass Recall', target: "#{appdir}/StarCraft II/Maps/Starcraft Mass Recall"

    preflight do
    url = "https://dropbox.com/s/0j5ysa75p89bg4u/SCMRcinematics_v#{version}.zip?dl=1"
    `/usr/bin/curl -L --progress-bar #{url} | /usr/bin/tar -xC #{staged_path}`
    end

    uninstall rmdir: [
    "#{appdir}/StarCraft II/Mods",
    "#{appdir}/StarCraft II/Maps",
    ]

    zap trash: [
    '~/Library/Application Support/Blizzard/StarCraft II/Banks/SCMR.SC2Bank',
    '~/Library/Application Support/Blizzard/StarCraft II/*/Multiplayer/Starcraft Mass Recall*.SC2*',
    ],
    rmdir: '~/Library/Application Support/Blizzard/StarCraft II/Banks'
    end