Getting Started: Difference between revisions

From devkitPro
Jump to navigation Jump to search
m (Reverted edits by Wintermute (talk) to last revision by Orkie)
(Undo revision 396 by Wintermute (talk))
Line 1: Line 1:
For Windows users getting started with devkitPro toolchains is made easy by the convenient [http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=160396 Windows Installer/Updater] package. It is strongly recommended that windows users stick with this rather than attempting to set up the packages manually. The updater handles all the sticky little details of installation required for properly functioning toolchains. This is a web based installer so please ensure that you have a net connection, your Internet Explorer proxy settings are correct and that any firewall software you have installed allows the application to access the net.
= Setup =
devkitPro currently provide 3 toolchains, devkitARM, devkitPPC and devkitA64 along with a number of support libraries. All of them are managed via pacman.


For those of you who wish to install offline a "Download only" option is provided to download the packages without installing for later installation on another machine. This is best used by running the installer from a removable drive where it will store the downloaded packages. The "Download and install/install from downloaded files" option will pick up the packages from the directory the installer is running from.
'''''Please note: devkitPro is the organisation that provides the tools. We are not a software package, we don't have version numbers and the only way to have us compile your code is to pay us (or maybe if you ask nicely when you need help figuring out an issue)'''''


For other platforms there are a few options available. Where a toolchain binary is provided for your platform you can download and extract the tarball to the appropriate place. Previously we have been recommending /usr/local/devkitPro but have since learned that we should be installing in /opt/devkitpro.
On Windows, there's a [https://github.com/devkitPro/installer/releases/latest graphical installer]. On Unix-like platforms such as Linux/macOS/WSL, there's [https://github.com/devkitPro/pacman/releases/latest pacman].


Once you have the tarball extracted set the environment variables expected by the devkitPro build system. All the toolchains expect $DEVKITPRO to contain the path to the main folder where the tools and support libraries reside - that's /opt/devkitpro in the recommended configuration. Each toolchain also expects a variable pointing to it's location within that folder, $DEVKITARM will be /opt/devkitpro/devkitARM and $DEVKITPPC will be /opt/devkitpro/devkitPPC. Once you have the toolchain extracted and the environment variables set then installing the support libraries from source is a simple matter of make && make install.
==Windows==


All the packages are provided on the main [http://sourceforge.net/project/showfiles.php?group_id=114505 Sourceforge download page], the stable release packages should be used in preference to CVS. While every effort is made to maintain CVS in a state where users can build the packages there are often phases where some packages are dependent on tools which are under test and not yet publically available.
* If you already use msys2 then you can follow the instructions at https://devkitpro.org/wiki/devkitPro_pacman to add the devkitPro repositories.


Where a binary is not provided then users should use the most recent stable release of the [http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=124206 buildscripts]. Again CVS should be avoided since the buildscripts found there will often contain the next iteration of a given toolchain rather than the current stable release. Using these scripts is a simple matter of extracting the archive, running ./build-devkit.sh from a bash shell and following the prompts. The scripts will also build and install the current support libraries from the release tarballs.
Otherwise


There is also an experimental linux installer package linked in the [http://forums.devkitpro.org/viewtopic.php?f=25&t=10 forums]. Linux devkitPSP binaries are not provided at this time.
* [https://github.com/devkitPro/installer/releases download the latest version of the graphical installer] from github and run it, following the instructions as you go.
* An Internet connection is required.
* Once the installer has finished, launch MSYS from:
** Windows 7 and earlier: Start -> All Programs -> devkitPro -> MSYS
** Windows 8 and 8.1: Right click on the Start screen and select 'All Apps'. You should find MSYS there.
** Windows 10 (pre-Anniversary Update): Start -> All Apps -> devkitPro -> MSYS
** Windows 10 (post-Anniversary Update): Start -> devkitPro -> MSYS


We have several tarballs of example code available in the sourceforge [http://sourceforge.net/project/showfiles.php?group_id=114505&package_id=159894 examples] package. These are also available through the Windows installer but will currently need to be downloaded manually for other platforms.
==Unix-like platforms==
Note that Linux x86_64 binaries are usable under WSL.


The recommended layout for your devkitPro folder should end up like this
* Follow the instructions to install pacman found at https://devkitpro.org/wiki/devkitPro_pacman
* run sudo (dkp-)pacman -S <console>-dev to install the tools and libraries for each console you wish to develop for. Groups currently available are :-
** gba-dev
** gp32-dev
** nds-dev
** 3ds-dev
** gamecube-dev
** wii-dev
** wiiu-dev
** switch-dev
* If you're using a bash shell logout and login again to get the environment settings needed, otherwise check /etc/profile.d/devkit-env.sh and set the variables for your chosen shell.


devkitPro
==BuildScripts==
    |
Where possible you should stick to the binary distributions - building from source can be a path of frustration even for seasoned developers. Where a binary is not provided then you should use the most recent stable release of the https://github.com/devkitPro/buildscripts/releases/latest buildscripts]. The buildscripts in the git repositories should be avoided since the buildscripts found there will often contain the next iteration of a given toolchain rather than the current stable release and may only be usable by our developers. Using these scripts is a simple matter of extracting the archive, running ./build-devkit.sh from a bash shell and following the prompts. The scripts will also build and install the current support libraries from the release tarballs. The readme supplied with the buildscripts details some dependencies which need to be in place before starting a build. Please do not distribute the binaries you obtain that way or recommend that people do this instead of using pacman.
    +-- devkitARM
    +-- devkitPPC
    +-- devkitPSP
    +-- examples
          |
          +-- gamecube
          +-- gba
          +-- gp32
          +-- nds
          +-- wii
    +-- msys                ( windows only )
    +-- libgba
    +-- libmirko
    +-- libnds
    +-- libogc
    +-- Programmers Notepad ( windows only )
 
Nothing else should be placed inside these folders unless otherwise instructed by the devkitPro toolchain maintainers. On Windows several of these folders are removed and replaced by the update system.
 
Once you have your toolchain, support libraries and examples of choice installed then it's time to review the devkitPro [[Build System | build system]]

Revision as of 00:03, 4 February 2019

Setup

devkitPro currently provide 3 toolchains, devkitARM, devkitPPC and devkitA64 along with a number of support libraries. All of them are managed via pacman.

Please note: devkitPro is the organisation that provides the tools. We are not a software package, we don't have version numbers and the only way to have us compile your code is to pay us (or maybe if you ask nicely when you need help figuring out an issue)

On Windows, there's a graphical installer. On Unix-like platforms such as Linux/macOS/WSL, there's pacman.

Windows

Otherwise

  • download the latest version of the graphical installer from github and run it, following the instructions as you go.
  • An Internet connection is required.
  • Once the installer has finished, launch MSYS from:
    • Windows 7 and earlier: Start -> All Programs -> devkitPro -> MSYS
    • Windows 8 and 8.1: Right click on the Start screen and select 'All Apps'. You should find MSYS there.
    • Windows 10 (pre-Anniversary Update): Start -> All Apps -> devkitPro -> MSYS
    • Windows 10 (post-Anniversary Update): Start -> devkitPro -> MSYS

Unix-like platforms

Note that Linux x86_64 binaries are usable under WSL.

  • Follow the instructions to install pacman found at https://devkitpro.org/wiki/devkitPro_pacman
  • run sudo (dkp-)pacman -S <console>-dev to install the tools and libraries for each console you wish to develop for. Groups currently available are :-
    • gba-dev
    • gp32-dev
    • nds-dev
    • 3ds-dev
    • gamecube-dev
    • wii-dev
    • wiiu-dev
    • switch-dev
  • If you're using a bash shell logout and login again to get the environment settings needed, otherwise check /etc/profile.d/devkit-env.sh and set the variables for your chosen shell.

BuildScripts

Where possible you should stick to the binary distributions - building from source can be a path of frustration even for seasoned developers. Where a binary is not provided then you should use the most recent stable release of the https://github.com/devkitPro/buildscripts/releases/latest buildscripts]. The buildscripts in the git repositories should be avoided since the buildscripts found there will often contain the next iteration of a given toolchain rather than the current stable release and may only be usable by our developers. Using these scripts is a simple matter of extracting the archive, running ./build-devkit.sh from a bash shell and following the prompts. The scripts will also build and install the current support libraries from the release tarballs. The readme supplied with the buildscripts details some dependencies which need to be in place before starting a build. Please do not distribute the binaries you obtain that way or recommend that people do this instead of using pacman.