(ded4a3e0a) v0.9.0.7

This commit is contained in:
Joonas Rikkonen
2019-06-25 16:00:44 +03:00
parent e5ae622c77
commit 4a51db77b5
1777 changed files with 421528 additions and 917 deletions
@@ -0,0 +1,182 @@
.TH MGCB 1 "October 2017" "MonoGame 3.7"
.SH NAME
mgcb \- builds optimized game content for MonoGame projects
.SH SYNOPSIS
.B mgcb
[\fR\fIOPTIONS\fR]
.\".IR file ...
.SH DESCRIPTION
.B mgcb
is a command line tool for building XNB content on Windows, Mac, and Linux desktop systems.
Typically it is executed by the Pipeline GUI tool when editing content or indirectly from Visual Studio or MonoDevelop during the build process of a MonoGame project. Alternatively you can use it yourself from the command line for specialized build pipelines or for debugging content processing.
.TP
.BR \fIFILENAME\fR
Automatically selects either --build or --@ option, depending on the file extension. See below for more detail on what these options are.
.TP
.BR \-@ ", " \-\-@ =\fIRESPONSEFILE\fR
Read a text response file with additional command line options and switches.
.TP
.BR \-b ", " \-\-build =\fISOURCEFILE\fR;\fIDESTINATIONFILE\fR
Build the content source file using the previously set switches and options. Optional destination path may be specified if you want to change the output filepath.
.TP
.BR \-c ", " \-\-clean
Delete all previously built content and intermediate files.
.TP
.BR \-\-compress
Compress the XNB files for smaller file sizes.
.TP
.BR \-\-config =\fISTRING\fR
The optional build config string from the build system.
.TP
.BR \-\-copy =\fISOURCEFILE\fR
Copy the content source file verbatim to the output directory.
.TP
.BR \-h ", " \-\-help
Displays help menu.
.TP
.BR \-i ", " \-\-importer =\fICLASSNAME\fR
Defines the class name of the content importer for reading source content.
.TP
.BR \-I ", " \-\-incremental
Skip cleaning files not included in the current build.
.TP
.BR \-n ", " \-\-intermediateDir =\fIPATH\fR
The directory where all intermediate files are written. See below for path macros.
.TP
.BR \-d ", " \-\-launchdebugger
Wait for debugger to attach before building content.
.TP
.BR \-o ", " \-\-outputDir =\fIPATH\fR
The directory where all content is written. See below for path macros.
.TP
.BR \-t ", " \-\-platform =\fITARGETPLATFORM\fR
Set the target platform for this build. Defaults to Windows desktop DirectX.
The following is the list of available target platforms:
.RS
.TP 20
.BR Windows
Windows DirectX desktop platform.
.TP 20
.BR Xbox360
Xbox 360 platform.
.TP 20
.BR iOS
iOS platform.
.TP 20
.BR Android
Android platform.
.TP 20
.BR DesktopGL
OpenGL desktop platform.
.TP 20
.BR MacOSX
MacOSX platform
.TP 20
.BR WindowsStoreApp
UWP platform.
.TP 20
.BR NativeClient
Web native client platform.
.TP 20
.BR PlayStationMobile
PlayStation mobile platform.
.TP 20
.BR WindowsPhone8
Windows Phone 8 platform.
.TP 20
.BR RaspberryPi
Raspberry Pi platform.
.TP 20
.BR PlayStation4
PlayStation 4 platform.
.TP 20
.BR PSVita
PlayStation Vita platform.
.TP 20
.BR XboxOne
Xbox One platform.
.TP 20
.BR Switch
Nintendo Switch platform.
.RE
.TP
.BR \-p ", " \-\-processor =\fICLASSNAME\fR
Defines the class name of the content processor for processing imported content.
.TP
.BR \-P ", " \-\-processorParam =\fINAME:VALUE\fR
Defines a parameter name and value to set on a content processor.
.TP
.BR \-g ", " \-\-profile =\fIGRAPHICSPROFILE\fR
Set the target graphics profile for this build. Defaults to HiDef.
The following is the list of available graphics profiles:
.RS
.TP 8
.BR Reach
Use a limited set of graphic features and capabilities, allowing the game to support the widest variety of devices.
.TP 8
.BR HiDef
Use the largest available set of graphic features and capabilities to target devices, that have more enhanced graphic capabilities.
.RE
.TP
.BR \-q ", " \-\-quiet
Only output content build errors.
.TP
.BR \-r ", " \-\-rebuild
Forces a full rebuild of all content.
.TP
.BR \-f ", " \-\-reference =\fIASSEMBLY\fR
Adds an assembly reference for resolving content importers, processors, and writers.
.TP
.BR \-w ", " \-\-workingDir =\fIDIRECTORYPATH\fR
The working directory where all source content is located.
.TP
All command can be also called using / instead of \-\- or \-, this is to ensure compatibility between executing the command from Windows and Unix.
.SH PATH MACROS
The following is a list of custom path macros:
.TP
.BR $(Platform)
Gets replaced by the target platform.
.TP
.BR $(Configuration)\ /\ $(Config)
Gets replaced by the current config string.
.TP
.BR $(Profile)
Gets replaced by the current graphics profile.
.SH SEE ALSO
.TP
More documentation is available at: <http://www.monogame.net/documentation/?page=MGCB>
@@ -0,0 +1,85 @@
# MGCB autocomplete for bash
function _mgcbcomplete()
{
local cur prev
_get_comp_words_by_ref -n = cur prev
case "$cur" in
"--platform="* | "-t="* | "/platform="* | "/t="*)
COMPREPLY=($(compgen -W "Windows Xbox360 iOS Android DesktopGL \
MacOSX WindowsStoreApp NativeClient \
PlayStationMobile WindowsPhone8 RaspberryPi \
PlayStation4 PSVita XboxOne Switch" -- ${cur#*=}))
compopt +o nospace
return 0;
;;
"--profile="* | "-p="* | "/profile="* | "/p="*)
COMPREPLY=($(compgen -W "Reach HiDef" -- ${cur#*=}))
compopt +o nospace
return 0;
;;
"--build="* | "--outputDir="* | "--intermediateDir="* | \
"--workingDir="* | "--copy="* | "--reference"* | "--@="* | \
"-b="* | "-o="* | "-n="* | "-w="* | "-f="* | "-@="* | \
"/build="* | "/outputDir="* | "/intermediateDir="* | \
"/workingDir="* | "/copy="* | "/reference"* | \
"/b="* | "/o="* | "/n="* | "/w="* | "/f="* | "/@="*)
COMPREPLY=()
return 0
;;
"--config=" | "/config=")
return 0;
;;
"--processor=" | "--importer=" | "--processorParam=" | \
"/processor=" | "/importer=" | "/processorParam=")
# TODO
return 0;
;;
"-b" | "-o" | "-n" | "-w" | "-f" | "-@" | \
"-q" | "-t" | "-p" | "-P" | "-i" | \
"/b" | "/o" | "/n" | "/w" | "/f" | "/@" | \
"/q" | "/t" | "/p" | "/P" | "/i")
COMPREPLY=("$cur=")
return 0;
;;
"-c" | "-h" | "-I" | "-d" | "-q" | "-r" | \
"/c" | "/h" | "/I" | "/d" | "/q" | "/r")
COMPREPLY=("$cur")
compopt +o nospace
return 0;
;;
esac
if [[ "$cur" == "--"* ]]
then
COMPREPLY=($(compgen -W "--@= --build= --clean --compress --config= --copy= \
--help --importer= --incremental --intermediateDir= \
--launchdebugger --outputDir= --platform= --processor= \
--processorParam= --profile= --quiet --rebuild \
--reference= --workingDir=" -- $cur))
if [[ ${COMPREPLY[0]} != *"=" ]]
then
compopt +o nospace
fi
return 0;
fi
if [[ "$cur" == "/"* ]]
then
COMPREPLY=($(compgen -W "/@= /build= /clean /compress /config= /copy= \
/help /importer= /incremental /intermediateDir= \
/launchdebugger /outputDir= /platform= /processor= \
/processorParam= /profile= /quiet /rebuild \
/reference= /workingDir=" -- $cur))
if [[ ${COMPREPLY[0]} != *"=" ]]
then
compopt +o nospace
fi
return 0;
fi
}
complete -o nospace -o default -F _mgcbcomplete mgcb
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
width="512.000000pt"
height="512.000000pt"
viewBox="0 0 512.000000 512.000000"
preserveAspectRatio="xMidYMid meet"
id="svg4186"
inkscape:version="0.91 r"
sodipodi:docname="LogoOnly_512px (1).svg">
<defs
id="defs4196" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1016"
id="namedview4194"
showgrid="false"
inkscape:zoom="0.64375"
inkscape:cx="229.78683"
inkscape:cy="330.02803"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg4186" />
<metadata
id="metadata4188">
Created by potrace 1.11, written by Peter Selinger 2001-2013
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
fill="#000000"
stroke="none"
id="g4190"
style="fill:#e73c00;fill-opacity:1">
<path
d="M1300 5106 c-438 -68 -809 -304 -1049 -667 -106 -159 -179 -336 -224 -538 -20 -94 -21 -119 -24 -1291 -3 -1040 -2 -1209 12 -1301 50 -344 189 -624 430 -864 238 -239 524 -382 860 -430 148 -22 2362 -22 2510 0 465 67 858 331 1101 738 57 96 125 261 153 372 47 182 51 247 51 843 l0 562 -1510 0 -1510 0 0 -465 0 -465 1046 0 1047 0 -5 -112 c-4 -90 -11 -127 -31 -180 -69 -181 -218 -315 -402 -363 -52 -13 -203 -15 -1195 -15 -992 0 -1143 2 -1195 15 -183 48 -330 180 -403 363 l-27 67 -3 1159 c-3 1279 -6 1209 61 1345 21 45 56 90 107 141 119 119 244 170 417 170 253 0 473 -162 555 -410 21 -61 22 -87 26 -467 l3 -403 459 0 459 0 3 403 c4 380 5 406 26 467 116 349 500 510 828 349 121 -60 227 -179 282 -317 l27 -67 3 -417 3 -418 465 0 465 0 -4 448 c-4 493 -8 528 -77 732 -212 636 -827 1057 -1495 1027 -340 -15 -652 -137 -912 -356 l-73 -61 -72 61 c-197 165 -425 276 -678 329 -132 27 -384 36 -510 16z"
id="path4192"
style="fill:#e73c00;fill-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="text/x-mgcb">
<comment>MonoGame Pipeline Project</comment>
<generic-icon name="monogame"/>
<icon name="monogame"/>
<glob pattern="*.mgcb"/>
</mime-type>
</mime-info>
@@ -0,0 +1,143 @@
#!/bin/bash
# Functions
echodep()
{
line=" - $1"
while [ ${#line} -lt 50 ]
do
line="$line."
done
echo -ne "$line"
if eval "$2"
then
echo -e "\e[32m[Found]\e[0m"
else
echo -e "\e[31m[Not Found]\e[0m"
fi
}
# Check installation priviledge
if [ "$(id -u)" != "0" ]; then
echo "Please make sure you are running this installer with sudo or as root." 1>&2
exit 1
fi
DIR=$(pwd)
IDIR="/usr/lib/mono/xbuild/MonoGame/v3.0"
# Show dependency list
echo "Dependencies:"
echodep "mono-runtime" "type 'mono' > /dev/null 2>&1"
echo ""
read -p "Continue (Y, n): " choice2
case "$choice2" in
n|N ) exit ;;
*) ;;
esac
# Check previous versions
if type "mgcb" > /dev/null 2>&1
then
echo "Previous version detected, trying to uninstall..."
# Try and uninstall previus versions
if [ -f /opt/monogame/uninstall.sh ]
then
sudo bash /opt/monogame/uninstall.sh
elif [ -f /opt/MonoGameSDK/uninstall.sh ]
then
sudo bash /opt/MonoGameSDK/uninstall.sh
else
echo "Could not uninstall, please uninstall any previous version of MonoGame SDK manually." 1>&2
exit 1
fi
fi
# MonoGame SDK installation
echo "Installing MonoGame SDK..."
rm -rf "$IDIR"
mkdir -p "$IDIR"
cp -rf "$DIR/MonoGameSDK/." "$IDIR" -R
rm -rf "/opt/MonoGameSDK"
ln -s "$IDIR" "/opt/MonoGameSDK"
# Fix Permissions
chmod +x "$IDIR/Tools/ffmpeg"
chmod +x "$IDIR/Tools/ffprobe"
# Monogame Pipeline terminal commands
echo "Creating launcher items..."
cat > /usr/bin/monogame-pipeline-tool <<'endmsg'
#!/bin/bash
mono /usr/lib/mono/xbuild/MonoGame/v3.0/Tools/Pipeline.exe "$@"
endmsg
chmod +x /usr/bin/monogame-pipeline-tool
cat > /usr/bin/mgcb <<'endmsg'
#!/bin/bash
mono /usr/lib/mono/xbuild/MonoGame/v3.0/Tools/MGCB.exe "$@"
endmsg
chmod +x /usr/bin/mgcb
cp "$DIR/Main/mgcbcomplete" "/etc/bash_completion.d/mgcb"
# MonoGame icon
mkdir -p /usr/share/icons/hicolor/scalable/mimetypes
cp $DIR/Main/monogame.svg /usr/share/icons/hicolor/scalable/mimetypes/monogame.svg
gtk-update-icon-cache /usr/share/icons/hicolor/ -f &> /dev/null
# Application launcher
cat > /usr/share/applications/MonogamePipeline.desktop <<'endmsg'
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=MonoGame Pipeline Tool
GenericName=MonoGame Pipeline Tool
Comment=Creates platform specific content files.
Exec=monogame-pipeline-tool %F
TryExec=monogame-pipeline-tool
Icon=monogame
StartupNotify=true
Terminal=false
Type=Application
MimeType=text/x-mgcb;
Categories=Development;
StartupWMClass=Pipeline
endmsg
# Man pages
echo "Installing man pages..."
IFS=':' read -r -a ARRAY <<< "$(manpath)"
for MANPATH in "${ARRAY[@]}"
do
if [ -d "$MANPATH/man1" ]
then
cp -f "$DIR/Main/mgcb.1" "$MANPATH/man1/mgcb.1"
gzip -f "$MANPATH/man1/mgcb.1"
break
fi
done
# Mimetype
echo "Adding mimetype..."
touch mgcb.xml
xdg-mime uninstall mgcb.xml
xdg-mime install $DIR/Main/x-mgcb.xml > /dev/null
xdg-mime default "MonogamePipeline.desktop" text/mgcb
# Uninstall script
chmod +x $IDIR/uninstall.sh
ln -s $IDIR/uninstall.sh /usr/bin/monogame-uninstall
echo "Installation complete"
echo ""
echo " - To uninstall MonoGame SDK you can run 'monogame-uninstall' from terminal."
echo " - To install templates for MonoDevelop, go Tools > Extensions > Gallery > Game Development > MonoGame Extensions, and install it."
echo " - To install templates for Rider simply run 'dotnet new --install MonoGame.Templates.CSharp'"
echo ""
echo ""
@@ -0,0 +1,34 @@
#!/bin/bash
# Check removale priviledge
if [ "$(id -u)" != "0" ]; then
echo "Please make sure you are running this uninstaller with sudo or as root." 1>&2
exit 1
fi
# Remove terminal commands for mgcb and pipeline tool
rm -f /usr/bin/monogame-pipeline-tool
rm -f /usr/bin/monogame-uninstall
rm -f /usr/bin/mgcb
rm -f /etc/bash_completion.d/mgcb
# Remove application icon
rm -rf /usr/share/icons/gnome/scalable/mimetypes/monogame.svg
# Remove pipeline tool application launcher
rm -rf /usr/share/applications/Monogame\ Pipeline.desktop
# Remove mgcb mimetype
touch /opt/MonoGameSDK/x-mgcb.xml
xdg-mime uninstall /opt/MonoGameSDK/x-mgcb.xml
# Remove MonoGame SDK
rm -rf /usr/lib/mono/xbuild/MonoGame
rm -rf /opt/MonoGameSDK
# Remove man pages
IFS=':' read -r -a ARRAY <<< "$(manpath)"
for MANPATH in "${ARRAY[@]}"
do
rm -rf "$MANPATH/man1/mgcb.1.gz"
done
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

