diff --git a/cmp/androidApp/src/main/res/drawable-v24/ic_launcher_foreground.xml b/cmp/androidApp/src/main/res/drawable-v24/ic_launcher_foreground.xml
deleted file mode 100644
index 2b068d11..00000000
--- a/cmp/androidApp/src/main/res/drawable-v24/ic_launcher_foreground.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/cmp/androidApp/src/main/res/drawable/ic_launcher_background.xml b/cmp/androidApp/src/main/res/drawable/ic_launcher_background.xml
index e93e11ad..69cb49cd 100644
--- a/cmp/androidApp/src/main/res/drawable/ic_launcher_background.xml
+++ b/cmp/androidApp/src/main/res/drawable/ic_launcher_background.xml
@@ -4,167 +4,8 @@
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/cmp/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/cmp/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index eca70cfe..00f9eaaf 100644
--- a/cmp/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/cmp/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/cmp/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/cmp/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
index eca70cfe..00f9eaaf 100644
--- a/cmp/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ b/cmp/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/cmp/androidApp/src/main/res/mipmap-hdpi/ic_launcher.png b/cmp/androidApp/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index a571e600..00000000
Binary files a/cmp/androidApp/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/cmp/androidApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/cmp/androidApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
new file mode 100644
index 00000000..700dd652
Binary files /dev/null and b/cmp/androidApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ
diff --git a/cmp/androidApp/src/main/res/mipmap-hdpi/ic_launcher_round.png b/cmp/androidApp/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100644
index 61da551c..00000000
Binary files a/cmp/androidApp/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/cmp/androidApp/src/main/res/mipmap-mdpi/ic_launcher.png b/cmp/androidApp/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index c41dd285..00000000
Binary files a/cmp/androidApp/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/cmp/androidApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/cmp/androidApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
new file mode 100644
index 00000000..e3091d74
Binary files /dev/null and b/cmp/androidApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ
diff --git a/cmp/androidApp/src/main/res/mipmap-mdpi/ic_launcher_round.png b/cmp/androidApp/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100644
index db5080a7..00000000
Binary files a/cmp/androidApp/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/cmp/androidApp/src/main/res/mipmap-xhdpi/ic_launcher.png b/cmp/androidApp/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 6dba46da..00000000
Binary files a/cmp/androidApp/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/cmp/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/cmp/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
new file mode 100644
index 00000000..9b6f84ed
Binary files /dev/null and b/cmp/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ
diff --git a/cmp/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/cmp/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100644
index da31a871..00000000
Binary files a/cmp/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/cmp/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher.png b/cmp/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 15ac6817..00000000
Binary files a/cmp/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/cmp/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/cmp/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
new file mode 100644
index 00000000..12973997
Binary files /dev/null and b/cmp/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ
diff --git a/cmp/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/cmp/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100644
index b216f2d3..00000000
Binary files a/cmp/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/cmp/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/cmp/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index f25a4197..00000000
Binary files a/cmp/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/cmp/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/cmp/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
new file mode 100644
index 00000000..2fe35442
Binary files /dev/null and b/cmp/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/cmp/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/cmp/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100644
index e96783cc..00000000
Binary files a/cmp/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/cmp/desktopApp/build.gradle.kts b/cmp/desktopApp/build.gradle.kts
index 62315795..537d23ac 100644
--- a/cmp/desktopApp/build.gradle.kts
+++ b/cmp/desktopApp/build.gradle.kts
@@ -13,6 +13,7 @@ dependencies {
implementation(projects.shared)
implementation(compose.foundation)
implementation(compose.desktop.currentOs)
+ implementation(compose.components.resources)
implementation(libs.kotlinx.coroutinesSwing)
implementation(libs.kotlinx.serialization)
@@ -27,12 +28,27 @@ dependencies {
compose.desktop {
application {
mainClass = "com.darius.lionvpn.MainKt"
+ jvmArgs("-Dsun.awt.wmclass=lion-vpn")
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "lion-vpn"
packageVersion = rootProject.extra["versionName"] as String
appResourcesRootDir.set(project.layout.projectDirectory.dir("src/main/resources"))
+
+ macOS {
+ iconFile.set(project.file("src/main/resources/macos/icon.icns"))
+ }
+ windows {
+ iconFile.set(project.file("src/main/resources/windows/icon.ico"))
+ }
+ linux {
+ iconFile.set(project.file("src/main/resources/linux/icon.png"))
+ shortcut = true
+ appCategory = "Network"
+ menuGroup = "Network"
+ debMaintainer = "support@lionvpn.com"
+ }
}
}
}
diff --git a/cmp/desktopApp/src/main/kotlin/com/darius/lionvpn/main.kt b/cmp/desktopApp/src/main/kotlin/com/darius/lionvpn/main.kt
index 8313e770..49dac799 100644
--- a/cmp/desktopApp/src/main/kotlin/com/darius/lionvpn/main.kt
+++ b/cmp/desktopApp/src/main/kotlin/com/darius/lionvpn/main.kt
@@ -4,36 +4,44 @@ import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
+import org.jetbrains.compose.resources.painterResource
+import lion_vpn.shared.generated.resources.Res
+import lion_vpn.shared.generated.resources.logo
import org.koin.compose.koinInject
import org.koin.compose.viewmodel.koinViewModel
-fun main() = application {
- initKoin()
+fun main() {
+ System.setProperty("sun.awt.wmclass", "lion-vpn")
+ application {
+ initKoin()
- // Bulletproof fail-safe JVM Shutdown Hook to clean up spawned background processes
- Runtime.getRuntime().addShutdownHook(Thread {
- println("[Shutdown Hook] Force stopping active VPN daemon...")
- ProcessRunner.stop()
- })
-
- Window(
- onCloseRequest = {
- println("[Window] Closing application, stopping active VPN daemon...")
+ // Bulletproof fail-safe JVM Shutdown Hook to clean up spawned background processes
+ Runtime.getRuntime().addShutdownHook(Thread {
+ println("[Shutdown Hook] Force stopping active VPN daemon...")
ProcessRunner.stop()
- exitApplication()
- },
- title = "Lion VPN",
- ) {
- currentWindowHolder.window = this.window
- val viewModel: AppViewModel = koinViewModel()
- val homeState by viewModel.homeState.collectAsState()
+ })
+
+ Window(
+ onCloseRequest = {
+ println("[Window] Closing application, stopping active VPN daemon...")
+ ProcessRunner.stop()
+ exitApplication()
+ },
+ title = "Lion VPN",
+ icon = painterResource(Res.drawable.logo),
+ ) {
+ currentWindowHolder.window = this.window
+ val viewModel: AppViewModel = koinViewModel()
+ val homeState by viewModel.homeState.collectAsState()
- App(
- connectivityHandler = koinInject(),
- state = homeState,
- onClick = { event ->
- viewModel.handleEvent(event)
- }
- )
+ App(
+ connectivityHandler = koinInject(),
+ state = homeState,
+ onClick = { event ->
+ viewModel.handleEvent(event)
+ }
+ )
+ }
}
}
+
diff --git a/cmp/desktopApp/src/main/resources/linux/icon.png b/cmp/desktopApp/src/main/resources/linux/icon.png
new file mode 100644
index 00000000..64d8e026
Binary files /dev/null and b/cmp/desktopApp/src/main/resources/linux/icon.png differ
diff --git a/cmp/desktopApp/src/main/resources/logo.png b/cmp/desktopApp/src/main/resources/logo.png
new file mode 100644
index 00000000..3a073999
Binary files /dev/null and b/cmp/desktopApp/src/main/resources/logo.png differ
diff --git a/cmp/desktopApp/src/main/resources/macos/MasterHttpRelayVPN b/cmp/desktopApp/src/main/resources/macos/MasterHttpRelayVPN
index 2be9c766..3eb43c4c 100755
Binary files a/cmp/desktopApp/src/main/resources/macos/MasterHttpRelayVPN and b/cmp/desktopApp/src/main/resources/macos/MasterHttpRelayVPN differ
diff --git a/cmp/desktopApp/src/main/resources/macos/icon.icns b/cmp/desktopApp/src/main/resources/macos/icon.icns
new file mode 100644
index 00000000..cd44cf62
Binary files /dev/null and b/cmp/desktopApp/src/main/resources/macos/icon.icns differ
diff --git a/cmp/desktopApp/src/main/resources/windows/icon.ico b/cmp/desktopApp/src/main/resources/windows/icon.ico
new file mode 100644
index 00000000..830aec7a
Binary files /dev/null and b/cmp/desktopApp/src/main/resources/windows/icon.ico differ
diff --git a/cmp/iosApp/iosApp/Assets.xcassets/AppIcon-Debug.appiconset/app-icon-1024.png b/cmp/iosApp/iosApp/Assets.xcassets/AppIcon-Debug.appiconset/app-icon-1024.png
index 433cb83f..6649b5f7 100644
Binary files a/cmp/iosApp/iosApp/Assets.xcassets/AppIcon-Debug.appiconset/app-icon-1024.png and b/cmp/iosApp/iosApp/Assets.xcassets/AppIcon-Debug.appiconset/app-icon-1024.png differ
diff --git a/cmp/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png b/cmp/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png
index 53fc536f..6649b5f7 100644
Binary files a/cmp/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png and b/cmp/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/app-icon-1024.png differ
diff --git a/cmp/shared/build.gradle.kts b/cmp/shared/build.gradle.kts
index dc955a63..51d85250 100644
--- a/cmp/shared/build.gradle.kts
+++ b/cmp/shared/build.gradle.kts
@@ -79,6 +79,10 @@ kotlin {
}
}
+compose.resources {
+ publicResClass = true
+}
+
dependencies {
}
diff --git a/cmp/shared/src/commonMain/composeResources/drawable/logo.png b/cmp/shared/src/commonMain/composeResources/drawable/logo.png
new file mode 100644
index 00000000..3a073999
Binary files /dev/null and b/cmp/shared/src/commonMain/composeResources/drawable/logo.png differ
diff --git a/cmp/shared/src/commonMain/kotlin/com/darius/lionvpn/ui/home/HomeScreen.kt b/cmp/shared/src/commonMain/kotlin/com/darius/lionvpn/ui/home/HomeScreen.kt
index 9b8c1a5c..651240cc 100644
--- a/cmp/shared/src/commonMain/kotlin/com/darius/lionvpn/ui/home/HomeScreen.kt
+++ b/cmp/shared/src/commonMain/kotlin/com/darius/lionvpn/ui/home/HomeScreen.kt
@@ -15,7 +15,6 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.navigation.NavHostController
-import com.darius.lionvpn.ui.model.SavedConfig
@OptIn(ExperimentalMaterial3Api::class)
@Composable
@@ -90,6 +89,15 @@ private fun TopPart(
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Top
) {
+ Text(
+ text = "🦁 LionVPN",
+ style = MaterialTheme.typography.headlineLarge.copy(
+ fontWeight = FontWeight.Bold,
+ color = MaterialTheme.colorScheme.primary,
+ letterSpacing = 0.5.sp
+ )
+ )
+
state.log?.let {
LogTerminal(
log = it,
diff --git a/cmp/shared/src/iosMain/kotlin/com/darius/lionvpn/MainViewController.kt b/cmp/shared/src/iosMain/kotlin/com/darius/lionvpn/MainViewController.kt
index b9cf3520..5ecd12e9 100644
--- a/cmp/shared/src/iosMain/kotlin/com/darius/lionvpn/MainViewController.kt
+++ b/cmp/shared/src/iosMain/kotlin/com/darius/lionvpn/MainViewController.kt
@@ -1,9 +1,10 @@
package com.darius.lionvpn
import androidx.compose.ui.window.ComposeUIViewController
+import com.darius.lionvpn.ui.home.HomeState
import org.koin.compose.koinInject
fun MainViewController() = ComposeUIViewController {
// koin in being initiated from iosApp
- App(connectivityHandler = koinInject())
+ App(connectivityHandler = koinInject(), state = HomeState())
}