Created
January 9, 2019 14:40
-
-
Save DianthuDia/ad77792813e10d665c819fee951e916b to your computer and use it in GitHub Desktop.
CocosCreator v2.0.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cask 'cocoscreator' do | |
version '2.0.1,20180823' | |
sha256 '1738ace990ff863f0cc757e949b27c513625d71827c0c6ecda1a97b0e12b0e47' | |
# download.cocos.com was verified as official when first introduced to the cask | |
url "https://digitalocean.cocos2d-x.org/CocosCreator/v#{version.before_comma}/CocosCreator_v#{version.before_comma}_#{version.after_comma}.dmg" | |
name 'CocosCreator' | |
homepage 'http://www.cocos2d-x.org/' | |
# shim script (https://github.com/Homebrew/homebrew-cask/issues/18809) | |
shimscript = "#{staged_path}/cocos.wrapper.sh" | |
app 'CocosCreator.app' | |
binary shimscript, target: 'cocos' | |
preflight do | |
IO.write shimscript, <<~EOS | |
#!/bin/sh | |
cd '#{appdir}/CocosCreator.app/Contents/Resources/cocos2d-x/tools/cocos2d-console/bin' && ./cocos "$@" | |
EOS | |
end | |
zap trash: [ | |
'~/Library/Application Support/CocosCreator', | |
'~/Library/Preferences/com.cocos.creator.plist', | |
'~/Library/Preferences/com.cocos.apps.simulator.plist', | |
] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment