D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Filename :
page-windows_md.ri
back
Copy
U:RDoc::TopLevel[ i I"windows.md:ETcRDoc::Parser::Markdowno:RDoc::Markup::Document:@parts[!S:RDoc::Markup::Heading: leveli: textI"Windows;To:RDoc::Markup::Paragraph;[I"<Ruby supports a few native build platforms for Windows.;To:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o;;[I"Kmswin: Build using Microsoft Visual C++ compiler with vcruntimeXXX.dll;To;;0;[o;;[I"Cmingw-msvcrt: Build using compiler for Mingw with msvcrtXX.dll;To;;0;[o;;[I"Jmingw-ucrt: Build using compiler for Mingw with Windows Universal CRT;TS; ; i;I"(Building Ruby using Mingw with UCRT;To;;[I"�The easiest build environment is just a standard {RubyInstaller-Devkit}[https://rubyinstaller.org/] installation and {git-for-windows}[https://gitforwindows.org/]. You might like to use {VSCode}[https://code.visualstudio.com/] as an editor.;TS; ; i;I"Build examples;To;;[I"ORuby core development can be done either in Windows <code>cmd</code> like:;To:RDoc::Markup::Verbatim;[I"ridk enable ucrt64 pacman -S --needed %MINGW_PACKAGE_PREFIX%-openssl %MINGW_PACKAGE_PREFIX%-libyaml %MINGW_PACKAGE_PREFIX%-libffi cd c:\ mkdir work cd work git clone https://github.com/ruby/ruby cd c:\work\ruby sh autogen.sh sh configure -C --disable-install-doc make ;T:@format: batcho;;[I"(or in MSYS2 <code>bash</code> like:;To;;[I"ridk enable ucrt64 bash pacman -S --needed $MINGW_PACKAGE_PREFIX-openssl $MINGW_PACKAGE_PREFIX-libyaml $MINGW_PACKAGE_PREFIX-libffi cd /c/ mkdir work cd work git clone https://github.com/ruby/ruby cd ruby ./autogen.sh ./configure -C --disable-install-doc make ;T;: bashS; ; i;I"#Building Ruby using Visual C++;TS; ; i;I"Requirement;To; ;:NUMBER;[o;;0;[o;;[I"-Windows 10/Windows Server 2016 or later.;Fo;;0;[o;;[I"%Visual C++ 14.0 (2015) or later.;Fo;;[I"J*Note* if you want to build x64 version, use native compiler for x64.;To;;0;[o;;[I"�Please set environment variable <code>INCLUDE</code>, <code>LIB</code>, <code>PATH</code> to run required commands properly from the command line. These are set properly by <code>vcvarall*.bat</code> usually.;Fo;;[I"6*Note* building ruby requires following commands.;To; ;;;[ o;;0;[o;;[I"<code>nmake</code>;To;;0;[o;;[I"<code>cl</code>;To;;0;[o;;[I"<code>ml</code>;To;;0;[o;;[I"<code>lib</code>;To;;0;[o;;[I"<code>dumpbin</code>;To;;0;[ o;;[I"KIf you want to build from GIT source, following commands are required.;Fo; ;;;[o;;0;[o;;[I"<code>git</code>;To;;0;[o;;[I"<code>sed</code>;To;;0;[o;;[I"#<code>ruby</code> 3.0 or later;To;;[I"AYou can use {scoop}[https://scoop.sh/] to install them like:;Fo;;[I" scoop install git sed ruby ;F;;o;;0;[o;;[I"rYou need to install required libraries using {vcpkg}[https://vcpkg.io/] on directory of ruby repository like:;Fo;;[I")vcpkg --triplet x64-windows install ;F;;o;;0;[o;;[I"�Enable Command Extension of your command line. It's the default behavior of <code>cmd.exe</code>. If you want to enable it explicitly, run <code>cmd.exe</code> with <code>/E:ON</code> option.;FS; ; i;I"How to compile and install;To; ;;;[ o;;0;[o;;[I"^Execute <code>win32\configure.bat</code> on your build directory. You can specify the target platform as an argument. For example, run <code>configure --target=i686-mswin32</code>. You can also specify the install directory. For example, run <code>configure --prefix=<install_directory></code>. Default of the install directory is <code>/usr</code> .;Fo;;0;[o;;[I"�If you want to append to the executable and DLL file names, specify <code>--program-prefix</code> and <code>--program-suffix</code>, like <code>win32\configure.bat --program-suffix=-$(MAJOR)$(MINOR)</code>.;Fo;;[I"�Also, the <code>--install-name</code> and <code>--so-name</code> options specify the exact base names of the executable and DLL files, respectively, like <code>win32\configure.bat --install-name=$(RUBY_BASE_NAME)-$(MAJOR)$(MINOR)</code>.;Fo;;[I" By default, the name for the executable without a console window is generated from the <em>RUBY_INSTALL_NAME</em> specified as above by replacing <code>ruby</code> with <code>rubyw</code>. If you want to make it different more, modify <em>RUBYW_INSTALL_NAME</em> directly in the Makefile.;Fo;;0;[o;;[I"�You need specify vcpkg directory to use <code>--with-opt-dir</code> option like <code>win32\configure.bat --with-opt-dir=C:/vcpkg_installed/x64-windows</code>;Fo;;0;[o;;[I"CRun <code>nmake up</code> if you are building from GIT source.;Fo;;0;[o;;[I"Run <code>nmake</code>;Fo;;0;[o;;[I"�Run <code>nmake prepare-vcpkg</code> with administrator privilege if you need to copy vcpkg installed libraries like <code>libssl-3-x64.dll</code> to the build directory.;Fo;;0;[o;;[I"!Run <code>nmake check</code>;Fo;;0;[o;;[I"#Run <code>nmake install</code>;FS; ; i;I"Build examples;To; ;;;[ o;;0;[o;;[I"(Build on the ruby source directory.;Fo;;[I"jruby source directory: C:\ruby build directory: C:\ruby install directory: C:\usr\local ;F;0o;;[I"UC: cd \ruby win32\configure --prefix=/usr/local nmake nmake check nmake install ;F;;o;;0;[o;;[I"DBuild on the relative directory from the ruby source directory.;Fo;;[I"rruby source directory: C:\ruby build directory: C:\ruby\mswin32 install directory: C:\usr\local ;F;0o;;[I"qC: cd \ruby mkdir mswin32 cd mswin32 ..\win32\configure --prefix=/usr/local nmake nmake check nmake install ;F;;o;;0;[o;;[I""Build on the different drive.;Fo;;[I"truby source directory: C:\src\ruby build directory: D:\build\ruby install directory: C:\usr\local ;F;0o;;[I"tD: cd D:\build\ruby C:\src\ruby\win32\configure --prefix=/usr/local nmake nmake check nmake install DESTDIR=C: ;F;;o;;0;[o;;[I":Build x64 version (requires native x64 VC++ compiler);Fo;;[I"jruby source directory: C:\ruby build directory: C:\ruby install directory: C:\usr\local ;F;0o;;[I"jC: cd \ruby win32\configure --prefix=/usr/local --target=x64-mswin64 nmake nmake check nmake install ;F;;S; ; i;I" Bugs;To;;[I"�You can *NOT* use a path name that contains any white space characters as the ruby source directory, this restriction comes from the behavior of <code>!INCLUDE</code> directives of <code>NMAKE</code>.;To;;[I"�You can build ruby in any directory including the source directory, except <code>win32</code> directory in the source directory. This is restriction originating in the path search method of <code>NMAKE</code>.;TS; ; i;I"Dependency management;To;;[I"SRuby uses {vcpkg}[https://vcpkg.io/] to manage dependencies on mswin platform.;To;;[I"BYou can update and install it under the build directory like:;To;;[I"tnmake update-vcpkg # Update baseline version of vcpkg nmake install-vcpkg # Install vcpkg from build directory ;T;;S; ; i;I" Icons;To;;[I"�Any icon files(<code>*.ico</code>) in the build directory, directories specified with _icondirs_ make variable and <code>win32</code> directory under the ruby source directory will be included in DLL or executable files, according to their base names. $(RUBY_INSTALL_NAME).ico or ruby.ico --> $(RUBY_INSTALL_NAME).exe $(RUBYW_INSTALL_NAME).ico or rubyw.ico --> $(RUBYW_INSTALL_NAME).exe the others --> $(RUBY_SO_NAME).dll;To;;[I"Although no icons are distributed with the ruby source, you can use anything you like. You will be able to find many images by search engines. For example, followings are made from {Ruby logo kit}[https://cache.ruby-lang.org/pub/misc/logo/ruby-logo-kit.zip]:;To; ;;;[o;;0;[o;;[I"PSmall {favicon}[https://www.ruby-lang.org/favicon.ico] in the official site;Fo;;0;[o;;[I"|{vit-ruby.ico}[http://ruby.morphball.net/vit-ruby-ico_en.html] or {icon itself}[http://ruby.morphball.net/icon/vit-ruby.ico];T: @file@:0@omit_headings_from_table_of_contents_below0