GithubHelp home page GithubHelp logo

cr0 / gradle-macappbundle-plugin Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 2.0 457 KB

Fork of google code hosted gradle-macappbundle

Home Page: https://code.google.com/p/gradle-macappbundle/

Groovy 60.74% M 39.26%

gradle-macappbundle-plugin's People

Contributors

cr0 avatar crotwell avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gradle-macappbundle-plugin's Issues

Copy resources on build like in ant bundleapp task

Hi cr0.

I assemble Mac OS .app application and now trying to switch from ant bundler task to your gradle one. In the ant task i have the next settings, which i can't find in your implementation:

<target name="bundleMac" depends="cleanTarget, checkProperties">
    <taskdef name="bundleapp"
           classname="com.oracle.appbundler.AppBundlerTask"
           classpath="${basedir}/lib/appbundler-1.0.jar"/>

     <bundleapp >

         <classpath file="${buildDir}/libs/BuildUberJar.jar"/>
         <classpath file="${libDir}/lib.dylib"/>
         <classpath file="${libDir}/license.txt"/>
         <classpath file="${resDir}/${splashImagePath}"/>

this classpath property copies files from build resources to Contents/Java bundled directory and would be used by the application at runtime.

There are 2 problems i have:

  1. Instead of just putting my single über-jar to Java directory it puts all the dependencies jars.
  2. I've not found a way to copy resources (like those dylib, txt and splash image) to Java directory.
  3. When i build using this ant task in the result Content directory also Resources subdirectory exists with my '128.icns' and some default en.lproj/Localizable.strings messages ("JRELoadError", "MainClassNameRequired", "JavaDirectoryNotFound"). Why it's absent in this gradle task?

Thanks.

JVMArguments doesn't passed to launched app (javaExtras for JVMOptions is missing)

I use these build settings for splash screen (see this JDK thread for details of the splash screen usage http://mail.openjdk.java.net/pipermail/macosx-port-dev/2012-November/005174.html):

macAppBundle {
    ....
    javaXProperties.add('dock:icon=Contents/Resources/${bundle.icon}')
    javaXProperties.add('ms64m')
    javaXProperties.add('mx1024m')

    javaProperties.put('com.apple.smallTabs', 'true')

    arguments.add("-splash:\$APP_ROOT/Contents/Java/${splashImageName}")

and it creates (as expected) the next Info.plist:

    <key>JVMOptions</key>
    <array>
      <string>-Dcom.apple.smallTabs=true</string>
      <string>-Xdock:icon=Contents/Resources/${bundle.icon}</string>
      <string>-Xms64m</string>
      <string>-Xmx1024m</string>
    </array>
    <key>JVMArguments</key>
    <array>
      <string>-splash:$APP_ROOT/Contents/Java/splash.png</string>
    </array>

but, the JVM argument is not used: when i run the app the splash screen is not shown. If i move <string>-splash:$APP_ROOT/Contents/Java/splash.png</string> from JVMArguments->JVMOptions (manually in Info.plist) - the application works as expected.

But, in the same time i can't put -splash property to this array using gradle config macAppBundle, because to JVMOptions section only -X and -D prefixed values are included (see

)

Could you add a possibility to add JVMOptions without -X or -D prefixes? Thanks

BTW, this property javaExtras existed in @crotwell version, but remove in you changes:
2bd66bf

Provide something more useful than "JRELoadError" when JRE needs to be updated

Some of my users are still on Java 1.6 and therefore can't run my application which runs on Java 1.7. They are confused by the error message, which just says "JRELoadError".
11059701_10202910280717615_4016125044306283506_n

It would be very helpful, if there would be a short error description, which says that you need to download / update Java and then opens the Java download page in the user's browser.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.