Convert .Jar to .Dmg

后端 未结 4 1609
独厮守ぢ
独厮守ぢ 2020-12-03 15:07

I have a java application with jar file and a lib folder to go with it,and i want to bundle my application along with the lib files and folders into a .DMG file to run on MA

相关标签:
4条回答
  • 2020-12-03 15:52

    You put all your files in one folder together. Then you open the Disk Utility (Applications -> Utilities -> Disk Utility) and choose "New Image from folder..."

    That's all.

    0 讨论(0)
  • 2020-12-03 15:52

    You might want to make a dmg disk image from the makefile/build file:

    hdiutil create -srcfolder <directory> <dmg_file_name>.dmg
    
    0 讨论(0)
  • 2020-12-03 15:56

    You can use the javapackager tool to build the you_app.app application and wrap it into an installer:

    mkdir -p package/macosx
    cp you_icon_app.icns package/macosx
    jdk=$(/usr/libexec/java_home)
    $jdk/bin/javapackager -version
    $jdk/bin/javapackager -deploy -native dmg \
       -srcfiles you_app.jar -appclass you_app_name -name you_app_name \
       -outdir deploy -outfile you_app_name -v
    cp deploy/bundles/you_app_name-1.0.dmg you_app_name-installer.dmg
    

    And done.

    0 讨论(0)
  • 2020-12-03 16:06

    I use a maven plugin: osxappbundle-maven-plugin

    0 讨论(0)
提交回复
热议问题