diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/conf/nsis/desktop.ini | 74 | ||||
-rw-r--r-- | build/conf/nsis/idea.nsi | 147 | ||||
-rw-r--r-- | build/gant.xml | 6 | ||||
-rw-r--r-- | build/lib/jps/jps-builders.jar | bin | 1500322 -> 1500478 bytes | |||
-rw-r--r-- | build/scripts/layouts.gant | 14 | ||||
-rw-r--r-- | build/scripts/utils.gant | 9 | ||||
-rw-r--r-- | build/update.cmd | 30 |
7 files changed, 207 insertions, 73 deletions
diff --git a/build/conf/nsis/desktop.ini b/build/conf/nsis/desktop.ini index 478a08152efe..8f590b778e84 100644 --- a/build/conf/nsis/desktop.ini +++ b/build/conf/nsis/desktop.ini @@ -4,23 +4,71 @@ NumFields=3 [Field 1] Type=checkbox Left=5 -Right=-1 +Right=100 Top=10 Bottom=20 State=0 [Field 2] Type=checkbox -Left=5 +Left=120 +Right=-1 +Top=10 +Bottom=20 +State=0 + +[Field 3] +Type=GroupBox +Left=1 Right=-1 -Top=25 -Bottom=35 -State=1 - -;[Field 3] -;Type=checkbox -;Left=5 -;Right=-1 -;Top=40 -;Bottom=50 -;State=1
\ No newline at end of file +Top=35 +Bottom=65 +Text=Create Associations + +[Field 4] +Type=checkbox +Left=5 +Right=45 +Top=50 +Bottom=60 +State=0 + +[Field 5] +Type=checkbox +Left=50 +Right=90 +Top=50 +Bottom=60 +State=0 + +[Field 6] +Type=checkbox +Left=95 +Right=135 +Top=50 +Bottom=60 +State=0 + +[Field 7] +Type=checkbox +Left=140 +Right=180 +Top=50 +Bottom=60 +State=0 + +[Field 8] +Type=checkbox +Left=185 +Right=225 +Top=50 +Bottom=60 +State=0 + +[Field 9] +Type=checkbox +Left=230 +Right=270 +Top=50 +Bottom=60 +State=0
\ No newline at end of file diff --git a/build/conf/nsis/idea.nsi b/build/conf/nsis/idea.nsi index 145d61d0624b..5f31dc3c9f3f 100644 --- a/build/conf/nsis/idea.nsi +++ b/build/conf/nsis/idea.nsi @@ -12,6 +12,7 @@ ; thus ${PRODUCT_WITH_VER} is used for uninstall registry information !define PRODUCT_REG_VER "${MUI_PRODUCT}\${VER_BUILD}" +!define INSTALL_OPTION_ELEMENTS 4 Name "${MUI_PRODUCT}" SetCompressor lzma ; http://nsis.sourceforge.net/Shortcuts_removal_fails_on_Windows_Vista @@ -25,6 +26,8 @@ RequestExecutionLevel user !include UAC.nsh !include "InstallOptions.nsh" !include StrFunc.nsh +!include LogicLib.nsh + ${UnStrStr} ${UnStrLoc} ${UnStrRep} @@ -97,6 +100,57 @@ Var IS_UPGRADE_60 StrCpy $9 "Modified" complete: FunctionEnd + +Function ${un}SplitStr +Exch $0 ; str +Push $1 ; inQ +Push $3 ; idx +Push $4 ; tmp +StrCpy $1 0 +StrCpy $3 0 +loop: + StrCpy $4 $0 1 $3 + ${If} $4 == '"' + ${If} $1 <> 0 + StrCpy $0 $0 "" 1 + IntOp $3 $3 - 1 + ${EndIf} + IntOp $1 $1 ! + ${EndIf} + ${If} $4 == '' ; The end? + StrCpy $1 0 + StrCpy $4 ',' + ${EndIf} + ${If} $4 == ',' + ${AndIf} $1 = 0 + StrCpy $4 $0 $3 + StrCpy $1 $4 "" -1 + ${IfThen} $1 == '"' ${|} StrCpy $4 $4 -1 ${|} + killspace: + IntOp $3 $3 + 1 + StrCpy $0 $0 "" $3 + StrCpy $1 $0 1 + StrCpy $3 0 + StrCmp $1 ',' killspace + Push $0 ; Remaining + Exch 4 + Pop $0 + StrCmp $4 "" 0 moreleft + Pop $4 + Pop $3 + Pop $1 + Return + moreleft: + Exch $4 + Exch 2 + Pop $1 + Pop $3 + Return + ${EndIf} + IntOp $3 $3 + 1 + Goto loop +FunctionEnd + !macroend !insertmacro INST_UNINST_SWITCH "" !insertmacro INST_UNINST_SWITCH "un." @@ -686,6 +740,23 @@ skip_default_instdir: FunctionEnd +Function DoAssociation + ; back up old value of an association + ReadRegStr $1 HKCR $R4 "" + StrCmp $1 "" skip_backup + StrCmp $1 ${PRODUCT_PATHS_SELECTOR} skip_backup + WriteRegStr HKCR $R4 "backup_val" $1 +skip_backup: + WriteRegStr HKCR $R4 "" "${PRODUCT_PATHS_SELECTOR}" + ReadRegStr $0 HKCR ${PRODUCT_PATHS_SELECTOR} "" + StrCmp $0 "" 0 command_exists + WriteRegStr HKCR ${PRODUCT_PATHS_SELECTOR} "" "${PRODUCT_FULL_NAME}" + WriteRegStr HKCR "${PRODUCT_PATHS_SELECTOR}\shell" "" "open" + WriteRegStr HKCR "${PRODUCT_PATHS_SELECTOR}\DefaultIcon" "" "$INSTDIR\bin\${PRODUCT_EXE_FILE},0" +command_exists: + WriteRegStr HKCR "${PRODUCT_PATHS_SELECTOR}\shell\open\command" "" \ + '$INSTDIR\bin\${PRODUCT_EXE_FILE} "%1"' +FunctionEnd ;------------------------------------------------------------------------------ ; Installer sections @@ -716,6 +787,20 @@ skip_desktop_shortcut: ${EndIf} skip_quicklaunch_shortcut: + !insertmacro INSTALLOPTIONS_READ $R1 "Desktop.ini" "Settings" "NumFields" + IntCmp $R1 ${INSTALL_OPTION_ELEMENTS} do_association done do_association +do_association: + StrCpy $R2 ${INSTALL_OPTION_ELEMENTS} +get_user_choice: + !insertmacro INSTALLOPTIONS_READ $R3 "Desktop.ini" "Field $R2" "State" + StrCmp $R3 1 "" next_association + !insertmacro INSTALLOPTIONS_READ $R4 "Desktop.ini" "Field $R2" "Text" + call DoAssociation +next_association: + IntOp $R2 $R2 + 1 + IntCmp $R1 $R2 get_user_choice done get_user_choice + +done: !insertmacro MUI_STARTMENU_WRITE_BEGIN Application ; $STARTMENU_FOLDER stores name of IDEA folder in Start Menu, ; save it name in the "MenuFolder" RegValue @@ -754,27 +839,6 @@ skip_quicklaunch_shortcut: skip_ipr: -StrCmp "${ASSOCIATION}" "NoAssociation" skip_association - ; back up old value of an association - ReadRegStr $1 HKCR ${ASSOCIATION} "" - StrCmp $1 "" skip_backup - StrCmp $1 ${PRODUCT_PATHS_SELECTOR} skip_backup - WriteRegStr HKCR ${ASSOCIATION} "backup_val" $1 -skip_backup: - WriteRegStr HKCR ${ASSOCIATION} "" "${PRODUCT_PATHS_SELECTOR}" - ReadRegStr $0 HKCR ${PRODUCT_PATHS_SELECTOR} "" - StrCmp $0 "" 0 command_exists - WriteRegStr HKCR ${PRODUCT_PATHS_SELECTOR} "" "${PRODUCT_FULL_NAME}" - WriteRegStr HKCR "${PRODUCT_PATHS_SELECTOR}\shell" "" "open" - WriteRegStr HKCR "${PRODUCT_PATHS_SELECTOR}\DefaultIcon" "" "$INSTDIR\bin\${PRODUCT_EXE_FILE},0" -command_exists: - WriteRegStr HKCR "${PRODUCT_PATHS_SELECTOR}\shell\open\command" "" \ - '$INSTDIR\bin\${PRODUCT_EXE_FILE} "%1"' - -skip_association: - ; Rest of script - - ; readonly section SectionIn RO !include "idea_win.nsh" @@ -842,13 +906,28 @@ Function ConfirmDesktopShortcut !insertmacro MUI_HEADER_TEXT "$(installation_options)" "$(installation_options_prompt)" !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field 1" "Text" "$(create_desktop_shortcut)" call winVersion - ${If} $0 == "1" - ;do not ask user about creating quick launch under Windows 7 - !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Settings" "NumFields" "1" - ${Else} - !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field 2" "Text" "$(create_quick_launch_shortcut)" - ${EndIf} -; !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field 3" "Text" "$(install_for_current_user_only)" + !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field 2" "Text" "$(create_quick_launch_shortcut)" + ${If} $0 == "1" + !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field 2" "Flags" "DISABLED" + ${EndIf} + StrCmp "${ASSOCIATION}" "NoAssociation" skip_association + StrCpy $R0 3 + push "${ASSOCIATION}" +loop: + call SplitStr + Pop $0 + StrCmp $0 "" done + IntOp $R0 $R0 + 1 + !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Field $R0" "Text" "$0" + goto loop +skip_association: + StrCpy $R0 2 + call winVersion + ${If} $0 == "1" + IntOp $R0 $R0 - 1 + ${EndIf} +done: + !insertmacro INSTALLOPTIONS_WRITE "Desktop.ini" "Settings" "NumFields" "$R0" !insertmacro INSTALLOPTIONS_DISPLAY "Desktop.ini" FunctionEnd @@ -931,11 +1010,13 @@ Function un.ReturnBackupRegValue ;replace Default str with the backup value (if there is the one) and then delete backup ; $1 - key (for example ".java") ; $2 - name (for example "backup_val") + Push $0 ReadRegStr $0 HKCR $1 $2 StrCmp $0 "" "noBackup" WriteRegStr HKCR $1 "" $0 DeleteRegValue HKCR $1 $2 noBackup: + Pop $0 FunctionEnd Function un.OMDeleteRegKeyIfEmpty @@ -1140,12 +1221,16 @@ clear_Registry: Call un.OMDeleteRegValue StrCmp "${ASSOCIATION}" "NoAssociation" finish_uninstall - StrCpy $1 "${ASSOCIATION}" + push "${ASSOCIATION}" +loop: + call un.SplitStr + Pop $0 + StrCmp $0 "" finish_uninstall + StrCpy $1 $0 StrCpy $2 "backup_val" Call un.ReturnBackupRegValue - + goto loop finish_uninstall: - StrCpy $1 "$5\${PRODUCT_REG_VER}" StrCpy $2 "Build" Call un.OMDeleteRegValue diff --git a/build/gant.xml b/build/gant.xml index 416440b6aebd..7991950aae81 100644 --- a/build/gant.xml +++ b/build/gant.xml @@ -15,6 +15,12 @@ <fileset dir="${project.home}/build/kotlinc/jps" erroronmissingdir="false"> <include name="*.jar"/> </fileset> + <fileset dir="${project.home}/build/kotlinc/lib" erroronmissingdir="false"> + <include name="kotlin-runtime.jar"/> + </fileset> + <fileset dir="${project.home}/build/kotlinc/plugin" erroronmissingdir="false"> + <include name="kotlin-plugin.jar"/> + </fileset> <fileset dir="${idea.lib}"> <include name="jdom.jar"/> <include name="log4j.jar"/> diff --git a/build/lib/jps/jps-builders.jar b/build/lib/jps/jps-builders.jar Binary files differindex 05c199bfbb85..f937e00ed467 100644 --- a/build/lib/jps/jps-builders.jar +++ b/build/lib/jps/jps-builders.jar diff --git a/build/scripts/layouts.gant b/build/scripts/layouts.gant index 7e17eedc4335..d80746e17790 100644 --- a/build/scripts/layouts.gant +++ b/build/scripts/layouts.gant @@ -86,8 +86,11 @@ def layoutFull(String home, String targetDirectory, String patchedDescriptorDir "manifest", "platform-main", "remote-servers-java-impl", + "structuralsearch", + "structuralsearch-java", "testFramework", "tests_bootstrap", + "typeMigration", "ui-designer-core" ].flatten() implementationModules.removeAll(jpsCommonModules) //todo[nik] remove jps modules from platformImplementationModules instead and update layouts of minor IDEs accordingly @@ -262,7 +265,7 @@ public def layoutCommunityPlugins(String home) { layoutCloud() dir("plugins") { - def simplePlugins = ["commander", "copyright", "java-i18n", "hg4idea", "github", "typeMigration"] //, "tasks-time-tracking"] + def simplePlugins = ["commander", "copyright", "java-i18n", "hg4idea", "github"] //, "tasks-time-tracking"] simplePlugins.each { layoutPlugin it @@ -549,15 +552,6 @@ public def layoutCommunityPlugins(String home) { } } - pluginDir("structuralsearch") { - dir("lib") { - jar("structuralsearch.jar") { - module("structuralsearch") - module("structuralsearch-java") - } - } - } - pluginDir("java-decompiler") { dir("lib") { jar("java-decompiler.jar") { diff --git a/build/scripts/utils.gant b/build/scripts/utils.gant index 580d63d0bb53..e5eb3eb90c25 100644 --- a/build/scripts/utils.gant +++ b/build/scripts/utils.gant @@ -89,7 +89,7 @@ private String require(String key) { this[key] } catch (MissingPropertyException ignored) { - projectBuilder.error("Property $key is required") + projectBuilder.error("Property '$key' is required") } } @@ -98,7 +98,7 @@ private String require(String key, String defaultValue) { this[key] } catch (MissingPropertyException ignored) { - projectBuilder.info("$key is not defined. Defaulting to $defaultValue") + projectBuilder.info("'$key' is not defined. Defaulting to '$defaultValue'") this[key] = defaultValue } } @@ -113,8 +113,9 @@ binding.setVariable("requireProperty", {String key, String defaultValue = null - }) binding.setVariable("guessHome", { - // Current file is supposed to be at build/scripts/release.gant path - new File(requireProperty("gant.file").substring("file:".length())).getParentFile().getParentFile().getParent() + // current file is supposed to be at build/scripts/*.gant path + String uri = requireProperty("gant.file") + new File(new URI(uri).getSchemeSpecificPart()).getParentFile().getParentFile().getParent() }) binding.setVariable("loadProject", { diff --git a/build/update.cmd b/build/update.cmd index 74b499573283..558db879aecc 100644 --- a/build/update.cmd +++ b/build/update.cmd @@ -10,40 +10,40 @@ :: 4. You quit IntelliJ IDEA IF NOT EXIST "%JAVA_HOME%\bin\java.exe" ( - ECHO JAVA_HOME must be defined and point to a valid Java installaton + ECHO JAVA_HOME must be defined and point to a valid Java installation EXIT ) IF NOT EXIST "%WORK_IDEA_HOME%\bin\idea.bat" ( - @ECHO WORK_IDEA_HOME must be defined and point to build you're updating + ECHO WORK_IDEA_HOME must be defined and point to IDEA installation you wish to update EXIT ) IF NOT EXIST "%DEV_IDEA_HOME%\build\update.cmd" ( - @ECHO DEV_IDEA_HOME must be defined and point to source base your're updating from + ECHO DEV_IDEA_HOME must be defined and point to a source base you're updating from EXIT ) -ECHO Updating %WORK_IDEA_HOME% from compiled classes at %DEV_IDEA_HOME% +ECHO Updating "%WORK_IDEA_HOME%" from compiled classes at "%DEV_IDEA_HOME%" -CD %DEV_IDEA_HOME% +CD "%DEV_IDEA_HOME%" SET ANT_HOME=%DEV_IDEA_HOME%\lib\ant -SET EXEC_ANT="%JAVA_HOME%\bin\java.exe" -Dant.home=%ANT_HOME% -classpath "%ANT_HOME%\lib\ant-launcher.jar" org.apache.tools.ant.launch.Launcher -CALL %EXEC_ANT% -f build/update.xml %* +SET EXEC_ANT="%JAVA_HOME%\bin\java.exe" -Dant.home="%ANT_HOME%" -classpath "%ANT_HOME%\lib\ant-launcher.jar" org.apache.tools.ant.launch.Launcher +%EXEC_ANT% -f build/update.xml IF NOT ERRORLEVEL 0 GOTO failed +IF NOT EXIST "%DEV_IDEA_HOME%\out\deploy" GOTO failed -DEL /Q /S %WORK_IDEA_HOME%\lib -DEL /Q /S %WORK_IDEA_HOME%\plugins +RMDIR /Q /S "%WORK_IDEA_HOME%\lib" +RMDIR /Q /S "%WORK_IDEA_HOME%\plugins" -XCOPY %DEV_IDEA_HOME%\bin\win\*.dll %WORK_IDEA_HOME%\bin\ /Q /E /Y -XCOPY %DEV_IDEA_HOME%\bin\win\fsnotifier.exe %WORK_IDEA_HOME%\bin\ /Q /E /Y -XCOPY %DEV_IDEA_HOME%\bin\win\runnerw.exe %WORK_IDEA_HOME%\bin\ /Q /E /Y -XCOPY %DEV_IDEA_HOME%\out\deploy\*.* %WORK_IDEA_HOME%\ /Q /E /Y +XCOPY "%DEV_IDEA_HOME%\bin\win\*.dll" "%WORK_IDEA_HOME%\bin\" /Q /E /Y +XCOPY "%DEV_IDEA_HOME%\bin\win\*.exe" "%WORK_IDEA_HOME%\bin\" /Q /E /Y +XCOPY "%DEV_IDEA_HOME%\out\deploy\*.*" "%WORK_IDEA_HOME%\" /Q /E /Y GOTO done :failed -ECHO "Update failed; work IDEA build not modified." +ECHO Update failed; work IDEA build not modified. :done -CD /D %WORK_IDEA_HOME%\bin +CD /D "%WORK_IDEA_HOME%\bin" |