Giter Club home page Giter Club logo

buildactions's Introduction

SuperUnityBuild

openupm

A powerful automation tool for quickly and easily generating builds with Unity.

Logo Screenshot

Unity Forums Thread | Documentation Wiki | OpenUPM package

SuperUnityBuild is a Unity utility that automates the process of generating builds. It's easy and quick enough to use on small apps, but it's also powerful and extensible enough to be extremely useful on larger projects. The key to this flexibility lies in SuperUnityBuild's configurable degrees of granularity and its BuildActions framework which allows additional operations to be added into the build process.

Features:

  • Manage and Build Multiple Versions - If you're targetting more than one platform or distribution storefront, the build process can quickly become very cumbersome with Unity's built in tools. SuperUnityBuild makes it easy to manage a wide array of build configurations targetting any number of versions, platforms, architectures, or distribution methods.
  • One-Click Batch Builds - Easily kick-off batch builds for all or a specific subset of your build configurations.
  • Expanded Build Capability - SuperUnityBuild offers many features not available in Unity's built in build workflow such as version number generation, and the BuildAction framework provides options for even more expanded build capabilities like automated file copying/moving, creating zip files, and building AssetBundles.
  • Quick Initial Setup - If all you need is the bare essentials, you can be up and running in minutes. SuperUnityBuild scales to fit your project's specific needs whether it be large or small.
  • Highly Extensible and Customizable - SuperUnityBuild's BuildAction framework provides simple hooks for adding in your own additional functionality.
  • Free and Open-Source - Some similar tools available only on the AssetStore are as much as $50+.

Basic Usage

Requires Unity 2020.3 or higher. Supports building for Windows, macOS, Linux, iOS, Android, UWP and WebGL.

Installation

Official releases of SuperUnityBuild can be installed via Unity Package Manager from the OpenUPM package registry. See https://openupm.com/packages/com.github.superunitybuild.buildtool/ for installation options.

You can also download the source zip of this repository and extract its contents into your Unity project's Packages directory to install SuperUnityBuild as an embedded package.

You may also want to install the optional BuildActions package to expand SuperUnityBuild's capabilities.

Upgrading from previous versions

When upgrading to a new major version, it is strongly recommended to remove all traces of the previous SuperUnityBuild installation by uninstalling the package, deleting the current Build Settings asset (stored in the Assets/SuperUnityBuild directory by default), restarting Unity, installing the new release and then allowing SuperUnityBuild to create a fresh Build Settings asset.

Upgrades to new patch or minor versions (i.e. versions without breaking changes) can be performed in-place by simply updating the package.

Setup

See Standard Usage in the wiki.

Customizing and Expanding

Creating BuildActions

See Build Actions in the wiki for details.

Command Line Interface

See Command Line Interface in the wiki.

Contributing

Bug reports, feature requests, and pull requests are welcome and appreciated.

Credits

Creator

Maintainer

Contributors

You can see a complete list of contributors at https://github.com/superunitybuild/buildtool/graphs/contributors

License

All code in this repository (buildtool) is made freely available under the MIT license. This essentially means you're free to use it however you like as long as you provide attribution.

buildactions's People

Contributors

chaser324 avatar cosformula avatar mallowmew avatar robinnorth avatar rthery avatar sarrowsmith avatar tallenbaugh avatar tmaloteaux avatar williamritson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

buildactions's Issues

Problem with ZipFileOperation for large folders (+ possible solution)

I've previously used ZipFileOperation to create a zip for each of my builds, but I recently encountered a problem with this, possibly due to the project's current file size. Here's the error:

Ionic.Zip.ZipException: Compressed or Uncompressed size, or offset exceeds the maximum value. Consider setting the UseZip64WhenSaving property on the ZipFile instance.

The source folders are around 5.5 GB, and if I create a zip manually, it comes out to around 900 MB.

It seems like this could be solved by adding a line with the UseZip64WhenSaving property as the message suggests, but I can't easily test this myself because the script is part of the Unity package, so it auto-reverts any edits that I make.

Add ability to change root folder.

Would be amazing to add ability to change root folder. Package does have constants with folder paths, but you cant change them, thanks! Something like to Plugins/SuperUnityBuild etc.

CS0173 on FileUtility line 42 : "no implicit conversion between 'method group' and 'method group'"

Full error message:

Library/PackageCache/[email protected]/Editor/FileUtility/FileUtility.cs(42,20): error CS0173: Type of conditional expressin cannot be determined because there is no implicit conversion between 'method group' and 'method group'

Linux + Unity 2020.3 (old LTS) -- it's an old project.

According to StackOverflow, it needs a cast on one of them to the return type.

Workaround

