|
|
|
|
@@ -13,6 +13,7 @@
|
|
|
|
|
// along with this program. If not, see http://www.gnu.org/licenses/.
|
|
|
|
|
package org.jetbrains.intellij.build
|
|
|
|
|
|
|
|
|
|
import kotlinx.collections.immutable.plus
|
|
|
|
|
import org.jetbrains.intellij.build.kotlin.KotlinBinaries
|
|
|
|
|
import ru.openide.OpenIdePluginBundler
|
|
|
|
|
import java.nio.file.Path
|
|
|
|
|
@@ -21,67 +22,9 @@ open class OpenIdeProperties(val communityHomeDir: Path): IdeaCommunityPropertie
|
|
|
|
|
|
|
|
|
|
override val baseFileName: String = "openide"
|
|
|
|
|
|
|
|
|
|
override fun createWindowsCustomizer(projectHome: String): WindowsDistributionCustomizer = OpenIdeWindowsDistributionCustomizer()
|
|
|
|
|
override fun createLinuxCustomizer(projectHome: String): LinuxDistributionCustomizer = OpenIdeLinuxDistributionCustomizer()
|
|
|
|
|
override fun createMacCustomizer(projectHome: String): MacDistributionCustomizer = OpenIdeMacDistributionCustomizer()
|
|
|
|
|
|
|
|
|
|
protected open inner class OpenIdeWindowsDistributionCustomizer : WindowsDistributionCustomizer() {
|
|
|
|
|
init {
|
|
|
|
|
icoPath = "${communityHomeDir}/build/conf/openIDE/win/images/openide.ico"
|
|
|
|
|
icoPathForEAP = "${communityHomeDir}/build/conf/openIDE/win/images/openide_eap.ico"
|
|
|
|
|
installerImagesPath = "${communityHomeDir}/build/conf/openIDE/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 OpenIdeLinuxDistributionCustomizer : LinuxDistributionCustomizer() {
|
|
|
|
|
init {
|
|
|
|
|
iconPngPath = "${communityHomeDir}/build/conf/openIDE/linux/images/openide_128.png"
|
|
|
|
|
iconPngPathForEAP = "${communityHomeDir}/build/conf/openIDE/linux/images/openide_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, targetLibcImpl: LibcImpl): Sequence<String> =
|
|
|
|
|
super.generateExecutableFilesPatterns(context, includeRuntime, arch, targetLibcImpl)
|
|
|
|
|
.plus(KotlinBinaries.kotlinCompilerExecutables)
|
|
|
|
|
.filterNot { it == "plugins/**/*.sh" }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected open inner class OpenIdeMacDistributionCustomizer : MacDistributionCustomizer() {
|
|
|
|
|
init {
|
|
|
|
|
icnsPath = "${communityHomeDir}/build/conf/openIDE/mac/images/openide.icns"
|
|
|
|
|
icnsPathForEAP = "${communityHomeDir}/build/conf/openIDE/mac/images/openide_eap.icns"
|
|
|
|
|
urlSchemes = listOf("idea")
|
|
|
|
|
associateIpr = true
|
|
|
|
|
fileAssociations = FileAssociation.from("java", "groovy", "kt", "kts")
|
|
|
|
|
bundleIdentifier = "ru.openide"
|
|
|
|
|
dmgImagePath = "${communityHomeDir}/build/conf/openIDE/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 createWindowsCustomizer(projectHome: Path): WindowsDistributionCustomizer = openideWindowsCustomizer(communityHomeDir)
|
|
|
|
|
override fun createLinuxCustomizer(projectHome: String): LinuxDistributionCustomizer = openideLinuxCustomizer(communityHomeDir)
|
|
|
|
|
override fun createMacCustomizer(projectHome: Path): MacDistributionCustomizer = openideMacCustomizer(communityHomeDir)
|
|
|
|
|
|
|
|
|
|
override fun getSystemSelector(appInfo: ApplicationInfoProperties, buildNumber: String): String {
|
|
|
|
|
return "OpenIDE${appInfo.majorVersion}.${appInfo.minorVersionMainPart}"
|
|
|
|
|
@@ -94,4 +37,74 @@ open class OpenIdeProperties(val communityHomeDir: Path): IdeaCommunityPropertie
|
|
|
|
|
override suspend fun getAdditionalPluginPaths(context: BuildContext): List<Path> {
|
|
|
|
|
return OpenIdePluginBundler.getBundlePluginPaths(context)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline fun openideWindowsCustomizer(projectHome: Path, configure: WindowsCustomizerBuilder.() -> Unit = {}): WindowsDistributionCustomizer {
|
|
|
|
|
return windowsCustomizer(projectHome) {
|
|
|
|
|
// Set Community defaults
|
|
|
|
|
icoPath = "build/conf/openIDE/win/images/openide.ico"
|
|
|
|
|
icoPathForEAP = "build/conf/openIDE/win/images/openide_eap.ico"
|
|
|
|
|
installerImagesPath = "build/conf/openIDE/win/images"
|
|
|
|
|
fileAssociations = listOf("java", "gradle", "groovy", "kt", "kts", "pom")
|
|
|
|
|
|
|
|
|
|
fullName { "OpenIDE" }
|
|
|
|
|
|
|
|
|
|
fullNameAndVendor { "OpenIDE" }
|
|
|
|
|
|
|
|
|
|
// Apply user configuration
|
|
|
|
|
configure()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline fun openideLinuxCustomizer(projectHome: Path, configure: LinuxCustomizerBuilder.() -> Unit = {}): LinuxDistributionCustomizer {
|
|
|
|
|
return linuxCustomizer(projectHome) {
|
|
|
|
|
// Set Community defaults
|
|
|
|
|
iconPngPath = "build/conf/openIDE/linux/images/openide_128.png"
|
|
|
|
|
iconPngPathForEAP = "build/conf/openIDE/linux/images/openide_eap_128.png"
|
|
|
|
|
snaps += LinuxDistributionCustomizer.Snap(
|
|
|
|
|
name = "open-ide",
|
|
|
|
|
description =
|
|
|
|
|
"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."
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
rootDirectoryName { _, buildNumber -> "openIDE-$buildNumber" }
|
|
|
|
|
|
|
|
|
|
executableFilePatterns { base, _, _, _, _ ->
|
|
|
|
|
base.plus(KotlinBinaries.kotlinCompilerExecutables).filterNot { it == "plugins/**/*.sh" }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Apply user configuration
|
|
|
|
|
configure()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inline fun openideMacCustomizer(projectHome: Path, configure: MacCustomizerBuilder.() -> Unit = {}): MacDistributionCustomizer {
|
|
|
|
|
return macCustomizer(projectHome) {
|
|
|
|
|
// Set Community defaults
|
|
|
|
|
icnsPath = "build/conf/openIDE/mac/images/openide.icns"
|
|
|
|
|
icnsPathForEAP = "build/conf/openIDE/mac/images/openide_eap.icns"
|
|
|
|
|
urlSchemes = listOf("idea")
|
|
|
|
|
associateIpr = true
|
|
|
|
|
fileAssociations = FileAssociation.from("java", "groovy", "kt", "kts")
|
|
|
|
|
bundleIdentifier = "ru.openide"
|
|
|
|
|
dmgImagePath = "build/conf/openIDE/mac/images/dmg_background.tiff"
|
|
|
|
|
|
|
|
|
|
rootDirectoryName { appInfo, buildNumber ->
|
|
|
|
|
if (appInfo.isEAP) {
|
|
|
|
|
"OpenIDE ${appInfo.majorVersion}.${appInfo.minorVersionMainPart} EAP.app"
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
"OpenIDE.app"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
executableFilePatterns { base, includeRuntime, arch, context ->
|
|
|
|
|
val kotlinExecutables = org.jetbrains.intellij.build.kotlin.KotlinBinaries.kotlinCompilerExecutables
|
|
|
|
|
(base + kotlinExecutables).filterNot { it == "plugins/**/*.sh" }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Apply user configuration
|
|
|
|
|
configure()
|
|
|
|
|
}
|
|
|
|
|
}
|