GithubHelp home page GithubHelp logo

superunitybuild / buildactions Goto Github PK

View Code? Open in Web Editor NEW
168.0 6.0 38.0 413 KB

BuildActions for use with the SuperUnityBuild build automation tool.

Home Page: https://github.com/superunitybuild/buildtool

License: MIT License

C# 100.00%
unity3d game-development unity build-automation automation hacktoberfest

buildactions's Introduction

SuperUnityBuild BuildActions

openupm

BuildActions for use with the SuperUnityBuild build automation tool.

Logo

Unity Forums Thread | Documentation Wiki | OpenUPM package

BuildActions are one of the key components that make the SuperUnityBuild build automation tool flexible and powerful. Each one extends the capabilities of SuperUnityBuild and can be easily setup and customized to suit your needs, and if there's some other specialized functionality that your project needs, you can simply write your own BuildActions and integrate them into the build process.

This repository is intended to serve as an ever expanding library of useful BuildActions as more of them are created.

Basic Usage

Installation

BuildActions requires SuperUnityBuild to be installed in your project.

Official releases of BuildActions can be installed via Unity Package Manager from the OpenUPM package registry. See https://openupm.com/packages/com.github.superunitybuild.buildactions/ 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 BuildActions as an embedded package.

Setup

Refer to the SuperUnityBuild wiki for basic information on how to setup, use, and create your own BuildActions. For specific details on one of the BuildActions featured here, refer to the README in its directory.

Tools

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/buildactions/graphs/contributors

License

All code in this repository (buildactions) 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.

Zip File Utility includes a pre-compiled DotNetZip library which is licensed under the Ms-PL. See DotNetZip's repository for more info.

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

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.

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

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;

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!

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?

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.

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

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.

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?

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)

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!

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

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.