@@ -0,0 +1,19 @@
#!/bin/bash
if [ -d "/Applications/Xamarin Studio.app" ]
then
CONSOLE_USER=$(stat -f '%Su' /dev/console)
sudo -u $CONSOLE_USER /Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool setup install /tmp/MonoDevelop.MonoGame_*.mpack -y
fi
if [ -d "/Applications/Visual Studio.app" ]
then
CONSOLE_USER=$(stat -f '%Su' /dev/console)
sudo -u $CONSOLE_USER /Applications/Visual\ Studio.app/Contents/MacOS/vstool setup install /tmp/MonoDevelop.MonoGame_IDE_VisualStudioForMac_*.mpack -y
fi
if [ -f "/tmp/MonoDevelop.MonoGame_*.mpack" ]
then
sudo rm /tmp/MonoDevelop.MonoGame_*.mpack
fi
if [ -f "/tmp/MonoDevelop.MonoGame_IDE_VisualStudioForMac_*.mpack" ]
then
sudo rm /tmp/MonoDevelop.MonoGame_IDE_VisualStudioForMac_*.mpack
fi
@@ -0,0 +1,2 @@
#!/bin/bash
@@ -0,0 +1,47 @@
#!/bin/bash
#fix permissions
chmod +x /Applications/Pipeline.app/Contents/MacOS/Pipeline
chmod +x /Applications/Pipeline.app/Contents/MonoBundle/ffmpeg
chmod +x /Applications/Pipeline.app/Contents/MonoBundle/ffprobe
chmod +x /Applications/Pipeline.app/Contents/MonoBundle/mono
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -v -f /Applications/Pipeline.app
#mgcb terminal command
if [ ! -d /usr/local/bin ]
then
if [ ! -d /usr/local ]
then
mkdir /usr/local
fi
chgrp -R admin /usr/local
chmod -R 755 /usr/local
mkdir /usr/local/bin
fi
if [ -f /usr/local/bin/mgcb ]
then
rm /usr/local//bin/mgcb
fi
echo "#!/bin/bash
mono /Applications/Pipeline.app/Contents/MonoBundle/MGCB.exe \"\$@\"" >> /usr/local/bin/mgcb
chmod u+x /usr/local/bin/mgcb
#write an uninstaller
if [ -f /usr/local/bin/monogame-uninstall ]
then
rm /usr/local/bin/monogame-uninstall
fi
echo "#!/bin/bash
sudo rm -Rf '/Applicatons/Pipeline.app/'
sudo pkgutil --forget com.monogame.pipeline
if [ -d '/Applications/Xamarin Studio.app' ]
then
/Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool setup uninstall MonoDevelop.MonoGame -y
fi
if [ ! -d '/Library/Frameworks/Mono.framework/Versions/4.6.2' ]
ln -s /Library/Frameworks/Mono.framework/Versions/Current /Library/Frameworks/Mono.framework/Versions/4.6.2
fi
sudo rm /usr/local/bin/mgcb
sudo rm /usr/local/bin/monogame-uninstall
" >> /usr/local/bin/monogame-uninstall
chmod +x /usr/local/bin/monogame-uninstall
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
<title>MonoGame 0.0.0.0</title>
<background file="background.png" mime-type="image/png" />
<license file="LICENSE.html" mime-type="text/html"/>
<pkg-ref id="com.monogame.pipeline"/>
<pkg-ref id="com.monogame.xsaddin"/>
<pkg-ref id="com.monogame.framework"/>
<options customize="never" require-scripts="false"/>
<choices-outline>
<line choice="default">
<line choice="com.monogame.pipeline"/>
<line choice="com.monogame.xsaddin"/>
<line choice="com.monogame.framework"/>
</line>
</choices-outline>
<choice id="default"/>
<choice id="com.monogame.pipeline" visible="false">
<pkg-ref id="com.monogame.pipeline"/>
</choice>
<pkg-ref id="com.monogame.pipeline" version="1" onConclusion="none">Pipeline.MacOS.pkg</pkg-ref>
<choice id="com.monogame.xsaddin" visible="false">
<pkg-ref id="com.monogame.xsaddin"/>
</choice>
<pkg-ref id="com.monogame.xsaddin" version="1" onConclusion="none">MonoGame.XamarinStudio.Addin.pkg</pkg-ref>
<choice id="com.monogame.framework" visible="false">
<pkg-ref id="com.monogame.framework"/>
</choice>
<pkg-ref id="com.monogame.framework" version="1" onConclusion="none">MonoGame.framework.pkg</pkg-ref>
</installer-gui-script>
@@ -0,0 +1,396 @@
SetCompressor /SOLID /FINAL lzma
!include "header.nsh"
!define APPNAME "MonoGame"
;Include Modern UI
!include "Sections.nsh"
!include "MUI2.nsh"
!include "InstallOptions.nsh"
!define MUI_ICON "${FrameworkPath}\monogame.ico"
!define MUI_UNICON "${FrameworkPath}\monogame.ico"
Name '${APPNAME} SDK ${INSTALLERVERSION}'
OutFile 'MonoGameSetup.exe'
InstallDir '$PROGRAMFILES\${APPNAME}\v${VERSION}'
!define MSBuildInstallDir '$PROGRAMFILES32\MSBuild\${APPNAME}\v${VERSION}'
VIProductVersion "${INSTALLERVERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${APPNAME} SDK"
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The MonoGame Team"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${INSTALLERVERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "${INSTALLERVERSION}"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "${APPNAME} SDK Installer"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright © The MonoGame Team"
; Request application privileges for Windows Vista
RequestExecutionLevel admin
;Interface Configuration
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "${FrameworkPath}\monogame.bmp"
!define MUI_ABORTWARNING
!define MUI_WELCOMEFINISHPAGE_BITMAP "${FrameworkPath}\panel.bmp"
;Languages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "..\..\License.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!macro VS_ASSOCIATE_EDITOR TOOLNAME VSVERSION EXT TOOLPATH
WriteRegStr HKCU 'Software\Microsoft\VisualStudio\${VSVERSION}\Default Editors\${EXT}' 'Custom' '${TOOLNAME}'
WriteRegDWORD HKCU 'Software\Microsoft\VisualStudio\${VSVERSION}\Default Editors\${EXT}' 'Type' 0x00000002
WriteRegStr HKCU 'Software\Microsoft\VisualStudio\${VSVERSION}\Default Editors\${EXT}\${TOOLNAME}' '' '${TOOLPATH}'
WriteRegStr HKCU 'Software\Microsoft\VisualStudio\${VSVERSION}\Default Editors\${EXT}\${TOOLNAME}' 'Arguments' ''
!macroend
!macro APP_ASSOCIATE EXT FILECLASS DESCRIPTION ICON COMMANDTEXT COMMAND
WriteRegStr HKCR ".${EXT}" "" "${FILECLASS}"
WriteRegStr HKCR "${FILECLASS}" "" `${DESCRIPTION}`
WriteRegStr HKCR "${FILECLASS}\DefaultIcon" "" `${ICON}`
WriteRegStr HKCR "${FILECLASS}\shell" "" "open"
WriteRegStr HKCR "${FILECLASS}\shell\open" "" `${COMMANDTEXT}`
WriteRegStr HKCR "${FILECLASS}\shell\open\command" "" `${COMMAND}`
!macroend
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
; The stuff to install
Section "MonoGame Core Components" CoreComponents ;No components page, name is not important
SectionIn RO
; Install the VS support files.
SetOutPath ${MSBuildInstallDir}
File '..\..\MonoGame.Framework.Content.Pipeline\MonoGame.Content.Builder.targets'
File '..\..\MonoGame.Framework.Content.Pipeline\MonoGame.Common.props'
File '..\..\Tools\Pipeline\bin\Windows\AnyCPU\Release\MonoGame.Build.Tasks.dll'
; Install the MonoGame tools to a single shared folder.
SetOutPath ${MSBuildInstallDir}\Tools
File /r '..\..\Tools\2MGFX\bin\Windows\AnyCPU\Release\*.exe'
File /r '..\..\Tools\2MGFX\bin\Windows\AnyCPU\Release\*.dll'
File /r '..\..\Tools\MGCB\bin\Windows\AnyCPU\Release\*.exe'
File /r '..\..\Tools\MGCB\bin\Windows\AnyCPU\Release\*.dll'
File /r '..\..\Tools\Pipeline\bin\Windows\AnyCPU\Release\*.exe'
File /r '..\..\Tools\Pipeline\bin\Windows\AnyCPU\Release\*.dll'
File /r '..\..\Tools\Pipeline\bin\Windows\AnyCPU\Release\*.xml'
File /r '..\..\Tools\Pipeline\bin\Windows\AnyCPU\Release\Templates'
; Associate .mgcb files open in the Pipeline tool.
!insertmacro VS_ASSOCIATE_EDITOR 'MonoGame Pipeline' '10.0' 'mgcb' '${MSBuildInstallDir}\Tools\Pipeline.exe'
!insertmacro VS_ASSOCIATE_EDITOR 'MonoGame Pipeline' '11.0' 'mgcb' '${MSBuildInstallDir}\Tools\Pipeline.exe'
!insertmacro VS_ASSOCIATE_EDITOR 'MonoGame Pipeline' '12.0' 'mgcb' '${MSBuildInstallDir}\Tools\Pipeline.exe'
!insertmacro VS_ASSOCIATE_EDITOR 'MonoGame Pipeline' '14.0' 'mgcb' '${MSBuildInstallDir}\Tools\Pipeline.exe'
!insertmacro VS_ASSOCIATE_EDITOR 'MonoGame Pipeline' '15.0' 'mgcb' '${MSBuildInstallDir}\Tools\Pipeline.exe'
!insertmacro APP_ASSOCIATE 'mgcb' 'MonoGame.ContentBuilderFile' 'A MonoGame content builder project.' '${MSBuildInstallDir}\Tools\Pipeline.exe,0' 'Open with Pipeline' '${MSBuildInstallDir}\Tools\Pipeline.exe "%1"'
; Install the assemblies for all the platforms we can
; target from a Windows desktop system.
; Install Android Assemblies
SetOutPath '$INSTDIR\Assemblies\Android'
File '..\..\MonoGame.Framework\bin\Android\AnyCPU\Release\*.dll'
File '..\..\MonoGame.Framework\bin\Android\AnyCPU\Release\*.xml'
; Install DesktopGL Assemblies
SetOutPath '$INSTDIR\Assemblies\DesktopGL'
File /nonfatal '..\..\MonoGame.Framework\bin\WindowsGL\AnyCPU\Release\*.dll'
File /nonfatal ' ..\..\MonoGame.Framework\bin\WindowsGL\AnyCPU\Release\*.xml'
File '..\..\ThirdParty\Dependencies\SDL\MacOS\Universal\libSDL2-2.0.0.dylib'
File '..\..\ThirdParty\Dependencies\openal-soft\MacOS\Universal\libopenal.1.dylib'
File '..\..\ThirdParty\Dependencies\MonoGame.Framework.dll.config'
; Install x86 DesktopGL Dependencies
SetOutPath '$INSTDIR\Assemblies\DesktopGL\x86'
File '..\..\ThirdParty\Dependencies\SDL\Windows\x86\SDL2.dll'
File '..\..\ThirdParty\Dependencies\openal-soft\Windows\x86\soft_oal.dll'
File '..\..\ThirdParty\Dependencies\SDL\Linux\x86\libSDL2-2.0.so.0'
File '..\..\ThirdParty\Dependencies\openal-soft\Linux\x86\libopenal.so.1'
; Install x64 DesktopGL Dependencies
SetOutPath '$INSTDIR\Assemblies\DesktopGL\x64'
File '..\..\ThirdParty\Dependencies\SDL\Windows\x64\SDL2.dll'
File '..\..\ThirdParty\Dependencies\openal-soft\Windows\x64\soft_oal.dll'
File '..\..\ThirdParty\Dependencies\SDL\Linux\x64\libSDL2-2.0.so.0'
File '..\..\ThirdParty\Dependencies\openal-soft\Linux\x64\libopenal.so.1'
; Install Windows Desktop DirectX Assemblies
SetOutPath '$INSTDIR\Assemblies\Windows'
File '..\..\MonoGame.Framework\bin\Windows\AnyCPU\Release\*.dll'
File '..\..\MonoGame.Framework\bin\Windows\AnyCPU\Release\*.xml'
; Install Windows 10 UAP Assemblies
SetOutPath '$INSTDIR\Assemblies\WindowsUniversal'
File '..\..\MonoGame.Framework\bin\WindowsUniversal\AnyCPU\Release\*.dll'
File '..\..\MonoGame.Framework\bin\WindowsUniversal\AnyCPU\Release\*.xml'
; Install iOS Assemblies
IfFileExists `$PROGRAMFILES\MSBuild\Xamarin\iOS\*.*` InstalliOSAssemblies SkipiOSAssemblies
InstalliOSAssemblies:
SetOutPath '$INSTDIR\Assemblies\iOS'
File '..\..\MonoGame.Framework\bin\iOS\iPhoneSimulator\Release\*.dll'
File '..\..\MonoGame.Framework\bin\iOS\iPhoneSimulator\Release\*.xml'
SetOutPath '$INSTDIR\Assemblies\tvOS'
File '..\..\MonoGame.Framework\bin\tvOS\iPhoneSimulator\Release\*.dll'
File '..\..\MonoGame.Framework\bin\tvOS\iPhoneSimulator\Release\*.xml'
SkipiOSAssemblies:
WriteRegStr HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME} for Desktop OpenGL' '' '$INSTDIR\Assemblies\DesktopGL'
WriteRegStr HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME} for Windows' '' '$INSTDIR\Assemblies\Windows'
WriteRegStr HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME} for Windows 10 Universal' '' '$INSTDIR\Assemblies\WindowsUniversal'
WriteRegStr HKLM 'SOFTWARE\Microsoft\MonoAndroid\v2.3\AssemblyFoldersEx\${APPNAME} for Android' '' '$INSTDIR\Assemblies\Android'
WriteRegStr HKLM 'SOFTWARE\Microsoft\MonoTouch\v1.0\AssemblyFoldersEx\${APPNAME} for iOS' '' '$INSTDIR\Assemblies\iOS'
IfFileExists $WINDIR\SYSWOW64\*.* Is64bit Is32bit
Is32bit:
GOTO End32Bitvs64BitCheck
Is64bit:
WriteRegStr HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME} for Desktop OpenGL' '' '$INSTDIR\Assemblies\DesktopGL'
WriteRegStr HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME} for Windows' '' '$INSTDIR\Assemblies\Windows'
WriteRegStr HKLM 'SOFTWARE\Wow6432Node\Microsoft\MonoTouch\v1.0\AssemblyFoldersEx\${APPNAME} for iOS' '' '$INSTDIR\Assemblies\iOS'
WriteRegStr HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME} for Windows 10 Universal' '' '$INSTDIR\Assemblies\WindowsUniversal'
End32Bitvs64BitCheck:
; Add remote programs
WriteRegStr HKLM 'Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}' 'DisplayName' '${APPNAME} SDK'
WriteRegStr HKLM 'Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}' 'DisplayVersion' '${INSTALLERVERSION}'
WriteRegStr HKLM 'Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}' 'DisplayIcon' '$INSTDIR\monogame.ico'
WriteRegStr HKLM 'Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}' 'InstallLocation' '$INSTDIR\'
WriteRegStr HKLM 'Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}' 'Publisher' 'The MonoGame Team'
WriteRegStr HKLM 'Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}' 'UninstallString' '$INSTDIR\uninstall.exe'
SetOutPath '$INSTDIR'
File '..\monogame.ico'
; Uninstaller
WriteUninstaller "uninstall.exe"
SectionEnd
Section "Visual Studio 2010 Templates" VS2010
IfFileExists `$DOCUMENTS\Visual Studio 2010\Templates\ProjectTemplates\*.*` InstallTemplates CannotInstallTemplates
InstallTemplates:
SetOutPath "$DOCUMENTS\Visual Studio 2010\Templates\ProjectTemplates\Visual C#\MonoGame"
File /r '..\..\ProjectTemplates\VisualStudio2010\*.zip'
GOTO EndTemplates
CannotInstallTemplates:
DetailPrint "Visual Studio 2010 not found"
EndTemplates:
SectionEnd
Section "Visual Studio 2013 Templates" VS2013
IfFileExists `$DOCUMENTS\Visual Studio 2013\Templates\ProjectTemplates\*.*` InstallTemplates CannotInstallTemplates
InstallTemplates:
SetOutPath "$DOCUMENTS\Visual Studio 2013\Templates\ProjectTemplates\Visual C#\MonoGame"
File /r '..\..\ProjectTemplates\VisualStudio2013\*.zip'
File /r '..\..\ProjectTemplates\VisualStudio2010\*.zip'
GOTO EndTemplates
CannotInstallTemplates:
DetailPrint "Visual Studio 2013 not found"
EndTemplates:
SectionEnd
Section "Visual Studio 2015 Templates" VS2015
IfFileExists `$DOCUMENTS\Visual Studio 2015\Templates\ProjectTemplates\*.*` InstallTemplates CannotInstallTemplates
InstallTemplates:
SetOutPath "$DOCUMENTS\Visual Studio 2015\Templates\ProjectTemplates\Visual C#\MonoGame"
File /r '..\..\ProjectTemplates\VisualStudio2010\*.zip'
File /r '..\..\ProjectTemplates\VisualStudio2015\*.zip'
GOTO EndTemplates
CannotInstallTemplates:
DetailPrint "Visual Studio 2015 not found"
EndTemplates:
SectionEnd
Section "Visual Studio 2017 Templates" VS2017
IfFileExists `$DOCUMENTS\Visual Studio 2017\Templates\ProjectTemplates\*.*` InstallTemplates CannotInstallTemplates
InstallTemplates:
SetOutPath "$DOCUMENTS\Visual Studio 2017\Templates\ProjectTemplates\Visual C#\MonoGame"
File /r '..\..\ProjectTemplates\VisualStudio2010\*.zip'
File /r '..\..\ProjectTemplates\VisualStudio2013\MonoGameShared.zip'
File /r '..\..\ProjectTemplates\VisualStudio2015\WindowsUniversal10.VB.zip'
File /r '..\..\ProjectTemplates\VisualStudio2017\*.zip'
GOTO EndTemplates
CannotInstallTemplates:
DetailPrint "Visual Studio 2017 not found"
EndTemplates:
SectionEnd
; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts" Menu
CreateDirectory $SMPROGRAMS\${APPNAME}
SetOutPath "$INSTDIR"
CreateShortCut "$SMPROGRAMS\${APPNAME}\Uninstall MonoGame.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
SetOutPath "${MSBuildInstallDir}\Tools"
CreateShortCut "$SMPROGRAMS\${APPNAME}\MonoGame Pipeline.lnk" "${MSBuildInstallDir}\Tools\Pipeline.exe" "" "${MSBuildInstallDir}\Tools\Pipeline.exe" 0
WriteINIStr "$SMPROGRAMS\${APPNAME}\MonoGame Website.url" "InternetShortcut" "URL" "http://www.monogame.net"
WriteINIStr "$SMPROGRAMS\${APPNAME}\MonoGame Website.url" "InternetShortcut" "IconFile" "$INSTDIR\monogame.ico"
WriteINIStr "$SMPROGRAMS\${APPNAME}\MonoGame Website.url" "InternetShortcut" "IconIndex" "0"
WriteINIStr "$SMPROGRAMS\${APPNAME}\MonoGame Documentation.url" "InternetShortcut" "URL" "http://www.monogame.net/documentation"
WriteINIStr "$SMPROGRAMS\${APPNAME}\MonoGame Documentation.url" "InternetShortcut" "IconFile" "$INSTDIR\monogame.ico"
WriteINIStr "$SMPROGRAMS\${APPNAME}\MonoGame Documentation.url" "InternetShortcut" "IconIndex" "0"
WriteINIStr "$SMPROGRAMS\${APPNAME}\MonoGame Support.url" "InternetShortcut" "URL" "http://community.monogame.net/"
WriteINIStr "$SMPROGRAMS\${APPNAME}\MonoGame Support.url" "InternetShortcut" "IconFile" "$INSTDIR\monogame.ico"
WriteINIStr "$SMPROGRAMS\${APPNAME}\MonoGame Support.url" "InternetShortcut" "IconIndex" "0"
WriteINIStr "$SMPROGRAMS\${APPNAME}\MonoGame Bug Reports.url" "InternetShortcut" "URL" "https://github.com/mono/MonoGame/issues"
WriteINIStr "$SMPROGRAMS\${APPNAME}\MonoGame Bug Reports.url" "InternetShortcut" "IconFile" "$INSTDIR\monogame.ico"
WriteINIStr "$SMPROGRAMS\${APPNAME}\MonoGame Bug Reports.url" "InternetShortcut" "IconIndex" "0"
SectionEnd
LangString CoreComponentsDesc ${LANG_ENGLISH} "Install the Runtimes and the MSBuild extensions for MonoGame"
LangString MonoDevelopDesc ${LANG_ENGLISH} "Install the project templates for MonoDevelop"
LangString VS2010Desc ${LANG_ENGLISH} "Install the project templates for Visual Studio 2010"
LangString VS2012Desc ${LANG_ENGLISH} "Install the project templates for Visual Studio 2012"
LangString VS2013Desc ${LANG_ENGLISH} "Install the project templates for Visual Studio 2013"
LangString VS2015Desc ${LANG_ENGLISH} "Install the project templates for Visual Studio 2015"
LangString VS2017Desc ${LANG_ENGLISH} "Install the project templates for Visual Studio 2017"
LangString MenuDesc ${LANG_ENGLISH} "Add a link to the MonoGame website to your start menu"
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${CoreComponents} $(CoreComponentsDesc)
!insertmacro MUI_DESCRIPTION_TEXT ${MonoDevelop} $(MonoDevelopDesc)
!insertmacro MUI_DESCRIPTION_TEXT ${VS2010} $(VS2010Desc)
!insertmacro MUI_DESCRIPTION_TEXT ${VS2012} $(VS2012Desc)
!insertmacro MUI_DESCRIPTION_TEXT ${VS2013} $(VS2013Desc)
!insertmacro MUI_DESCRIPTION_TEXT ${VS2015} $(VS2015Desc)
!insertmacro MUI_DESCRIPTION_TEXT ${VS2017} $(VS2017Desc)
!insertmacro MUI_DESCRIPTION_TEXT ${Menu} $(MenuDesc)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
Function checkVS2010
IfFileExists `$DOCUMENTS\Visual Studio 2010\Templates\ProjectTemplates\*.*` end disable
disable:
SectionSetFlags ${VS2010} $0
end:
FunctionEnd
Function checkVS2012
IfFileExists `$DOCUMENTS\Visual Studio 2012\Templates\ProjectTemplates\*.*` end disable
disable:
SectionSetFlags ${VS2012} $0
end:
FunctionEnd
Function checkVS2013
IfFileExists `$DOCUMENTS\Visual Studio 2013\Templates\ProjectTemplates\*.*` end disable
disable:
SectionSetFlags ${VS2013} $0
end:
FunctionEnd
Function checkVS2015
IfFileExists `$DOCUMENTS\Visual Studio 2015\Templates\ProjectTemplates\*.*` end disable
disable:
SectionSetFlags ${VS2015} $0
end:
FunctionEnd
Function checkVS2017
IfFileExists `$DOCUMENTS\Visual Studio 2017\Templates\ProjectTemplates\*.*` end disable
disable:
SectionSetFlags ${VS2017} $0
end:
FunctionEnd
Function .onInit
IntOp $0 $0 | ${SF_RO}
Call checkVS2010
Call checkVS2012
Call checkVS2013
Call checkVS2015
Call checkVS2017
IntOp $0 ${SF_SELECTED} | ${SF_RO}
SectionSetFlags ${core_id} $0
FunctionEnd
;--------------------------------
;Uninstaller Section
Section "Uninstall"
DeleteRegKey HKLM 'Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}'
DeleteRegKey HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME} for Desktop OpenGL'
DeleteRegKey HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME} for Windows'
DeleteRegKey HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME}'
DeleteRegKey HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.5.50709\AssemblyFoldersEx\${APPNAME} for Windows Store'
DeleteRegKey HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.5.50709\AssemblyFoldersEx\${APPNAME} for Windows Phone 8.1'
DeleteRegKey HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME} for Windows Phone ARM'
DeleteRegKey HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME} for Windows Phone x86'
DeleteRegKey HKLM 'SOFTWARE\Microsoft\.NETFramework\v4.5.50709\AssemblyFoldersEx\${APPNAME} for Windows 10 UAP'
DeleteRegKey HKLM 'SOFTWARE\Microsoft\MonoAndroid\v2.3\AssemblyFoldersEx\${APPNAME} for Android'
DeleteRegKey HKLM 'SOFTWARE\Microsoft\MonoTouch\v1.0\AssemblyFoldersEx\${APPNAME} for iOS'
DeleteRegKey HKCU 'Software\Microsoft\VisualStudio\10.0\Default Editors\mgcb'
DeleteRegKey HKCU 'Software\Microsoft\VisualStudio\11.0\Default Editors\mgcb'
DeleteRegKey HKCU 'Software\Microsoft\VisualStudio\12.0\Default Editors\mgcb'
DeleteRegKey HKCR '.mgcb'
DeleteRegKey HKCR 'MonoGame.ContentBuilderFile'
IfFileExists $WINDIR\SYSWOW64\*.* Is64bit Is32bit
Is32bit:
GOTO End32Bitvs64BitCheck
Is64bit:
DeleteRegKey HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME} for Desktop OpenGL'
DeleteRegKey HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME} for Windows'
DeleteRegKey HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.5.50709\AssemblyFoldersEx\${APPNAME} for Windows Store'
DeleteRegKey HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.5.50709\AssemblyFoldersEx\${APPNAME} for Windows Phone 8.1'
DeleteRegKey HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME} for Windows Phone ARM'
DeleteRegKey HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME} for Windows Phone x86'
DeleteRegKey HKLM 'SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\${APPNAME} for Windows 10 UAP'
DeleteRegKey HKLM 'SOFTWARE\Wow6432Node\Microsoft\MonoAndroid\v2.3\AssemblyFoldersEx\${APPNAME} for Android'
DeleteRegKey HKLM 'SOFTWARE\Wow6432Node\Microsoft\MonoTouch\v1.0\AssemblyFoldersEx\${APPNAME} for iOS'
End32Bitvs64BitCheck:
ReadRegStr $0 HKLM 'SOFTWARE\Wow6432Node\Xamarin\MonoDevelop' "Path"
${If} $0 == "" ; check on 32 bit machines just in case
ReadRegStr $0 HKLM 'SOFTWARE\Xamarin\MonoDevelop' "Path"
${EndIf}
${If} $0 == ""
${Else}
RMDir /r "$0\AddIns\MonoDevelop.MonoGame"
${EndIf}
RMDir /r "$DOCUMENTS\Visual Studio 2010\Templates\ProjectTemplates\Visual C#\MonoGame"
RMDir /r "$DOCUMENTS\Visual Studio 2013\Templates\ProjectTemplates\Visual C#\MonoGame"
RMDir /r "$DOCUMENTS\Visual Studio 2015\Templates\ProjectTemplates\Visual C#\MonoGame"
RMDir /r "$DOCUMENTS\Visual Studio 2017\Templates\ProjectTemplates\Visual C#\MonoGame"
RMDir /r "${MSBuildInstallDir}"
RMDir /r "$SMPROGRAMS\${APPNAME}"
Delete "$INSTDIR\Uninstall.exe"
RMDir /r "$INSTDIR"
SectionEnd
@@ -0,0 +1,216 @@
<?xml version="1.0"?>
<project name="Installer Build Script" default="build" basedir=".">
<description>Default Installer Automated Build script</description>
<property name="os" value="${operating-system::get-platform(environment::get-operating-system())}" />
<!-- The build version number we can get from the environment variable -->
<property name="buildNumber" value="0.0.0.0"/>
<if test="${environment::variable-exists('BUILD_NUMBER')}">
<property name="buildNumber" value="${environment::get-variable('BUILD_NUMBER')}"/>
</if>
<target name="_checkos">
<property name="os" value="${operating-system::get-platform(environment::get-operating-system())}"/>
<if test="${os == 'Unix'}">
<if test="${directory::exists('/Applications') and directory::exists('/Library')}">
<property name="os" value="MacOS"/>
</if>
</if>
<echo message="Detected : ${os}"/>
</target>
<target name="build" description="Build Installers" depends="_checkos">
<!-- Windows Installer -->
<if test="${os == 'Win32NT'}">
<if test="${file::exists('C:\Program Files (x86)\NSIS\makensis.exe')}">
<echo append="false" file="Windows/header.nsh">
!define FrameworkPath "${project::get-base-directory()}"
!define VERSION "3.0"
!define INSTALLERVERSION "${buildNumber}"
</echo>
<exec program="makensis" workingdir="Windows" basedir="C:\Program Files (x86)\NSIS">
<arg value="MonoGame.nsi"/>
</exec>
</if>
</if>
<!-- Mac Installers -->
<if test="${os == 'MacOS'}">
<!-- Build Pipeline.Installer.pkg -->
<delete failonerror="false">
<fileset>
<include name="${project::get-base-directory()}\*.pkg"/>
<include name="${project::get-base-directory()}\..\Tools\Pipeline\bin\MacOS\AnyCPU\Release\*.pkg" />
</fileset>
</delete>
<mkdir dir="root/tmp" />
<!-- Build Addin .pkg -->
<copy file="../IDE/MonoDevelop/MonoDevelop.MonoGame_${buildNumber}.mpack" tofile="./root/tmp/MonoDevelop.MonoGame_${buildNumber}.mpack" overwrite="true"/>
<copy file="../IDE/VisualStudioForMac/bin/Debug/net461/MonoDevelop.MonoGame_IDE_VisualStudioForMac_${buildNumber}.mpack" tofile="./root/tmp/MonoDevelop.MonoGame_IDE_VisualStudioForMac_${buildNumber}.mpack" overwrite="true"/>
<copy todir="../Tools/Pipeline/bin/MacOS/AnyCPU/Release/Pipeline.app/Contents/MonoBundle">
<fileset basedir="../Tools/Pipeline/bin/MacOS/AnyCPU/Release">
<include name="ff*"/>
<include name="*.dylib"/>
</fileset>
</copy>
<!-- Correct the id of the dylibs -->
<foreach item="File" property="dylibname">
<in>
<items basedir="../Tools/Pipeline/bin/MacOS/AnyCPU/Release/Pipeline.app/Contents/MonoBundle/">
<include name="*.dylib" />
</items>
</in>
<do>
<echo message="${path::get-file-name(dylibname)}" />
<exec program="install_name_tool" workingdir="../Tools/Pipeline/bin/MacOS/AnyCPU/Release/Pipeline.app/Contents/MonoBundle" commandline=' -id "@executable_path/../MonoBundle/${path::get-file-name(dylibname)}" ${path::get-file-name(dylibname)}' />
</do>
</foreach>
<exec program="pkgbuild" workingdir="../Tools/Pipeline/bin/MacOS/AnyCPU/Release" commandline=" --component ./Pipeline.app --identifier com.monogame.pipeline --version ${buildNumber} --scripts ${project::get-base-directory()}/MacOS/Scripts/Pipeline --install-location /Applications ${project::get-base-directory()}/Pipeline.MacOS.pkg" />
<exec program="pkgbuild" workingdir="." commandline=" --root ./root --identifier com.monogame.xsaddin --version ${buildNumber} --scripts ${project::get-base-directory()}/MacOS/Scripts/Addin ${project::get-base-directory()}/MonoGame.XamarinStudio.Addin.pkg" />
<!-- Build Framework .pkg -->
<delete dir="./root/tmp" />
<mkdir dir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Tools" />
<mkdir dir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/iOS" />
<mkdir dir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/tvOS" />
<mkdir dir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/Android" />
<mkdir dir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/MacOSX" />
<mkdir dir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/Linux" />
<mkdir dir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/DesktopGL" />
<mkdir dir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/DesktopGL/x86" />
<mkdir dir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/DesktopGL/x64" />
<!-- Copy the Files over for the framework -->
<copy todir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Tools">
<fileset basedir="../Tools/Pipeline/bin/MacOS/AnyCPU/Release">
<include name="*"/>
</fileset>
</copy>
<copy todir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}">
<fileset basedir="../MonoGame.Framework.Content.Pipeline">
<include name="MonoGame.Content.Builder.targets"/>
<include name="MonoGame.Common.props"/>
</fileset>
</copy>
<copy todir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}">
<fileset basedir="../Tools/Pipeline/bin/MacOS/AnyCPU/Release">
<include name="MonoGame.Build.Tasks.dll"/>
</fileset>
</copy>
<copy todir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/iOS">
<fileset basedir="../MonoGame.Framework/bin/iOS/iPhoneSimulator/Release">
<include name="*.*"/>
</fileset>
</copy>
<copy todir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/tvOS">
<fileset basedir="../MonoGame.Framework/bin/tvOS/iPhoneSimulator/Release">
<include name="*.*"/>
</fileset>
</copy>
<copy todir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/Android">
<fileset basedir="../MonoGame.Framework/bin/Android/AnyCPU/Release">
<include name="*.*"/>
</fileset>
</copy>
<copy todir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/MacOSX">
<fileset basedir="../MonoGame.Framework/bin/MacOS/AnyCPU/Release">
<include name="*.*"/>
</fileset>
</copy>
<copy todir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/Linux">
<fileset basedir="../MonoGame.Framework/bin/Linux/AnyCPU/Release">
<include name="*.*"/>
</fileset>
</copy>
<copy todir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/DesktopGL">
<fileset basedir="../MonoGame.Framework/bin/Linux/AnyCPU/Release">
<include name="*.*"/>
</fileset>
</copy>
<copy todir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/DesktopGL/x86">
<fileset basedir="../MonoGame.Framework/bin/Linux/AnyCPU/Release/x86">
<include name="*.*"/>
</fileset>
</copy>
<copy todir="root/Library/Frameworks/MonoGame.framework/v${buildNumber}/Assemblies/DesktopGL/x64">
<fileset basedir="../MonoGame.Framework/bin/Linux/AnyCPU/Release/x64">
<include name="*.*"/>
</fileset>
</copy>
<copy file="./MacOS/Scripts/Framework/postinstall.in" tofile="./MacOS/Scripts/Framework/postinstall" />
<echo append="true" file="./MacOS/Scripts/Framework/postinstall">
if [ -d '/Library/Frameworks/MonoGame.framework/v3.0' ]
then
rm /Library/Frameworks/MonoGame.framework/v3.0
fi
if [ -d '/Library/Frameworks/MonoGame.framework/Current' ]
then
rm /Library/Frameworks/MonoGame.framework/Current
fi
ln -sf /Library/Frameworks/MonoGame.framework/v${buildNumber} /Library/Frameworks/MonoGame.framework/v3.0
ln -sf /Library/Frameworks/MonoGame.framework/v${buildNumber} /Library/Frameworks/MonoGame.framework/Current
#fix permissions
chmod +x /Library/Frameworks/MonoGame.framework/Current/Tools/ffmpeg
chmod +x /Library/Frameworks/MonoGame.framework/Current/Tools/ffprobe
mkdir -p /Library/Frameworks/Mono.framework/External/xbuild
if [ -d '/Library/Frameworks/Mono.framework/External/xbuild' ]
then
ln -sf /Library/Frameworks/MonoGame.framework /Library/Frameworks/Mono.framework/External/xbuild/MonoGame
fi
</echo>
<exec program="pkgbuild" workingdir="." commandline=" --root ./root --identifier com.monogame.framework --version ${buildNumber} --scripts ${project::get-base-directory()}/MacOS/Scripts/Framework ${project::get-base-directory()}/MonoGame.framework.pkg" />
<copy tofile="./distribution.xml" file="./MacOS/distribution.xml" />
<copy tofile="./MacOS/Resources/LICENSE.html" file="./../LICENSE.txt" />
<xmlpoke file="./distribution.xml" xpath="/installer-gui-script/title" value="MonoGame ${buildNumber}" />
<exec program="productbuild" workingdir="${project::get-base-directory()}" commandline=" --distribution ./distribution.xml --resources ./MacOS/Resources --package-path ./ MonoGame.pkg" />
<delete dir="./root"/>
<delete file="./distribution.xml"/>
<delete file="./MacOS/Resources/LICENSE.html"/>
</if>
<!-- Linux Installer -->
<if test="${(os == 'Unix' or os == 'MacOS') and directory::exists('../Tools/Pipeline/bin/Linux/AnyCPU/Release')}">
<delete dir="Linux/tmp_run" failonerror="false"/>
<mkdir dir="Linux/tmp_run"/>
<copy todir="Linux/tmp_run/Main/">
<fileset basedir="Linux/Main"/>
</copy>
<copy file="../IDE/MonoDevelop/MonoDevelop.MonoGame_${buildNumber}.mpack" tofile="Linux/tmp_run/Main/MonoDevelop.MonoGame.mpack" overwrite="true"/>
<copy file="../IDE/VisualStudioForMac/bin/Debug/net461/MonoDevelop.MonoGame_IDE_VisualStudioForMac_${buildNumber}.mpack" tofile="Linux/tmp_run/Main/MonoDevelop.MonoGame_IDE_VisualStudioForMac.mpack" overwrite="true"/>
<copy file="../MonoGame.Framework.Content.Pipeline/MonoGame.Content.Builder.targets" tofile="Linux/tmp_run/MonoGameSDK/MonoGame.Content.Builder.targets"/>
<copy file="../MonoGame.Framework.Content.Pipeline/MonoGame.Common.props" tofile="Linux/tmp_run/MonoGameSDK/MonoGame.Common.props"/>
<copy file="../Tools/Pipeline/bin/Linux/AnyCPU/Release/MonoGame.Build.Tasks.dll" tofile="Linux/tmp_run/MonoGameSDK/MonoGame.Build.Tasks.dll"/>
<copy todir="Linux/tmp_run/MonoGameSDK/Tools">
<fileset basedir="../Tools/Pipeline/bin/Linux/AnyCPU/Release"/>
</copy>
<copy todir="Linux/tmp_run/MonoGameSDK/Assemblies/DesktopGL">
<fileset basedir="../MonoGame.Framework/bin/Linux/AnyCPU/Release">
<include name="*.*"/>
</fileset>
</copy>
<copy todir="Linux/tmp_run/MonoGameSDK/Assemblies/Android">
<fileset basedir="../MonoGame.Framework/bin/Android/AnyCPU/Release">
<include name="*.*"/>
</fileset>
</copy>
<copy todir="Linux/tmp_run">
<fileset basedir="Linux/RUN"/>
</copy>
<move file="Linux/tmp_run/uninstall.sh" tofile="Linux/tmp_run/MonoGameSDK/uninstall.sh" />
<exec program="../ThirdParty/Dependencies/makeself/makeself.sh" workingdir="Linux/">
<arg value="tmp_run/"/>
<arg value="monogame-sdk.run"/>
<arg value="Monogame Pipeline Installer"/>
<arg value="./postinstall.sh"/>
</exec>
<delete dir="Linux/tmp_run" failonerror="false"/>
</if>
</target>
</project>
Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB