John's Computer Journal: programming
Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Wednesday, April 25, 2007

MinGW and mSYS on Vista

MinGW doesn't work well on Vista without adding some extra environment variables. The following environment variables will allow gcc to find its sub programs, the standard include paths and libraries when linking.

MinGW Variables

GCC_EXEC_PREFIX=c:\mingw
PATH=%GCC_EXEC_PREFIX%\libexec\gcc\mingw32\3.4.2;%PATH%
PATH=c:\mingw\bin;%PATH%
MinGW must be installed to the root directory. For example c:\tools\mingw will not work. It must be c:\mingw.

mSYS Variables

PATH=c:\msys\1.0\bin;%PATH%
HOME=%HOMEPATH%
Vista will force a User Access Control (UAC) message to elevate privileges whenever it detects a program with the words setup, install, or patch in the filename or description. However when a program is run from the command line, Vista will not bring up the (UAC) message and just deny access to the executable. To get around the problem make sure to work with elevated privileges when performing a make install or when patching.

Refferences

Thursday, February 15, 2007

Portable GVIM with Cream

The following steps can be taken to create a portable GVIM with the Cream configuration.

Download

Setup

  1. Extract the GVIM portable into a folder.
  2. Create a folder in the GVimPortable\App\vim\vim71directory called cream.
  3. Extract the Cream source files into the folder created in the previous step.
  4. Create a batch file in the same folder as the GVimPortable executable with the following information:
    @echo off
    set location=%~d0%~p0
    start "" "%location%\GVimPortable.exe" -u "%location%\App\vim\vim71\cream\creamrc" -i "%location%\Data\settings\.viminfo" -U NONE "--servername" "CREAM" "%*"

Note

  • This tutorial was originally written for vim70 and a version of cream older than 4.0 but has since been updated to work with vim71 and cream 4.0.
  • For future versions, change the paths to correctly reflect the vim version and modify the start line of the batch file as needed.. The correct start line can be derived from inspecting the line after the :RUNCREAM label within the cream.bat file located within the cream source files.