Difference between revisions of "How to run OpenKore"

From OpenKore Wiki
Jump to navigation Jump to search
(16 intermediate revisions by 7 users not shown)
Line 12: Line 12:
 
* MacOS X
 
* MacOS X
 
* Solaris 8  
 
* Solaris 8  
* Windows 2000, XP, 2003
+
* Windows 10, 8.1, 8, 7, 2003, XP, 2000
  
 +
It also does work on 64bit linux systems, e.g. Arch 64.
 +
 +
== Quick start ==
 +
Guides in this section assume you have default OS installations.
 +
 +
=== Windows ===
 +
* Run <code>start.exe</code> or <code>wxstart.exe</code> (starts with Wx GUI) or <code>openkore.pl</code> (requires [[How_to_run_OpenKore#Perl|perl interpreter]].
 +
 +
=== OS X ===
 +
''Version 10.8.2''
 +
* [https://appleid.apple.com/ Get Apple ID] if you don't have one ''(only needed to download Command Line Tools for Xcode from Apple's own website)''.
 +
* Become [https://developer.apple.com/downloads/index.action Apple developer] ''(only needed to download Command Line Tools for Xcode from Apple's own website)''.
 +
* Install [https://developer.apple.com/downloads/ Command Line Tools for Xcode].
 +
* Install [https://github.com/Homebrew/brew/ Homebrew]. Run <code>brew doctor</code> etc if Homebrew asks for it and deal with it.
 +
* Install readline by running <code>brew install readline</code>.
 +
* Run <code>openkore.pl</code>.
  
 
== Requirements ==
 
== Requirements ==
Line 20: Line 36:
 
=== C/C++ compiler ===
 
=== C/C++ compiler ===
 
----
 
----
You must have a C and C++ compiler installed. GCC is installed by default on many Linux distributions, but apparently some people install Linux without GCC.
+
You must have a C and C++ compiler installed (this is only required to compile XSTools). GCC is installed by default on many Linux distributions, but apparently some people install Linux without GCC.
  
 
To check whether you have a C++ compiler installed, open a terminal and type:
 
To check whether you have a C++ compiler installed, open a terminal and type:
Line 43: Line 59:
 
|align=center|Debian
 
|align=center|Debian
 
|Open a terminal and type:
 
|Open a terminal and type:
  su -c 'apt-get install g++'
+
  su -c 'apt-get install build-essential g++'
 
|-
 
|-
 
|align=center|(Open)Suse
 
|align=center|(Open)Suse
 
|Open a terminal and type:  
 
|Open a terminal and type:  
 
  su -c 'yast -i gcc-c++'
 
  su -c 'yast -i gcc-c++'
 +
|-
 +
|align=center|Arch
 +
|On i686, open a terminal and type:
 +
su -c 'pacman -S base-devel'
 +
or, if you're on x86_64:
 +
su -c 'pacman -S multilib-devel'
 
|-
 
|-
 
|align=center|Other Linux distributions
 
|align=center|Other Linux distributions
Line 53: Line 75:
 
|-
 
|-
 
|align=center|MacOS X
 
|align=center|MacOS X
|Read http://www.tech-recipes.com/mac_system_administration_tips726.html
+
|Install [https://developer.apple.com/downloads/ Command Line Tools for Xcode]
 +
 
 +
Additional information: http://www.tech-recipes.com/mac_system_administration_tips726.html
 
|}
 
|}
 
  
 
=== Perl ===
 
=== Perl ===
 
----
 
----
  
You must have Perl '''5.10.1''' or newer installed. Earlier versions might not be supported! To check whether you have Perl installed (and whether it is the correct version), type:
+
You must have Perl '''5.12''' or newer installed (actually, 5.8.x may work, but kRO serverTypes and some other features won't work). Earlier versions might not be supported! To check whether you have Perl installed (and whether it is the correct version), type:
  
 
  perl -v | grep perl
 
  perl -v | grep perl
  
 
If you see the Perl version number, then it is installed. If you get an error, then it is not installed, and you should read the following table.
 
If you see the Perl version number, then it is installed. If you get an error, then it is not installed, and you should read the following table.
 +
 +
Thread support is needed for default interface to work (otherwise, use Console::Simple interface):
 +
perl -V | grep threads
  
 
{|border="1" cellpadding="2" cellspacing="1"  
 
{|border="1" cellpadding="2" cellspacing="1"  
Line 82: Line 108:
 
|Open a terminal and type:
 
|Open a terminal and type:
 
  su -c 'apt-get install perl-base'
 
  su -c 'apt-get install perl-base'
 +
|-
 +
|align=center|Arch
 +
|Open a terminal and type:
 +
su -c 'pacman -S perl'
 
|-
 
|-
 
|align=center|Other Linux distributions
 
|align=center|Other Linux distributions
Line 95: Line 125:
 
|-
 
|-
 
|align=center|Windows
 
|align=center|Windows
|Install [http://www.activestate.com/activeperl/ ActivePerl]
+
|Install [http://strawberryperl.com/releases.html Strawberry Perl 5.12 x32] or [http://www.activestate.com/activeperl/ ActivePerl]
 
|}
 
|}
  
Line 122: Line 152:
 
|Open a terminal and type:
 
|Open a terminal and type:
 
  su -c 'pkg_add -r p5-Time-HiRes'
 
  su -c 'pkg_add -r p5-Time-HiRes'
 +
|-
 +
|align=center|Arch
 +
|Open a terminal and type:
 +
su -c 'pacman -S perl-time-hires'
 
|-
 
|-
 
|align=center|Other operating systems or Linux distributions
 
|align=center|Other operating systems or Linux distributions
Line 152: Line 186:
 
|align=center|FreeBSD
 
|align=center|FreeBSD
 
|Open a terminal and type:
 
|Open a terminal and type:
  su -c 'pkg_add -r p5-Compress-Zlib
+
  su -c 'pkg_add -r p5-Compress-Zlib'
 +
|-
 +
|align=center|Arch
 +
|Install perl-io-compress from the [https://aur.archlinux.org/packages.php?ID=34517 Arch User Repository].
 
|-
 
|-
 
|align=center|Other operating systems or Linux distributions
 
|align=center|Other operating systems or Linux distributions
Line 162: Line 199:
 
|Install via <code>ppm</code>.
 
|Install via <code>ppm</code>.
 
|}
 
|}
 
  
 
=== GNU readline ===
 
=== GNU readline ===
Line 182: Line 218:
 
  #endif
 
  #endif
  
'''Note.''' The file must end with an empty line)
+
'''Note.''' The file must end with an empty line
  
 
# Save the file as readlinetest.c in your home folder.
 
# Save the file as readlinetest.c in your home folder.
Line 200: Line 236:
 
  su -c 'yum install readline-devel'
 
  su -c 'yum install readline-devel'
 
|-
 
|-
|align=center|Ubuntu
+
|align=center|Debian / Ubuntu 12.04
 
|Open a terminal and type:
 
|Open a terminal and type:
  sudo apt-get install libreadline5-dev
+
  su -c 'apt-get install libreadline5-dev'
 
|-
 
|-
|align=center|Debian
+
|align=center|Ubuntu 14.04
 
|Open a terminal and type:
 
|Open a terminal and type:
  su -c 'apt-get install libreadline5-dev'
+
  sudo apt-get install libreadline6-dev
 +
|-
 +
|align=center|Arch
 +
|Open a terminal and type:
 +
su -c 'pacman -S readline'
 +
|-
 +
|align=center|OS X
 +
|Install [http://braumeister.org/formula/readline readline] with [https://github.com/Homebrew/brew/ brew]:
 +
brew install readline
 
|-
 
|-
 
|align=center|FreeBSD
 
|align=center|FreeBSD
|Uses simple console interface that doesn't require Readline.
+
|...
You may want to install [[Curses Interface|curses]] to get input history and other necessary interface features.
 
 
|-
 
|-
 
|align=center|Other operating systems or Linux distributions
 
|align=center|Other operating systems or Linux distributions
Line 231: Line 274:
 
=== Python ===
 
=== Python ===
 
----
 
----
Python must be installed. To check whether you have it, type:
+
Python must be installed (this is only required to compile XSTools). To check whether you have it, type:
  
 
  echo 'print "Python is installed"' | python
 
  echo 'print "Python is installed"' | python
Line 257: Line 300:
 
|Open a terminal and type
 
|Open a terminal and type
 
  su -c 'pkg_add -r python'
 
  su -c 'pkg_add -r python'
 +
|-
 +
|align=center|Arch
 +
|Open a terminal and type:
 +
su -c 'pacman -S python2'
 
|-
 
|-
 
|align=center|MacOS X
 
|align=center|MacOS X
|Download Python here.
+
|[https://www.python.org/downloads/mac-osx/ Download Python here.]
 +
|-
 +
|align=center|Windows
 +
|Necessary only if you need to recompile XSTools for some reason. [https://www.python.org/downloads/windows/ Download Python here]
 
|}
 
|}
  
Line 299: Line 349:
 
|Open a terminal and type:
 
|Open a terminal and type:
 
  su -c 'pkg_add -r curl'
 
  su -c 'pkg_add -r curl'
 +
|-
 +
|align=center|Arch
 +
|Open a terminal and type:
 +
su -c 'pacman -S curl'
 
|-
 
|-
 
|align=center|Other operating systems or Linux distributions
 
|align=center|Other operating systems or Linux distributions
|Install libcurl from source by downloading it from the Curl homepage.
+
|Install libcurl from source by downloading it from the [https://curl.haxx.se/ Curl homepage].
 
|}
 
|}
  
Line 314: Line 368:
 
=== Download ===
 
=== Download ===
 
----
 
----
First, download the OpenKore source code. You may also want to download the default configuration/table files and the field pack if you haven't done so already.
+
First, download the OpenKore source code from [[Git|github.com]].
  
 
=== Extract ===
 
=== Extract ===
Line 354: Line 408:
 
  #define HASH_FUN_H <backward/hash_fun.h>
 
  #define HASH_FUN_H <backward/hash_fun.h>
  
 +
=== scons: *** SCons version 2.0.1 does not run under Python version 3.2.2. ===
 +
----
 +
Open the file called Makefile, and replace every
 +
python
 +
with
 +
python2
 +
Leave everything else as is. Make sure you have any python-2.x installed if you encounter errors (3.0 is current).
 +
 +
=== scons: *** [src/auto/XSTools/utils/perl/Benchmark.os] Error 1 ===
 +
----
 +
 +
Open the file ''src/auto/XSTools/utils/densehashtable.h'' and look for
 +
#include "sparseconfig.h"
 +
After that, '''insert''' the following on a new line:
 +
#include <stddef.h>
 +
Openkore should compile now.
  
 
== Precompiled binaries ==
 
== Precompiled binaries ==
 
On Windows, you can use [http://misc.openkore.com precompiled binaries], which contain perl interpreter and all modules and libraries needed.
 
On Windows, you can use [http://misc.openkore.com precompiled binaries], which contain perl interpreter and all modules and libraries needed.

Revision as of 19:34, 16 January 2021

(Un)supported Linux distributions and operating systems

OpenKore is known to not work on some live CD distributions, because they do not ship enough software. Distributions on which OpenKore does not work include:

  • Knoppix
  • elxLinux

On the other hand, OpenKore is guaranteed to work on at least:

  • Fedora
  • Ubuntu
  • FreeBSD
  • MacOS X
  • Solaris 8
  • Windows 10, 8.1, 8, 7, 2003, XP, 2000

It also does work on 64bit linux systems, e.g. Arch 64.

Quick start

Guides in this section assume you have default OS installations.

Windows

  • Run start.exe or wxstart.exe (starts with Wx GUI) or openkore.pl (requires perl interpreter.

OS X

Version 10.8.2

  • Get Apple ID if you don't have one (only needed to download Command Line Tools for Xcode from Apple's own website).
  • Become Apple developer (only needed to download Command Line Tools for Xcode from Apple's own website).
  • Install Command Line Tools for Xcode.
  • Install Homebrew. Run brew doctor etc if Homebrew asks for it and deal with it.
  • Install readline by running brew install readline.
  • Run openkore.pl.

Requirements

You must first make sure that you have several things installed before you can run OpenKore.

C/C++ compiler


You must have a C and C++ compiler installed (this is only required to compile XSTools). GCC is installed by default on many Linux distributions, but apparently some people install Linux without GCC.

To check whether you have a C++ compiler installed, open a terminal and type:

g++ -v

If you don't get an error, then you have a C++ compiler, and you can skip to the next paragraph. If not, read the table below.

OS/distribution Instructions
Fedora/RHEL/CentOS Open a terminal and type:
su -c 'yum install gcc-c++'
Ubuntu Open a terminal and type:
sudo apt-get install build-essential g++
Debian Open a terminal and type:
su -c 'apt-get install build-essential g++'
(Open)Suse Open a terminal and type:
su -c 'yast -i gcc-c++'
Arch On i686, open a terminal and type:
su -c 'pacman -S base-devel'

or, if you're on x86_64:

su -c 'pacman -S multilib-devel'
Other Linux distributions Look in your distribution's CD for packages called gcc, and gcc-c++ or g++.
MacOS X Install Command Line Tools for Xcode

Additional information: http://www.tech-recipes.com/mac_system_administration_tips726.html

Perl


You must have Perl 5.12 or newer installed (actually, 5.8.x may work, but kRO serverTypes and some other features won't work). Earlier versions might not be supported! To check whether you have Perl installed (and whether it is the correct version), type:

perl -v | grep perl

If you see the Perl version number, then it is installed. If you get an error, then it is not installed, and you should read the following table.

Thread support is needed for default interface to work (otherwise, use Console::Simple interface):

perl -V | grep threads
OS/distribution Instructions
Fedora/RHEL/CentOS Open a terminal and type:
su -c 'yum install perl'
Ubuntu Open a terminal and type:
sudo apt-get install perl
Debian Open a terminal and type:
su -c 'apt-get install perl-base'
Arch Open a terminal and type:
su -c 'pacman -S perl'
Other Linux distributions Download it from http://www.perl.org/
FreeBSD Perl 5.8 probably comes in default installation.

Otherwise, open a terminal and type:

su -c 'pkg_add -r perl5.8'
MacOS X Read http://developer.apple.com/internet/opensource/perl.html
Windows Install Strawberry Perl 5.12 x32 or ActivePerl

Perl module: Time::HiRes


You need the Time::HiRes Perl module. You can check whether you already have it by typing

perl -e 'use Time::HiRes;'

If nothing happens, then it is installed, and you can skip to the next paragraph. If you get an error, then it is not installed, and you should read the following table.

OS/distribution Instructions
Fedora/RHEL/CentOS Open a terminal and type:
su -c 'yum install perl-Time-HiRes'
Debian Open a terminal and type:
su -c 'apt-get install libtime-hires-perl'
FreeBSD Open a terminal and type:
su -c 'pkg_add -r p5-Time-HiRes'
Arch Open a terminal and type:
su -c 'pacman -S perl-time-hires'
Other operating systems or Linux distributions Download the Time::HiRes source code from CPAN and compile and install it.

If you have CPAN:

cpan Time::HiRes
Windows with ActivePerl Install via ppm.


Perl module: Compress::Zlib


You need the Compress::Zlib Perl module. You can check whether you already have it by typing

perl -e 'use Compress::Zlib;'

If nothing happens, then it is installed, and you can skip to the next paragraph. If you get an error, then it is not installed, and you should read the following table.

OS/distribution Instructions
Ubuntu Open a terminal and type:
sudo apt-get install libcompress-zlib-perl
FreeBSD Open a terminal and type:
su -c 'pkg_add -r p5-Compress-Zlib'
Arch Install perl-io-compress from the Arch User Repository.
Other operating systems or Linux distributions Download the Compress::Zlib source code from CPAN and compile and install it.

If you have CPAN:

cpan Compress::Zlib
Windows with ActivePerl Install via ppm.

GNU readline


  • Required only for Console::Unix interface.
  • Not required on Windows.
  • Use --interface=Console::Simple, Console::Curses or Wx if readline isn't available.

GNU readline and its associated development package must be installed. You need at least version 5.0. To check whether you have a recent enough version of GNU readline, follow the following instructions:

  1. Copy and past the following text into a text editor:
#include <stdio.h>
#include <readline/readline.h>
	#if !defined(RL_READLINE_VERSION)
     	 #error "You do not have the GNU readline development headers installed!"
	#elif RL_READLINE_VERSION < 0x0500
     	 #error "Your version of GNU readline is too old. Please install version 5.0 or higher."
#endif

Note. The file must end with an empty line

  1. Save the file as readlinetest.c in your home folder.
  2. Open a terminal and type:
gcc -c ~/readlinetest.c

If you do not see any output, then that means you have GNU readline correctly installed, and you can skip to the next paragraph. If you do see an error message, then read the following table.

OS/distribution Instructions
Fedora/RHEL/CentOS Open a terminal and type:
su -c 'yum install readline-devel'
Debian / Ubuntu 12.04 Open a terminal and type:
su -c 'apt-get install libreadline5-dev'
Ubuntu 14.04 Open a terminal and type:
sudo apt-get install libreadline6-dev
Arch Open a terminal and type:
su -c 'pacman -S readline'
OS X Install readline with brew:
brew install readline
FreeBSD ...
Other operating systems or Linux distributions You must compile readline and install readline from source.


  1. Download the readline source code from the GNU FTP. You should download the latest version (at the time this page is written, the latest version is readline-5.1.tar.gz). Save the file to your home folder.
  2. Open a terminal, and type:
tar xzvf readline-X.X.tar.gz && cd readline-X.X

Where X.X is the version of the file you downloaded/

  1. Type:
./configure && make && su -c 'make install'

MacOS X note. Do not install Readline from Fink! That won't work.

Python


Python must be installed (this is only required to compile XSTools). To check whether you have it, type:

echo 'print "Python is installed"' | python

If you get the message "Python is installed", then Python is installed, and you can skip to the next paragraph. If Python is not installed, then read the following table.

OS/distribution Instructions
Fedora/RHEL/CentOS Open a terminal and type:
su -c 'yum install python'
Ubuntu Open a terminal and type:
sudo apt-get install python
Debian Open a terminal and type:
su -c 'apt-get install python'
FreeBSD Open a terminal and type
su -c 'pkg_add -r python'
Arch Open a terminal and type:
su -c 'pacman -S python2'
MacOS X Download Python here.
Windows Necessary only if you need to recompile XSTools for some reason. Download Python here


Curl development libraries


The Curl development libraries are needed to compile OpenKore. To check whether you have it, type:

curl-config --version

If you get "command not found" as error message, you need to install libcurl:

OS/distribution Instructions
Fedora/RHEL/CentOS Open a terminal and type:
su -c 'yum install curl-devel'
Ubuntu First, search for the libcurl package using the package manager.

Open a terminal and type:

apt-cache search libcurl

Then install the latest version with this command:

sudo apt-get install libcurlx-dev

Where 'x' is the version number as found by the 'apt-cache search' command.

Debian First, search for the libcurl package using the package manager.

Open a terminal and type:

apt-cache search libcurl

Then install the latest version with this command:

su -c 'apt-get install libcurlx-dev'

Where 'x' is the version number as found by the 'apt-cache search' command.

FreeBSD Open a terminal and type:
su -c 'pkg_add -r curl'
Arch Open a terminal and type:
su -c 'pacman -S curl'
Other operating systems or Linux distributions Install libcurl from source by downloading it from the Curl homepage.

Perl module: Win32::Console

(only for Windows Console interface)

  • ActivePerl: Install via ppm.
  • Others: Install via your Perl's package manager or CPAN.

Running OpenKore

Download


First, download the OpenKore source code from github.com.

Extract


Extract the archives as instructed on the download page.

Run


Open a terminal. Go the OpenKore folder. Type:

perl ./openkore.pl

And you're done. OpenKore will automatically try to compile XSTools.so, an internally used library. If compilation fails, please check the Common problems. If you still cannot, report the error on our forum.

Command Line Arguments

--help

Display up to date information about command line arguments and exit.


Common problems

Missing headers


Common reason why compilation fails is because of missing headers. Look in the compilation messages. Do you see a message somewhere that looks like this?

foo.h: No such file or directory

If so, then that means you didn't install all the libraries that OpenKore needs! Please go through Preparation again.

hash_fun.h


In file included from src/auto/XSTools/utils/perl/Benchmark.xs:1: src/auto/XSTools/utils/perl/../dense_hash_map.h:93:66: error: ext/hash_fun.h: No such file or directory

Open src/auto/XSTools/utils/sparseconfig.h, find:

#define HASH_FUN_H <ext/hash_fun.h>

and replace with:

#define HASH_FUN_H <backward/hash_fun.h>

scons: *** SCons version 2.0.1 does not run under Python version 3.2.2.


Open the file called Makefile, and replace every

python 

with

python2

Leave everything else as is. Make sure you have any python-2.x installed if you encounter errors (3.0 is current).

scons: *** [src/auto/XSTools/utils/perl/Benchmark.os] Error 1


Open the file src/auto/XSTools/utils/densehashtable.h and look for

#include "sparseconfig.h"

After that, insert the following on a new line:

#include <stddef.h>

Openkore should compile now.

Precompiled binaries

On Windows, you can use precompiled binaries, which contain perl interpreter and all modules and libraries needed.