Skip to content

Commit

Permalink
remove jarbundler and old "macosx" build task; "bigmac" using appbund…
Browse files Browse the repository at this point in the history
…ler now the default
  • Loading branch information
mtigas committed Sep 15, 2015
1 parent 617f996 commit b8eee37
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 325 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,9 @@ To compile the app:
This will result in a portable "tabula_mac.zip" archive (inside the `build` directory)
for Mac OS X users.
A "large" version of Tabula, which includes Java (so that the user's Java version
is irrelevant) can be built by doing:
rake bigmac
This results in a 98MB zip file, versus the 30MB zip file for the normal build,
but allows users to run Tabula without having to worry about occasional [Java
Note that the Mac version bundles Java with the Tabula app.
This results in a 98MB zip file, versus the 30MB zip file for other platforms,
but allows users to run Tabula without having to worry about [Java version
incompatibilities](https://github.com/tabulapdf/tabula/issues/237).
[buildxml_cert]: https://github.com/jazzido/tabula/blob/master/build.xml#L44-53
Expand Down
59 changes: 0 additions & 59 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,65 +152,6 @@ end



task :bigmac => [:create_version_file, :war] do |t|
tabula_dir = File.expand_path(File.dirname(__FILE__))
build_dir = File.join(tabula_dir, "build")
dist_dir = File.join(build_dir, "bigmac", "tabula")

cd File.join(tabula_dir)

if File.exist?(File.join(build_dir, "bigmac"))
FileUtils.rm_rf(File.join(build_dir, "bigmac"))
end

puts "\n======================================================"
puts "Building Mac OS X app..."
puts "======================================================\n\n"

invoke_ant("-Dfull_version=#{build_version}", "-v", "bigmacbundle") { |f|
f.each { |line| puts line }
}


puts "\n======================================================"
puts "Creating zip file bundle..."
puts "======================================================\n\n"

Dir.mkdir(dist_dir)

app_src = File.join(build_dir, "bigmac", "Tabula.app")
app_dst = File.join(dist_dir, "Tabula.app")
FileUtils.mv(app_src, app_dst)

readme_src = File.join(build_dir, "dist-README.txt")
readme_dst = File.join(dist_dir, "README.txt")
FileUtils.cp(readme_src, readme_dst)

lic_src = File.join(build_dir, "dist-LICENSE.txt")
lic_dst = File.join(dist_dir, "LICENSE.txt")
FileUtils.cp(lic_src, lic_dst)

authors_src = File.join(tabula_dir, "AUTHORS.md")
authors_dst = File.join(dist_dir, "AUTHORS.txt")
FileUtils.cp(authors_src, authors_dst)

cd File.join(build_dir, "bigmac")
output = File.join(build_dir, "tabula-bigmac-#{build_version}.zip")
if File.exists?(output)
File.delete(output)
end

IO.popen("zip -r9 #{output} tabula") { |f|
f.each { |line| puts line }
}
FileUtils.rm_rf(dist_dir)
puts "\n======================================================"
puts "Zip file saved to #{output}"
puts "======================================================\n\n"
end



task :windows => [:create_version_file, :war] do |t|
tabula_dir = File.expand_path(File.dirname(__FILE__))
build_dir = File.join(tabula_dir, "build")
Expand Down
60 changes: 3 additions & 57 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<property file="build.properties"/>
<property name="build.dir" value="build"/>
<property name="mac.dir" value="${build.dir}/mac" />
<property name="bigmac.dir" value="${build.dir}/bigmac" />
<property name="windows.dir" value="${build.dir}/windows" />
<property name="full_version" value="1.0.0.0"/>
<property name="launch4j.dir" location="${build.dir}/../launch4j" />
Expand All @@ -16,59 +15,6 @@

<target name="macbundle" depends="check-jar-exists" if="jar.exists">
<mkdir dir="${mac.dir}"/>
<taskdef
name="jarbundler"
classname="net.sourceforge.jarbundler.JarBundler"
classpath="${build.dir}/jarbundler-2.2.0.jar"
/>

<jarbundler
dir="${build.dir}/mac"
name="Tabula"
shortname="Tabula"
mainclass="WarMain"
version="${full_version}"
infostring="© 2012-2015 Manuel Aristarán"
aboutmenuname="Tabula"
icon="${build.dir}/icons/tabula.icns"
workingdirectory="$APP_PACKAGE/Contents/Resources"
jvmversion="1.6+"
bundleid="technology.tabula.Tabula"
vmoptions="-Xms256M -Xmx1024M -Dfile.encoding=utf-8"
antialiasedgraphics="true"
antialiasedtext="true"
liveresize="true"
growboxintrudes="true"
screenmenu="true">
<jarfilelist dir="${build.dir}" files="tabula.jar" />
</jarbundler>
<!--
To allow OSX to use this, you'll need to code sign.
Generate a self-signed "Code Signing" certificate[1], then enter
it in the -s option here and edit below section. Users can then
right-click or Control-click the app and "Open" and then tell OS X to
open anyway[2].
[1]: http://support.apple.com/kb/PH7173
[2]: http://support.apple.com/kb/HT5290
For production builds, you can get rid of "Unidentified Developer"
warnings by having a Mac Developer Account and a cert from[3]. Then
change -s option to something like 'Developer ID Application: Mike Tigas (68QUP6KP2C)',
based on your Developer Account & cert.
[3]: https://developer.apple.com/account/mac/certificate/certificateList.action
-->
<exec executable="codesign" os="Mac OS X">
<arg line="-f -s 'Tabula' ${build.dir}/bigmac/Tabula.app/Contents/PlugIns/jdk1.8.0_60.jdk" />
</exec>
<exec executable="codesign" os="Mac OS X">
<arg line="-f -s 'Tabula' ${build.dir}/bigmac/Tabula.app" />
</exec>
</target>


<target name="bigmacbundle" depends="check-jar-exists" if="jar.exists">
<mkdir dir="${bigmac.dir}"/>

<!-- this must be a real JDK -->
<property name="java_home" value="/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home"/>

Expand All @@ -79,7 +25,7 @@
/>

<bundleapp
outputdirectory="${build.dir}/bigmac"
outputdirectory="${build.dir}/mac"
name="Tabula"
displayname="Tabula"
identifier="org.nerdpower.tabula.Tabula"
Expand Down Expand Up @@ -108,10 +54,10 @@
[3]: https://developer.apple.com/account/mac/certificate/certificateList.action
-->
<exec executable="codesign" os="Mac OS X">
<arg line="-f -s 'Tabula' ${build.dir}/bigmac/Tabula.app/Contents/PlugIns/jdk1.8.0_60.jdk" />
<arg line="-f -s 'Tabula' ${build.dir}/mac/Tabula.app/Contents/PlugIns/jdk1.8.0_60.jdk" />
</exec>
<exec executable="codesign" os="Mac OS X">
<arg line="-f -s 'Tabula' ${build.dir}/bigmac/Tabula.app" />
<arg line="-f -s 'Tabula' ${build.dir}/mac/Tabula.app" />
</exec>
</target>

Expand Down
Binary file removed build/jarbundler-2.2.0.jar
Binary file not shown.
202 changes: 0 additions & 202 deletions build/jarbundler-LICENSE.TXT

This file was deleted.

0 comments on commit b8eee37

Please sign in to comment.