Difference between pages "Logitech G25 support" and "Old Method of Compiling on Windows"

From VDrift
(Difference between pages)
Jump to: navigation, search
m (16 revisions: Import from old wiki (on 15 May 2012))
 
 
Line 1: Line 1:
 
==Windows==
 
==Windows==
The G25 should be fully supported in Windows without any special steps.
+
In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder.
  
==Linux==
+
===Source and Data===
When initially plugged in, the G25 will be in compatibility mode, which restricts the steering range and disables the clutch pedal and some of the gears on the H-shifter. VDrift includes two tools that can be used to change G25 modes.  Either tool can be used; use whichever tool works the best for you.
+
====VDrift====
If you want to use force feedback, you'll need to patch your kernel because when set to native mode, the G25 change its product id, and this product id is not known yet by the kernel ( have a look here [[Enabling force feedback in kernel]] )
+
Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]].
===usbtool===
+
{{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}}
The tool can be found in VDrift/tools/usbtool-0.1.tar.gz.  The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example) as well as the swig package. Run ./build.sh and then run ./usbtool to see the options available.  To set the wheel to native mode and the range to 900 degrees, run:
 
sudo ./usbtool g25-set-range-wheel-900
 
and
 
sudo ./usbtool g25-set-extended-mode
 
This will likely disconnect the joystick driver.  To reconnect it run:
 
sudo rmmod joydev;sudo rmmod usbhid;sudo modprobe usbhid
 
  
===G25manage===
+
====Boost====
The tool can be found in VDrift/tools/G25manage.  The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example).  Run make to compile the tool, then run:
+
Download a Boost distribution from this link:
sudo ./G25manage --nativemode
 
and
 
sudo ./G25manage --range 900
 
The wheel should now support the entire turning radius as well as the clutch pedal.
 
  
===LTWheelConf===
+
http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861
LTWheelConf is a new tool based on G25manage.
 
https://github.com/TripleSpeeder/LTWheelConf
 
  
===Automatically enable native mode===
+
Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include
If your distribution uses udev (such as Ubuntu), you can put this in /etc/udev/rules.d/90-g25-wheel.rules to automatically run G25manage when the wheel is plugged in:
 
  
SUBSYSTEM!="usb", GOTO="g25_rules_end"
+
====ASIO====
ACTION!="add", GOTO="g25_rules_end"
+
Download the ASIO distribution from this link:
 
ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c294", RUN+="/usr/local/bin/G25manage --nativemode"
 
#ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --range 900"
 
LABEL="g25_rules_end"
 
 
# for a joystick detected by the kernel event interface, with a model name "G25_Racing_Wheel change the permissions on the device file
 
# and add a symlink to the event device file
 
KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", SYMLINK+="input/G25event"
 
KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", MODE="0664", GROUP="games"
 
 
# No deadzone for the wheel on the G25 in native mode
 
KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=0"
 
# No deadzone for the clutch pedal on the G25 in native mode
 
KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=1"
 
# No deadzone for the break pedal on the G25 in native mode
 
KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=2"
 
# No deadzone for the throttle pedal on the G25 in native mode
 
KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=5"
 
  
 +
http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620
  
After creating that file and copying the G25manage binary to /usr/local/bin, run "/etc/init.d/udev reload" (or "service udev reload" on Ubuntu karmic) and you no longer have to manually run G25manage.
+
Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include
  
[[Category:Configuration]]
+
====cURL====
[[Category:Operating Systems:Linux]]
+
Download the cURL source(curl-7.21.4.zip) from this link:
[[Category:Operating Systems:FreeBSD]]
+
 
 +
http://curl.haxx.se/download.html
 +
 
 +
* Uncompress curl.
 +
* Import lib/vc6libcurl.dsp into codeblocks.
 +
* Set vc6libcurl as active project.
 +
* In Build options/Linker Settings delete "DLL-Debug/libcurld_imp and --implib DLL-Debug/libcurld_imp.lib
 +
* Build Win32 DLL Release
 +
* Copy lib/DLL-Release/libcurl.dll to vdrift/tools/win/dll
 +
* Copy include/curl to vdrift/tools/win/include
 +
 
 +
===Install and Configure Build Tools===
 +
{{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}}
 +
 
 +
====MinGW====
 +
 
 +
*  Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32]
 +
* Run the installer.
 +
* When asked to select components for install, you only need the base system and the g++ compiler.
 +
