Skip to content
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.

Commit

Permalink
Fix release setup for ipyc
Browse files Browse the repository at this point in the history
  • Loading branch information
slide committed Jul 24, 2016
1 parent 5a7ffe1 commit 4924355
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 24 deletions.
1 change: 0 additions & 1 deletion Languages/IronPython/IronPythonCompiler/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IKVM.Reflection;
using IKVM.Reflection.Emit;
using System.Resources;
Expand Down
1 change: 0 additions & 1 deletion Languages/IronPython/IronPythonCompiler/ConsoleOps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IronPythonCompiler {
public static class ConsoleOps {
Expand Down
36 changes: 16 additions & 20 deletions Languages/IronPython/IronPythonCompiler/IronPythonCompiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,23 @@
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(ProjectDir)..\..\..\Solutions\Common.proj" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3DFB096E-AC09-4E7A-9288-7F7C33C288C7}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>IronPythonCompiler</RootNamespace>
<AssemblyName>ipyc</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<AppConfig>..\App.$(ConfigurationFlavor).config</AppConfig>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'FxCop|AnyCPU' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\..\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'v2Debug|AnyCPU' ">
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'v2Release|AnyCPU' ">
</PropertyGroup>
<PropertyGroup>
<StartupObject>IronPythonCompiler.Program</StartupObject>
Expand Down Expand Up @@ -73,8 +61,16 @@
<Name>IronPython</Name>
<Private>false</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="..\App.Debug.config">
<Link>App.Debug.config</Link>
</None>
<None Include="..\App.Release.config">
<Link>App.Release.config</Link>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)Versioning.targets" />
<Target Name="BeforeBuild" DependsOnTargets="GenerateBuildInfo" />
</Project>
</Project>
5 changes: 4 additions & 1 deletion Languages/IronPython/IronPythonCompiler/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IronPython.Runtime;
using IronPython.Runtime.Operations;
using IronPython.Hosting;
Expand Down Expand Up @@ -62,7 +61,11 @@ static void GenerateExe(Config config) {

foreach (var a in System.AppDomain.CurrentDomain.GetAssemblies()) {
var n = new AssemblyName(a.FullName);
#if CLR2
if (a.EntryPoint == null && (n.Name.StartsWith("IronPython") || n.Name == "Microsoft.Dynamic" || n.Name == "Microsoft.Scripting")) {
#else
if (!a.IsDynamic && a.EntryPoint == null && (n.Name.StartsWith("IronPython") || n.Name == "Microsoft.Dynamic" || n.Name == "Microsoft.Scripting")) {
#endif
ConsoleOps.Info("\tEmbedded {0} {1}", n.Name, n.Version);
var f = new FileStream(a.Location, FileMode.Open, FileAccess.Read);
mb.DefineManifestResource("Dll." + n.Name, f, IKVM.Reflection.ResourceAttributes.Public);
Expand Down
16 changes: 15 additions & 1 deletion Solutions/Build.IronPython.proj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<BuildDir>$(BinDir)\$(BaseConfiguration)</BuildDir>
<v2BuildDir>$(BinDir)\v2$(BaseConfiguration)</v2BuildDir>
<v45BuildDir>$(BinDir)\v45$(BaseConfiguration)</v45BuildDir>
<Silverlight5BuildDir>$(BinDir)\Silverlight5$(BaseConfiguration)</Silverlight5BuildDir>
<!--<Silverlight5BuildDir>$(BinDir)\Silverlight5$(BaseConfiguration)</Silverlight5BuildDir>-->
</PropertyGroup>

<ItemGroup>
Expand All @@ -32,9 +32,11 @@
<BuildProject Include="$(Solution)" Condition=" '$(Mono)' != 'true' ">
<Properties>Configuration=v45$(BaseConfiguration)</Properties>
</BuildProject>
<!--
<BuildProject Include="$(Solution)" Condition=" '$(Mono)' != 'true' ">
<Properties>Configuration=Silverlight5$(BaseConfiguration)</Properties>
</BuildProject>
-->
<InstallerProject Include="$(BaseDir)\Msi\Python\IronPython.Installer.wixproj">
<Properties>Configuration=$(BaseConfiguration);BaseInputPaths=$(StageDir);WixToolPath=$(UtilDir)\Wix35\;OutputPath=$(PackageDir);BuildDir=$(BuildDir)</Properties>
</InstallerProject>
Expand Down Expand Up @@ -72,13 +74,20 @@
<IronPythonBins Include="ipyw64.exe" />
<IronPythonBins Include="ipyw64.exe.config" />

<IronPythonCompilerBins Include="ipyc.exe" />
<IronPythonCompilerBins Include="ipyc.exe.config" />

<!--
<ChironBins Include="Chiron.exe" />
<ChironBins Include="Chiron.exe.config" />
-->
</ItemGroup>

<ItemGroup>
<!--
<SilverlightScriptFiles Include="$(BaseDir)\Hosts\Silverlight\Public\script\*.*" />
<SilverlightScriptTemplates Include="$(BaseDir)\Hosts\Silverlight\Public\script\templates\python\**\*.*" />
-->

<MiscFiles Include="$(BaseDir)\Languages\IronPython\Public\License.html" />
<MiscFiles Include="$(BaseDir)\Languages\IronPython\Public\License.rtf" />
Expand Down Expand Up @@ -137,6 +146,7 @@
<Copy SourceFiles="@(ClrDlrLibs->'$(BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)" />
<Copy SourceFiles="@(IronPythonLibs->'$(BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)" />
<Copy SourceFiles="@(IronPythonBins->'$(BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)" />
<Copy SourceFiles="@(IronPythonCompilerBins->'$(BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)" />
<Copy SourceFiles="@(v4IronPythonModules->'$(BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\DLLs" />
<Copy SourceFiles="@(IronPythonModules->'$(BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\DLLs" />
<Copy SourceFiles="@(MiscFiles)" DestinationFolder="$(StageDir)" />
Expand All @@ -149,13 +159,15 @@
<Copy SourceFiles="@(TutorialFiles)" DestinationFiles="@(TutorialFiles->'$(StageDir)\Tutorial\%(RecursiveDir)%(Filename)%(Extension)')" />

<!-- Continue to copy the Silverlight files here for compatibility with previous releases. -->
<!--
<Copy SourceFiles="@(DlrLibs->'$(Silverlight5BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Silverlight\bin" />
<Copy SourceFiles="@(SilverlightDlrLibs->'$(Silverlight5BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Silverlight\bin" />
<Copy SourceFiles="@(IronPythonLibs->'$(Silverlight5BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Silverlight\bin" />
<Copy SourceFiles="@(ChironBins->'$(BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Silverlight\bin" />
<Copy SourceFiles="@(SilverlightScriptFiles)" DestinationFiles="@(SilverlightScriptFiles->'$(StageDir)\Silverlight\script\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(SilverlightScriptTemplates)" DestinationFiles="@(SilverlightScriptTemplates->'$(StageDir)\Silverlight\script\templates\python\%(RecursiveDir)%(Filename)%(Extension)')" />
-->

<!-- .NET 4 -->
<Copy SourceFiles="@(DlrLibs->'$(BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Net40" />
Expand All @@ -179,10 +191,12 @@
<Copy SourceFiles="@(IronPythonModules->'$(v2BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Net35" />

<!-- Silverlight 5 -->
<!--
<Copy SourceFiles="@(DlrLibs->'$(Silverlight5BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Sl5" />
<Copy SourceFiles="@(SilverlightDlrLibs->'$(Silverlight5BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Sl5" />
<Copy SourceFiles="@(IronPythonLibs->'$(Silverlight5BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Sl5" />
<Copy SourceFiles="@(IronPythonModules->'$(Silverlight5BuildDir)\%(Identity)')" DestinationFolder="$(StageDir)\Platforms\Sl5" />
-->
</Target>

<Target Name="NuGetPackage" DependsOnTargets="Stage" Condition="'$(OS)' == 'Windows_NT'">
Expand Down

0 comments on commit 4924355

Please sign in to comment.