PHP PORTABLE IDE: Notepad++
US PHP IDE : Introduction | Notepad++ | Install PHP | NppExec Config | PHP extensions | Run Menu | XDebug 1 | Debugging 1 | XDebug 2 | Debugging 2
|
|
Uniform Server Portable PHP IDE. |
Installing Notepad++, NppExec plugin and DBGP plugin
Core component of this portable PHP IDE is Notepad++ it is inherently portable this page shows how to install it for both portable and USB use.
It also covers installing plugins NppExec and DBGp. Plugin NppExec is required for running PHP scripts it installs an integrated console window allowing commands to be entered and display output from PHP CLI scripts. Plugin DBGp interfaces to the PHP XDebug extension allowing debugging of PHP scripts.
Although Notepad++ is relatively small for a plugin it is larger than we require hence the basic core is extracted and only plugins mentioned above are used. This results in a smaller compact IDE.
Preparation
Create two new folders
On C drive create two new folders
- Step 1) Create folder c:\us_portable_ide
- Step 2) Create folder c:\us_portable_ide_temp
These can be named whatever you like. Our portable IDE will be created in folder us_portable_ide. To save space folder us_portable_ide_temp can be deleted on completion.
Download and extract Notepad++
Download latest version (npp.5.8.4.bin.zip) of Notepad++ from SourceForge or from notepad-plus-plus.org.
Save downloaded file to folder c:\us_portable_ide_temp (or whatever you named it) Right click on file (npp.5.8.4.bin.zip) and select Extract all files, no need to change path. After extraction you will find two versions of notepadpp ansi and Unicode contained in the following folders:
The “ansi” version is older and will eventually be phased out hence always use newer “Unicode” version. Step 3)
|
Delete unwanted folders and files
Default Notepad++ size is around 10.0 MB we want to reduce this by removing unwanted folders and files as follows:
- Navigate to folder C:\us_portable_ide
- Delete folder C:\us_portable_ide\updater
- Delete folder C:\us_portable_ide\themes
- Delete folder C:\us_portable_ide\localization
- Navigate to folder C:\us_portable_ide\unicode\plugins
- Delete all files in this folder (ComparePlugin.dll,NppExport.dll,NppFTP.dll,NppTextFX.dll,PluginManager.dll and SpellChecker.dll)
- Delete folder C:\us_portable_ide\unicode\plugins\doc
- Delete folder C:\us_portable_ide\unicode\plugins\Config\tidy
- Navigate to folder C:\us_portable_ide
- Delete folowing files:
- change.log
- NppHelp.chm
- readme.txt
Note 1: This IDE is going to be published hence license.txt is retained and any other licences.
Note 2: Notepad++ size is now around 3.14 MB I think you will agree a significant decrease.
Running Notepad++
We want a portable development environment to achieve this we use a batch file to start Notepad++. Advantage of this it allows start-up parameters to be passed.
Create batch file start_notepad.bat
|
start unicode\notepad++.exe -multiInst -nosession |
Test:
|
Note: Parameters passed
|
New files created
Running Notepad++ create the followig new files:
- config.xml - This instances configuration, tracks user configuration changes
- langs.xml - Default language English
- shortcuts.xml - Contains default entries for Run drop-down menu (We change these later)
Install plugins
Install NppExec plugin
This plugin is required to run our PHP scripts displaying the results in an integrated console window. We will configure this plugin latter.
Dowload:
Download the latest version of NppExec from SourceForge using the following link http://sourceforge.net/projects/npp-plugins/files/NppExec/
Install:
- Close Notepad++
- Download the zip file NppExec_041_dll_Unicode.zip or newer and save to folder C:\us_portable_ide_temp
- Right click on NppExec_041_dll_Unicode.zip and select Extract all files.
- Navigate to folder C:\us_portable_ide_temp\NppExec_041_dll_Unicode
- Copy file NppExec.dll to folder C:\us_portable_ide\unicode\plugins
Install DBGP Plugin
This plugin interfaces to the PHP XDebug module. It allows both PHP CLI and PHP web pages to be debugged. Installs an integrated user interface (window). We will configure this plugin latter.
Dowload:
Download the latest version of NppExec from SourceForge using the following link http://sourceforge.net/projects/npp-plugins/files/DBGP%20Plugin/
Install:
- Close Notepad++
- Download the zip file DBGpPlugin_0_12b_dll.zip or newer and save to folder C:\us_portable_ide_temp
- Right click on DBGpPlugin_0_12b_dll.zip Extract all files.
- Navigate to folder C:\us_portable_ide_temp\DBGpPlugin_0_12b_dll
- Copy file dbgpPlugin.dll to folder C:\us_portable_ide\unicode\plugins
Test
At this stage all that’s required is to check both plugins are installed
|
Summary
That completes installation of Notepad++ along with its plugins. Interestingly the size is relatively small around 5.0 MB.
We want an independent portable PHP CLI IDE environment. This requires installing a version of PHP next page covers installing PHP