https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
m

Michael Paus

10/23/2023, 3:14 PM
Just created a release DMG for an application which heavily uses sqlite-jdbc without problem. (No code signing. Using sqlite-jdbc version 3.43.2.1)
👍 2
thank you color 1
👍🏻 1
p

Pablichjenkov

10/23/2023, 3:26 PM
No link for those who want it for future reference?
m

Michael Paus

10/23/2023, 4:33 PM
Link to what?
z

Zoff

10/23/2023, 4:56 PM
good. how can i do the same?
is your project code open source? can you share the gradle config and the shell commands you are using to create the DMG on macos?
⬆️ 1
those are the commands i run on macos via github workflow
m

Michael Paus

10/23/2023, 5:26 PM
My project is not open-source but the binary is freely available. https://mpmediasoft.de/products/AIPBrowserDE/help/AIPBrowserDE.html The GitHub workflow is also no secret and it seems to be much simpler than yours.
Copy code
name: Package AIP Browser DE for macOS

on:
  workflow_dispatch:

jobs:
  macos:
    name: Package on macOS
    runs-on: macos-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Install Java
        uses: actions/setup-java@v3
        with:
          distribution: 'temurin'
          java-version: |
            11
            17
      - name: Set up cache
        uses: actions/cache@v3
        with:
          path: ~/.gradle/caches
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
          restore-keys: |
            ${{ runner.os }}-gradle-
      - name: Build
        run: ./gradlew packageReleaseDmg
      - name: Upload artifacts
        uses: actions/upload-artifact@v3
        with:
          path: |
            desktopApp/build/compose/binaries/main-release/dmg
p

Pablichjenkov

10/23/2023, 6:19 PM
Ah ok Michael, I meant to say that the project link. But if not open source is fine.
t

Tsung Wu

10/30/2023, 1:49 AM
@Michael Paus nice app. How do you add customized background image for dmg installer on macOS?
m

Michael Paus

10/30/2023, 10:02 AM
I am not using a customized background for this project. What you see is just the default one with only a custom application logo. (Funny side note: The default background image, which you see in all DMG installers created via jpackage as part of the JDK, was also created by me 🙂) The reason is that with jpackage you could customize the background but the JetBrains DSL does not allow you to forward the necessary arguments to jpackage. In another (JavaFX project) I did customize the background and then it could look like this, e.g.: Somewhere I have also seen an issue about this.
t

Tsung Wu

10/31/2023, 5:04 AM
@Michael Paus I added icns for my dmg build, but the installer have no custom application logo. Am I missing some step?
m

Michael Paus

10/31/2023, 7:40 AM
@Tsung Wu The only reference to the icon is here:
Copy code
compose.desktop {
    application {
    	...
        nativeDistributions {
        	...
            macOS {
                iconFile.set(File("logo/MacOS/appIcon.icns"))
            }
			...
		}
	}
}
in the
build.gradle.kts
file inside the
desktopApp
folder. So if the icon and the path are OK it should work.
t

Tsung Wu

10/31/2023, 3:43 PM
@Michael Paus Thanks. I am still on compose 1.5.0. Maybe it’s time to upgrade it.
6 Views