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

Commit

Permalink
Enable buildin multiple versions of the addin for different MonoDevelop
Browse files Browse the repository at this point in the history
We need the addin to work on multiple versions of MonoDevelop since
Ubuntu locks you down to a particular version. These changes allow
'make pack-all' which builds three packs for
    - MonoDevelop 3.0.3.2 (the last apt-get on Ubuntu)
    - MonoDevelop 3.0.4.7 (the Stable on Mac/Windows)
    - MonoDevelop 3.0.5 (the Beta on Mac/Windows)

These are built against known MonoDevelop binaries in dependencies/...
  • Loading branch information
funnelweb committed Nov 7, 2012
1 parent 8c771a7 commit b2fafe2
Show file tree
Hide file tree
Showing 14 changed files with 769 additions and 74 deletions.
8 changes: 4 additions & 4 deletions FSharp.AutoComplete/FSharp.AutoComplete.fsproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand All @@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<Tailcalls>False</Tailcalls>
<OutputPath>..\bin</OutputPath>
<OutputPath>..\bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
Expand All @@ -28,7 +28,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>True</Optimize>
<Tailcalls>True</Tailcalls>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>bin\Release</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>3</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
Expand Down Expand Up @@ -60,4 +60,4 @@
<Name>FSharp.CompilerBinding</Name>
</ProjectReference>
</ItemGroup>
</Project>
</Project>
4 changes: 2 additions & 2 deletions FSharp.CompilerBinding/FSharp.CompilerBinding.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>False</Optimize>
<OutputPath>bin\Debug</OutputPath>
<OutputPath>..\bin\Debug</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<Tailcalls>False</Tailcalls>
Expand All @@ -25,7 +25,7 @@
<DebugSymbols>True</DebugSymbols>
<DebugType>pdbonly</DebugType>
<Optimize>True</Optimize>
<OutputPath>bin\Release</OutputPath>
<OutputPath>..\bin\Release</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<Tailcalls>True</Tailcalls>
Expand Down
129 changes: 90 additions & 39 deletions Makefile.orig
Original file line number Diff line number Diff line change
@@ -1,63 +1,114 @@
# Makefile for compiling and installing F# MonoDevelop plugin on Mono
# run 'make' to compile the plugin (dll + debug info)
# run 'make install' to copy the compiled plugin to MonoDevelop folders
# run 'make package' to create a deployment binary package with addin (for repository)
# Makefile for compiling, installing and packing F# MonoDevelop plugin on Mono
#
# run 'make' to compile the plugin against the installed version of MonoDevelop detected by ./configure.sh
# run 'make install' to compile and install the plugin against the installed version of MonoDevelop detected by ./configure.sh
# run 'make pack-all' to create a deployment binary packages for the known set of supported MonoDevelop versions

# Here are a few paths that need to be configured first:
MDROOT = INSERT_MD_ROOT
#MONOBIN = INSERT_MONO_BIN
VERSION=3.2.2

MDTOOL = $(MONO) $(MDROOT)/../../mdtool
MDTOOL = $(MONO) INSERT_MDROOT/../../mdtool

.PHONY: all
# (MDVERSION3, MDVERSION4) can be set to something like (3.0.4, 3.0.4.7) to compile
# against the dependencies/... binaries for a specific version of MonoDevelop. This allows
# us to prepare new editions of the binding for several different versions of MonoDevelop.
MDVERSION3=INSERT_MDVERSION3
MDVERSION4=INSERT_MDVERSION4

all: release
ifeq ($(USE_KNOWN_BINARIES),true)
MDROOT=../dependencies/monodevelop.$(MDVERSION4)
MDTAG=monodevelop-$(MDVERSION4)
else
MDROOT=INSERT_MDROOT
MDTAG=monodevelop-installed-$(MDVERSION4)
endif