Copying the package from Library/PackageCache into Packages and applying that fix resolves the problem.
Replace method body starting line 42 with:

            return isCopy ?
                (Action<string, string>) FileUtil.CopyFileOrDirectory :
                FileUtil.MoveFileOrDirectory;

Addressables do not work in build

When building manually, everything works fine.
But when I build using SuperUnityBuild, it seems like the addressables arent included in the build. I get a bunch of "missing element with given key" at runtime when doing Addressables.LoadAsync...
Am I missing a step in the build config?

Support for WebGL in UploadItch action

Apparently UploadItch.cs doesn't have support for uploading builds of the WebGL plataform.

Any channel name input would just get ignored 'cause of the "default" of the switch case statement at line 193 that returns null, resulting in an invalid push command "butler push dir itchName/gameName:"

I suggest adding a case for the WebGL plataform and making the default throw an exception or simply break, so any literal parts of the channel name format still get through.

(currently working around this bug by creating a separate action, filtering by plataform == WEBGL and using the channel override field with a literal "webgl" value)

Additional itch.io options.

There are some additional flags available through the itch.io butler command line tool that should probably be surfaced as options.

  • --verbose - Provides additional details about push operation.
  • --identity="PATH_TO_CREDENTIALS" - Allows user to specify path to a specific itch.io API token. Might be nice for people that upload to multiple accounts.
  • --ignore=IGNORE - Glob pattern of files to ignore.
  • --userversion=USERVERSION - Since users might already be generating a version number with SuperUnityBuild, they might as well pass it to itch.io for the sake of keeping things consistent.
  • --beeps4life - Butler emits a system beep when starting a task. BEEPS 4 LIFE.

Storing the Butler path separately from the rest of the config

I work on both macOS and Windows and use the ItchUpload post-build action. The path to the Butler executable varies, so I have to remember to change it back and forth depending on where I'm building from.

It feels like the path should be stored separately from the rest of the configuration -- it's the only part of the configuration that has anything to do with your specific machine. Everything else is consistent, no matter where I'm working.

Perhaps it would go into the user settings? I'm not familiar with how that works.

Accessing version info in a Single Run action

I have a script that uploads my Windows, macOS, and Linux builds to Steam.

Since this script only runs once, it doesn't make sense to use the "Per Platform" action type.

However, if I use the "Single Run" action type, then I cannot access things like the build version -- BuildProject.ResolvePath only gets run for per-platform actions. So, I can't pass a path to the build directory to my script.

I can get around this for now by just using the most recently created build folder, but it'd be nice if I could access constants that aren't platform-specific (e.g. version, build day, etc.) through a single-run action!

Script Runner doesn't run PowerShell script

Hey,
I have a script and I call it with post build actions. The problem is that it opens file in notepad and doesn't run it normally
I have tried with single path separator() and double path separator(\) but results are still same

Thanks for any help

image

image

namespace 'BuildAction' could not be found

Trying to create some BuildActions to help development, Have the newest versions of SuperUnityBuild (5.0.1), and BuildActions (2.1.1) through package manager. I've followed the instructions on the wiki, implemented the class and checked the build in ones for differences. The scripts has no errors until I try to start building through SuperUnityBuild where I get this error.

"Assets\SuperUnityBuild\BuildActions\ResetToWindows.cs(1,23): error CS0234: The type or namespace name 'BuildTool' does not exist in the namespace 'SuperUnityBuild' (are you missing an assembly reference?)"

This is only the case for my own buildTools. The build in one seems to work.
The funny thing is that it still seems to run the tools, Debug log at the end of the function runs, but since there's an error, Unity cancels the build and it doesn't produce any actual files...

The script is just a workaround on the errors produced when building to PC after android for unity in general.
"Texture Compression ETC2 is not supported on Standalone"
Example issue: https://forum.unity.com/threads/cache-bleed-between-windows-android-builds-etc1-texture-error-bug.1180903/

So build order for SuperUnityBuild is PC -> Android, then execute this after so that I don't have to manually reset to Standalone to avoid the error.

Screenshot 2021-12-28 131544

PerBuildProjectSettings missing most options

Any reason why the only configurable option in PerBuildProjectSettings is preloadedAssets?
All the other options like resolution, fullscreen, etc are missing.

I have a local fork where i added some of the options I needed and it seems to work fine. I can make a PR with the full set of options if it would be helpful to anyone?

iOS utilities BuildAction

It would be useful to have a build action that enabled the configuration of iOS-specific build settings (e.g. development team and provisioning profile IDs) on a per-build basis

Some way to know if a build failed in a post-build action

Hi, I'm not sure if this already exists (if it does, please let me know), but there should be a way to abort post-build actions if a build fails. For example, i use the UploadItch action and a custom action that builds/uploads addressables, but obviously i do not want to upload either of those if the build didnt work in the first place. Thanks!

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.