forked from KKBOX/CompassApp
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,252 changed files
with
74,656 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> | ||
<plist version="0.9"> | ||
<dict> | ||
<key>NSUIElement</key> | ||
<string>1</string> | ||
<key>CFBundleName</key> | ||
<string>compass.app</string> | ||
<key>CFBundleVersion</key> | ||
<string>0.0.1</string> | ||
<key>CFBundleAllowMixedLocalizations</key> | ||
<string>true</string> | ||
<key>CFBundleExecutable</key> | ||
<string>JavaApplicationStub</string> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleIconFile</key> | ||
<string>icon-osx.icns</string> | ||
<key>Java</key> | ||
<dict> | ||
<key>MainClass</key> | ||
<string>org.rubyforge.rawr.Main</string> | ||
<key>JVMVersion</key> | ||
<string>1.6*</string> | ||
<key>ClassPath</key> | ||
<array> | ||
<string>$JAVAROOT/compass-app.jar</string> | ||
</array> | ||
<key>Properties</key> | ||
<dict> | ||
<key>apple.laf.useScreenMenuBar</key> | ||
<string>true</string> | ||
</dict> | ||
<key>JVMArchs</key> | ||
<array> | ||
<string>i386</string> | ||
</array> | ||
<key>StartOnMainThread</key> | ||
<string>true</string> | ||
<key>VMOptions</key> | ||
<array> | ||
<string>-Xverify:none</string> | ||
<string>-Xbootclasspath/p:$APP_PACKAGE/Contents/Resources/Java/lib/java/jruby-complete.jar</string> | ||
</array> | ||
</dict> | ||
</dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> | ||
<plist version="0.9"> | ||
<dict> | ||
<key>NSUIElement</key> | ||
<string>1</string> | ||
<key>CFBundleName</key> | ||
<string>compass.app</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.0</string> | ||
<key>CFBundleAllowMixedLocalizations</key> | ||
<string>true</string> | ||
<key>CFBundleExecutable</key> | ||
<string>JavaApplicationStub</string> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleIconFile</key> | ||
<string>icon-osx.icns</string> | ||
<key>Java</key> | ||
<dict> | ||
<key>MainClass</key> | ||
<string>org.rubyforge.rawr.Main</string> | ||
<key>JVMVersion</key> | ||
<string>1.6*</string> | ||
<key>ClassPath</key> | ||
<array> | ||
<string>$JAVAROOT/compass-app.jar</string> | ||
</array> | ||
<key>Properties</key> | ||
<dict> | ||
<key>apple.laf.useScreenMenuBar</key> | ||
<string>true</string> | ||
</dict> | ||
<key>JVMArchs</key> | ||
<array> | ||
<string>i386</string> | ||
</array> | ||
<key>StartOnMainThread</key> | ||
<string>true</string> | ||
<key>VMOptions</key> | ||
<array> | ||
<string>-Xverify:none</string> | ||
<string>-Xbootclasspath/p:$APP_PACKAGE/Contents/Resources/Java/lib/java/jruby-complete.jar</string> | ||
</array> | ||
</dict> | ||
</dict> | ||
</plist> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Homepage | ||
====== | ||
http://compass.handlino.com | ||
|
||
System Requirement | ||
====== | ||
* jruby http://jruby.org/ | ||
* rawr http://rawr.rubyforge.org/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
require 'rawr' | ||
require 'app_bundler' | ||
require 'exe_bundler' | ||
require 'yaml' | ||
module Rawr | ||
class AppBundler | ||
# monkey patch again, option mac_do_not_generate_plist not work | ||
def generate_info_plist | ||
return | ||
end | ||
end | ||
end | ||
|
||
namespace :rawr do | ||
namespace :link_swt do | ||
task :clean do | ||
@swt_file = File.join( File.dirname(__FILE__), 'lib', 'java', 'swt.jar') | ||
File.delete( File.join( File.dirname(__FILE__), 'lib', 'java', 'swt.jar')) if File.exists?( @swt_file ) | ||
end | ||
|
||
task :win => ['rawr:link_swt:clean'] do | ||
@current_os = "win" | ||
copy( File.join( File.dirname(__FILE__), 'lib','swt','swt_win32.jar'), @swt_file ) | ||
end | ||
|
||
task :linux => ['rawr:link_swt:clean'] do | ||
@current_os = "linux" | ||
copy( File.join( File.dirname(__FILE__), 'lib','swt','swt_linux32.jar'), @swt_file ) | ||
end | ||
|
||
task :osx => ['rawr:link_swt:clean'] do | ||
@current_os = "osx" | ||
copy( File.join( File.dirname(__FILE__), 'lib','swt','swt_osx32.jar'), @swt_file ) | ||
end | ||
end | ||
|
||
namespace :bundle do | ||
task :create_packages_dir do | ||
@packages_dir = File.join(File.dirname(__FILE__), 'packages') | ||
Dir.mkdir( @packages_dir ) unless File.exists?( @packages_dir ) | ||
end | ||
|
||
task :write_version_info do | ||
@revision ||= (%x{git log | head -c 17 | tail -c 10}).strip | ||
@compile_time ||= Time.now.strftime('%Y%m%d%H%M') | ||
@update_url = open('update_url').readline.strip if File.exists?("update_url") | ||
File.open "src/compile_version.rb", 'w' do |file| | ||
file << <<-INFO_ENDL | ||
module CompileVersion | ||
REVISION = '#{@revision}' | ||
COMPILE_TIME = '#{@compile_time}' | ||
UPDATE_URL = '#{@update_url}' | ||
end | ||
INFO_ENDL | ||
end | ||
end | ||
|
||
task(:app).clear_prerequisites.clear_actions | ||
desc "Bundles the jar from rawr:jar into a native Mac OS X application (.app)" | ||
task :app => ["rawr:bundle:create_packages_dir", "rawr:link_swt:osx", "rawr:bundle:write_version_info", "rawr:jar", CONFIG.osx_output_dir ] do | ||
Rawr::AppBundler.new.deploy CONFIG | ||
Dir.chdir File.dirname(__FILE__) | ||
%x{cp -R lib/ruby #{CONFIG.osx_output_dir}/#{CONFIG.project_name}.app/Contents/Resources/ruby} | ||
%x{cp -R lib/applescript #{CONFIG.osx_output_dir}/#{CONFIG.project_name}.app/Contents/Resources/applescript} | ||
Dir.chdir CONFIG.osx_output_dir | ||
%x{mv #{CONFIG.project_name}.app compass.app;} | ||
@osx_bundle_file="compass.app.osx.#{@compile_time}-#{@revision}.zip" | ||
%x{zip -9 -r #{@packages_dir}/#{@osx_bundle_file} compass.app} | ||
end | ||
|
||
task(:exe).clear_prerequisites.clear_actions | ||
desc "Bundles the jar from rawr:jar into a native Windows application (.exe)" | ||
task :exe => ["rawr:bundle:create_packages_dir", "rawr:link_swt:win", "rawr:bundle:write_version_info", "rawr:jar", CONFIG.windows_output_dir ] do | ||
Dir.chdir File.dirname(__FILE__) | ||
%x{mkdir -p package/windows/package/windows} # yo~ show me the monkey, path for launch4j link fle | ||
Rawr::ExeBundler.new.deploy CONFIG | ||
%x{cp -R lib/ruby #{CONFIG.windows_output_dir}/lib} | ||
%x{mv package/windows/package/windows/*.exe package/windows} | ||
%x{rm -rf package/windows/package} | ||
Dir.chdir 'package' | ||
%x{rm -rf compass.app windows/*.xml; mv windows compass.app} | ||
@windows_bundle_file="compass.app.windows.#{@compile_time}-#{@revision}.zip" | ||
%x{zip -9 -r #{@packages_dir}/#{@windows_bundle_file} compass.app} | ||
end | ||
|
||
desc "Bundles the jar from rawr:jar into a Linux script" | ||
task :linux => ["rawr:bundle:create_packages_dir", "rawr:link_swt:linux", "rawr:bundle:write_version_info", "rawr:jar" ] do | ||
Dir.chdir File.dirname(__FILE__) | ||
%x{cp -R lib/ruby package/jar/lib} | ||
%x{mv package/jar package/compass.app} | ||
%x{echo "#!/bin/sh\njava -d32 -client -jar compass-app.jar" > package/compass.app/run.sh} | ||
%x{chmod +x package/compass.app/run.sh} | ||
Dir.chdir 'package' | ||
@linux_bundle_file="compass.app.linux.#{@compile_time}-#{@revision}.zip" | ||
%x{zip -9 -r #{@packages_dir}/#{@linux_bundle_file} compass.app} | ||
end | ||
|
||
desc "Bundles Linux, OSX and Window package" | ||
task :all do | ||
Dir.chdir File.dirname(__FILE__) | ||
%x{rm -rf package/* packages/*} | ||
Rake::Task['rawr:bundle:app'].invoke | ||
|
||
Rake::Task.tasks.each{|t| t.reenable} | ||
Dir.chdir File.dirname(__FILE__) | ||
%x{rm -rf package/*} | ||
Rake::Task['rawr:bundle:exe'].invoke | ||
|
||
Rake::Task.tasks.each{|t| t.reenable} | ||
Dir.chdir File.dirname(__FILE__) | ||
%x{rm -rf package/*} | ||
Rake::Task['rawr:bundle:linux'].invoke | ||
url_base=File.dirname(@update_url) | ||
info={ "linux" => { "compile_version"=> @compile_time, "url"=> File.join(url_base, @linux_bundle_file) }, | ||
"osx" => { "compile_version"=> @compile_time, "url"=> File.join(url_base, @osx_bundle_file) }, | ||
"windows" => { "compile_version"=> @compile_time, "url"=> File.join(url_base, @windows_bundle_file)} } | ||
open( File.join(@packages_dir,'update.yml'),'w' ) do |f| | ||
f.write info.to_yaml | ||
end | ||
end | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
rake rawr:bundle:all |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
if [ "$1" = "full" ]; then | ||
rm `pwd`/lib/java/swt* | ||
cp `pwd`/lib/swt/swt_linux32.jar `pwd`/lib/java/swt.jar | ||
rake rawr:clean | ||
fi | ||
rake rawr:jar | ||
java -d32 -client -Xverify:none -Xbootclasspath/a:lib/java/jruby-complete.jar -jar package/jar/compass-app.jar |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
if [ "$1" = "full" ]; then | ||
rm `pwd`/lib/java/swt* | ||
cp `pwd`/lib/swt/swt_osx32.jar `pwd`/lib/java/swt.jar | ||
rake rawr:clean | ||
fi | ||
rake rawr:jar | ||
java -d32 -client -Xverify:none -XstartOnFirstThread -Xbootclasspath/a:lib/java/jruby-complete.jar -jar package/jar/compass-app.jar |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
configuration do |c| | ||
# The name for your resulting application file (e.g., if the project_name is 'foo' then you'll get foo.jar, foo.exe, etc.) | ||
# default value: "tka" | ||
# | ||
c.project_name = "compass-app" | ||
|
||
# Undocumented option 'output_dir' | ||
# default value: "package" | ||
# | ||
#c.output_dir = "package" | ||
|
||
# The main ruby file to invoke, minus the .rb extension | ||
# default value: "main" | ||
# | ||
#c.main_ruby_file = "main" | ||
|
||
# The fully-qualified name of the main Java file used to initiate the application. | ||
# default value: "org.rubyforge.rawr.Main" | ||
# | ||
#c.main_java_file = "org.rubyforge.rawr.Main" | ||
|
||
# A list of directories where source files reside | ||
# default value: ["src"] | ||
# | ||
#c.source_dirs = ["src",'lib/ruby/gem/gems/haml-3.0.24'] | ||
|
||
# A list of regexps of files to exclude | ||
# default value: [] | ||
# | ||
#c.source_exclude_filter = [/spec/,/test/,/example/] | ||
|
||
# Whether Ruby source files should be compiled into .class files | ||
# default value: true | ||
# | ||
#c.compile_ruby_files = true | ||
|
||
# A list of individual Java library files to include. | ||
# default value: [] | ||
# | ||
#c.java_lib_files = [] | ||
|
||
# A list of directories for rawr to include . All files in the given directories get bundled up. | ||
# default value: ["lib/java"] | ||
# | ||
#c.java_lib_dirs = ["lib/java"] | ||
|
||
# Undocumented option 'files_to_copy' | ||
# default value: [] | ||
# | ||
#c.files_to_copy = ['lib/ruby', 'lib/applescript'] | ||
|
||
# Undocumented option 'target_jvm_version' | ||
# default value: 1.6 | ||
# | ||
#c.target_jvm_version = 1.6 | ||
|
||
# Undocumented option 'jvm_arguments' | ||
# default value: "" | ||
# | ||
#c.jvm_arguments = "" | ||
|
||
# Undocumented option 'java_library_path' | ||
# default value: "" | ||
# | ||
#c.java_library_path = "" | ||
|
||
# Undocumented option 'extra_user_jars' | ||
# default value: {} | ||
# | ||
#c.extra_user_jars[:data] = { :directory => 'data/images/png', | ||
# :location_in_jar => 'images', | ||
# :exclude => /*.bak$/ } | ||
|
||
# Undocumented option 'mac_do_not_generate_plist' | ||
# default value: nil | ||
# | ||
#c.mac_do_not_generate_plist = true | ||
|
||
# Undocumented option 'mac_icon_path' | ||
# default value: nil | ||
# | ||
c.mac_icon_path = Dir.pwd + "/src/data/images/icon/icon-osx.icns" | ||
|
||
# Undocumented option 'windows_icon_path' | ||
# default value: nil | ||
# | ||
c.windows_icon_path = Dir.pwd + "/src/data/images/icon/icon-win.ico" | ||
|
||
end |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env jruby | ||
# | ||
# This file was generated by RubyGems. | ||
# | ||
# The application 'compass' is installed as part of a gem, and | ||
# this file is here to facilitate running it. | ||
# | ||
|
||
require 'rubygems' | ||
|
||
version = ">= 0" | ||
|
||
if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then | ||
version = $1 | ||
ARGV.shift | ||
end | ||
|
||
gem 'compass', version | ||
load Gem.bin_path('compass', 'compass', version) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env jruby | ||
# | ||
# This file was generated by RubyGems. | ||
# | ||
# The application 'haml' is installed as part of a gem, and | ||
# this file is here to facilitate running it. | ||
# | ||
|
||
require 'rubygems' | ||
|
||
version = ">= 0" | ||
|
||
if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then | ||
version = $1 | ||
ARGV.shift | ||
end | ||
|
||
gem 'haml', version | ||
load Gem.bin_path('haml', 'css2sass', version) |
Oops, something went wrong.