debug:
(cd FSharp.CompilerBinding && xbuild FSharp.CompilerBinding.fsproj)
(cd FSharp.AutoComplete && xbuild FSharp.AutoComplete.fsproj)
(cd MonoDevelop.FSharpBinding/Gui && xbuild MonoDevelop.FSharp.Gui.csproj)
(cd MonoDevelop.FSharpBinding && xbuild MonoDevelop.FSharp.fsproj)

release:
(cd FSharp.CompilerBinding && xbuild FSharp.CompilerBinding.fsproj /p:Configuration=Release)
(cd FSharp.AutoComplete && xbuild FSharp.AutoComplete.fsproj /p:Configuration=Release)
(cd MonoDevelop.FSharpBinding/Gui && xbuild MonoDevelop.FSharp.Gui.csproj /p:Configuration=Release)
(cd MonoDevelop.FSharpBinding && xbuild MonoDevelop.FSharp.fsproj /p:Configuration=Release)
# The default configuration is Release
ifeq ($(CONFIG),)
CONFIG=Release
endif

.PHONY: all

VERSION=3.2.1
all: build

install: install-release
build: MonoDevelop.FSharpBinding/MonoDevelop.FSharp.$(MDTAG).fsproj MonoDevelop.FSharpBinding/FSharpBinding.$(MDTAG).addin.xml
(cd FSharp.CompilerBinding && xbuild FSharp.CompilerBinding.fsproj /p:Configuration=$(CONFIG))
(cd FSharp.AutoComplete && xbuild FSharp.AutoComplete.fsproj /p:Configuration=$(CONFIG))
(cd MonoDevelop.FSharpBinding/Gui && xbuild MonoDevelop.FSharp.Gui.csproj /p:Configuration=$(CONFIG))
(cd MonoDevelop.FSharpBinding && xbuild MonoDevelop.FSharp.$(MDTAG).fsproj /p:Configuration=$(CONFIG))

install-debug: debug
-rm -fr pack/debug
@-mkdir pack/debug
$(MDTOOL) setup pack bin/FSharpBinding.addin.xml -d:pack/debug
$(MDTOOL) setup install -y pack/debug/MonoDevelop.FSharpBinding_$(VERSION).mpack

