mirror of
https://github.com/binaryage/totalterminal.git
synced 2026-01-10 06:48:05 -05:00
blind rakefile adaptation from TotalFinder
This commit is contained in:
11
.gitignore
vendored
11
.gitignore
vendored
@@ -1,7 +1,3 @@
|
||||
src/build/*
|
||||
src/Visor.xcodeproj/*.mode1v3
|
||||
src/Visor.xcodeproj/*.pbxuser
|
||||
src/Visor.xcodeproj/*.tm_build_errors
|
||||
.DS_Store
|
||||
*.log
|
||||
releases
|
||||
@@ -9,4 +5,9 @@ tmp
|
||||
Thumbs.db*
|
||||
_site
|
||||
_layouts
|
||||
shared
|
||||
shared
|
||||
bin/*
|
||||
release/*
|
||||
*.orig
|
||||
*.rej
|
||||
xcuserdata
|
||||
439
rakefile
439
rakefile
@@ -1,26 +1,34 @@
|
||||
require 'rake'
|
||||
|
||||
ROOT_DIR = File.expand_path('.')
|
||||
SRC_DIR = File.join(ROOT_DIR, 'src')
|
||||
TMP_DIR = File.join(ROOT_DIR, 'tmp')
|
||||
XCODE_PROJECT = File.join(SRC_DIR, 'Visor.xcodeproj')
|
||||
VISOR_BUNDLE = "Visor.bundle"
|
||||
BUILD_DIR = File.join(SRC_DIR, 'build')
|
||||
BUILD_RELEASE_DIR = File.join(TMP_DIR, 'build', 'Release')
|
||||
BUILD_RELEASE_PATH = File.join(BUILD_RELEASE_DIR, VISOR_BUNDLE)
|
||||
RELEASE_DIR = File.join(ROOT_DIR, 'releases')
|
||||
VISOR_XIB = File.join(TMP_DIR, 'Visor.xib')
|
||||
INFO_PLIST = File.join(TMP_DIR, 'Info.plist')
|
||||
VISOR_M = File.join(TMP_DIR, 'Visor.m')
|
||||
SIMBL_DIR = File.expand_path(File.join('~', 'Library', 'Application Support', 'SIMBL'))
|
||||
SIMBL_PLUGINS_DIR = File.expand_path(File.join(SIMBL_DIR, 'Plugins'))
|
||||
TMP_ROOT = '/tmp'
|
||||
TMP_DIR = File.join(TMP_ROOT, 'totalterminal')
|
||||
BUILD_DIR = File.join(ROOT_DIR, 'build')
|
||||
RELEASE_DIR = File.join(ROOT_DIR, 'release')
|
||||
INSTALLER_DIR = File.join(ROOT_DIR, 'installer')
|
||||
PAYLOADS_DIR = File.join(ROOT_DIR, 'payloads')
|
||||
|
||||
# http://kpumuk.info/ruby-on-rails/colorizing-console-ruby-script-output/
|
||||
begin
|
||||
require 'Win32/Console/ANSI' if RUBY_PLATFORM =~ /win32/
|
||||
rescue LoadError
|
||||
raise 'You must "gem install win32console" to use terminal colors on Windows'
|
||||
end
|
||||
PARENT_DIR = File.expand_path('..')
|
||||
|
||||
PLUGIN_BUNDLE = "TotalTerminal.bundle"
|
||||
XCODE_WORKSPACE = File.join(ROOT_DIR, 'TotalTerminal.xcworkspace')
|
||||
|
||||
SPARKLE_DIR = File.join(ROOT_DIR, 'sparkle')
|
||||
OSAX_DIR = File.join(PARENT_DIR, 'totalterminal-osax')
|
||||
I18N_DIR = File.join(PARENT_DIR, 'totalterminal-i18n')
|
||||
|
||||
TMP_GIT_MODULES = File.join(TMP_DIR, '.gitmodules')
|
||||
TMP_TOTALTERMINAL_RESOURCES = File.join(TMP_DIR, 'totalterminal-i18n', 'plugin')
|
||||
TMP_TOTALTERMINAL_DIR = File.join(TMP_DIR, 'totalterminal-plugin')
|
||||
TMP_BIN_DIR = File.join(TMP_DIR, 'bin')
|
||||
TMP_BIN_TOTALTERMINAL_FRAMEWORKS = File.join(TMP_BIN_DIR, 'TotalTerminal.app/Contents/Resources/TotalTerminal.bundle/Contents/Frameworks')
|
||||
|
||||
PLUGIN_INFO_PLIST = File.join(TMP_DIR, 'totalterminal-plugin', 'plugin', 'Info.plist')
|
||||
PLUGIN_TOTALTERMINAL_H = File.join(TMP_DIR, 'totalterminal-plugin', 'plugin', 'TotalTerminal.h')
|
||||
OSAX_INFO_PLIST = File.join(TMP_DIR, 'totalterminal-osax', 'Info.plist')
|
||||
|
||||
PUBLISH_PREFIX_URL = "http://downloads.binaryage.com"
|
||||
CHANGELOG_PREFIX_URL = "http://totalterminal.binaryage.com"
|
||||
|
||||
############################################################################################
|
||||
|
||||
def colorize(text, color_code)
|
||||
"#{color_code}#{text}\e[0m"
|
||||
@@ -39,13 +47,15 @@ def file_color(text); yellow(text); end
|
||||
def dir_color(text); blue(text); end
|
||||
def cmd_color(text); azure(text); end
|
||||
|
||||
############################################################################################
|
||||
|
||||
def die(msg, status=1)
|
||||
puts red("Error[#{status||$?}]: #{msg}")
|
||||
exit status||$?
|
||||
end
|
||||
|
||||
def version()
|
||||
$version = ENV["version"] || 'Custom'
|
||||
$version = ENV["version"] or die("specify version")
|
||||
end
|
||||
|
||||
def revision()
|
||||
@@ -70,63 +80,235 @@ def patch(path, replacers)
|
||||
end
|
||||
end
|
||||
File.open(path, "w") do |f|
|
||||
f << lines.join
|
||||
f << lines.join
|
||||
end
|
||||
end
|
||||
|
||||
def announce(cmd)
|
||||
puts "> " + yellow(cmd)
|
||||
end
|
||||
|
||||
def sys(cmd)
|
||||
puts "> " + yellow(cmd)
|
||||
system(cmd)
|
||||
announce(cmd)
|
||||
system(cmd)
|
||||
end
|
||||
|
||||
############################################################################################
|
||||
|
||||
def generate_payload_for_pkg(tmp, pkg)
|
||||
tree = ""
|
||||
exes = ""
|
||||
|
||||
tmp2 = File.join(tmp, File.basename(pkg))
|
||||
sys("rm -rf \"#{tmp2}\"") if File.exist? tmp2
|
||||
sys("mkdir -p \"#{tmp2}\"")
|
||||
sys("cp \"#{pkg}\" \"#{tmp2}\"")
|
||||
|
||||
name = File.basename pkg
|
||||
|
||||
Dir.chdir(tmp2) do
|
||||
sys("xar -xf \"#{name}\"")
|
||||
|
||||
if (File.exist? "Payload") then
|
||||
sys("mv Payload Payload.gz")
|
||||
sys("gunzip Payload.gz")
|
||||
sys("cpio -id < Payload")
|
||||
end
|
||||
|
||||
`rm \"#{name}\"`
|
||||
tree = `tree --dirsfirst -apsugif`
|
||||
exes = ""
|
||||
Dir.glob("**/Contents/MacOS/*") do |exe|
|
||||
exes += `file "#{exe}"` + "\n"
|
||||
end
|
||||
end
|
||||
|
||||
res = ""
|
||||
res << "\n"
|
||||
res << "#{name}\n"
|
||||
res << "=======================================================================\n"
|
||||
res << tree
|
||||
res << "\n"
|
||||
res << exes
|
||||
res
|
||||
end
|
||||
|
||||
def generate_payload(dmg, out)
|
||||
puts green("Generating payload for: ") + blue(dmg)
|
||||
|
||||
volume = "/Volumes/TotalTerminal"
|
||||
tmp = File.join(TMP_DIR, "payloads", File.basename(dmg, ".dmg"))
|
||||
sys("rm -rf \"#{tmp}\"") if File.exist? tmp
|
||||
sys("mkdir -p \"#{tmp}\"")
|
||||
|
||||
puts dmg
|
||||
cmd = "hdiutil attach \"#{dmg}\" | grep Apple_partition_scheme"
|
||||
announce(cmd)
|
||||
res = `#{cmd}`
|
||||
puts res
|
||||
disk = res.split("\n")[0].split("\t")[0]
|
||||
|
||||
die("bad disk") unless disk =~ /\/dev/
|
||||
|
||||
sys("cp -r #{volume}/* \"#{tmp}\"")
|
||||
|
||||
tree1 = ""
|
||||
Dir.chdir(tmp) do
|
||||
tree1 = `tree --dirsfirst -apsugif`
|
||||
end
|
||||
|
||||
pkgs = []
|
||||
Dir.glob(File.join(tmp, "**/*.pkg")) do |pkg|
|
||||
pkgs << generate_payload_for_pkg(tmp, pkg)
|
||||
end
|
||||
|
||||
|
||||
outdir = File.dirname out
|
||||
`mkdir -p #{outdir}` unless File.exist? outdir
|
||||
File.open(out, "w") do |f|
|
||||
f << "BASIC DMG LAYOUT\n"
|
||||
f << "================\n"
|
||||
f << tree1
|
||||
|
||||
pkgs.each do |pkg|
|
||||
f << pkg
|
||||
end
|
||||
end
|
||||
|
||||
puts green(" -> ") + blue(out)
|
||||
|
||||
sys("hdiutil detach #{disk}")
|
||||
end
|
||||
|
||||
def retag_submodule(tags, submodule)
|
||||
tags.each do |tag|
|
||||
x = `git ls-tree #{tag} #{submodule}`
|
||||
sha = x.split(" ")[2]
|
||||
Dir.chdir(submodule) do
|
||||
sha = `git log --reverse`.split("\n")[0].split(" ")[1] unless sha # take first commit in case submodule wasn't defined at this point
|
||||
sys("git tag -d #{tag}")
|
||||
puts "#{tag} #{sha}"
|
||||
sys("git tag #{tag} #{sha}")
|
||||
end
|
||||
end
|
||||
Dir.chdir(submodule) do
|
||||
sys("git push --tags")
|
||||
end
|
||||
end
|
||||
|
||||
def release_version_from_filename(n) # /Users/darwin/code/totalterminal/payloads/TotalTerminal-0.7.1.txt
|
||||
p = File.basename(n, ".txt").split("-")[1]
|
||||
n = p.split(".")
|
||||
while n.size < 3 do
|
||||
n << "0"
|
||||
end
|
||||
x = (n[0]||"0").to_i
|
||||
y = (n[1]||"0").to_i
|
||||
z = (n[2]||"0").to_i
|
||||
x*1000000 + y*1000 + z
|
||||
end
|
||||
|
||||
###################################################################################################################
|
||||
|
||||
desc "opens XCode project"
|
||||
task :open do
|
||||
`open "#{XCODE_PROJECT}"`
|
||||
`open "#{XCODE_WORKSPACE}"`
|
||||
end
|
||||
|
||||
desc "builds project"
|
||||
task :build do
|
||||
puts "#{cmd_color('Building')} #{file_color(XCODE_PROJECT)}"
|
||||
Dir.chdir(SRC_DIR) do
|
||||
`rm -rf "build"`
|
||||
`xcodebuild -configuration Release 1>&2`
|
||||
die("build failed") unless $?==0
|
||||
end
|
||||
desc "prepare stage"
|
||||
task :stage do
|
||||
puts "#{cmd_color('Cloning sources to stage ...')}"
|
||||
`sudo rm -rf "#{TMP_DIR}"`
|
||||
`mkdir -p "#{TMP_ROOT}"`
|
||||
Dir.chdir(TMP_ROOT) do
|
||||
`git clone #{ROOT_DIR}`
|
||||
end
|
||||
|
||||
puts "#{cmd_color('Initializing submodules ...')}"
|
||||
Dir.chdir(TMP_DIR) do
|
||||
`git reset --hard HEAD`
|
||||
patch(TMP_GIT_MODULES, [['git@github.com:darwin', ROOT_DIR], ['git@github.com:binaryage', ROOT_DIR], ['.git', '']])
|
||||
`git submodule update --init`
|
||||
end
|
||||
end
|
||||
|
||||
desc "prepares release build"
|
||||
task :release do
|
||||
puts "#{cmd_color('Checking environment ...')}"
|
||||
dirty_repo_warning()
|
||||
version()
|
||||
revision()
|
||||
mkdir_p(RELEASE_DIR) unless File.exists? RELEASE_DIR
|
||||
|
||||
puts "#{cmd_color('Copying sources to temporary directory ...')}"
|
||||
`rm -rf "#{TMP_DIR}"`
|
||||
`cp -r "#{SRC_DIR}" "#{TMP_DIR}"`
|
||||
|
||||
puts "#{cmd_color('Patching version info ...')}"
|
||||
patch(VISOR_XIB, [['##VERSION##', $version], ['##REVISION##', $short_revision]])
|
||||
patch(INFO_PLIST, [['##VERSION##', $version]])
|
||||
patch(VISOR_M, [['##VERSION##', $version], ['##REVISION##', $short_revision], ['##SHA##', $revision]])
|
||||
unless File.exists?(TMP_DIR) then die('Doing it for first time? => rake stage') end
|
||||
|
||||
puts "#{cmd_color('Checking environment ...')}"
|
||||
dirty_repo_warning()
|
||||
version()
|
||||
revision()
|
||||
mkdir_p(RELEASE_DIR) unless File.exists? RELEASE_DIR
|
||||
|
||||
puts "#{cmd_color('Building')} #{file_color(TMP_DIR)}"
|
||||
Dir.chdir(TMP_DIR) do
|
||||
`rm -rf "build"` # this might cause troubles when doing releases from dev machine
|
||||
`xcodebuild -configuration Release 1>&2`
|
||||
die("build failed") unless $?==0
|
||||
end
|
||||
unless ENV["fast"] then
|
||||
puts "#{cmd_color('Updating stage ...')}"
|
||||
Dir.chdir(TMP_DIR) do
|
||||
sys('git clean -fd')
|
||||
sys('git fetch')
|
||||
sys('git reset --hard origin/master')
|
||||
patch(TMP_GIT_MODULES, [['git@github.com:darwin', ROOT_DIR], ['git@github.com:binaryage', ROOT_DIR], ['.git', '']])
|
||||
#
|
||||
sys('git submodule sync')
|
||||
sys('git submodule foreach "git reset --hard origin/master"')
|
||||
sys('git submodule update')
|
||||
end
|
||||
|
||||
result = File.join(RELEASE_DIR, "Visor-#{$version}-#{$short_revision}.zip");
|
||||
puts "#{cmd_color('Zipping')} #{dir_color(result)}"
|
||||
Dir.chdir(BUILD_RELEASE_DIR) do
|
||||
unless system("zip -r \"#{result}\" Visor.bundle") then puts red('need zip on command line (download http://www.info-zip.org/Zip.html)') end;
|
||||
puts "#{cmd_color('Patching version info ...')}"
|
||||
# patch(PLUGIN_TOTALTERMINAL_XIB, [['##VERSION##', $version], ['##REVISION##', $short_revision]])
|
||||
patch(PLUGIN_INFO_PLIST, [['##VERSION##', $version], ['##REVISION##', $short_revision]])
|
||||
# patch(PLUGIN_TOTALTERMINAL_H, [['##VERSION##', $version], ['##REVISION##', $short_revision], ['##SHA##', $revision]])
|
||||
patch(OSAX_INFO_PLIST, [['##VERSION##', $version], ['##REVISION##', $short_revision]])
|
||||
|
||||
sys("rm -rf \"#{TMP_BIN_DIR}\"") unless ENV["noclean"]
|
||||
sys("rm -rf ~/Library/Developer/Xcode/DerivedData/TotalTerminal-*") unless ENV["noclean"]
|
||||
|
||||
puts "#{cmd_color('Building')} #{file_color(TMP_TOTALTERMINAL_DIR)}"
|
||||
Dir.chdir(TMP_DIR) do
|
||||
sys('xcodebuild -workspace TotalTerminal.xcworkspace -scheme "TotalTerminal Package" -configuration Release')
|
||||
die("build failed") unless $?==0
|
||||
end
|
||||
|
||||
Dir.glob(File.join(TMP_BIN_TOTALTERMINAL_FRAMEWORKS, "*")) do |framework|
|
||||
patch(File.join(framework, 'Resources', 'Info.plist'), [['##VERSION##', $version], ['##REVISION##', $short_revision]])
|
||||
end
|
||||
end
|
||||
Rake::Task["clean"].execute nil
|
||||
puts "Tip: Execute '#{blue("rake install")}' to install this latest version (into your SIMBL Plugins directory)."
|
||||
|
||||
releasedmg = File.join(RELEASE_DIR, "TotalTerminal-#{$version}.dmg")
|
||||
sys("rm -rf \"#{releasedmg}\"") if File.exist? releasedmg
|
||||
die("build failed") unless $?==0
|
||||
|
||||
Dir.chdir(File.join(TMP_DIR, "totalterminal-installer")) do
|
||||
sys("rake build version=#{$version} products=\"../bin\" release=\"#{RELEASE_DIR}\"")
|
||||
die("installer build failed") unless $?==0
|
||||
end
|
||||
|
||||
size = File.size(releasedmg)
|
||||
sig = `ruby "sparkle/sign_update.rb" "#{releasedmg}" keys/dsa_priv.pem`.strip
|
||||
die("build failed") unless $?==0
|
||||
|
||||
snippet = "\
|
||||
<item>
|
||||
<title>Version #{$version}</title>
|
||||
<sparkle:releaseNotesLink>#{CHANGELOG_PREFIX_URL}/changelog-beta.html</sparkle:releaseNotesLink>
|
||||
<pubDate>#{Time.new}</pubDate>
|
||||
<enclosure url=\"#{PUBLISH_PREFIX_URL}/TotalTerminal-#{$version}.dmg\" sparkle:version=\"#{$version}\" length=\"#{size}\" type=\"application/octet-stream\" sparkle:dsaSignature=\"#{sig}\"/>
|
||||
<sparkle:minimumSystemVersion>10.6.0</sparkle:minimumSystemVersion>
|
||||
</item>"
|
||||
|
||||
puts snippet
|
||||
puts
|
||||
puts red("Don't forget: ")+green("git tag -a v#{$version} -m \"Release #{$version}\"")
|
||||
puts blue("#{PUBLISH_PREFIX_URL}/TotalTerminal-#{$version}.dmg")
|
||||
|
||||
sys("mkdir -p tfdata")
|
||||
sys("mount -t smbfs //guest:@whale/Store/ttdata ttdata")
|
||||
sys("rsync -av --delete release ttdata")
|
||||
sys("umount ttdata")
|
||||
sys("rm -rf ttdata")
|
||||
end
|
||||
|
||||
|
||||
desc "removes intermediate build files"
|
||||
task :clean do
|
||||
puts "#{cmd_color('Removing')} #{dir_color(TMP_DIR)}"
|
||||
@@ -139,39 +321,114 @@ task :purge do
|
||||
`rm -rf "#{RELEASE_DIR}"`
|
||||
end
|
||||
|
||||
desc "installs latest release build into ~/Library/Application Support/SIMBL/Plugins"
|
||||
task :install do
|
||||
die("first build release> rake release") unless File.exists? RELEASE_DIR
|
||||
zip = ""
|
||||
Dir.chdir(RELEASE_DIR) do
|
||||
files = `ls -1at *.zip`
|
||||
die("unable to locate any zip file in #{RELEASE_DIR}") unless $?==0
|
||||
zip = files.split("\n")[0].strip
|
||||
die("unable to locate any zip file in #{RELEASE_DIR}") if (zip=="")
|
||||
puts "#{cmd_color('Picked (latest)')} #{file_color(zip)}"
|
||||
sys("rm -rf \"#{VISOR_BUNDLE}\"") if File.exists? VISOR_BUNDLE # for sure
|
||||
puts "#{cmd_color('Unzipping into')} #{dir_color(SIMBL_PLUGINS_DIR)}"
|
||||
Dir.mkdir "#{SIMBL_DIR}" unless File.exists?(SIMBL_DIR)
|
||||
Dir.mkdir "#{SIMBL_PLUGINS_DIR}" unless File.exists?(SIMBL_PLUGINS_DIR)
|
||||
die("problem in unzipping") unless system("unzip \"#{zip}\"")
|
||||
dest = File.join(SIMBL_PLUGINS_DIR, VISOR_BUNDLE)
|
||||
sys("rm -rf \"#{dest}\"") if File.exists? dest
|
||||
die("problem in moving to SIMBL plugins. Do you have SIMBL installed? Do you have rights?") unless sys("mv \"#{VISOR_BUNDLE}\" \"#{SIMBL_PLUGINS_DIR}\"")
|
||||
puts blue("Done!")+" "+red("Restart Terminal.app")
|
||||
end
|
||||
desc "beautify sources using uncrustify => see uncrustify.cfg"
|
||||
task :beautify do
|
||||
config = File.join(ROOT_DIR, 'uncrustify.cfg')
|
||||
what = ENV["filter"] || "*"
|
||||
base = File.join(ROOT_DIR, "src")
|
||||
Dir.glob(File.join(base, "**/#{what}")) do |file|
|
||||
next unless file=~/\.(mm|m|c|h|cc|cpp|hpp)$/
|
||||
puts file[base.size+1..-1]
|
||||
`uncrustify -c "#{config}" --replace --no-backup --mtime "#{file}"`
|
||||
end
|
||||
# base = File.join(ROOT_DIR, "CrashWatcher")
|
||||
# Dir.glob(File.join(base, "**/#{what}")) do |file|
|
||||
# next unless file=~/\.(mm|m|c|h|cc|cpp|hpp)$/
|
||||
# puts file[base.size+1..-1]
|
||||
# `uncrustify -c "#{config}" --replace --no-backup --mtime "#{file}"`
|
||||
# end
|
||||
end
|
||||
|
||||
desc "uninstalls visor, you need to restart Terminal.app"
|
||||
task :uninstall do
|
||||
dest = File.join(SIMBL_PLUGINS_DIR, VISOR_BUNDLE)
|
||||
sys("rm -rf \"#{dest}\"") if File.exists? dest
|
||||
puts blue("Done!")+" "+red("Restart Terminal.app")
|
||||
desc "build missing payloads"
|
||||
task :payload do
|
||||
Dir.chdir(RELEASE_DIR) do
|
||||
Dir.glob("*.dmg").each do |file|
|
||||
name = File.basename(file, ".dmg")
|
||||
dest = File.join(PAYLOADS_DIR, name+".txt")
|
||||
unless File.exist? dest then
|
||||
generate_payload(file, dest)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "dumps system Terminal.app into dumps/Current/"
|
||||
task :dump do
|
||||
`rm -rf dumps/Current`
|
||||
`class-dump -I -H -o dumps/Current "/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal"`
|
||||
desc "diff two most recent payloads"
|
||||
task :paydiff do
|
||||
res = `ls -1 "#{PAYLOADS_DIR}"/*.txt`
|
||||
res = res.split("\n")
|
||||
|
||||
res = res.sort do |a, b|
|
||||
va = release_version_from_filename a
|
||||
vb = release_version_from_filename b
|
||||
vb<=>va
|
||||
end
|
||||
|
||||
a = res[1]
|
||||
b = res[0]
|
||||
`ksdiff "#{a}" "#{b}"`
|
||||
end
|
||||
|
||||
task :default => :release
|
||||
desc "update tags in submodules v1.0+"
|
||||
task :retag do
|
||||
tags = `git tag`.split("\n").reject {|x| x =~ /^v0/ } # skip v0.x.x
|
||||
puts "found #{tags.size} tags..."
|
||||
|
||||
retag_submodule(tags, "totalterminal-features")
|
||||
retag_submodule(tags, "totalterminal-installer")
|
||||
retag_submodule(tags, "totalterminal-osax")
|
||||
retag_submodule(tags, "totalterminal-kext")
|
||||
|
||||
Dir.chdir("totalterminal-features") do
|
||||
tags = `git tag`.split("\n").reject {|x| x =~ /^v0/ } # skip v0.x.x
|
||||
puts "found internal #{tags.size} tags..."
|
||||
retag_submodule(tags, "totalterminal-i18n")
|
||||
end
|
||||
|
||||
`git push --tags`
|
||||
end
|
||||
|
||||
desc "pull all"
|
||||
task :pull do
|
||||
Dir.chdir("totalterminal-i18n") do
|
||||
puts "in " + Dir.pwd
|
||||
sys("git pull")
|
||||
end
|
||||
Dir.chdir("totalterminal-installer") do
|
||||
puts "in " + Dir.pwd
|
||||
sys("git pull")
|
||||
end
|
||||
Dir.chdir("totalterminal-osax") do
|
||||
puts "in " + Dir.pwd
|
||||
sys("git pull")
|
||||
end
|
||||
Dir.chdir("sparkle") do
|
||||
puts "in " + Dir.pwd
|
||||
sys("git pull")
|
||||
end
|
||||
puts "in " + Dir.pwd
|
||||
sys("git pull")
|
||||
end
|
||||
|
||||
desc "push all"
|
||||
task :push do
|
||||
Dir.chdir("totalterminal-i18n") do
|
||||
puts "in " + Dir.pwd
|
||||
sys("git push")
|
||||
end
|
||||
Dir.chdir("totalterminal-installer") do
|
||||
puts "in " + Dir.pwd
|
||||
sys("git push")
|
||||
end
|
||||
Dir.chdir("totalterminal-osax") do
|
||||
puts "in " + Dir.pwd
|
||||
sys("git push")
|
||||
end
|
||||
Dir.chdir("sparkle") do
|
||||
puts "in " + Dir.pwd
|
||||
sys("git push")
|
||||
end
|
||||
puts "in " + Dir.pwd
|
||||
sys("git push")
|
||||
end
|
||||
|
||||
task :default => :open
|
||||
295
uncrustify.cfg
Normal file
295
uncrustify.cfg
Normal file
@@ -0,0 +1,295 @@
|
||||
align_assign_span=0
|
||||
align_func_params=false
|
||||
align_keep_tabs=false
|
||||
align_left_shift=false
|
||||
align_mix_var_proto=false
|
||||
align_nl_cont=false
|
||||
align_number_left=false
|
||||
align_on_operator=false
|
||||
align_on_tabstop=false
|
||||
align_right_cmt_mix=false
|
||||
align_same_func_call_params=false
|
||||
align_single_line_brace=false
|
||||
align_single_line_func=false
|
||||
align_typedef_span=0
|
||||
align_typedef_star_style=0
|
||||
align_var_def_amp_style=0
|
||||
align_var_def_attribute=false
|
||||
align_var_def_colon=false
|
||||
align_var_def_inline=false
|
||||
align_var_def_span=0
|
||||
align_var_def_star_style=0
|
||||
align_with_tabs=false
|
||||
# cmt_cpp_group=true
|
||||
# cmt_cpp_nl_end=true
|
||||
# cmt_cpp_nl_start=true
|
||||
# cmt_cpp_to_c=true
|
||||
# cmt_c_group=true
|
||||
# cmt_c_nl_end=true
|
||||
# cmt_c_nl_start=true
|
||||
# cmt_indent_multi=true
|
||||
# cmt_insert_before_preproc=false
|
||||
# cmt_multi_check_last=true
|
||||
# cmt_star_cont=true
|
||||
code_width=200
|
||||
eat_blanks_after_open_brace=true
|
||||
eat_blanks_before_close_brace=true
|
||||
indent_access_spec_body=false
|
||||
indent_align_assign=true
|
||||
indent_align_string=false
|
||||
indent_bool_paren=false
|
||||
indent_braces=false
|
||||
indent_braces_no_func=false
|
||||
indent_brace_parent=false
|
||||
indent_class=true
|
||||
indent_class_colon=true
|
||||
indent_col1_comment=false
|
||||
indent_columns=4
|
||||
indent_comma_paren=true
|
||||
indent_else_if=true
|
||||
indent_extern=true
|
||||
indent_func_call_param=true
|
||||
indent_func_class_param=true
|
||||
indent_func_ctor_var_param=true
|
||||
indent_func_def_param=true
|
||||
indent_func_param_double=true
|
||||
indent_func_proto_param=true
|
||||
indent_namespace=false
|
||||
indent_paren_close=4
|
||||
indent_paren_nl=false
|
||||
indent_preserve_sql=false
|
||||
indent_relative_single_line_comments=false
|
||||
indent_square_nl=false
|
||||
indent_switch_case=4
|
||||
indent_template_param=true
|
||||
indent_with_tabs=0
|
||||
ls_for_split_full=true
|
||||
ls_func_split_full=true
|
||||
mod_case_brace=add
|
||||
mod_full_brace_do=add
|
||||
mod_full_brace_for=add
|
||||
mod_full_brace_function=add
|
||||
mod_full_brace_if=add
|
||||
mod_full_brace_if_chain=true
|
||||
mod_full_brace_nl=1
|
||||
mod_full_brace_while=add
|
||||
mod_full_paren_if_bool=true
|
||||
mod_move_case_break=true
|
||||
mod_paren_on_return=remove
|
||||
mod_pawn_semicolon=false
|
||||
mod_remove_empty_return=true
|
||||
mod_remove_extra_semicolon=true
|
||||
mod_sort_import=false
|
||||
mod_sort_include=false
|
||||
mod_sort_using=false
|
||||
newlines=LF
|
||||
nl_after_access_spec=1
|
||||
nl_after_brace_close=true
|
||||
nl_after_brace_open=true
|
||||
nl_after_brace_open_cmt=true
|
||||
nl_after_case=false
|
||||
nl_after_do=ignore
|
||||
nl_after_for=ignore
|
||||
nl_after_func_body=2
|
||||
nl_after_func_body_one_liner=2
|
||||
nl_after_func_proto=1
|
||||
nl_after_func_proto_group=2
|
||||
nl_after_if=ignore
|
||||
nl_after_multiline_comment=true
|
||||
nl_after_return=true
|
||||
nl_after_semicolon=true
|
||||
nl_after_switch=ignore
|
||||
nl_after_try_catch_finally=2
|
||||
nl_after_vbrace_open=true
|
||||
nl_after_while=ignore
|
||||
nl_assign_leave_one_liners=false
|
||||
nl_before_access_spec=2
|
||||
nl_before_case=false
|
||||
nl_before_do=ignore
|
||||
nl_before_for=ignore
|
||||
nl_before_if=ignore
|
||||
nl_before_switch=ignore
|
||||
nl_before_while=ignore
|
||||
nl_brace_catch=remove
|
||||
nl_brace_else=remove
|
||||
nl_brace_finally=add
|
||||
nl_brace_while=remove
|
||||
nl_catch_brace=remove
|
||||
nl_class_brace=remove
|
||||
nl_class_init_args=add
|
||||
nl_class_leave_one_liners=false
|
||||
nl_collapse_empty_body=true
|
||||
nl_comment_func_def=1
|
||||
nl_create_for_one_liner=true
|
||||
nl_create_if_one_liner=true
|
||||
nl_create_while_one_liner=true
|
||||
nl_define_macro=true
|
||||
nl_do_brace=remove
|
||||
nl_ds_struct_enum_close_brace=false
|
||||
nl_ds_struct_enum_cmt=false
|
||||
nl_elseif_brace=remove
|
||||
nl_else_brace=remove
|
||||
nl_else_if=remove
|
||||
nl_end_of_file=add
|
||||
nl_end_of_file_min=1
|
||||
nl_enum_brace=remove
|
||||
nl_enum_leave_one_liners=false
|
||||
nl_fcall_brace=remove
|
||||
nl_fdef_brace=remove
|
||||
nl_finally_brace=remove
|
||||
nl_for_brace=remove
|
||||
nl_func_decl_args=remove
|
||||
nl_func_decl_end=remove
|
||||
nl_func_decl_start=remove
|
||||
nl_func_leave_one_liners=false
|
||||
nl_func_paren=remove
|
||||
nl_func_proto_type_name=remove
|
||||
nl_func_scope_name=remove
|
||||
nl_func_type_name=remove
|
||||
nl_func_var_def_blk=1
|
||||
nl_getset_brace=remove
|
||||
nl_getset_leave_one_liners=false
|
||||
nl_if_brace=remove
|
||||
nl_if_leave_one_liners=false
|
||||
nl_max=2
|
||||
nl_multi_line_cond=false
|
||||
nl_multi_line_define=true
|
||||
nl_namespace_brace=remove
|
||||
nl_return_expr=remove
|
||||
nl_squeeze_ifdef=false
|
||||
nl_start_of_file=remove
|
||||
nl_start_of_file_min=0
|
||||
nl_struct_brace=remove
|
||||
nl_switch_brace=remove
|
||||
nl_template_class=add
|
||||
nl_try_brace=remove
|
||||
nl_union_brace=remove
|
||||
nl_while_brace=remove
|
||||
pos_arith=trail
|
||||
pos_assign=trail
|
||||
pos_bool=trail
|
||||
pos_class_colon=lead
|
||||
pos_class_comma=trail
|
||||
pos_comma=trail
|
||||
pp_indent=remove
|
||||
pp_define_at_level=false
|
||||
pp_if_indent_code=false
|
||||
pp_indent_at_level=false
|
||||
pp_region_indent_code=false
|
||||
pp_space=add
|
||||
pp_space_count=1
|
||||
sp_addr=remove
|
||||
sp_after_angle=force
|
||||
sp_after_assign=force
|
||||
sp_after_byref=force
|
||||
sp_after_byref_func=force
|
||||
sp_after_cast=remove
|
||||
sp_after_class_colon=force
|
||||
sp_after_comma=force
|
||||
sp_after_dc=remove
|
||||
sp_after_invariant_paren=remove
|
||||
sp_after_oc_colon=remove
|
||||
sp_after_oc_scope=remove
|
||||
sp_after_oc_type=remove
|
||||
sp_after_oc_return_type=add
|
||||
sp_after_oc_at_sel=remove
|
||||
sp_after_oc_block_caret=remove
|
||||
sp_before_oc_block_caret=remove
|
||||
sp_after_operator=force
|
||||
sp_after_operator_sym=remove
|
||||
sp_after_ptr_star=force
|
||||
sp_after_ptr_star_func=force
|
||||
sp_after_semi_for_empty=remove
|
||||
sp_after_send_oc_colon=remove
|
||||
sp_after_sparen=force
|
||||
sp_after_type=force
|
||||
sp_angle_paren=remove
|
||||
sp_angle_word=force
|
||||
sp_arith=force
|
||||
sp_assign=force
|
||||
sp_attribute_paren=remove
|
||||
sp_balance_nested_parens=false
|
||||
sp_before_angle=remove
|
||||
sp_before_assign=force
|
||||
sp_before_byref=remove
|
||||
sp_before_byref_func=remove
|
||||
sp_before_case_colon=remove
|
||||
sp_before_class_colon=force
|
||||
sp_before_comma=remove
|
||||
sp_before_dc=remove
|
||||
sp_before_nl_cont=force
|
||||
sp_before_oc_colon=remove
|
||||
sp_before_ptr_star=remove
|
||||
sp_before_ptr_star_func=remove
|
||||
sp_before_semi=remove
|
||||
sp_before_semi_for=remove
|
||||
sp_before_semi_for_empty=remove
|
||||
sp_before_send_oc_colon=remove
|
||||
sp_before_sparen=add
|
||||
sp_before_square=remove
|
||||
sp_before_squares=remove
|
||||
sp_between_ptr_star=remove
|
||||
sp_bool=force
|
||||
sp_brace_catch=force
|
||||
sp_brace_else=force
|
||||
sp_brace_finally=force
|
||||
sp_brace_typedef=force
|
||||
sp_case_label=force
|
||||
sp_catch_brace=force
|
||||
sp_cmt_cpp_start=force
|
||||
sp_compare=force
|
||||
sp_cond_colon=force
|
||||
sp_cond_question=force
|
||||
sp_cpp_cast_paren=remove
|
||||
sp_defined_paren=remove
|
||||
sp_deref=remove
|
||||
sp_else_brace=force
|
||||
sp_enum_assign=force
|
||||
sp_finally_brace=force
|
||||
sp_fparen_brace=force
|
||||
sp_func_call_paren=remove
|
||||
sp_func_call_user_paren=remove
|
||||
sp_func_class_paren=remove
|
||||
sp_func_def_paren=remove
|
||||
sp_func_proto_paren=remove
|
||||
sp_getset_brace=force
|
||||
sp_incdec=remove
|
||||
sp_inside_angle=remove
|
||||
sp_inside_braces=force
|
||||
sp_inside_braces_empty=force
|
||||
sp_inside_braces_enum=force
|
||||
sp_inside_braces_struct=force
|
||||
sp_inside_fparen=remove
|
||||
sp_inside_fparens=remove
|
||||
sp_inside_paren=remove
|
||||
sp_inside_paren_cast=remove
|
||||
sp_inside_sparen=remove
|
||||
sp_inside_sparen_close=remove
|
||||
sp_inside_square=remove
|
||||
sp_inv=remove
|
||||
sp_invariant_paren=remove
|
||||
sp_macro=force
|
||||
sp_macro_func=force
|
||||
sp_member=remove
|
||||
sp_not=remove
|
||||
sp_paren_brace=force
|
||||
sp_paren_paren=remove
|
||||
sp_pp_concat=force
|
||||
sp_pp_stringify=force
|
||||
sp_range=remove
|
||||
sp_return_paren=ignore
|
||||
sp_sign=remove
|
||||
sp_sizeof_paren=remove
|
||||
sp_sparen_brace=force
|
||||
sp_special_semi=remove
|
||||
sp_square_fparen=remove
|
||||
sp_template_angle=remove
|
||||
sp_throw_paren=force
|
||||
sp_try_brace=force
|
||||
sp_type_func=force
|
||||
align_oc_msg_colon=true
|
||||
align_oc_decl_colon=true
|
||||
align_oc_msg_spec_span=1
|
||||
align_oc_msg_colon_span=1
|
||||
align_var_def_thresh=12
|
||||
align_assign_thresh=12
|
||||
Reference in New Issue
Block a user