Created
June 7, 2011 19:29
-
-
Save AngryAnt/1012958 to your computer and use it in GitHub Desktop.
Example perl script for building .net assemblies for use in Unity.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/usr/perl | |
use strict; | |
use File::Basename; | |
chdir (File::Spec->rel2abs (dirname($0)."/..")); # Modify for location of perl script | |
my $monoPath = "External/Mono/builds/monodistribution"; | |
my @sourceDirs = ( | |
"Path/To/Source/*.cs", | |
"Path/To/More/Source/*.cs" | |
); | |
my $targetAssemblyPath = "Path/To/AssetStoreTools.dll"; | |
my $unityEnginePath = "Path/To/UnityEngine.dll"; | |
my $unityEditorPath = "Path/To/UnityEditor.dll"; | |
my $command = "$monoPath/bin/gmcs -d:DEBUG -debug+ -r:$unityEnginePath,$unityEditorPath -target:library -out:$targetAssemblyPath"; | |
while (<@sourceDirs>) | |
{ | |
$command .= " $_"; | |
} | |
system ($command) or die ("Unable to run gmcs"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment