Giter Club home page Giter Club logo

il2cppversions's Introduction

This repository contains build scripts for building a C# assembly using every version of Il2Cpp from 5.3.0f4 (from 2015) onwards. It was used to test the Il2CppInspector project, and can also be used to compare Il2Cpp structures and outputs between versions.

Currently, everything only works on Windows and builds only for Windows. I welcome PRs adding support for other platforms (Linux, macOS, building for Android/iOS/etc.).

Building everything

  • Install VS2015 and VS2017 C++ tools. Uninstall VS2019 C++ tools if you have them - otherwise certain versions will fail.
  • Download every installer from the Unity Archive
    • Download the "Unity Editor 64-bit" for Windows.
    • I extracted links using a text editor on the source of that page, and then downloaded all of them with aria2c.
  • For Unity 2020+, the Windows (IL2CPP) Target Support package is necessary to support builds for these Unity versions. A link can be found on the Release Notes page for each necessary version.
    • For Unity 2020, the file can be downloaded here.
    • For Unity 2021, the file can be downloaded here.
  • Install 7-zip.
  • Edit extract.sh to update the paths to 7z.exe and your downloads.
  • Run extract.sh to extract il2cpp into each of the group directories
  • Edit Test.cs as you see fit; it just needs to be C# 4.0 compatible.
  • Run build_all.bat to build Test.cs into a DLL against every single version. These will go into the output/ directory, one per version. Already built versions will be skipped.

To force a rebuild of an individual version, use the f (force) option when calling build.bat.

Note that downloading and building everything will probably take a long time - on the order of multiple hours.

Header files

A secondary purpose for this repo is documenting and collecting header files describing the internal structures for every version of Il2Cpp. The script headers/extract.py can help to extract a usable C/C++ header from a particular version of Il2Cpp.

How To Extract New Header and API files

Note: this only works if there haven't been significant changes to the internal file structure of the Unity Installation executables. Otherwise a new "group" will have to be created for this different file structure.

  • Download the desired installers from the Unity Archive
    • Download the "Unity Editor 64-bit" for Windows.
    • For newer versions, expect each one to be over 2 GB.
  • In Windows:
    • Install 7-zip.
  • In the linux subsystem:
    • Install Python 3.
    • Install gcc.
  • Edit extract.sh:
    • Update the paths to 7z.exe and your downloads.
    • If running on new Unity versions, add those versions in the appropriate groups.
  • Run update.sh in the linux subsystem
    • This script:
      • Extracts il2cpp into each of the group directories
      • Updates the header and api files
      • Generates updated diff files
    • Starting in 2020.2.0:
      • The installer mechanism has been changed to use NSIS. Unzipping the normal way leads to a bunch of useless files, so we have to perform a silent install. Note that this is an actual install and not a pure unzip/extract. However, you can have side-by-side installations, and wiping out the folders after use has no effect on real Unity installations via Unity Hub, as they seem to be handled separately.
      • For every extraction, it might need to ask permission.
      • For the Windows Standalone IL2CPP Support, the installer will check not just for the existence of a Unity.exe but also the right version (and maybe other files), so we have to extract the Unity 64-bit Editor again, and then the IL2CPP support files. This is brutally slow but there is no better way (that we know of) to do it currently.
    • Note that this could potentially take many hours.

il2cppversions's People

Contributors

djkaty avatar ds5678 avatar nneonneo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.