How to Build
How to build and deploy Dexter
1. Prerequisites
- Install JDK: over 7 update 40
- install Gradle: over 2.5
- install NodeJs: over 0.12.1
- download and unzip Eclipse RCP/RAP version : over Juno(4.2)
- We will import and build Dexter Projects with the Eclipse
- download Dexter source codes: https://github.com/Samsung/Dexter
(*) I downloaded D:/DEV/Dexter Folder Description
folderdescriptionetc.project/common-lib common libraries that used in build, but they can't find in Maven Central Repository jar project/dexter.daemon.feature.32 to use create daemon.exe module for 32 bit machine java, eclipse project/dexter.daemon.feature.64 to use create daemon.exe module for 64 bit machine java, eclipse project/dexter-core core module: main entities, logic, static analysis plugins management, utilities java, eclipse project/dexter-cppcheck static analysis plug-in for Cppcheck java, eclipse project/dexter-daemon eclipse product module for Dexter Daemon. includes product and brand information java, eclipse project/dexter-eclipse eclipse plug-in module for Eclipse itself. java, eclipse project/dexter-eclipse-help help module for Eclipse itself for Dexter java, eclipse project/dexter-eclipse-ui common ui module for Dexter Eclipse or Dexter Daemon: login dialog, etc. java, eclipse project/dexter-executor static analysis module. it analyze files with static analysis plug-ins. includes Dexter CLI module java, eclipse project/dexter-findbugs static analysis plug-in for FIndbugs java, eclipse project/dexter-metrics common software metrics module: loc, cyclomatic complexity, class/method count, etc. java, eclipse project/dexter-server WEB server and WEB API module: connect to Dexter Database javascript, nodejs project/license license list that Dexter used N/A project/script Script Group - Dexter database creation or deletion - macro file for Source Insight *.sql, *.em
2. Import Dexter Projects into Eclipse
- open a console, then move to Dexter/project folder, then type 'gradle build' command
- it will download libraries that we need
- edit 'eclipse.ini' file in your eclipse folder
- --launcher.XXMaxPermSize256M
- --Xmx1024m
- run eclipse
- change encoding to 'UTF-8': top menu > Preferences > General > Workspace
- if you want to test a clean eclipse rcp, you can add target platform in Preferences (optional)
- click 'Import' menu on the Package Explorer View.
- select 'Existing Projects into Workspace" item
- select your project folder that you downloaded: (* in my case: D:/DEV/project)
- check projects that you will use (except dexter-server project)
- click 'Finish' button
3. Build Dexter CLI
- open dexter-executor project
- select 'build-install.xml file, then 'Run As' and 'Ant Build'
- if build is fine, you will see the "Build SUCCESSFUL" message on the Console view
- then there will be 'dexter-cli_#.#.#_osbit.zip' file under the 'dexter-executor/install' folder
- you can use the zip file for Dexter CLI (refer to "Dexter CLI Guide")
- also same file is copied to 'dexter-daemon/src/resource/dexter-cli.zip' file
4. Build Dexter Daemon for Source Insight
- open 'dexter-daemon' project, then open 'dexter-daemon.product' file
- then click "Eclipse Product export wizard" link on the Exporting tab
- fill the form
- Root directory : dexter-daemon (* it can be folder name)
- Directory : export folder (*in my case, D:/DEV/export/0.9.0)
- then click 'Finish' button
- you can run 'dexter.exe' file the export folder. (* in my case, C:/DEV/export/0.9.0/dexter-daemon)
- login dialog will be shown. if not, you can click 'blue water drop' icon for that
- if you don't have Dexter Server yet, click 'Run in Standalong mode' checkbox
- run Source Insight
- open 'Base' project
- add 'project/script/dexter.em' file into 'Base' project
- now, reopen your project that you are working on
- after editing and saving a source file and if there is defects, you can see the error mark.
5. Build Dexter Eclipse Plug-ins
- create feature project on your eclipse
- open and edit 'feature.xml' file, then click the ''
- click 'Update Site Project' on the "Publishing' tab
- then check 'Generate a web page listing all available features within the site'
- open 'dexter.eclipse.update.64' or 32 project
- open 'site.xml' file
- add "new category' and 'feature' that you already created
- then, click 'Build All' button
- now you have folders and files for eclipse update site
- you can make your own eclipse update site or just copy plugins folder to your eclipse
- copy all folders and files into your web server, if you have
- run your eclipse, then click menu for update: Help > Install New Software... > click 'Add' button
(* I made my own update site) - then update
- now login like Dexter Daemon version
- enjoy it ~
6. Build Dexter Plugins for Eclipse CDT and Tizen SDK
Eclipse IDE for C/C++ and Tizen SDK has already CDT plugins, so that you have to change the setting for CDT plugins.
Your target platform (Window > Preferences > Plug-in Development > Target Platform) should has CDT plug-ins.
For instance, you can download Eclipse IDE for C/C++ and RCP, then add it as an Target Platform.
(1) in dexter-core plug-in
- open the MANIFEST.MF file in META-INF folder
- remove org.eclipse.cdt.* packages on Exported Packages section on Runtime tab
- remove lib/org.eclipse.cdt.core_5.9.1.201502131403.jar file on Classpath section on Runtime tab
(2) in dexter-core, dexter-cppcheck, dexter-eclipse-cdt, dexter-metrics, dexter-vd-cpp plug-ins
- open the MANIFEST.MF file in META-INF folder for each plug-ins.
- add org.eclipse.cdt.core plugin into Required Plug-ins section on Dependencies tab.
- click [Properties] button, then remove version.
(3) in dexter.eclipse.cpp.feature.32/64, dexter.tizen.sdk.feature.32/64
- open feature.xml file
- only following plug-ins should be [Plug-ins and Fragments] section on Included Plug-ins
- mandatory: dexter-core, dexter-cppcheck, dexter-eclipse, dexter-eclipse-cdt, dexter-eclipse-help, dexter-eclipse-ui, dexter-executor, dexter-metrics,
- optional : dexter-opensource, dexter-vd-cpp
- must not be there(only for java version) : dexter-eclipse-jdt, dexter-findbugs
, multiple selections available,