install-release: release
-rm -fr pack/release
@-mkdir pack/release
$(MDTOOL) setup pack bin/Release/FSharpBinding.addin.xml -d:pack/release
$(MDTOOL) setup install -y pack/release/MonoDevelop.FSharpBinding_$(VERSION).mpack
pack: build
cp -pr bin/$(CONFIG)/* bin/$(MDTAG)/$(CONFIG)/
-rm -fr pack/$(VERSION)/$(MDTAG)/$(CONFIG)
@-mkdir -p pack/$(VERSION)/$(MDTAG)/$(CONFIG)
$(MDTOOL) setup pack bin/$(MDTAG)/$(CONFIG)/FSharpBinding.$(MDTAG).addin.xml -d:pack/$(VERSION)/$(MDTAG)/$(CONFIG)

install: pack
$(MDTOOL) setup install -y pack/$(VERSION)/$(MDTAG)/$(CONFIG)/MonoDevelop.FSharpBinding_$(VERSION).mpack

uninstall:
$(MDTOOL) setup uninstall MonoDevelop.FSharpBinding


package: $(TARGETS)
-rm -fr pack
@-mkdir pack
$(MDTOOL) setup pack bin/FSharpBinding.addin.xml -d:pack
pack-all: windows-build-support
$(MAKE) USE_KNOWN_BINARIES=true MDVERSION3=3.0.3 MDVERSION4=3.0.3.2 CONFIG=Release pack
$(MAKE) USE_KNOWN_BINARIES=true MDVERSION3=3.0.4 MDVERSION4=3.0.4.7 CONFIG=Release pack
$(MAKE) USE_KNOWN_BINARIES=true MDVERSION3=3.0.5 MDVERSION4=3.0.5 CONFIG=Release pack

autocomplete:
(cd FSharp.CompilerBinding && xbuild FSharp.CompilerBinding.fsproj /p:Configuration=Release)
(cd FSharp.AutoComplete && xbuild FSharp.AutoComplete.fsproj /p:Configuration=Release)

clean:
-rm -fr bin
(cd MonoDevelop.FSharpBinding && xbuild MonoDevelop.FSharp.fsproj /target:Clean /p:MDROOT=$(MDROOT))
(cd MonoDevelop.FSharpBinding/Gui && xbuild MonoDevelop.FSharp.Gui.csproj /target:Clean /p:MDROOT=$(MDROOT))
-rm -fr pack
-rm -fr MonoDevelop.FSharpBinding/FSharpBinding.*.addin.xml
-rm -fr MonoDevelop.FSharpBinding/MonoDevelop.FSharp.*.fsproj
-rm -fr MonoDevelop.FSharpBinding/obj
(cd MonoDevelop.FSharpBinding/Gui && xbuild MonoDevelop.FSharp.Gui.csproj /target:Clean)
(cd FSharp.CompilerBinding && xbuild FSharp.CompilerBinding.fsproj /target:Clean)
(cd FSharp.AutoComplete && xbuild FSharp.AutoComplete.fsproj /target:Clean)


# Apply the known binding versions and MonoDevelop versions to the project file
MonoDevelop.FSharpBinding/MonoDevelop.FSharp.$(MDTAG).fsproj: MonoDevelop.FSharpBinding/MonoDevelop.FSharp.orig
sed \
-e "s,INSERT_FSPROJ_MDROOT,$(MDROOT),g" \
-e "s,INSERT_FSPROJ_MDVERSION3,$(MDVERSION3),g" \
-e "s,INSERT_FSPROJ_MDVERSION4,$(MDVERSION4),g" \
-e "s,INSERT_FSPROJ_MDTAG,$(MDTAG),g" \
$< > $@

# Apply the known binding versions and MonoDevelop versions to the addin description
MonoDevelop.FSharpBinding/FSharpBinding.$(MDTAG).addin.xml: MonoDevelop.FSharpBinding/FSharpBinding.addin.xml.orig
sed \
-e "s,INSERT_FSPROJ_VERSION,$(VERSION),g" \
-e "s,INSERT_FSPROJ_MDVERSION3,$(MDVERSION3),g" \
-e "s,INSERT_FSPROJ_MDVERSION4,$(MDVERSION4),g" \
-e "s,INSERT_FSPROJ_MDTAG,$(MDTAG),g" \
$< > $@

# Update the files for use on Windows
MonoDevelop.FSharpBinding/MonoDevelop.FSharp.windows.fsproj: MonoDevelop.FSharpBinding/MonoDevelop.FSharp.orig
sed \
-e "s,INSERT_FSPROJ_MDROOT,c:\\\\Program Files (x86)\\\\MonoDevelop,g" \
-e "s,INSERT_FSPROJ_MDVERSION3,$(MDVERSION3),g" \
-e "s,INSERT_FSPROJ_MDVERSION4,$(MDVERSION4),g" \
-e "s,INSERT_FSPROJ_MDTAG,windows,g" \
$< > $@


# Update the files for use on Windows
MonoDevelop.FSharpBinding/FSharpBinding.windows.addin.xml: MonoDevelop.FSharpBinding/FSharpBinding.addin.xml.orig
sed \
-e "s,INSERT_FSPROJ_VERSION,$(VERSION),g" \
-e "s,INSERT_FSPROJ_MDVERSION3,$(MDVERSION3),g" \
-e "s,INSERT_FSPROJ_MDVERSION4,$(MDVERSION4),g" \
-e "s,INSERT_FSPROJ_MDTAG,windows,g" \
$< > $@

windows-build-support: MonoDevelop.FSharpBinding/MonoDevelop.FSharp.windows.fsproj MonoDevelop.FSharpBinding/FSharpBinding.windows.addin.xml


# (cd addins/MonoDevelop.FSharp.AspNet.Mvc && xbuild MonoDevelop.FSharp.AspNet.Mvc.fsproj /p:Configuration=$(CONFIG))
Loading

0 comments on commit b2fafe2

Please sign in to comment.