Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Saturday, November 29, 2014

Creating Windows Recovery Partition with AOMEI OneKey

Preconditions
 Installed Windows
 System Reserved partition is available

Steps
1. Install AOMEI OneKey backup
2. Run it and create recovery partition
3. Add a letter to the system reserved partition (one created during windows installation) - for example X:
4. Run command prompt as administrator and type the following commands:


bcdboot c:\windows /s x:
bcdedit /set {3940e26a-75e7-11e4-bfda-88dcdc879809} device partition=X:

where {3940e26a-75e7-11e4-bfda-88dcdc879809} is identifier of AOMEI entry (you can check it with bcdedit without parameters)

5. Move okldr.mbr, okcf.lst and okldr from C:'s root to X:'s
6. Remove letter from system reserved partition
7. (Optional) Test recovery

Note: When you run OneKey to recover, it will restore boot manager to the state when it was run i.e. AOMEI boot entry will point to C: - just repeat steps 3-6.

This covers the case when OS partition is formatted or essential files are deleted which in standard way won't work because AOMEI boot files are on OS partition..

Saturday, November 2, 2013

How to setup Phalcon framework under Windows 8 for PHP 5.5 and Netbeans

Compiling PHP extension

  1. Download and install Microsoft Visual Studio Express 2012. Microsoft removed it from downloads - for the moment you can find it at Softpedia .
  2. Create the folder C:\php-sdk
  3. Unpack the binary-tools archive (php-sdk-binary-tools-20110915.zip) into this directory, there should be one sub-directory called bin and one called script
  4. Open VS2012 x86 Native Tools Command Prompt (it's available from the start menu group)
  5. Execute the following commands:
    cd c:\php-sdk\
    bin\phpsdk_setvars.bat
    bin\phpsdk_buildtree.bat php
    
  6. Create C:\php-sdk\php\vc11 directory and copy content from vc9 one
  7. Extract PHP source code for Windows (you can download it from http://windows.php.net/downloads/releases/) in C:\php-sdk\php\vc11\x86
  8. Download  libraries required to build PHP and extract them in C:\php-sdk\php\vc11\x86\deps
  9. Create directory C:\php-sdk\php\vc11\x86\php\ext\phalcon 
  10. Download Phalcon source from Github
  11. Copy files from Phalcon source build\32bits directory in C:\php-sdk\php\vc11\x86\php\ext\phalcon 
  12. Run following commands:
    cd C:\php-sdk\php\vc11\x86\php
    buildconf
    configure --disable-all --enable-cli --enable-phalcon=shared
    nmake
    
  13. The php_phalcon.dll after the compilation is located in C:\php-sdk\php\vc11\x86\Release_TS\
Note: Above steps are based on https://wiki.php.net/internals/windows/stepbystepbuild and http://internals.phalconphp.com/en/latest/reference/compilation.html . They are for building 32-bit version of extension . Precompiled version for PHP 5.5.5 is here .

Enable Phalcon extension

In php.ini add following:
extension=php_phalcon.dll

Configure code completion for Netbeans

  1. Download Phalcon Developer Tools . How to setup them is described in documentation 
  2. In ide directory there is gen-stubs.php script. You have to point 'CPHALCON_DIR' to where your extracted phalcon source is, then run:
    php ide/gen-stubs.php
    This will create ide subdirectory in which you will find directory with your Phalcon version as name. In latter there is Phalcon subdirectory - copy it in your Netbeans php\phpstubs\phpruntime directory. Now you will have code completion for Phalcon.