mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
OPENIDE #15 Correct collaboration of two or more IDEs based on IntelliJ IDEA
(cherry picked from commit 1f7cb2ed03217b272786e1aaebc0bfc802c31c76)
(cherry picked from commit c313f0721a)
This commit is contained in:
2
.idea/copyright/apache_2_license.xml
generated
2
.idea/copyright/apache_2_license.xml
generated
@@ -1,6 +1,6 @@
|
||||
<component name="CopyrightManager">
|
||||
<copyright>
|
||||
<option name="notice" value="Copyright 2000-&#36;today.year JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license." />
|
||||
<option name="notice" value="Copyright (c) Haulmont &#36;today.year. All Rights Reserved. Use is subject to license terms." />
|
||||
<option name="keyword" value="Copyright" />
|
||||
<option name="allowReplaceKeyword" value="JetBrains" />
|
||||
<option name="myName" value="apache 2 license" />
|
||||
|
||||
@@ -16,7 +16,7 @@ internal suspend fun createCommunityBuildContext(
|
||||
options: BuildOptions = BuildOptions(),
|
||||
projectHome: Path = COMMUNITY_ROOT.communityRoot,
|
||||
): BuildContext = BuildContextImpl.createContext(
|
||||
projectHome, IdeaCommunityProperties(COMMUNITY_ROOT.communityRoot), setupTracer = true, options = options)
|
||||
projectHome, OpenIdeProperties(COMMUNITY_ROOT.communityRoot), setupTracer = true, options = options)
|
||||
|
||||
open class IdeaCommunityProperties(private val communityHomeDir: Path) : BaseIdeaProperties() {
|
||||
companion object {
|
||||
@@ -66,7 +66,7 @@ open class IdeaCommunityProperties(private val communityHomeDir: Path) : BaseIde
|
||||
layout.withModule("intellij.platform.duplicates.analysis")
|
||||
layout.withModule("intellij.platform.structuralSearch")
|
||||
}
|
||||
|
||||
|
||||
productLayout.skipUnresolvedContentModules = true
|
||||
|
||||
mavenArtifacts.forIdeModules = true
|
||||
|
||||
82
build/src/org/jetbrains/intellij/build/OpenIdeProperties.kt
Normal file
82
build/src/org/jetbrains/intellij/build/OpenIdeProperties.kt
Normal file
@@ -0,0 +1,82 @@
|
||||
// Copyright (c) Haulmont 2024. All Rights Reserved.
|
||||
// Use is subject to license terms.
|
||||
package org.jetbrains.intellij.build
|
||||
|
||||
import org.jetbrains.intellij.build.kotlin.KotlinBinaries
|
||||
import java.nio.file.Path
|
||||
|
||||
open class OpenIdeProperties(val communityHomeDir: Path): IdeaCommunityProperties(communityHomeDir) {
|
||||
|
||||
override val baseFileName: String = "openide"
|
||||
|
||||
override fun createWindowsCustomizer(projectHome: String): WindowsDistributionCustomizer = CommunityWindowsDistributionCustomizer()
|
||||
override fun createLinuxCustomizer(projectHome: String): LinuxDistributionCustomizer = CommunityLinuxDistributionCustomizer()
|
||||
override fun createMacCustomizer(projectHome: String): MacDistributionCustomizer = CommunityMacDistributionCustomizer()
|
||||
|
||||
protected open inner class CommunityWindowsDistributionCustomizer : WindowsDistributionCustomizer() {
|
||||
init {
|
||||
icoPath = "${communityHomeDir}/build/conf/ideaCE/win/images/idea_CE.ico"
|
||||
icoPathForEAP = "${communityHomeDir}/build/conf/ideaCE/win/images/idea_CE_EAP.ico"
|
||||
installerImagesPath = "${communityHomeDir}/build/conf/ideaCE/win/images"
|
||||
fileAssociations = listOf("java", "gradle", "groovy", "kt", "kts", "pom")
|
||||
}
|
||||
|
||||
override fun getFullNameIncludingEdition(appInfo: ApplicationInfoProperties) = "OpenIDE"
|
||||
|
||||
override fun getFullNameIncludingEditionAndVendor(appInfo: ApplicationInfoProperties) = "OpenIDE"
|
||||
}
|
||||
|
||||
protected open inner class CommunityLinuxDistributionCustomizer : LinuxDistributionCustomizer() {
|
||||
init {
|
||||
iconPngPath = "${communityHomeDir}/build/conf/ideaCE/linux/images/icon_CE_128.png"
|
||||
iconPngPathForEAP = "${communityHomeDir}/build/conf/ideaCE/linux/images/icon_CE_EAP_128.png"
|
||||
snapName = "open-ide"
|
||||
snapDescription =
|
||||
"The most intelligent Java IDE. Every aspect of OpenIDE is specifically designed to maximize developer productivity. " +
|
||||
"Together, powerful static code analysis and ergonomic design make development not only productive but also an enjoyable experience."
|
||||
}
|
||||
|
||||
override fun getRootDirectoryName(appInfo: ApplicationInfoProperties, buildNumber: String) = "openIDE-$buildNumber"
|
||||
|
||||
override fun generateExecutableFilesPatterns(context: BuildContext, includeRuntime: Boolean, arch: JvmArchitecture): Sequence<String> {
|
||||
return super.generateExecutableFilesPatterns(context, includeRuntime, arch)
|
||||
.plus(KotlinBinaries.kotlinCompilerExecutables)
|
||||
.filterNot { it == "plugins/**/*.sh" }
|
||||
}
|
||||
}
|
||||
|
||||
protected open inner class CommunityMacDistributionCustomizer : MacDistributionCustomizer() {
|
||||
init {
|
||||
icnsPath = "${communityHomeDir}/build/conf/ideaCE/mac/images/idea.icns"
|
||||
icnsPathForEAP = "${communityHomeDir}/build/conf/ideaCE/mac/images/communityEAP.icns"
|
||||
urlSchemes = listOf("idea")
|
||||
associateIpr = true
|
||||
fileAssociations = FileAssociation.from("java", "groovy", "kt", "kts")
|
||||
bundleIdentifier = "ru.openide"
|
||||
dmgImagePath = "${communityHomeDir}/build/conf/ideaCE/mac/images/dmg_background.tiff"
|
||||
}
|
||||
|
||||
override fun getRootDirectoryName(appInfo: ApplicationInfoProperties, buildNumber: String): String {
|
||||
return if (appInfo.isEAP) {
|
||||
"OpenIDE ${appInfo.majorVersion}.${appInfo.minorVersionMainPart} EAP.app"
|
||||
}
|
||||
else {
|
||||
"OpenIDE.app"
|
||||
}
|
||||
}
|
||||
|
||||
override fun generateExecutableFilesPatterns(context: BuildContext, includeRuntime: Boolean, arch: JvmArchitecture): Sequence<String> {
|
||||
return super.generateExecutableFilesPatterns(context, includeRuntime, arch)
|
||||
.plus(KotlinBinaries.kotlinCompilerExecutables)
|
||||
.filterNot { it == "plugins/**/*.sh" }
|
||||
}
|
||||
}
|
||||
|
||||
override fun getSystemSelector(appInfo: ApplicationInfoProperties, buildNumber: String): String {
|
||||
return "OpenIDE${appInfo.majorVersion}.${appInfo.minorVersionMainPart}"
|
||||
}
|
||||
|
||||
override fun getBaseArtifactName(appInfo: ApplicationInfoProperties, buildNumber: String) = "openIDE-$buildNumber"
|
||||
|
||||
override fun getOutputDirectoryName(appInfo: ApplicationInfoProperties) = "open-ide"
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
<logo url="/idea_community_logo.png"/>
|
||||
<icon svg="/idea-ce.svg" svg-small="/idea-ce_16.svg"/>
|
||||
<icon-eap svg="/idea-ce-eap.svg" svg-small="/idea-ce-eap_16.svg"/>
|
||||
<names product="IDEA" fullname="IntelliJ IDEA" edition="Community Edition" script="idea" motto="Capable and Ergonomic IDE for JVM"/>
|
||||
<names product="OpenIDE" fullname="OpenIDE" script="openide" motto="Capable and Ergonomic IDE for JVM"/>
|
||||
|
||||
<essential-plugin>com.intellij.java</essential-plugin>
|
||||
<essential-plugin>com.intellij.java.ide</essential-plugin>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright (c) Haulmont 2024. All Rights Reserved.
|
||||
// Use is subject to license terms.
|
||||
package com.intellij.idea.customization.base
|
||||
|
||||
import com.intellij.openapi.util.BuildNumber
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright (c) Haulmont 2024. All Rights Reserved.
|
||||
// Use is subject to license terms.
|
||||
package com.intellij.util.io
|
||||
|
||||
import java.net.URL
|
||||
|
||||
Reference in New Issue
Block a user