Giter VIP home page Giter VIP logo

groovy-to-exe-converter's People

Contributors

todd-elvers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

groovy-to-exe-converter's Issues

Launching Launch4j directly

It would be nice if a user could launch the launch4j GUI directly through g2exe. Maybe with g2exe --launch4j.

Refresh Windows ICO cache

Since Windows caches Icons, creating an executable file with a custom .ico file will cache the application name + icon file + directory.

Say a user creates an executable file with g2exe in a specific directory with a custom icon. Windows Icon caching means if the user then creates an executable file with the same name, in the same directory, but with a different icon, then the old icon will be read from Window's cache and displayed instead of the new one.

It would be nice if there was a command line flag like --refresh-icons which would kill Windows Explorer, delete the IconCache.db file(s) in the current user's AppData directory, and restart Windows Explorer.

I was able to achieve this in GroovyConsole with the following:

println "Cleaning ICON cache..."
"cmd /c del %userprofile%/AppData/Local/IconCache.db /a".execute().text

println "Stopping & restarting Windows..."
"cmd /c taskkill /f /im explorer.exe && explorer.exe".execute()

GROOVY_HOME

In case, I need to use only the .jar to .exe feature, I need not have GROOVY_HOME set - it still requires me to have GROOVY_HOME open.

Ensure JDK 1.5 compatibility

There should be a way for people with JDK 1.5 to run g2exe, with confidence that all of g2exe is JDK 1.5 compatible.

Currently, the application claims to be JDK 1.5 compatible...but only by using gradle's sourceCompatibility = 1.5 setting, which is more of a suggestion to build 1.5 compatible code than a requirement. This does not force any imported dependencies to have Java 1.5 compatibility.

A gradle task needs to be created so that all generated classes can be checked for Java 5 compatibility. JDK 1.5 probably shouldn't be the main target for this application (especially since there are performance increases in later JDKs) but there should at least be the option for individuals who are forced to use JDK 1.5.

Add error title to generated launch4j xml

When g2exe cannot find a valid Java installation, a window pops up describing the issue. This window currently has no title, which makes it a little confusing. This should be fixed.

Improve main-method detection logic

Once g2exe compiles a groovy script, it iterates through the classes in the script looking for a method whose name is "main".

This logic is currently too broad. If you include a method in a script like String main() {}, g2exe will also detect this as a main method. This will then cause an exception later in the code because more than 1 main method was found.

The main-method detection logic should be improved to be more specific.

Better logging

Right now when --debug or --stacktrace are called the logging is very verbose and helpful. However, when doing a normal run of the application very little information as to what is going on is outputted to the console. There has to be a happy medium between 2 log messages and what you get when you use --debug.

Make console output when not running --debug or --stacktrace slightly more verbose.

NoClassDefFoundError after compiling groovy script to executable

Consider the following Groovy script:

class ClassOne {

    public static void main(String[] args) {
        new ClassOne().print()
        new ClassTwo().print()
    }

    void print() {
        println "ClassOne successfully instantiated"
    }
}

class ClassTwo {
    void print() {
        println "ClassTwo successfully instantiated"
    }
}

When the above is executed in GroovyConsole, the results are what you'd expect:

ClassOne successfully instantiated
ClassTwo successfully instantiated

However, if this script is compiled into an executable file w/ g2exe, then running it yields:

ClassOne successfully instantiated
Exception in thread "main" java.lang.NoClassDefFoundError: ClassTwo
        at ClassOne.main(Example.groovy:5)
Caused by: java.lang.ClassNotFoundException: ClassTwo
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 1 more

This is a bug and a pretty nasty one at that.

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.