0
; does not work
{:paths ["./src" "out/ui" "out/identicon"]
 :mvn/repos {"jitpack.io" {:url "https://jitpack.io"}}
 :deps {org.clojure/clojure {:mvn/version "1.10.3"}
        org.clojure/clojurescript {:mvn/version "1.11.4"}
        org.clojure/core.async {:mvn/version "1.3.618"}

        test.check/test.check {:git/url "https://github.com/clojure/test.check"
                               :sha "b6a318af92e836f1f20960f38a5944168b88d60d"}
        cheshire/cheshire {:mvn/version "5.10.2"}

        cljfx/cljfx {:git/url "https://github.com/cljfx/cljfx"
                     :sha "29aaef956b22cee774524912a3083ed651033f1b"
                     :exclusions [org.openjfx/javafx-controls
                                  org.openjfx/javafx-base
                                  org.openjfx/javafx-fxml
                                  org.openjfx/javafx-graphics
                                  org.openjfx/javafx-media
                                  org.openjfx/javafx-web]}

        org.openjfx/javafx-base {:mvn/version "17.0.2"}
        org.openjfx/javafx-fxml {:mvn/version "17.0.2"}
        #_org.openjfx/javafx-graphics #_{:mvn/version "17.0.2"}
        #_org.openjfx/javafx-web #_{:mvn/version "17.0.2"}}

 :aliases
 {:Ripley {:extra-deps {Ripley/Ripley {:git/url "https://github.com/Empire-Strikes-Back/Ripley"
                                       :sha "becd2573ab55d42933134d346bc46cdd8fa08c04"}}}

  :Genie {:extra-deps {Genie/Genie {:git/url "https://github.com/Empire-Strikes-Back/Genie"
                                    :sha "fe9200d223e3a5c79e88dfa17bc2697c09dae70e"}}}

  :Zazu {:extra-deps {Zazu/Zazu {:git/url "https://github.com/Empire-Strikes-Back/Zazu"
                                 :sha "063ef7649c01284be8f5a1e9814d5bf83025ad76"}}}

  :shadow {:extra-deps {thheller/shadow-cljs {:mvn/version "2.18.0"}
                        nrepl/nrepl {:mvn/version "0.8.3"}
                        cider/cider-nrepl {:mvn/version "0.25.5"}
                        cider/piggieback {:mvn/version "0.5.2"}}}

  :ui {:extra-deps {reagent/reagent {:mvn/version "1.1.1"}
                    sci/sci {:git/url "https://github.com/borkdude/sci"
                             :sha "6c10e494371a37a56bef45c8148435888bae3a45"}}}

  :linux {:extra-deps {org.openjfx/javafx-base$linux {:mvn/version "17.0.2"}
                       org.openjfx/javafx-fxml {:mvn/version "17.0.2"}
                       org.openjfx/javafx-graphics$linux {:mvn/version "17.0.2"}
                       org.openjfx/javafx-web$linux {:mvn/version "17.0.2"}}}
  :windows {:extra-deps {org.openjfx/javafx-graphics$win {:mvn/version "17.0.2"}
                         org.openjfx/javafx-web$win {:mvn/version "17.0.2"}}}
  :macos {:extra-deps {org.openjfx/javafx-graphics$mac {:mvn/version "17.0.2"}
                       org.openjfx/javafx-web$mac {:mvn/version "17.0.2"}}}}}

how to compile uberjars for each OS with its own classifier?

  • "does not work" - what does not work? please add the error/stack trace/... – cfrick Jun 06 '22 at 13:30
  • A discussion of the process to do this using Maven is in the [answer to this question](https://stackoverflow.com/questions/52653836/maven-shade-javafx-runtime-components-are-missing). I do not know how to perform the equivalent task using a Clojure-based build tool. However, much of the information in the Maven-based solution is generic to the process of creating an uber jar for a JavaFX application and is not really specific to a Maven setup. – jewelsea Jun 06 '22 at 21:46
  • I recommend that you read and understand the information in that answer and see if you can get it to apply to your situation (assuming you wish to continue creating an uber jar). – jewelsea Jun 06 '22 at 21:46
  • An uber jar that includes JavaFX classes is not a supported runtime configuration for JavaFX application deployment. For information on alternative packaging solutions, e.g. jlink and jpackage, or a zip file containing separate module jars plus a shell script, see the [packaging section in the JavaFX tag](https://stackoverflow.com/tags/javafx/info). – jewelsea Jun 06 '22 at 21:47

1 Answers1

0
  OPERATING_SYSTEM=$1
  COMMIT_HASH=$(git rev-parse --short HEAD)
  COMMIT_COUNT=$(git rev-list --count HEAD)
  clojure \
    -J-Dcljfx.skip-javafx-initialization=true \
    -X:Genie Genie.core/process \
    :main-ns Cara-Dune.main \
    :filename "\"out/Cara-Dune-$COMMIT_COUNT-$COMMIT_HASH-$OPERATING_SYSTEM.jar\"" \
    :paths '["src" "out/ui" "out/identicon"]' \
    :create-basis-opts "{:aliases [:$OPERATING_SYSTEM]}"

  • and still - linux .jar is 80.7mb
  • windows 108 mac 112 - because they include javafx jar for linux - they run on linux when they shouldn't