README 4.83 KB
Newer Older
Thomas Nigro's avatar
Thomas Nigro committed
1
This project is about the port of VLC to the WinRT platform.
2

Thomas Nigro's avatar
Thomas Nigro committed
3 4
The goal is to target Windows 8.1/10 Modern environment, on x86 and ARM (Windows RT).
But also Windows Phone 8.1, Windows 10 Mobile and other devices running the WinRT platform.
5 6 7 8 9

Most of the media code engine is licensed under LGPL, like libVLC.
The application is dual-licensed under GPLv2/MPL and the license might change later,
if need be.

10 11 12
How to compile VLC for WinRT:
-----------------------------

Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
13
You need:
Thomas Nigro's avatar
Thomas Nigro committed
14
* Visual Studio 2015
Thomas Nigro's avatar
Thomas Nigro committed
15
* Windows 8.1 for VLC WinRT 8.1 OR Windows 10 TH2 for VLC UWP
16

Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
17 18 19 20
If you are only on Windows, skip the step 0)

0) Cross-compile libvlc for WinRT
---------------------------------
21 22 23 24 25 26
You need:
* A very, very, very recent Linux
* build-essentials and all related build tools (make, autotools, git, etc...)
* Prodigious patience and tenacity :)

Build and install mingw-w64 SVN rev 5568 or higher (for libwinstorecompat).
27 28 29 30 31
Be sure to pass --disable-shared when configuring GCC.

Why? Statically linking to
libgcc.a will ensure that all unused methods get stripped. It will drastically
reduce the number of forbidden calls.
32 33

Run ./compile.sh and generate vlc.7z
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
34 35 36 37

1) Extract libVLC
-----------------

Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
38
If you skipped step 0), take the most recent build, depending on your architecture.
Martin Finkel's avatar
Martin Finkel committed
39
- For x86 and 64 versions, builds are located in http://nightlies.videolan.org/build/winrt-i686/ 
Thomas Nigro's avatar
Thomas Nigro committed
40
and http://nightlies.videolan.org/build/winrt-x86_64/ 
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
41

Thomas Nigro's avatar
Thomas Nigro committed
42 43
- For ARM version, builds are located in http://people.videolan.org/~hugo/

Martin Finkel's avatar
Martin Finkel committed
44
Extract the libVLC contents from the archive to libvlc/<os>/vlc-<platform>/<configuration>
Thomas Nigro's avatar
Thomas Nigro committed
45
<os> is either Windows, Windows Phone or Universal (Universal *includes* W10M)
Martin Finkel's avatar
Martin Finkel committed
46
<platform> is either ARM or x86 or amd64
47
<configuration>  is Debug or Release
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
48

49
2) Build and package the front-end
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
50
----------------------------------
Thomas Nigro's avatar
Thomas Nigro committed
51
Open the VLC_WinRT solution in build/VLC_WINRT.sln
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
52

53
3a) Get a developer signature from your account
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
54 55 56
--------------------------------------------------
If you don't have a dev account, see the next paragraph

57
3b) Local signature
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
58 59
-------------------
Package.appxmanifest, and generate a self-signed cert
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79

Project → Store → Create App Packages...
Select target "Debug (Win32)"
Build the package.

Now we have to import the self-signed cert into the local computer:

Open MMC
File → Add/Remove Snap In...
Certificates → Add
Select "Computer account"
Select "Local computer" (already selected), press Finish
OK to close "Add/Remove Snap-ins" dialog
Certificates (Local Computer) → Trusted Root Certification Authorities → Certificates
Right click, All Tasks... → Import...
Next
Select your "VLC_WINRT_1.0.0.0_x86_Debug.cer"
Next
Finish

80 81
4) Install libvlcpp
-------------------
Thomas Nigro's avatar
Thomas Nigro committed
82
"git submodule update --init" in the vlc-winrt/ folder.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100

4b) Alternately, if you wish to manually install:
-------------------------------------------------
Useful in case of network drive, for instance.

Start → Programs → Microsoft Visual Studio 2012 → Visual Studio Tools → Debuggable Package Manager

Install VCRT dependency:
Add-AppxPackage Dependencies/x86/*
( or Add-AppxPackage Dependencies/x86/Microsoft.VCLibs.x86.Debug.11.00.appx if you feel like it )

Deploy VLC appx:
Add-AppxPackage VLC_WINRT_1.0.0.0_x86_Debug.appx

Enable debug mode for the app:
(note: use Get-AppxPackage to look up the full name of the app)
Enable-AppxDebug  9519ba58-7ad6-4c4e-97ed-bfc2135a0d19_1.0.0.0_x86__2c7ztm58ext6g
# Debugging has been enabled for 9519ba58-7ad6-4c4e-97ed-bfc2135a0d19_1.0.0.0_x86__2c7ztm58ext6g.
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
101

Thomas Nigro's avatar
Thomas Nigro committed
102
5) Visual Studios extensions and toolkits
Thomas Nigro's avatar
Thomas Nigro committed
103
-------------------------------------------------
Thomas Nigro's avatar
Thomas Nigro committed
104 105 106
 * Multilingual Toolkit for Visual Studio
https://dev.windows.com/en-us/develop/multilingual-app-toolkit

Thomas Nigro's avatar
Thomas Nigro committed
107
 * SQLite libraries are available in VS -> Tools -> Extensions and Updates
Thomas Nigro's avatar
Thomas Nigro committed
108
http://sqlite.org/download.html
Thomas Nigro's avatar
Thomas Nigro committed
109 110

6) Build
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
111
--------
Thomas Nigro's avatar
Thomas Nigro committed
112
Click on Build Solution.
Hugo Beauzée-Luyssen's avatar
Hugo Beauzée-Luyssen committed
113 114 115 116

Click on Deploy Solution

Profit. \o/
117

Thomas Nigro's avatar
Thomas Nigro committed
118
7) Coding guidelines
119
--------------------
Thomas Nigro's avatar
Thomas Nigro committed
120 121 122 123
TEXTBOX
FocusTextBox is a simple TextBox control. However, when the user writes something in the TextBox, it's also
listened by the KeyboardListenerService, which believes the user is entering a keyboard shortcut.
With FocusTextBox we prevent this behaviour.
124 125
Therefore ALL future patches should use FocusTextBox instead of TextBox.

Thomas Nigro's avatar
Thomas Nigro committed
126 127 128 129
LICENSES
Before sending a patch that adds a new nuget package or ships a DLL, please check its license, it has to be GPLv2-compliant.

8) Extra: Helpful snippets and tools
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
130
------------------------------------
131 132 133 134 135 136
Use http://technet.microsoft.com/en-us/sysinternals/bb896647 DebugView to view the debug logs
And Procmon ( http://technet.microsoft.com/en-ca/sysinternals/bb896645.aspx ) helps to see and debug events (like loading DLLs/modules/etc)

Quick one-liners to remove ugly mode changes and ugly CR-LF line endings.
git status -s | grep "^ M " | awk '{ print $2; }' | xargs chmod 644
git status -s | grep "^ M " | awk '{ print $2; }' | xargs dos2unix