Kaydet (Commit) a1e857c6 authored tarafından Hans-Joachim Lankenau's avatar Hans-Joachim Lankenau

CWS-TOOLING: integrate CWS native347

...@@ -337,7 +337,9 @@ public class ModuleCtrl { ...@@ -337,7 +337,9 @@ public class ModuleCtrl {
} }
else { else {
if ( isInstalled ) { if ( isInstalled ) {
if ( packageData.isJavaPackage() ) { // only selected checks, because of performance reasons // Maybe a required core module is installed in an older version from another product
boolean isRequiredCoreModule = checkRequiredCoreModule(packageData);
if (( packageData.isJavaPackage() ) || ( isRequiredCoreModule )) { // only selected checks, because of performance reasons
boolean installedPackageIsOlder = installer.isInstalledPackageOlder(packageData, installData); boolean installedPackageIsOlder = installer.isInstalledPackageOlder(packageData, installData);
if ( ! installedPackageIsOlder ) { if ( ! installedPackageIsOlder ) {
// The package is already installed in the same or in a newer version // The package is already installed in the same or in a newer version
...@@ -345,6 +347,7 @@ public class ModuleCtrl { ...@@ -345,6 +347,7 @@ public class ModuleCtrl {
} else { } else {
// This is also something like migrating feature states // This is also something like migrating feature states
packageData.setSelectionState(PackageDescription.INSTALL); packageData.setSelectionState(PackageDescription.INSTALL);
LogManager.addLogfileComment("<b>Adding required older installed package:</b> " + packageData.getPackageName() + "</br>");
} }
} else { // no version check done -> so what is a good setting for already installed packages? } else { // no version check done -> so what is a good setting for already installed packages?
if ( installData.olderVersionExists() ) { // should never be the case in this function if ( installData.olderVersionExists() ) { // should never be the case in this function
......
...@@ -45,13 +45,38 @@ if (button returned of result) is AbortLabel then ...@@ -45,13 +45,38 @@ if (button returned of result) is AbortLabel then
return 2 return 2
end if end if
set the found_ooos to (do shell script "mdfind \"kMDItemContentType == 'com.apple.application-bundle' && kMDItemDisplayName == '[PRODUCTNAME]*' && kMDItemDisplayName != '[FULLAPPPRODUCTNAME].app'\"") & " set the found_ooos_all to (do shell script "mdfind \"kMDItemContentType == 'com.apple.application-bundle' && kMDItemDisplayName == '[PRODUCTNAME]*' && kMDItemDisplayName != '[FULLAPPPRODUCTNAME].app'\"") & "
" & chooseMyOwn " & chooseMyOwn
set found_ooos_all_paragraphs to paragraphs in found_ooos_all
set found_ooos to {}
repeat with currentApp in found_ooos_all_paragraphs
if currentApp does not start with "/Volumes" then
copy currentApp to the end of found_ooos
end if
end repeat
-- repeat with oneApp in found_ooos
-- display dialog oneApp
-- end repeat
-- the choice returned is of type "list" -- the choice returned is of type "list"
-- Show selection dialog only if more than one or no product was found -- Show selection dialog only if more than one or no product was found
if (get first paragraph of found_ooos) is "" then -- The first item is an empty string, if no app was found and no app started with "/Volumes"
set the choice to (choose from list of paragraphs in found_ooos default items (get last paragraph of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) -- The first item is chooseMyOwn, if no app was found and at least one app started with "/Volumes"
if (get first item of found_ooos as string) is "" then
set the choice to (choose from list found_ooos default items (get second item of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel)
if choice is false then
-- do nothing, the user cancelled the installation
return 2 --aborted by user
else if (choice as string) is chooseMyOwn then
-- yeah, one needs to use "choose file", otherwise
-- the user would not be able to select the .app
set the choice to POSIX path of (choose file with prompt chooseManual of type "com.apple.application-bundle" without showing package contents and invisibles)
end if
else if (get first item of found_ooos as string) is chooseMyOwn then
set the choice to (choose from list found_ooos default items (get first item of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel)
if choice is false then if choice is false then
-- do nothing, the user cancelled the installation -- do nothing, the user cancelled the installation
return 2 --aborted by user return 2 --aborted by user
...@@ -60,11 +85,12 @@ if (get first paragraph of found_ooos) is "" then ...@@ -60,11 +85,12 @@ if (get first paragraph of found_ooos) is "" then
-- the user would not be able to select the .app -- the user would not be able to select the .app
set the choice to POSIX path of (choose file with prompt chooseManual of type "com.apple.application-bundle" without showing package contents and invisibles) set the choice to POSIX path of (choose file with prompt chooseManual of type "com.apple.application-bundle" without showing package contents and invisibles)
end if end if
else if (get second paragraph of found_ooos) is chooseMyOwn then else if (get second item of found_ooos as string) is chooseMyOwn then
-- set choice to found installation -- set choice to found installation
set the choice to (get first paragraph of found_ooos) -- set the choice to (get first paragraph of found_ooos)
set the choice to (get first item of found_ooos)
else else
set the choice to (choose from list of paragraphs in found_ooos default items (get first paragraph of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) set the choice to (choose from list found_ooos default items (get first item of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel)
if choice is false then if choice is false then
-- do nothing, the user cancelled the installation -- do nothing, the user cancelled the installation
return 2 --aborted by user return 2 --aborted by user
......
...@@ -43,13 +43,38 @@ if (button returned of result) is AbortLabel then ...@@ -43,13 +43,38 @@ if (button returned of result) is AbortLabel then
return 2 return 2
end if end if
set the found_ooos to (do shell script "mdfind \"kMDItemContentType == 'com.apple.application-bundle' && kMDItemDisplayName == '[PRODUCTNAME]*' && kMDItemDisplayName != '[FULLAPPPRODUCTNAME].app'\"") & " set the found_ooos_all to (do shell script "mdfind \"kMDItemContentType == 'com.apple.application-bundle' && kMDItemDisplayName == '[PRODUCTNAME]*' && kMDItemDisplayName != '[FULLAPPPRODUCTNAME].app'\"") & "
" & chooseMyOwn " & chooseMyOwn
set found_ooos_all_paragraphs to paragraphs in found_ooos_all
set found_ooos to {}
repeat with currentApp in found_ooos_all_paragraphs
if currentApp does not start with "/Volumes" then
copy currentApp to the end of found_ooos
end if
end repeat
-- repeat with oneApp in found_ooos
-- display dialog oneApp
-- end repeat
-- the choice returned is of type "list" -- the choice returned is of type "list"
-- Show selection dialog only if more than one or no product was found -- Show selection dialog only if more than one or no product was found
if (get first paragraph of found_ooos) is "" then -- The first item is an empty string, if no app was found and no app started with "/Volumes"
set the choice to (choose from list of paragraphs in found_ooos default items (get last paragraph of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) -- The first item is chooseMyOwn, if no app was found and at least one app started with "/Volumes"
if (get first item of found_ooos as string) is "" then
set the choice to (choose from list found_ooos default items (get second item of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel)
if choice is false then
-- do nothing, the user cancelled the installation
return 2 --aborted by user
else if (choice as string) is chooseMyOwn then
-- yeah, one needs to use "choose file", otherwise
-- the user would not be able to select the .app
set the choice to POSIX path of (choose file with prompt chooseManual of type "com.apple.application-bundle" without showing package contents and invisibles)
end if
else if (get first item of found_ooos as string) is chooseMyOwn then
set the choice to (choose from list found_ooos default items (get first item of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel)
if choice is false then if choice is false then
-- do nothing, the user cancelled the installation -- do nothing, the user cancelled the installation
return 2 --aborted by user return 2 --aborted by user
...@@ -58,11 +83,12 @@ if (get first paragraph of found_ooos) is "" then ...@@ -58,11 +83,12 @@ if (get first paragraph of found_ooos) is "" then
-- the user would not be able to select the .app -- the user would not be able to select the .app
set the choice to POSIX path of (choose file with prompt chooseManual of type "com.apple.application-bundle" without showing package contents and invisibles) set the choice to POSIX path of (choose file with prompt chooseManual of type "com.apple.application-bundle" without showing package contents and invisibles)
end if end if
else if (get second paragraph of found_ooos) is chooseMyOwn then else if (get second item of found_ooos as string) is chooseMyOwn then
-- set choice to found installation -- set choice to found installation
set the choice to (get first paragraph of found_ooos) -- set the choice to (get first paragraph of found_ooos)
set the choice to (get first item of found_ooos)
else else
set the choice to (choose from list of paragraphs in found_ooos default items (get first paragraph of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel) set the choice to (choose from list found_ooos default items (get first item of found_ooos) with prompt listPrompt OK button name listOKLabel cancel button name listCancelLabel)
if choice is false then if choice is false then
-- do nothing, the user cancelled the installation -- do nothing, the user cancelled the installation
return 2 --aborted by user return 2 --aborted by user
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment