Skip to content
This repository has been archived by the owner on Oct 23, 2019. It is now read-only.

Mono build fixes #61

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

weirdan
Copy link
Contributor

@weirdan weirdan commented Jan 6, 2016

This allows to build Phalanger on mono (at least mono/xbuild on Debian/sid) with Release configuration.
Building with Debug doesn't seem to be possible, as it includes some VS specific assemblies (probably for unit-testing).
I've been careful to wrap all mono-specific changes into Condition="'$(OS)' == 'Unix'", so these changes shouldn't break projects on windows/vs.

Added:
	* unix variant of UpdateVileVersionFromChangeset

Changed:
	* made VersionReplacer.exe executable
	* disabled windows-specific snippets in Common.Build.targets on unix
	  plaform
	* added mono-specific switch to prevent csc task from adding
	  /nostdlib switch to csc invocation
* Disabled Soap extension (there's a conflict between System.Data.dll
  and System.Web.dll)
* Disabled SQLite extension (System.Data.SQLite.dll is not available by
  default)
* Fixed stray bracket in Common.Build.settings (was causing 'obj)'
  directory to be created
* Fixed case mismatch in assembly references (System.configuration ->
  System.Configuration and System.XML -> System.Xml)
* Added unix shell PreBuildEvent to XmlDom extension (class dynamizer
  calls)
* Reinstated reference to mscorlib in MkDynamic under mono (xbuild
  requires additional property (NoCompilerStandardLib=false) to be set
  in order for mscorlib to be linked)
* Disabled deployment of Phalanger.CompilerTask on mono because on linux
  machines it requires root permissions, and software is not usually
  built under root account)
* Fixed syntax of Condition="!Exists('$(DeployDestination)')" in
  Phalanger.CompilerTask.csproj for all platforms (xbuild wants single
  quotes around properties, and msbuild allows it)
* Made Tools/ClassDynamizer.exe executable
With <HintPath> it's possible to build SQLite extension on Linux/mono
using bundled System.Data.SQLite.dll
Added property (ForceMSBuildDeploy) to allow separate deployment of the
phalanger compiler task. Useful when you want to build with your own
account, but deploy as root. Does nothing on non-unix systems.

To trigger deployment use the following command:
```
cd Solutions
sudo xbuild \
	/property:Configuration=Release \
	/property:TreatWarningsAsErrors=false \
	/property:ForceMSBuildDeploy=true \
	/t:AfterBuild \
	../Source/Phalanger.CompilerTask/Phalanger.CompilerTask.csproj
```
@lucyllewy
Copy link
Contributor

these stubs should be moved into common.build.targets, the os targeting on the include for that file removed, and os targeting added to any step that cannot ever work on other systems:

<Target Name="Build" Condition="'$(OS)' == 'Unix'"/>
<Target Name="Clean" Condition="'$(OS)' == 'Unix'"/>

@weirdan
Copy link
Contributor Author

weirdan commented Jan 25, 2016

re: stubs - how would that work? If I stub the Build target in the common file it would prevent all projects from building. Care to explain?

@lucyllewy
Copy link
Contributor

oh, you're using the stubs to prevent building? I think I misunderstood their purpose then, where I assumed the stub was required for xbuild to build the project, so including the stub globally would have made sense under my assumption.

@weirdan
Copy link
Contributor Author

weirdan commented Jan 25, 2016

That's right, I don't build Soap extension because there's some kind of a conflict, specifics of which elude me at the moment. Here's relevant part of the commit message:

Disabled Soap extension (there's a conflict between System.Data.dll and System.Web.dll)

@lucyllewy
Copy link
Contributor

ok, in that case then sorry for the confusion over that. Feel free to completely disregard :-p

lucyllewy pushed a commit to lucyllewy/Phalanger that referenced this pull request Feb 26, 2016
  - Extra ) char causing additional output folders to be created
  - Fixed assembly reference capiltalization: System.configuration to System.Configuration
  - include UpdateFileVersionFromChangeset.sh for unix-like systems
  - add call to the UpdateFileVersionFromChangeset.sh script into Common.Build.targets for unix-like systems
  - target the batch script UpdateFileVersionFromChangeset.cmd to only run on Windows NT systems
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants