Commit be9f8656 authored by Erwan Croze's avatar Erwan Croze 👋🏻

Revert "Edit windows package"

This reverts commit a1e1abb5.
parent a2f44e0a
tunnel
**/.vscode
**/.vs
**/*.nupkg
cmake/Windows/**/obj
cmake/Windows/**/bin
cmake/Windows/wrapper/LinphoneWrapper.cs
cmake/Windows/nuget/Win32
cmake/Windows/nuget/NuGetLinphoneSDK
**/*.temp
\ No newline at end of file
......@@ -22,7 +22,7 @@
# - mkdir build-desktop
# - cd build-desktop
# - cmake .. -G "Visual Studio 14 2015" -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=Release %DEFAULT_CMAKE_OPTIONS% %CMAKE_OPTIONS%
# - cmake --build . --target sdk --config Release -- /maxcpucount
# - cmake --build . --target sdk --config Release -- /maxcpucount
.job-windows-vs2017:
extends: .job-prepare
......@@ -39,12 +39,13 @@
- mkdir build-desktop
- cd build-desktop
- C:\PROGRA~1\Python37\Scripts\cl -s
- cmake .. -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=Release %DEFAULT_CMAKE_OPTIONS% %CMAKE_OPTIONS%
- cmake .. -G "Visual Studio 15 2017" -DLINPHONESDK_PLATFORM=Desktop -DENABLE_CSHARP_WRAPPER=YES -DCMAKE_BUILD_TYPE=Release %DEFAULT_CMAKE_OPTIONS% %CMAKE_OPTIONS%
- cmake --build . --target sdk --config Release -- /maxcpucount /nodeReuse:true /p:TrackFileAccess=false
- C:\PROGRA~1\Python37\Scripts\cl -s
.job-windows-vs2017-scheduled:
extends: .job-windows-vs2017
only:
refs:
- schedules
......@@ -57,6 +58,11 @@ job-windows-vs2017:
except:
refs:
- schedules
artifacts:
paths:
- build-desktop\linphone-sdk\desktop
when: always
expire_in: 1 week
job-windows-vs2017-scheduled:
extends: .job-windows-vs2017-scheduled
......@@ -73,7 +79,34 @@ job-windows-vs2017-scheduled:
# CMAKE_OPTIONS: -DENABLE_VIDEO=NO
# extends: job-windows-vs2015
job-windows-vs2017-novideo:
extends: .job-windows-vs2017-scheduled
variables:
CMAKE_OPTIONS: -DENABLE_LIME_X3DH=NO -DENABLE_VIDEO=NO
job-windows-vs2017-package:
stage: package
tags: [ "windows" ]
dependencies:
- job-windows-vs2017
script:
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
- cd build-desktop
- chdir > chdir_sdk.temp
- set /p OUTPUT_SDK_BUILD=<chdir_sdk.temp
- cd ..\cmake\Windows\wrapper\
- chdir > chdir_wrapper.temp
- set /p OUTPUT_WRAPPER_BUILD=<chdir_wrapper.temp
- msbuild -t:restore CsWrapper.csproj
- msbuild CsWrapper.csproj /p:MDILCompile=true /p:Platform="x86" /t:build /p:Configuration=Release /p:OutputSdkBuild=%OUTPUT_SDK_BUILD%
- cd ..\nuget
- git describe > describe.temp
- set /p DESCRIBE=<describe.temp
- msbuild NuGetLinphoneSDK.vcxproj /p:VersionNumber=%DESCRIBE% /p:OutputSdkBuild=%OUTPUT_SDK_BUILD% /p:OutputWrapperBuild=%OUTPUT_WRAPPER_BUILD%
artifacts:
paths:
- cmake\Windows\nuget\*.nupkg
when: always
expire_in: 1 week
\ No newline at end of file
......@@ -34,4 +34,5 @@ include:
stages:
- build
- test
- package
- deploy
......@@ -121,3 +121,6 @@
[submodule "msaaudio"]
path = msaaudio
url = https://gitlab.linphone.org/BC/public/msaaudio.git
[submodule "mswinrtvid"]
path = mswinrtvid
url = https://gitlab.linphone.org/BC/public/mswinrtvid.git
......@@ -4,6 +4,11 @@ Meta repository holding all the dependencies to build a full Linphone SDK.
The currently supported platforms are Android, iOS, Desktop (Linux, Windows, Mac OS X) and UWP (Universal Windows Platform).
## Dependencies
### Windows
SDK is working with Visual Studio 15 2017.
Also you need to have MinGW with GCC and G++ module.
## Building and customizing the SDK
The build system is based on CMake, so you need to install it first if you don't have it on your machine.
......@@ -59,3 +64,8 @@ To generate the a SDK without GPL third parties, use the `-DENABLE_GPL_THIRD_PAR
The Linphone SDK is compiled with third parties code that are subject to patent license, especially: AMR, SILK, G729 and H264 codecs.
To build a SDK with any of these features you need to enable the `ENABLE_NON_FREE_CODECS` option.
Before embedding these features in your final application, **make sure to have the right to do so**.
### Windows UWP
You can use linphone-sdk Win32 in your Windows UWP app.
To do this follow instructions from microsoft.
https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-root
Subproject commit 94b50fe3305f762e5104041af021f3d075053db5
Subproject commit 74415f3361fc0e411f45b9199098a0f545f28988
Subproject commit 57bf7ebe89d289b3cae63f4e2087a5e4216f0a80
Subproject commit 06e4d63ea81898e82dd09d8d31463844a7614917
Subproject commit 7994cbb19ee92291b04b9411f0ea90e7ced0f3c7
Subproject commit 272f3cea6ce32f8ae211c1d2869f8f4c22184c63
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGUID>{EE768D0F-654B-44A3-9EF5-172CB469070B}</ProjectGUID>
<ApplicationType>Windows Store</ApplicationType>
<DefaultLanguage>en-US</DefaultLanguage>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
<Keyword>Win32Proj</Keyword>
<Platform>Win32</Platform>
<ProjectName>NugetLinphoneSDK</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemGroup>
<CustomBuild Include="./NuGetLinphoneSDK.rule">
<Message>Generating NuGet package for LinphoneSDK</Message>
<Command>setlocal
chdir
python.exe .\nuget.py -s $(OutputSdkBuild) -v $(VersionNumber) -w .\NuGetLinphoneSDK -cs $(OutputWrapperBuild) -t LinphoneSDK
if %errorlevel% neq 0 goto :cmEnd
.\nuget.exe pack .\NuGetLinphoneSDK\LinphoneSDK.nuspec
:cmEnd
endlocal &amp; call :cmErrorLevel %errorlevel% &amp; goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd</Command>
<AdditionalInputs>%(AdditionalInputs)</AdditionalInputs>
<Outputs>./NuGet-build</Outputs>
<LinkObjects>false</LinkObjects>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<None Include="NuGetLinphoneSDK\content\Asset\belr\grammars\cpim_grammar">
<DeploymentContent>true</DeploymentContent>
</None>
<None Include="NuGetLinphoneSDK\content\Asset\belr\grammars\vcard_grammar">
<DeploymentContent>true</DeploymentContent>
</None>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
#!/usr/bin/env python
############################################################################
# nuget.py
# Copyright (C) 2016 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
import argparse
import glob
import os
import os.path
import shutil
import sys
class PlatformListAction(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
setattr(namespace, self.dest, values)
def handle_remove_read_only(func, path, exc):
if not os.access(path, os.W_OK):
os.chmod(path, stat.S_IWUSR)
func(path)
else:
raise
def main(argv=None):
if argv is None:
argv = sys.argv
argparser = argparse.ArgumentParser(
description="Generate nuget package of Linphone SDK.")
argparser.add_argument(
'-s', '--sdk_dir', default="OUTPUT", help="The path where to find the built SDK", dest='sdk_dir')
argparser.add_argument(
'-cs', '--cswrapper_dir', default="CsWrapper", help="The path where to find the built C# wrapper", dest='cswrapper_dir')
argparser.add_argument(
'-t', '--target', default="Linphone", help="The target to package (the windows runtime whose metadata will be exported)", dest='target')
argparser.add_argument(
'-v', '--version', default='1.0.0', help="The version of the nuget package to generate", dest='version')
argparser.add_argument(
'-w', '--work_dir', default="WORK/nuget", help="The path where the work will be done to generate the nuget package", dest='work_dir')
args, additional_args2 = argparser.parse_known_args()
target_winmd = "Belledonne.Linphone"
target_id = "LinphoneSDK"
target_desc = "Linphone SDK"
# Create work dir structure
work_dir = os.path.abspath(args.work_dir)
if os.path.exists(work_dir):
shutil.rmtree(work_dir, ignore_errors=False, onerror=handle_remove_read_only)
os.makedirs(os.path.join(work_dir, 'lib', 'uap10.0'))
os.makedirs(os.path.join(work_dir, 'build', 'uap10.0', 'x86'))
# Copy SDK content to nuget package structure
sdk_dir = os.path.abspath(args.sdk_dir)
platform_dir = 'linphone-sdk\desktop'
grammars = glob.glob(os.path.join(sdk_dir, platform_dir, 'share', 'Belr', 'grammars', '*_grammar' ))
dlls = glob.glob(os.path.join(sdk_dir, platform_dir, 'bin', '*.dll'))
dlls += glob.glob(os.path.join(sdk_dir, platform_dir, 'lib', '*.dll'))
dlls += glob.glob(os.path.join(sdk_dir, platform_dir, 'lib', 'mediastreamer', 'plugins', '*.dll'))
pdbs = glob.glob(os.path.join(sdk_dir, platform_dir, 'bin', '*.pdb'))
pdbs += glob.glob(os.path.join(sdk_dir, platform_dir, 'lib', '*.pdb'))
pdbs += glob.glob(os.path.join(sdk_dir, platform_dir, 'lib', 'mediastreamer', 'plugins', '*.pdb'))
wrappers = []
if target_id == "LinphoneSDK":
wrappers += glob.glob(os.path.join(args.cswrapper_dir, 'bin', 'x86', '*', '*.dll'))
wrappers += glob.glob(os.path.join(args.cswrapper_dir, 'bin', 'x86', '*', '*.pdb'))
wrappers += glob.glob(os.path.join(args.cswrapper_dir, 'bin', 'x86', '*', '*.XML'))
if not os.path.exists(os.path.join(work_dir, 'contentFiles', 'uap10.0', 'belr', 'grammars')):
os.makedirs(os.path.join(work_dir, 'contentFiles', 'uap10.0', 'belr', 'grammars'))
for grammar in grammars:
shutil.copy(grammar, os.path.join(work_dir, 'contentFiles', 'uap10.0', 'belr', 'grammars'))
for dll in dlls:
shutil.copy(dll, os.path.join(work_dir, 'build', 'uap10.0', 'x86'))
for pdb in pdbs:
shutil.copy(pdb, os.path.join(work_dir, 'build', 'uap10.0', 'x86'))
for wrap in wrappers:
shutil.copy(wrap, os.path.join(work_dir, 'lib', 'uap10.0'))
# Write targets file
targets = """<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Note: This file will be injected into the target project -->
<!-- Includes the native dll files as content to make sure that they are included in the app package -->
<Target Name="CopyNativeLibraries" AfterTargets="ResolveAssemblyReferences">
<ItemGroup>
<Content Include="$(MSBuildThisFileDirectory)\$(Platform)\*.dll;$(MSBuildThisFileDirectory)\$(Platform)\*.pdb">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Target>
</Project>"""
f = open(os.path.join(work_dir, 'build', 'uap10.0', target_id + '.targets'), 'w')
f.write(targets)
f.close()
# Write nuspec file
nuspec = """<?xml version="1.0"?>
<package>
<metadata>
<id>{target_id}</id>
<version>{version}</version>
<authors>Belledonne Communications</authors>
<owners>Belledonne Communications</owners>
<licenseUrl>http://www.gnu.org/licenses/old-licenses/gpl-2.0.html</licenseUrl>
<projectUrl>https://linphone.org/</projectUrl>
<iconUrl>https://raw.githubusercontent.com/BelledonneCommunications/linphone-windows10/master/Linphone/Assets/logo-BC.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>{target_desc}</description>
<releaseNotes>Nothing new</releaseNotes>
<copyright>Copyright 2017-2019 Belledonne Communications</copyright>
<tags>SIP</tags>
<contentFiles>
<files include="**/*grammar" buildAction="EmbeddedResource" />
</contentFiles>
</metadata>
<files>
<file src="contentFiles\**\*grammar" target="content\" />
<file src="lib\**" target="lib\" />
<file src="build\**" target="build\" />
</files>
</package>""".format(version=args.version, target_id=target_id, target_desc=target_desc)
f = open(os.path.join(work_dir, target_id + '.nuspec'), 'w')
f.write(nuspec)
f.close()
if __name__ == "__main__":
sys.exit(main())
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{E8FB6309-B31E-4380-992C-BB1609B3EA00}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CsWrapper</RootNamespace>
<AssemblyName>CsWrapper</AssemblyName>
<DefaultLanguage>fr-FR</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17763.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.2.3</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Include="LinphoneWrapper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\CsWrapper.rd.xml" />
</ItemGroup>
<PropertyGroup>
<PreBuildEvent>
IF EXIST "$(OutputSdkBuild)\linphone-sdk\desktop\share\linphonecs\LinphoneWrapper.cs" (copy $(OutputSdkBuild)\linphone-sdk\desktop\share\linphonecs\LinphoneWrapper.cs $(MSBuildProjectDirectory)\ /Y)
</PreBuildEvent>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CsWrapper")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CsWrapper")]
[assembly: AssemblyCopyright("Belledonne-communications © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
Ce fichier contient des directives runtime, des spécifications relatives aux types auxquels votre application a accès
via la réflexion et d'autres modèles de code dynamique. Les directives runtime permettent de contrôler
l'optimiseur .NET Native et de vérifier qu'il ne supprime pas le code accessible à votre bibliothèque. Si votre
bibliothèque ne fait pas de réflexion, vous n'avez pas à modifier ce fichier en principe. Cependant,
si votre bibliothèque effectue une réflexion des types, en particulier les types qui lui sont passés ou qui dérivent de ses types,
vous devez écrire des directives runtime.
En règle générale, l'usage de la réflexion dans les bibliothèques permet de découvrir les informations relatives aux types passés
à la bibliothèque. Les directives runtime ont trois façons d'exprimer les exigences des types passés à
votre bibliothèque.
1. Parameter, GenericParameter, TypeParameter, TypeEnumerableParameter
Utilisez ces directives pour refléter les types passés en tant que paramètres.
2. SubTypes
Utilisez une directive SubTypes pour refléter les types dérivés d'un autre type.
3. AttributeImplies
Utilisez une directive AttributeImplies pour indiquer que votre bibliothèque doit refléter
les types ou les méthodes décorés avec un attribut.
Pour plus d'informations sur l'écriture de directives runtime pour les bibliothèques, visitez
https://go.microsoft.com/fwlink/?LinkID=391919
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Library Name="CsWrapper">
<!-- ajoutez ici les directives pour votre bibliothèque -->
</Library>
</Directives>
Subproject commit 84375745c40fc9ed77a6590ca98d7d19e4e21c8c
Subproject commit 4806746c6acd4d3e38f1d7cf980e9c1d6e6d82be
Subproject commit daf67659c0d1ba84b36670a775aa0e5919c6fae0
Subproject commit b334b039e8779cbafc198d687f3da34076bbaba1
Subproject commit 2b2635b7121433c66e3e746c461a5618ce4dcac5
Subproject commit 46731f7951e764f9315dd0d08b4a7e5d8cde07c5
Subproject commit 49ea35bbca2e5e02d6cf9ddf9a6c0a7484fdc18c
Subproject commit fd330d26ecd368f6ee71e81c4f72ca6b935b8b33
Subproject commit d18e4595938f301f1619567ab704be817988f4d5
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment