Skip to content
This repository was archived by the owner on Aug 24, 2022. It is now read-only.

MyGet package publishing #1013

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\JSIL\Properties\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Annotations.cs" />
<Compile Include="Configuration.cs" />
<Compile Include="DeadCodeInfoProvider.cs" />
Expand Down
19 changes: 1 addition & 18 deletions Compiler/Analyzers/DeadCodeAnalyzer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand All @@ -8,10 +7,6 @@
[assembly: AssemblyTitle("Dead code analyzer")]
[assembly: AssemblyDescription(".NET assembly dead code analyzer for JSIL")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Dead code analyzer")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand All @@ -20,16 +15,4 @@
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("8d203439-f730-4ea9-aff7-a2885947080a")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.0.0")]
[assembly: Guid("8d203439-f730-4ea9-aff7-a2885947080a")]
6 changes: 5 additions & 1 deletion Compiler/Compiler.Executor.32bit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
<LangVersion>5</LangVersion>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -37,6 +37,10 @@
<ApplicationIcon>jsil.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="..\JSIL\Properties\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Executor.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion Compiler/Compiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="..\JSIL\Properties\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="..\Upstream\Options.cs" />
<Compile Include="BuildGroup.cs" />
<Compile Include="Configuration.cs" />
Expand All @@ -75,7 +79,6 @@
<Compile Include="Profiles\ResourceConverter.cs" />
<Compile Include="Program.cs" />
<Compile Include="SolutionBuilder.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="VariableSet.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions Compiler/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public void MergeInto (SolutionBuildConfiguration result) {
public bool? ReuseTypeInfoAcrossAssemblies;
public bool? ProxyWarnings;
public string OutputDirectory;
public string JsLibrariesOutputDirectory;
public string FileOutputDirectory;
public string Profile;
public Dictionary<string, object> ProfileSettings = new Dictionary<string, object>();
Expand All @@ -66,6 +67,8 @@ public override void MergeInto (JSIL.Translator.Configuration result) {
cc.ReuseTypeInfoAcrossAssemblies = ReuseTypeInfoAcrossAssemblies;
if (OutputDirectory != null)
cc.OutputDirectory = OutputDirectory;
if (JsLibrariesOutputDirectory != null)
cc.JsLibrariesOutputDirectory = JsLibrariesOutputDirectory;
if (FileOutputDirectory != null)
cc.FileOutputDirectory = FileOutputDirectory;
if (Profile != null)
Expand Down Expand Up @@ -108,6 +111,7 @@ public VariableSet ApplyTo (VariableSet variables) {
result["CurrentDirectory"] = () => Environment.CurrentDirectory;
result["ConfigDirectory"] = () => Path;
result["OutputDirectory"] = () => OutputDirectory;
result["JsLibrariesOutputDirectory"] = () => JsLibrariesOutputDirectory;
result["FileOutputDirectory"] = () => FileOutputDirectory;
result["Profile"] = () => Profile;

Expand Down
2 changes: 1 addition & 1 deletion Compiler/Extensibility/IProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ TranslationResultCollection Translate (
Configuration configuration, string assemblyPath, bool scanForProxies
);
void WriteOutputs (
VariableSet variables, TranslationResultCollection result, string path, bool quiet
VariableSet variables, TranslationResultCollection result, Configuration path, bool quiet
);

void RegisterPostprocessors (IEnumerable<IEmitterGroupFactory> emitters, Configuration configuration, string assemblyPath, string[] skippedAssemblies);
Expand Down
25 changes: 23 additions & 2 deletions Compiler/Profiles/Base.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using JSIL.Compiler.Extensibility;
using JSIL.Utilities;

Expand All @@ -24,15 +25,35 @@ public virtual TranslationResultCollection Translate (
public virtual void RegisterPostprocessors (IEnumerable<IEmitterGroupFactory> emitters, Configuration configuration, string assemblyPath, string[] skippedAssemblies) {
}

public virtual void WriteOutputs (VariableSet variables, TranslationResultCollection result, string path,bool quiet) {
public virtual void WriteOutputs (VariableSet variables, TranslationResultCollection result, Configuration configuration, bool quiet) {
foreach (var translationResult in result.TranslationResults) {
if (!quiet)
{
foreach (var fe in translationResult.OrderedFiles)
Console.WriteLine(fe.Filename);
}

translationResult.WriteToDirectory(path);
translationResult.WriteToDirectory(configuration.OutputDirectory);
}

var jsilPath = Path.GetDirectoryName(JSIL.Internal.Util.GetPathOfAssembly(Assembly.GetExecutingAssembly()));
var searchPath = Path.Combine(jsilPath, "JS Libraries\\JsLibraries\\");
if (!string.IsNullOrEmpty(configuration.JsLibrariesOutputDirectory) && Directory.Exists(searchPath))
{
foreach (var file in Directory.GetFiles(searchPath, "*", SearchOption.AllDirectories)) {
var target = Uri.UnescapeDataString(Path.Combine(configuration.JsLibrariesOutputDirectory, new Uri(searchPath).MakeRelativeUri(new Uri(file)).ToString()))
.Replace('/', Path.DirectorySeparatorChar);
var directory = Path.GetDirectoryName(target);
if (!Directory.Exists(directory))
Directory.CreateDirectory(directory);

File.Copy(file, target, true);

if (!quiet)
{
Console.WriteLine(target);
}
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions Compiler/Profiles/XNA4/Profiles.XNA4.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
<Reference Include="System.XML" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\..\JSIL\Properties\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="..\XNACommon.cs" />
<Compile Include="XNA4Profile.cs" />
Expand Down
20 changes: 1 addition & 19 deletions Compiler/Profiles/XNA4/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand All @@ -8,10 +7,6 @@
[assembly: AssemblyTitle("XNA4")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("XNA4")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand All @@ -20,17 +15,4 @@
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("d8124711-3e7f-47ac-a08d-4ab7de555aee")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: Guid("d8124711-3e7f-47ac-a08d-4ab7de555aee")]
19 changes: 14 additions & 5 deletions Compiler/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ AssemblyCache assemblyCache
{"o=|out=",
"Specifies the output directory for generated javascript and manifests.",
(path) => commandLineConfig.OutputDirectory = Path.GetFullPath(path) },
{"outLibraries=",
"Specifies the output directory for JSIL Libraries.",
(path) => commandLineConfig.JsLibrariesOutputDirectory = Path.GetFullPath(path) },
{"q|quiet",
"Suppresses non-error/non-warning stderr messages.",
(_) => commandLineConfig.Quiet = Quiet = true },
Expand Down Expand Up @@ -822,20 +825,26 @@ static void InternalMain (string[] arguments) {
if (localConfig.OutputDirectory == null)
throw new Exception("No output directory was specified!");

var outputDir = MapPath(localConfig.OutputDirectory, localVariables, false);
CopiedOutputGatherer.EnsureDirectoryExists(outputDir);
localConfig.OutputDirectory = MapPath(localConfig.OutputDirectory, localVariables, false);
CopiedOutputGatherer.EnsureDirectoryExists(localConfig.OutputDirectory);

InformationWriteLine("// Saving output to '{0}'.", ShortenPath(outputDir) + Path.DirectorySeparatorChar);
InformationWriteLine("// Saving output to '{0}'.", ShortenPath(localConfig.OutputDirectory) + Path.DirectorySeparatorChar);

if (!string.IsNullOrEmpty(localConfig.JsLibrariesOutputDirectory))
{
localConfig.JsLibrariesOutputDirectory = MapPath(localConfig.JsLibrariesOutputDirectory, localVariables, false);
CopiedOutputGatherer.EnsureDirectoryExists(localConfig.JsLibrariesOutputDirectory);
}

// Ensures that the log file contains the name of the profile that was actually used.
localConfig.Profile = localProfile.GetType().Name;

if (ignoredMethods.Count > 0)
Console.Error.WriteLine("// {0} method(s) were ignored during translation. See the log for a list.", ignoredMethods.Count);

EmitLog(outputDir, localConfig, filename, outputs, ignoredMethods);
EmitLog(localConfig.OutputDirectory, localConfig, filename, outputs, ignoredMethods);

buildGroup.Profile.WriteOutputs(localVariables, outputs, outputDir, Quiet);
buildGroup.Profile.WriteOutputs(localVariables, outputs, localConfig, Quiet);

totalFailureCount += translator.Failures.Count;
}
Expand Down
19 changes: 1 addition & 18 deletions Compiler/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand All @@ -8,10 +7,6 @@
[assembly: AssemblyTitle("JSILc")]
[assembly: AssemblyDescription("JSIL Command Line Compiler")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Squared Interactive")]
[assembly: AssemblyProduct("JSIL")]
[assembly: AssemblyCopyright("Copyright © Squared Interactive 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand All @@ -20,16 +15,4 @@
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("e2342fc2-c01e-470e-8191-fd22b94bb455")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.8.2.*")]
[assembly: Guid("e2342fc2-c01e-470e-8191-fd22b94bb455")]
6 changes: 6 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
assembly-versioning-scheme: MajorMinorPatch
mode: ContinuousDeployment
next-version: 0.9.1
branches: {}
ignore:
sha: []
3 changes: 3 additions & 0 deletions JSIL.mscorlib/JSIL.mscorlib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\JSIL\Properties\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Imports.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="JSIL\System\NumberFormatter.cs" />
Expand Down
16 changes: 0 additions & 16 deletions JSIL.mscorlib/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
[assembly: AssemblyTitle("JSIL.mscorlib")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("JSIL.mscorlib")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
Expand All @@ -23,17 +19,5 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("aef2633e-e92c-4a0d-b8e0-a072ed404af7")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: JSRepaceAssemblyDeclaration("mscorlib")]
[assembly: JSOverrideAssemblyReference(typeof(object), "mscorlib")]
34 changes: 34 additions & 0 deletions JSIL.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>JSIL.Compiler</id>
<version>$version$</version>
<authors>Squared Interactive</authors>
<description>JSIL Command Line Compiler</description>
<language>en-US</language>
<projectUrl>https://github.com/sq/JSIL</projectUrl>
<licenseUrl>https://github.com/sq/JSIL/blob/master/LICENSE</licenseUrl>
</metadata>
<files>
<file src="bin\defaults.jsilconfig" target="tools" />
<file src="bin\ICSharpCode.Decompiler.dll" target="tools" />
<file src="bin\ICSharpCode.NRefactory.CSharp.dll" target="tools" />
<file src="bin\ICSharpCode.NRefactory.dll" target="tools" />
<file src="bin\JSIL.dll" target="tools" />
<file src="bin\JSIL.Meta.dll" target="tools" />
<file src="bin\JSIL.Proxies.4.0.dll" target="tools" />
<file src="bin\JSIL.Proxies.Bcl.dll" target="tools" />
<file src="bin\JSILc.exe" target="tools" />
<file src="bin\JSILc.exe.config" target="tools" />
<file src="bin\JSILc.AnyCPU.exe" target="tools" />
<file src="bin\JSILc.AnyCPU.exe.config" target="tools" />
<file src="bin\JSIL.Analysis.DCE.dll" target="tools" />
<file src="bin\Mono.Cecil.dll" target="tools" />
<file src="bin\Mono.Cecil.Mdb.dll" target="tools" />
<file src="bin\Mono.Cecil.Pdb.dll" target="tools" />
<file src="bin\JSIL.ExpressionInterpreter.dll" target="tools" />
<file src="bin\JSIL.ExpressionInterpreter.pdb" target="tools" />
<file src="bin\JS Libraries\**" target="tools\JS Libraries" />
<file src="Libraries\" target="tools\JS Libraries\JsLibraries" />
</files>
</package>
1 change: 1 addition & 0 deletions JSIL/JSIL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
<Compile Include="PackedStructArray.cs" />
<Compile Include="Progress.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\GlobalAssemblyInfo.cs" />
<Compile Include="SourceMapBuilder.cs" />
<Compile Include="SpecialIdentifiers.cs" />
<Compile Include="Threading.cs" />
Expand Down
Loading