From 76116242bead64170dc7cffe4a32290ab8d92d5e Mon Sep 17 00:00:00 2001 From: Sungho Park Date: Mon, 27 Feb 2012 21:19:55 +0900 Subject: [PATCH] Initialize --- AUTHORS | 7 + LICENSE-2.0.htm | 388 +++++ NOTICE | 1 + builder/build.properties.clean | 260 ++++ builder/customTargets.xml | 187 +++ org.tizen.nativeplatform.feature/.project | 17 + org.tizen.nativeplatform.feature/LICENSE-2.0.htm | 191 +++ org.tizen.nativeplatform.feature/build.properties | 5 + org.tizen.nativeplatform.feature/feature.xml | 29 + org.tizen.nativeplatform.feature/license.html | 22 + .../rootfiles/snippets/Comments/File Comment.xml | 13 + .../snippets/Comments/Project Comment.xml | 13 + .../rootfiles/snippets/keyCombos.properties | 10 + org.tizen.nativeplatform/.classpath | 7 + org.tizen.nativeplatform/.project | 28 + .../.settings/org.eclipse.jdt.core.prefs | 8 + org.tizen.nativeplatform/META-INF/MANIFEST.MF | 38 + org.tizen.nativeplatform/about.html | 26 + .../about_files/LICENSE-2.0.htm | 191 +++ org.tizen.nativeplatform/build.properties | 10 + ...Tizen_Custom_Debian_ConfigurationType_Image.gif | Bin 0 -> 368 bytes ...ustom_Debian_ConfigurationType_Image_Attach.gif | Bin 0 -> 368 bytes ..._Custom_Debian_ConfigurationType_Image_Core.gif | Bin 0 -> 368 bytes ..._Native_Application_ConfigurationType_Image.gif | Bin 0 -> 368 bytes ..._Application_ConfigurationType_Image_Attach.gif | Bin 0 -> 368 bytes ...ve_Application_ConfigurationType_Image_Core.gif | Bin 0 -> 368 bytes org.tizen.nativeplatform/icons/af.png | Bin 0 -> 7657 bytes .../icons/branding/perspective.png | Bin 0 -> 788 bytes org.tizen.nativeplatform/icons/build_configs.gif | Bin 0 -> 368 bytes org.tizen.nativeplatform/icons/c_app.gif | Bin 0 -> 606 bytes org.tizen.nativeplatform/icons/c_file_obj.gif | Bin 0 -> 354 bytes org.tizen.nativeplatform/icons/device.gif | Bin 0 -> 568 bytes org.tizen.nativeplatform/icons/device_view.gif | Bin 0 -> 1035 bytes org.tizen.nativeplatform/icons/directory.gif | Bin 0 -> 215 bytes org.tizen.nativeplatform/icons/directory_link.gif | Bin 0 -> 362 bytes org.tizen.nativeplatform/icons/duchain.gif | Bin 0 -> 861 bytes org.tizen.nativeplatform/icons/editors/debug.gif | Bin 0 -> 348 bytes org.tizen.nativeplatform/icons/editors/help.gif | Bin 0 -> 622 bytes org.tizen.nativeplatform/icons/editors/refresh.gif | Bin 0 -> 330 bytes org.tizen.nativeplatform/icons/editors/run.gif | Bin 0 -> 379 bytes org.tizen.nativeplatform/icons/emulator.gif | Bin 0 -> 565 bytes .../icons/external_browser.gif | Bin 0 -> 621 bytes org.tizen.nativeplatform/icons/file.gif | Bin 0 -> 344 bytes org.tizen.nativeplatform/icons/file_link.gif | Bin 0 -> 576 bytes org.tizen.nativeplatform/icons/folder_search.gif | Bin 0 -> 347 bytes org.tizen.nativeplatform/icons/form_banner.gif | Bin 0 -> 5600 bytes .../icons/icon_application.png | Bin 0 -> 5759 bytes org.tizen.nativeplatform/icons/import_wizard.png | Bin 0 -> 703 bytes org.tizen.nativeplatform/icons/large_image.gif | Bin 0 -> 2300 bytes org.tizen.nativeplatform/icons/list-delete.gif | Bin 0 -> 586 bytes .../icons/localization/Error.png | Bin 0 -> 408 bytes .../icons/localization/POFileEditor_import.gif | Bin 0 -> 232 bytes org.tizen.nativeplatform/icons/newc_app.gif | Bin 0 -> 379 bytes org.tizen.nativeplatform/icons/package.png | Bin 0 -> 514 bytes .../icons/package_installer.gif | Bin 0 -> 596 bytes .../icons/packagelist_to_table.gif | Bin 0 -> 577 bytes org.tizen.nativeplatform/icons/remove.png | Bin 0 -> 299 bytes org.tizen.nativeplatform/icons/sample.gif | Bin 0 -> 983 bytes org.tizen.nativeplatform/icons/spreadsheet.gif | Bin 0 -> 337 bytes org.tizen.nativeplatform/icons/th_horizontal.gif | Bin 0 -> 174 bytes org.tizen.nativeplatform/plugin.properties | 7 + org.tizen.nativeplatform/plugin.xml | 702 +++++++++ .../src/org/tizen/nativeplatform/Activator.java | 111 ++ .../build/CustomDebianConfigurationOld.java | 183 +++ .../CustomDebianProjectDependentBuilderOld.java | 129 ++ .../build/PlatformConfigurationEnvVarSupplier.java | 62 + .../build/PlatformConfigurationManager.java | 301 ++++ .../build/PlatformMakeGenerator.java | 208 +++ .../build/PlatformProjectConverter.java | 183 +++ .../build/PlatformProjectDependentBuilder.java | 130 ++ .../build/PlatformProjectDependentPackager.java | 149 ++ .../launch/TizenDebianLaunchDelegate.java | 516 +++++++ .../launch/TizenDebianLaunchDelegateForAttach.java | 171 ++ .../launch/TizenDebianLaunchDelegateForCore.java | 228 +++ .../launch/TizenDebianLaunchMessages.java | 61 + .../launch/TizenDebianLaunchMessages.properties | 23 + ...DebianLaunchConfigurationForAttachTabGroup.java | 45 + ...enDebianLaunchConfigurationForCoreTabGroup.java | 45 + .../ui/TizenDebianLaunchConfigurationTabGroup.java | 50 + .../launch/ui/TizenDebianMainCoreTab.java | 35 + .../launch/ui/TizenDebianMainTab.java | 266 ++++ .../TizenDebianProjectAttachLaunchShortcut.java | 252 +++ .../TizenDebianProjectCoredumpLaunchShortcut.java | 251 +++ .../shortcut/TizenDebianProjectLaunchShortcut.java | 251 +++ .../ui/shortcut/TizenDebianPropertyTester.java | 74 + .../launch/ui/shortcut/TizenPathInputDialog.java | 284 ++++ .../pkgInstall/DialogActionDelegate.java | 106 ++ .../pkgInstall/PackageCommander.java | 653 ++++++++ .../nativeplatform/pkgInstall/PackageManager.java | 1626 ++++++++++++++++++++ .../pkgInstall/PackageManagerOuputReceiver.java | 85 + .../pkgInstall/PackageManagerRootstrapHandler.java | 99 ++ .../pkgInstall/PkgModelProvider.java | 215 +++ .../wizards/TizenDebianMainWizardPage.java | 87 ++ .../wizards/TizenDebianProjectWizard.java | 96 ++ .../EmptyProject/.buildproperties.xml | 1 + .../EmptyProject/template.properties | 19 + .../CustomDebianPackages/EmptyProject/template.xml | 55 + .../HelloWorldProject/.buildproperties.xml | 1 + .../HelloWorldProject/Makefile | 30 + .../HelloWorldProject/debian/changelog | 5 + .../debian/com.samsung.hello.install | 1 + .../HelloWorldProject/debian/compat | 1 + .../HelloWorldProject/debian/control | 13 + .../HelloWorldProject/debian/rules | 74 + .../HelloWorldProject/src/hello.c | 8 + .../HelloWorldProject/template.properties | 19 + .../HelloWorldProject/template.xml | 95 ++ .../EmptyProject/.buildproperties.xml | 1 + .../EmptyProject/template.properties | 19 + .../EmptyProject/template.xml | 55 + .../HelloWorldProject/.buildproperties.xml | 1 + .../HelloWorldProject/Makefile | 30 + .../HelloWorldProject/debian/changelog | 5 + .../debian/com.samsung.hello.install | 1 + .../HelloWorldProject/debian/compat | 1 + .../HelloWorldProject/debian/control | 13 + .../HelloWorldProject/debian/rules | 74 + .../HelloWorldProject/src/hello.c | 8 + .../HelloWorldProject/template.properties | 19 + .../HelloWorldProject/template.xml | 95 ++ package/build.linux | 292 ++++ package/pkginfo.manifest | 19 + 122 files changed, 10090 insertions(+) create mode 100644 AUTHORS create mode 100644 LICENSE-2.0.htm create mode 100644 NOTICE create mode 100644 builder/build.properties.clean create mode 100644 builder/customTargets.xml create mode 100644 org.tizen.nativeplatform.feature/.project create mode 100644 org.tizen.nativeplatform.feature/LICENSE-2.0.htm create mode 100644 org.tizen.nativeplatform.feature/build.properties create mode 100644 org.tizen.nativeplatform.feature/feature.xml create mode 100644 org.tizen.nativeplatform.feature/license.html create mode 100644 org.tizen.nativeplatform.feature/rootfiles/snippets/Comments/File Comment.xml create mode 100644 org.tizen.nativeplatform.feature/rootfiles/snippets/Comments/Project Comment.xml create mode 100644 org.tizen.nativeplatform.feature/rootfiles/snippets/keyCombos.properties create mode 100644 org.tizen.nativeplatform/.classpath create mode 100644 org.tizen.nativeplatform/.project create mode 100644 org.tizen.nativeplatform/.settings/org.eclipse.jdt.core.prefs create mode 100644 org.tizen.nativeplatform/META-INF/MANIFEST.MF create mode 100644 org.tizen.nativeplatform/about.html create mode 100644 org.tizen.nativeplatform/about_files/LICENSE-2.0.htm create mode 100644 org.tizen.nativeplatform/build.properties create mode 100644 org.tizen.nativeplatform/icons/Tizen_Custom_Debian_ConfigurationType_Image.gif create mode 100644 org.tizen.nativeplatform/icons/Tizen_Custom_Debian_ConfigurationType_Image_Attach.gif create mode 100644 org.tizen.nativeplatform/icons/Tizen_Custom_Debian_ConfigurationType_Image_Core.gif create mode 100644 org.tizen.nativeplatform/icons/Tizen_Native_Application_ConfigurationType_Image.gif create mode 100644 org.tizen.nativeplatform/icons/Tizen_Native_Application_ConfigurationType_Image_Attach.gif create mode 100644 org.tizen.nativeplatform/icons/Tizen_Native_Application_ConfigurationType_Image_Core.gif create mode 100644 org.tizen.nativeplatform/icons/af.png create mode 100644 org.tizen.nativeplatform/icons/branding/perspective.png create mode 100644 org.tizen.nativeplatform/icons/build_configs.gif create mode 100644 org.tizen.nativeplatform/icons/c_app.gif create mode 100644 org.tizen.nativeplatform/icons/c_file_obj.gif create mode 100644 org.tizen.nativeplatform/icons/device.gif create mode 100644 org.tizen.nativeplatform/icons/device_view.gif create mode 100644 org.tizen.nativeplatform/icons/directory.gif create mode 100644 org.tizen.nativeplatform/icons/directory_link.gif create mode 100644 org.tizen.nativeplatform/icons/duchain.gif create mode 100644 org.tizen.nativeplatform/icons/editors/debug.gif create mode 100644 org.tizen.nativeplatform/icons/editors/help.gif create mode 100644 org.tizen.nativeplatform/icons/editors/refresh.gif create mode 100644 org.tizen.nativeplatform/icons/editors/run.gif create mode 100644 org.tizen.nativeplatform/icons/emulator.gif create mode 100644 org.tizen.nativeplatform/icons/external_browser.gif create mode 100644 org.tizen.nativeplatform/icons/file.gif create mode 100644 org.tizen.nativeplatform/icons/file_link.gif create mode 100644 org.tizen.nativeplatform/icons/folder_search.gif create mode 100644 org.tizen.nativeplatform/icons/form_banner.gif create mode 100644 org.tizen.nativeplatform/icons/icon_application.png create mode 100644 org.tizen.nativeplatform/icons/import_wizard.png create mode 100644 org.tizen.nativeplatform/icons/large_image.gif create mode 100644 org.tizen.nativeplatform/icons/list-delete.gif create mode 100644 org.tizen.nativeplatform/icons/localization/Error.png create mode 100644 org.tizen.nativeplatform/icons/localization/POFileEditor_import.gif create mode 100644 org.tizen.nativeplatform/icons/newc_app.gif create mode 100644 org.tizen.nativeplatform/icons/package.png create mode 100644 org.tizen.nativeplatform/icons/package_installer.gif create mode 100644 org.tizen.nativeplatform/icons/packagelist_to_table.gif create mode 100644 org.tizen.nativeplatform/icons/remove.png create mode 100644 org.tizen.nativeplatform/icons/sample.gif create mode 100644 org.tizen.nativeplatform/icons/spreadsheet.gif create mode 100644 org.tizen.nativeplatform/icons/th_horizontal.gif create mode 100644 org.tizen.nativeplatform/plugin.properties create mode 100644 org.tizen.nativeplatform/plugin.xml create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/Activator.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/CustomDebianConfigurationOld.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/CustomDebianProjectDependentBuilderOld.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformConfigurationEnvVarSupplier.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformConfigurationManager.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformMakeGenerator.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformProjectConverter.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformProjectDependentBuilder.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformProjectDependentPackager.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchDelegate.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchDelegateForAttach.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchDelegateForCore.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchMessages.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchMessages.properties create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianLaunchConfigurationForAttachTabGroup.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianLaunchConfigurationForCoreTabGroup.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianLaunchConfigurationTabGroup.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianMainCoreTab.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianMainTab.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianProjectAttachLaunchShortcut.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianProjectCoredumpLaunchShortcut.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianProjectLaunchShortcut.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianPropertyTester.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenPathInputDialog.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/DialogActionDelegate.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageCommander.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageManager.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageManagerOuputReceiver.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageManagerRootstrapHandler.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PkgModelProvider.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/wizards/TizenDebianMainWizardPage.java create mode 100644 org.tizen.nativeplatform/src/org/tizen/nativeplatform/wizards/TizenDebianProjectWizard.java create mode 100644 org.tizen.nativeplatform/templates/CustomDebianPackages/EmptyProject/.buildproperties.xml create mode 100644 org.tizen.nativeplatform/templates/CustomDebianPackages/EmptyProject/template.properties create mode 100644 org.tizen.nativeplatform/templates/CustomDebianPackages/EmptyProject/template.xml create mode 100644 org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/.buildproperties.xml create mode 100644 org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/Makefile create mode 100644 org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/changelog create mode 100644 org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/com.samsung.hello.install create mode 100644 org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/compat create mode 100644 org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/control create mode 100644 org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/rules create mode 100644 org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/src/hello.c create mode 100644 org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/template.properties create mode 100644 org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/template.xml create mode 100644 org.tizen.nativeplatform/templates/InhouseFrameworkPackages/EmptyProject/.buildproperties.xml create mode 100644 org.tizen.nativeplatform/templates/InhouseFrameworkPackages/EmptyProject/template.properties create mode 100644 org.tizen.nativeplatform/templates/InhouseFrameworkPackages/EmptyProject/template.xml create mode 100644 org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/.buildproperties.xml create mode 100644 org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/Makefile create mode 100644 org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/changelog create mode 100644 org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/com.samsung.hello.install create mode 100644 org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/compat create mode 100644 org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/control create mode 100644 org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/rules create mode 100644 org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/src/hello.c create mode 100644 org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/template.properties create mode 100644 org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/template.xml create mode 100755 package/build.linux create mode 100644 package/pkginfo.manifest diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..acaf5c7 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,7 @@ +Kangho Kim +Namkoong Ho +YoonKi Park +Taeyoung Son +Hyunsik Noh +Gun Kim +HyunGoo Kang diff --git a/LICENSE-2.0.htm b/LICENSE-2.0.htm new file mode 100644 index 0000000..e52d995 --- /dev/null +++ b/LICENSE-2.0.htm @@ -0,0 +1,388 @@ + + + + Apache License, Version 2.0 + + + + + + + + + + + + + + + + + +
+ + +
+

Apache License

Version 2.0, January 2004

+http://www.apache.org/licenses/

+

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

+

1. Definitions.

+

"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document.

+

"Licensor" shall mean the copyright owner or entity authorized by the +copyright owner that is granting the License.

+

"Legal Entity" shall mean the union of the acting entity and all other +entities that control, are controlled by, or are under common control with +that entity. For the purposes of this definition, "control" means (i) the +power, direct or indirect, to cause the direction or management of such +entity, whether by contract or otherwise, or (ii) ownership of fifty +percent (50%) or more of the outstanding shares, or (iii) beneficial +ownership of such entity.

+

"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License.

+

"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, +and configuration files.

+

"Object" form shall mean any form resulting from mechanical transformation +or translation of a Source form, including but not limited to compiled +object code, generated documentation, and conversions to other media types.

+

"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice that +is included in or attached to the work (an example is provided in the +Appendix below).

+

"Derivative Works" shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work and for which the editorial +revisions, annotations, elaborations, or other modifications represent, as +a whole, an original work of authorship. For the purposes of this License, +Derivative Works shall not include works that remain separable from, or +merely link (or bind by name) to the interfaces of, the Work and Derivative +Works thereof.

+

"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor for +inclusion in the Work by the copyright owner or by an individual or Legal +Entity authorized to submit on behalf of the copyright owner. For the +purposes of this definition, "submitted" means any form of electronic, +verbal, or written communication sent to the Licensor or its +representatives, including but not limited to communication on electronic +mailing lists, source code control systems, and issue tracking systems that +are managed by, or on behalf of, the Licensor for the purpose of discussing +and improving the Work, but excluding communication that is conspicuously +marked or otherwise designated in writing by the copyright owner as "Not a +Contribution."

+

"Contributor" shall mean Licensor and any individual or Legal Entity on +behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work.

+

2. Grant of Copyright License. Subject to the +terms and conditions of this License, each Contributor hereby grants to You +a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, publicly +display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form.

+

3. Grant of Patent License. Subject to the terms +and conditions of this License, each Contributor hereby grants to You a +perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, use, +offer to sell, sell, import, and otherwise transfer the Work, where such +license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by +combination of their Contribution(s) with the Work to which such +Contribution(s) was submitted. If You institute patent litigation against +any entity (including a cross-claim or counterclaim in a lawsuit) alleging +that the Work or a Contribution incorporated within the Work constitutes +direct or contributory patent infringement, then any patent licenses +granted to You under this License for that Work shall terminate as of the +date such litigation is filed.

+

4. Redistribution. You may reproduce and +distribute copies of the Work or Derivative Works thereof in any medium, +with or without modifications, and in Source or Object form, provided that +You meet the following conditions:

+
    +
  1. +

    You must give any other recipients of the Work or Derivative Works a +copy of this License; and

    +
  2. +
  3. +

    You must cause any modified files to carry prominent notices stating +that You changed the files; and

    +
  4. +
  5. +

    You must retain, in the Source form of any Derivative Works that You +distribute, all copyright, patent, trademark, and attribution notices from +the Source form of the Work, excluding those notices that do not pertain to +any part of the Derivative Works; and

    +
  6. +
  7. +

    If the Work includes a "NOTICE" text file as part of its distribution, +then any Derivative Works that You distribute must include a readable copy +of the attribution notices contained within such NOTICE file, excluding +those notices that do not pertain to any part of the Derivative Works, in +at least one of the following places: within a NOTICE text file distributed +as part of the Derivative Works; within the Source form or documentation, +if provided along with the Derivative Works; or, within a display generated +by the Derivative Works, if and wherever such third-party notices normally +appear. The contents of the NOTICE file are for informational purposes only +and do not modify the License. You may add Your own attribution notices +within Derivative Works that You distribute, alongside or as an addendum to +the NOTICE text from the Work, provided that such additional attribution +notices cannot be construed as modifying the License. +You may add Your own copyright statement to Your modifications and may +provide additional or different license terms and conditions for use, +reproduction, or distribution of Your modifications, or for any such +Derivative Works as a whole, provided Your use, reproduction, and +distribution of the Work otherwise complies with the conditions stated in +this License.

    +
  8. +
+

5. Submission of Contributions. Unless You +explicitly state otherwise, any Contribution intentionally submitted for +inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the +terms of any separate license agreement you may have executed with Licensor +regarding such Contributions.

+

6. Trademarks. This License does not grant +permission to use the trade names, trademarks, service marks, or product +names of the Licensor, except as required for reasonable and customary use +in describing the origin of the Work and reproducing the content of the +NOTICE file.

+

7. Disclaimer of Warranty. Unless required by +applicable law or agreed to in writing, Licensor provides the Work (and +each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, +without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You +are solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise +of permissions under this License.

+

8. Limitation of Liability. In no event and +under no legal theory, whether in tort (including negligence), contract, or +otherwise, unless required by applicable law (such as deliberate and +grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a result +of this License or out of the use or inability to use the Work (including +but not limited to damages for loss of goodwill, work stoppage, computer +failure or malfunction, or any and all other commercial damages or losses), +even if such Contributor has been advised of the possibility of such +damages.

+

9. Accepting Warranty or Additional Liability. +While redistributing the Work or Derivative Works thereof, You may choose +to offer, and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this License. +However, in accepting such obligations, You may act only on Your own behalf +and on Your sole responsibility, not on behalf of any other Contributor, +and only if You agree to indemnify, defend, and hold each Contributor +harmless for any liability incurred by, or claims asserted against, such +Contributor by reason of your accepting any such warranty or additional +liability.

+

END OF TERMS AND CONDITIONS

+

APPENDIX: How to apply the Apache License to your work

+

To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included +on the same "printed page" as the copyright notice for easier +identification within third-party archives.

+
   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+
+ + + + diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..4297ee3 --- /dev/null +++ b/NOTICE @@ -0,0 +1 @@ +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. diff --git a/builder/build.properties.clean b/builder/build.properties.clean new file mode 100644 index 0000000..49e836f --- /dev/null +++ b/builder/build.properties.clean @@ -0,0 +1,260 @@ +############################################################################### +# Copyright (c) 2003, 2006 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +##################### +# Parameters describing how and where to execute the build. +# Typical users need only update the following properties: +# baseLocation - where things you are building against are installed +# bootclasspath - The base jars to compile against (typicaly rt.jar) +# configs - the list of {os, ws, arch} configurations to build. +# +# Of course any of the settings here can be overridden by spec'ing +# them on the command line (e.g., -DbaseLocation=d:/eclipse + +#The type of the top level element we are building, generally "feature" +topLevelElementType=feature +#The id of the top level element we are building +topLevelElementId=org.tizen.nativeplatform.feature + +############# PRODUCT/PACKAGING CONTROL ############# +#product=/com.samsung.freshide/SLPSDK.product +#runPackager=true + +#Set the name of the archive that will result from the product build. +#archiveNamePrefix= + +# The prefix that will be used in the generated archive. +archivePrefix="Do not touch here." + +# The location underwhich all of the build output will be collected. +collectingFolder=${archivePrefix} + +# The list of {os, ws, arch} configurations to build. This +# value is a '&' separated list of ',' separate triples. For example, +# configs=win32,win32,x86 & linux,motif,x86 +# By default the value is *,*,* +configs="Do not touch here." +#configs=win32, win32, x86 & \ +# win32,win32,x86_64 & \ +# win32,win32,wpf & \ +# linux, gtk, ppc & \ +# linux, gtk, x86 & \ +# linux, gtk, x86_64 & \ +# linux, motif, x86 & \ +# solaris, motif, sparc & \ +# solaris, gtk, sparc & \ +# aix, motif, ppc & \ +# hpux, motif, ia64_32 & \ +# macosx, carbon, ppc & \ +# macosx, carbon, x86 & \ +# macosx, cocoa, ppc & \ +# macosx, cocoa, x86 & \ +# macosx, cocoa, x86_64 + +# By default PDE creates one archive (result) per entry listed in the configs property. +# Setting this value to true will cause PDE to only create one output containing all +# artifacts for all the platforms listed in the configs property. +# To control the output format for the group, add a "group, group, group - " entry to the +# archivesFormat. +#groupConfigurations=true + +#The format of the archive. By default a zip is created using antZip. +#The list can only contain the configuration for which the desired format is different than zip. +#archivesFormat=win32, win32, x86 - antZip& \ +# linux, gtk, ppc - antZip &\ +# linux, gtk, x86 - antZip& \ +# linux, gtk, x86_64 - antZip& \ +# linux, motif, x86 - antZip& \ +# solaris, motif, sparc - antZip& \ +# solaris, gtk, sparc - antZip& \ +# aix, motif, ppc - antZip& \ +# hpux, motif, PA_RISC - antZip& \ +# macosx, carbon, ppc - antZip + +#Allow cycles involving at most one bundle that needs to be compiled with the rest being binary bundles. +allowBinaryCycles=true + +#Sort bundles depenedencies across all features instead of just within a given feature. +#flattenDependencies = true + +#Parallel compilation, requires flattenedDependencies=true +#parallelCompilation=true +#parallelThreadCount= +#parallelThreadsPerProcessor= + +#Set to true if you want the output to be ready for an update jar (no site.xml generated) +#outputUpdateJars = false + +#Set to true for Jnlp generation +#codebase should be a URL that will be used as the root of all relative URLs in the output. +#generateJnlp=false +#jnlp.codebase= +#jnlp.j2se= +#jnlp.locale= +#jnlp.generateOfflineAllowed=true or false generate attribute in the generated features +#jnlp.configs=${configs} #uncomment to filter the content of the generated jnlp files based on the configuration being built + +#Set to true if you want to sign jars +#signJars=false +#sign.alias= +#sign.keystore= +#sign.storepass= +#sign.keypass= + +#Arguments to send to the zip executable +#zipargs= + +#Arguments to send to the tar executable +#tarargs= + +#Control the creation of a file containing the version included in each configuration - on by default +#generateVersionsLists=false + +############## BUILD NAMING CONTROL ################ +# The directory into which the build elements are fetched and where +# the build takes place. +buildDirectory="Do not touch here" + +# Type of build. Used in naming the build output. Typically this value is +# one of I, N, M, S, ... +buildType="Do not touch here" + +# ID of the build. Used in naming the build output. +buildId="Do not touch here" + +# Label for the build. Used in naming the build output +buildLabel=${buildType}.${buildId} + +# Timestamp for the build. Used in naming the build output +timestamp=007 + +#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde. +#The value will only be applied to plugin or features indicating build.properties, qualifier = context +#forceContextQualifier= + +#Enable / disable the generation of a suffix for the features that use .qualifier. +#The generated suffix is computed according to the content of the feature +#generateFeatureVersionSuffix=true + +############# BASE CONTROL ############# +# Settings for the base Eclipse components and Java class libraries +# against which you are building. +# Base location for anything the build needs to compile against. For example, +# in most RCP app or a plug-in, the baseLocation should be the location of a previously +# installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack. + +base="Do not touch here" +baseLocation="Do not touch here" + + +#Folder containing repositories whose content is needed to compile against +#repoBaseLocation=${base}/repos +#Folder where the content of the repositories from ${repoBaseLocation} will be made available as a form suitable to be compiled against +#transformedRepoLocation=${base}/transformedRepos + +#Os/Ws/Arch/nl of the eclipse specified by baseLocation +baseos=linux +basews=gtk +basearch=x86 + +#this property indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built +filteredDependencyCheck=false + +#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons) +resolution.devMode=false + +#pluginPath is a list of locations in which to find plugins and features. This list is separated by the platform file separator (; or :) +#a location is one of: +#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo +#- a directory that contains a /plugins or /features subdirectory +#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml +#pluginPath= + +skipBase=true +eclipseURL= +eclipseBuildId= +eclipseBaseURL=${eclipseURL}/eclipse-platform-${eclipseBuildId}-win32.zip + + +############# MAP FILE CONTROL ################ +# This section defines CVS tags to use when fetching the map files from the repository. +# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml + +skipMaps=true +mapsRepo=:pserver:anonymous@example.com/path/to/repo +mapsRoot=path/to/maps +mapsCheckoutTag=HEAD + +#tagMaps=true +mapsTagTag=v${buildId} + + +############ REPOSITORY CONTROL ############### +# This section defines properties parameterizing the repositories where plugins, fragments +# bundles and features are being obtained from. + +# The tags to use when fetching elements to build. +# By default thebuilder will use whatever is in the maps. +# This value takes the form of a comma separated list of repository identifier (like used in the map files) and the +# overriding value +# For example fetchTag=CVS=HEAD, SVN=v20050101 +# fetchTag=HEAD +skipFetch=true + + +############# P2 OPTIONS ############## +#p2.gathering = true +#p2.compress=true + +############# JAVA COMPILER OPTIONS ############## +# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE +#bootclasspath=${java.home}/lib/rt.jar + +# specific JRE locations to compile against. These values are used to compile bundles specifying a +# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support +#CDC-1.0/Foundation-1.0= /path/to/rt.jar +#CDC-1.1/Foundation-1.1= +#OSGi/Minimum-1.0= +#OSGi/Minimum-1.1= +#JRE-1.1= +#J2SE-1.2= +#J2SE-1.3= +#J2SE-1.4= +#J2SE-1.5= +#JavaSE-1.6= +#PersonalJava-1.1= +#PersonalJava-1.2= +#CDC-1.0/PersonalBasis-1.0= +#CDC-1.0/PersonalJava-1.0= +#CDC-1.1/PersonalBasis-1.1= +#CDC-1.1/PersonalJava-1.1= + +# Specify the output format of the compiler log when eclipse jdt is used +logExtension=.log + +# Whether or not to include debug info in the output jars +javacDebugInfo=true + +# Whether or not to fail the build if there are compiler errors +javacFailOnError=true + +# Enable or disable verbose mode of the compiler +javacVerbose=false + +# Extra arguments for the compiler. These are specific to the java compiler being used. +#compilerArg= + +# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties +javacSource=1.6 + +# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties. +javacTarget=1.6 + + diff --git a/builder/customTargets.xml b/builder/customTargets.xml new file mode 100644 index 0000000..6a42e92 --- /dev/null +++ b/builder/customTargets.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.tizen.nativeplatform.feature/.project b/org.tizen.nativeplatform.feature/.project new file mode 100644 index 0000000..4402609 --- /dev/null +++ b/org.tizen.nativeplatform.feature/.project @@ -0,0 +1,17 @@ + + + org.tizen.nativeplatform.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/org.tizen.nativeplatform.feature/LICENSE-2.0.htm b/org.tizen.nativeplatform.feature/LICENSE-2.0.htm new file mode 100644 index 0000000..f7ca656 --- /dev/null +++ b/org.tizen.nativeplatform.feature/LICENSE-2.0.htm @@ -0,0 +1,191 @@ + + + + Apache License, Version 2.0 + + + + + + + + + + + + + + + + + +
+ + +
+

Apache License

Version 2.0, January 2004

+
http://www.apache.org/licenses/

+

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

+

1. Definitions.

+

"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document.

+

"Licensor" shall mean the copyright owner or entity authorized by the +copyright owner that is granting the License.

+

"Legal Entity" shall mean the union of the acting entity and all other +entities that control, are controlled by, or are under common control with +that entity. For the purposes of this definition, "control" means (i) the +power, direct or indirect, to cause the direction or management of such +entity, whether by contract or otherwise, or (ii) ownership of fifty +percent (50%) or more of the outstanding shares, or (iii) beneficial +ownership of such entity.

+

"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License.

+

"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, +and configuration files.

+

"Object" form shall mean any form resulting from mechanical transformation +or translation of a Source form, including but not limited to compiled +object code, generated documentation, and conversions to other media types.

+

"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice that +is included in or attached to the work (an example is provided in the +Appendix below).

+

"Derivative Works" shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work and for which the editorial +revisions, annotations, elaborations, or other modifications represent, as +a whole, an original work of authorship. For the purposes of this License, +Derivative Works shall not include works that remain separable from, or +merely link (or bind by name) to the interfaces of, the Work and Derivative +Works thereof.

+

"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor for +inclusion in the Work by the copyright owner or by an individual or Legal +Entity authorized to submit on behalf of the copyright owner. For the +purposes of this definition, "submitted" means any form of electronic, +verbal, or written communication sent to the Licensor or its +representatives, including but not limited to communication on electronic +mailing lists, source code control systems, and issue tracking systems that +are managed by, or on behalf of, the Licensor for the purpose of discussing +and improving the Work, but excluding communication that is conspicuously +marked or otherwise designated in writing by the copyright owner as "Not a +Contribution."

+

"Contributor" shall mean Licensor and any individual or Legal Entity on +behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work.

+

2. Grant of Copyright License. Subject to the +terms and conditions of this License, each Contributor hereby grants to You +a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, publicly +display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form.

+

3. Grant of Patent License. Subject to the terms +and conditions of this License, each Contributor hereby grants to You a +perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, use, +offer to sell, sell, import, and otherwise transfer the Work, where such +license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by +combination of their Contribution(s) with the Work to which such +Contribution(s) was submitted. If You institute patent litigation against +any entity (including a cross-claim or counterclaim in a lawsuit) alleging +that the Work or a Contribution incorporated within the Work constitutes +direct or contributory patent infringement, then any patent licenses +granted to You under this License for that Work shall terminate as of the +date such litigation is filed.

+

4. Redistribution. You may reproduce and +distribute copies of the Work or Derivative Works thereof in any medium, +with or without modifications, and in Source or Object form, provided that +You meet the following conditions:

+
    +
  1. +

    You must give any other recipients of the Work or Derivative Works a +copy of this License; and

    +
  2. +
  3. +

    You must cause any modified files to carry prominent notices stating +that You changed the files; and

    +
  4. +
  5. +

    You must retain, in the Source form of any Derivative Works that You +distribute, all copyright, patent, trademark, and attribution notices from +the Source form of the Work, excluding those notices that do not pertain to +any part of the Derivative Works; and

    +
  6. +
  7. +

    If the Work includes a "NOTICE" text file as part of its distribution, +then any Derivative Works that You distribute must include a readable copy +of the attribution notices contained within such NOTICE file, excluding +those notices that do not pertain to any part of the Derivative Works, in +at least one of the following places: within a NOTICE text file distributed +as part of the Derivative Works; within the Source form or documentation, +if provided along with the Derivative Works; or, within a display generated +by the Derivative Works, if and wherever such third-party notices normally +appear. The contents of the NOTICE file are for informational purposes only +and do not modify the License. You may add Your own attribution notices +within Derivative Works that You distribute, alongside or as an addendum to +the NOTICE text from the Work, provided that such additional attribution +notices cannot be construed as modifying the License. +You may add Your own copyright statement to Your modifications and may +provide additional or different license terms and conditions for use, +reproduction, or distribution of Your modifications, or for any such +Derivative Works as a whole, provided Your use, reproduction, and +distribution of the Work otherwise complies with the conditions stated in +this License.

    +
  8. +
+

5. Submission of Contributions. Unless You +explicitly state otherwise, any Contribution intentionally submitted for +inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the +terms of any separate license agreement you may have executed with Licensor +regarding such Contributions.

+

6. Trademarks. This License does not grant +permission to use the trade names, trademarks, service marks, or product +names of the Licensor, except as required for reasonable and customary use +in describing the origin of the Work and reproducing the content of the +NOTICE file.

+

7. Disclaimer of Warranty. Unless required by +applicable law or agreed to in writing, Licensor provides the Work (and +each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, +without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You +are solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise +of permissions under this License.

+

8. Limitation of Liability. In no event and +under no legal theory, whether in tort (including negligence), contract, or +otherwise, unless required by applicable law (such as deliberate and +grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a result +of this License or out of the use or inability to use the Work (including +but not limited to damages for loss of goodwill, work stoppage, computer +failure or malfunction, or any and all other commercial damages or losses), +even if such Contributor has been advised of the possibility of such +damages.

+

9. Accepting Warranty or Additional Liability. +While redistributing the Work or Derivative Works thereof, You may choose +to offer, and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this License. +However, in accepting such obligations, You may act only on Your own behalf +and on Your sole responsibility, not on behalf of any other Contributor, +and only if You agree to indemnify, defend, and hold each Contributor +harmless for any liability incurred by, or claims asserted against, such +Contributor by reason of your accepting any such warranty or additional +liability.

+

END OF TERMS AND CONDITIONS

+ +
+ +
+ + + diff --git a/org.tizen.nativeplatform.feature/build.properties b/org.tizen.nativeplatform.feature/build.properties new file mode 100644 index 0000000..ab46e7f --- /dev/null +++ b/org.tizen.nativeplatform.feature/build.properties @@ -0,0 +1,5 @@ +bin.includes = feature.xml,\ + LICENSE-2.0.htm,\ + license.html +root = rootfiles + \ No newline at end of file diff --git a/org.tizen.nativeplatform.feature/feature.xml b/org.tizen.nativeplatform.feature/feature.xml new file mode 100644 index 0000000..ef8f9fc --- /dev/null +++ b/org.tizen.nativeplatform.feature/feature.xml @@ -0,0 +1,29 @@ + + + + + Tizen SDK's Native platform plugin + + + + Copyright (C) 2010 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + + + + [Enter License Description here.] + + + + + diff --git a/org.tizen.nativeplatform.feature/license.html b/org.tizen.nativeplatform.feature/license.html new file mode 100644 index 0000000..03d90e2 --- /dev/null +++ b/org.tizen.nativeplatform.feature/license.html @@ -0,0 +1,22 @@ + + + + + +Tizen SOFTWARE DEVELOPMENT KIT ("SDK") LICENSE AGREEMENT + + + +

Tizen SDK



+ +Tizen SDK contains software portions licensed under various open source licenses as well as proprietary components. All open source software portions (“Open Source Software”) are licensed under the open source licenses that accompany such Open Source Software.

+ +The licenses governing the Open Source Software are available at: http://developer.tizen.org/download/tizen_sdk_opensource_license.html

+ +Except for the Open Source Software contained in Tizen SDK, all other software portions contained in Tizen SDK are governed by the terms and conditions of the Tizen Software Development Kit License Agreement, available at: http://developer.tizen.org/download/samsung_sdk_license.html

+ +You may access and download Tizen SDK Open Source Software at: http://developer.tizen.org/download/tizenopensdk.tar.gz

+ +BY CLICKING THE "I AGREE" BUTTON OR BY USING ANY PART OF TIZEN SDK, YOU AGREE (ON BEHALF OF YOURSELF AND/OR YOUR COMPANY) TO THE OPEN SOURCE SOFTWARE LICENSE TERMS AND THE TIZEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT. IF YOU DO NOT AGREE WITH THE OPEN SOURCE SOFTWARE LICENSE TERMS OR THE TIZEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT, YOU MAY NOT DOWNLOAD OR USE TIZEN SDK.

+ + diff --git a/org.tizen.nativeplatform.feature/rootfiles/snippets/Comments/File Comment.xml b/org.tizen.nativeplatform.feature/rootfiles/snippets/Comments/File Comment.xml new file mode 100644 index 0000000..b64316f --- /dev/null +++ b/org.tizen.nativeplatform.feature/rootfiles/snippets/Comments/File Comment.xml @@ -0,0 +1,13 @@ + + +File Comment +describe file information + + + \ No newline at end of file diff --git a/org.tizen.nativeplatform.feature/rootfiles/snippets/Comments/Project Comment.xml b/org.tizen.nativeplatform.feature/rootfiles/snippets/Comments/Project Comment.xml new file mode 100644 index 0000000..c0175f1 --- /dev/null +++ b/org.tizen.nativeplatform.feature/rootfiles/snippets/Comments/Project Comment.xml @@ -0,0 +1,13 @@ + + +Project Comment +describe project information + + + \ No newline at end of file diff --git a/org.tizen.nativeplatform.feature/rootfiles/snippets/keyCombos.properties b/org.tizen.nativeplatform.feature/rootfiles/snippets/keyCombos.properties new file mode 100644 index 0000000..212a7f8 --- /dev/null +++ b/org.tizen.nativeplatform.feature/rootfiles/snippets/keyCombos.properties @@ -0,0 +1,10 @@ +#These key combos are used by the cfeclipse plugin. +#Tue Jul 26 16:12:05 KST 2011 +fc=/Comments/File Comment.xml +lim=/Log/Log INFO message.xml +clm=/Localization/Create a localized message.xml +lwm=/Log/Log WARNING message.xml +lem=/Log/Log ERROR message.xml +lvm=/Log/Log VERBOSE message.xml +pc=/Comments/Project Comment.xml +ldm=/Log/Log DEBUG message.xml diff --git a/org.tizen.nativeplatform/.classpath b/org.tizen.nativeplatform/.classpath new file mode 100644 index 0000000..ad32c83 --- /dev/null +++ b/org.tizen.nativeplatform/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/org.tizen.nativeplatform/.project b/org.tizen.nativeplatform/.project new file mode 100644 index 0000000..7ab5127 --- /dev/null +++ b/org.tizen.nativeplatform/.project @@ -0,0 +1,28 @@ + + + org.tizen.nativeplatform + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/org.tizen.nativeplatform/.settings/org.eclipse.jdt.core.prefs b/org.tizen.nativeplatform/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..26a0e0b --- /dev/null +++ b/org.tizen.nativeplatform/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +#Wed Jul 20 14:43:03 KST 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.tizen.nativeplatform/META-INF/MANIFEST.MF b/org.tizen.nativeplatform/META-INF/MANIFEST.MF new file mode 100644 index 0000000..a6686e1 --- /dev/null +++ b/org.tizen.nativeplatform/META-INF/MANIFEST.MF @@ -0,0 +1,38 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Tizen Native Inhouse +Bundle-SymbolicName: org.tizen.nativeplatform;singleton:=true +Bundle-Version: 1.0.0 +Bundle-Activator: org.tizen.nativeplatform.Activator +Bundle-Vendor: Samsung +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.cdt.managedbuilder.core;bundle-version="7.0.2", + org.eclipse.core.resources;bundle-version="3.6.1", + org.eclipse.cdt.core;bundle-version="5.2.1", + org.eclipse.cdt.managedbuilder.ui;bundle-version="7.0.0", + org.tizen.common;bundle-version="1.3.20", + org.eclipse.ui.console;bundle-version="3.5.0", + org.eclipse.cdt.ui;bundle-version="5.2.2", + org.eclipse.debug.ui, + org.tizen.common.connection, + org.tizen.nativecommon;bundle-version="1.0.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-ActivationPolicy: lazy +Import-Package: org.eclipse.cdt.debug.core, + org.eclipse.cdt.debug.core.cdi, + org.eclipse.cdt.debug.core.cdi.model, + org.eclipse.cdt.debug.internal.ui.launch, + org.eclipse.cdt.debug.mi.core, + org.eclipse.cdt.debug.ui, + org.eclipse.cdt.launch, + org.eclipse.cdt.launch.internal.ui, + org.eclipse.cdt.launch.ui, + org.eclipse.core.expressions, + org.eclipse.debug.core, + org.eclipse.debug.core.model, + org.eclipse.debug.ui, + org.eclipse.debug.ui.sourcelookup, + org.eclipse.ui, + org.eclipse.ui.dialogs, + org.tizen.common.connection diff --git a/org.tizen.nativeplatform/about.html b/org.tizen.nativeplatform/about.html new file mode 100644 index 0000000..20a744a --- /dev/null +++ b/org.tizen.nativeplatform/about.html @@ -0,0 +1,26 @@ + + + + +About + + +

About This Content

+ +

May, 2011

+

Tizen SDK

+ +

Tizen SDK +is a set of Eclipse plug-ins that helps programmers to develop applications for +the mobile platform.

+ +

License

+ +

See Apache License, Version 2.0.

+ +

Note

+

jericho-html-3.1.jar, xpp3-1.1.4.jar, xstream-1.3.1.jar are under the Apache license Version 2.0. You can find a copy of the Apache License at http://www.apache.org/licenses/

+ + + \ No newline at end of file diff --git a/org.tizen.nativeplatform/about_files/LICENSE-2.0.htm b/org.tizen.nativeplatform/about_files/LICENSE-2.0.htm new file mode 100644 index 0000000..f7ca656 --- /dev/null +++ b/org.tizen.nativeplatform/about_files/LICENSE-2.0.htm @@ -0,0 +1,191 @@ + + + + Apache License, Version 2.0 + + + + + + + + + + + + + + + + + +
+ + +
+

Apache License

Version 2.0, January 2004

+http://www.apache.org/licenses/

+

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

+

1. Definitions.

+

"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document.

+

"Licensor" shall mean the copyright owner or entity authorized by the +copyright owner that is granting the License.

+

"Legal Entity" shall mean the union of the acting entity and all other +entities that control, are controlled by, or are under common control with +that entity. For the purposes of this definition, "control" means (i) the +power, direct or indirect, to cause the direction or management of such +entity, whether by contract or otherwise, or (ii) ownership of fifty +percent (50%) or more of the outstanding shares, or (iii) beneficial +ownership of such entity.

+

"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License.

+

"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, +and configuration files.

+

"Object" form shall mean any form resulting from mechanical transformation +or translation of a Source form, including but not limited to compiled +object code, generated documentation, and conversions to other media types.

+

"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice that +is included in or attached to the work (an example is provided in the +Appendix below).

+

"Derivative Works" shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work and for which the editorial +revisions, annotations, elaborations, or other modifications represent, as +a whole, an original work of authorship. For the purposes of this License, +Derivative Works shall not include works that remain separable from, or +merely link (or bind by name) to the interfaces of, the Work and Derivative +Works thereof.

+

"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor for +inclusion in the Work by the copyright owner or by an individual or Legal +Entity authorized to submit on behalf of the copyright owner. For the +purposes of this definition, "submitted" means any form of electronic, +verbal, or written communication sent to the Licensor or its +representatives, including but not limited to communication on electronic +mailing lists, source code control systems, and issue tracking systems that +are managed by, or on behalf of, the Licensor for the purpose of discussing +and improving the Work, but excluding communication that is conspicuously +marked or otherwise designated in writing by the copyright owner as "Not a +Contribution."

+

"Contributor" shall mean Licensor and any individual or Legal Entity on +behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work.

+

2. Grant of Copyright License. Subject to the +terms and conditions of this License, each Contributor hereby grants to You +a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, publicly +display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form.

+

3. Grant of Patent License. Subject to the terms +and conditions of this License, each Contributor hereby grants to You a +perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, use, +offer to sell, sell, import, and otherwise transfer the Work, where such +license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by +combination of their Contribution(s) with the Work to which such +Contribution(s) was submitted. If You institute patent litigation against +any entity (including a cross-claim or counterclaim in a lawsuit) alleging +that the Work or a Contribution incorporated within the Work constitutes +direct or contributory patent infringement, then any patent licenses +granted to You under this License for that Work shall terminate as of the +date such litigation is filed.

+

4. Redistribution. You may reproduce and +distribute copies of the Work or Derivative Works thereof in any medium, +with or without modifications, and in Source or Object form, provided that +You meet the following conditions:

+
    +
  1. +

    You must give any other recipients of the Work or Derivative Works a +copy of this License; and

    +
  2. +
  3. +

    You must cause any modified files to carry prominent notices stating +that You changed the files; and

    +
  4. +
  5. +

    You must retain, in the Source form of any Derivative Works that You +distribute, all copyright, patent, trademark, and attribution notices from +the Source form of the Work, excluding those notices that do not pertain to +any part of the Derivative Works; and

    +
  6. +
  7. +

    If the Work includes a "NOTICE" text file as part of its distribution, +then any Derivative Works that You distribute must include a readable copy +of the attribution notices contained within such NOTICE file, excluding +those notices that do not pertain to any part of the Derivative Works, in +at least one of the following places: within a NOTICE text file distributed +as part of the Derivative Works; within the Source form or documentation, +if provided along with the Derivative Works; or, within a display generated +by the Derivative Works, if and wherever such third-party notices normally +appear. The contents of the NOTICE file are for informational purposes only +and do not modify the License. You may add Your own attribution notices +within Derivative Works that You distribute, alongside or as an addendum to +the NOTICE text from the Work, provided that such additional attribution +notices cannot be construed as modifying the License. +You may add Your own copyright statement to Your modifications and may +provide additional or different license terms and conditions for use, +reproduction, or distribution of Your modifications, or for any such +Derivative Works as a whole, provided Your use, reproduction, and +distribution of the Work otherwise complies with the conditions stated in +this License.

    +
  8. +
+

5. Submission of Contributions. Unless You +explicitly state otherwise, any Contribution intentionally submitted for +inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the +terms of any separate license agreement you may have executed with Licensor +regarding such Contributions.

+

6. Trademarks. This License does not grant +permission to use the trade names, trademarks, service marks, or product +names of the Licensor, except as required for reasonable and customary use +in describing the origin of the Work and reproducing the content of the +NOTICE file.

+

7. Disclaimer of Warranty. Unless required by +applicable law or agreed to in writing, Licensor provides the Work (and +each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, +without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You +are solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise +of permissions under this License.

+

8. Limitation of Liability. In no event and +under no legal theory, whether in tort (including negligence), contract, or +otherwise, unless required by applicable law (such as deliberate and +grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a result +of this License or out of the use or inability to use the Work (including +but not limited to damages for loss of goodwill, work stoppage, computer +failure or malfunction, or any and all other commercial damages or losses), +even if such Contributor has been advised of the possibility of such +damages.

+

9. Accepting Warranty or Additional Liability. +While redistributing the Work or Derivative Works thereof, You may choose +to offer, and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this License. +However, in accepting such obligations, You may act only on Your own behalf +and on Your sole responsibility, not on behalf of any other Contributor, +and only if You agree to indemnify, defend, and hold each Contributor +harmless for any liability incurred by, or claims asserted against, such +Contributor by reason of your accepting any such warranty or additional +liability.

+

END OF TERMS AND CONDITIONS

+ +
+ +
+ + + diff --git a/org.tizen.nativeplatform/build.properties b/org.tizen.nativeplatform/build.properties new file mode 100644 index 0000000..3b87492 --- /dev/null +++ b/org.tizen.nativeplatform/build.properties @@ -0,0 +1,10 @@ +source.. = src/ +output.. = bin/ +bin.includes = plugin.xml,\ + META-INF/,\ + .,\ + icons/,\ + templates/,\ + plugin.properties,\ + about.html,\ + about_files/ diff --git a/org.tizen.nativeplatform/icons/Tizen_Custom_Debian_ConfigurationType_Image.gif b/org.tizen.nativeplatform/icons/Tizen_Custom_Debian_ConfigurationType_Image.gif new file mode 100644 index 0000000000000000000000000000000000000000..f198283df8f844c4e4ec658b4d3cbbfb87c2adbe GIT binary patch literal 368 zcmV-$0gwJiNk%w1VGsZi0M!5h00030|Nq+B+tAR_udlEuez+)sxi^){JDAHro6JR@ z%}S!qP^Hf*kH0FE!7G}>E1SbBqQxtt#Ve}FEVIfjv&${C%PqUjExXJu!p|FhbMsr8W|WB z6A=Y7FMf>$83CdJ51TH2Cyf^tnGX)8XK5yk6r%wRn=`sIGQ9#~*5U*zd literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/Tizen_Custom_Debian_ConfigurationType_Image_Attach.gif b/org.tizen.nativeplatform/icons/Tizen_Custom_Debian_ConfigurationType_Image_Attach.gif new file mode 100644 index 0000000000000000000000000000000000000000..f198283df8f844c4e4ec658b4d3cbbfb87c2adbe GIT binary patch literal 368 zcmV-$0gwJiNk%w1VGsZi0M!5h00030|Nq+B+tAR_udlEuez+)sxi^){JDAHro6JR@ z%}S!qP^Hf*kH0FE!7G}>E1SbBqQxtt#Ve}FEVIfjv&${C%PqUjExXJu!p|FhbMsr8W|WB z6A=Y7FMf>$83CdJ51TH2Cyf^tnGX)8XK5yk6r%wRn=`sIGQ9#~*5U*zd literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/Tizen_Custom_Debian_ConfigurationType_Image_Core.gif b/org.tizen.nativeplatform/icons/Tizen_Custom_Debian_ConfigurationType_Image_Core.gif new file mode 100644 index 0000000000000000000000000000000000000000..f198283df8f844c4e4ec658b4d3cbbfb87c2adbe GIT binary patch literal 368 zcmV-$0gwJiNk%w1VGsZi0M!5h00030|Nq+B+tAR_udlEuez+)sxi^){JDAHro6JR@ z%}S!qP^Hf*kH0FE!7G}>E1SbBqQxtt#Ve}FEVIfjv&${C%PqUjExXJu!p|FhbMsr8W|WB z6A=Y7FMf>$83CdJ51TH2Cyf^tnGX)8XK5yk6r%wRn=`sIGQ9#~*5U*zd literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/Tizen_Native_Application_ConfigurationType_Image.gif b/org.tizen.nativeplatform/icons/Tizen_Native_Application_ConfigurationType_Image.gif new file mode 100644 index 0000000000000000000000000000000000000000..f198283df8f844c4e4ec658b4d3cbbfb87c2adbe GIT binary patch literal 368 zcmV-$0gwJiNk%w1VGsZi0M!5h00030|Nq+B+tAR_udlEuez+)sxi^){JDAHro6JR@ z%}S!qP^Hf*kH0FE!7G}>E1SbBqQxtt#Ve}FEVIfjv&${C%PqUjExXJu!p|FhbMsr8W|WB z6A=Y7FMf>$83CdJ51TH2Cyf^tnGX)8XK5yk6r%wRn=`sIGQ9#~*5U*zd literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/Tizen_Native_Application_ConfigurationType_Image_Attach.gif b/org.tizen.nativeplatform/icons/Tizen_Native_Application_ConfigurationType_Image_Attach.gif new file mode 100644 index 0000000000000000000000000000000000000000..f198283df8f844c4e4ec658b4d3cbbfb87c2adbe GIT binary patch literal 368 zcmV-$0gwJiNk%w1VGsZi0M!5h00030|Nq+B+tAR_udlEuez+)sxi^){JDAHro6JR@ z%}S!qP^Hf*kH0FE!7G}>E1SbBqQxtt#Ve}FEVIfjv&${C%PqUjExXJu!p|FhbMsr8W|WB z6A=Y7FMf>$83CdJ51TH2Cyf^tnGX)8XK5yk6r%wRn=`sIGQ9#~*5U*zd literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/Tizen_Native_Application_ConfigurationType_Image_Core.gif b/org.tizen.nativeplatform/icons/Tizen_Native_Application_ConfigurationType_Image_Core.gif new file mode 100644 index 0000000000000000000000000000000000000000..f198283df8f844c4e4ec658b4d3cbbfb87c2adbe GIT binary patch literal 368 zcmV-$0gwJiNk%w1VGsZi0M!5h00030|Nq+B+tAR_udlEuez+)sxi^){JDAHro6JR@ z%}S!qP^Hf*kH0FE!7G}>E1SbBqQxtt#Ve}FEVIfjv&${C%PqUjExXJu!p|FhbMsr8W|WB z6A=Y7FMf>$83CdJ51TH2Cyf^tnGX)8XK5yk6r%wRn=`sIGQ9#~*5U*zd literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/af.png b/org.tizen.nativeplatform/icons/af.png new file mode 100644 index 0000000000000000000000000000000000000000..bcd0ce8a77e325d889cf22bee7e892eb5f1492f0 GIT binary patch literal 7657 zcmeHLX;2i`8ttBiVFuavWdIch5W*&|C>f_g#LSH2# zV&2fu&_n+|Tw7av=FAyn5i3hesimd4xjB!=BS0Wh1x@n>0=ay+qM~97I3^5H$%t6B ztE)>UlPz7kR4f+5L>vwV4%-w8MMh?3aY+e)T3T98SYryezh^|OI668CfnT|D1)+gf zDvgYcgaY9REH*mI7!F^voyNvSf+XP(4h{}3E-rGpTp$prsi{o?5I5wdY?VOHzy1nc zL*3J-PhYTL;mC*_AfO>Gx3e@UISWGdM#jeL*RO|7@7}$8`0!y96O)4n4L38amVfHO2)ySlq&c6Kf<&QVd(Jd&rR zl|Z(A`*s+83dkl(9&UxO32A#S@-(-wkVqs53c%9b+M=Xs5LQ=P+t|<`AC@yBM}z(e z=A)^lRbE~m6&VHdi9`q{LfnG#DPY17{x{!zgFir%m6er~lY>Yd6%}>)@?{{fmC1N) z1cHrHQ&VTnnw6QEdFRd@$iKXz+|0~Oz~@tJ!*C@<;TC#A&_dwAV<1DY_4V~-y!92E z02AK0aU(G?!O*~v#YaU%L^wJ+9zA*l^R8MIjEBfG00FGk)zu*(Aqb~UO-*TOX)9Lv zbIWnGG5n2N9yWf=wwW_$j(e<9SAfOR)6FN38$&)#A<}ll57lt*BO-%4kWmQ!}Lj#^k#9}sxKF7tqhMS_| z;`;jfm2ATd5WskT;4zTF_3PIJ^41T-zn(GEcKo+vebUOx%EH28%a$!#T3Vn%p`aQY z8(Lag@DMZN34{VPj96I3K!VsJ>|$V`k0`2u7h)-{$6Tq(%E}!(c6fMrAU}>RgAU%h zaQ@tbYljz@Jzef99v-Go6uNEOA2|UxH-!K5&p-e4(@)66ZfD?o3WjLWPN%*v8ftp_y5o0r0$`xI<1v1iGJ_Bhk>%)zQJ1fCAF0 z9~~VH??cSIe?QmVeKw*ig0qv86PAHBQ4J?0T`DRnwzIS6@yN7Wx4;LaP4-dGNd}IXYt-9JeUmqW? zN&y;5sh||ps6qj1?`3Brgd!Zk^*C7E)zHuoK{ftTs)W}&S0;iVjU(wfpzdC3XoMCE zQSTCJJYud1^;=eE2TwXly@g4!Oh7;Yb_|C4dVB3;vXv{}5DEprF;;M)#)7R8w7k5$ zjE#*qY}kN&1@n!W5)sPev z#NY_MJ45YxVKaW0=tH(JN?BRiJMX;fz|yLLLQ(Kr4e`n0wj1S z9obAOl>+gJuUC1S+_cqheBDXZ+NlunNi{xLcy7Un+j8C6AK}rXHG}Pcx z3ZkHSw2*R`yb^-w;P&n9ZPwP-fQSuoYJk+nQZlrqA(0^3?c28xwKeht`T%t3&>>)o zi;Y!Rb~{;6zOMVWMJXHx=8$HKmbHO$!d z_SbN%{tl;@6457w?-yCx(ADh>+^Lv7=?Y#C!#On}CP zUG|F2peV&R*Z>aVDCgnY_Vx&PJU>6b&7XxwpZ(XHZelBafqay%Xd6w)SA4X}8D28x zDBP4UWsCb7k#qO%-8jXcIB^154@;wSJ}&O9x8CBaEQT$%fvdj${<6}Ns_Gi}!NrRg z-QAfVcgHs*36xKv?tL<2{e*gGR)Mg%=LSR-)-2L}fQ1ws2@=zrHk!4i4qG;-ZSPp?lt`2;8R3Du&iu(sq_PR-n1BrQx3#sQ!b9Sl6gT(&BpaGA5qAp& zj~*5vKrzEo-nhe}FH8k>E}9aUk$a7T_Dfutg%qADvZ zs;aB;gWJ}vUnV6bfA(2;M`zdI&>-9pETZI^GMX0yIdiCZEh;Knuwa3qfdOJ{Y-}ty z3fUS5TI2)#R)gXjAzsDVe&@A6_QV%EV0-vo2>}V(N8aGRg6NZzlTjDpcJboHs7IJ& z_2=3v!}@c}sXAI!ZK*on|LMKIVZ92Gf3x)}Y<&^!P`c0c+qKM?6@GzBFZsN;_rJm= BLuLQ~ literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/branding/perspective.png b/org.tizen.nativeplatform/icons/branding/perspective.png new file mode 100644 index 0000000000000000000000000000000000000000..c40edcc56d1528dec8cd1ffabd25e5fb094626f0 GIT binary patch literal 788 zcmV+v1MB>WP)Hvaj| z!1@=0!Qu>m7#M+iEG#V2fJ&8tm;JMfhX1IU0fgcO?mu4{cwc{J z;Cc52=)NBe-@kun`1b7^82|Y3gW=b&Uksmr{AN&B(PFSLF=+;Bkp&1KCgeoI`wOV~ z%@<(6ePdu_{KatL!UZsX`SK;h*RNl}27USRk>T6dPYgf){svjj2M|Ck$SIBgH_*@D zfdR)1DwF1+9 z1}+`}24-dsVBCW(W&k>k;n&YE4A;(HWC)H30O|bz5J1@S!n=zXF06k0<@=s9r;aiF z`2CsT$H$)xKY#sX`0(Ka!}%*$8I+Zk8M3qU0)T2C00a<5USI@U2TmliQc_Z(7G`G6 zKYsmU0)@lh@4x?r#e_0JH6H-tj{pIL%K(`7gg^#?f(J>-2awGm%^(gyfB^v5nJqyz SCvX-30000$my)_aD7; z`{si?`|t0+boKPZSG!)m*}s4P{7-L={d#x$|GRVl|Nm#8Hc{lcYem0S60w~E!Cm1}%!*ZbD23vAe^ku>e{(=UZn)}MLw z`TE0`t1rFXe&hY&dml44Kg`|wD1Y0did|1y4m_K1?8Uq@udclO{QlSfPrv_P{rvyY zw||en{d@KE|LdRsKmPvz`1`*n-~YY*`Ty;&|IdE>d-d!8>tFxh{r>;{_y5m-{=fM7 z@6(_E-~Rsp`S1VEW5=7y9eZo-I;tF+%N(1_9s6qRIw~DzH(O1ux0%vlv%b${eV^&F zPVNi>4ZTA2Fe}+K=6o0ZXGB5-(=zv@ViW3I*-3@_F%`L4>f`USw zBBJ7~?3~<;O#Fcg3W^F!$||aAvU2j$lFWe}UBV(_ENmQHJiL5M{k67k+rG^|aEsC2 zeMUC>cX?`ATFOXCNa$MX>6+?#1qNtYTb{JDlQ?FpuOATTtz}_x(p*F1iLsfPcc71! zk?u*&d%C(-CMLdtep-fxlNc|s2^{MZbz7tmxUq?~B}Kw-LqcJ}(TN%kAwG9b6e>^D ea5O2CiB##DAnzQ+_p{MR)oV&y5+4@}gEauGD&+Y9 literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/c_file_obj.gif b/org.tizen.nativeplatform/icons/c_file_obj.gif new file mode 100644 index 0000000000000000000000000000000000000000..bd603cff7a215648216be6d500c727a1a44ff472 GIT binary patch literal 354 zcmZ?wbhEHb6krfwxXQrr^ueP~Uw{An_29y&tNCsZzJ z>+YN6ITr4QXpgCu#vjs_*!A5YNYRCQJ3 zZ!K?+SE$|qF3kWb!KfoIifHeMD5R~hcjTUc4S W6>a099l5gR=+!S@zrK0<_Vbs|j~+d|fB)XUzkh%K`t|wKrx(wk-@1A8-@ku< z{`~p<`}fbEKY#rA@#V{xj~_pN`0(M~yLWHjzJ2rN&8t_hUc7km^y$;bj~_pH@ZjFP zdw1^KxqbWg_3PKKUcCzRDcHw@h*12=!pOkj&!7Wx6DUp?*rzu5H#N7kwlH;ccC|8T z^$BZE(AQIEYS(6-Icuicv}Ps^W=2LUYco4$-FZz+s?4S~Tr39W%u1{MnN*lnA%?v1*7F0MbFn?-z$&BdoS>EN#f(oaG6i?5cxHG$NYfk^x z;wd|HL#oY_CmKh$YWw7A`{voC_E{x%+Gk9%OPk=DKhvjjX+YiDu$E1cZCfJSHpg{t zN$lR5)U!3EdrL~s=FI*rnZ29yCvPvAx}##&9_NDD&IPmF@}}fW-kv^T%iJC37VWth z(Y7L`Z(Z@s?N#%3)h*iFw&GyR(tVRQ9GkKA^oj$QRvx?@*tjIHenE8Ss_2dtaXo9} zd)6fMtV!-)pVGfBYwG6A$s02!ZOEOzC2!j1!dcrZ7woQCxTj&szLpgSI#wR+U3+Bq zjx!ri+?cZEq;Nu(Zhxdkt2b}8w&Wxo(S8kyJ`Jg<+8Ps0>=$_PHA@OL%Zj!t$n|PQ zZb(YmnUlM}boSnP9F+nb<@}trg51rbJgp*pJz@frB!&8=G^ZMxEwpu7;^nx|Gh}Ua z*wSc@N`8(Ce$E;Ju6jZ4Mj^RbDvHxIbQT#dKDtzAg?`lT7?%UCZin1l54gr0k10A` z6nH!!^lWh9)q;k*bs2Y43Lj?|-Oc;^_wVoDzkmMx`R&`c&!0bk`0(M)n>R0CzI^)h z>BEN)@7}$8^XARVmoJ|?ckblLlShsm*}s23Fy6uOKcWf6pDc_F3@aIQK%oH26ATLh_MI@nRFN=vdhY(oataZ?8+^s#c}IL(~@>^W!D`!7bmfDcQu;yMXZ>> z$jr*YBc-#WD0u;!oG8CNMlyZ0Rsa`E{W4v-^ZYEiG(k7b+VlFjxZsUqfYF literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/directory.gif b/org.tizen.nativeplatform/icons/directory.gif new file mode 100644 index 0000000000000000000000000000000000000000..5e0cb945d1fbd8e438a1bf7d36fe40dfaff444ed GIT binary patch literal 215 zcmZ?wbhEHb6krfwIKlt||NsC0aiQYJhZ8?uZ20kD!H*jge%$DIaiQaIx7p!Vvw3Oi z{XvpHUd;G#W5R<26*o2%>}fUHQg5_0M`dl1_MUp9wK*#D;$?w`fDJ<@6o0ZXGB8Lm z=zt_Zb~3PrD5&+NWX?-pv}#2Lt3l2}ugex3pB%jI_fKpr@DOox5p60u84~6)sj0+k ys+WsMbJ^*uK`xVtCbZw_1DJW{brK;#Tf0*?;-R ziy6N^UU+e#%hDW`wME){ z>W$Xss2p8fJ1<_gKS&bj9aE`mQPmO(6*v!kHU@!mI}wL9a2BNdAS++r6nb` zowXFY6?u8M*#(;}A}IEc!g$kyLqzt+{tya9SS8(X8qlHCO;XsZUDJ-S{vi%6_Ilq#yc{m)a(;c! z_niC8P$B=g=iqP$VqLM=saA8qYN*oLw7W-j5+m|to#St8QND>UsiIy_k5+rzDg2Kzr__C-sUac)X@AW@1`43E+a%8qJdUg8v(Xf7a zG^j|4E?s9pwW#j+@seuf)hMbhG~HIPwkelZ(t;z$Iv z$ZxYLBg?JC-`BW#9@&7G_V@R+;}`8a!@jjcTwC)RTjNh~yUc|q3k_yI|DEzWO=%Fo zEF6R;=8+HPf`ciinG;6uA^6F0cIQMNuW@!Coo19jXF?1zScFISCxZ5dV@u(4d6+mRt9F_KB}J9`r#g`PUial&Z=(aTAtPl_67=023r2s zI@$6TwHkr_Rud1`7Oo7Na-@9f(eimG>*t+pSbDnc`M29^FHBf>VZxRxGqzuybNk)t z+iy>A1+ixzy}$O@{dGt0tv&T<^VL@ekKJ2)?B2SoFAr|mu;Ksz{|u-=@h1x-1A`TV z4oDc}CkD1khq(bBl2ZMLPY5)bJTtLWT$b7Cq1ErMC!G7Li2sW2?+d7K36Q@l~$Ly1U#YBsooW6^-@PxqPKL3{A|Gv{X5SW!+=g4YV~CR9FMOoP{je iSk%>&<(WN7oP-&e7#ZT6WeT^tiSBe;w`ad2gEavB?SN4L literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/editors/help.gif b/org.tizen.nativeplatform/icons/editors/help.gif new file mode 100644 index 0000000000000000000000000000000000000000..ae2c4c0abdba36bd37b1b4add59a370ebfc470f1 GIT binary patch literal 622 zcmZ?wbhEHb6krfwc*el+@6X?V|Neja{QcvnZ@>Ti@0+>)&)@(3v(`C5--Jb8cn@w?4?Pj1eiDFT8Yzx>(@-%cxLhL%Zqkh>YcY?^WNjPpT58K z zjk%MzSIpTrW%Gq8o6b$$e175XE4QD%yY=L)TGBN2iLK7-+upJyK&2pKmWh~{`cujkkWaZ4=mM384 zB+JBX44mHLpVZ-K zl_{b4!&vi3NsFvxfuFi>p>w)=5UaR2Lyxxzb4)b5h__%;3Y%bnva}Kxw?crk1h>pm LXEn6|M+R#EucKvr literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/editors/run.gif b/org.tizen.nativeplatform/icons/editors/run.gif new file mode 100644 index 0000000000000000000000000000000000000000..57f410224cf0e125fefdfbfd424b34ca32650ac4 GIT binary patch literal 379 zcmZ?wbhEHb6krfwxXQqw(BP;BL>-Qf6T{aP*iM?lCLeYNChZ zME|t4Kq*J#ax2FU508od{@|VOltj+J(UOww!N5}U3iQCI3ZqHwGu%qFO+M$;f|G|KP zbfEZ?g^__lk3k2d733!dwiyo73p{kh9NV1~0xTMO)-@+?HCpL1C+*_|jkQs$L%3SK zWZD#%Uw+AK^#3sVq2$yax7_cq>g;#(C^lABHOjI%u}OEy<@M@F%Q8AK@K5dOm7mJO z;KV30f4Z*Rd;#G}fjokO)8$r)3o+Lza0p5E$no(>iVJg;1ab?@$%#scNeOe;IkR(c Y3G?y_b8(z@@nG_1@(Z}@>d0UX09ibCp#T5? literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/emulator.gif b/org.tizen.nativeplatform/icons/emulator.gif new file mode 100644 index 0000000000000000000000000000000000000000..7559ba162d1636dac20d59185a1bc5100ec74caf GIT binary patch literal 565 zcmZ?wbhEHb6krfwc*Xz%|Ns9#A|w=;KQ*9k?T_z2zJL4v`qk@)4<6pTd++9rn?Ha4 zdiLyjblbAHj^(L+YkJol-f;XzWb4xSu9ZnWtI{W|&78EZXy)eX`8!*d?dw`~aMH%( zQ#T)Ag6=kgn@lhgHuy; zOKS^DM`u?ni*lc!(gY241(tRd=9#l*%1>)%QDkOhG%(aPVOE>h#3IM6W5ms>smCn6 z+KEM$*_h4L%)*LUY6pu9v$nYJuwcHuYsb2?pVK?;Y;$0+1^{ul&;bAd literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/external_browser.gif b/org.tizen.nativeplatform/icons/external_browser.gif new file mode 100644 index 0000000000000000000000000000000000000000..71c987315fccff83e523c0f950a6b241192fccd8 GIT binary patch literal 621 zcmZ?wbhEHb6krfwc*el+f5-or^0iC%Jr^*Da!Ty+uU#M1uraJ@b5!e=*p6+9-8=W5 zdwA&5lY=SELh^YicjKmY!}|Mmas=l`#N{(txD|JOhNfBgL) zv*zT>pZ`Dn{{Q9AfBX6SU;X<3`q%%@fBt{}`~Ua9{~!PS|Mchox4-{?{rms(-~X7C zC++L&W7e*nbn@i<{rlIRJQ-6SbMnc__EU%w$KWP$BzWo0E`6o|KDld1Cevc`{QRpY z*W5V2^U2AzlhxG9%gg`&|Ia{6p!k!8k%1wBK?h_BC{7sIPce|$jZqpNQjGx&X~o=-_I(-&cVsW%hNe4Ty4kBT}E2bO%ZB3 zhYsr=JsQ;%pk`obsBUWNt9{u!rYTTOLsdgV&sN*k-(E?-DN;?>%*_0fzelXCm6CTt zkeZ&Rxw5vSzmKP1n-2#=T34r}a?yo|hl@`OD!KMCD0&=a;gd4)Xox;|xI;kInj=io p@{-qN0d2L4z)z|Swoc7q3wRtpbNkHjol%qc>C>|Fj*Scq)&Nv=2u%P0 literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/file.gif b/org.tizen.nativeplatform/icons/file.gif new file mode 100644 index 0000000000000000000000000000000000000000..b84737e909401a0d41673539d070a702dce2c54d GIT binary patch literal 344 zcmZ?wbhEHb6krfwxXQrr^ueP~Uw{An_29c z(yHd7Bp|@i)7zuuqQX9T%2Z_+dA?b*=g7M#@bIuKUb0xhMTUFT>NScka?;Y0QkynQ N%E|ida&}~}1^|NQn%MvV literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/file_link.gif b/org.tizen.nativeplatform/icons/file_link.gif new file mode 100644 index 0000000000000000000000000000000000000000..e77773d7512ee14f889a87352410a160a7437cd2 GIT binary patch literal 576 zcmZ?wbhEHb6krfwc*Xz%|NsC0`RmX3pTEEU`2G3Y?vNI zOsy{QuPXMhE(xeB^{XxpXs_~_SnttO>$Q91r0wgc%x!g@-sEv!Plv1Fb)&CzL6s};-Kd3KKWR;|`Ttjk%Yq?X&X+RBM+6jW0c6trkH z6WcA$%gxBIrJ>PcE^%C*mxr5EVZVB_k+kR)NrBS>{AZM#jM?t9$!G`&u$kOaYBFSh z!!FFn$aWj2;|K51U-Oo3wwa1{~vIQFi20YCG_4gTPM3Mg|6J E0JjLeVE_OC literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/folder_search.gif b/org.tizen.nativeplatform/icons/folder_search.gif new file mode 100644 index 0000000000000000000000000000000000000000..0a03c7b44bdb3fe2951c0b1a62c1b77cfcf68ae4 GIT binary patch literal 347 zcmZ?wbhEHb6krfwxXJ(m|NsC0^XABp4<~-S*zn`Qf*&^~{J7BY<3h!Y3mu2M&32!- zzP3nzUYfd$SCxBMN?cJ*TzPX`N!^bZGyeQ|^5@Hq4>u=e680{$Sas!{ zrpt=!+G$$9o@oBy=27NPi&5rLS77Vn5f|j^3lQgQmzR*>VG`mKVw%e|*-4dyhh3Ua gK$?Bk0w*;djtx>$8#vZD^X}NW%WKbGXGaEW0E(e{sQ>@~ literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/form_banner.gif b/org.tizen.nativeplatform/icons/form_banner.gif new file mode 100644 index 0000000000000000000000000000000000000000..aebc0b2a306424a0f0636a9e1c409399d5a54ad5 GIT binary patch literal 5600 zcmd^e_ct4i<8_P>lxnM1Q94jv+EQAhXcei|R@H8_wddneyPD9J3c83rYQ(PSuwqul zu2Ga&iJeGDBr+xaKA-pBc<(v)ocqH)=bn4+xfWKp^{;t42_6G50RTFk!(eb(tbHbv z%V2Q0Tt0`xW3%^JEH01tcYmMHb7Tl8%Ti@d`mZ8NsWdra0ogUQ`vaOivNr4{N1ac`YK zr|hzKsH|-Ylf1*gty1x8y95$rb8BydNM9$=uuIzu%anQi&KzzVyF^~yq_1qyme+Uj zYt%IYeRY$zva!3oP9>5V1k&E-7JY+ABU4zU9p=_HgGk;Zkm$Q~4wc5H?6P*KOg4wd zV(&9qTn3XfyR^NyLcy(3msTnG_1%rFy>%jejX+!7++EqA(ivRZ9%q-%rqWn*_#G^6 zdtrq#zq~Vt-^Sv|xHZbkCT)3R7r#y=kQtk#y^SsUI+3;aeHrJm9o6KyFsF_Z_%i9HigF8*=3Tc zOcI5$wX?@$?=x83Jtl|FVAGjg8iTXD$EMO*bS8(*<*_*X%>QzD{Qt<|?*A|H?_VCD zzyIIffB*9NeBS>Pfd4;m?teA^_XPlm57+=HS)z)&6G2C`-1cWDhy>R=9?OHL zC(9*74kYfbpYCo7d87&b6dGfeP5IQ5EP2MmO*L~x^qpF1uC)SUZ7BPECw92y>&9rY z!RY&hQXQ#@3Y(See_bGc)8z)~DnW|6#OZs!^|l4Bx;x`dp6GQlH@t5O75S&J-5@e- z=9kq$QeAE_X{G7kA(ff=mN4x6EB;?wch|^&x9i;{PSq8(llN-8j@i|_edn&W)A9-n za=+7OhSe;NMSMTnrxL*b&X|uFW?Lx7)RQanEqLUsE|#apO@ypGq2p>`Nb383@VSj-#%MB0b|eQmEV`%LCu(6{kP=`)6FlMW6*&j+U-2K8n>ybYat z>hx6LUbnMfRj;Ef!dmsA+sm;Bavm{~%YU+A0#}_p?NlRX9;fOuoSq)ESNHJ_f9<_d zP&nSDBBi){=2c-Ep$g=uLlMJSyd+w=$m?gAx+tVR*D2++EDPN+fK`hmIdcDf8G+n1!=_LnT zQ`-N5xnY@K;;1QAtuKBDqLSZOc#on62XNvbB`!Rj*0+2CItHtQyYv zFM?C*WIR>RZdW1@ty_LQDi2+X8g>Kn%F86des$;xZLKn)-&%*0G}440gU@C9mYllu zZ1}N_UOQ#k)+EDi#m-FNS)aXuikIkpxbT@%r*BH15k7nu`00wHi$cSxkDjJh)8a=R z?AJ~QxL<>vwhke9xqEKwu0MjQB_KWhzxY`SxEV0K^TQl(`*=qolob_xE9w~7z$Wrl ztX{2h6IO3nvS~hWG>FNci(azPTY@qR8W;ZAS!l$+7QN847^%^rxBPUnu6g;5MSL?3 zcE`A7J@dYC^h(j+x~p%>-rluPeqwz$iKuL6`ca`iPYrE*jr`6+F?zMZ+|G6*ALbaN9o7zBD@?k1M1eMCv1iu z$W20sy1I|--$~1B_{bvHb6sM2&u0Ejf1Wc7pr=autG*VjehPgo-ve;|&~-@%C300C zA}OQ!8id6q$ek+|2~rjL&yXNFj038%Oe7RT6U1NQ1TM`SMueiEn#0+GR!v=q@G;oc z@M0;OnZr__?O*dnts%l^vwIZ4_AsSW5DAUVo609Hz0q^90=`N%Il<9RxHb%tNZjla ziI9dHOwLFjvHT&?ib_0{uL`nqIw6U92fOh8vG9#-jIiTa!kMyCrG-j!9dJXU*|$$3 zH#C2!#cMyYR)QQlZ)qamaY|i7zgy;nl@+)Z_rb8aOd_hwO2w)BqvH%rv##so@qL^I z(lAkL)FeY`6(<$ZoOpl)Nm?6#N^16dU3di*%rh_7>Y5x>Pe+OA%hR%#j@)5scUya3 z#)D;wyEJdBjof{zDpVqEp4Cc!6P(*6EUyXE?{iLIc8A2%(O8~TH}W&#pzVHM>R+8B zT`?UAQsMk;L1UUTFz(08BF?bS7M*Q(o&Ht)ui>V#BzE+9>*r!gb4^o$l(Be>aFI^K zrkRkUeNyAEVyTge8^FQw^v4;+z@r4qiz)V*vXjpQ)2ht>vd7+im@Lwi^u1|%{r5{_ zdWmsnrKLu--7CRo>Y97LwwJUfa$0ptu9Xwafi8EmhaD=912--0#2qsIWsqvUL~KtR5oEBPs0Q3tfRsAmn|i#+Y)7yOJ1p*>aCA=e+iLOD>Jq~A@V%g z^nr}TaJ3Rl$QciPdi+>|bRh1FYJZ^j4GQdp%%`vBp^3g0XI;MSn*y~cH~o1yQIHAL z?@ubf?rM`&a&Wxa#lrr&;Gv(cw^-9ncKXoJgDBgG#@_`VaBIW6m+WG&N1#`uVf`g{ z+zIzgTW3bL!_6@Z z4EoLzpU6a0pNBw~<{k<7$hDDx6xhO6iO`T<``&|#FQ~`xJ7zOz?)iH71(Lf^X7dY&or?JG z(|Vu_-*P01o1v=fhCYi7MpLp=g%+c21IS{JN|Q_gm`=4X&Zw&RA(Q-A)bm^vlEN;Yn=5{3+ zYx4%I(}hG&bi?#b%)a#Lcssegvqps?zD^(-#T}v8FEx@e!4B%f?j1@{WWm%op-NFO`6!q~ zcEZ{I1o>u|tbT%Qc7hfQc10d`%{SrbOyc?E#8aDhPRb|VoJqJ!gI?53ywIFrC7-Ct zO1#ZVuwW&s`6iwKCF)edI&QsGO-{V~>8Tk&=&pc}zx`|Peo;%5s9*Nc{)$sB@1KQ^ z35IDV$fLDo>0I{@z|5y||;tKRsg(;nK9QJ#@+v*jR% z0U4G)#A&$#6T#|t*Y4{gScve!h zSh9u%N;EhdZXqq)ntil`<GtAH~}KXn%5+}eMIrkUylJBn#O+S?ER zk^T0ke%f%D#|iZ-F^!corNtlh&5}9{e~kR9di4 zSZn|hm}~Dff)q17`8>qr`EeY`Tw69>TQ=W|AM|4E`DLq*v+JVRtKzAfKycSbFy-To z=y>}hx+FPu(nCS&hFILEjJ*Cx`!O*nK3I?v*;}rDAT-k{I_fn5%0fnY5K_YKMSs;t zeD{Sn$t(Vwjqqkz1ehd5QoO zl@zNlTM7h~t%<-`qS?~PD_?^$*udoEWDjj`0|nQHHK3V-Zm|_0F;qYp@+QILjQ}dL z%1V$SDldeJjCc*IfatOw%D>W!O0thi%1V*w$`tRqA+8-=34wmpLtvZ{K7JbME%_zi z1=9)n!|eQ_GeINHE~A9}F@=KP{4)iAatdav3MQiqO1)&Kt`#m16r|-8{wC!6nikHq zc&%0yQV4}}1NnG%f$Ma^3tR!kuLygs5KqWcBRZU?){s)U6HxTZwgcad71$FN89fTZnQ>Q zURL>j)(t>q$Omf5Pd_Ne3hw2H7$7J-i8%erDH(!9B8riZWGnnzk*|G|!@(61gR+4! z$zfQeR&m861Tria$zN!!xDy%y9YnryNe*ePNE}2iOb5YIk|7KvT(J_0MfwqgBD5-_ z{41Zwoc0l|%Bil*f>fmpR#s_M=U%Uh0atwBR9E^}ri)k9=T>D`SA1x#3LUI@=2F#_ zTa|`IHe#!r{Hww^Nb7%dLa0H`UxW<@lf5uGv*9-GCLjf9o!KmK9U->>&WQHR4fnRq z^Yv*1rW8AsGwx?@Jq1-%X1;!x;>OnH$|5|qkWUohUj9g*L4~j8pc1GJU<+6>mJHyQ zx}OLZ&a(jwp@3(Dza4Fmx&!*>lMU9P;Xo`(4vi8+qn6iE#|>Pi0~*8)P-0w^a7}|G z7o{e_ZxEdOBDK{ZJ%>7b=c{%sN~We^cJPZDybk-)W=7|WBpM}h_RC51*S}y?8mqzd z*tg^Guc~~6|M z{ZsczTHIY)7jjP!|FrD3OPOV~K-`vC+?-ri)SD+08TQWVJ6Fr|Rm%lY&34+E-KX7< z5OGoI7E(;!PPJ}ZP7AX!X8X`)`buyz zAKpy7p7OKzb8oqL63XXwu{dQ=oyM`{AVLm~wLlc?Ji)Ey2Jozg)?IjO-Bw8a`#1L! zJAcJ?CZanzb7g@dJ zVMk?uxm!-hdsv5uxWXn}93q5dg7dfUAaX8s(p@`qW@)L!S>UXKIv zo`F7|!@Z9KKfCAmJ|6B3tnGCS>luQgberj zoa=uP*XJ209(bTH)vZ4^72}?di5zx~J=fd;nja`R zFc7aaSbA>IEl&I;3~*Ix=s}G9!<3$0FTjDWp1_G7*J}Bkt)X1kjvx8r#F~zm(?30P z>#Ggy?zOc#kV29m;*EwQlWrr^aU(Ofj0oUNIpI1hI

J~@ zpw@oM@%dCOMci3=d{lSx$9x_~XxhVQ`mxcpxBIj=dCJ$QKA=E6NO`(vf124i4RQYy zIx@WmpAIvcj4hasC;tH${dvm!^CRx(!FS^3`5{DZd1v%kx{-nuYSOc1^8NYzjFHLg zy0JPOfQ=nPi~~^8Q}@!Q%G#&gcy1!@lU44+HAZ7~3t01@$r z#`{^^$YkDmL>_q(MVZ_n&+<=VNk*OJLD&lACA`rR-F=Die2G=C#A#pJUs&SvmH;X^ zy8B}9894CQEQ&QLF4Y^Jut?<17B4IwHpW+R7au4u$xE3W?7%B6;#K%~Rh8uv#>=NX zmeu2zHMeJrCGj$g%NH(8RR-W43-CHB;}_#s^b1$6cdQsLt{C%IOjK6Qj8|`MFF$a{ u-w&E{u)*fNpQ5<0*sHAFGhTD>SaXbDb1GbO=~#1HT=Q5|5D)+W4E_(a7HsYS literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/icon_application.png b/org.tizen.nativeplatform/icons/icon_application.png new file mode 100644 index 0000000000000000000000000000000000000000..ef74fd1f771bfaa00f098b1014b903cd3f8f1797 GIT binary patch literal 5759 zcmV-_7J%uAP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=00004XF*Lt006O$eEU(80000WV@Og>004R=004l4008;_004mL004C` z008P>0026e000+nl3&F}000Y`NklSbz{hs9hBVDiRxnXz2n36bQ7a5498mF-b`Y zG-(?*ac1m!-p4uTV=;GF?~$w|V`nt}-T(Q2kNM7AVrHak^_NHyq@YvK z=}JM5>{82pv)OFU0{9kyTL4gs>-?p)wv9&P*Z1Cg@7?#`fB(^A$Bq$zv)M&=qCv}L z9nEI**8o1)`A?jtDCfYn7jn5A4jw%Cz-_nP_UZZg`7jZ$xe)ZSie~2b0DyDOMp5*# zF{Z-IsoeljN=^8_zX^b_*6sjs6@a4vbfRk8vvmMqB0?C3^VMqguhv@2%&L2PtlQuw zgf13~d&b7brjv)p0OXUnX92iwPAe&znVI7_UW%f~GP4gr5D^p6x`u7qs{&v;ftyP} zI{;B)A3cKx5dnZ;W{;Vr5Q3$YP6)BCVKXxean?mCVW|_)3P5-<*3k)q9UEb#l+jun zrIcIe?!iRVVZh0kNTAb&Sz1quCL#zSKtxt+ZMD`$Yi-v%Xdy(0fn#Q~T<0`V0 zl2hwoz5s0J-*nNHVaGNS>*)67bsr3q*wvjY^Xsk*J5Q3f%GQ+zRC2plqVGYn%B zM1}y!VF6!LSqC#aW|(5ZmtMv%v|90||GZe+bmaNdV+)H-|8%+GNg?3C7|;9h%=B2W z^NpJpXEqj2mva96QmxrA#z`TB9L3CIBtSDWODV;~cz)xla`O#OJpSwzzj^Gr@uv=* z(B*0qK@_7E#1KSaFg#BopYg^wZ5Z2h!_F;NfAr=Z3pelCdMpUS7aPqemU3{g`v!Wo zVKalZmR2b}^NZgfe#iX}{dMB+|2|2zMgZp+o|ceOAmgiUdqJhz!l`l{hn}1Fe)Y(a zna_M=&&IEO;`;yOvg)6$z(j*mc3%~}y094;t+)}ojX!wcsmb3xb_7$U0`gf8LJ*8` zFt+^#08$XNlF%6mA`N34&MY?YouB;4Td34$@BZR@ou}lX*g8W*Vi1tm2xx%8WSu4F z96V1!D~TwwU@)dj1zb5j!G)X$=NL=%fR4Rz2F+Fk-&c@QAfNSMjKz;1dRlJTJhA;t zx4*s2u{lms4ouN&BkN!W7-StIiYz1vT)$(pyJi3OVAnMpmo^l2EuT@bb4<<1`Tspx zpZwYH=Efg==9q*O5JXT)BI7ac`^A&qP1kL`dUi|Ulyfc=LX1QvvSJ=RsAZjVzOS)& z*H-@W9eb-cyme|mr{a^w#Pu+0#$l70NN~ZEbkmOU%$~Qrcl$SfsIUIjqt7belOO<| zmN-*s;*n>bFTHu|u1RCeNg=#d1#PYEeiM6?6-@{tL)Mz|S3kM$^p+{VGMVKU%H?up ziKSIq!_VZQlwu(StaYeVgK(;(4u9&lU1NXw`|-`SdJCSG5Tc!x%pE)BgJ{ec^OBSr zqaf;`do&R!HY~Kn!c9A;pD33r!D6-LGPxpUG8xudvk(HZ?YGR#BA?HR*u?c6*GyGQ z#q8$FQUksx0T7IJIJr=h0QuHfV$TsEc{TmHQyuojI##pj5`xHDiffG^6v|hVlUb5d zvQo-*-i7aakIqRcp`_r@3IKdw1BM95dJ63hjayZbbRhRd(SxdLrIh6RzDzEvyYS+6 z17l{J&t)?Q54}{V)B-3a+VPYfln~f5J#OMS4hAtNxMm8L^OY?+U9n|fmR5pD%5A?q zaCoY`*g!7ZZi6@mgcNw&>~s)^L8CMAx!RC>QT5tu{1ePrAy<0fz>zmTbYM>VTAsZ$ zVPtU4l^d{c=S;a3gjJ~&My1arR`TdUt9rRo9Y9>nWhM_i{rq*`{?VUHK^Q|y0RmvH zLl_&}`Jvrm(YOC&Ad*sIHRn%y4TNh((F}kDOtFxecuaMVB&*ckHO1ZAF+ErV9v5ryjXeEX9eXsQ39}jQ;<)7v# zmpNDIg^|Vn>#lNlfBvQu$n9X(N= zI&^d%V>$2aFJ>I$b06E&oZXWBU$qg`CMQcGm(8%0l1K5a!=5~Ph%cN;kbe10WBkQa zRb(?7l&E=j+eW-|*XC38YW-B9P(&`5byBKfHCn>Xye5&2&FZaAP9nl)!I{@r=^r~Xj`w>I%Cv>Arld0 zGnonPjg7Hm=bR%Dh@G=x7%!3#5i^hS*xkh`dJuhsR|B2(J^x?NSN8t=_lGv*vz{d| zg3w}i+Z28H-EVq^T>KmZ5K@viW}%%T$rSBeuo9lC$*`fPo>Mn`ykOYfX>sghqqgnc>wmIlNA1i~~Jj!H00 z72Ur)I#u+jC^}VjZ~czGfKFjwI-j2AqmxfSPjl!C*mc_A{g~@u0A#HtW)1*&MC6hK zmv$YqCm}@37}N8yf|WoEW~Qa3r7MW&Og^6vnAtk#Vq**s;xNvru4=VfT3A@PN-1^e zidIUMopbp(j!TtF<(;)!ElB#m+)I6bIoop-MY%8xb+K3k5gBH-Xbd!AH`(m+}z2lBMZfE9q zC4o~USIppo8@jAV)=DXq%jLO;AAb1BTCGL^VgQQ(mH;#pm9Gq%h;#zf2T%myC7?rG zaG#O&2s*KfaR3__-Ck_g(YZ@b zE!h@+auw5c{;~<5unRO_Y#tpae;NQStce3g17EHSwtc;zZP!&xtHb44bu5)H);hYc x7z@;j(q!3lK=n!AY({UO#lFTB>(_`g8%^e{{R4h=>PzA zFaQARU;qF*m;eA5Z<1fdMgRZ;HAzH4RCwBA`2YVu13tWP;lls;N zQ{V~-Q6(^1qdJ}5b>V@$xuch8;GK#qrrjn<;xea zH_FP&7|xtIgJA$b05L)IAo~Jn9F&`yn#!1ewL~ zaHS|i{>sI0=`&O2{-1t68SZ3&0Ahh!if#%+tM3j-7{pmHeEa%?;rEY!3_rg8Wcc~* zH$$f3T(Az1K>z{7f~U4kx#oDKj23;>8W5={jZ{F(p&002ovPDHLkV1g3wFb)6! literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/large_image.gif b/org.tizen.nativeplatform/icons/large_image.gif new file mode 100644 index 0000000000000000000000000000000000000000..c5c94ee9aca7ed9cbb3e392fa79dc4bf7412f17b GIT binary patch literal 2300 zcmds$`#%%Ke!O3=$LsBgbg;DYJ_U||b+A2KTU!gu z8w<2j-j)CAox>F5Z0NdMn@c z)>HRLvitV&g{bJFYf)5GG}ZThv0rRyFt$7h`z#`*>ULUnRAwzEr#>N%fz4y!o;IeC zn^VY5>6AY*s4W@PKL{l(VhM{-{F+emnppBWht^7>vne&4!s-r6O-J#IuCn^>a%OK; z6Zd&Dx3=Zu%hvv;j-i&$&#m1f9Upk_`uRPB0`8xay`Kbq!&3uaroRXlhWT^6$;DB@ z{M^!79=$EU>TTh#g*6>z4c%4ETn2lvrRy{M{V3-nud9EoZ$!xbbE5at_~7WYU}l9c zT$)*26VCtD@sZc_X}oV_YG8DFh&S_fa`B5`ewaTyyRbX!{ocbPI?<)e$w6)&%G-BTr5ZwGF4B>y(eEEqa?O>MOzJ zgco*M$CxsGakegTI(ZIkQaP=at?iEZbD$YZ$ zHU9gk_2LS^j(FRpeKV!fU7sYj!%O1GOQ9o6%icso>GI6LQ|(4bsZ#N*cv*#JKu^>q zJ)4lR8(;rXa`5lP60lom6@L)uy24CzvlRtE5w_EQ!|lfZ*xcM$os|SF4D<@CGyofI zXU<2)e4rX!yZw!H*UpfvKuy+3)r&`n;MD6n4U$w`5ZYL#5;+Wz1K9ZV5(GQN4u;4H zr=OR^-xCzj_*lH23rJGCCDcyV7UhoEfDH=F#3`Amj<(SBw$oKKB93RMh7OJ462*67 zcYqDZNR+S?s-L=xKQyW(t<#~ZC`Znf&bFLEJLR14Dfd%&2(s)H9gh*odB#RM-a6sE z6AIv=3eDd;W zF2AJ;K&;6P4SMF}J?(-j|MCeK>u(WOp^=08WVVu5G9ub#&9|R(5qmW$W2pbVn)+=M%ivIS(8^f%gYOI zI9gt?61wT7Un?(#kx!$`h~Ks8m(poi9c74tw-9Oib7duzbp8B%s{uVu6lJe!@?zw2 zb+yrtQLQ64gDD-~7v5Dj;wE7=>6xOKc$oFZ5>CqxEa^7b2A^8&ekfqo(zLF)u@Zl- z40&nJ@C{$?h~21d(=-4etoieen6FyFr%Y!nqh#}gbl~fh4o#~O=e0X$theN#!`@Tg z2L}X6-C?hBFL7dAzK5atsO6BeqZIgoYMjWn?m5JZ9ocWuizUX?b2bfP4K>e3R|bi| zhix1+ZnF0~5a{1?Xp@e(d7Rv#UH2=qlTYtk(T->c5Nq8PgoCS_v03dhx`5l3_U#+x zs=}*T*5)wa?u?W)#Ae2GLu#lFGA8#$Y~*M5v?li-W}kyp#R|ESi|dNdt9ySoIO3R9 z6(`kwU@uo|Q4&TQ04$;EwU>IG$Q9RqPV%aJq-NX_`$+J*HVp;^b|(a5E9!RBW)FoT zs{t_TSQPZkZa4%$MHL`pjqXPJAipa8V~8?FE1HpJ)OW;whr`hQU678Iw@~7@226oYtsmSV(_?`p+!u z{7XH~P$Wiko#S|1b4m6$b6crysOXM+tqxK z=#z|#+FAMtmU0U(&J=Acb_rlqJ=c$PHEKiZX0Llv25QYTDs%ud9)?tafQzl!YAlR| z9>5%E)`o4cjB?3#7Me(FBKZA<_UL3N4BH;mmI1D5<=uICT*!jNP z$*wY^K3S(TAyur#DsJB~lnCIwkzT`(L1fSY3Ncnw{-Tqmyb{Ob=i(LZYlu66rMIZd zJs|dkt0a@WLt+nLU10g_ZIR8U(2U;O4)j6u*!D$doH3f?A2H!@iYYfg`8=QaF)&mT zT8HksP~`G7m;TTzRFKN^|YJAz|nsJ0GSaS literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/list-delete.gif b/org.tizen.nativeplatform/icons/list-delete.gif new file mode 100644 index 0000000000000000000000000000000000000000..af59a0b19a37f5fc972c97e950c677f325bf444f GIT binary patch literal 586 zcmZ?wbhEHb6krfwc*el+xv1oGap`eQgQE)CPYoaa*hZ|Nk=#0-*Slg^__Fm_Y~R7EqipurF^2Zfb66 zZT0Br>}YH95bmGg>Cxk0ARsbLz{`7btE0Z8gqWzN%WTJ1S0N=mC4Qw1LQYM5zI<+c z0es?8d!=-on*tbp+sk--`Oci`cc literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/localization/Error.png b/org.tizen.nativeplatform/icons/localization/Error.png new file mode 100644 index 0000000000000000000000000000000000000000..f7df6912022ac75ba37b9e8832b91fa767657887 GIT binary patch literal 408 zcmeAS@N?(olHy`uVBq!ia0vp^d_c_4!2~3u%QBUL6k~CayA#8@b22Z19F}xPUq=Rp zjs4tz5?O(K&H|6fVxXqOAk26?e?bKjk!sF{tX|p|7QR53lc8wEky6;DTNHl}8-} z7gz*{E&S3lN!P;2P@bz*Hr z_dU&y|FYjROe&9NRrtnq(AGd&Fxp{rqaNe0?=4HjCa`Q${I+O^=sM|M#-J}L%7I?C x!dkbNuVwmdxTassJJjPFgt#zhaD{n%k%e!CczcnA zs-9@Ro(^aA^8LW0018VEC2ui01yBW000GL;3tk`X_}mOo@ptpt;?$BTXJ3A z$)xA|HIa?fh%_1_fl|aUMi>MFQn;{1q7ldd0ud^06w3BuaI8e+$D}YhepQ?j*pERApkpM)@ok> literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/newc_app.gif b/org.tizen.nativeplatform/icons/newc_app.gif new file mode 100644 index 0000000000000000000000000000000000000000..5d2ba0f02512d1379746300d2ffac07c3011e49d GIT binary patch literal 379 zcmV->0fhcXNk%w1VGsZi0M$DH;^X7n+S=&o=$Dt5j*gD|{QJ1Lx0{=roSdAIk&(E# zxVX8v)YQ|txw!D~@r#R##>K_z>gt-BnwXfFqN1XzsjB?^{J+1xTCLEQmX`PS_V)Jn z+uPgt`1sn|+PS#6#l^)pmC8Gq%U`k6N}|qCn*7;zKDm1ot>SYo}MUyxjj8S%*@Q0nVJ9p|NsC00000000000 z00000A^8LW0027xEC2ui01yBW000JNThm^VlK>xK-h4F z&E`WuCO>u=!v%y(aZskg1a>%_b_0bBf@1^#5e_RJ6gmTV4Kg}6H-C#a6*@W-J2`rb zGdGVn1(G?HiI|z0oSr)pABs1lj5ijN5<3V6sxym^ojM1y3$>1nEs_X3G`*O=r8+dk Zw0wSm4jL?y%QZAL*w)wB*Vj8i06Wi_!c_nO literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/package.png b/org.tizen.nativeplatform/icons/package.png new file mode 100644 index 0000000000000000000000000000000000000000..1d37a5fe7e8243146b1e2a08b87db1fe0108f5a8 GIT binary patch literal 514 zcmV+d0{#7oP)mhJy?Nu|YJ<@Q{!YxS;?61UDctF%hm{^XAPAjEsz63<4lNvIWQhAb?n~ z1y*u$GQ-@tbK!iLjUAUT)dB<%+yyY(z^1aWFl1$Af!Y54{tWm4KmfsAz{CVH>o1ti z%E}5i5L-e+1^@xXf@~`T!*4hnVjy7y00Icj00y`VUFiAHz zGcYtZHli4?ZQC}63S@Oq01!YJnF&2_U|4{bnE(O|0HMyOFDNt4C;$Ke07*qoM6N<$ Ef>!9ml>h($ literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/package_installer.gif b/org.tizen.nativeplatform/icons/package_installer.gif new file mode 100644 index 0000000000000000000000000000000000000000..f08a7f2d86c08e94bb26371d246c7f3af5989041 GIT binary patch literal 596 zcmZ?wbhEHb6krfwc*Xz%|NsC0eZK0;e&0_Aa^Gz6x&8Fd&da~o)VfVS_FJrSuRy`F z_h0^PxbR!3Xst-uHqo+eLd9#p9SnW5+4t>^u)oju{=L}#|HkxxH)j98Irry-ZTp)v zHkT`Zy}4<1jmw%^*Y(Z*o7#dlv<9td3fR~dymwm4&PgfzXBQltUw&k9^|593N0!tb zS=w-Z%jA`rN(T2grtw9^x!}dcJt)px2o!-{v z!QAS=9A_)PFv~K)R5sO3b8Wf%y1L-6+v=XKtvW2gedQR_eQZQ2y_w$O1jafL8gGnOD+drCXTW>!%H-~UQs9}UV7Z1-4&VCM7M-fSJ zG11uT8X@DFnn~ZQ><$b3loDi E0Q&#gUH||9 literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/packagelist_to_table.gif b/org.tizen.nativeplatform/icons/packagelist_to_table.gif new file mode 100644 index 0000000000000000000000000000000000000000..9a92931dfe4312a6a31a47b90def91269a295bc6 GIT binary patch literal 577 zcmZ?wbhEHb6krfwc*Xz%|NsC0`RmX3pMPF|{Q2a~j~zR9Y?)xYV#npq&d%x*|JNUW zefs+Q>-XPnv-aJ4@#DeEAJ55i+6Ae;k zeEjyiuFS8h*uT0Ypt?Aqxx%-;)UU7Bv$xi>qsn`Bi|dpI_cgut%R3#HcR4L;cV5`$ zJiFQT!HNEjeRfwiW!~Cbb9GZD&?8_E4JAVHCkrD3gA0QW$kCuUVPK!vz~0pC(%RPU zz|_U$$ll&>$vlbK$+@q;)ryy6j{Q{Y87?-$;yk)?JmR(s&86q8m$q}!>9^o!*&!>$ zV!@`Z&Bl4iL~#8a6;n1%4J}4SPBT`q%dA(;*woZ-oi~!?yDupqWyGeataOl5PeMdS zRFq%Tm`zoI?HnhUfdLnnK9`}0#E%a=@@mW+f?UxZnvDC}&r3O#NPN6_sGFOak--`O Df!eUG literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/remove.png b/org.tizen.nativeplatform/icons/remove.png new file mode 100644 index 0000000000000000000000000000000000000000..fd972e9b58660b421b94ee67d39136a21cd451a6 GIT binary patch literal 299 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufiR<}hF1en@PMa_V~B-+@*jQ{9uWpLt}jhn`HYzBDpniq znauj=QSA)7+rfMjC-b^YWoA_}`VqP0)Bm+Sr~daFzf){^f9~IZL5*)=%ijF=H~Gr* zg6+@$`uG3K^*a>jmp7+;|M#Egn#_m)zhix_M({XX{UUhOU=c5aR*SXtS?i3n2Ytt? zw@dzWXnuWu?e86vxtA@Tkn?@k-~Z2h7|uAjUTRV0xxmb88xXkG#h77w(jCLbBnFjT s4LdUQmz^)0?)aoZLehY*B9DdP9|boFyt=akR{09r71PXGV_ literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/sample.gif b/org.tizen.nativeplatform/icons/sample.gif new file mode 100644 index 0000000000000000000000000000000000000000..34fb3c9d8cb7d489681b7f7aee4bdcd7eaf53610 GIT binary patch literal 983 zcmZ?wbhEHb6krfw_|CxKYUg-n!?izO{@9*?jxd%4aX0yzy`dymabz zw#(eg=y~&N&n)dZv2xzduG}5lraiApo3(c4*{Ylg5#|$JO_EEZ<^|a2`Z*=9ns7DV zy=TR&gYw*7f%auV?ip3tvjRPmcdoho{K?x$_vR?C#t5&<;~V}S*>OMCr>h}%%bLZ9 zmo3`hYEwTICo-TTCZwgTsC&VjZRgJ1eE#fBa^%9R zmmfWS@;bnyJ27HWY}kxYzv(Hl>yu;FCPlAEh+34Muq-8Rb6C)<8qA3{r2e5 z`$vyngh#H=FWlqqvnapfc5%(!sQ4v?r7J61-&eJNEN^;KTK}T7{#i-gJh%G*9vcYdwv_*~xdw!Gz4Va?T!sXyyF@8?w<>X`X=#j%uHV4GRvj@+tE@ zQ%F!a)GKcn^~8abN>4la1UNXVL;{ZWi)lEwyeatDu%Lr6;aASiLrXXW zQm#d-n|5sO6 z7Zw(B&-$N|k|MGCe_dUj-huyaZf?=h(b?JABFp}BO!*%lAJ0Gke_UK#U|?WKNQjGz zOL%y=tE;QGx3}`P|3N`P|Ns9#uzx?0WS}-s{K>+|z@WmQ12P!oCkD1Whe-t$o|UySjUNIC)y?CROo>Oq{MH!q+>en@@bkWF>LNg)NNCbLTRvD6U(-VT0Rd I7e@wb060Qn;{X5v literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/icons/th_horizontal.gif b/org.tizen.nativeplatform/icons/th_horizontal.gif new file mode 100644 index 0000000000000000000000000000000000000000..f4c14a4e37e2a96c09f81cf38ece0c440027b48e GIT binary patch literal 174 zcmZ?wbhEHb6krfw*v!CSZ@=H(zCM2be*5`A+TK3izJ7juJdgy6&9DDI-~N6)NX7sE z{|_8E03;QEvM@3*@H6Nz00GDh2A1d#Cp}mDXuO^~*~M2vsZ&BOK3Txc+05^O$qQy7 z=ZDjn6fS5wFZ{|S(P(zrFOqp}$I_!sjeDL><7VBuQYuOE_LP^YkL;#zloVfH{k1MF V|KkbS>8GYQ*PXwvEGNid4FL3TM*jc+ literal 0 HcmV?d00001 diff --git a/org.tizen.nativeplatform/plugin.properties b/org.tizen.nativeplatform/plugin.properties new file mode 100644 index 0000000..a1f5f1f --- /dev/null +++ b/org.tizen.nativeplatform/plugin.properties @@ -0,0 +1,7 @@ +# Tizen Presentation +SLPPresentation.themelabel = Tizen Presentation +SLPPresentation.themedescription = Colors and fonts used by Tizen +SLPPresentation.editorlabel = Editor +SLPPresentation.editordescription = This font is used by Tizen's editors +SLPPresentation.fontlabel = Tizen C/C++ Editor Text Font +SLPPresentation.fontdescription = The C/C++ editor text font is used by C/C++ editors. diff --git a/org.tizen.nativeplatform/plugin.xml b/org.tizen.nativeplatform/plugin.xml new file mode 100644 index 0000000..643c46c --- /dev/null +++ b/org.tizen.nativeplatform/plugin.xml @@ -0,0 +1,702 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + + + diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/Activator.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/Activator.java new file mode 100644 index 0000000..27866a9 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/Activator.java @@ -0,0 +1,111 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; +import org.tizen.nativecommon.build.ProjectTypeManager; +import org.tizen.nativeplatform.build.CustomDebianProjectDependentBuilderOld; +import org.tizen.nativeplatform.build.PlatformConfigurationManager; +import org.tizen.nativeplatform.build.PlatformProjectDependentBuilder; +import org.tizen.nativeplatform.build.PlatformProjectDependentPackager; + + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.tizen.nativeplatform"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + + ProjectTypeManager.registerProjectArtifactType( + PlatformConfigurationManager.OLD_SLP_CUSTOM_DEBIAN_ARTIFACT_TYPE, + CustomDebianProjectDependentBuilderOld.getInstance(), + PlatformProjectDependentPackager.getInstance(), + false); + + ProjectTypeManager.registerProjectArtifactType( + PlatformConfigurationManager.TIZEN_CUSTOM_DEBIAN_ARTIFACT_TYPE, + PlatformProjectDependentBuilder.getInstance(), + PlatformProjectDependentPackager.getInstance(), + true); + + //SLPProjectTypeManager.registerBuilder("SLP Custom Debian Package", CustomDebianProjectDependentBuilder.getInstance() ); + //SLPProjectTypeManager.registerBuilder("SLP Inhouse Framework Package", InhouseFrameworkProjectDependentBuilder.getInstance() ); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * Returns an image descriptor for the image file at the given + * plug-in relative path + * + * @param path the path + * @return the image descriptor + */ + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } +} + diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/CustomDebianConfigurationOld.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/CustomDebianConfigurationOld.java new file mode 100644 index 0000000..e81d998 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/CustomDebianConfigurationOld.java @@ -0,0 +1,183 @@ +/* +* Native Platform +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.build; + +import java.util.ArrayList; + +import org.eclipse.cdt.core.CCProjectNature; +import org.eclipse.cdt.core.settings.model.ICResourceDescription; +import org.eclipse.cdt.managedbuilder.core.BuildException; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IFileInfo; +import org.eclipse.cdt.managedbuilder.core.IFolderInfo; +import org.eclipse.cdt.managedbuilder.core.IResourceInfo; +import org.eclipse.cdt.managedbuilder.core.ITool; +import org.eclipse.cdt.managedbuilder.core.IToolChain; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.cdt.managedbuilder.internal.core.ToolChain; +import org.eclipse.cdt.managedbuilder.tcmodification.IFolderInfoModification; +import org.eclipse.cdt.managedbuilder.tcmodification.IToolChainModificationManager; +import org.eclipse.cdt.managedbuilder.tcmodification.IToolListModification; +import org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIPlugin; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.tizen.nativecommon.build.CommonConfigurationOld; + + + + +@SuppressWarnings("restriction") +public class CustomDebianConfigurationOld extends CommonConfigurationOld +{ + // get compiler flags + public static String getAllCFlags( IConfiguration config ) + { + return getAllCompilerFlags( config, SBI_BASE_C_COMPILER_TOOL_ID ); + } + + + public static String getAllCPPFlags( IConfiguration config ) + { + return getAllCompilerFlags( config, SBI_BASE_CPP_COMPILER_TOOL_ID ); + } + + + protected static String getAllCompilerFlags( IConfiguration config, String compilerId ) { + + ITool compilerTool = config.getToolsBySuperClassId(compilerId)[0]; + + String compilerFlags = ""; + + try { + compilerFlags = compilerTool.getToolFlags(); + + // skip "-c" option and replace double quotes + String[] flags = compilerFlags.split(" "); + compilerFlags = ""; + for( int i = 0; i < flags.length ; i ++ ) { + + if ( flags[i].compareTo("-c") == 0 ) { + continue; + } + + flags[i] = flags[i].replace("\"", "\\\""); + compilerFlags = compilerFlags + " " + flags[i]; + } + } catch (BuildException e) { + e.printStackTrace(); + } + + compilerFlags = compilerFlags.trim(); + return compilerFlags; + } + + + + + protected static boolean isCPPProject( IConfiguration config ) + { + try { + IProject project = (IProject)config.getOwner(); + + if ( project.hasNature( CCProjectNature.CC_NATURE_ID ) ) + return true; + } catch (CoreException e1) { + e1.printStackTrace(); + } + + return false; + } + + + + public static void changeToolchain( IConfiguration config, ICResourceDescription cfgd, String toolchainNameInCfg) { + IToolChainModificationManager tcmmgr = ManagedBuildManager.getToolChainModificationManager(); + IToolChain[] r_tcs = ManagedBuildManager.getRealToolChains(); + IToolChain[] v_tcs; + + IResourceInfo ri = config.getResourceInfo(cfgd.getPath(), false); + IToolListModification mod; + + if (ri instanceof IFolderInfo) { + mod = tcmmgr.createModification((IFolderInfo)ri); + } else { + mod = tcmmgr.createModification((IFileInfo)ri); + } + + IToolChain realToolChain = null; + if (ri instanceof IFolderInfo) { + IToolChain toolChainInstance = ((IFolderInfoModification)mod).getToolChain(); + realToolChain = ManagedBuildManager.getRealToolChain(toolChainInstance); + if (realToolChain==null) + realToolChain = toolChainInstance; + } + + boolean isMng = config.getBuilder().isManagedBuildOn(); + ArrayList list = new ArrayList(); + + IToolChain[] tcs = r_tcs; + IFolderInfoModification fim = (IFolderInfoModification)mod; + tcs = fim.getCompatibleToolChains(); + IToolChain[] tcs1 = new IToolChain[tcs.length + 1]; + System.arraycopy(tcs, 0, tcs1, 0, tcs.length); + tcs1[tcs.length] = realToolChain; // add existing toolchain + tcs = tcs1; + + for (IToolChain tc : tcs) { + if ( tc.isSystemObject() && !(((ToolChain)tc).isPreferenceToolChain() && !isMng) ) { + // NO TOOLCHAIN + continue; + } + list.add(tc); + } + + v_tcs = list.toArray(new IToolChain[list.size()]); + int x = 0; + IFolderInfoModification foim = (IFolderInfoModification)mod; + + for (int i = 0 ; i < v_tcs.length ; i++) { + if (v_tcs[i].getName().equals(toolchainNameInCfg)) { + x = i; + break; + } + } + + IToolChain tc = v_tcs[x]; + if (tc == null) return; + + + foim.setToolChain(tc); + + try { + mod.apply(); + } catch (CoreException e) { + ManagedBuilderUIPlugin.log(e); + } + } +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/CustomDebianProjectDependentBuilderOld.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/CustomDebianProjectDependentBuilderOld.java new file mode 100644 index 0000000..1a1f77b --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/CustomDebianProjectDependentBuilderOld.java @@ -0,0 +1,129 @@ +/* +* Native Platform +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.build; + +import org.eclipse.cdt.core.settings.model.ICResourceDescription; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.core.resources.IProject; +import org.tizen.nativecommon.build.CommonProjectDependentBuilder; +import org.tizen.nativecommon.build.exception.SBIException; + + +public class CustomDebianProjectDependentBuilderOld extends CommonProjectDependentBuilder { + + private static CustomDebianProjectDependentBuilderOld instance = new CustomDebianProjectDependentBuilderOld(); + + public static final CommonProjectDependentBuilder getInstance() { + return instance; + } + + public static final CommonProjectDependentBuilder getInstance(IProject project) { + instance.setProject(project); + return instance; + } + + private CustomDebianProjectDependentBuilderOld() { + super(); + } + + private CustomDebianProjectDependentBuilderOld(IProject project) { + super(project); + } + + @Override + protected String getElfInfoOption() { + return "-s -W"; + } + + @Override + protected String getConfigureOption() { + + String options = String.format(" "); + + return options; + } + + @Override + protected String getMakeOption() { + // TODO Auto-generated method stub + return ""; + } + + @Override + protected String getCleanOption() { + // TODO Auto-generated method stub + return ""; + } + + @Override + public String getTargetID() { + IConfiguration config = getConfiguration(); + return CustomDebianConfigurationOld.getBuildTargetName(config); + } + + @Override + public String getTargetID(IConfiguration config) { + return CustomDebianConfigurationOld.getBuildTargetName(config); + } + + @Override + protected String getDebugOption(String[] arrOption) { + String gdbOptions = "-gdb-options=\'"; + for (int i = 0 ; i < arrOption.length ; i++) { + gdbOptions = gdbOptions.concat(arrOption[i] + " "); + } + gdbOptions = gdbOptions.concat("\' "); + + String sysroot=""; + try { + sysroot = String.format("-sysroot=%s", getSbi().getRootstrapPath(getTargetID()) ); + } catch (SBIException e) { + e.printStackTrace(); + } + + return gdbOptions + sysroot; + } + + @Override + public void setBuildTargetID(IConfiguration config, String targetId) { + CustomDebianConfigurationOld.setBuildTargetName(config, targetId); + } + + @Override + public void setToolCommand(IConfiguration config, String rootstrapCfgName) { + CustomDebianConfigurationOld.setToolCommand(config, rootstrapCfgName); + } + + @Override + public void changeToolchain(IConfiguration config, + ICResourceDescription cfgd, String toolchainNameInCfg) { + CustomDebianConfigurationOld.changeToolchain(config, cfgd, toolchainNameInCfg); + } + +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformConfigurationEnvVarSupplier.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformConfigurationEnvVarSupplier.java new file mode 100644 index 0000000..eaf3639 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformConfigurationEnvVarSupplier.java @@ -0,0 +1,62 @@ +/* +* Native Platform +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.build; + +import java.util.ArrayList; + +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.envvar.IBuildEnvironmentVariable; +import org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier; +import org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider; +import org.eclipse.cdt.managedbuilder.internal.envvar.BuildEnvVar; + +public class PlatformConfigurationEnvVarSupplier implements + IConfigurationEnvironmentVariableSupplier { + + @Override + public IBuildEnvironmentVariable getVariable(String variableName, + IConfiguration configuration, IEnvironmentVariableProvider provider) { + // set "SBI_SYSROOT" variable + String sysrootPath = PlatformConfigurationManager.getRootstrapPath( configuration ); + return new BuildEnvVar("SBI_SYSROOT", sysrootPath, IBuildEnvironmentVariable.ENVVAR_REPLACE, null ); + } + + @Override + public IBuildEnvironmentVariable[] getVariables( + IConfiguration configuration, IEnvironmentVariableProvider provider) { + + ArrayList list = new ArrayList(); + + // set "SBI_SYSROOT" variable + String sysrootPath = PlatformConfigurationManager.getRootstrapPath( configuration ); + list.add( new BuildEnvVar("SBI_SYSROOT", sysrootPath, IBuildEnvironmentVariable.ENVVAR_REPLACE, null ) ); + return list.toArray( new IBuildEnvironmentVariable[0] ); + } + +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformConfigurationManager.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformConfigurationManager.java new file mode 100644 index 0000000..66360c7 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformConfigurationManager.java @@ -0,0 +1,301 @@ +/* +* Native Platform +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.build; + +import java.util.ArrayList; + +import org.eclipse.cdt.core.CCProjectNature; +import org.eclipse.cdt.core.settings.model.ICResourceDescription; +import org.eclipse.cdt.managedbuilder.core.BuildException; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IFileInfo; +import org.eclipse.cdt.managedbuilder.core.IFolderInfo; +import org.eclipse.cdt.managedbuilder.core.IResourceInfo; +import org.eclipse.cdt.managedbuilder.core.ITool; +import org.eclipse.cdt.managedbuilder.core.IToolChain; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.cdt.managedbuilder.internal.core.ToolChain; +import org.eclipse.cdt.managedbuilder.tcmodification.IFolderInfoModification; +import org.eclipse.cdt.managedbuilder.tcmodification.IToolChainModificationManager; +import org.eclipse.cdt.managedbuilder.tcmodification.IToolListModification; +import org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIPlugin; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.tizen.nativecommon.build.CommonConfigurationManager; +import org.tizen.nativecommon.build.SmartBuildInterface; +import org.tizen.nativecommon.build.exception.SBIException; + + + + +@SuppressWarnings("restriction") +public class PlatformConfigurationManager extends CommonConfigurationManager +{ + // ProjectInfo + public static final String CURRENT_SLP_PROJECT_VERSION = "1.0.0"; + public static final String TIZEN_CUSTOM_DEBIAN_ARTIFACT_TYPE = "com.samsung.slp.nativeide.buildArtefactType.cdeb"; + public static final String OLD_SLP_CUSTOM_DEBIAN_ARTIFACT_TYPE = "com.samsung.slp.project.custom.debian"; + + // SBI Compatibility + public static final String SBI_PROJECT_TYPE_ID = "com.samsung.slp.nativebuild.target.sbi.gcc45sbox2.cdeb"; + public static final String SBI_DEFAULT_I386_CONFIGRATION_ID = "com.samsung.slp.nativeide.config.sbi.gcc45sbox2.cdeb.emulator"; + public static final String SBI_DEFAULT_ARM_CONFIGRATION_ID = "com.samsung.slp.nativeide.config.sbi.gcc45sbox2.cdeb.device"; + public static final String SBI_DEFAULT_TARGET_NAME = "tizen-device-1.0.sb2_gcc45sbox2.armel.cdeb"; + public static final String SBI_ARM_TOOLCHAIN_NAME = "gcc45sbox2.armel.cdeb"; + public static final String SBI_ARM_SBOX2_TOOLCHAIN_NAME = "gcc45sbox2.armel.cdeb"; + public static final String SBI_ARM_ROOTSTRAP_NAME = "tizen-device-1.0.sb2"; + public static final String SBI_I386_TOOLCHAIN_NAME = "gcc45sbox2.i386.cdeb"; + public static final String SBI_I386_SBOX2_TOOLCHAIN_NAME = "gcc45sbox2.i386.cdeb"; + public static final String SBI_I386_ROOTSTRAP_NAME = "tizen-emulator-1.0.sb2"; + + // get compiler flags + public static String getAllCFlags( IConfiguration config ) + { + // TODO: should be removed + if ( isOldConfiguration(config) ) { + return CustomDebianConfigurationOld.getAllCFlags(config); + } + + return getAllCompilerFlags( config, SBI_BASE_C_COMPILER_TOOL_ID ); + } + + + public static String getAllCPPFlags( IConfiguration config ) + { + // TODO: should be removed + if ( isOldConfiguration(config) ) { + return CustomDebianConfigurationOld.getAllCPPFlags(config); + } + + return getAllCompilerFlags( config, SBI_BASE_CPP_COMPILER_TOOL_ID ); + } + + + protected static String getAllCompilerFlags( IConfiguration config, String compilerId ) { + + ITool compilerTool = config.getToolsBySuperClassId(compilerId)[0]; + + String compilerFlags = ""; + + try { + compilerFlags = compilerTool.getToolFlags(); + + // skip "-c" option and replace double quotes + String[] flags = compilerFlags.split(" "); + compilerFlags = ""; + for( int i = 0; i < flags.length ; i ++ ) { + + if ( flags[i].compareTo("-c") == 0 ) { + continue; + } + + flags[i] = flags[i].replace("\"", "\\\""); + compilerFlags = compilerFlags + " " + flags[i]; + } + } catch (BuildException e) { + e.printStackTrace(); + } + + compilerFlags = compilerFlags.trim(); + return compilerFlags; + } + + + + + protected static boolean isCPPProject( IConfiguration config ) + { + try { + IProject project = (IProject)config.getOwner(); + + if ( project.hasNature( CCProjectNature.CC_NATURE_ID ) ) + return true; + } catch (CoreException e1) { + e1.printStackTrace(); + } + + return false; + } + + + + public static void changeToolchain( IConfiguration config, ICResourceDescription cfgd, String toolchainNameInCfg) { + // TODO: should be removed + if ( isOldConfiguration(config) ) { + CustomDebianConfigurationOld.changeToolchain(config, cfgd, toolchainNameInCfg ); + return; + } + + IToolChainModificationManager tcmmgr = ManagedBuildManager.getToolChainModificationManager(); + IToolChain[] r_tcs = ManagedBuildManager.getRealToolChains(); + IToolChain[] v_tcs; + + IResourceInfo ri = config.getResourceInfo(cfgd.getPath(), false); + IToolListModification mod; + + if (ri instanceof IFolderInfo) { + mod = tcmmgr.createModification((IFolderInfo)ri); + } else { + mod = tcmmgr.createModification((IFileInfo)ri); + } + + IToolChain realToolChain = null; + if (ri instanceof IFolderInfo) { + IToolChain toolChainInstance = ((IFolderInfoModification)mod).getToolChain(); + realToolChain = ManagedBuildManager.getRealToolChain(toolChainInstance); + if (realToolChain==null) + realToolChain = toolChainInstance; + } + + boolean isMng = config.getBuilder().isManagedBuildOn(); + ArrayList list = new ArrayList(); + + IToolChain[] tcs = r_tcs; + IFolderInfoModification fim = (IFolderInfoModification)mod; + tcs = fim.getCompatibleToolChains(); + IToolChain[] tcs1 = new IToolChain[tcs.length + 1]; + System.arraycopy(tcs, 0, tcs1, 0, tcs.length); + tcs1[tcs.length] = realToolChain; // add existing toolchain + tcs = tcs1; + + for (IToolChain tc : tcs) { + if ( tc.isSystemObject() && !(((ToolChain)tc).isPreferenceToolChain() && !isMng) ) { + // NO TOOLCHAIN + continue; + } + list.add(tc); + } + + v_tcs = list.toArray(new IToolChain[list.size()]); + int x = 0; + IFolderInfoModification foim = (IFolderInfoModification)mod; + + for (int i = 0 ; i < v_tcs.length ; i++) { + if (v_tcs[i].getName().equals(toolchainNameInCfg)) { + x = i; + break; + } + } + + IToolChain tc = v_tcs[x]; + if (tc == null) return; + + + foim.setToolChain(tc); + + try { + mod.apply(); + } catch (CoreException e) { + ManagedBuilderUIPlugin.log(e); + } + } + + + public static String updateBuildTargetConfiguration( IConfiguration config ) throws SBIException { + + // get target name + String targetID = getBuildTargetName( config ); + + // if targetID is null, set default target name + if ( targetID == null ) { + targetID = SBI_DEFAULT_TARGET_NAME; + } + + SmartBuildInterface sbi = SmartBuildInterface.getInstance(); + + // if target exist , just return + if ( sbi.checkTargetID(targetID)) { + return targetID; + } + + String rootstrapID = sbi.getRootstrapIDFromTargetID(targetID); + String toolchainID = sbi.getToolchainIDFromTargetID(targetID); + + // check rootstrap name + if ( !sbi.checkRootstrapID(rootstrapID) ) { + // set default + if ( config.getName().contains(SBI_DEVICE_CONFIG_SUFFIX) ) { + rootstrapID = SBI_ARM_ROOTSTRAP_NAME; + } else { + rootstrapID = SBI_I386_ROOTSTRAP_NAME; + } + } + + // check toolchain name + if ( !sbi.checkToolchainID(toolchainID) ) { + // change "gcc-4.5.3-i386.sb2" , "gcc-4.5-i386.cdeb.sb2" + if ( ( toolchainID.equals("gcc-4.5.3-i386.sb2") || toolchainID.equals("gcc-4.5-i386.cdeb.sb2") ) && + sbi.checkToolchainID( SBI_I386_SBOX2_TOOLCHAIN_NAME ) ) { + toolchainID = SBI_I386_SBOX2_TOOLCHAIN_NAME; + } + // change "gcc-4.5.3-armel.sb2" , "gcc-4.5-armel.cdeb.sb2" + else if ( ( toolchainID.equals("gcc-4.5.3-armel.sb2") || toolchainID.equals("gcc-4.5-armel.cdeb.sb2") ) && + sbi.checkToolchainID( SBI_ARM_SBOX2_TOOLCHAIN_NAME ) ) { + toolchainID = SBI_ARM_SBOX2_TOOLCHAIN_NAME; + } else { + // set default + if ( config.getName().contains(SBI_DEVICE_CONFIG_SUFFIX) ) { + toolchainID = SBI_ARM_TOOLCHAIN_NAME; + } else { + toolchainID = SBI_I386_TOOLCHAIN_NAME; + } + } + } + + // create target name && update configuration + targetID = sbi.makeTargetID( rootstrapID, toolchainID ); + setBuildTargetName(config, targetID); + + // if target exist, create + if ( !sbi.checkTargetID(targetID)) { + sbi.writeTargetCfgFile(targetID); + } + + return targetID; + } + + + + public static String getRootstrapPath( IConfiguration config ) { + + try { + + // if not exist, update target configuration + String targetID = updateBuildTargetConfiguration( config ); + + // return rootstrap + SmartBuildInterface sbi = SmartBuildInterface.getInstance(); + return sbi.getRootstrapPath(targetID); + + } catch (SBIException e) { + e.printStackTrace(); + return "/"; + } + } +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformMakeGenerator.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformMakeGenerator.java new file mode 100644 index 0000000..2276e20 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformMakeGenerator.java @@ -0,0 +1,208 @@ +/* +* Native Platform +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.build; +import org.eclipse.cdt.managedbuilder.core.IBuilder; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo; +import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin; +import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator2; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IResourceStatus; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.MultiStatus; +import org.eclipse.core.runtime.Path; +import org.tizen.nativecommon.build.exception.SBIException; + + +public class PlatformMakeGenerator implements IManagedBuilderMakefileGenerator2 { + + private IProject project; + private IPath topBuildDir; + private IConfiguration config; + + public final static String SBI_MESSAGE_NEED_PROJECT_CONVERSION = + "Old project type detected!\nPlease upgrade your project.\n" + + " 1. Open the popup-menu by clicking right mouse button on your project\n" + + " 2. Select \"Convert To...\" menu item to open a project converter dialog.\n" + + " 3. Select \"Upgrade Tizen .....\" item on the dialog.\n" + + " 4. Check if all project options are set correctly.\n" + + " (Some options may not be transferred automatically)"; + + + @Override + public void generateDependencies() throws CoreException { + return; + } + + @Override + public MultiStatus generateMakefiles(IResourceDelta delta) + throws CoreException { + + if ( PlatformConfigurationManager.isOldConfiguration( config ) ) { + + //SBIException ex = new SBIException(SLPApplicationProjectConverter.SBI_MESSAGE_NEED_PROJECT_CONVERSION); + SBIException ex = new SBIException(SBI_MESSAGE_NEED_PROJECT_CONVERSION); + ex.showErrorDialog(); + + throw new CoreException( new MultiStatus( + ManagedBuilderCorePlugin.getUniqueIdentifier(), + IStatus.ERROR, + new String(String.format("Build failed! Please upgrade project!" )), + null) ); + } + + // if Makefile does not exist, regenerate "Makefile" + IFolder configDir = project.getFolder( config.getName() ); + if ( !configDir.exists() ) + return regenerateMakefiles(); + + return new MultiStatus( + ManagedBuilderCorePlugin.getUniqueIdentifier(), + IStatus.OK, + new String(), + null); + } + + @Override + public IPath getBuildWorkingDir() { + // return project folder + if ( topBuildDir != null ) { + return topBuildDir.removeFirstSegments(1).removeLastSegments(1); + } + return null; + } + + @Override + public String getMakefileName() { + return null; + } + + @Override + public void initialize(IProject project, IManagedBuildInfo info, + IProgressMonitor monitor) { + this.project = project; + this.topBuildDir = project.getFolder(info.getConfigurationName()).getFullPath(); + this.config = info.getDefaultConfiguration(); + + return ; + } + + @Override + public boolean isGeneratedResource(IResource resource) { + return false; + } + + @Override + public void regenerateDependencies(boolean force) throws CoreException { + return; + } + + @Override + public MultiStatus regenerateMakefiles() throws CoreException { + + if ( PlatformConfigurationManager.isOldConfiguration( config ) ) { + + //SBIException ex = new SBIException(SLPApplicationProjectConverter.SBI_MESSAGE_NEED_PROJECT_CONVERSION); + SBIException ex = new SBIException(SBI_MESSAGE_NEED_PROJECT_CONVERSION); + ex.showErrorDialog(); + + throw new CoreException( new MultiStatus( + ManagedBuilderCorePlugin.getUniqueIdentifier(), + IStatus.ERROR, + new String(String.format("Build failed! Please upgrade project!" )), + null) ); + } + + // Check topdir folder exist + topBuildDir = createDirectory(config.getName()); + + return new MultiStatus( + ManagedBuilderCorePlugin.getUniqueIdentifier(), + IStatus.OK, + new String(), + null); + } + + @Override + public void initialize(int buildKind, IConfiguration cfg, IBuilder builder, + IProgressMonitor monitor) { + this.project = cfg.getOwner().getProject(); + this.config = cfg; + topBuildDir = project.getFolder(cfg.getName()).getFullPath(); + } + + + // function for creating directory from GnuMakefileGenerateor + private IPath createDirectory(String dirName) throws CoreException { + // Create or get the handle for the build directory + IFolder folder = project.getFolder(dirName); + + // should be checked later + if (folder.exists()) { + folder.delete(true, null); + } + + if (!folder.exists()) { + // Make sure that parent folders exist + IPath parentPath = (new Path(dirName)).removeLastSegments(1); + // Assume that the parent exists if the path is empty + if (!parentPath.isEmpty()) { + IFolder parent = project.getFolder(parentPath); + if (!parent.exists()) { + createDirectory(parentPath.toString()); + } + } + + // Now make the requested folder + try { + folder.create(true, true, null); + } + catch (CoreException e) { + if (e.getStatus().getCode() == IResourceStatus.PATH_OCCUPIED) + folder.refreshLocal(IResource.DEPTH_ZERO, null); + else + throw e; + } + + // Make sure the folder is marked as derived so it is not added to CM + if (!folder.isDerived()) { + folder.setDerived(true); + } + } + + return folder.getFullPath(); + } + +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformProjectConverter.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformProjectConverter.java new file mode 100644 index 0000000..819f040 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformProjectConverter.java @@ -0,0 +1,183 @@ +/* +* Native Platform +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.build; + +import org.eclipse.cdt.core.model.CoreModel; +import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; +import org.eclipse.cdt.core.settings.model.ICProjectDescription; +import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager; +import org.eclipse.cdt.core.settings.model.WriteAccessException; +import org.eclipse.cdt.core.settings.model.extension.CConfigurationData; +import org.eclipse.cdt.managedbuilder.core.IBuildObject; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IConvertManagedBuildObject; +import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo; +import org.eclipse.cdt.managedbuilder.core.IProjectType; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.cdt.managedbuilder.internal.core.Configuration; +import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.tizen.nativecommon.build.SmartBuildInterface; +import org.tizen.nativecommon.build.exception.SBIException; + + +@SuppressWarnings("restriction") +public class PlatformProjectConverter implements IConvertManagedBuildObject { + + IProject project; + ManagedProject mProject; + ICProjectDescription projDesc; + + public PlatformProjectConverter() { + } + + @Override + public IBuildObject convert(IBuildObject buildObj, String fromId, + String toId, boolean isConfirmed) { + + if (buildObj instanceof ManagedProject ) { + mProject = (ManagedProject)buildObj; + project = (IProject)mProject.getOwner(); + ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager(); + projDesc = mngr.getProjectDescription(project, true); + IManagedBuildInfo info = ManagedBuildManager.getBuildInfo( project ) ; + SmartBuildInterface sbi = SmartBuildInterface.getInstance(); + + // convert project type + IProjectType newProjType = ManagedBuildManager.getProjectType( toId ); + mProject.setProjectType( newProjType ); + mProject.setName(newProjType.getName()); + + try { + // convert Configuration id + for ( IConfiguration config : mProject.getConfigurations() ) { + Configuration c = (Configuration) config; + + IFolder f = project.getFolder(c.getName()); + if (f.exists()) { + f.delete(true, null); + } + + Configuration newConfig = createNewConfiguration( config , toId ); + String newTargetName = getNewBuildTargetName( config , toId ); + + // target name + if (!sbi.checkTargetID(newTargetName)) { + sbi.writeTargetCfgFile(newTargetName); + } + PlatformConfigurationManager.setBuildTargetName(newConfig, newTargetName); + + // remove old configuration + mProject.removeConfiguration(c.getId()); + } + + mngr.setProjectDescription(project, projDesc); + info.setDefaultConfiguration(mProject.getConfigurations()[0].getName()); + + } catch (WriteAccessException e) { + e.printStackTrace(); + } catch (CoreException e) { + e.printStackTrace(); + } catch (SBIException e) { + e.showErrorDialog(); + } + + // update .cproject + ManagedBuildManager.saveBuildInfo( project, true ); + + try { + project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor()); + } catch (CoreException e) { + e.printStackTrace(); + } + return mProject; + } + + return buildObj; + } + + + protected Configuration createNewConfiguration( IConfiguration config , String toId ) throws WriteAccessException, CoreException { + + Configuration parentConfig = null; + if ( toId.equals(PlatformConfigurationManager.SBI_PROJECT_TYPE_ID) ) { + if ( config.getParent().getId().contains("custom.debian.emulator") ) { + parentConfig = (Configuration)ManagedBuildManager.getExtensionConfiguration( PlatformConfigurationManager.SBI_DEFAULT_I386_CONFIGRATION_ID ); + } else if ( config.getParent().getId().contains("custom.debian.device") ) { + parentConfig = (Configuration) ManagedBuildManager.getExtensionConfiguration( PlatformConfigurationManager.SBI_DEFAULT_ARM_CONFIGRATION_ID ); + } else { + parentConfig = (Configuration)ManagedBuildManager.getExtensionConfiguration( PlatformConfigurationManager.SBI_DEFAULT_ARM_CONFIGRATION_ID ); + } + } else { + parentConfig = (Configuration)ManagedBuildManager.getExtensionConfiguration( PlatformConfigurationManager.SBI_DEFAULT_ARM_CONFIGRATION_ID ); + } + + String id = ManagedBuildManager.calculateChildId( parentConfig.getId(), null); + + Configuration newConfig = new Configuration((ManagedProject)config.getManagedProject(), (Configuration)parentConfig, id, false, true); + + CConfigurationData data = newConfig.getConfigurationData(); + ICConfigurationDescription cfgDes = projDesc.createConfiguration(ManagedBuildManager.CFG_DATA_PROVIDER_ID, data); + + newConfig.setConfigurationDescription(cfgDes); + newConfig.exportArtifactInfo(); + newConfig.setName(config.getName()); + newConfig.setArtifactName(config.getArtifactName()); + + return newConfig; + } + + + protected String getNewBuildTargetName( IConfiguration config , String toId ) { + String newTargetName = null; + + if ( toId.equals(PlatformConfigurationManager.SBI_PROJECT_TYPE_ID) ) { + if ( config.getParent().getId().contains("custom.debian.emulator") ) { + newTargetName = SmartBuildInterface.makeTargetID( + PlatformConfigurationManager.SBI_I386_ROOTSTRAP_NAME, + PlatformConfigurationManager.SBI_I386_TOOLCHAIN_NAME) ; + } else if ( config.getParent().getId().contains("custom.debian.device") ) { + newTargetName = SmartBuildInterface.makeTargetID( + PlatformConfigurationManager.SBI_ARM_ROOTSTRAP_NAME, + PlatformConfigurationManager.SBI_ARM_TOOLCHAIN_NAME) ; + } else { + newTargetName = PlatformConfigurationManager.SBI_DEFAULT_TARGET_NAME; + } + } else { + newTargetName = PlatformConfigurationManager.SBI_DEFAULT_TARGET_NAME; + } + + return newTargetName; + } + +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformProjectDependentBuilder.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformProjectDependentBuilder.java new file mode 100644 index 0000000..bf5ce7a --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformProjectDependentBuilder.java @@ -0,0 +1,130 @@ +/* +* Native Platform +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.build; + +import org.eclipse.cdt.core.settings.model.ICResourceDescription; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.core.resources.IProject; +import org.tizen.nativecommon.build.CommonProjectDependentBuilder; +import org.tizen.nativecommon.build.exception.SBIException; + + +public class PlatformProjectDependentBuilder extends CommonProjectDependentBuilder { + + private static PlatformProjectDependentBuilder instance = new PlatformProjectDependentBuilder(); + + public static final CommonProjectDependentBuilder getInstance() { + return instance; + } + + public static final CommonProjectDependentBuilder getInstance(IProject project) { + instance.setProject(project); + return instance; + } + + private PlatformProjectDependentBuilder() { + super(); + } + + private PlatformProjectDependentBuilder(IProject project) { + super(project); + } + + @Override + protected String getElfInfoOption() { + return "-s -W"; + } + + @Override + protected String getConfigureOption() { + + String options = String.format(" "); + + return options; + } + + @Override + protected String getMakeOption() { + // TODO Auto-generated method stub + return ""; + } + + @Override + protected String getCleanOption() { + // TODO Auto-generated method stub + return ""; + } + + @Override + public String getTargetID() { + IConfiguration config = getConfiguration(); + return PlatformConfigurationManager.getBuildTargetName(config); + } + + @Override + public String getTargetID(IConfiguration config) { + return PlatformConfigurationManager.getBuildTargetName(config); + } + + + @Override + protected String getDebugOption(String[] arrOption) { + String gdbOptions = "-gdb-options=\'"; + for (int i = 0 ; i < arrOption.length ; i++) { + gdbOptions = gdbOptions.concat(arrOption[i] + " "); + } + gdbOptions = gdbOptions.concat("\' "); + + String sysroot=""; + try { + sysroot = String.format("-sysroot=%s", getSbi().getRootstrapPath(getTargetID()) ); + } catch (SBIException e) { + e.printStackTrace(); + } + + return gdbOptions + sysroot; + } + + @Override + public void setBuildTargetID(IConfiguration config, String targetId) { + PlatformConfigurationManager.setBuildTargetName(config, targetId); + } + + @Override + public void setToolCommand(IConfiguration config, String rootstrapCfgName) { + PlatformConfigurationManager.setToolCommand(config, rootstrapCfgName); + } + + @Override + public void changeToolchain(IConfiguration config, + ICResourceDescription cfgd, String toolchainNameInCfg) { + PlatformConfigurationManager.changeToolchain(config, cfgd, toolchainNameInCfg); + } + +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformProjectDependentPackager.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformProjectDependentPackager.java new file mode 100644 index 0000000..fb248c3 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformProjectDependentPackager.java @@ -0,0 +1,149 @@ +/* +* Native Platform +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.build; + +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.core.resources.IProject; +import org.tizen.nativecommon.build.CommonProjectDependentPackager; +import org.tizen.nativecommon.build.exception.SBIException; + + +public class PlatformProjectDependentPackager extends CommonProjectDependentPackager { + + private static PlatformProjectDependentPackager instance = new PlatformProjectDependentPackager(); + + public static final CommonProjectDependentPackager getInstance() { + return instance; + } + + public static final CommonProjectDependentPackager getInstance(IProject project) { + instance.setProject(project); + return instance; + } + + private PlatformProjectDependentPackager() { + super(); + } + + private PlatformProjectDependentPackager(IProject project) { + super(project); + } + + @Override + public String getPackageOption() { + String workingDir = getWorkingDir(); + + String options = String.format( + "-WORKING_DIR=%s", + workingDir ); + + return options; + } + + @Override + public String getPackageOption(IConfiguration config) { + String workingDir = getWorkingDir(config); + + String options = String.format( + "-WORKING_DIR=%s", + workingDir ); + + return options; + } + + public void buildPackage() throws SBIException { + + String targetID = getTargetID(); + String projectDir = getProjectPath(); + String options = getPackageOption(); + + sbi.actionConsole("buildpackage", options, targetID, projectDir, "Packaging" ); + } + + + public void buildPackage(String configName) throws SBIException { + + IConfiguration[] configurations = ManagedBuildManager.getBuildInfo(project).getManagedProject().getConfigurations(); + IConfiguration config = null; + + for (IConfiguration c : configurations) { + if (c.getName().equals(configName) ) { + config = c; + break; + } + } + + String targetID = getTargetID(config); + String projectDir = getProjectPath(); + String options = getPackageOption(config); + + sbi.actionConsole("buildpackage", options, targetID, projectDir, "Packaging" ); + } + + public void buildPackageDependencyCheck() throws SBIException { + + String targetID = getTargetID(); + String projectDir = getProjectPath(); + String options = getPackageDependencyCheckOption(); + + sbi.actionConsole("checkbuilddeps", options, targetID, projectDir, "Packaging" ); + } + + @Override + public String getTargetID() { + IConfiguration config = getConfiguration(); + return PlatformConfigurationManager.getBuildTargetName(config); + } + + @Override + public String getTargetID(IConfiguration config) { + return PlatformConfigurationManager.getBuildTargetName(config); + } + + @Override + public boolean isDependencyCheckSuppoted() { + return true; + } + + @Override + protected String getPackageDependencyCheckOption() { + return ""; + } + + @Override + public boolean isPackageCheckSuppoted() { + return false; + } + + @Override + public boolean checkPackageFile() { + return false; + } +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchDelegate.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchDelegate.java new file mode 100644 index 0000000..ef01062 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchDelegate.java @@ -0,0 +1,516 @@ +/* +* NativeCommon +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.launch; + +import java.io.File; +import java.io.FilenameFilter; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; +import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; +import org.eclipse.cdt.core.settings.model.ICProjectDescription; +import org.eclipse.cdt.debug.core.CDIDebugModel; +import org.eclipse.cdt.debug.core.ICDIDebugger2; +import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; +import org.eclipse.cdt.debug.core.cdi.ICDISession; +import org.eclipse.cdt.debug.core.cdi.model.ICDITarget; +import org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants; +import org.eclipse.cdt.launch.AbstractCLaunchDelegate; +import org.eclipse.cdt.launch.LaunchUtils; +import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin; +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.cdt.ui.newui.CDTPropertyManager; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.OperationCanceledException; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.SubProgressMonitor; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.core.ILaunchManager; +import org.eclipse.debug.core.model.IProcess; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.window.Window; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.dialogs.TwoPaneElementSelector; + +import org.tizen.common.connection.ConnectionPlugin; +import org.tizen.common.connection.debugtools.DebugTool; +import org.tizen.common.util.LocalPortChecker; + +import org.tizen.nativecommon.build.CommonConfigurationManager; +import org.tizen.nativecommon.build.CommonProjectDependentBuilder; +import org.tizen.nativecommon.build.ProjectTypeManager; +import org.tizen.nativecommon.build.SmartBuildInterface; +import org.tizen.nativecommon.build.exception.SBIException; +import org.tizen.nativecommon.launch.TizenDebugger; +import org.tizen.nativecommon.launch.TizenLaunchConfigurationConstants; +import org.tizen.nativecommon.launch.TizenLaunchMessages; +import org.tizen.nativecommon.launch.TizenUIThreadForConfirmMessage; +import org.tizen.nativeplatform.Activator; +import org.tizen.sdblib.IDevice; + +public class TizenDebianLaunchDelegate extends AbstractCLaunchDelegate { + protected static final String PACKAGE_EXTENSION = ".deb"; + protected static final String CMD_RESULT_CHECK = "; echo $?;"; + protected static final String GDBSERVER_DIR = "gdbserver"; + protected static final String GDBSERVER_BIN = "gdbserver"; + protected IConfiguration selectedConfig; + protected IDevice currentDevice; + protected String executeResult = ""; + protected static final String LOCALHOST = "127.0.0.1"; + protected static final String ENVIRONMENT_SETTING_CMD = "export "; + protected int localDebugPort = -1; + protected ICDISession debugSession; + protected static final String ELM_SCALE_GETTER = "/home/developer/sdk_tools/elm_scale_getter/get_elm_scale "; + protected static final int defaultTimeOut = 60000; + + protected String getPluginID() { + return Activator.PLUGIN_ID; + } + + public void launch(ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { + if (monitor == null) + monitor = new NullProgressMonitor(); + try { + monitor.beginTask(TizenLaunchMessages.LAUNCH_APPLICATION, 20); + monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION); + + activateProgressView(); + + verifyDeviceReachability(getProject(config), new SubProgressMonitor(monitor, 8)); + verifyBuildConfiguration(config, mode, new SubProgressMonitor(monitor, 1)); + + if (mode.equals(ILaunchManager.DEBUG_MODE)) { + verifyTizenDebianProjectSettings(config); + setDebugConfigAttributes(config); + setDefaultSourceLocator(launch, config); + IBinaryObject exeFile = getBinaryObject(config); + launchApplicationForDebug(launch, config, exeFile, new SubProgressMonitor(monitor, 10)); + } else { + launchApplicationForRun(config, launch, new SubProgressMonitor(monitor, 10)); + } + } finally { + if (mode.equals(ILaunchManager.DEBUG_MODE)) { + processPostDebug(config); + } else { + if (!launch.isTerminated()) + launch.terminate(); + ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); + launchManager.removeLaunch(launch); + } + monitor.done(); + } + } + + protected void processPostDebug(ILaunchConfiguration config) + throws CoreException { + if (debugSession != null) { + try { + Process process = debugSession.getSessionProcess(); + if (process != null) + process.waitFor(); + } catch (Exception e) { + // do nothing + } + } + ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy(); + String gdbserverPort = wc.getAttribute(TizenLaunchConfigurationConstants.ATTR_GDBSERVER_PORT, TizenLaunchConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT); + if (localDebugPort != -1) { + try { + currentDevice.removeForward(localDebugPort, Integer.parseInt(gdbserverPort)); + } catch (Exception e) { + // do nothing + } + } + } + + protected void verifyTizenDebianProjectSettings(ILaunchConfiguration config) throws CoreException { + String appPath = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, ""); + IPath hostPath = getHostPath(appPath, config); + if (hostPath != null) { + if (hostPath.toFile().exists()) + return; + else + newCoreException(TizenDebianLaunchMessages.CANNOT_FIND_EXECUTABLE_IN_A_HOST_ROOTSTRAP, null); + } else { + newCoreException(TizenDebianLaunchMessages.CANNOT_FIND_EXECUTABLE_IN_A_HOST_ROOTSTRAP, null); + } + } + + protected void verifyBuildConfiguration(ILaunchConfiguration config, String mode, IProgressMonitor monitor) throws CoreException { + // FIXME : Match by deviceType, not buildTargetArchitecture. + IProject project = getProject(config); + String buildConfigName = getBuildConfigName(config); + + IConfiguration configuration = getBuildConfiguration(buildConfigName, project); + //String buildTargetArchitecture = SLPConfigurationManager.getArchitecture(configuration); + //String buildTargetArchitecture = CommonConfigurationOld.getArchitecture(configuration); + String buildTargetArchitecture = CommonConfigurationManager.getArchitecture(configuration); + if (currentDevice.isEmulator()) { + if(!buildTargetArchitecture.equals("i386")) + resolveProblematicConfiguration(config, "i386"); + } else { + if(!buildTargetArchitecture.equals("armel")) + resolveProblematicConfiguration(config, "armel"); + } + } + + protected void resolveProblematicConfiguration(ILaunchConfiguration config, final String arch) throws CoreException { + final IProject project = getProject(config); + Display.getDefault().syncExec(new Runnable() { + public void run() { + selectedConfig = selectBuildConfiguration(project, arch); + } + }); + + if (selectedConfig == null) + newCoreException(TizenLaunchMessages.BUILD_CONFIGURATION_DOES_NOT_MATCH_WITH_CURRENT_DEVICE_TYPE, null); + + ICProjectDescription projDes = CDTPropertyManager.getProjectDescription(project); + ICConfigurationDescription cDesc = projDes.getConfigurationByName(selectedConfig.getName()); + ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy(); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, cDesc.getConfiguration().getId()); + wc.doSave(); + } + + protected IConfiguration selectBuildConfiguration(IProject project, String arch) { + Shell shell = LaunchUIPlugin.getShell(); + + ILabelProvider topprovider = new LabelProvider() { + public String getText(Object element) { + IConfiguration buildConfig = (IConfiguration)element; + return buildConfig.getName(); + } + }; + + ILabelProvider downprovider = new LabelProvider() { + public String getText(Object element) { + IConfiguration buildConfig = (IConfiguration)element; + return buildConfig.getName(); + } + }; + + TwoPaneElementSelector dlg = new TwoPaneElementSelector(shell, topprovider, downprovider); + dlg.setTitle("Select a new build configuration"); //$NON-NLS-1$ + dlg.setMessage("Build configuration doesn't match with current active device.\nSelect a new build configuration to launch"); //$NON-NLS-1$ + + IConfiguration[] configurations = ManagedBuildManager.getBuildInfo(project).getManagedProject().getConfigurations(); + List adaptableConfigs = new ArrayList(0); + for(IConfiguration c : configurations) { + //String buildTargetArchitecture = SLPConfigurationManager.getArchitecture(c); + //String buildTargetArchitecture = CommonConfigurationOld.getArchitecture(c); + String buildTargetArchitecture = CommonConfigurationManager.getArchitecture(c); + if (buildTargetArchitecture.equals(arch)) + adaptableConfigs.add(c); + } + + dlg.setElements(adaptableConfigs.toArray()); + + if (dlg.open() == Window.OK) { + IConfiguration selectedConfig = (IConfiguration)dlg.getFirstResult(); + return selectedConfig; + } + + return null; + } + + protected IConfiguration getBuildConfiguration(String buildConfigName, IProject project) throws CoreException { + IConfiguration configuration = null; + IConfiguration[] configurations = ManagedBuildManager.getBuildInfo(project).getManagedProject().getConfigurations(); + for (IConfiguration c : configurations) { + if (c.getName().equals(buildConfigName) ) { + configuration = c; + break; + } + } + if (configuration == null) + newCoreException(TizenLaunchMessages.BUILD_CONFIGURATION_DOES_NOT_MATCH_WITH_CURRENT_DEVICE_TYPE, null); + + return configuration; + } + + protected String getBuildConfigName(ILaunchConfiguration config) throws CoreException { + IProject project = getProject(config); + + String buildConfigName = config.getAttribute(TizenLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_NAME, ""); + + if (buildConfigName.isEmpty()) { + IConfiguration configuration = ManagedBuildManager.getBuildInfo(project).getDefaultConfiguration(); + return configuration.getName(); + } else + return buildConfigName; + } + + + protected boolean resolveProblematicConfiguration(IProject project, IConfiguration problematicConfig, String arch, String mode) { + TizenUIThreadForConfirmMessage runnable = new TizenUIThreadForConfirmMessage(project, problematicConfig, arch, mode); + Display.getDefault().syncExec(runnable); + if(runnable.getResult()) { + ManagedBuildManager.getBuildInfo( project ).setDefaultConfiguration(runnable.getSuitableConfigName()); + return true; + } else { + return false; + } + } + + protected void verifyDeviceReachability(IProject project, IProgressMonitor monitor) throws CoreException { + try { + monitor.beginTask(TizenLaunchMessages.PREPARE_TO_LAUNCH, 1); + monitor.subTask(TizenLaunchMessages.PREPARE_TO_LAUNCH); + + currentDevice = ConnectionPlugin.getDefault().getCurrentDevice(); + if (currentDevice == null) + newCoreException(TizenLaunchMessages.CANNOT_CONNECT_TO_DEVICE, null); + if (currentDevice.isOffline()) + newCoreException(TizenLaunchMessages.CANNOT_CONNECT_TO_DEVICE, null); + } finally { + monitor.done(); + } + } + + protected void launchApplicationForRun(ILaunchConfiguration config, ILaunch launch, + IProgressMonitor monitor) throws CoreException { + try { + monitor.beginTask(TizenLaunchMessages.LAUNCH_APPLICATION, 10); + monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION); + String envCmd = setEnvironments(config); + String execArg = setArguments(config); + currentDevice.executeShellCommand(envCmd + execArg); + } catch (Exception e) { + newCoreException(TizenLaunchMessages.CANNOT_LAUNCH, e); + } finally { + monitor.done(); + } + } + + protected void launchApplicationForDebug(ILaunch launch, ILaunchConfiguration config, IBinaryObject exeFile, IProgressMonitor monitor) throws CoreException, OperationCanceledException { + try { + monitor.beginTask(TizenLaunchMessages.LAUNCH_APPLICATION, 10); + monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION); + launchApplicationWithGDBServer(launch, config, new SubProgressMonitor(monitor, 1)); + launchApplicationWithGDBClient(launch, config, exeFile, new SubProgressMonitor(monitor, 1)); + } finally { + monitor.done(); + } + } + + protected void launchApplicationWithGDBServer(ILaunch launch, ILaunchConfiguration config, IProgressMonitor monitor) throws CoreException { + try { + monitor.beginTask(TizenLaunchMessages.LAUNCH_APPLICATION_WITH_GDBSERVER, 1); + monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION_WITH_GDBSERVER); + String gdbserverPort = config.getAttribute(TizenLaunchConfigurationConstants.ATTR_GDBSERVER_PORT, TizenLaunchConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT); + String gdbserverCmd = DebugTool.TOOLS_TARGET_PATH + "/" + GDBSERVER_DIR + "/" + GDBSERVER_BIN + " :" + gdbserverPort; + String execArg = setArguments(config); + String envCmd = setEnvironments(config); + String command = envCmd + gdbserverCmd + " " + execArg; + currentDevice.executeShellCommand(command); + } catch (Exception e) { + newCoreException(TizenLaunchMessages.CANNOT_LAUNCH_APPLICATION_WITH_GDBSERVER, null); + } finally { + monitor.done(); + } + } + + protected void launchApplicationWithGDBClient(ILaunch launch, ILaunchConfiguration config, IBinaryObject exeFile, IProgressMonitor monitor) throws CoreException { + try { + monitor.beginTask(TizenLaunchMessages.LAUNCH_APPLICATION_WITH_GDBCLIENT, 1); + monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION_WITH_GDBCLIENT); + + TizenDebugger debugger = new TizenDebugger(); + debugSession = ((ICDIDebugger2)debugger).createSession(launch, exeFile.getPath().toFile(), new SubProgressMonitor(monitor, 1)); + if(debugSession == null) + newCoreException(TizenLaunchMessages.CANNOT_LAUNCH_APPLICATION_WITH_GDBCLIENT, null); + + boolean attrDebuggerStopAtMain = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false); + String attrDebuggerStopAtMainSymbol = null; + if (attrDebuggerStopAtMain) + attrDebuggerStopAtMainSymbol = launch.getLaunchConfiguration().getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT); + + ICDITarget[] targetArray = debugSession.getTargets(); + for (int i = 0; i < targetArray.length; i++) { + Process proc = targetArray[i].getProcess(); + IProcess iproc = null; + if (proc != null) + iproc = DebugPlugin.newProcess(launch, proc, exeFile.getName(), null); + IProject project = getProject(config); + CDIDebugModel.newDebugTarget(launch, project, targetArray[i], + "Tizen debugger", + iproc, exeFile, true, false, attrDebuggerStopAtMainSymbol, true); + } + } catch (Exception e) { + newCoreException(TizenLaunchMessages.CANNOT_LAUNCH_APPLICATION_WITH_GDBCLIENT, e); + } finally { + monitor.done(); + } + } + + protected void setDebugConfigAttributes(ILaunchConfiguration config) throws CoreException { + ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy(); + wc.setAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_REMOTE_TCP, true); + wc.setAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_HOST, LOCALHOST); + String gdbserverPort = wc.getAttribute(TizenLaunchConfigurationConstants.ATTR_GDBSERVER_PORT, TizenLaunchConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN); + try { + localDebugPort = getDebugPort(); + if (localDebugPort < 0) + newCoreException(TizenLaunchMessages.CANNOT_CREATE_FORWARD, null); + currentDevice.createForward(localDebugPort, Integer.parseInt(gdbserverPort)); + String localPort = Integer.valueOf(localDebugPort).toString(); + wc.setAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_PORT, localPort); + wc.doSave(); + } catch (Exception e) { + newCoreException(TizenLaunchMessages.CANNOT_CREATE_FORWARD, e); + } + } + + protected int getDebugPort() { + int debugPortBase = -1; + if (currentDevice.isEmulator()) + debugPortBase = 26102; + else + debugPortBase = 26202; + + int port = debugPortBase; + while ((port < 65535) && !LocalPortChecker.isPortAvailable(port)) { + port += 10; + } + + if (LocalPortChecker.isPortAvailable(port)) + return port; + else + return -1; + } + + protected String setEnvironments(ILaunchConfiguration config) throws Exception { + String envs = ""; + String[] envArray = getEnvironment(config); + for (String env : envArray) + envs = ENVIRONMENT_SETTING_CMD + env + " && "; + return envs; + } + + protected String setArguments(ILaunchConfiguration config) throws CoreException { + String appPath = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, ""); + String arguments = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ""); + String executableWithArguments= ""; + if (!arguments.equals("")) + executableWithArguments = appPath + " " + arguments; + else + executableWithArguments = appPath; + return executableWithArguments; + } + + protected void activateProgressView() { + Display.getDefault().syncExec(new Runnable() { + public void run() { + try { + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.ui.views.ProgressView"); + } catch (PartInitException e) { + e.printStackTrace(); + } + } + }); + } + + protected File findFirstFilebyExtension(File searchPath, String ext) { + File[] allFiles = searchPath.listFiles(new ExtFilter(ext)); + if (allFiles == null || allFiles.length == 0) + return null; + + return allFiles[0]; + } + + protected class ExtFilter implements FilenameFilter { + protected String ext; + + public ExtFilter(String ext) { + this.ext = ext; + } + + public boolean accept(File dir, String name) { + return name.endsWith(ext); + } + } + + protected void newCoreException(String message, Throwable exception) throws CoreException { + Status status = new Status(Status.ERROR, Activator.PLUGIN_ID, message, exception); + throw new CoreException(status); + } + + protected void refreshResources(IProject project) throws CoreException { + if(!project.isSynchronized(IResource.DEPTH_INFINITE)) + project.refreshLocal(IResource.DEPTH_INFINITE, null); + } + + protected IBinaryObject getBinaryObject(ILaunchConfiguration config) throws CoreException { + String appPath = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, ""); + IPath hostPath = getHostPath(appPath, config); + IBinaryObject binaryObject = LaunchUtils.getBinary(getProject(config), hostPath); + return binaryObject; + } + + protected IProject getProject(ILaunchConfiguration config) throws CoreException { + String projectName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); + if (projectName == null || projectName.equals("")) + newCoreException(TizenDebianLaunchMessages.CANNOT_FIND_PROJECT_NAME, null); + return ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); + } + + protected IPath getHostPath(String exePath, ILaunchConfiguration config) throws CoreException { + CommonProjectDependentBuilder builder = ProjectTypeManager.getProjectBuilderInstance(getProject(config)); + String targetID = builder.getTargetID(); + + String rootstrapPath = ""; + try { + rootstrapPath = SmartBuildInterface.getInstance().getRootstrapPath(targetID); + } catch (SBIException e) { + newCoreException(TizenDebianLaunchMessages.CANNOT_FIND_HOST_ROOTSTRAP_PATH, e); + } + + if (!rootstrapPath.equals("")) + rootstrapPath = rootstrapPath.concat(exePath); + + return new Path(rootstrapPath); + } +} \ No newline at end of file diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchDelegateForAttach.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchDelegateForAttach.java new file mode 100644 index 0000000..444ec90 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchDelegateForAttach.java @@ -0,0 +1,171 @@ +/* +* Native Platform +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.launch; + +import org.eclipse.cdt.core.IProcessInfo; +import org.eclipse.cdt.core.IProcessList; +import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; +import org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants; +import org.eclipse.cdt.launch.internal.ui.LaunchImages; +import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.Path; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.window.Window; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.dialogs.TwoPaneElementSelector; + +import org.tizen.common.connection.debugtools.DebugTool; +import org.tizen.nativecommon.launch.TizenDeviceProcessList; +import org.tizen.nativecommon.launch.TizenLaunchConfigurationConstants; +import org.tizen.nativecommon.launch.TizenLaunchMessages; + +public class TizenDebianLaunchDelegateForAttach extends TizenDebianLaunchDelegate { + protected Integer pid = Integer.valueOf(-1); + protected final String ATTACH_OPTION = " --attach "; + + @Override + protected void setDebugConfigAttributes(ILaunchConfiguration config) throws CoreException { + ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy(); + wc.setAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_REMOTE_TCP, true); + wc.setAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_HOST, LOCALHOST); + String gdbserverPort = wc.getAttribute(TizenLaunchConfigurationConstants.ATTR_GDBSERVER_PORT, TizenLaunchConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_ATTACH); + try { + int localDebugPort = getDebugPort(); + if (localDebugPort < 0) + newCoreException(TizenLaunchMessages.CANNOT_CREATE_FORWARD, null); + currentDevice.createForward(localDebugPort, Integer.parseInt(gdbserverPort)); + String localPort = Integer.valueOf(localDebugPort).toString(); + wc.setAttribute(IGDBServerMILaunchConfigurationConstants.ATTR_PORT, localPort); + wc.doSave(); + } catch (Exception e) { + newCoreException(TizenLaunchMessages.CANNOT_CREATE_FORWARD, e); + } + } + + @Override + protected void launchApplicationWithGDBServer(ILaunch launch, ILaunchConfiguration config, IProgressMonitor monitor) throws CoreException { + try { + monitor.beginTask(TizenLaunchMessages.LAUNCH_APPLICATION_WITH_GDBSERVER, 1); + monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION_WITH_GDBSERVER); + + setPID(); + if (pid.equals(Integer.valueOf(-1)) || pid.equals(Integer.valueOf(0))) + newCoreException(TizenLaunchMessages.CANNOT_LAUNCH_APPLICATION_WITH_GDBSERVER + ICDTLaunchConfigurationConstants.ERR_NO_PROCESSID, null); + + String gdbserverPort = config.getAttribute(TizenLaunchConfigurationConstants.ATTR_GDBSERVER_PORT, TizenLaunchConfigurationConstants.ATTR_GDBSERVER_PORT_DEFAULT); + String commandArguments = ":" + gdbserverPort + ATTACH_OPTION + pid; + String gdbserverCmd = DebugTool.TOOLS_TARGET_PATH + "/" + GDBSERVER_DIR + "/" + GDBSERVER_BIN + " " + commandArguments; + String envCmd = setEnvironments(config); + String command = envCmd + gdbserverCmd; + currentDevice.executeShellCommand(command); + } catch (Exception e) { + newCoreException(TizenLaunchMessages.CANNOT_LAUNCH_APPLICATION_WITH_GDBSERVER, null); + } finally { + monitor.done(); + } + } + + private void setPID() { + Display.getDefault().syncExec(new Runnable() { + public void run() { + pid = promptForProcessID(); + } + }); + } + + private Integer promptForProcessID() { + try { + return selectProcess(); + } catch (CoreException e) { + return Integer.valueOf(-1); + } + } + + private Integer selectProcess() throws CoreException { + Shell shell = LaunchUIPlugin.getShell(); + if (shell == null) + newCoreException(TizenLaunchMessages.CANNOT_LAUNCH, null); + + ILabelProvider topprovider = new LabelProvider() { + public String getText(Object element) { + IProcessInfo pinfo = (IProcessInfo)element; + IPath ppath = new Path(pinfo.getName()); + return ppath.lastSegment() + " - " + pinfo.getPid(); //$NON-NLS-1$ + } + + public Image getImage(Object element) { + return LaunchImages.get(LaunchImages.IMG_OBJS_EXEC); + } + }; + + ILabelProvider downprovider = new LabelProvider() { + public String getText(Object element) { + IProcessInfo info = (IProcessInfo)element; + return info.getName(); + } + + public Image getImage(Object element) { + return LaunchImages.get(LaunchImages.IMG_OBJS_EXEC); + } + }; + + TwoPaneElementSelector dlg = new TwoPaneElementSelector(shell, topprovider, downprovider); + dlg.setTitle("Select Process"); //$NON-NLS-1$ + dlg.setMessage("Select a Process to attach debugger to:"); //$NON-NLS-1$ + + IProcessList processList = null; + processList = new TizenDeviceProcessList(currentDevice); + + IProcessInfo pInfos[] = null; + pInfos = processList.getProcessList(); + + if(pInfos == null) + newCoreException(TizenLaunchMessages.CANNOT_LAUNCH, null); + + dlg.setElements(pInfos); + + if (dlg.open() == Window.OK) { + IProcessInfo info = (IProcessInfo)dlg.getFirstResult(); + if (info != null) + return Integer.valueOf(info.getPid()); + } + + return Integer.valueOf(-1); + } +} \ No newline at end of file diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchDelegateForCore.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchDelegateForCore.java new file mode 100644 index 0000000..de15700 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchDelegateForCore.java @@ -0,0 +1,228 @@ +/* +* Native Platform +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.launch; + +import java.io.File; +import java.io.IOException; + +import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; +import org.eclipse.cdt.core.model.ICProject; +import org.eclipse.cdt.debug.core.CDIDebugModel; +import org.eclipse.cdt.debug.core.CDebugUtils; +import org.eclipse.cdt.debug.core.ICDIDebugger2; +import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; +import org.eclipse.cdt.debug.core.ICDebugConfiguration; +import org.eclipse.cdt.debug.core.cdi.ICDISession; +import org.eclipse.cdt.debug.core.cdi.model.ICDITarget; +import org.eclipse.cdt.debug.mi.core.GDBCDIDebugger2; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.OperationCanceledException; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.SubProgressMonitor; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.core.ILaunchManager; +import org.eclipse.debug.core.model.IProcess; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; + +import org.tizen.common.connection.ui.TizenRemoteFileDialog; +import org.tizen.common.connection.ui.TizenRemoteFileDialog.TizenRemoteFileDialogResult; +import org.tizen.nativecommon.launch.TizenLaunchMessages; +import org.tizen.sdblib.FileListingService.FileEntry; +import org.tizen.sdblib.MultiLineReceiver; +import org.tizen.sdblib.SyncService; +import org.tizen.sdblib.SyncService.SyncResult; + +public class TizenDebianLaunchDelegateForCore extends TizenDebianLaunchDelegate { + protected final static String DEFAULT_CORE_DIR = "/opt/bs/core"; + private FileEntry coreDir = null; + + @Override + protected void setDebugConfigAttributes(ILaunchConfiguration config) throws CoreException { + ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy(); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE); + wc.doSave(); + } + + @Override + protected void launchApplicationForDebug(ILaunch launch, ILaunchConfiguration config, IBinaryObject exeFile, IProgressMonitor monitor) throws CoreException, OperationCanceledException { + try { + monitor.beginTask(TizenLaunchMessages.LAUNCH_APPLICATION, 10); + monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION); + launchApplicationWithGDBClient(launch, config, exeFile, new SubProgressMonitor(monitor, 10)); + } finally { + monitor.done(); + } + } + + @Override + protected void launchApplicationWithGDBClient(ILaunch launch, ILaunchConfiguration config, IBinaryObject exeFile, IProgressMonitor monitor) throws CoreException { + ILaunchConfigurationWorkingCopy workingCopy = null; + try { + monitor.beginTask(TizenLaunchMessages.LAUNCH_APPLICATION_WITH_GDBCLIENT, 2); + monitor.subTask(TizenLaunchMessages.LAUNCH_APPLICATION_WITH_GDBCLIENT); + + ICDebugConfiguration debugConfiguration = getDebugConfig(config); + String strPath = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, ""); + + if (strPath == null || strPath.length() == 0) { + IProject project = getProject(config); + FileEntry remotePath = promptForCoreFilePath(project, debugConfiguration); + if(remotePath == null) + newCoreException(TizenLaunchMessages.CANNOT_LAUNCH_APPLICATION_WITH_GDBCLIENT, null); + String projectPath = project.getLocation().toOSString(); + String coreFilePath = projectPath + "/core." + project.getName(); + boolean isSuccess = false; + try { + isSuccess = downloadCoreFile(remotePath, coreFilePath, new SubProgressMonitor(monitor, 1)); + } catch (IOException e) { + newCoreException(TizenLaunchMessages.CANNOT_FIND_CORE_FILE, e); + } + + if(isSuccess == false) + newCoreException(TizenLaunchMessages.CANNOT_FIND_CORE_FILE, null); + + File coreFile = new File(coreFilePath.toString()); + IPath corePath = new Path(coreFilePath.toString()); + ICProject cproject = CDebugUtils.verifyCProject(config); + IBinaryObject core = verifyBinary(cproject, corePath); + if (!coreFile.canRead() || !(core.getType() == IBinaryObject.CORE)) + newCoreException(TizenLaunchMessages.INVALID_CORE_FILE, null); + + // Call again the launch delegate with the core file which user has selected. + workingCopy = config.getWorkingCopy(); + workingCopy.setAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, coreFilePath); + workingCopy.launch(ILaunchManager.DEBUG_MODE, new SubProgressMonitor(monitor, 1)); + workingCopy.setAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, ""); + workingCopy.doSave(); + // Coredump debugging finishes here. + return; + } + String appPath = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, ""); + IPath hostPath = getHostPath(appPath, config); + + GDBCDIDebugger2 debugger = new GDBCDIDebugger2(); + ICDISession debugSession = ((ICDIDebugger2)debugger).createSession(launch, hostPath.toFile(), new SubProgressMonitor(monitor, 1)); + if(debugSession == null) + newCoreException(TizenLaunchMessages.CANNOT_LAUNCH_APPLICATION_WITH_GDBCLIENT, null); + + ICDITarget[] targetArray = debugSession.getTargets(); + Process proc = null; + IProcess iproc = null; + for (int i = 0; i < targetArray.length; i++) { + proc = targetArray[i].getProcess(); + + if (proc != null) + iproc = DebugPlugin.newProcess(launch, proc, exeFile.getName(), null); + + IProject project = getProject(config); + CDIDebugModel.newDebugTarget(launch, project, targetArray[i], + "Tizen debugger", + iproc, exeFile, true, false, "false", true); + monitor.worked(1); + } + } catch (Exception e) { + newCoreException(TizenLaunchMessages.CANNOT_LAUNCH_APPLICATION_WITH_GDBCLIENT, e); + } finally { + if (workingCopy != null) { + workingCopy.setAttribute( ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, ""); + workingCopy.doSave(); + } + monitor.done(); + } + } + + private FileEntry promptForCoreFilePath(final IProject project, ICDebugConfiguration debugConfig) throws CoreException { + IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + if (window == null) { + IWorkbenchWindow windows[] = PlatformUI.getWorkbench().getWorkbenchWindows(); + window = windows[0]; + } + + final Shell shell = window.getShell(); + if (shell != null) { + shell.getDisplay().syncExec(new Runnable() { + public void run() { + TizenRemoteFileDialog dlg = new TizenRemoteFileDialog(shell, "Select a directory where exist coredump file", currentDevice, true, DEFAULT_CORE_DIR); + if (dlg.open() == TizenRemoteFileDialogResult.OK) + coreDir = dlg.getSelectedFileEntry(); + else + coreDir = null; + } + }); + } + return coreDir; + } + + private boolean downloadCoreFile(FileEntry coreDir, String destFilePath, IProgressMonitor monitor) throws IOException { + if (coreDir == null) + return false; + String command = "ls -lt " + coreDir.getFullPath(); + currentDevice.executeShellCommand(command, new MultiLineReceiver() { + @Override + public void processNewLines(String[] lines) { + for (String line : lines) { + if (line.contains("core")) { + executeResult = line.substring(line.indexOf("core")); + break; + } + } + } + }); + + if (!executeResult.startsWith("core")) + return false; + + FileEntry[] coreFiles = coreDir.getFileListingService().getChildren(coreDir, true, null); + FileEntry found = null; + for (FileEntry file : coreFiles) { + if (file.getName().equals(executeResult)) { + found = file; + break; + } + } + + if (found == null) + return false; + + SyncResult result = currentDevice.getSyncService().pullFile(found.getFullPath(), destFilePath, true, SyncService.getNullProgressMonitor()); + + if (result.getCode() == SyncService.RESULT_OK) + return true; + else + return false; + } +} \ No newline at end of file diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchMessages.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchMessages.java new file mode 100644 index 0000000..35705c8 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchMessages.java @@ -0,0 +1,61 @@ +/* +* Native Platform +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.launch; + +import org.eclipse.osgi.util.NLS; + +public class TizenDebianLaunchMessages extends NLS { + static { + NLS.initializeMessages(TizenDebianLaunchMessages.class.getName(), TizenDebianLaunchMessages.class); + } + // error messages + public static String CANNOT_FIND_PROJECT_NAME; + public static String CANNOT_CONNECT_TO_DEVICE; + public static String CANNOT_FIND_EXECUTABLE_IN_A_HOST_ROOTSTRAP; + public static String CANNOT_CREATE_PACKAGE; + public static String CANNOT_TRANSFER_FILE; + public static String CANNOT_INSTALL; + public static String CANNOT_LAUNCH; + public static String CANNOT_LAUNCH_APPLICATION_WITH_GDBSERVER; + public static String CANNOT_LAUNCH_APPLICATION_WITH_GDBCLIENT; + public static String BUILD_CONFIGURATION_DOES_NOT_MATCH_WITH_CURRENT_DEVICE_TYPE; + public static String CANNOT_FIND_HOST_ROOTSTRAP_PATH; + public static String CANNOT_FIND_DEBIAN_CONTROL_FILE; + public static String CANNOT_FIND_PACKAGE_SECTION_IN_CONTROL_FILE; + public static String OPERATION_CANCELED; + // non-error messages + public static String LAUNCH_APPLICATION; + public static String LAUNCH_APPLICATION_WITH_GDBSERVER; + public static String LAUNCH_APPLICATION_WITH_GDBCLIENT; + public static String PREPARE_TO_LAUNCH; + public static String START_DEPLOY_PROCESS; + public static String CREATE_PACKAGE; + public static String TRANSFER_PACKAGE; + public static String INSTALL_PACKAGE; +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchMessages.properties b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchMessages.properties new file mode 100644 index 0000000..831e591 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/TizenDebianLaunchMessages.properties @@ -0,0 +1,23 @@ +CANNOT_FIND_PROJECT_NAME = Cannot find a project name. +CANNOT_CONNECT_TO_DEVICE = Cannot connect to a device. +CANNOT_FIND_EXECUTABLE_IN_A_HOST_ROOTSTRAP = Cannot find binary file in a host rootstrap. +CANNOT_CREATE_PACKAGE = Cannot create package. +CANNOT_TRANSFER_FILE = Cannot transfer file. +CANNOT_INSTALL = Cannot install application. +CANNOT_LAUNCH = Cannot launch application. +CANNOT_LAUNCH_APPLICATION_WITH_GDBSERVER = Cannot launch application with GDBServer. +CANNOT_LAUNCH_APPLICATION_WITH_GDBCLIENT = Cannot launch application with GDBClient. +BUILD_CONFIGURATION_DOES_NOT_MATCH_WITH_CURRENT_DEVICE_TYPE = Build configuration does not match with current device type. Select correct device or build configuration. +CANNOT_FIND_HOST_ROOTSTRAP_PATH = Cannot find host rootstrap path. +CANNOT_FIND_DEBIAN_CONTROL_FILE = Cannot find debian control file. +CANNOT_FIND_PACKAGE_SECTION_IN_CONTROL_FILE = Cannot find package section in control file. +OPERATION_CANCELED = Operation canceled. + +LAUNCH_APPLICATION = Launching Application... +LAUNCH_APPLICATION_WITH_GDBSERVER = Launching application with GDBServer... +LAUNCH_APPLICATION_WITH_GDBCLIENT = Launching application with GDBClient... +PREPARE_TO_LAUNCH = Preparing to launch... +START_DEPLOY_PROCESS = Start deploy process... +CREATE_PACKAGE = Creating package... +TRANSFER_PACKAGE = Transferring package... +INSTALL_PACKAGE = Installing package... diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianLaunchConfigurationForAttachTabGroup.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianLaunchConfigurationForAttachTabGroup.java new file mode 100644 index 0000000..ef937a5 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianLaunchConfigurationForAttachTabGroup.java @@ -0,0 +1,45 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.launch.ui; + +import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; +import org.eclipse.debug.ui.ILaunchConfigurationDialog; +import org.eclipse.debug.ui.ILaunchConfigurationTab; +import org.eclipse.debug.ui.sourcelookup.SourceLookupTab; +import org.tizen.nativecommon.launch.ui.TizenDebuggerTab; + + +public class TizenDebianLaunchConfigurationForAttachTabGroup extends AbstractLaunchConfigurationTabGroup { + @Override + public void createTabs(ILaunchConfigurationDialog dialog, String mode) { + ILaunchConfigurationTab[] tabs = null; + tabs = new ILaunchConfigurationTab[] { new TizenDebuggerTab(true), new SourceLookupTab() }; + setTabs(tabs); + } +} \ No newline at end of file diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianLaunchConfigurationForCoreTabGroup.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianLaunchConfigurationForCoreTabGroup.java new file mode 100644 index 0000000..2ba3d04 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianLaunchConfigurationForCoreTabGroup.java @@ -0,0 +1,45 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.launch.ui; + +import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; +import org.eclipse.debug.ui.ILaunchConfigurationDialog; +import org.eclipse.debug.ui.ILaunchConfigurationTab; +import org.eclipse.debug.ui.sourcelookup.SourceLookupTab; +import org.tizen.nativecommon.launch.ui.TizenDebuggerForCoreTab; + + +public class TizenDebianLaunchConfigurationForCoreTabGroup extends AbstractLaunchConfigurationTabGroup { + @Override + public void createTabs(ILaunchConfigurationDialog dialog, String mode) { + ILaunchConfigurationTab[] tabs = null; + tabs = new ILaunchConfigurationTab[] { new TizenDebuggerForCoreTab(), new SourceLookupTab() }; + setTabs(tabs); + } +} \ No newline at end of file diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianLaunchConfigurationTabGroup.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianLaunchConfigurationTabGroup.java new file mode 100644 index 0000000..0412fb5 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianLaunchConfigurationTabGroup.java @@ -0,0 +1,50 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.launch.ui; + +import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; +import org.eclipse.debug.ui.ILaunchConfigurationDialog; +import org.eclipse.debug.ui.ILaunchConfigurationTab; +import org.eclipse.debug.ui.sourcelookup.SourceLookupTab; +import org.tizen.nativecommon.launch.ui.TizenDebuggerTab; + + +public class TizenDebianLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup { + @Override + public void createTabs(ILaunchConfigurationDialog dialog, String mode) { + ILaunchConfigurationTab[] tabs = null; + + if (mode.equals("debug")) + tabs = new ILaunchConfigurationTab[] { new TizenDebuggerTab(false), new SourceLookupTab() }; + else + tabs = new ILaunchConfigurationTab[] {}; + + setTabs(tabs); + } +} \ No newline at end of file diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianMainCoreTab.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianMainCoreTab.java new file mode 100644 index 0000000..3aa804b --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianMainCoreTab.java @@ -0,0 +1,35 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.launch.ui; + +public class TizenDebianMainCoreTab extends TizenDebianMainTab { + public TizenDebianMainCoreTab() { + super(true); + } +} \ No newline at end of file diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianMainTab.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianMainTab.java new file mode 100644 index 0000000..9fab253 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/TizenDebianMainTab.java @@ -0,0 +1,266 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.launch.ui; + +import org.eclipse.cdt.core.model.ICElement; +import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; +import org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants; +import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin; +import org.eclipse.cdt.launch.ui.CMainTab; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.FileDialog; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.MessageBox; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; + +import org.tizen.common.connection.ConnectionPlugin; +import org.tizen.common.connection.ui.TizenRemoteFileDialog; +import org.tizen.common.connection.ui.TizenRemoteFileDialog.TizenRemoteFileDialogResult; +import org.tizen.nativecommon.launch.TizenLaunchMessages; + +import org.tizen.sdblib.FileListingService.FileEntry; +import org.tizen.sdblib.IDevice; + +public class TizenDebianMainTab extends CMainTab { + private Label fProgLabel; + private Text fProgText; + private boolean fSpecifyCoreFile; + private static final String LABEL_TEXT = "Tizen Application Path :"; + private static final String DEFAULT_APP_PATH = "/opt/apps/"; + private static final String REMOTE_BROWSE = "Remote Browse..."; + private static final String SELECT_AN_APPLICATION = "Select an Application"; + private String filePath = ""; + + public TizenDebianMainTab() { + this(false); + } + + public TizenDebianMainTab(boolean specifyCoreFile) { + fSpecifyCoreFile = specifyCoreFile; + } + + @Override + public void createControl(Composite parent) { + Composite comp = new Composite(parent, SWT.NONE); + setControl(comp); + + GridLayout topLayout = new GridLayout(); + comp.setLayout(topLayout); + + createVerticalSpacer(comp, 1); + createExeFileField(comp, 1); + createProjectGroup(comp, 1); + if (fSpecifyCoreFile) + createCoreFileGroup(comp, 1); + createVerticalSpacer(comp, 1); + } + + @Override + protected String handleBrowseButtonSelected() { + FileDialog fileDialog = new FileDialog(getShell(), SWT.NONE); + if (fProgText != null) + fileDialog.setFileName(fProgText.getText()); + else if (fCoreText != null) + fileDialog.setFileName(fCoreText.getText()); + return fileDialog.open(); + } + + private void createExeFileField(Composite parent, int colSpan) { + Composite mainComp = new Composite(parent, SWT.NONE); + GridLayout mainLayout = new GridLayout(); + mainLayout.numColumns = 3; + mainLayout.marginHeight = 0; + mainLayout.marginWidth = 0; + mainComp.setLayout(mainLayout); + GridData gd = new GridData(GridData.FILL_HORIZONTAL); + gd.horizontalSpan = colSpan; + mainComp.setLayoutData(gd); + fProgLabel = new Label(mainComp, SWT.NONE); + fProgLabel.setText(LABEL_TEXT); // $NON-NLS-1$ + gd = new GridData(); + gd.horizontalSpan = 3; + fProgLabel.setLayoutData(gd); + fProgText = new Text(mainComp, SWT.SINGLE | SWT.BORDER); + gd = new GridData(GridData.FILL_HORIZONTAL); + fProgText.setLayoutData(gd); + fProgText.addModifyListener(new ModifyListener() { + public void modifyText(ModifyEvent evt) { + updateLaunchConfigurationDialog(); + } + }); + + Button fBrowseForBinaryButton; + fBrowseForBinaryButton = createPushButton(mainComp, REMOTE_BROWSE, null); //$NON-NLS-1$ + fBrowseForBinaryButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent evt) { + handleRemoteBrowseButtonSelected(); + updateLaunchConfigurationDialog(); + } + }); + } + + protected void handleRemoteBrowseButtonSelected() { + IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + if (window == null) { + IWorkbenchWindow windows[] = PlatformUI.getWorkbench().getWorkbenchWindows(); + window = windows[0]; + } + + final Shell shell = window.getShell(); + if (shell != null) { + IDevice device = ConnectionPlugin.getDefault().getCurrentDevice(); + if (device == null) { + MessageBox msgBox = new MessageBox(shell, SWT.ICON_INFORMATION); + msgBox.setMessage(TizenLaunchMessages.CANNOT_CONNECT_TO_DEVICE); + msgBox.open(); + return; + } + + shell.getDisplay().syncExec( new Runnable() { + public void run() { + IDevice device = ConnectionPlugin.getDefault().getCurrentDevice(); + TizenRemoteFileDialog dlg = new TizenRemoteFileDialog(shell, SELECT_AN_APPLICATION, device, false, DEFAULT_APP_PATH); + if(dlg.open() == TizenRemoteFileDialogResult.OK) { + FileEntry selectedFile = dlg.getSelectedFileEntry(); + filePath = selectedFile.getFullPath(); + fProgText.setText(filePath); + } else + filePath = null; + } + }); + } + return; + } + + + @Override + public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { + configuration.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, true); + configuration.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, false); + configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_BUILD_BEFORE_LAUNCH, ICDTLaunchConfigurationConstants.BUILD_BEFORE_LAUNCH_DISABLED); + ICElement cElement = null; + cElement = getContext(configuration, getPlatform(configuration)); + if (cElement != null) + initializeCProject(cElement, configuration); + } + + @Override + public void initializeFrom(ILaunchConfiguration configuration) { + updateProgramFromConfig(configuration); + updateProjectFromConfig(configuration); + if (fSpecifyCoreFile) + updateCoreFromConfig(configuration); + } + + @Override + public boolean isValid(ILaunchConfiguration config) { + setErrorMessage(null); + setMessage(null); + + String name = fProjText.getText().trim(); + if (name.length() == 0) { + setErrorMessage(TizenLaunchMessages.TizenMainTab_Project_not_specified); + return false; + } + if (!ResourcesPlugin.getWorkspace().getRoot().getProject(name).exists()) { + setErrorMessage(TizenLaunchMessages.Launch_common_Project_does_not_exist); + return false; + } + IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name); + if (!project.isOpen()) { + setErrorMessage(TizenLaunchMessages.TizenMainTab_Project_must_be_opened); + return false; + } + + if (fProgText != null) + name = fProgText.getText().trim(); + + if (name.length() == 0) { + setErrorMessage(TizenLaunchMessages.TizenMainTab_Program_not_specified); + return false; + } + if (name.equals(".") || name.equals("..")) { //$NON-NLS-1$ //$NON-NLS-2$ + setErrorMessage(TizenLaunchMessages.TizenMainTab_Program_does_not_exist); + return false; + } + + //FIXME:: For enabling apply button. but the button is enabled when change more than 2 characters. + try { + ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy(); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, name); + wc.doSave(); + } catch (CoreException ce) { + LaunchUIPlugin.log(ce); + } + + return true; + } + + @Override + protected void updateProjectFromConfig(ILaunchConfiguration config) { + String projectName = EMPTY_STRING; + try { + projectName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, EMPTY_STRING); + } catch (CoreException ce) { + LaunchUIPlugin.log(ce); + } + fProjText.setText(projectName); + } + + @Override + protected void updateProgramFromConfig(ILaunchConfiguration config) { + if (fProgText != null) + { + String programName = EMPTY_STRING; + try { + programName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, EMPTY_STRING); + } catch (CoreException ce) { + LaunchUIPlugin.log(ce); + } + fProgText.setText(programName); + } + } +} \ No newline at end of file diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianProjectAttachLaunchShortcut.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianProjectAttachLaunchShortcut.java new file mode 100644 index 0000000..45891f5 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianProjectAttachLaunchShortcut.java @@ -0,0 +1,252 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.launch.ui.shortcut; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.cdt.core.CCorePlugin; +import org.eclipse.cdt.core.model.CoreModel; +import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; +import org.eclipse.cdt.core.settings.model.ICProjectDescription; +import org.eclipse.cdt.debug.core.CDebugCorePlugin; +import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; +import org.eclipse.cdt.debug.core.ICDebugConfiguration; +import org.eclipse.cdt.debug.internal.ui.launch.CApplicationLaunchShortcut; +import org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; +import org.eclipse.cdt.debug.ui.ICDebuggerPage; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.ui.DebugUITools; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.window.Window; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.dialogs.ElementListSelectionDialog; +import org.tizen.nativecommon.launch.TizenLaunchConfigurationConstants; +import org.tizen.nativeplatform.Activator; +import org.tizen.nativeplatform.launch.TizenDebianLaunchMessages; + + + + +public class TizenDebianProjectAttachLaunchShortcut extends CApplicationLaunchShortcut { + private static final String APPLICATION_PATH_INPUT_DIALOG_TITLE = "Input Tizen Application Path"; + private static final String APPLICATION_PATH_INPUT_DIALOG_TEXT = "Input Tizen Application Path : "; + + public void launch(IProject project, String mode) { + searchAndLaunch(new Object[] {project}, mode); + } + + @Override + public void launch(IEditorPart editor, String mode) { + searchAndLaunch(new Object[] { editor.getEditorInput()}, mode); + } + + @Override + public void launch(ISelection selection, String mode) { + if (selection instanceof IStructuredSelection) { + searchAndLaunch(((IStructuredSelection) selection).toArray(), mode); + } + } + + private void searchAndLaunch(final Object[] elements, String mode) { + if (elements != null && elements.length > 0) { + int nElements = elements.length; + for (int i = 0; i < nElements; i++) { + if (elements[i] instanceof IAdaptable) { + IResource r = (IResource) ((IAdaptable) elements[i]).getAdapter(IResource.class); + if (r != null) { + IProject project = r.getProject(); + if (project != null) { + ILaunchConfiguration config = findLaunchConfiguration(project, mode); + if (config != null) { + DebugUITools.launch(config, mode); + } + } + } + } + } + } + } + + protected ILaunchConfiguration findLaunchConfiguration(IProject project, String mode) { + ILaunchConfiguration configuration = null; + // Set the default debugger based on the active toolchain on the project (if possible) + ICDebugConfiguration debugConfig = null; + ICProjectDescription projDesc = CoreModel.getDefault().getProjectDescription(project); + ICConfigurationDescription configDesc = projDesc.getActiveConfiguration(); + String configId = configDesc.getId(); + ICDebugConfiguration[] debugConfigs = CDebugCorePlugin.getDefault().getActiveDebugConfigurations(); + int matchLength = 0; + for (int i = 0; i < debugConfigs.length; ++i) { + ICDebugConfiguration dc = debugConfigs[i]; + String[] patterns = dc.getSupportedBuildConfigPatterns(); + if (patterns != null) { + for (int j = 0; j < patterns.length; ++j) { + if (patterns[j].length() > matchLength && configId.matches(patterns[j])) { + debugConfig = dc; + matchLength = patterns[j].length(); + } + } + } + } + + if ( debugConfig == null ) { + // Prompt the user if more then 1 debugger. + String os = Platform.getOS(); + debugConfigs = CDebugCorePlugin.getDefault().getActiveDebugConfigurations(); + List debugList = new ArrayList(debugConfigs.length); + for (int i = 0; i < debugConfigs.length; i++) { + String platform = debugConfigs[i].getPlatform(); + if (debugConfigs[i].supportsMode(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN)) { + if (debugConfigs[i].getName().contains("Tizen")) //$NON-NLS-1$ + debugList.add(debugConfigs[i]); + } + } + debugConfigs = (ICDebugConfiguration[]) debugList.toArray(new ICDebugConfiguration[0]); + if (debugConfigs.length == 1) + debugConfig = debugConfigs[0]; + else if (debugConfigs.length > 1) + debugConfig = chooseDebugConfig(debugConfigs, mode); + } + + configuration = createConfiguration(project, debugConfig, mode); + + return configuration; + } + + private ICDebugConfiguration chooseDebugConfig(ICDebugConfiguration[] debugConfigs, String mode) { + ILabelProvider provider = new LabelProvider() { + public String getText(Object element) { + if (element == null) { + return ""; //$NON-NLS-1$ + } else if (element instanceof ICDebugConfiguration) { + return ((ICDebugConfiguration) element).getName(); + } + return element.toString(); + } + }; + ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), provider); + dialog.setElements(debugConfigs); + dialog.setTitle(getDebugConfigDialogTitleString(debugConfigs, mode)); + dialog.setMessage(getDebugConfigDialogMessageString(debugConfigs, mode)); + dialog.setMultipleSelection(false); + int result = dialog.open(); + provider.dispose(); + if (result == Window.OK) { + return (ICDebugConfiguration) dialog.getFirstResult(); + } + return null; + } + + protected ILaunchConfiguration createConfiguration(IProject project, ICDebugConfiguration debugConfig, String mode) { + ILaunchConfiguration config = null; + try { + String projectName = project.getProjectRelativePath().toString(); + ILaunchConfigurationType configType = getCLaunchConfigType(); + ILaunchConfigurationWorkingCopy wc = + configType.newInstance(null, getLaunchManager().generateLaunchConfigurationName(project.getName())); + String programName = getProgramName(); + if (programName != null) + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, programName); + + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, project.getName()); + wc.setMappedResources(new IResource[] {project}); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String) null); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_ATTACH); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, TizenLaunchConfigurationConstants.DEBUGGER_ID); + wc.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_COMMAND_FACTORY, TizenLaunchConfigurationConstants.COMMAND_FACTORY_ID); + wc.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, true); + wc.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, false); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_BUILD_BEFORE_LAUNCH, ICDTLaunchConfigurationConstants.BUILD_BEFORE_LAUNCH_DISABLED); + + + ICProjectDescription projDes = CCorePlugin.getDefault().getProjectDescription(project); + if (projDes != null) { + String buildConfigID = projDes.getActiveConfiguration().getId(); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, buildConfigID); + } + + // Load up the debugger page to set the defaults. There should probably be a separate + // extension point for this. + ICDebuggerPage page = CDebugUIPlugin.getDefault().getDebuggerPage(debugConfig.getID()); + page.setDefaults(wc); + + config = wc.doSave(); + } catch (CoreException ce) { + CDebugUIPlugin.log(ce); + } + return config; + } + + private String getProgramName() throws CoreException { + IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + if (window == null) { + IWorkbenchWindow windows[] = PlatformUI.getWorkbench().getWorkbenchWindows(); + window = windows[0]; + } + final Shell shell = window.getShell(); + + TizenPathInputDialog dlg = new TizenPathInputDialog(shell, + APPLICATION_PATH_INPUT_DIALOG_TITLE, + APPLICATION_PATH_INPUT_DIALOG_TEXT, + null); + if (Window.OK == dlg.open()) + return dlg.getValue(); + else + newCoreException(TizenDebianLaunchMessages.OPERATION_CANCELED, null); + + return null; + } + + private void newCoreException(String message, Throwable exception) throws CoreException { + Status status = new Status(Status.ERROR, Activator.PLUGIN_ID, message, exception); + throw new CoreException(status); + } + + @Override + protected ILaunchConfigurationType getCLaunchConfigType() { + return getLaunchManager().getLaunchConfigurationType("org.tizen.nativeplatform.launch.TizenDebianLaunchConfigurationTypeForAttach"); + } +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianProjectCoredumpLaunchShortcut.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianProjectCoredumpLaunchShortcut.java new file mode 100644 index 0000000..f9f594e --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianProjectCoredumpLaunchShortcut.java @@ -0,0 +1,251 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.launch.ui.shortcut; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.cdt.core.CCorePlugin; +import org.eclipse.cdt.core.model.CoreModel; +import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; +import org.eclipse.cdt.core.settings.model.ICProjectDescription; +import org.eclipse.cdt.debug.core.CDebugCorePlugin; +import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; +import org.eclipse.cdt.debug.core.ICDebugConfiguration; +import org.eclipse.cdt.debug.internal.ui.launch.CApplicationLaunchShortcut; +import org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; +import org.eclipse.cdt.debug.ui.ICDebuggerPage; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.ui.DebugUITools; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.window.Window; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.dialogs.ElementListSelectionDialog; +import org.tizen.nativecommon.launch.TizenLaunchConfigurationConstants; +import org.tizen.nativeplatform.Activator; +import org.tizen.nativeplatform.launch.TizenDebianLaunchMessages; + + + + +public class TizenDebianProjectCoredumpLaunchShortcut extends CApplicationLaunchShortcut { + private static final String APPLICATION_PATH_INPUT_DIALOG_TITLE = "Input Tizen Application Path"; + private static final String APPLICATION_PATH_INPUT_DIALOG_TEXT = "Input Tizen Application Path : "; + + public void launch(IProject project, String mode) { + searchAndLaunch(new Object[] {project}, mode); + } + + @Override + public void launch(IEditorPart editor, String mode) { + searchAndLaunch(new Object[] { editor.getEditorInput()}, mode); + } + + @Override + public void launch(ISelection selection, String mode) { + if (selection instanceof IStructuredSelection) { + searchAndLaunch(((IStructuredSelection) selection).toArray(), mode); + } + } + + private void searchAndLaunch(final Object[] elements, String mode) { + if (elements != null && elements.length > 0) { + int nElements = elements.length; + for (int i = 0; i < nElements; i++) { + if (elements[i] instanceof IAdaptable) { + IResource r = (IResource) ((IAdaptable) elements[i]).getAdapter(IResource.class); + if (r != null) { + IProject project = r.getProject(); + if (project != null) { + ILaunchConfiguration config = findLaunchConfiguration(project, mode); + if (config != null) { + DebugUITools.launch(config, mode); + } + } + } + } + } + } + } + + protected ILaunchConfiguration findLaunchConfiguration(IProject project, String mode) { + ILaunchConfiguration configuration = null; + // Set the default debugger based on the active toolchain on the project (if possible) + ICDebugConfiguration debugConfig = null; + ICProjectDescription projDesc = CoreModel.getDefault().getProjectDescription(project); + ICConfigurationDescription configDesc = projDesc.getActiveConfiguration(); + String configId = configDesc.getId(); + ICDebugConfiguration[] debugConfigs = CDebugCorePlugin.getDefault().getActiveDebugConfigurations(); + int matchLength = 0; + for (int i = 0; i < debugConfigs.length; ++i) { + ICDebugConfiguration dc = debugConfigs[i]; + String[] patterns = dc.getSupportedBuildConfigPatterns(); + if (patterns != null) { + for (int j = 0; j < patterns.length; ++j) { + if (patterns[j].length() > matchLength && configId.matches(patterns[j])) { + debugConfig = dc; + matchLength = patterns[j].length(); + } + } + } + } + + if ( debugConfig == null ) { + // Prompt the user if more then 1 debugger. + String os = Platform.getOS(); + debugConfigs = CDebugCorePlugin.getDefault().getActiveDebugConfigurations(); + List debugList = new ArrayList(debugConfigs.length); + for (int i = 0; i < debugConfigs.length; i++) { + String platform = debugConfigs[i].getPlatform(); + if (debugConfigs[i].supportsMode(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN)) { + if (debugConfigs[i].getName().contains("Tizen")) //$NON-NLS-1$ + debugList.add(debugConfigs[i]); + } + } + debugConfigs = (ICDebugConfiguration[]) debugList.toArray(new ICDebugConfiguration[0]); + if (debugConfigs.length == 1) + debugConfig = debugConfigs[0]; + else if (debugConfigs.length > 1) + debugConfig = chooseDebugConfig(debugConfigs, mode); + } + + configuration = createConfiguration(project, debugConfig, mode); + + return configuration; + } + + private ICDebugConfiguration chooseDebugConfig(ICDebugConfiguration[] debugConfigs, String mode) { + ILabelProvider provider = new LabelProvider() { + public String getText(Object element) { + if (element == null) { + return ""; //$NON-NLS-1$ + } else if (element instanceof ICDebugConfiguration) { + return ((ICDebugConfiguration) element).getName(); + } + return element.toString(); + } + }; + ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), provider); + dialog.setElements(debugConfigs); + dialog.setTitle(getDebugConfigDialogTitleString(debugConfigs, mode)); + dialog.setMessage(getDebugConfigDialogMessageString(debugConfigs, mode)); + dialog.setMultipleSelection(false); + int result = dialog.open(); + provider.dispose(); + if (result == Window.OK) { + return (ICDebugConfiguration) dialog.getFirstResult(); + } + return null; + } + + protected ILaunchConfiguration createConfiguration(IProject project, ICDebugConfiguration debugConfig, String mode) { + ILaunchConfiguration config = null; + try { + String projectName = project.getProjectRelativePath().toString(); + ILaunchConfigurationType configType = getCLaunchConfigType(); + ILaunchConfigurationWorkingCopy wc = + configType.newInstance(null, getLaunchManager().generateLaunchConfigurationName(project.getName())); + String programName = getProgramName(); + if (programName != null) + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, programName); + + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, project.getName()); + wc.setMappedResources(new IResource[] {project}); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String) null); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, TizenLaunchConfigurationConstants.DEBUGGER_ID); + wc.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_COMMAND_FACTORY, TizenLaunchConfigurationConstants.COMMAND_FACTORY_ID); + wc.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, true); + wc.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, false); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_BUILD_BEFORE_LAUNCH, ICDTLaunchConfigurationConstants.BUILD_BEFORE_LAUNCH_DISABLED); + + ICProjectDescription projDes = CCorePlugin.getDefault().getProjectDescription(project); + if (projDes != null) { + String buildConfigID = projDes.getActiveConfiguration().getId(); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, buildConfigID); + } + + // Load up the debugger page to set the defaults. There should probably be a separate + // extension point for this. + ICDebuggerPage page = CDebugUIPlugin.getDefault().getDebuggerPage(debugConfig.getID()); + page.setDefaults(wc); + + config = wc.doSave(); + } catch (CoreException ce) { + CDebugUIPlugin.log(ce); + } + return config; + } + + private String getProgramName() throws CoreException { + IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + if (window == null) { + IWorkbenchWindow windows[] = PlatformUI.getWorkbench().getWorkbenchWindows(); + window = windows[0]; + } + final Shell shell = window.getShell(); + + TizenPathInputDialog dlg = new TizenPathInputDialog(shell, + APPLICATION_PATH_INPUT_DIALOG_TITLE, + APPLICATION_PATH_INPUT_DIALOG_TEXT, + null); + if (Window.OK == dlg.open()) + return dlg.getValue(); + else + newCoreException(TizenDebianLaunchMessages.OPERATION_CANCELED, null); + + return null; + } + + private void newCoreException(String message, Throwable exception) throws CoreException { + Status status = new Status(Status.ERROR, Activator.PLUGIN_ID, message, exception); + throw new CoreException(status); + } + + @Override + protected ILaunchConfigurationType getCLaunchConfigType() { + return getLaunchManager().getLaunchConfigurationType("org.tizen.nativeplatform.launch.TizenDebianLaunchConfigurationTypeForCore"); + } +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianProjectLaunchShortcut.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianProjectLaunchShortcut.java new file mode 100644 index 0000000..ee1847f --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianProjectLaunchShortcut.java @@ -0,0 +1,251 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.launch.ui.shortcut; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.cdt.core.CCorePlugin; +import org.eclipse.cdt.core.model.CoreModel; +import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; +import org.eclipse.cdt.core.settings.model.ICProjectDescription; +import org.eclipse.cdt.debug.core.CDebugCorePlugin; +import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; +import org.eclipse.cdt.debug.core.ICDebugConfiguration; +import org.eclipse.cdt.debug.internal.ui.launch.CApplicationLaunchShortcut; +import org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants; +import org.eclipse.cdt.debug.ui.CDebugUIPlugin; +import org.eclipse.cdt.debug.ui.ICDebuggerPage; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.ui.DebugUITools; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.window.Window; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.dialogs.ElementListSelectionDialog; +import org.tizen.nativecommon.launch.TizenLaunchConfigurationConstants; +import org.tizen.nativeplatform.Activator; +import org.tizen.nativeplatform.launch.TizenDebianLaunchMessages; + + + + +public class TizenDebianProjectLaunchShortcut extends CApplicationLaunchShortcut { + private static final String APPLICATION_PATH_INPUT_DIALOG_TITLE = "Input Tizen Application Path"; + private static final String APPLICATION_PATH_INPUT_DIALOG_TEXT = "Input Tizen Application Path : "; + + public void launch(IProject project, String mode) { + searchAndLaunch(new Object[] {project}, mode); + } + + @Override + public void launch(IEditorPart editor, String mode) { + searchAndLaunch(new Object[] { editor.getEditorInput()}, mode); + } + + @Override + public void launch(ISelection selection, String mode) { + if (selection instanceof IStructuredSelection) { + searchAndLaunch(((IStructuredSelection) selection).toArray(), mode); + } + } + + private void searchAndLaunch(final Object[] elements, String mode) { + if (elements != null && elements.length > 0) { + int nElements = elements.length; + for (int i = 0; i < nElements; i++) { + if (elements[i] instanceof IAdaptable) { + IResource r = (IResource) ((IAdaptable) elements[i]).getAdapter(IResource.class); + if (r != null) { + IProject project = r.getProject(); + if (project != null) { + ILaunchConfiguration config = findLaunchConfiguration(project, mode); + if (config != null) { + DebugUITools.launch(config, mode); + } + } + } + } + } + } + } + + protected ILaunchConfiguration findLaunchConfiguration(IProject project, String mode) { + ILaunchConfiguration configuration = null; + // Set the default debugger based on the active toolchain on the project (if possible) + ICDebugConfiguration debugConfig = null; + ICProjectDescription projDesc = CoreModel.getDefault().getProjectDescription(project); + ICConfigurationDescription configDesc = projDesc.getActiveConfiguration(); + String configId = configDesc.getId(); + ICDebugConfiguration[] debugConfigs = CDebugCorePlugin.getDefault().getActiveDebugConfigurations(); + int matchLength = 0; + for (int i = 0; i < debugConfigs.length; ++i) { + ICDebugConfiguration dc = debugConfigs[i]; + String[] patterns = dc.getSupportedBuildConfigPatterns(); + if (patterns != null) { + for (int j = 0; j < patterns.length; ++j) { + if (patterns[j].length() > matchLength && configId.matches(patterns[j])) { + debugConfig = dc; + matchLength = patterns[j].length(); + } + } + } + } + + if ( debugConfig == null ) { + // Prompt the user if more then 1 debugger. + String os = Platform.getOS(); + debugConfigs = CDebugCorePlugin.getDefault().getActiveDebugConfigurations(); + List debugList = new ArrayList(debugConfigs.length); + for (int i = 0; i < debugConfigs.length; i++) { + String platform = debugConfigs[i].getPlatform(); + if (debugConfigs[i].supportsMode(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN)) { + if (debugConfigs[i].getName().contains("Tizen")) //$NON-NLS-1$ + debugList.add(debugConfigs[i]); + } + } + debugConfigs = (ICDebugConfiguration[]) debugList.toArray(new ICDebugConfiguration[0]); + if (debugConfigs.length == 1) + debugConfig = debugConfigs[0]; + else if (debugConfigs.length > 1) + debugConfig = chooseDebugConfig(debugConfigs, mode); + } + + configuration = createConfiguration(project, debugConfig, mode); + + return configuration; + } + + private ICDebugConfiguration chooseDebugConfig(ICDebugConfiguration[] debugConfigs, String mode) { + ILabelProvider provider = new LabelProvider() { + public String getText(Object element) { + if (element == null) { + return ""; //$NON-NLS-1$ + } else if (element instanceof ICDebugConfiguration) { + return ((ICDebugConfiguration) element).getName(); + } + return element.toString(); + } + }; + ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), provider); + dialog.setElements(debugConfigs); + dialog.setTitle(getDebugConfigDialogTitleString(debugConfigs, mode)); + dialog.setMessage(getDebugConfigDialogMessageString(debugConfigs, mode)); + dialog.setMultipleSelection(false); + int result = dialog.open(); + provider.dispose(); + if (result == Window.OK) { + return (ICDebugConfiguration) dialog.getFirstResult(); + } + return null; + } + + protected ILaunchConfiguration createConfiguration(IProject project, ICDebugConfiguration debugConfig, String mode) { + ILaunchConfiguration config = null; + try { + String projectName = project.getProjectRelativePath().toString(); + ILaunchConfigurationType configType = getCLaunchConfigType(); + ILaunchConfigurationWorkingCopy wc = + configType.newInstance(null, getLaunchManager().generateLaunchConfigurationName(project.getName())); + String programName = getProgramName(); + if (programName != null) + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, programName); + + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, project.getName()); + wc.setMappedResources(new IResource[] {project}); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String) null); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, TizenLaunchConfigurationConstants.DEBUGGER_ID); + wc.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_COMMAND_FACTORY, TizenLaunchConfigurationConstants.COMMAND_FACTORY_ID); + wc.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, true); + wc.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, false); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_BUILD_BEFORE_LAUNCH, ICDTLaunchConfigurationConstants.BUILD_BEFORE_LAUNCH_DISABLED); + + ICProjectDescription projDes = CCorePlugin.getDefault().getProjectDescription(project); + if (projDes != null) { + String buildConfigID = projDes.getActiveConfiguration().getId(); + wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, buildConfigID); + } + + // Load up the debugger page to set the defaults. There should probably be a separate + // extension point for this. + ICDebuggerPage page = CDebugUIPlugin.getDefault().getDebuggerPage(debugConfig.getID()); + page.setDefaults(wc); + + config = wc.doSave(); + } catch (CoreException ce) { + CDebugUIPlugin.log(ce); + } + return config; + } + + private String getProgramName() throws CoreException { + IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + if (window == null) { + IWorkbenchWindow windows[] = PlatformUI.getWorkbench().getWorkbenchWindows(); + window = windows[0]; + } + final Shell shell = window.getShell(); + + TizenPathInputDialog dlg = new TizenPathInputDialog(shell, + APPLICATION_PATH_INPUT_DIALOG_TITLE, + APPLICATION_PATH_INPUT_DIALOG_TEXT, + null); + if (Window.OK == dlg.open()) + return dlg.getValue(); + else + newCoreException(TizenDebianLaunchMessages.OPERATION_CANCELED, null); + + return null; + } + + private void newCoreException(String message, Throwable exception) throws CoreException { + Status status = new Status(Status.ERROR, Activator.PLUGIN_ID, message, exception); + throw new CoreException(status); + } + + @Override + protected ILaunchConfigurationType getCLaunchConfigType() { + return getLaunchManager().getLaunchConfigurationType("org.tizen.nativeplatform.launch.TizenDebianLaunchConfigurationType"); + } +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianPropertyTester.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianPropertyTester.java new file mode 100644 index 0000000..8d72e61 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenDebianPropertyTester.java @@ -0,0 +1,74 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.launch.ui.shortcut; + +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo; +import org.eclipse.cdt.managedbuilder.core.IManagedProject; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.core.expressions.PropertyTester; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.tizen.nativeplatform.build.PlatformConfigurationManager; + + + + +public class TizenDebianPropertyTester extends PropertyTester { + @Override + public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { + if ("isTizenCustomDebianProject".equals(property)) { + if (receiver instanceof IProject) { + IProject project = (IProject)receiver; + return testProject(project); + } + } else if ("belongTizenCustomDebianProject".equals(property)) { + if (receiver instanceof IResource) { + IResource r = (IResource)receiver; + IProject project = r.getProject(); + return testProject(project); + } + } + return false; + } + + private boolean testProject(IProject project) { + IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project); + if (info == null) + return false; + IConfiguration cfg = info.getDefaultConfiguration(); + IManagedProject managedProject = cfg.getManagedProject(); + String projectArtifactType = managedProject.getProjectType().getBuildArtefactType().getId(); + if (projectArtifactType.equals(PlatformConfigurationManager.TIZEN_CUSTOM_DEBIAN_ARTIFACT_TYPE) || + projectArtifactType.equals(PlatformConfigurationManager.OLD_SLP_CUSTOM_DEBIAN_ARTIFACT_TYPE)) + return true; + else + return false; + } +} \ No newline at end of file diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenPathInputDialog.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenPathInputDialog.java new file mode 100644 index 0000000..b790439 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenPathInputDialog.java @@ -0,0 +1,284 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.launch.ui.shortcut; + +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.MessageBox; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; + +import org.tizen.common.connection.ConnectionPlugin; +import org.tizen.common.connection.ui.TizenRemoteFileDialog; +import org.tizen.common.connection.ui.TizenRemoteFileDialog.TizenRemoteFileDialogResult; +import org.tizen.nativecommon.launch.TizenLaunchMessages; + +import org.tizen.sdblib.FileListingService.FileEntry; +import org.tizen.sdblib.IDevice; + +public class TizenPathInputDialog extends Dialog { + /** + * The title of the dialog. + */ + private String title; + + /** + * The message to display, or null if none. + */ + private String message; + + /** + * The input value; the empty string by default. + */ + private String value = "";//$NON-NLS-1$ + + /** + * Ok button widget. + */ + private Button okButton; + + /** + * Input text widget. + */ + private Text text; + + private String filePath = ""; + + private static final String DEFAULT_APP_PATH = "/opt/apps/"; + private static final String REMOTE_BROWSE = "Remote Browse..."; + private static final String SELECT_AN_APPLICATION = "Select an Application"; + private static final String SELECT_A_FILE = "Select a file"; + private static final String SELECT_A_FILE_TO_RUN = "Select a file"; + + public TizenPathInputDialog(Shell parentShell, String dialogTitle, + String dialogMessage, String initialValue) { + super(parentShell); + this.title = dialogTitle; + message = dialogMessage; + if (initialValue == null) { + value = "";//$NON-NLS-1$ + } else { + value = initialValue; + } + } + + /* + * (non-Javadoc) Method declared on Dialog. + */ + protected void buttonPressed(int buttonId) { + if (buttonId == IDialogConstants.OK_ID) { + value = text.getText(); + } else { + value = null; + } + super.buttonPressed(buttonId); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell) + */ + protected void configureShell(Shell shell) { + super.configureShell(shell); + if (title != null) { + shell.setText(title); + } + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite) + */ + protected void createButtonsForButtonBar(Composite parent) { + // create OK and Cancel buttons by default + okButton = createButton(parent, IDialogConstants.OK_ID, + IDialogConstants.OK_LABEL, true); + createButton(parent, IDialogConstants.CANCEL_ID, + IDialogConstants.CANCEL_LABEL, false); + //do this here because setting the text will set enablement on the ok + // button + text.setFocus(); + if (value != null) { + text.setText(value); + text.selectAll(); + } + } + + /* + * (non-Javadoc) Method declared on Dialog. + */ + protected Control createDialogArea(Composite parent) { + // create composite + Composite composite = (Composite) super.createDialogArea(parent); + // create message + if (message != null) { + Label label = new Label(composite, SWT.WRAP); + label.setText(message); + GridData data = new GridData(GridData.GRAB_HORIZONTAL + | GridData.GRAB_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL + | GridData.VERTICAL_ALIGN_CENTER); + data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH); + label.setLayoutData(data); + label.setFont(parent.getFont()); + } + + Composite pathComp = new Composite(composite, SWT.NONE); + GridLayout pathLayout = new GridLayout(); + pathLayout.numColumns = 2; + pathComp.setLayout(pathLayout); + text = new Text(pathComp, getInputTextStyle()); + GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL); + data.widthHint = convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH); + text.setLayoutData(data); + + Button browseButton; + browseButton = createPushButton(pathComp, REMOTE_BROWSE, null); + browseButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent evt) { + String path = handleBrowseButtonSelected(); + if (path != null) { + text.setText(path); + } + } + }); + applyDialogFont(composite); + return composite; + } + + /** + * Returns the error message label. + * + * @return the error message label + * @deprecated use setErrorMessage(String) instead + */ + protected Label getErrorMessageLabel() { + return null; + } + + /** + * Returns the ok button. + * + * @return the ok button + */ + protected Button getOkButton() { + return okButton; + } + + /** + * Returns the text area. + * + * @return the text area + */ + protected Text getText() { + return text; + } + + /** + * Returns the string typed into this input dialog. + * + * @return the input string + */ + public String getValue() { + return value; + } + + /** + * Returns the style bits that should be used for the input text field. + * Defaults to a single line entry. Subclasses may override. + * + * @return the integer style bits that should be used when creating the + * input text + * + * @since 3.4 + */ + protected int getInputTextStyle() { + return SWT.SINGLE | SWT.BORDER; + } + + public static Button createPushButton(Composite parent, String label, Image image) { + Button button = new Button(parent, SWT.PUSH); + button.setFont(parent.getFont()); + if (image != null) { + button.setImage(image); + } + if (label != null) { + button.setText(label); + } + GridData gd = new GridData(); + button.setLayoutData(gd); + return button; + } + + protected String handleBrowseButtonSelected() { + IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + if (window == null) { + IWorkbenchWindow windows[] = PlatformUI.getWorkbench().getWorkbenchWindows(); + window = windows[0]; + } + + final Shell shell = window.getShell(); + if (shell != null) { + IDevice device = ConnectionPlugin.getDefault().getCurrentDevice(); + if (device == null) { + MessageBox msgBox = new MessageBox(shell, SWT.ICON_INFORMATION); + msgBox.setMessage(TizenLaunchMessages.CANNOT_CONNECT_TO_DEVICE); + msgBox.open(); + return null; + } + + shell.getDisplay().syncExec( new Runnable() { + public void run() { + IDevice device = ConnectionPlugin.getDefault().getCurrentDevice(); + TizenRemoteFileDialog dlg = new TizenRemoteFileDialog(shell, SELECT_AN_APPLICATION, device, false, DEFAULT_APP_PATH); + if(dlg.open() == TizenRemoteFileDialogResult.OK) { + FileEntry selectedFile = dlg.getSelectedFileEntry(); + filePath = selectedFile.getFullPath(); + } else + filePath = null; + } + }); + } + return filePath; + } +} \ No newline at end of file diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/DialogActionDelegate.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/DialogActionDelegate.java new file mode 100644 index 0000000..42ea43f --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/DialogActionDelegate.java @@ -0,0 +1,106 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.pkgInstall; + +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IManagedProject; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.core.resources.IProject; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.IWorkbenchWindowActionDelegate; + +import org.tizen.common.connection.ConnectionPlugin; + + +import org.tizen.nativecommon.build.CurrentEnabledProject; +import org.tizen.nativeplatform.build.PlatformConfigurationManager; +import org.tizen.sdblib.IDevice; + +public class DialogActionDelegate implements IWorkbenchWindowActionDelegate { + private IWorkbenchWindow window; + + PackageManager pkgdlg; + String target = null; + boolean enableRootstrap = true; + boolean eanbleTarget = true; + @Override + public void run(IAction arg0) { + // TODO Auto-generated method stub + //DeviceMachine machine = DeviceManager.getSelectedDevice(); + IDevice device = ConnectionPlugin.getDefault().getCurrentDevice(); + if (device == null) { + eanbleTarget = false; + } else { + target = device.getSerialNumber(); + if (target == null) { + eanbleTarget = false; + } + } + + IProject project = CurrentEnabledProject.getCurrentProject(); + if (project == null) { + enableRootstrap = false; + } else { + IConfiguration cfg =ManagedBuildManager.getBuildInfo( project ).getDefaultConfiguration(); + IManagedProject managedProject = cfg.getManagedProject(); + String projectArtifactType = managedProject.getProjectType().getBuildArtefactType().getId(); + if (!projectArtifactType.equals(PlatformConfigurationManager.TIZEN_CUSTOM_DEBIAN_ARTIFACT_TYPE) && + !projectArtifactType.equals(PlatformConfigurationManager.OLD_SLP_CUSTOM_DEBIAN_ARTIFACT_TYPE)) { + enableRootstrap = false; + }else + enableRootstrap = true; + } + + pkgdlg = new PackageManager(window.getShell(), target, enableRootstrap, eanbleTarget); + pkgdlg.open(); + + } + + @Override + public void selectionChanged(IAction arg0, ISelection arg1) { + // TODO Auto-generated method stub + + } + + @Override + public void dispose() { + // TODO Auto-generated method stub + } + + @Override + public void init(IWorkbenchWindow arg0) { + // TODO Auto-generated method stub + this.window = arg0; + this.enableRootstrap = true; + this.eanbleTarget = true; + } + +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageCommander.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageCommander.java new file mode 100644 index 0000000..a091794 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageCommander.java @@ -0,0 +1,653 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.pkgInstall; + +import java.io.File; +import java.io.FileWriter; +import java.io.OutputStream; + +import org.tizen.common.util.HostUtil; + +import org.tizen.nativecommon.build.SmartBuildInterface; +import org.tizen.nativecommon.build.exception.SBIException; +import org.tizen.sdblib.IDevice; + +public class PackageCommander { + + private final static SmartBuildInterface sbi = SmartBuildInterface.getInstance(); + private final static int MAX_TIMEOUT = 60000; + private final static int VERIFY_SSHCONN_TIMEOUT = 30000; + + public PackageCommander() { + } + + public static String getCurrentSourceListForRootstrap(String targetID) throws SBIException { + + String result = ""; + + try { + result = sbi.actionStdOut("command", + String.format("-mode=emulate -cmd=\'cat /etc/apt/sources.list\' -path=." ), + targetID, null ); + } catch (SBIException e) { + e.printStackTrace(); + } + + return result.trim(); + } + + public static String getCurrentSourceListForRealTarget(IDevice device, PackageManagerOuputReceiver rec) { + String command = "cat /etc/apt/sources.list"; + String result = ""; + + if (device != null) { + try { + device.executeShellCommand(command, rec, MAX_TIMEOUT); + for (String line : rec.getLog()) { + result = result + line + "\n"; + } + + } catch (Exception e) { + e.printStackTrace(); + } + + if (device.isEmulator()) { + String[] splitResult = result.split("\n"); + if (splitResult.length > 1) { + result = splitResult[1]; + } else if (splitResult.length == 1){ + result = splitResult[0]; + } + } + + } + + return result.trim(); + } + + public static void changeSourceListForRealTarget(String sourceList, IDevice device) { + String command = String.format("echo \"%s\" > /etc/apt/sources.list", sourceList); + + if (device != null) { + try { + device.executeShellCommand(command); + //result = session.run(command, null); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + public static void changeSourceListForRootstrap(String targetID, String sourceList) { + if (targetID == null) { + return; + } + + try { + String rootstrapPath = sbi.getRootstrapPath(targetID); + String sourcesListFile = rootstrapPath + "/etc/apt/sources.list"; + + /** "echo" command is not used on shell.execute() **/ + // String command = String.format("/bin/echo \"%s\" > %s/etc/apt/sources.list", sourceList, rootstrapPath); + + + File file = new File(sourcesListFile); + FileWriter writer = new FileWriter(file); + writer.write(sourceList); + writer.close(); + } catch(SBIException e) { + e.printStackTrace(); + } catch(Exception e1) { + e1.printStackTrace(); + } + } + + public static void resolveDpkgInterruptForRootstrap(String targetID, + OutputStream stdoutStream, OutputStream stderrStream) { + if (targetID == null) { + return; + } + + String command = "dpkg --configure -a"; + + try { + sbi.actionStdOut("command", + String.format("-mode=emulate -cmd=\'%s\' -path=.", command ), + targetID, null ); + } catch (SBIException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + public static void aptGetUpdateForRootstrap(String targetID, + OutputStream stdoutStream, OutputStream stderrStream) { + if (targetID == null) { + return; + } + + String command = "apt-get update"; + + try { + sbi.actionStream("command", + String.format("-mode=emulate -cmd=\'%s\' -path=.", command ), + targetID, null, stdoutStream, stderrStream ); + } catch (SBIException e) { + // TODO Auto-generated catch block + e.setMessage("Failed to update. please check console view."); + e.printStackTrace(); + e.showErrorDialog(); + } + } + + public static boolean verifySshConnectionForRootstrap(String targetID, String remoteAddr) { + String command = "ssh -oStrictHostKeyChecking=no " + remoteAddr + " exit"; + int result = 0; + + if (targetID == null) { + return false; + } + + try { + result = sbi.actionReturnExitValue("command", + String.format("-mode=emulate -cmd=\'%s\' -path=.", command ), + targetID, null ); + } catch (SBIException e) { + // TODO Auto-generated catch block + e.setMessage(String.format("Failed to execute \"%s\"", command)); + e.printStackTrace(); + e.showErrorDialog(); + } + + if (result != 0) { + SBIException e = new SBIException( + String.format("Failed to connect \"%s\".", remoteAddr)); + e.showErrorDialog(); + return false; + } + return true; + } + + public static void aptGetUpgradeForRootstrap(String targetID, + OutputStream stdoutStream, OutputStream stderrStream) { + + if (targetID == null) { + return; + } + + String command = "apt-get --force-yes -y dist-upgrade"; + try { + sbi.actionStream("command", + String.format("-mode=emulate -cmd=\'%s\' -path=.", command ), + targetID, null, stdoutStream, stderrStream ); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + + public static void aptGetInstallForRootstrap(String targetID, String pkgList, + OutputStream stdoutStream, OutputStream stderrStream) { + if (targetID == null) { + return; + } + + String command = String.format("apt-get --force-yes -y install %s", pkgList); + try { + sbi.actionStream("command", + String.format("-mode=emulate -cmd=\'%s\' -path=.", command ), + targetID, null, stdoutStream, stderrStream ); + } catch (SBIException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + + public static void aptGetInstallForTarget(String pkgName, IDevice device, PackageManagerOuputReceiver rec) { + String command = String.format("apt-get --force-yes -y install %s", pkgName); + + if (device != null) { + try { + device.executeShellCommand(command, rec, MAX_TIMEOUT); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + + public static void dpkgInstallForRootstrap(String targetID, String debList, + OutputStream stdoutStream, OutputStream stderrStream) { + + if (targetID == null) { + return ; + } + + String command = String.format("dpkg -i %s", debList); + try { + sbi.actionStream("command", + String.format("-mode=emulate -cmd=\'%s\' -path=.", command ), + targetID, null, stdoutStream, stderrStream ); + } catch (SBIException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + public static void aptGetUpdateForRealTarget(IDevice device, PackageManagerOuputReceiver rec) { + String command = "apt-get update"; + + if (device != null) { + try { + device.executeShellCommand(command, rec, MAX_TIMEOUT); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + public static void fixBrokenForRootstrap(String targetID, OutputStream stdoutStream, OutputStream stderrStream) { + + if (targetID == null) { + return ; + } + + String command = "apt-get -f --force-yes -y install"; + try { + sbi.actionStream("command", + String.format("-mode=emulate -cmd=\'%s\' -path=.", command ), + targetID, null, stdoutStream, stderrStream ); + } catch (SBIException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + public static void fixBrokenForRealTarget(IDevice device, PackageManagerOuputReceiver rec) { + String command = "apt-get -f --force-yes -y install"; + + if (device != null) { + try { + device.executeShellCommand(command, rec, MAX_TIMEOUT); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + public static boolean verifySshConnectionForRealTarget(IDevice device, String remoteAddr, PackageManagerOuputReceiver rec) { + String command = "ssh -oStrictHostKeyChecking=no " + remoteAddr + " exit; echo $?"; + String log = ""; + + if (device != null) { + try { + device.executeShellCommand(command, rec, VERIFY_SSHCONN_TIMEOUT); + String[] logs = rec.getLog(); + log = logs[0]; + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + if (log.equals("0")) { + return true; + } else { + SBIException e = new SBIException( + String.format("Failed to connect \"%s\".", remoteAddr)); + e.showErrorDialog(); + return false; + } + } + + + public static void aptGetUpgradeForRealTarget(IDevice device, PackageManagerOuputReceiver rec) { + String command = "apt-get --force-yes -y dist-upgrade"; + + if (device != null) { + try { + device.executeShellCommand(command, rec, MAX_TIMEOUT); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + } + + public static String getArchForDebFile(String debPath) { + String retStr = ""; + + String command = String.format("dpkg --info %s | grep \"Architecture: \"", debPath); + String result = HostUtil.returnExecute(command); + + if (!result.contains("Architecture: ")) { + return retStr; + } + + String[] splitResult = result.split(":"); + + if (splitResult.length < 2 ) { + return retStr; + } + + retStr = splitResult[1].trim(); + + return retStr; + } + + public static String getArchOfRemotePkgForRootstrap(String pkgName, String targetID) { + String retStr = ""; + if (targetID == null) { + return ""; + } + + try { + String command = String.format("apt-cache show %s | grep \"Architecture: \"", pkgName); + String result = sbi.actionStdOut("command", + String.format("-mode=emulate -cmd=\'%s\' -path=.", command ), + targetID, null ); + + if (!result.contains("Architecture: ")) { + return retStr; + } + + result = result.split("\n")[0]; + String[] splitResult = result.split(":"); + + if (splitResult.length < 2 ) { + return retStr; + } + + retStr = splitResult[1].trim(); + + } catch (SBIException e) { + // TODO Auto-generated catch block + //e.printStackTrace(); + } + + return retStr; + } + private static String getValue(String header, String key) { + int s_pos = 0; + int e_pos = 0; + String ret = null; + s_pos = header.indexOf(key); + if (s_pos == -1) + return ""; + e_pos = header.indexOf("\n",s_pos); + if (e_pos == -1) { + ret = header.substring(s_pos+key.length()); + } else { + ret = header.substring(s_pos+key.length(), e_pos).trim(); + } + return ret; + } + public static String getArchOfRemotePkgForRealTarget(String pkgName, IDevice device, PackageManagerOuputReceiver rec) { + String retStr = ""; + String archKey = "Architecture: "; + if (device != null) { + try { + String result = ""; + String command = String.format("apt-cache show %s | grep \"Architecture: \"", pkgName); + device.executeShellCommand(command, rec, MAX_TIMEOUT); + for(String line : rec.getLog()) { + result = result + line + "\n"; + } + //String result = session.run(command, null); + + retStr = getValue(result,archKey); + } catch (Exception e) { + e.printStackTrace(); + } + } + + return retStr; + } + + + public static String getPkgNameForDebFile(String debPath) { + String retStr = ""; + + String command = String.format("dpkg --info %s | grep \"Package: \"", debPath); + String result = HostUtil.returnExecute(command); + + if (!result.contains("Package: ")) { + return retStr; + } + + String[] splitResult = result.split(":"); + + if (splitResult.length < 2 ) { + return retStr; + } + + retStr = splitResult[1].trim(); + + return retStr; + } + + public static String getPkgVerForDebFile(String debPath) { + String retStr = ""; + + String command = String.format("dpkg --info %s | grep \"Version: \"", debPath); + String result = HostUtil.returnExecute(command); + + if (!result.contains("Version:")) { + return retStr; + } + + String[] splitResult = result.split(":"); + + if (splitResult.length < 2 ) { + return retStr; + } + + retStr = splitResult[1].trim(); + + return retStr; + } + + public static String getPkgNewVerForRootstrap(String pkgName, String targetID) { + String retStr = ""; + if (targetID == null) { + return ""; + } + + try { + String command = String.format("apt-cache showpkg %s | grep -A 1 \"Versions:\"", pkgName); + String result = sbi.actionStdOut("command", + String.format("-mode=emulate -cmd=\'%s\' -path=.", command ), + targetID, null ); + + if (!result.contains("Versions:")) { + return retStr; + } + + String[] splitResult = result.split("\n"); + + if (splitResult.length < 2 ) { + return retStr; + } + + //splitResult = splitResult[1].split(" ")[0].split(":"); + //retStr = splitResult[splitResult.length-1].trim(); + retStr = splitResult[1].split(" ")[0]; + } catch (SBIException e) { + e.printStackTrace(); + } + return retStr; + } + + public static String getPkgNewVerForRealTarget(String pkgName, IDevice device, PackageManagerOuputReceiver rec) { + String retStr = ""; + + if (device != null) { + try { + String result = ""; + String command = String.format("apt-cache showpkg %s | grep -A 1 \"Versions:\"", pkgName); + //String result = session.run(command, null); + device.executeShellCommand(command, rec, MAX_TIMEOUT); + + for (String line : rec.getLog()) { + result = result + line + "\n"; + } + + if (!result.contains("Versions:")) { + return retStr; + } + + String[] splitResult = result.split("\n"); + + if (splitResult.length < 2 ) { + return retStr; + } + + //splitResult = splitResult[1].split(" ")[0].split(":"); + retStr = splitResult[1].split(" ")[0]; + //retStr = splitResult[splitResult.length-1].trim(); + + } catch (Exception e1) { + e1.printStackTrace(); + } + } + + return retStr; + } + + + public static String getPkgInstalledVerForRootstrap(String pkgName, String targetID) { + String retStr = ""; + if (targetID == null) { + return ""; + } + + try { + + String command = String.format("dpkg -s %s | grep \"Version: \"", pkgName); + + String result = sbi.actionStdOut("command", + String.format("-mode=emulate -cmd=\'%s\' -path=.", command ), + targetID, null ); + + if (!result.contains("Version: ")) { + return retStr; + } + + result = result.replace("\n", " "); + String[] splitResult = result.split(" "); + if (splitResult.length < 2) { + return retStr; + } + + //splitResult = splitResult[1].split(" ")[0].split(":"); + //retStr = splitResult[splitResult.length-1].replace("\n", "").trim(); + retStr = splitResult[1].split(" ")[0]; + } catch (SBIException e) { + e.printStackTrace(); + } + + return retStr; + } + + public static String getPkgInstalledVerForRealTarget(String pkgName, IDevice device, PackageManagerOuputReceiver rec) { + String archKey = "Version: "; + String retStr = ""; + if (device != null) { + try { + String command = String.format("dpkg -s %s | grep \"Version: \"", pkgName); + String result = ""; + device.executeShellCommand(command, rec, MAX_TIMEOUT); + for (String line : rec.getLog()) { + result = result + line + "\n"; + } + //String result = session.run(command, null); + + retStr = getValue(result,archKey); + + } catch (Exception e1) { + e1.printStackTrace(); + } + } + + return retStr; + } + + public static boolean pkgInstalledSuccessfullyForRootstrap(String pkgName, String targetID) { + boolean ret = false; + + if (targetID == null) { + return ret; + } + + try { + String command = String.format("dpkg -l | grep -w \"%s \" | cut -d\" \" -f1", pkgName); + String result = sbi.actionStdOut("command", + String.format("-mode=emulate -cmd=\'%s\' -path=.", command ), + targetID, null ); + + result = result.trim(); + + if (result.equals("ii")) { + ret = true; + } + + } catch (SBIException e) { + e.printStackTrace(); + } + + return ret; + } + + public static boolean pkgInstalledSuccessfullyForRealTarget(String pkgName, IDevice device, PackageManagerOuputReceiver rec) { + boolean ret = false; + if (device != null) { + try { + String command = String.format("dpkg -l | grep -w \"%s \" | cut -d' ' -f1", pkgName); + device.executeShellCommand(command, rec, MAX_TIMEOUT); + for (String line : rec.getLog()) { + line = line.trim(); + if (line.equals("ii")) { + ret = true; + } + } + + } catch (Exception e1) { + e1.printStackTrace(); + } + } + + return ret; + } +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageManager.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageManager.java new file mode 100644 index 0000000..aa02f4d --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageManager.java @@ -0,0 +1,1626 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.pkgInstall; + +import java.io.File; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.util.Iterator; +import java.util.concurrent.CopyOnWriteArrayList; + +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.OperationCanceledException; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.jface.viewers.ArrayContentProvider; +import org.eclipse.jface.viewers.ColumnLabelProvider; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.TableViewerColumn; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.MouseListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.FileDialog; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.TabFolder; +import org.eclipse.swt.widgets.TabItem; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.TableItem; +import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.console.MessageConsoleStream; + +import org.tizen.common.connection.ConnectionPlugin; +import org.tizen.common.console.ConsoleManager; + + +import org.tizen.nativecommon.build.CheckCancelJob; +import org.tizen.nativecommon.build.CurrentEnabledProject; +import org.tizen.nativecommon.build.SmartBuildInterface; +import org.tizen.nativecommon.build.exception.SBIException; +import org.tizen.nativeplatform.Activator; +import org.tizen.nativeplatform.build.PlatformConfigurationManager; +import org.tizen.sdblib.IDevice; +import org.tizen.sdblib.SyncService; +import org.tizen.sdblib.SyncService.SyncResult; + + +public class PackageManager extends Dialog { + + private TableViewer viewerForRootstrap = null; + private TableViewer viewerForTarget = null; + private static TableViewer currentViewer; + private static String CURRENT_TAB_NAME; + + private static Table tableForRootstrap = null; + private static Table tableForTarget = null; + + private Button addButtonFromFile; + private Button addButtonFromRemote; + private Button installButton; + private Button removeButton; + private Button upgradeButton; + private Button updateButton; + private Button fixBrokenButton; + + private Text repositoryText; + private Text packageListText; + + private static String ROOTSTRAP_TAB_NAME = "Build System"; + private static String TARGET_TAB_NAME = "Device"; + private static String DEB_PATH= "/tmp"; + private static String DEB_COMMAND_INSTALL = "dpkg -i"; + private static String DEB_COMMAND_UPDATEMODE = "/bin/change-booting-mode.sh --update"; + + public Shell shell; + + public String target = null; + private String addPkgListForRemote; + private String repositoryForRemote; + private static String previousFilterPath = null; + private String selectedFileList; + private String configuration; + + private IDevice device; + private Display display = null; + private FileDialog fd; + private TabFolder tabFolder; + private CopyOnWriteArrayList pkgs = null; + + private boolean enableRootstrapTab = true; + private boolean enableTargetTab = true; + + private final int MAX_TIMEOUT = 60000; + + private SmartBuildInterface sbi = SmartBuildInterface.getInstance(); + + private int tabIndex = 0; + + private MouseListener removeListener = new MouseListener() + { + + @Override + public void mouseDoubleClick(MouseEvent e) { + } + + @Override + public void mouseDown(MouseEvent e) { + CopyOnWriteArrayList pkgList = PkgModelProvider.INSTANCE.getPkgs(); + for( Package pkg: pkgList) + { + boolean selected = false; + if (CURRENT_TAB_NAME.equals(ROOTSTRAP_TAB_NAME)) { + selected = pkg.getCheckColumn1(); + } else if (CURRENT_TAB_NAME.equals(TARGET_TAB_NAME)) { + selected = pkg.getCheckColumn2(); + } + if (selected) { + pkgList.remove(pkg); + } + } + if (viewerForRootstrap != null) { + viewerForRootstrap.refresh(); + } + if (viewerForTarget != null) { + viewerForTarget.refresh(); + } + + int recentTableIndex = currentViewer.getTable().getItemCount(); + + for (int i = 0; i < recentTableIndex; i++) { + TableItem item1 = null; + TableItem item2 = null;; + + if (viewerForRootstrap != null) { + item1 = viewerForRootstrap.getTable().getItem(i); + Package pkg = (Package)item1.getData(); + item1.setChecked(pkg.getCheckColumn1()); + } + if (viewerForTarget != null) { + item2 = viewerForTarget.getTable().getItem(i); + Package pkg = (Package)item2.getData(); + item2.setChecked(pkg.getCheckColumn2()); + } + } + } + + @Override + public void mouseUp(MouseEvent e) { + } + + }; + + + protected PackageManager(Shell parentShell, String target) { + super(parentShell); + setBlockOnOpen(false); + this.display = parentShell.getDisplay(); + this.target = target; + this.device = ConnectionPlugin.getDefault().getCurrentDevice(); + } + + protected PackageManager(Shell parentShell, String target, boolean enableRootstrap, boolean enableTarget) { + super(parentShell); + setBlockOnOpen(false); + this.enableRootstrapTab = enableRootstrap; + this.enableTargetTab = enableTarget; + this.display = parentShell.getDisplay(); + + if (enableRootstrap) { + IProject _project = CurrentEnabledProject.getCurrentProject(); + IConfiguration config = ManagedBuildManager.getBuildInfo( _project ).getDefaultConfiguration(); + this.configuration = config.getName(); + } + if (enableTarget) { + this.target = target; + this.device = ConnectionPlugin.getDefault().getCurrentDevice(); + } + } + + protected PackageManager(Shell parentShell, String target, int tabIndex) { + super(parentShell); + setBlockOnOpen(false); + this.display = parentShell.getDisplay(); + this.target = target; + this.device = ConnectionPlugin.getDefault().getCurrentDevice(); + this.tabIndex = tabIndex; + } + + protected void setShellStyle(int newShellStyle) { + int newStyle = newShellStyle & ~SWT.APPLICATION_MODAL; + newStyle |= SWT.MODELESS; + super.setShellStyle(newStyle); + } + + @Override + public boolean close() + { + PkgModelProvider.INSTANCE.getPkgs().clear(); + return super.close(); + } + + protected void createButtonsForButtonBar(Composite parent) + { + createButton(parent, IDialogConstants.OK_ID, IDialogConstants.CLOSE_LABEL, true); + } + + + @Override + protected void configureShell(Shell newShell) { + super.configureShell(newShell); + newShell.setText("Package Manager"); + newShell.setLocation(100, 100); + newShell.setSize(960, 600); + } + + @Override + protected Control createDialogArea(Composite parent) { + + + Composite composite = new Composite( parent, SWT.None ); + composite.setLayoutData(new GridData(GridData.FILL_BOTH)); + composite.setLayout(new GridLayout(1, false)); + + if (!enableRootstrapTab && !enableTargetTab) { + createError( composite, "- Any project is not selected and any connection is not connected,\n" + + "- or project is not \"CUSTOM DEBIAN PROJECT\"." ); + } else { + //2nd basement : Sourcelist + update button + createTopComposite( composite ); + //3rd basement : Package text + +, - button + createMiddleComposite( composite ); + //5th basement : tab (upgrade/install button + table) + createBottomComposite( composite ); + } + + return null; + } + + + private void createError( Composite parent, String message ) + { + Composite com = new Composite( parent, SWT.NONE ); + com.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); + com.setLayout(new GridLayout(1, false)); + + Label errorLabel = new Label(com, SWT.NONE); + errorLabel.setText(message); + } + + private void createTopComposite( Composite parent ) + { + Composite com = new Composite( parent, SWT.NONE ); + com.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); + com.setLayout(new GridLayout(3, false)); + + Label searchLabel = new Label( com, SWT.NONE ); + searchLabel.setText("Source List : "); + + repositoryText = new Text(com, SWT.SINGLE | SWT.BORDER | SWT.SEARCH); + + GridData gridData = new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL); + gridData.widthHint = 300; + repositoryText.setLayoutData(gridData); + + if (enableRootstrapTab) { + String targetID = getTargetID(); + + try { + repositoryText.setText(PackageCommander.getCurrentSourceListForRootstrap(targetID)); + } catch (SBIException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + } else if (enableTargetTab) { + //repositoryText.setText(PackageCommander.getCurrentSourceListForRealTarget(getSession())); + PackageManagerOuputReceiver rec = new PackageManagerOuputReceiver(); + rec.setPrintConsole(false); + repositoryText.setText(PackageCommander.getCurrentSourceListForRealTarget(device, rec)); + } else { + repositoryText.setText(""); + } + + updateButton = new Button( com, SWT.PUSH ); + updateButton.setText("Update "); + updateButton.addMouseListener(new MouseListener(){ + + @Override + public void mouseDoubleClick(MouseEvent e) { + } + + @Override + public void mouseDown(MouseEvent e) { + repositoryForRemote = repositoryText.getText(); + + if(repositoryForRemote.isEmpty()) { + MessageDialog.openError(shell, "Error", "Repository is empty.\nPlease set repository."); + return; + } + + ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell()); + + try { + dialog.run(true, true, new IRunnableWithProgress() { + @Override + public void run(IProgressMonitor monitor) throws InvocationTargetException, + InterruptedException { + monitor.beginTask("apt-get update", -1); + + CheckCancelJob cancelJob = new CheckCancelJob(monitor); + Thread checkCancelThread = new Thread(cancelJob); + checkCancelThread.start(); + + ConsoleManager cm = new ConsoleManager( "Package Installer", true); + cm.clear(); + MessageConsoleStream mcsError = cm.getMessageConsoleStream(true); + MessageConsoleStream mcs = cm.getMessageConsoleStream(false); + PackageManagerOuputReceiver rec = new PackageManagerOuputReceiver(); + rec.setMessageConsoleStream(mcs); + + try { + if (CURRENT_TAB_NAME.equals(ROOTSTRAP_TAB_NAME)) { + String targetID = getTargetID(); + monitor.subTask("changing source list..."); + PackageCommander.changeSourceListForRootstrap(targetID, repositoryForRemote); + + Thread.sleep(500); + + int s = repositoryForRemote.indexOf("ssh://"); + if (s != -1) { + String remoteAddr = repositoryForRemote.substring(s + 6); + int e = remoteAddr.indexOf("/"); + + remoteAddr = remoteAddr.substring(0, e); + monitor.subTask(String.format("verifying connection %s", remoteAddr)); + if (!PackageCommander.verifySshConnectionForRootstrap(targetID, remoteAddr)) { + return; + } + } + + monitor.subTask("apt-get update..."); + PackageCommander.aptGetUpdateForRootstrap(targetID, mcs, mcsError); + + } else if(CURRENT_TAB_NAME.equals(TARGET_TAB_NAME)) { + if (!device.isEmulator()) { + // Change to bootmode with update + String command = DEB_COMMAND_UPDATEMODE; + device.executeShellCommand(command, rec, MAX_TIMEOUT); + } + /** target change source list **/ + monitor.subTask("changing source list..."); + PackageCommander.changeSourceListForRealTarget(repositoryForRemote, device); + + Thread.sleep(500); + + if (!device.isEmulator()) { + // Change to bootmode with update + String command = DEB_COMMAND_UPDATEMODE; + device.executeShellCommand(command, rec, MAX_TIMEOUT); + } + + int s = repositoryForRemote.indexOf("ssh://"); + if (s != -1) { + String remoteAddr = repositoryForRemote.substring(s + 6); + int e = remoteAddr.indexOf("/"); + + remoteAddr = remoteAddr.substring(0, e); + + if (!PackageCommander.verifySshConnectionForRealTarget(device, remoteAddr, rec)) { + return; + } + } + + monitor.subTask("apt-get update..."); + PackageCommander.aptGetUpdateForRealTarget(device, rec); + } + monitor.subTask("updating package informations..."); + updatePkgInfoAfterAptUpdate(); + + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + checkCancelThread.interrupt(); + //monitor.worked(1); + monitor.done(); + } + }); + } catch (Exception e1) { + e1.printStackTrace(); + } + + currentViewer.refresh(); + } + + @Override + public void mouseUp(MouseEvent e) { + } + + }); + + } + private void createMiddleComposite( Composite parent ) + { + Composite com = new Composite( parent, SWT.NONE ); + com.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); + com.setLayout(new GridLayout(4, false)); + + Label targetLabel = new Label( com, SWT.NONE ); + targetLabel.setText("Package Name: "); + + Listener AddPackageEventHandler = new Listener() + { + + @Override + public void handleEvent(Event event) { + switch ( event.type ) + { + /* package is selected for 2 cases + * 1. Edit text in packageListText then input 'Enter' key + * 2. click addButtonFromRemote button + * so, addListener for 2 case for each cases + * then, event type is SWT.Traverse then 1st case + * and, event type is SWT.MouseDown then 2nd case + */ + case SWT.Traverse: + if( event.character == SWT.CR) + { + /* if input is enter key, then we don't want to other process for 'enter key' + * then event.doit variable is set to false + */ + event.doit = false; + } + else + { + /* if input is other key, for example tab or arrow key + * then we do not add package + */ + break; + } + case SWT.MouseDown: + + int oldTableIndex = currentViewer.getTable().getItemCount(); + + addPkgListForRemote = packageListText.getText(); + + if(addPkgListForRemote.isEmpty()) { + MessageDialog.openError(shell, "Error", "Package name is empty.\nPlease input package name for installing"); + return; + } else if(addPkgListForRemote.contains("\"") || addPkgListForRemote.contains("\'") || + addPkgListForRemote.contains(":") || addPkgListForRemote.contains(",") || + addPkgListForRemote.contains(";")) { + MessageDialog.openError(shell, "Error", "Invalid character is found. (\" \' , : ; . )\n" + + "Between package names, delimeter shoud be space character.\n" + + "(ex) sqlite3 sysv-rc sglib-dev perl"); + return; + } + + ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell()); + + try { + dialog.run(true, false, new IRunnableWithProgress() { + @Override + public void run(IProgressMonitor monitor) throws InvocationTargetException, + InterruptedException { + monitor.beginTask("Adding packages to list", -1); + + if (addPkgListForRemote != "") { + addPkgListForRemote = addPkgListForRemote.trim(); + String[] arrPkgs = addPkgListForRemote.split(" "); + for (String pkgName : arrPkgs) { + if (pkgName.isEmpty()) { + continue; + } + monitor.subTask(String.format("Adding %s", pkgName)); + addColumn(currentViewer, pkgName, null, Package.PKGTYPE.REMOTE); + } + } + + monitor.worked(1); + monitor.done(); + } + }); + } catch (Exception e1) { + e1.printStackTrace(); + } + + packageListText.setText(""); + + //currentViewer.refresh(); + if (viewerForRootstrap != null) { + viewerForRootstrap.refresh(); + } + if (viewerForTarget != null) { + viewerForTarget.refresh(); + } + + int recentTableIndex = currentViewer.getTable().getItemCount(); + + for (int i = oldTableIndex; i < recentTableIndex; i++) { + TableItem item1 = null; + TableItem item2 = null;; + + if (viewerForRootstrap != null) { + item1 = viewerForRootstrap.getTable().getItem(i); + Package pkg = (Package)item1.getData(); + item1.setChecked(pkg.getCheckColumn1()); + } + if (viewerForTarget != null) { + item2 = viewerForTarget.getTable().getItem(i); + Package pkg = (Package)item2.getData(); + item2.setChecked(pkg.getCheckColumn2()); + } + } + break; + } + } + }; + + packageListText = new Text(com, SWT.SINGLE | SWT.BORDER | SWT.SEARCH); + packageListText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL + | GridData.HORIZONTAL_ALIGN_FILL)); + packageListText.addListener(SWT.Traverse, AddPackageEventHandler); + + addButtonFromRemote = new Button( com, SWT.PUSH ); + addButtonFromRemote.setImage(new Image(display, + Activator.getImageDescriptor("/icons/packagelist_to_table.gif").getImageData())); + addButtonFromRemote.setToolTipText("Add packages from remote repository"); + addButtonFromRemote.addListener(SWT.MouseDown, AddPackageEventHandler); + + + addButtonFromFile = new Button( com, SWT.PUSH ); + addButtonFromFile.setImage(new Image(display, + Activator.getImageDescriptor("/icons/folder_search.gif").getImageData())); + addButtonFromFile.setToolTipText("Add packages from file system"); + addButtonFromFile.addMouseListener(new MouseListener() + { + + @Override + public void mouseDoubleClick(MouseEvent e) { + } + + @Override + public void mouseDown(MouseEvent e) { + + int oldTableIndex = currentViewer.getTable().getItemCount(); + + fd = new FileDialog( getShell(), SWT.OPEN|SWT.MULTI); + fd.setText("Select deb file..."); + if (previousFilterPath == null) + fd.setFilterPath(null); + else + fd.setFilterPath(previousFilterPath); + String[] filterExt = { "*.deb" }; + fd.setFilterExtensions(filterExt); + selectedFileList = fd.open(); + + ProgressMonitorDialog dialog = new ProgressMonitorDialog(getShell()); + + try { + dialog.run(true, false, new IRunnableWithProgress() { + @Override + public void run(IProgressMonitor monitor) throws InvocationTargetException, + InterruptedException { + monitor.beginTask("Adding packages to list", -1); + if( selectedFileList != null ) + { + String[] files = fd.getFileNames(); + previousFilterPath = fd.getFilterPath(); + for (int i=0, n = files.length; i pkgs = PkgModelProvider.INSTANCE.getPkgs(); + + for (Package pkg : pkgs) { + if (pkg.getPkgType().equals(Package.PKGTYPE.REMOTE)) { + if (CURRENT_TAB_NAME.equals(ROOTSTRAP_TAB_NAME)) { + String targetID = getTargetID(); + String newVer = PackageCommander.getPkgNewVerForRootstrap(pkg.getName(), targetID); + if (newVer.equals("")) { + pkg.setInstallInfo1(Package.INSTALLINFO.NOT_FOUND); + pkg.setCheckColumn1(false); + } else if (pkg.getInstalledVersion1().equals("")) { + pkg.setInstallInfo1(Package.INSTALLINFO.NOT_INSTALLED); + } else if (newVer.equals(pkg.getInstalledVersion1())) { + if (PackageCommander.pkgInstalledSuccessfullyForRootstrap(pkg.getName(), targetID)) { + pkg.setInstallInfo1(Package.INSTALLINFO.INSTALLED); + } else { + pkg.setInstallInfo1(Package.INSTALLINFO.NOT_PROPERLY_INSTALLED); + } + } else { + pkg.setInstallInfo1(Package.INSTALLINFO.DIFFERENT_VERSION); + } + pkg.setNewVersion1(newVer); + } else if (CURRENT_TAB_NAME.equals(TARGET_TAB_NAME)) { + PackageManagerOuputReceiver rec = new PackageManagerOuputReceiver(); + rec.setPrintConsole(false); + String newVer = PackageCommander.getPkgNewVerForRealTarget(pkg.getName(), device, rec); + if (newVer.equals("")) { + pkg.setInstallInfo2(Package.INSTALLINFO.NOT_FOUND); + pkg.setCheckColumn2(false); + } else if (pkg.getInstalledVersion2().equals("")) { + pkg.setInstallInfo2(Package.INSTALLINFO.NOT_INSTALLED); + } else if (newVer.equals(pkg.getInstalledVersion2())) { + if (PackageCommander.pkgInstalledSuccessfullyForRealTarget(pkg.getName(), device, rec)) { + pkg.setInstallInfo2(Package.INSTALLINFO.INSTALLED); + } else { + pkg.setInstallInfo2(Package.INSTALLINFO.NOT_PROPERLY_INSTALLED); + } + } else { + pkg.setInstallInfo2(Package.INSTALLINFO.DIFFERENT_VERSION); + } + pkg.setNewVersion2(newVer); + } + } + } + } + + + private boolean addColumn( TableViewer viewer, String pkgName, String debPath, Package.PKGTYPE type ) + { +// viewer.add( debName ); + CopyOnWriteArrayList pkgs = PkgModelProvider.INSTANCE.getPkgs(); + Iterator debIter = pkgs.iterator(); + //String targetID = getTargetID(); + String targetID = null; + //ISession session = null; + //IDevice device = null; + + if (enableRootstrapTab) { + targetID = getTargetID(); + } + /* + if (enableTargetTab) { + session = getSession(); + } + */ + + Package pkg; + + if (pkgName == null && debPath != null) { + pkgName = PackageCommander.getPkgNameForDebFile(debPath); + } + + while( debIter.hasNext() ) + { + pkg = debIter.next(); + if( pkg.getName().equals(pkgName)) + return true; + } + + pkg = new Package(); + if (debPath != null) { + pkg.setName(PackageCommander.getPkgNameForDebFile(debPath)); + } else if (pkgName != null) { + pkg.setName(pkgName); + } + + pkg.setTarget( this.target ); + pkg.setPath(debPath); + + String newVerForRootstrap = ""; + String newVerForTarget = ""; + + PackageManagerOuputReceiver rec = new PackageManagerOuputReceiver(); + rec.setPrintConsole(false); + + if (type.equals(Package.PKGTYPE.LOCAL)) { + pkg.setArch1(PackageCommander.getArchForDebFile(debPath)); + pkg.setArch2(PackageCommander.getArchForDebFile(debPath)); + newVerForRootstrap = PackageCommander.getPkgVerForDebFile(debPath); + newVerForTarget = newVerForRootstrap; + pkg.setNewVersion1(newVerForRootstrap); + pkg.setNewVersion2(newVerForRootstrap); + } else { + pkg.setArch1(PackageCommander.getArchOfRemotePkgForRootstrap(pkg.getName(), targetID)); + pkg.setArch2(PackageCommander.getArchOfRemotePkgForRealTarget(pkg.getName(), device, rec)); + newVerForRootstrap = PackageCommander.getPkgNewVerForRootstrap(pkg.getName(), targetID); + rec.cleanLog(); + newVerForTarget = PackageCommander.getPkgNewVerForRealTarget(pkg.getName(), device, rec); + pkg.setNewVersion1(newVerForRootstrap); + pkg.setNewVersion2(newVerForTarget); + } + + String installedVerForRootstrap = PackageCommander.getPkgInstalledVerForRootstrap(pkg.getName(), targetID); + rec.cleanLog(); + String installedVerForRealDevice = PackageCommander.getPkgInstalledVerForRealTarget(pkg.getName(), device, rec); + + pkg.setInstalledVersion1(installedVerForRootstrap); + pkg.setInstalledVersion2(installedVerForRealDevice); + + if (newVerForRootstrap.equals("")) { + pkg.setInstallInfo1(Package.INSTALLINFO.NOT_FOUND); + pkg.setCheckColumn1(false); + } else if (!installedVerForRootstrap.equals("")) { + if (!installedVerForRootstrap.equals(newVerForRootstrap)) { + pkg.setInstallInfo1(Package.INSTALLINFO.DIFFERENT_VERSION); + } else { + if (PackageCommander.pkgInstalledSuccessfullyForRootstrap(pkg.getName(), targetID)) { + pkg.setInstallInfo1(Package.INSTALLINFO.INSTALLED); + } else { + pkg.setInstallInfo1(Package.INSTALLINFO.NOT_PROPERLY_INSTALLED); + } + } + } + + if (newVerForTarget.equals("")) { + pkg.setInstallInfo2(Package.INSTALLINFO.NOT_FOUND); + pkg.setCheckColumn2(false); + } else if (!installedVerForRealDevice.equals("")) { + if (!installedVerForRealDevice.equals(newVerForTarget)) { + pkg.setInstallInfo2(Package.INSTALLINFO.DIFFERENT_VERSION); + } else { + if (PackageCommander.pkgInstalledSuccessfullyForRealTarget(pkg.getName(), device, rec)) { + pkg.setInstallInfo2(Package.INSTALLINFO.INSTALLED); + } else { + pkg.setInstallInfo2(Package.INSTALLINFO.NOT_PROPERLY_INSTALLED); + } + } + } + + pkg.setPkgType(type); + + PkgModelProvider.INSTANCE.getPkgs().add(pkg); + + /* + if (type.equals(Package.PKGTYPE.LOCAL)) { + viewer.refresh(); + } + */ + + return true; + } + + + private void createColumns( Composite parent, final TableViewer viewer, final String type) + { + String[] titles = {"Install Type", "Package Name", "Arch", "New Version", "Installed Version", "Status"}; + int[] bounds = { 120, 180, 60, 200, 200, 160}; + + TableViewerColumn colInstallType = createTableViewerColumn( viewer, titles[0], bounds[0], SWT.NONE); + + colInstallType.setLabelProvider(new ColumnLabelProvider() { + @Override + public String getText(Object element) { + Package pkg = (Package)element; + return pkg.getPkgType().toString(); + } + }); + + TableViewerColumn colPackage = createTableViewerColumn( viewer, titles[1], bounds[1], SWT.NONE); + + colPackage.setLabelProvider(new ColumnLabelProvider() { + @Override + public String getText(Object element) { + Package pkg = (Package)element; + return pkg.getName(); + } + }); + + TableViewerColumn colArch = createTableViewerColumn( viewer, titles[2], bounds[2], SWT.NONE); + + colArch.setLabelProvider(new ColumnLabelProvider() { + @Override + public String getText(Object element) { + Package pkg = (Package)element; + String arch = ""; + if (type.equals(ROOTSTRAP_TAB_NAME)) { + arch = pkg.getArch1(); + } else if (type.equals(TARGET_TAB_NAME)) { + arch = pkg.getArch2(); + } + + return arch; + } + }); + + TableViewerColumn colNewVer = createTableViewerColumn( viewer, titles[3], bounds[3], SWT.NONE); + + colNewVer.setLabelProvider(new ColumnLabelProvider() { + @Override + public String getText(Object element) { + Package pkg = (Package)element; + String newVer = ""; + if (type.equals(ROOTSTRAP_TAB_NAME)) { + newVer = pkg.getNewVersion1(); + } else if (type.equals(TARGET_TAB_NAME)) { + newVer = pkg.getNewVersion2(); + } + + return newVer; + } + }); + + TableViewerColumn colInsVer = createTableViewerColumn( viewer, titles[4], bounds[4], SWT.NONE); + colInsVer.setLabelProvider(new ColumnLabelProvider() { + @Override + public String getText(Object element) { + Package pkg = (Package)element; + String installedVer = ""; + if (type.equals(ROOTSTRAP_TAB_NAME)) { + installedVer = pkg.getInstalledVersion1(); + } else if (type.equals(TARGET_TAB_NAME)) { + installedVer = pkg.getInstalledVersion2(); + } + + return installedVer; + } + }); + + TableViewerColumn colStatus = createTableViewerColumn( viewer, titles[5], bounds[5], SWT.NONE); + + colStatus.setLabelProvider(new ColumnLabelProvider() { + @Override + public String getText(Object element) { + Package pkg = (Package)element; + String status = ""; + if (type.equals(ROOTSTRAP_TAB_NAME)) { + status = pkg.getInstallInfo1().toString(); + } else if (type.equals(TARGET_TAB_NAME)) { + status = pkg.getInstallInfo2().toString(); + } + + return status; + } + }); + } + + private TableViewerColumn createTableViewerColumn(TableViewer viewer, String title, int bound, int Style) { + + final TableViewerColumn viewerColumn = new TableViewerColumn( viewer, Style); + final TableColumn column = viewerColumn.getColumn(); + column.setText(title); + column.setWidth(bound); + column.setResizable(true); + column.setMoveable(true); + return viewerColumn; + } + + + private String getTargetID() { + IProject project = CurrentEnabledProject.getCurrentProject(); + IConfiguration config = ManagedBuildManager.getBuildInfo( project ).getDefaultConfiguration(); + String targetID = PlatformConfigurationManager.getBuildTargetName(config); + return targetID; + } + + private CopyOnWriteArrayList getSelectedPkg(CopyOnWriteArrayList pkgs) { + CopyOnWriteArrayList _pkgs = new CopyOnWriteArrayList(); + if (CURRENT_TAB_NAME.equals(ROOTSTRAP_TAB_NAME)) { + for (Package pkg : pkgs) { + if(pkg.getCheckColumn1()) { + _pkgs.add(pkg); + } + } + } else if (CURRENT_TAB_NAME.equals(TARGET_TAB_NAME)) { + for (Package pkg : pkgs) { + if(pkg.getCheckColumn2()) { + _pkgs.add(pkg); + } + } + } + + return _pkgs; + } +} \ No newline at end of file diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageManagerOuputReceiver.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageManagerOuputReceiver.java new file mode 100644 index 0000000..0955cd9 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageManagerOuputReceiver.java @@ -0,0 +1,85 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.pkgInstall; + +import org.eclipse.ui.console.MessageConsoleStream; + +import org.tizen.sdblib.MultiLineReceiver; + +public class PackageManagerOuputReceiver extends MultiLineReceiver { + + public boolean isCancelled = false; + private boolean printConsole = true; + private String[] log = null; + private MessageConsoleStream mcs = null; + + public PackageManagerOuputReceiver() { + super(); + + setTrimLine(false); + } + + public void setMessageConsoleStream(MessageConsoleStream mcs) { + this.mcs = mcs; + } + + public void setPrintConsole(boolean b) { + printConsole = b; + } + + @Override + public void processNewLines(String[] lines) { + if (isCancelled == false) { + //processLogLines(lines); + log = lines; + if (printConsole) { + for (String line : lines) { + if (line.endsWith("\n")) { + mcs.print(line); + } else { + mcs.println(line); + } + } + } + } + } + + public String[] getLog() { + return log; + } + + public void cleanLog() { + log = null; + } + + public boolean isCancelled() { + return isCancelled; + } + +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageManagerRootstrapHandler.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageManagerRootstrapHandler.java new file mode 100644 index 0000000..a5f72a2 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PackageManagerRootstrapHandler.java @@ -0,0 +1,99 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.pkgInstall; + +import org.eclipse.cdt.managedbuilder.core.IConfiguration; +import org.eclipse.cdt.managedbuilder.core.IManagedProject; +import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.resources.IProject; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.handlers.HandlerUtil; + +import org.tizen.common.connection.ConnectionPlugin; + + +import org.tizen.nativecommon.build.CurrentEnabledProject; +import org.tizen.nativeplatform.build.PlatformConfigurationManager; +import org.tizen.sdblib.IDevice; + +/** + * Our sample handler extends AbstractHandler, an IHandler base class. + * @see org.eclipse.core.commands.IHandler + * @see org.eclipse.core.commands.AbstractHandler + */ +public class PackageManagerRootstrapHandler extends AbstractHandler { + /** + * The constructor. + */ + public PackageManagerRootstrapHandler() { + } + + /** + * the command has been executed, so extract extract the needed information + * from the application context. + */ + public Object execute(ExecutionEvent event) throws ExecutionException { + + IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event); + IDevice device = ConnectionPlugin.getDefault().getCurrentDevice(); + PackageManager pkgdlg; + String target = null; + boolean enableRootstrap = true; + boolean eanbleTarget = true; + + if (device == null) { + eanbleTarget = false; + } else { + target = device.getSerialNumber(); + if (target == null) { + eanbleTarget = false; + } + } + + IProject project = CurrentEnabledProject.getCurrentProject(); + if (project == null) { + enableRootstrap = false; + } else { + IConfiguration cfg =ManagedBuildManager.getBuildInfo( project ).getDefaultConfiguration(); + IManagedProject managedProject = cfg.getManagedProject(); + String projectArtifactType = managedProject.getProjectType().getBuildArtefactType().getId(); + if (!projectArtifactType.equals(PlatformConfigurationManager.TIZEN_CUSTOM_DEBIAN_ARTIFACT_TYPE) && + !projectArtifactType.equals(PlatformConfigurationManager.OLD_SLP_CUSTOM_DEBIAN_ARTIFACT_TYPE)) { + enableRootstrap = false; + } + } + + pkgdlg = new PackageManager(window.getShell(), target, enableRootstrap, eanbleTarget); + pkgdlg.open(); + return null; + } +} \ No newline at end of file diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PkgModelProvider.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PkgModelProvider.java new file mode 100644 index 0000000..a6f0a4b --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgInstall/PkgModelProvider.java @@ -0,0 +1,215 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.pkgInstall; + +import java.util.concurrent.CopyOnWriteArrayList; + +public enum PkgModelProvider { + + INSTANCE; + + private CopyOnWriteArrayList pkgs; + + private PkgModelProvider() + { + pkgs = new CopyOnWriteArrayList (); + } + + public CopyOnWriteArrayList getPkgs() + { + return pkgs; + } +} + +class Package{ + + public static enum INSTALLINFO + { +// READY, SUCCESSED, FAILED, INSTALLED, NOT_INSTALLED + INSTALLED, NOT_INSTALLED, DIFFERENT_VERSION, NOT_FOUND, NOT_PROPERLY_INSTALLED + } + + public static enum PKGTYPE + { + LOCAL, REMOTE + } + private String target = ""; + private String path = ""; + + private String name = ""; + private String arch1 = ""; + private String arch2 = ""; + private String newVersion1 = ""; + private String newVersion2 = ""; + private String installVersion1 = ""; + private String installVersion2 = ""; + private boolean checkColumn1 = true; + private boolean checkColumn2 = true; + private INSTALLINFO installInfo1 = INSTALLINFO.NOT_INSTALLED; + private INSTALLINFO installInfo2 = INSTALLINFO.NOT_INSTALLED; + private PKGTYPE pkgType = PKGTYPE.LOCAL; + +// private Button check1 = new Button( PackageManager.getTable(), SWT.CHECK ); +// private Button check2 = new Button( PackageManager.getTable(), SWT.CHECK ); + + public PKGTYPE getPkgType() + { + return pkgType; + } + + public void setPkgType( PKGTYPE pkgType ) + { + this.pkgType = pkgType; + } + + public void setArch1(String arch) + { + this.arch1 = arch; + } + + public String getArch1() + { + return arch1; + } + + public void setArch2(String arch) + { + this.arch2 = arch; + } + + public String getArch2() + { + return arch2; + } + + public INSTALLINFO getInstallInfo1() + { + return installInfo1; + } + + public void setInstallInfo1( INSTALLINFO installInfo ) + { + this.installInfo1 = installInfo; + } + + public INSTALLINFO getInstallInfo2() + { + return installInfo2; + } + + public void setInstallInfo2( INSTALLINFO installInfo ) + { + this.installInfo2 = installInfo; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getTarget() { + return target; + } + + public void setTarget(String target) { + this.target = target; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public void setInstalledVersion1(String ver) { + this.installVersion1 = ver; + } + public String getInstalledVersion1() { + return installVersion1; + } + + public void setInstalledVersion2(String ver) { + this.installVersion2 = ver; + } + + public String getInstalledVersion2() { + return installVersion2; + } + + public void setNewVersion1(String ver) { + this.newVersion1 = ver; + } + + public String getNewVersion1() { + return newVersion1; + } + + public void setNewVersion2(String ver) { + this.newVersion2 = ver; + } + + public String getNewVersion2() { + return newVersion2; + } + + public boolean getCheckColumn1() + { + return checkColumn1; + } + + public void setCheckColumn1( boolean check ) + { + this.checkColumn1 = check; + } + + public boolean getCheckColumn2() + { + return checkColumn2; + } + + public void setCheckColumn2( boolean check ) + { + this.checkColumn2 = check; + } + +// public Button getCheck1() +// { +// return check1; +// } +// +// public Button getCheck2() +// { +// return check2; +// } +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/wizards/TizenDebianMainWizardPage.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/wizards/TizenDebianMainWizardPage.java new file mode 100644 index 0000000..4456de3 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/wizards/TizenDebianMainWizardPage.java @@ -0,0 +1,87 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.wizards; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.cdt.ui.wizards.CDTMainWizardPage; +import org.eclipse.cdt.ui.wizards.EntryDescriptor; + + +public class TizenDebianMainWizardPage extends CDTMainWizardPage { + + public TizenDebianMainWizardPage(String pageName) { + super(pageName); + // TODO Auto-generated constructor stub + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public List filterItems(List items) { + List result = new ArrayList(); + + for(Object item:items) { + if(item instanceof EntryDescriptor) { + EntryDescriptor e = (EntryDescriptor)item; + + // remove default empty project + if ( e.getName() != null && e.getName().equals("Empty Project") ) + continue; + + if( e.getId().equals("com.samsung.slp.nativeide.buildArtefactType.cdeb") || + (e.getParentId() != null && e.getParentId().equals("com.samsung.slp.nativeide.buildArtefactType.cdeb")) ) { + result.add(item); + } + + // Deprecated project type + //if(e.getId().equals("com.samsung.slp.buildArtefactType.custom.debian") || + // (e.getParentId() != null && e.getParentId().equals("com.samsung.slp.buildArtefactType.custom.debian") ) ) { + // result.add(item); + //} + } + + } + return result; + } + + @Override + protected boolean validatePage() { + // TODO Auto-generated method stub + boolean result = super.validatePage(); + + if(result == true && super.getMessage() != null) { + if (super.getMessage().equals("Directory with specified name already exists.")) { + super.setMessage(null); + } + } + + return result; + } +} diff --git a/org.tizen.nativeplatform/src/org/tizen/nativeplatform/wizards/TizenDebianProjectWizard.java b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/wizards/TizenDebianProjectWizard.java new file mode 100644 index 0000000..4e6c6e2 --- /dev/null +++ b/org.tizen.nativeplatform/src/org/tizen/nativeplatform/wizards/TizenDebianProjectWizard.java @@ -0,0 +1,96 @@ +/* +* Inhouse +* +* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. +* +* Contact: +* Taejun Ha +* Jiil Hyoun +* Donghyuk Yang +* Hoon Kang +* DongHee Yang +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +* Contributors: +* - S-Core Co., Ltd +* +*/ +package org.tizen.nativeplatform.wizards; + +import org.eclipse.cdt.core.CCProjectNature; +import org.eclipse.cdt.core.CCorePlugin; +import org.eclipse.cdt.core.CProjectNature; +import org.eclipse.cdt.ui.CUIPlugin; +import org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.SubProgressMonitor; +import org.tizen.nativeplatform.build.PlatformConfigurationManager; + + + + +public class TizenDebianProjectWizard extends CDTCommonProjectWizard{ + + public TizenDebianProjectWizard() { + super("Tizen Custom Debian Project", //$NON-NLS-1$ + "Create a Tizen Custom Debian Project project of selected type"); //$NON-NLS-1$ +// WizardConstants.isDebian = true; + } + + @Override + public String[] getNatures() { + return new String[] { CProjectNature.C_NATURE_ID, CCProjectNature.CC_NATURE_ID }; + } + + @Override + protected IProject continueCreation(IProject prj) { + if (continueCreationMonitor == null) { + continueCreationMonitor = new NullProgressMonitor(); + } + + try { + continueCreationMonitor.beginTask("Add C/C++ Project Nature", 1); + CProjectNature.addCNature(prj, new SubProgressMonitor(continueCreationMonitor, 1)); + CCProjectNature.addCCNature(prj, new SubProgressMonitor(continueCreationMonitor, 1)); + } catch (CoreException e) {} + finally {continueCreationMonitor.done();} + return prj; + } + + @Override + public void addPages() { + fMainPage= new TizenDebianMainWizardPage(CUIPlugin.getResourceString("CProjectWizard")); + fMainPage.setTitle("Tizen Custom Debian Project"); + fMainPage.setDescription("Create a Tizen Custom Debian Project project of selected type"); + addPage(fMainPage); + } + + @Override + public String[] getContentTypeIDs() { + return new String[] { CCorePlugin.CONTENT_TYPE_CXXSOURCE, CCorePlugin.CONTENT_TYPE_CXXHEADER }; + } + + @Override + public IProject getProject(boolean defaults, boolean onFinish) { + IProject prj = super.getProject(defaults, onFinish); + + // Marking project version + PlatformConfigurationManager.setProjectVersion( prj, PlatformConfigurationManager.CURRENT_SLP_PROJECT_VERSION ); + + return prj; + } + +} diff --git a/org.tizen.nativeplatform/templates/CustomDebianPackages/EmptyProject/.buildproperties.xml b/org.tizen.nativeplatform/templates/CustomDebianPackages/EmptyProject/.buildproperties.xml new file mode 100644 index 0000000..2dc1f3f --- /dev/null +++ b/org.tizen.nativeplatform/templates/CustomDebianPackages/EmptyProject/.buildproperties.xml @@ -0,0 +1 @@ +${CMAKE_TARGET}capi-application-app_eflcapi-application-app_bundlecapi-base-i18nelementaryecore-xecoreevasedjedlogC-Wall${CMAKE_SOURCE_DIR}/includegO0 \ No newline at end of file diff --git a/org.tizen.nativeplatform/templates/CustomDebianPackages/EmptyProject/template.properties b/org.tizen.nativeplatform/templates/CustomDebianPackages/EmptyProject/template.properties new file mode 100644 index 0000000..7afbfe8 --- /dev/null +++ b/org.tizen.nativeplatform/templates/CustomDebianPackages/EmptyProject/template.properties @@ -0,0 +1,19 @@ +EmptyProject.Ctemplate.label=Empty Debian Project +EmptyProject.Ctemplate.description=Empty Debian Project +EmptyProject.basics.label=Advanced Settings +EmptyProject.basics.description=Advanced properties of a project +EmptyProject.author.label=Author +EmptyProject.author.description=Name of the author +EmptyProject.author.default=Author +EmptyProject.copyright.label=Copyright +EmptyProject.copyright.description=Your copyright notice +EmptyProject.copyright.default=Your copyright notice +EmptyProject.vendor.label=Vendor +EmptyProject.vendor.default=samsung +EmptyProject.vendor.description=Enter your company or organization. +EmptyProject.description.default=Empty Project +EmptyProject.description.description=Enter a description about your application. +EmptyProject.description.label=Description +EmptyProject.e-mail.default=E-mail +EmptyProject.e-mail.description=Enter your email address +EmptyProject.e-mail.label=E-mail diff --git a/org.tizen.nativeplatform/templates/CustomDebianPackages/EmptyProject/template.xml b/org.tizen.nativeplatform/templates/CustomDebianPackages/EmptyProject/template.xml new file mode 100644 index 0000000..e91a503 --- /dev/null +++ b/org.tizen.nativeplatform/templates/CustomDebianPackages/EmptyProject/template.xml @@ -0,0 +1,55 @@ + + diff --git a/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/.buildproperties.xml b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/.buildproperties.xml new file mode 100644 index 0000000..2dc1f3f --- /dev/null +++ b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/.buildproperties.xml @@ -0,0 +1 @@ +${CMAKE_TARGET}capi-application-app_eflcapi-application-app_bundlecapi-base-i18nelementaryecore-xecoreevasedjedlogC-Wall${CMAKE_SOURCE_DIR}/includegO0 \ No newline at end of file diff --git a/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/Makefile b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/Makefile new file mode 100644 index 0000000..f1ce820 --- /dev/null +++ b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/Makefile @@ -0,0 +1,30 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) + +SET(CMAKE_VERBOSE_MAKEFILE "ON") +SET(LIB_DIR "${CMAKE_SOURCE_DIR}/lib") +SET(RESOURCE_DIR "${CMAKE_SOURCE_DIR}/res") +SET(DATA_DIR "${CMAKE_SOURCE_DIR}/data") +SET(DEBIAN_DIR "${CMAKE_SOURCE_DIR}/debian") + +INCLUDE(${CDT_CONFIG_DIR}/CMakeLists.target) + +# FIND ALL SOURCE IN A SOURCE DIRECTORY + + +# INSTALL +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin) +INSTALL(DIRECTORY ${RESOURCE_DIR}/images DESTINATION res) +INSTALL(DIRECTORY ${RESOURCE_DIR}/etc DESTINATION res) +INSTALL(DIRECTORY ${RESOURCE_DIR}/icons DESTINATION res) +INSTALL(DIRECTORY ${LIB_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX}) +INSTALL(DIRECTORY ${DATA_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX}) + +# INSTALL DESKTOP FILE +INSTALL(FILES ${DEBIAN_DIR}/desktop DESTINATION /opt/share/applications RENAME ${PACKAGE_NAME}.desktop) + +# INCLUDE FOR BUILD & INSTALL .EDC FILES +ADD_SUBDIRECTORY(res/edje) + +# INCLUDE FOR BUILD & INSTALL .PO FILES +ADD_SUBDIRECTORY(res/locale) + diff --git a/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/changelog b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/changelog new file mode 100644 index 0000000..8db3a56 --- /dev/null +++ b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/changelog @@ -0,0 +1,5 @@ +com.samsung.hello (1.0.0) unstable; urgency=low + + * Initial Release + + -- Author Fri, 22 Jul 2011 17:32:27 +0900 \ No newline at end of file diff --git a/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/com.samsung.hello.install b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/com.samsung.hello.install new file mode 100644 index 0000000..0b11bef --- /dev/null +++ b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/com.samsung.hello.install @@ -0,0 +1 @@ +/usr/bin \ No newline at end of file diff --git a/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/compat b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/compat new file mode 100644 index 0000000..7813681 --- /dev/null +++ b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/compat @@ -0,0 +1 @@ +5 \ No newline at end of file diff --git a/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/control b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/control new file mode 100644 index 0000000..05ebaa0 --- /dev/null +++ b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/control @@ -0,0 +1,13 @@ +################################################################################# +# THIS FILE IS CREATED AUTOMATICALLY. DO NOT DELETE OR MODIFY THIS FILE. +################################################################################# + +Source: com.samsung.hello +Maintainer: Author +Standards-Version: 1.0.0 + +Package: com.samsung.hello +description: none +Architecture: any +XB-Permission: +XB-RequiredHardware: diff --git a/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/rules b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/rules new file mode 100644 index 0000000..88e033a --- /dev/null +++ b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/debian/rules @@ -0,0 +1,74 @@ +#!/usr/bin/make -f + +CC?=gcc +CFLAGS?= +LDFLAGS?= + +PKGDIR = debian/PKG + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + touch configure-stamp + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + # Add here commands to build the package. + mkdir -p bin + $(CC) $(CFLAGS) $(LDFLAGS) src/hello.c -o bin/hello + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + # Add here commands to clean up before the build process. + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + # Add here commands to install the package. + mkdir -p debian/tmp/usr/bin + cp bin/hello debian/tmp/usr/bin/ + +# Build architecture-independent files here. +binary-indep: build install + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_install --sourcedir=debian/tmp +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl + dh_makeshlibs + dh_installdeb +# dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure \ No newline at end of file diff --git a/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/src/hello.c b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/src/hello.c new file mode 100644 index 0000000..5467927 --- /dev/null +++ b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/src/hello.c @@ -0,0 +1,8 @@ +#include + +int main(int argc, char *argv[]) +{ + printf("Hello World!"); + return 0; +} + diff --git a/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/template.properties b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/template.properties new file mode 100644 index 0000000..d47d18a --- /dev/null +++ b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/template.properties @@ -0,0 +1,19 @@ +HelloWorldProject.Ctemplate.label=Hello World Project +HelloWorldProject.Ctemplate.description=Hello World Project +HelloWorldProject.basics.label=Advanced Settings +HelloWorldProject.basics.description=Advanced properties of a project +HelloWorldProject.author.label=Author +HelloWorldProject.author.description=Name of the author +HelloWorldProject.author.default=Author +HelloWorldProject.copyright.label=Copyright +HelloWorldProject.copyright.description=Your copyright notice +HelloWorldProject.copyright.default=Your copyright notice +HelloWorldProject.vendor.label=Vendor +HelloWorldProject.vendor.default=samsung +HelloWorldProject.vendor.description=Enter your company or organization. +HelloWorldProject.description.default=Hello World Project +HelloWorldProject.description.description=Enter a description about your application. +HelloWorldProject.description.label=Description +HelloWorldProject.e-mail.default=E-mail +HelloWorldProject.e-mail.description=Enter your email address +HelloWorldProject.e-mail.label=E-mail diff --git a/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/template.xml b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/template.xml new file mode 100644 index 0000000..8e42f4c --- /dev/null +++ b/org.tizen.nativeplatform/templates/CustomDebianPackages/HelloWorldProject/template.xml @@ -0,0 +1,95 @@ + + diff --git a/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/EmptyProject/.buildproperties.xml b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/EmptyProject/.buildproperties.xml new file mode 100644 index 0000000..2dc1f3f --- /dev/null +++ b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/EmptyProject/.buildproperties.xml @@ -0,0 +1 @@ +${CMAKE_TARGET}capi-application-app_eflcapi-application-app_bundlecapi-base-i18nelementaryecore-xecoreevasedjedlogC-Wall${CMAKE_SOURCE_DIR}/includegO0 \ No newline at end of file diff --git a/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/EmptyProject/template.properties b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/EmptyProject/template.properties new file mode 100644 index 0000000..7afbfe8 --- /dev/null +++ b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/EmptyProject/template.properties @@ -0,0 +1,19 @@ +EmptyProject.Ctemplate.label=Empty Debian Project +EmptyProject.Ctemplate.description=Empty Debian Project +EmptyProject.basics.label=Advanced Settings +EmptyProject.basics.description=Advanced properties of a project +EmptyProject.author.label=Author +EmptyProject.author.description=Name of the author +EmptyProject.author.default=Author +EmptyProject.copyright.label=Copyright +EmptyProject.copyright.description=Your copyright notice +EmptyProject.copyright.default=Your copyright notice +EmptyProject.vendor.label=Vendor +EmptyProject.vendor.default=samsung +EmptyProject.vendor.description=Enter your company or organization. +EmptyProject.description.default=Empty Project +EmptyProject.description.description=Enter a description about your application. +EmptyProject.description.label=Description +EmptyProject.e-mail.default=E-mail +EmptyProject.e-mail.description=Enter your email address +EmptyProject.e-mail.label=E-mail diff --git a/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/EmptyProject/template.xml b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/EmptyProject/template.xml new file mode 100644 index 0000000..e91a503 --- /dev/null +++ b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/EmptyProject/template.xml @@ -0,0 +1,55 @@ + + diff --git a/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/.buildproperties.xml b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/.buildproperties.xml new file mode 100644 index 0000000..2dc1f3f --- /dev/null +++ b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/.buildproperties.xml @@ -0,0 +1 @@ +${CMAKE_TARGET}capi-application-app_eflcapi-application-app_bundlecapi-base-i18nelementaryecore-xecoreevasedjedlogC-Wall${CMAKE_SOURCE_DIR}/includegO0 \ No newline at end of file diff --git a/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/Makefile b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/Makefile new file mode 100644 index 0000000..f1ce820 --- /dev/null +++ b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/Makefile @@ -0,0 +1,30 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) + +SET(CMAKE_VERBOSE_MAKEFILE "ON") +SET(LIB_DIR "${CMAKE_SOURCE_DIR}/lib") +SET(RESOURCE_DIR "${CMAKE_SOURCE_DIR}/res") +SET(DATA_DIR "${CMAKE_SOURCE_DIR}/data") +SET(DEBIAN_DIR "${CMAKE_SOURCE_DIR}/debian") + +INCLUDE(${CDT_CONFIG_DIR}/CMakeLists.target) + +# FIND ALL SOURCE IN A SOURCE DIRECTORY + + +# INSTALL +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin) +INSTALL(DIRECTORY ${RESOURCE_DIR}/images DESTINATION res) +INSTALL(DIRECTORY ${RESOURCE_DIR}/etc DESTINATION res) +INSTALL(DIRECTORY ${RESOURCE_DIR}/icons DESTINATION res) +INSTALL(DIRECTORY ${LIB_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX}) +INSTALL(DIRECTORY ${DATA_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX}) + +# INSTALL DESKTOP FILE +INSTALL(FILES ${DEBIAN_DIR}/desktop DESTINATION /opt/share/applications RENAME ${PACKAGE_NAME}.desktop) + +# INCLUDE FOR BUILD & INSTALL .EDC FILES +ADD_SUBDIRECTORY(res/edje) + +# INCLUDE FOR BUILD & INSTALL .PO FILES +ADD_SUBDIRECTORY(res/locale) + diff --git a/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/changelog b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/changelog new file mode 100644 index 0000000..8db3a56 --- /dev/null +++ b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/changelog @@ -0,0 +1,5 @@ +com.samsung.hello (1.0.0) unstable; urgency=low + + * Initial Release + + -- Author Fri, 22 Jul 2011 17:32:27 +0900 \ No newline at end of file diff --git a/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/com.samsung.hello.install b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/com.samsung.hello.install new file mode 100644 index 0000000..0b11bef --- /dev/null +++ b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/com.samsung.hello.install @@ -0,0 +1 @@ +/usr/bin \ No newline at end of file diff --git a/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/compat b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/compat new file mode 100644 index 0000000..7813681 --- /dev/null +++ b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/compat @@ -0,0 +1 @@ +5 \ No newline at end of file diff --git a/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/control b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/control new file mode 100644 index 0000000..05ebaa0 --- /dev/null +++ b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/control @@ -0,0 +1,13 @@ +################################################################################# +# THIS FILE IS CREATED AUTOMATICALLY. DO NOT DELETE OR MODIFY THIS FILE. +################################################################################# + +Source: com.samsung.hello +Maintainer: Author +Standards-Version: 1.0.0 + +Package: com.samsung.hello +description: none +Architecture: any +XB-Permission: +XB-RequiredHardware: diff --git a/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/rules b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/rules new file mode 100644 index 0000000..88e033a --- /dev/null +++ b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/debian/rules @@ -0,0 +1,74 @@ +#!/usr/bin/make -f + +CC?=gcc +CFLAGS?= +LDFLAGS?= + +PKGDIR = debian/PKG + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + touch configure-stamp + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + # Add here commands to build the package. + mkdir -p bin + $(CC) $(CFLAGS) $(LDFLAGS) src/hello.c -o bin/hello + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + # Add here commands to clean up before the build process. + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + # Add here commands to install the package. + mkdir -p debian/tmp/usr/bin + cp bin/hello debian/tmp/usr/bin/ + +# Build architecture-independent files here. +binary-indep: build install + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_install --sourcedir=debian/tmp +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl + dh_makeshlibs + dh_installdeb +# dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure \ No newline at end of file diff --git a/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/src/hello.c b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/src/hello.c new file mode 100644 index 0000000..5467927 --- /dev/null +++ b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/src/hello.c @@ -0,0 +1,8 @@ +#include + +int main(int argc, char *argv[]) +{ + printf("Hello World!"); + return 0; +} + diff --git a/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/template.properties b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/template.properties new file mode 100644 index 0000000..d47d18a --- /dev/null +++ b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/template.properties @@ -0,0 +1,19 @@ +HelloWorldProject.Ctemplate.label=Hello World Project +HelloWorldProject.Ctemplate.description=Hello World Project +HelloWorldProject.basics.label=Advanced Settings +HelloWorldProject.basics.description=Advanced properties of a project +HelloWorldProject.author.label=Author +HelloWorldProject.author.description=Name of the author +HelloWorldProject.author.default=Author +HelloWorldProject.copyright.label=Copyright +HelloWorldProject.copyright.description=Your copyright notice +HelloWorldProject.copyright.default=Your copyright notice +HelloWorldProject.vendor.label=Vendor +HelloWorldProject.vendor.default=samsung +HelloWorldProject.vendor.description=Enter your company or organization. +HelloWorldProject.description.default=Hello World Project +HelloWorldProject.description.description=Enter a description about your application. +HelloWorldProject.description.label=Description +HelloWorldProject.e-mail.default=E-mail +HelloWorldProject.e-mail.description=Enter your email address +HelloWorldProject.e-mail.label=E-mail diff --git a/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/template.xml b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/template.xml new file mode 100644 index 0000000..8e42f4c --- /dev/null +++ b/org.tizen.nativeplatform/templates/InhouseFrameworkPackages/HelloWorldProject/template.xml @@ -0,0 +1,95 @@ + + diff --git a/package/build.linux b/package/build.linux new file mode 100755 index 0000000..741790c --- /dev/null +++ b/package/build.linux @@ -0,0 +1,292 @@ +#!/bin/bash -x + +build_path=${SRCDIR}/build_result + +__set_parameter() +{ + build_id=${package_name} + build_type=N + build_result_directory=${build_type}.${build_id} + build_result_path="$build_path/$build_result_directory" + architecture=x86 + ide_root_path_name=IDE + + case ${platform} in + linux) + archive_platform_name=linux + windowing=gtk + ;; + windows) + archive_platform_name=win32 + windowing=win32 + ;; + *) + echo "${platform} is not support yet." + ;; + esac + + result_archive_file=${build_id}-${archive_platform_name}.${windowing}.${architecture}.zip +} + +__set_build_parameter() +{ + case ${platform} in + linux) + reference_ide_path=${ROOTDIR}/indigo-pde/eclipse + ;; + windows) + reference_ide_path=${ROOTDIR}/indigo-winpde/eclipse + ;; + *) + echo "${platform} is not support yet." + ;; + esac +} + +__set_install_parameter() +{ + INSTALL_DIR=${SRCDIR}/package/${package_name}.package.${platform}/data +} + +__clean_build_environment() +{ + if [ -d $build_path ] + then + echo "Build result directory : [$build_path]" + else + echo "Make build result directory [$build_path]" + mkdir -p $build_path + fi + + echo "Remove legacy build files..." + if [ -d ${build_result_path}/${archive_platform_name}.${windowing}.${architecture} ] + then + rm -rf ${build_result_path}/${archive_platform_name}.${windowing}.${architecture} + fi + if [ -e ${build_result_path}/${result_archive_file} ] + then + rm -rf ${build_result_path}/${result_archive_file} + fi + if [ -d ${build_path}/tmp ] + then + rm -rf ${build_path}/tmp + fi + + if [ -d ${build_path}/buildRepo ] + then + rm -rf ${build_path}/buildRepo + fi + + rm -r ${build_path}/*.xml + rm -r ${build_path}/*.properties + rm -r ${build_path}/*.clean + + + if [ -d $build_path/plugins ] + then + echo "plugins directory recreate..." + rm -rf $build_path/plugins + mkdir $build_path/plugins + else + echo "Make plugins directory..." + mkdir $build_path/plugins + fi + if [ -d $build_path/features/ ] + then + echo "features directory recreate..." + rm -rf $build_path/features + mkdir $build_path/features + else + echo "Make features directory..." + mkdir $build_path/features + fi + +} + +__copy_build_sources() +{ + echo "Copy features from $SRCDIR to $build_path/features" + cp -r $SRCDIR/*.feature $build_path/features + + echo "Copy plugins from $SRCDIR to $build_path/plugins" + cp -r $SRCDIR/* $build_path/plugins + rm -rf $build_path/plugins/*.feature +} + +__copy_dependency_plugins() +{ + dependency_plugin_path=${ROOTDIR}/${ide_root_path_name} + if [ -d ${dependency_plugin_path} ] + then + cp -rf ${dependency_plugin_path}/features/* ${build_path}/features/ + cp -rf ${dependency_plugin_path}/plugins/* ${build_path}/plugins/ + fi +} + +__make_ant_build_properties_file() +{ + builder_path="${SRCDIR}/builder" + parent_path_of_based_eclipse=${reference_ide_path}/.. + + echo "Make build.properties file..." + if [ ! -e $builder_path/build.properties.clean ] ; then + echo "ERROR : \"build.properties.clean\" file does not exist..." + exit 1 + fi + cp $builder_path/build.properties.clean $build_path + cp $builder_path/customTargets.xml $build_path + + if [ -d $reference_ide_path ] + then + sed -e "s;\(^buildDirectory=\).*;\1${build_path};g" \ + -e "s;\(^base=\).*;\1${parent_path_of_based_eclipse};g" \ + -e "s;\(^baseLocation=\).*;\1${reference_ide_path};g" \ + -e "s;\(^configs=\).*;\1${archive_platform_name},${windowing},${architecture};g" \ + -e "s;\(^buildType=\).*;\1${build_type};g" \ + -e "s;\(^buildId=\).*;\1${build_id};g" \ + -e "s;\(^archivePrefix=\).*;\1${build_id};g" \ + < $build_path/build.properties.clean > $build_path/build.properties + + else + echo "ERROR : target eclipse is not exist." + exit 1 + fi +} + +__execute_pde_build() +{ + echo "Execute Product Ant Builder..." + equinox_launcher=`echo org.eclipse.equinox.launcher_*.jar` + pde_build=`echo org.eclipse.pde.build_*` + + java -jar ${reference_ide_path}/plugins/$equinox_launcher -application org.eclipse.ant.core.antRunner -buildfile ${reference_ide_path}/plugins/$pde_build/scripts/productBuild/productBuild.xml -Dbuilder=$build_path -Dosgi.locking=none 2>&1 + + if [ $? != 0 ]; + then + echo "Build failed..." + exit 1 + fi +} + +__unzip_plugin_pack() +{ + echo "unzip to $build_result_path" + unzip -a $build_result_path/${result_archive_file} -d $build_result_path/${archive_platform_name}.${windowing}.${architecture} +} + +build_plugins() +{ + case ${platform} in + linux) + echo "build plugin for ${platform}" + ;; + windows) + echo "build plugin for ${platform}" + ;; + *) + echo "${platform} is not support yet." + exit 1 + ;; + esac + + __set_parameter + __set_build_parameter + __clean_build_environment + __copy_build_sources + __copy_dependency_plugins + __make_ant_build_properties_file + __execute_pde_build + __unzip_plugin_pack + + echo "Build SUCCESS. You will find SDK IDE in \"${build_result_path}\"." +} + +__clean_packaging_environment() +{ + + if [ -d ${INSTALL_DIR} ] + then + rm -rf ${INSTALL_DIR} + else + mkdir -p ${INSTALL_DIR} + fi +} + +__copy_necessary_binaries() +{ + echo "add necessary files." + ## ex) cp -rf ~~~~/file.file ${INSTALL_DIR}/${ide_root_path_name}/ +} + +packaging_plugins() +{ + __set_parameter + __set_install_parameter + + __clean_packaging_environment + __copy_necessary_binaries + + install_ide_path=${INSTALL_DIR}/${ide_root_path_name} + + if [ ! -d ${install_ide_path} ] + then + mkdir -p ${install_ide_path} + fi + + cp -rf ${build_result_path}/${archive_platform_name}.${windowing}.${architecture}/${package_name}/* ${install_ide_path}/ +} + +# clean +clean() +{ + echo "=========================================CLEAN============================================" + make clean + rm -rf ${SRCDIR}/*.zip + rm -rf ${SRCDIR}/*.tar.gz + rm -rf ${build_path} +} + +# build +build() +{ + echo "=========================================BUILD============================================" + pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i, Yoonki Park, Taeyoung Son +Description:Nativeplatform plugin + +Package:nativeplatform-eplugin +Version:0.20.14 +OS:windows +Build-host-os:linux +Build-dependency:indigo-winpde [windows], base-ide-product [windows], common-eplugin [windows], nativecommon-eplugin [windows] +Install-dependency:base-ide-product [windows], common-eplugin [windows], nativecommon-eplugin [windows] +Source:nativeplatform-eplugin +Maintainer:Kangho Kim , Yoonki Park, Taeyoung Son +Description:Nativeplatform plugin -- 2.7.4