* Choose the default install location.
 +
* Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;).
 +
 
 +
====Building with Code::Blocks====
 +
 
 +
* [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly]
 +
* Open the project file in tools\win\vdrift.cbp and build vdrift.
 +
 
 +
====Building with Scons====
 +
{{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}}
 +
* [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4]
 +
* Run the installer and accept all the defaults.
 +
 
 +
* [http://www.scons.org/ Download SCons 1.20]
 +
* Run the installer. It should find your Python installation, accept all defaults.
 +
* Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;).
 +
 
 +
=====Building with batch script=====
 +
* Open a new CMD prompt by choosing START, RUN, cmd, OK.
 +
* Change directories to the spot where you checked VDrift out.
 +
* Now, to build VDrift, run the command:
 +
tools/win/bin/build_vdrift.bat
 +
 
 +
=====Building with MSYS=====
 +
 
 +
* [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10]
 +
* Run the installer.
 +
* Choose the default install location.
 +
* When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter.
 +
* When asked if MinGW is installed, enter '''C:/MinGW''', then press enter.
 +
* The MSYS post install script should find your MinGW installation now and configure itself.
 +
 
 +
* [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01]
 +
* Run the installer and accept all the defaults.
 +
 
 +
* To build VDrift you must use the MSYS terminal to run the build script.
 +
* Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''.
 +
* Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command:
 +
cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift
 +
* Now, to build VDrift, run the command:
 +
sh tools/win/bin/build_vdrift.sh
 +
 
 +
===Run VDrift===
 +
* Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc.
 +
* Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory.
 +
 
 +
[[Category:Development]]
 +
[[Category:Review]]
 
[[Category:Operating Systems:Windows]]
 
[[Category:Operating Systems:Windows]]
[[Category:Operating Systems:Mac OS X]]
 
[[Category:Expand]]
 

Revision as of 17:17, 24 February 2011

Windows

In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder.

Source and Data

VDrift

Get the VDrift source code and data, either from the latest source release on the VDrift downloads page, or the development version.

Note: From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.

Boost

Download a Boost distribution from this link:

http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861

Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include

ASIO

Download the ASIO distribution from this link:

http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620

Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include

cURL

Download the cURL source(curl-7.21.4.zip) from this link:

http://curl.haxx.se/download.html

  • Uncompress curl.
  • Import lib/vc6libcurl.dsp into codeblocks.
  • Set vc6libcurl as active project.
  • In Build options/Linker Settings delete "DLL-Debug/libcurld_imp and --implib DLL-Debug/libcurld_imp.lib
  • Build Win32 DLL Release
  • Copy lib/DLL-Release/libcurl.dll to vdrift/tools/win/dll
  • Copy include/curl to vdrift/tools/win/include

Install and Configure Build Tools

Note: The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.

MinGW

  • Download latest MinGW or TDM's GCC/mingw32
  • Run the installer.
  • When asked to select components for install, you only need the base system and the g++ compiler.
  • Choose the default install location.
  • Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;).

Building with Code::Blocks

Building with Scons

Note: SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.
  • Download SCons 1.20
  • Run the installer. It should find your Python installation, accept all defaults.
  • Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;).
Building with batch script
  • Open a new CMD prompt by choosing START, RUN, cmd, OK.
  • Change directories to the spot where you checked VDrift out.
  • Now, to build VDrift, run the command:
tools/win/bin/build_vdrift.bat
Building with MSYS
  • Download MSYS 1.0.10
  • Run the installer.
  • Choose the default install location.
  • When presented with a terminal asking if you want to continue with the post-install, type y, then press enter.
  • When asked if MinGW is installed, enter C:/MinGW, then press enter.
  • The MSYS post install script should find your MinGW installation now and configure itself.
  • To build VDrift you must use the MSYS terminal to run the build script.
  • Launch MSYS by clicking Start -> Programs -> MinGW -> MSYS -> msys.
  • Change directories to the spot where you checked VDrift out. If your username is Administrator and you put it on your Desktop in a directory named VDrift, you would enter this command:
cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift
  • Now, to build VDrift, run the command:
sh tools/win/bin/build_vdrift.sh

Run VDrift

  • Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like VDrift/data/cars/, VDrift/data/tracks/, etc.
  • Now, to run VDrift, you just need to double-click on the file vdrift.exe within the root VDrift directory.