rem stub uncommon targets
set NUGET_EXE=%NUGET_DIR%NuGet.exe
-mkdir Xamarin.Forms.Platform.MacOS\bin\debug\
-mkdir Xamarin.Forms.Platform.Tizen\bin\debug\tizen40\
-mkdir Xamarin.Forms.Maps.Tizen\bin\debug\Tizen40
-mkdir Xamarin.Forms.Maps.MacOS\bin\debug
-mkdir Xamarin.Forms.Platform.UAP\bin\debug\
-mkdir Xamarin.Forms.Platform.ios\bin\debug\
-mkdir Stubs\Xamarin.Forms.Platform.iOS\bin\iPhone\debug\
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\ar
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\ca
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\cs
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\da
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\de
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\el
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\es
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\fi
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\fr
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\he
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\hi
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\hr
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\hu
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\id
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\it
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\ja
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\ko
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\ms
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\nb
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\nl
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\pl
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\pt-BR
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\pt
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\ro
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\ru
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\sk
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\sv
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\th
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\tr
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\uk
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\vi
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\zh-Hans
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\zh-Hant
-mkdir Xamarin.Forms.Platform.iOS\bin\debug\zh-HK
-
-mkdir Xamarin.Forms.Platform.Android\bin\debug
-echo foo > Xamarin.Forms.Platform.Android\bin\debug\Xamarin.Forms.Platform.Android.dll
-
-mkdir Xamarin.Forms.Platform.Android.FormsViewGroup\bin\debug
-echo foo > Xamarin.Forms.Platform.Android.FormsViewGroup\bin\debug\FormsViewGroup.dll
-
-mkdir Stubs\Xamarin.Forms.Platform.Android\bin\debug
-echo foo > Stubs\Xamarin.Forms.Platform.Android\bin\debug\Xamarin.Forms.Platform.dll
-
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\ar\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\ca\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\cs\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\da\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\de\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\el\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\es\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\fi\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\fr\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\he\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\hi\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\hr\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\hu\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\id\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\it\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\ja\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\ko\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\ms\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\nb\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\nl\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\pl\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\pt-BR\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\pt\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\ro\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\ru\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\sk\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\sv\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\th\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\tr\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\uk\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\vi\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\zh-Hans\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\zh-Hant\Xamarin.Forms.Platform.iOS.resources.dll
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\zh-HK\Xamarin.Forms.Platform.iOS.resources.dll
-
-echo foo > Xamarin.Forms.Platform.iOS\bin\debug\Xamarin.Forms.Platform.iOS.dll
-echo foo > Stubs\Xamarin.Forms.Platform.iOS\bin\iPhone\debug\Xamarin.Forms.Platform.dll
-
-echo foo > Xamarin.Forms.Platform.MacOS\bin\debug\Xamarin.forms.Platform.macOS.dll
-echo foo > Xamarin.Forms.Platform.MacOS\bin\debug\Xamarin.forms.Platform.dll
-echo foo > Xamarin.Forms.Maps.MacOS\bin\debug\Xamarin.Forms.Maps.macOS.dll
-
-mkdir Stubs\Xamarin.Forms.Platform.Tizen\bin\debug\tizen40
-echo foo > Stubs\Xamarin.Forms.Platform.Tizen\bin\debug\tizen40\Xamarin.Forms.Platform.dll
-echo foo > Xamarin.Forms.Maps.Tizen\bin\debug\Tizen40\Xamarin.Forms.Maps.Tizen.dll
-
-mkdir Xamarin.Forms.Platform.Tizen\bin\debug\tizen40
-echo foo > Xamarin.Forms.Platform.Tizen\bin\debug\tizen40\Xamarin.forms.Platform.tizen.dll
-echo foo > Xamarin.Forms.Platform.Tizen\bin\debug\tizen40\Xamarin.forms.Platform.dll
-
-mkdir Xamarin.Forms.Platform.UAP\bin\debug\
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\Xamarin.Forms.Platform.UAP.dll
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\Xamarin.Forms.Platform.UAP.pri
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\Xamarin.Forms.Platform.UAP.xr.xml
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\FormsProgressBarStyle.xbf
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\FormsFlyout.xbf
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\FormsCommandBarStyle.xbf
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\Resources.xbf
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\FormsTextBoxStyle.xbf
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\AutoSuggestStyle.xbf
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\SliderStyle.xbf
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\MasterDetailControlStyle.xbf
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\PageControlStyle.xbf
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\TabbedPageStyle.xbf
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\FormsEmbeddedPageWrapper.xbf
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\StepperControl.xbf
-
-mkdir Xamarin.Forms.Platform.UAP\bin\debug\Items
-echo foo > Xamarin.Forms.Platform.UAP\bin\debug\Items\ItemsViewStyles.xbf
-
if "%1" == "droid" (
+ set CONFIG=debug
+ call .create-stubs.bat
%NUGET_EXE% restore .xamarin.forms.android.nuget.sln
msbuild /v:m /p:platform="any cpu" /p:WarningLevel=0 /p:CreateAllAndroidTargets=true .xamarin.forms.android.nuget.sln
)
+if "%1" == "rdroid" (
+ set CONFIG=release
+ call .create-stubs.bat
+ %NUGET_EXE% restore .xamarin.forms.android.nuget.sln
+ msbuild /v:m /p:configuration=release /p:platform="any cpu" /p:WarningLevel=0 /p:CreateAllAndroidTargets=true .xamarin.forms.android.nuget.sln
+)
+if "%1" == "pdroid" (
+ set CONFIG=release
+ msbuild /v:m /p:configuration=release /p:platform="anyCpu" /p:WarningLevel=0 /p:CreateAllAndroidTargets=true Xamarin.Forms.Platform.Android\Xamarin.Forms.Platform.Android.csproj
+)
if "%1" == "ios" (
+ set CONFIG=debug
+ call .create-stubs.bat
%NUGET_EXE% restore .xamarin.forms.ios.nuget.sln
msbuild /v:m /p:platform="any cpu" .xamarin.forms.ios.nuget.sln
)
if "%1" == "droidios" (
+ set CONFIG=debug
+ call .create-stubs.bat
%NUGET_EXE% restore .xamarin.forms.android.nuget.sln
%NUGET_EXE% restore .xamarin.forms.ios.nuget.sln
msbuild /v:m /p:platform="any cpu" /p:WarningLevel=0 .xamarin.forms.android.nuget.sln
msbuild /v:m /p:platform="any cpu" .xamarin.forms.ios.nuget.sln
)
if "%1" == "uap" (
+ set CONFIG=debug
+ call .create-stubs.bat
%NUGET_EXE% restore .xamarin.forms.uap.nuget.sln
msbuild /v:m /p:platform="any cpu" .xamarin.forms.uap.nuget.sln /t:restore
msbuild /v:m /p:platform="any cpu" .xamarin.forms.uap.nuget.sln
)
if "%1" == "all" (
+ set CONFIG=debug
+ call .create-stubs.bat
%NUGET_EXE% restore .xamarin.forms.sln
msbuild /v:m /p:platform="any cpu" .xamarin.forms.uap.nuget.sln /t:restore
msbuild /v:m /p:platform="any cpu" /p:WarningLevel=0 /p:CreateAllAndroidTargets=true .xamarin.forms.nuget.sln
if "%DEBUG_VERSION%"=="" set DEBUG_VERSION=0
set /a DEBUG_VERSION=%DEBUG_VERSION%+1
pushd .nuspec
-%NUGET_EXE% pack Xamarin.Forms.nuspec -properties configuration=debug;platform=anycpu -Version 9.9.%DEBUG_VERSION%
+%NUGET_EXE% pack Xamarin.Forms.nuspec -properties configuration=%CONFIG%;platform=anycpu -Version 9.9.%DEBUG_VERSION%
if "%CREATE_MAP_NUGET%" NEQ "" (
REM Requires building x86, x64, AMD
- %NUGET_EXE% pack Xamarin.Forms.Maps.nuspec -properties configuration=debug;platform=anycpu -Version 9.9.%DEBUG_VERSION%
+ %NUGET_EXE% pack Xamarin.Forms.Maps.nuspec -properties configuration=%CONFIG%;platform=anycpu -Version 9.9.%DEBUG_VERSION%
)
popd
--- /dev/null
+rem This is not our official nuget build script.
+rem This is used as a quick and dirty way create nuget packages used to test user issue reproductions.
+rem This is updated as XF developers use it to test reproductions. As such, it may not always work.
+rem This is not ideal, but it's better than nothing, and it usually works fine.
+
+mkdir Xamarin.Forms.Platform.MacOS\bin\%CONFIG%\
+mkdir Xamarin.Forms.Platform.Tizen\bin\%CONFIG%\tizen40\
+mkdir Xamarin.Forms.Maps.Tizen\bin\%CONFIG%\Tizen40
+mkdir Xamarin.Forms.Maps.MacOS\bin\%CONFIG%
+mkdir Xamarin.Forms.Platform.UAP\bin\%CONFIG%\
+mkdir Xamarin.Forms.Platform.ios\bin\%CONFIG%\
+mkdir Stubs\Xamarin.Forms.Platform.iOS\bin\iPhone\%CONFIG%\
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\ar
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\ca
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\cs
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\da
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\de
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\el
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\es
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\fi
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\fr
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\he
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\hi
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\hr
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\hu
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\id
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\it
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\ja
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\ko
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\ms
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\nb
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\nl
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\pl
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\pt-BR
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\pt
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\ro
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\ru
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\sk
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\sv
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\th
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\tr
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\uk
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\vi
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\zh-Hans
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\zh-Hant
+mkdir Xamarin.Forms.Platform.iOS\bin\%CONFIG%\zh-HK
+
+mkdir Xamarin.Forms.Platform.Android\bin\%CONFIG%
+echo foo > Xamarin.Forms.Platform.Android\bin\%CONFIG%\Xamarin.Forms.Platform.Android.dll
+
+mkdir Xamarin.Forms.Platform.Android.FormsViewGroup\bin\%CONFIG%
+echo foo > Xamarin.Forms.Platform.Android.FormsViewGroup\bin\%CONFIG%\FormsViewGroup.dll
+
+mkdir Stubs\Xamarin.Forms.Platform.Android\bin\%CONFIG%
+echo foo > Stubs\Xamarin.Forms.Platform.Android\bin\%CONFIG%\Xamarin.Forms.Platform.dll
+
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\ar\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\ca\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\cs\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\da\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\de\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\el\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\es\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\fi\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\fr\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\he\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\hi\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\hr\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\hu\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\id\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\it\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\ja\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\ko\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\ms\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\nb\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\nl\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\pl\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\pt-BR\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\pt\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\ro\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\ru\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\sk\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\sv\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\th\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\tr\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\uk\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\vi\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\zh-Hans\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\zh-Hant\Xamarin.Forms.Platform.iOS.resources.dll
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\zh-HK\Xamarin.Forms.Platform.iOS.resources.dll
+
+echo foo > Xamarin.Forms.Platform.iOS\bin\%CONFIG%\Xamarin.Forms.Platform.iOS.dll
+echo foo > Stubs\Xamarin.Forms.Platform.iOS\bin\iPhone\%CONFIG%\Xamarin.Forms.Platform.dll
+
+echo foo > Xamarin.Forms.Platform.MacOS\bin\%CONFIG%\Xamarin.forms.Platform.macOS.dll
+echo foo > Xamarin.Forms.Platform.MacOS\bin\%CONFIG%\Xamarin.forms.Platform.dll
+echo foo > Xamarin.Forms.Maps.MacOS\bin\%CONFIG%\Xamarin.Forms.Maps.macOS.dll
+
+mkdir Stubs\Xamarin.Forms.Platform.Tizen\bin\%CONFIG%\tizen40
+echo foo > Stubs\Xamarin.Forms.Platform.Tizen\bin\%CONFIG%\tizen40\Xamarin.Forms.Platform.dll
+echo foo > Xamarin.Forms.Maps.Tizen\bin\%CONFIG%\Tizen40\Xamarin.Forms.Maps.Tizen.dll
+
+mkdir Xamarin.Forms.Platform.Tizen\bin\%CONFIG%\tizen40
+echo foo > Xamarin.Forms.Platform.Tizen\bin\%CONFIG%\tizen40\Xamarin.forms.Platform.tizen.dll
+echo foo > Xamarin.Forms.Platform.Tizen\bin\%CONFIG%\tizen40\Xamarin.forms.Platform.dll
+
+mkdir Xamarin.Forms.Platform.UAP\bin\%CONFIG%\
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\Xamarin.Forms.Platform.UAP.dll
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\Xamarin.Forms.Platform.UAP.pri
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\Xamarin.Forms.Platform.UAP.xr.xml
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\FormsProgressBarStyle.xbf
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\FormsFlyout.xbf
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\FormsCommandBarStyle.xbf
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\Resources.xbf
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\FormsTextBoxStyle.xbf
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\AutoSuggestStyle.xbf
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\SliderStyle.xbf
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\MasterDetailControlStyle.xbf
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\PageControlStyle.xbf
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\TabbedPageStyle.xbf
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\FormsEmbeddedPageWrapper.xbf
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\StepperControl.xbf
+
+mkdir Xamarin.Forms.Platform.UAP\bin\%CONFIG%\Items
+echo foo > Xamarin.Forms.Platform.UAP\bin\%CONFIG%\Items\ItemsViewStyles.xbf
+
\ No newline at end of file
namespace Xamarin.Forms
{
+ [Flags]
+ public enum ActivationFlags
+ {
+ NoCss = 1 << 0,
+ }
+
+
// Previewer uses reflection to bind to this method; Removal or modification of visibility will break previewer.
internal static class Registrar
{
public static Registrar<IRegisterable> Registered { get; internal set; }
- public static void RegisterAll(Type[] attrTypes)
+ //typeof(ExportRendererAttribute);
+ //typeof(ExportCellAttribute);
+ //typeof(ExportImageSourceHandlerAttribute);
+ public static void RegisterRenderers(HandlerAttribute[] attributes)
+ {
+ var length = attributes.Length;
+ for (var i = 0; i < length; i++)
+ {
+ var attribute = attributes[i];
+ if (attribute.ShouldRegister())
+ Registered.Register(attribute.HandlerType, attribute.TargetType, attribute.SupportedVisuals);
+ }
+ }
+
+ public static void RegisterSytlesheets()
{
- Assembly[] assemblies = Device.GetAssemblies();
+ var assembly = typeof(StyleSheets.StylePropertyAttribute).GetTypeInfo().Assembly;
+
+#if NETSTANDARD2_0
+ object[] styleAttributes = assembly.GetCustomAttributes(typeof(StyleSheets.StylePropertyAttribute), true);
+#else
+ object[] styleAttributes = assembly.GetCustomAttributes(typeof(StyleSheets.StylePropertyAttribute)).ToArray();
+#endif
+ var stylePropertiesLength = styleAttributes.Length;
+ for (var i = 0; i < stylePropertiesLength; i++)
+ {
+ var attribute = (StyleSheets.StylePropertyAttribute)styleAttributes[i];
+ if (StyleProperties.TryGetValue(attribute.CssPropertyName, out var attrList))
+ attrList.Add(attribute);
+ else
+ StyleProperties[attribute.CssPropertyName] = new List<StyleSheets.StylePropertyAttribute> { attribute };
+ }
+ }
+
+ public static void RegisterEffects(string resolutionName, ExportEffectAttribute[] effectAttributes)
+ {
+ var exportEffectsLength = effectAttributes.Length;
+ for (var i = 0; i < exportEffectsLength; i++)
+ {
+ var effect = effectAttributes[i];
+ Effects[resolutionName + "." + effect.Id] = effect.Type;
+ }
+ }
+
+ public static void RegisterAll(Type[] attrTypes, ActivationFlags flags = default(ActivationFlags))
+ {
+ Assembly[] assemblies;
+ assemblies = Device.GetAssemblies();
+
if (ExtraAssemblies != null)
assemblies = assemblies.Union(ExtraAssemblies).ToArray();
Log.Warning(nameof(Registrar), "Could not load assembly: {0} for Attibute {1} | Some renderers may not be loaded", assembly.FullName, attrType.FullName);
continue;
}
- var length = attributes.Length;
- for (var i = 0; i < length; i++)
- {
- var attribute = (HandlerAttribute)attributes[i];
- if (attribute.ShouldRegister())
- Registered.Register(attribute.HandlerType, attribute.TargetType, attribute.SupportedVisuals);
- }
+
+ RegisterRenderers((HandlerAttribute[])attributes);
}
string resolutionName = assembly.FullName;
#else
object[] effectAttributes = assembly.GetCustomAttributes(typeof(ExportEffectAttribute)).ToArray();
#endif
- var exportEffectsLength = effectAttributes.Length;
- for (var i = 0; i < exportEffectsLength; i++)
- {
- var effect = (ExportEffectAttribute)effectAttributes[i];
- Effects[resolutionName + "." + effect.Id] = effect.Type;
- }
-
-#if NETSTANDARD2_0
- object[] styleAttributes = assembly.GetCustomAttributes(typeof(StyleSheets.StylePropertyAttribute), true);
-#else
- object[] styleAttributes = assembly.GetCustomAttributes(typeof(StyleSheets.StylePropertyAttribute)).ToArray();
-#endif
- var stylePropertiesLength = styleAttributes.Length;
- for (var i = 0; i < stylePropertiesLength; i++)
- {
- var attribute = (StyleSheets.StylePropertyAttribute)styleAttributes[i];
- if (StyleProperties.TryGetValue(attribute.CssPropertyName, out var attrList))
- attrList.Add(attribute);
- else
- StyleProperties[attribute.CssPropertyName] = new List<StyleSheets.StylePropertyAttribute> { attribute };
- }
+ RegisterEffects(resolutionName, (ExportEffectAttribute[])effectAttributes);
}
+ var noCss = (flags & ActivationFlags.NoCss) != 0;
+ if (!noCss)
+ RegisterSytlesheets();
+
DependencyService.Initialize(assemblies);
}
}
namespace Xamarin.Forms
{
+ public struct ActivationOptions
+ {
+ public struct EffectScope
+ {
+ public string Name;
+ public ExportEffectAttribute[] Effects;
+ }
+
+ public ActivationOptions(Context activity, Bundle bundle, Assembly resourceAssembly)
+ {
+ this = default(ActivationOptions);
+ this.Activity = activity;
+ this.Bundle = bundle;
+ this.ResourceAssembly = resourceAssembly;
+ }
+ public Context Activity;
+ public Bundle Bundle;
+ public Assembly ResourceAssembly;
+ public HandlerAttribute[] Handlers;
+ public EffectScope[] EffectScopes;
+ public ActivationFlags Flags;
+ }
+
public static class Forms
{
+
const int TabletCrossover = 600;
static bool? s_isLollipopOrNewer;
// Why is bundle a param if never used?
public static void Init(Context activity, Bundle bundle)
{
- Assembly resourceAssembly = Assembly.GetCallingAssembly();
+ Assembly resourceAssembly;
+
+ resourceAssembly = Assembly.GetCallingAssembly();
+
SetupInit(activity, resourceAssembly);
}
SetupInit(activity, resourceAssembly);
}
+ public static void Init(ActivationOptions activation)
+ {
+ SetupInit(
+ activation.Activity,
+ activation.ResourceAssembly,
+ activation
+ );
+ }
+
/// <summary>
/// Sets title bar visibility programmatically. Must be called after Xamarin.Forms.Forms.Init() method
/// </summary>
viewInitialized(self, new ViewInitializedEventArgs { View = self, NativeView = nativeView });
}
- static void SetupInit(Context activity, Assembly resourceAssembly)
+ static void SetupInit(Context activity, Assembly resourceAssembly, ActivationOptions? maybeOptions = null)
{
if (!IsInitialized)
{
if (!IsInitialized)
{
- // Only need to do this once
- Registrar.RegisterAll(new[] { typeof(ExportRendererAttribute), typeof(ExportCellAttribute), typeof(ExportImageSourceHandlerAttribute) });
+ if (maybeOptions.HasValue)
+ {
+ var options = maybeOptions.Value;
+ var handlers = options.Handlers;
+ var flags = options.Flags;
+ var effectScopes = options.EffectScopes;
+
+ // renderers
+ Registrar.RegisterRenderers(handlers);
+
+ // effects
+ if (effectScopes != null)
+ {
+ for (var i = 0; i < effectScopes.Length; i++)
+ {
+ var effectScope = effectScopes[0];
+ Registrar.RegisterEffects(effectScope.Name, effectScope.Effects);
+ }
+ }
+
+ // css
+ var noCss = (flags & ActivationFlags.NoCss) != 0;
+ if (!noCss)
+ Registrar.RegisterSytlesheets();
+ }
+ else
+ {
+ // Only need to do this once
+ Registrar.RegisterAll(new[] {
+ typeof(ExportRendererAttribute),
+ typeof(ExportCellAttribute),
+ typeof(ExportImageSourceHandlerAttribute)
+ });
+ }
}
// This could change as a result of a config change, so we need to check it every time
namespace Xamarin.Forms.Platform.Android
{
- internal class OpenGLViewRenderer : ViewRenderer<OpenGLView, GLSurfaceView>
+ public class OpenGLViewRenderer : ViewRenderer<OpenGLView, GLSurfaceView>
{
bool _disposed;