From 58a6f4ae3f46e839fb700694199c9608a0089e4a Mon Sep 17 00:00:00 2001 From: serge-rider Date: Sat, 5 Feb 2022 17:38:31 +0300 Subject: [PATCH] dbeaver/dbeaver#14882 WinStore packaging fix + JNA boot path patch --- .../feature.xml | 10 +---- .../META-INF/MANIFEST.MF | 12 ++++++ .../build.properties | 5 +++ .../plugin.xml | 28 +++++++++++++ .../org.jkiss.dbeaver.ui.app.winstore/pom.xml | 14 +++++++ .../dbeaver/winstore/WinStoreService.java | 40 +++++++++++++++++++ plugins/pom.xml | 1 + 7 files changed, 101 insertions(+), 9 deletions(-) create mode 100644 plugins/org.jkiss.dbeaver.ui.app.winstore/META-INF/MANIFEST.MF create mode 100644 plugins/org.jkiss.dbeaver.ui.app.winstore/build.properties create mode 100644 plugins/org.jkiss.dbeaver.ui.app.winstore/plugin.xml create mode 100644 plugins/org.jkiss.dbeaver.ui.app.winstore/pom.xml create mode 100644 plugins/org.jkiss.dbeaver.ui.app.winstore/src/org/jkiss/dbeaver/winstore/WinStoreService.java diff --git a/features/org.jkiss.dbeaver.appstore.feature/feature.xml b/features/org.jkiss.dbeaver.appstore.feature/feature.xml index a23a5b5dbf..3a0abcbdbb 100644 --- a/features/org.jkiss.dbeaver.appstore.feature/feature.xml +++ b/features/org.jkiss.dbeaver.appstore.feature/feature.xml @@ -37,17 +37,9 @@ - - - - - - - - - + diff --git a/plugins/org.jkiss.dbeaver.ui.app.winstore/META-INF/MANIFEST.MF b/plugins/org.jkiss.dbeaver.ui.app.winstore/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..869c601b10 --- /dev/null +++ b/plugins/org.jkiss.dbeaver.ui.app.winstore/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Vendor: DBeaver Corp +Bundle-Name: DBeaver Windows Store extension +Bundle-SymbolicName: org.jkiss.dbeaver.ui.app.winstore;singleton:=true +Bundle-ActivationPolicy: lazy +Bundle-Version: 1.0.0.qualifier +Bundle-Release-Date: 20220207 +Bundle-RequiredExecutionEnvironment: JavaSE-11 +Bundle-ClassPath: . +Require-Bundle: org.jkiss.dbeaver.model +Automatic-Module-Name: org.jkiss.dbeaver.ui.app.winstore diff --git a/plugins/org.jkiss.dbeaver.ui.app.winstore/build.properties b/plugins/org.jkiss.dbeaver.ui.app.winstore/build.properties new file mode 100644 index 0000000000..7279804189 --- /dev/null +++ b/plugins/org.jkiss.dbeaver.ui.app.winstore/build.properties @@ -0,0 +1,5 @@ +source.. = src/ +output.. = target/classes/ +bin.includes = .,\ + META-INF/,\ + plugin.xml diff --git a/plugins/org.jkiss.dbeaver.ui.app.winstore/plugin.xml b/plugins/org.jkiss.dbeaver.ui.app.winstore/plugin.xml new file mode 100644 index 0000000000..6313a93324 --- /dev/null +++ b/plugins/org.jkiss.dbeaver.ui.app.winstore/plugin.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + diff --git a/plugins/org.jkiss.dbeaver.ui.app.winstore/pom.xml b/plugins/org.jkiss.dbeaver.ui.app.winstore/pom.xml new file mode 100644 index 0000000000..7da2a24195 --- /dev/null +++ b/plugins/org.jkiss.dbeaver.ui.app.winstore/pom.xml @@ -0,0 +1,14 @@ + + + 4.0.0 + + org.jkiss.dbeaver + plugins + 1.0.0-SNAPSHOT + ../ + + org.jkiss.dbeaver.ui.app.winstore + 1.0.0-SNAPSHOT + eclipse-plugin + diff --git a/plugins/org.jkiss.dbeaver.ui.app.winstore/src/org/jkiss/dbeaver/winstore/WinStoreService.java b/plugins/org.jkiss.dbeaver.ui.app.winstore/src/org/jkiss/dbeaver/winstore/WinStoreService.java new file mode 100644 index 0000000000..9a24e534a7 --- /dev/null +++ b/plugins/org.jkiss.dbeaver.ui.app.winstore/src/org/jkiss/dbeaver/winstore/WinStoreService.java @@ -0,0 +1,40 @@ +/* + * DBeaver - Universal Database Manager + * Copyright (C) 2010-2022 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jkiss.dbeaver.winstore; + +import org.jkiss.dbeaver.Log; +import org.jkiss.dbeaver.runtime.IPluginService; +import org.jkiss.dbeaver.utils.SystemVariablesResolver; + +public class WinStoreService implements IPluginService { + + private static final Log log = Log.getLog(WinStoreService.class); + + @Override + public void activateService() { + // Modify JNI binaries path + String installPath = SystemVariablesResolver.getInstallPath(); + System.setProperty("jna.boot.library.path", installPath); + + log.debug("JNA boot path set to " + installPath); + } + + @Override + public void deactivateService() { + + } +} diff --git a/plugins/pom.xml b/plugins/pom.xml index 3ff18f7372..a421d347b8 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -82,6 +82,7 @@ org.jkiss.dbeaver.core org.jkiss.dbeaver.ui.app.standalone org.jkiss.dbeaver.ui.app.eclipse + org.jkiss.dbeaver.ui.app.winstore org.jkiss.dbeaver.ext.athena.ui org.jkiss.dbeaver.ext.bigquery.ui -- GitLab