Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions HOW-TO-BUILD.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# How to build KorGE Forge?

1. Clone korge-forge plugin: git clone https://github.com/korlibs/korge-forge-plugin.git
2. ./gradlew doForgeRelease in korge-forge-plugin
3. Execute ./build_forge.sh
2. Run `./gradlew doForgeRelease` in korge-forge-plugin
3. Execute `./build_forge.sh`

The build script provides an interactive interface with:
- Automatic Java detection
- Platform selection (current platform or all platforms)
- Incremental build option
- Colored output for better visibility
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file still has no trailing newline (shown as “No newline at end of file” in the diff), which can cause minor tooling issues.

🤖 Was this useful? React with 👍 or 👎

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ open class IdeaCommunityProperties(communityHomeDir: Path) : BaseIdeaCommunityPr
"intellij.eclipse",
"intellij.sh.python",
"intellij.ant",
"intellij.gdpr"
"intellij.gdpr",
"intellij.modules.kotlin.k2"
//////////////
//"intellij.vcs.gitlab",
//"intellij.groovy",
Expand Down
236 changes: 220 additions & 16 deletions build_forge.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,222 @@
#!/usr/bin/env bash
#
# KorGE Forge Interactive Build Script
# This script provides an interactive menu to build KorGE Forge
#

set -e
export JAVA_HOME=/home/sauron/.jdks/jbr-21.0.8
export PATH=$JAVA_HOME/bin:$PATH
BUILD_ONLY_CURRENT_PLATFORM=true

echo 'Starting KorGE Forge build script!'

if [ "$BUILD_ONLY_CURRENT_PLATFORM" = "true" ]; then
echo 'Starting building for current platform...'
./installers.cmd -Dintellij.build.target.os=current
else
echo 'Starting building for all platforms...'
./installers.cmd
fi

echo 'Find the built KorGE Forge in out/korgeforge/artifacts/ and extract it'
echo 'Run with ./korge.sh in bin/'

# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
CYAN='\033[0;36m'
BOLD='\033[1m'
NC='\033[0m' # No Color

# Default values
BUILD_PLATFORM="current"
JAVA_HOME_PATH=""
INCREMENTAL_BUILD="false"

# Print colored header
print_header() {
echo -e "${CYAN}"
echo "╔════════════════════════════════════════════════════════════╗"
echo "║ KorGE Forge Interactive Build Script ║"
echo "╚════════════════════════════════════════════════════════════╝"
echo -e "${NC}"
}

# Print info message
info() {
echo -e "${BLUE}[INFO]${NC} $1"
}

# Print success message
success() {
echo -e "${GREEN}[SUCCESS]${NC} $1"
}

# Print warning message
warn() {
echo -e "${YELLOW}[WARNING]${NC} $1"
}

# Print error message
error() {
echo -e "${RED}[ERROR]${NC} $1"
}

# Get Java version from a java binary
get_java_version() {
"$1" -version 2>&1 | head -n 1 | cut -d'"' -f2
}

# Detect Java installation
detect_java() {
info "Detecting Java installation..."

if [ -n "$JAVA_HOME" ]; then
if [ -x "$JAVA_HOME/bin/java" ]; then
JAVA_VERSION=$(get_java_version "$JAVA_HOME/bin/java")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

detect_java reports “Please install JDK 21”, but it currently accepts any java it finds (and may derive a JAVA_HOME_PATH that points to a JRE). Consider validating the detected major version (and that it’s a full JDK) early so failures don’t happen later inside installers.cmd.

🤖 Was this useful? React with 👍 or 👎

success "Found Java at JAVA_HOME: $JAVA_HOME (Version: $JAVA_VERSION)"
JAVA_HOME_PATH="$JAVA_HOME"
return 0
fi
fi

if command -v java &> /dev/null; then
JAVA_PATH=$(which java)
JAVA_VERSION=$(get_java_version java)
success "Found Java in PATH: $JAVA_PATH (Version: $JAVA_VERSION)"
# Try to determine JAVA_HOME from java path
JAVA_REAL_PATH=$(readlink -f "$JAVA_PATH" 2>/dev/null || echo "$JAVA_PATH")
JAVA_BIN_DIR=$(dirname "$JAVA_REAL_PATH")
JAVA_HOME_PATH=$(dirname "$JAVA_BIN_DIR")
return 0
fi

error "Java not found. Please install JDK 21 or set JAVA_HOME."
return 1
}

