Skip to content

Commit

Permalink
Release 2.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
lfeigen committed May 23, 2023
1 parent 03d7205 commit 4e4d476
Show file tree
Hide file tree
Showing 525 changed files with 77,140 additions and 20,327 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ target
**/.settings
**/.settings/*
release.properties
release-info
**/pom.xml.releaseBackup
*.hold
*.log
Expand All @@ -36,7 +35,6 @@ frontend/.DS_Store
frontend/**/.idea
frontend/libs
frontend/src/css/images
frontend/oraclejetconfig.json
frontend/electron-test/NewWDTModelFile.yml
frontend/electron-test/electronTest.log
frontend/electron-test/node_modules/
Expand Down Expand Up @@ -66,3 +64,7 @@ hugo/*/.vscode/
hugo/*/.hugo_build.lock

*start-weblogic.out

# These are side effects of the WKTUI tests
frontend/wktui-tests/node_modules/**
weblogic-toolkit-ui/
2,107 changes: 1,319 additions & 788 deletions THIRD_PARTY_LICENSES.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>console-backend</artifactId>
<groupId>com.oracle.weblogic</groupId>
<version>2.4.2</version>
<version>2.4.4</version>
</parent>

<packaging>pom</packaging>
Expand Down
54 changes: 43 additions & 11 deletions build-electron.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
#!/bin/bash
do_docker_pull() {
for i in 1 2 3
do
if docker pull $1
then
return 0
fi
sleep $(($i * 30))
done
exit 1
}

set -e
doit_docker() {
mkdir -p $tmp
Expand All @@ -25,14 +37,16 @@ export ALREADY_IN_DOCKER=true
rm -rf /build.in/electron/dist
cp -rp electron/dist /build.in/electron
!
ELECTRON_BUILDER_IMAGE=${ELECTRON_BUILDER_IMAGE:-electronuserland/builder:12}
do_docker_pull $ELECTRON_BUILDER_IMAGE
chmod a+x $tmp/script
docker run \
--network=host \
--name electron-build.$$ \
--mount type=bind,source="$PWD",destination=/build.in \
--mount type=bind,source="$tmp/script",destination=/tmp/script,ro \
--entrypoint=/tmp/script \
${ELECTRON_BUILDER_IMAGE:-electronuserland/builder:12}
$ELECTRON_BUILDER_IMAGE
}

# If we're running inside docker, copy the output out at the end
Expand Down Expand Up @@ -128,32 +142,50 @@ darwin)
esac
mkdir -p "$extra"

if [ "$os" = windows ]
then
extra_modules=",jdk.crypto.mscapi"
fi

# Make a Custom JRE (if we had modules, we could do more, but this is fine)
jlink --output "$extra"/customjre --no-header-files --no-man-pages --compress=2 --strip-debug --add-modules java.base,java.desktop,java.logging,java.management,java.naming,java.sql,java.xml,jdk.unsupported
jlink --output "$extra"/customjre --no-header-files --no-man-pages --compress=2 --strip-debug --add-modules java.base,java.desktop,java.logging,java.management,java.naming,java.sql,java.xml,jdk.unsupported$extra_modules

mkdir -p "$extra"/backend
cp -rp ../runnable/* "$extra"/backend
cp -p package.json "$extra"
if [ "$1" = internal ]
then
shift
cp -p internal-feed-url.json "$extra/feed-url.json"
fi

npm run dist "$@"

case "$os" in
darwin)
# Create a second copy of the executable for use by WKT UI, so that Mac OS thinks
# that they are two separate programs and let's you run them.
cd dist/mac
cp -p "WebLogic Remote Console.app/Contents/MacOS/WebLogic Remote Console" "WebLogic Remote Console.app/Contents/MacOS/Embeddable Remote Console"
zip ../*.zip "WebLogic Remote Console.app/Contents/MacOS/Embeddable Remote Console"
cd ../..
for mac_dir in dist/mac*
do
mac_suffix=${mac_dir#dist/mac}
# Create a second copy of the executable for use by WKT UI, so that Mac OS thinks
# that they are two separate programs and let's you run them.
cd $mac_dir
cp -p "WebLogic Remote Console.app/Contents/MacOS/WebLogic Remote Console" "WebLogic Remote Console.app/Contents/MacOS/Embeddable Remote Console"
zip ../*.zip "WebLogic Remote Console.app/Contents/MacOS/Embeddable Remote Console"
cd ../..
done
esac

if set | grep -q CODESIGNBUREAU
then
case "$os" in
darwin)
./signMac dist/mac/"WebLogic Remote Console.app" signed/mac/"WebLogic Remote Console.app"
# Regenerate using the signed version
"$(npm bin)/electron-builder" -p never --pd="signed/mac/WebLogic Remote Console.app"
for mac_dir in dist/mac*
do
mac_suffix=${mac_dir#dist/mac}
./signMac $mac_dir/"WebLogic Remote Console.app" signed/mac${mac_suffix}/"WebLogic Remote Console.app"
# Regenerate using the signed version
"$(npm bin)/electron-builder" -p never --pd="signed/mac${mac_suffix}/WebLogic Remote Console.app"
done
;;
windows)
rm -rf "$tmp"/*
Expand Down
Binary file removed build-tools/checkstyle-8.36-all.jar
Binary file not shown.
23 changes: 21 additions & 2 deletions build-tools/checkstyle.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,30 @@
#!/bin/bash

# Copyright 2020, Oracle Corporation and/or its affiliates. All rights reserved.
# Copyright 2020, 2023, Oracle Corporation and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.

set -e

mydir=$PWD
CHECKSTYLE_JAR="$mydir/target/checkstyle.jar"
# DOWNLOAD_CHECKSTYLE_URL=${DOWNLOAD_CHECKSTYLE_URL:-https://github.com/checkstyle/checkstyle/releases/download/checkstyle-10.10.0/checkstyle-10.10.0-all.jar}
DOWNLOAD_CHECKSTYLE_URL=${DOWNLOAD_CHECKSTYLE_URL:-https://github.com/checkstyle/checkstyle/releases/download/checkstyle-8.36/checkstyle-8.36-all.jar}
if ! unzip -v "$CHECKSTYLE_JAR" > /dev/null 2>&1
then
mkdir -p "${CHECKSTYLE_JAR%/*}"
if ! curl -s -L -o "$CHECKSTYLE_JAR" ${DOWNLOAD_CHECKSTYLE_URL}
then
echo Cannot download checkstyle, exiting >&2
exit 1
fi
fi

tmp="/tmp/checkstyle.out"
rm -f "$tmp"

cd ..
if find $mydir -name '*.java' | xargs java -jar build-tools/checkstyle-8.36-all.jar -c=build-tools/src/main/resources/checkstyle/customized_google_checks.xml | grep WARN
if ! java -jar "$CHECKSTYLE_JAR" -c=build-tools/src/main/resources/checkstyle/customized_google_checks.xml $(find "$mydir" -name '*.java') > $tmp 2>&1 || grep -q WARN "$tmp"
then
cat $tmp
exit 1
fi
2 changes: 1 addition & 1 deletion build-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.oracle.weblogic.console-backend</groupId>
<artifactId>build-tools</artifactId>
<version>2.4.2</version>
<version>2.4.4</version>
<name>Build Tools</name>

<properties>
Expand Down
7 changes: 5 additions & 2 deletions electron/app/js/auto-prefs-json.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license
* Copyright (c) 2022, Oracle and/or its affiliates.
* Copyright (c) 2022, 2023, Oracle and/or its affiliates.
* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
* @ignore
*/
Expand Down Expand Up @@ -89,6 +89,9 @@ const AutoPrefs = (() => {
clear: () => {
_fields = {};
},
getPath: (userDataPath) => {
return `${userDataPath}/auto-prefs.json`;
},
/**
* Populates the in-memory data that ``AutoPrefs`` knows about, by reading and parsing the JSON content in the ``auto-prefs.json`` file.
* <p>If the <code>userDataPath</code> argument was passed, it's used as the path to the <code>auto-prefs.json</code> file. Otherwise, a check is done to see if a <code>userDataPath</code> in-memory field has been set. If so, then the value assigned to that field is used used as the path to the <code>auto-prefs.json</code> file.</p>
Expand All @@ -101,7 +104,7 @@ const AutoPrefs = (() => {
// function argument, regardless.
_appPaths.userDataPath = userDataPath;
// Construct full path to auto-prefs.json file
const filepath = `${userDataPath}/auto-prefs.json`;
const filepath = AutoPrefs.getPath(userDataPath);
if (fs.existsSync(filepath)) {
try {
const props = JSON.parse(fs.readFileSync(filepath));
Expand Down
18 changes: 12 additions & 6 deletions electron/app/js/auto-update-utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license
* Copyright (c) 2022, Oracle and/or its affiliates.
* Copyright (c) 2023, Oracle and/or its affiliates.
* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
* @ignore
*/
Expand All @@ -13,21 +13,27 @@ let _updateInfo;

(() => {
autoUpdater.autoDownload = false;
autoUpdater.allowDowngrade = false;
})();

autoUpdater.on('update-available', (info) => {
_updateInfo = info;
});

async function checkForUpdates() {
return Promise.resolve(getAutoUpdateInfo());
return Promise.resolve(autoUpdater.checkForUpdates());
}

function getAutoUpdateInfo() {
return (typeof _updateInfo === 'undefined' ? {version: autoUpdater.currentVersion.version} : _updateInfo);
function getVersion() {
return _updateInfo.version;
}

function setFeedURL(feedURL) {
autoUpdater.setFeedURL(feedURL);
}

module.exports = {
getAutoUpdateInfo,
getVersion,
setFeedURL,
checkForUpdates
};
};
10 changes: 5 additions & 5 deletions electron/app/js/config-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/**
* See {@link https://stackabuse.com/javascripts-immediately-invoked-function-expressions/}
* @type {{getFilename, getAll, set, read, get, initialize, write}}
* @type {{getPath, getAll, set, read, get, initialize, write}}
*/
const AppConfig = (() => {
const fs = require('fs');
Expand All @@ -32,7 +32,7 @@ const AppConfig = (() => {
_config['persistenceDirectory'] = options.appPaths.userData;
AppConfig.read();
},
getFilename: () => {
getPath: () => {
return `${_appPaths.userDataPath}/config.json`;
},
getAll: () => {
Expand All @@ -48,9 +48,9 @@ const AppConfig = (() => {
if (settings.executablePath) _config['executableJar'] = `${_appPaths.exe}/${settings.executablePath}`;
},
read: () => {
if (fs.existsSync(AppConfig.getFilename())) {
if (fs.existsSync(AppConfig.getPath())) {
try {
const settings = JSON.parse(fs.readFileSync(AppConfig.getFilename()).toString());
const settings = JSON.parse(fs.readFileSync(AppConfig.getPath()).toString());
AppConfig.set(settings);
}
catch(err) {
Expand All @@ -60,7 +60,7 @@ const AppConfig = (() => {
},
write: () => {
// Creates the file, if it doesn't exists
fs.writeFileSync(AppConfig.getFilename(), JSON.stringify(_config, null, 4));
fs.writeFileSync(AppConfig.getPath(), JSON.stringify(_config, null, 4));
}
};

Expand Down
9 changes: 4 additions & 5 deletions electron/app/js/ipcRendererPreload.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @license
* Copyright (c) 2021, 2022 Oracle and/or its affiliates.
* Copyright (c) 2021, 2023 Oracle and/or its affiliates.
* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
* @ignore
*/
Expand All @@ -15,7 +15,6 @@ contextBridge.exposeInMainWorld(
ipc: {
receive: (channel, func) => {
const validChannels = [
'on-login',
'on-project-switched',
'start-app-quit'
];
Expand All @@ -29,7 +28,6 @@ contextBridge.exposeInMainWorld(
},
cancelReceive: (channel) => {
const validChannels = [
'on-login',
'on-project-switched'
];
if (validChannels.includes(channel)) {
Expand All @@ -42,7 +40,7 @@ contextBridge.exposeInMainWorld(
invoke: async (channel, arg) => {
const validChannels = [
'translated-strings-sending',
'current-login',
'complete-login',
'perform-login',
'project-changing',
'current-project-requesting',
Expand All @@ -51,7 +49,8 @@ contextBridge.exposeInMainWorld(
'file-choosing',
'file-reading',
'file-writing',
'submenu-state-setting',
'is-busy',
'unsaved-changes',
'preference-reading',
'window-app-quiting'
];
Expand Down
Loading

0 comments on commit 4e4d476

Please sign in to comment.