# Platform selection menu
select_platform() {
echo -e "\n${BOLD}Select Build Platform:${NC}"
echo " 1) Current platform only (faster)"
echo " 2) All platforms (Windows, macOS, Linux)"
echo ""

while true; do
read -p "Enter choice [1-2]: " choice
case $choice in
1)
BUILD_PLATFORM="current"
info "Selected: Build for current platform only"
break
;;
2)
BUILD_PLATFORM="all"
info "Selected: Build for all platforms"
break
;;
*)
warn "Invalid choice. Please enter 1 or 2."
;;
esac
done
}

# Incremental build option
select_incremental() {
echo -e "\n${BOLD}Incremental Build:${NC}"
echo " 1) Full build (clean)"
echo " 2) Incremental build (faster, may have issues)"
echo ""

while true; do
read -p "Enter choice [1-2]: " choice
case $choice in
1)
INCREMENTAL_BUILD="false"
info "Selected: Full build"
break
;;
2)
INCREMENTAL_BUILD="true"
info "Selected: Incremental build"
break
;;
*)
warn "Invalid choice. Please enter 1 or 2."
;;
esac
done
}

# Confirmation prompt
confirm_build() {
echo -e "\n${BOLD}Build Configuration Summary:${NC}"
echo " • Platform: $BUILD_PLATFORM"
echo " • Incremental: $INCREMENTAL_BUILD"
echo " • Java Home: $JAVA_HOME_PATH"
echo ""

while true; do
read -p "Proceed with build? [y/n]: " yn
case $yn in
[Yy]* )
return 0
;;
[Nn]* )
info "Build cancelled by user."
exit 0
;;
* )
warn "Please answer y or n."
;;
esac
done
}

# Run the build
run_build() {
echo -e "\n${CYAN}═══════════════════════════════════════════════════════════════${NC}"
info "Starting KorGE Forge build..."
echo -e "${CYAN}═══════════════════════════════════════════════════════════════${NC}\n"

# Set JAVA_HOME
export JAVA_HOME="$JAVA_HOME_PATH"
export PATH="$JAVA_HOME/bin:$PATH"

# Build arguments as array for safe argument passing
BUILD_ARGS=()

if [ "$BUILD_PLATFORM" = "current" ]; then
BUILD_ARGS+=("-Dintellij.build.target.os=current")
fi

if [ "$INCREMENTAL_BUILD" = "true" ]; then
BUILD_ARGS+=("-Dintellij.build.incremental.compilation=true")
fi

info "Running: ./installers.cmd ${BUILD_ARGS[*]}"
echo ""

# Run the build with array expansion
./installers.cmd "${BUILD_ARGS[@]}"

echo ""
success "Build completed!"
echo -e "\n${GREEN}Find the built KorGE Forge in out/korgeforge/artifacts/${NC}"
echo -e "${GREEN}Extract and run with ./korge.sh in bin/${NC}\n"
}

# Main function
main() {
print_header

# Check we're in the right directory
if [ ! -f "installers.cmd" ]; then
error "This script must be run from the korge-forge root directory."
exit 1
fi

# Detect Java
if ! detect_java; then
exit 1
fi

# Interactive menu
select_platform
select_incremental

# Confirm and build
confirm_build
run_build
}

# Run main
main "$@"
3 changes: 2 additions & 1 deletion community-resources/resources/idea/IdeaApplicationInfo.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<component xmlns="http://jetbrains.org/intellij/schema/application-info">
<version major="2025" minor="2.1"/>
<version major="2025" minor="2.1.1"/>
<company name="KorGE" url="https://korge.org"/>
<build number="KF-__BUILD__" date="__BUILD_DATE__" majorReleaseDate="20250804"/>
<logo url="/korge_forge_logo.jpg"/>
<icon svg="/korge.svg" svg-small="/korge_16.svg"/>
<icon-eap svg="/korge.svg" svg-small="/korge_16.svg"/>
<names product="KORGE" fullname="KorGE Forge" edition="Fenix Edition" script="korge" motto="KorGE Game Engine"/>


<essential-plugin>com.intellij.java</essential-plugin>
<essential-plugin>com.intellij.java.ide</essential-plugin>
<essential-plugin>com.intellij.modules.json</essential-plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ fun VirtualFile.isJavaFileType(): Boolean {
FileTypeManager.getInstance().getFileTypeByFileName(nameSequence) == JavaFileType.INSTANCE
}

fun VirtualFile.getOriginalOrDelegateFile(): VirtualFile =
fun VirtualFile.getOriginalOrDelegateFileOrSelf(): VirtualFile =
getOriginalOrDelegateFile() ?: this

fun VirtualFile.getOriginalOrDelegateFile(): VirtualFile? =
when (this) {
is VirtualFileWindow -> delegate.getOriginalOrDelegateFile()
is LightVirtualFileBase -> originalFile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import org.jetbrains.kotlin.idea.compiler.configuration.KotlinCommonCompilerArgu
import org.jetbrains.kotlin.idea.compiler.configuration.KotlinCompilerSettingsListener
import org.jetbrains.kotlin.idea.facet.KotlinFacet
import org.jetbrains.kotlin.idea.facet.isKotlinFacet
import org.jetbrains.kotlin.idea.util.getOriginalOrDelegateFile
import org.jetbrains.kotlin.idea.util.getOriginalOrDelegateFileOrSelf
import org.jetbrains.kotlin.idea.workspaceModel.KotlinSettingsEntity
import org.jetbrains.kotlin.scripting.compiler.plugin.impl.makeScriptCompilerArguments
import org.jetbrains.kotlin.scripting.definitions.findScriptDefinition
Expand Down Expand Up @@ -152,7 +152,7 @@ internal class KtCompilerPluginsProviderIdeImpl(
is KaScriptModule -> {
val registrarForModule = pluginsCache?.registrarForScriptModule ?: return emptyList()
val cacheKey = module.file.virtualFile
.getOriginalOrDelegateFile()
.getOriginalOrDelegateFileOrSelf()

module.getExtensionsForModule(registrarForModule, cacheKey, extensionType)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.tasks.jira.rest;

import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.vfs.CharsetToolkit;
import com.intellij.tasks.CustomTaskState;
import com.intellij.tasks.Task;
Expand Down Expand Up @@ -75,7 +76,13 @@ protected JiraRestApi(@NotNull JiraRepository repository) {
}

protected @NotNull GetMethod getMultipleIssuesSearchMethod(String jql, int max) {
GetMethod method = new GetMethod(myRepository.getRestUrl("search"));
GetMethod method;
if (Registry.is("tasks.use.search.jql.api", true)) {
method = new GetMethod(myRepository.getRestUrl("search/jql"));
}
else {
method = new GetMethod(myRepository.getRestUrl("search"));
}
method.setQueryString(new NameValuePair[]{
new NameValuePair("jql", jql),
new NameValuePair("maxResults", String.valueOf(max))
Expand Down
3 changes: 3 additions & 0 deletions plugins/tasks/tasks-core/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,8 @@
<statistics.counterUsagesCollector implementationClass="com.intellij.tasks.impl.TaskManagementUsageCollector"/>
<statistics.projectUsagesCollector implementation="com.intellij.tasks.impl.TaskManagementConfigurationCollector"/>
<statistics.projectUsagesCollector implementation="com.intellij.tasks.core.fus.TasksStateCollector"/>

<registryKey key="tasks.use.search.jql.api" defaultValue="true"
description="Use /rest/api/[2|3|laters]/search/jql REST API instead of /rest/api/[2|3|laters]/search/, deprecated in https://developer.atlassian.com/changelog/#CHANGE-2046"/>
</extensions>
</idea-plugin>
17 changes: 11 additions & 6 deletions python/helpers/pydev/_pydev_bundle/pydev_is_thread_alive.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,18 @@
# It is required to debug threads started by start_new_thread in Python 3.4
_temp = threading.Thread()

# Python >=3.14
if hasattr(_temp, "_os_thread_handle") and hasattr(_temp, "_started"):
def is_thread_alive(t):
return not t._os_thread_handle.is_done()

# Python ==3.13
elif hasattr(_temp, "_handle") and hasattr(_temp, "_started"):
def is_thread_alive(t):
return not t._handle.is_done()

# Python <=3.12
if hasattr(_temp, '_is_stopped'):
elif hasattr(_temp, '_is_stopped'):
def is_thread_alive(t):
return not t._is_stopped

Expand All @@ -20,11 +30,6 @@ def is_thread_alive(t):
def is_thread_alive(t):
return t.isAlive()

# Python >=3.13
elif hasattr(_temp, 'is_alive'):
def is_thread_alive(t):
return t.is_alive()

else:
def is_thread_alive(t):
raise RuntimeError('Cannot determine how to check if thread is alive')
Expand Down
Loading