Преглед на файлове

Make examples in /client, /copy-paste-capi/, and /copy-paste work.

Hanseul Jun преди 4 години
родител
ревизия
e33717e077
променени са 31 файла, в които са добавени 230 реда и са изтрити 6 реда
  1. 15 1
      examples/client/CMakeLists.txt
  2. BIN
      examples/client/uwp/Logo.png
  3. BIN
      examples/client/uwp/SmallLogo.png
  4. BIN
      examples/client/uwp/SmallLogo44x44.png
  5. BIN
      examples/client/uwp/SplashScreen.png
  6. BIN
      examples/client/uwp/StoreLogo.png
  7. BIN
      examples/client/uwp/Windows_TemporaryKey.pfx
  8. 42 0
      examples/client/uwp/package.appxManifest
  9. 30 2
      examples/copy-paste-capi/CMakeLists.txt
  10. BIN
      examples/copy-paste-capi/uwp/answerer/Logo.png
  11. BIN
      examples/copy-paste-capi/uwp/answerer/SmallLogo.png
  12. BIN
      examples/copy-paste-capi/uwp/answerer/SmallLogo44x44.png
  13. BIN
      examples/copy-paste-capi/uwp/answerer/SplashScreen.png
  14. BIN
      examples/copy-paste-capi/uwp/answerer/StoreLogo.png
  15. BIN
      examples/copy-paste-capi/uwp/answerer/Windows_TemporaryKey.pfx
  16. 42 0
      examples/copy-paste-capi/uwp/answerer/package.appxManifest
  17. BIN
      examples/copy-paste-capi/uwp/offerer/Logo.png
  18. BIN
      examples/copy-paste-capi/uwp/offerer/SmallLogo.png
  19. BIN
      examples/copy-paste-capi/uwp/offerer/SmallLogo44x44.png
  20. BIN
      examples/copy-paste-capi/uwp/offerer/SplashScreen.png
  21. BIN
      examples/copy-paste-capi/uwp/offerer/StoreLogo.png
  22. BIN
      examples/copy-paste-capi/uwp/offerer/Windows_TemporaryKey.pfx
  23. 42 0
      examples/copy-paste-capi/uwp/offerer/package.appxManifest
  24. 17 3
      examples/copy-paste/CMakeLists.txt
  25. BIN
      examples/copy-paste/uwp/offerer/Logo.png
  26. BIN
      examples/copy-paste/uwp/offerer/SmallLogo.png
  27. BIN
      examples/copy-paste/uwp/offerer/SmallLogo44x44.png
  28. BIN
      examples/copy-paste/uwp/offerer/SplashScreen.png
  29. BIN
      examples/copy-paste/uwp/offerer/StoreLogo.png
  30. BIN
      examples/copy-paste/uwp/offerer/Windows_TemporaryKey.pfx
  31. 42 0
      examples/copy-paste/uwp/offerer/package.appxManifest

+ 15 - 1
examples/client/CMakeLists.txt

@@ -3,8 +3,22 @@ if(POLICY CMP0079)
 	cmake_policy(SET CMP0079 NEW)
 endif()
 
+set(CLIENT_UWP_RESOURCES
+	uwp/Logo.png
+	uwp/package.appxManifest
+	uwp/SmallLogo.png
+	uwp/SmallLogo44x44.png
+	uwp/SplashScreen.png
+	uwp/StoreLogo.png
+	uwp/Windows_TemporaryKey.pfx
+)
+
 if(WIN32)
-	add_executable(datachannel-client main.cpp parse_cl.cpp parse_cl.h getopt.cpp getopt.h)
+	if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+	add_executable(datachannel-client main.cpp parse_cl.cpp parse_cl.h getopt.cpp getopt.h ${CLIENT_UWP_RESOURCES})
+	else()
+	    add_executable(datachannel-client main.cpp parse_cl.cpp parse_cl.h getopt.cpp getopt.h)
+	endif()
 	target_compile_definitions(datachannel-client PUBLIC STATIC_GETOPT)
 else()
 	add_executable(datachannel-client main.cpp parse_cl.cpp parse_cl.h)

BIN
examples/client/uwp/Logo.png


BIN
examples/client/uwp/SmallLogo.png


BIN
examples/client/uwp/SmallLogo44x44.png


BIN
examples/client/uwp/SplashScreen.png


BIN
examples/client/uwp/StoreLogo.png


BIN
examples/client/uwp/Windows_TemporaryKey.pfx


+ 42 - 0
examples/client/uwp/package.appxManifest

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Package
+	xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
+    xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
+	xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
+	xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"
+	xmlns:iot2="http://schemas.microsoft.com/appx/manifest/iot/windows10/2"
+	IgnorableNamespaces="uap mp">
+
+	<Identity Name="274EF42C-A3FB-3D6C-B127-E39C508A4F0E" Publisher="CN=CMake" Version="1.0.0.0" />
+	<mp:PhoneIdentity PhoneProductId="274EF42C-A3FB-3D6C-B127-E39C508A4F0E" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
+	<Properties>
+		<DisplayName>datachannel-client</DisplayName>
+		<PublisherDisplayName>CMake</PublisherDisplayName>
+		<Logo>StoreLogo.png</Logo>
+	</Properties>
+	<Dependencies>
+		<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
+	</Dependencies>
+	<Resources>
+		<Resource Language="x-generate" />
+	</Resources>
+	<Applications>
+		<Application 
+			Id="App"
+			Executable="client.exe"
+			EntryPoint="datachannel-client.App"
+			desktop4:Subsystem="console"
+			desktop4:SupportsMultipleInstances="true"
+			iot2:Subsystem="console"
+			iot2:SupportsMultipleInstances="true">
+			<uap:VisualElements
+				DisplayName="datachannel-client"
+				Description="datachannel-client"
+				BackgroundColor="#336699"
+				Square150x150Logo="Logo.png"
+				Square44x44Logo="SmallLogo44x44.png">
+				<uap:SplashScreen Image="SplashScreen.png" />
+			</uap:VisualElements>
+		</Application>
+	</Applications>
+</Package>

+ 30 - 2
examples/copy-paste-capi/CMakeLists.txt

@@ -3,12 +3,40 @@ project(offerer C)
 
 set(CMAKE_C_STANDARD 11)
 
-add_executable(datachannel-copy-paste-capi-offerer offerer.c)
+set(OFFERER_UWP_RESOURCES
+	uwp/offerer/Logo.png
+	uwp/offerer/package.appxManifest
+	uwp/offerer/SmallLogo.png
+	uwp/offerer/SmallLogo44x44.png
+	uwp/offerer/SplashScreen.png
+	uwp/offerer/StoreLogo.png
+	uwp/offerer/Windows_TemporaryKey.pfx
+)
+
+set(ANSWERER_UWP_RESOURCES
+	uwp/answerer/Logo.png
+	uwp/answerer/package.appxManifest
+	uwp/answerer/SmallLogo.png
+	uwp/answerer/SmallLogo44x44.png
+	uwp/answerer/SplashScreen.png
+	uwp/answerer/StoreLogo.png
+	uwp/answerer/Windows_TemporaryKey.pfx
+)
+
+if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+	add_executable(datachannel-copy-paste-capi-offerer offerer.c ${OFFERER_UWP_RESOURCES})
+else()
+	add_executable(datachannel-copy-paste-capi-offerer offerer.c)
+endif()
 set_target_properties(datachannel-copy-paste-capi-offerer PROPERTIES
 	OUTPUT_NAME offerer)
 target_link_libraries(datachannel-copy-paste-capi-offerer datachannel)
 
-add_executable(datachannel-copy-paste-capi-answerer answerer.c)
+if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+	add_executable(datachannel-copy-paste-capi-answerer answerer.c ${ANSWERER_UWP_RESOURCES})
+else()
+	add_executable(datachannel-copy-paste-capi-answerer answerer.c)
+endif()
 set_target_properties(datachannel-copy-paste-capi-answerer PROPERTIES
 	OUTPUT_NAME answerer)
 target_link_libraries(datachannel-copy-paste-capi-answerer datachannel)

BIN
examples/copy-paste-capi/uwp/answerer/Logo.png


BIN
examples/copy-paste-capi/uwp/answerer/SmallLogo.png


BIN
examples/copy-paste-capi/uwp/answerer/SmallLogo44x44.png


BIN
examples/copy-paste-capi/uwp/answerer/SplashScreen.png


BIN
examples/copy-paste-capi/uwp/answerer/StoreLogo.png


BIN
examples/copy-paste-capi/uwp/answerer/Windows_TemporaryKey.pfx


+ 42 - 0
examples/copy-paste-capi/uwp/answerer/package.appxManifest

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Package
+	xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
+	xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
+	xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
+	xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"
+	xmlns:iot2="http://schemas.microsoft.com/appx/manifest/iot/windows10/2"
+	IgnorableNamespaces="uap mp">
+
+	<Identity Name="9751ACA6-5428-3AF2-AED6-2DDA8D2FD777" Publisher="CN=CMake" Version="1.0.0.0" />
+	<mp:PhoneIdentity PhoneProductId="9751ACA6-5428-3AF2-AED6-2DDA8D2FD777" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
+	<Properties>
+		<DisplayName>datachannel-copy-paste-capi-answerer</DisplayName>
+		<PublisherDisplayName>CMake</PublisherDisplayName>
+		<Logo>StoreLogo.png</Logo>
+	</Properties>
+	<Dependencies>
+		<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
+	</Dependencies>
+	<Resources>
+		<Resource Language="x-generate" />
+	</Resources>
+	<Applications>
+		<Application
+			Id="App"
+			Executable="answerer.exe"
+			EntryPoint="datachannel-copy-paste-capi-answerer.App"
+			desktop4:Subsystem="console"
+			desktop4:SupportsMultipleInstances="true"
+			iot2:Subsystem="console"
+			iot2:SupportsMultipleInstances="true">
+			<uap:VisualElements
+				DisplayName="datachannel-copy-paste-capi-answerer"
+				Description="datachannel-copy-paste-capi-answerer"
+				BackgroundColor="#336699"
+				Square150x150Logo="Logo.png"
+				Square44x44Logo="SmallLogo44x44.png">
+				<uap:SplashScreen Image="SplashScreen.png" />
+			</uap:VisualElements>
+		</Application>
+	</Applications>
+</Package>

BIN
examples/copy-paste-capi/uwp/offerer/Logo.png


BIN
examples/copy-paste-capi/uwp/offerer/SmallLogo.png


BIN
examples/copy-paste-capi/uwp/offerer/SmallLogo44x44.png


BIN
examples/copy-paste-capi/uwp/offerer/SplashScreen.png


BIN
examples/copy-paste-capi/uwp/offerer/StoreLogo.png


BIN
examples/copy-paste-capi/uwp/offerer/Windows_TemporaryKey.pfx


+ 42 - 0
examples/copy-paste-capi/uwp/offerer/package.appxManifest

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Package
+	xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
+	xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
+	xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
+	xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"
+	xmlns:iot2="http://schemas.microsoft.com/appx/manifest/iot/windows10/2"
+	IgnorableNamespaces="uap mp">
+
+	<Identity Name="D63472B9-2085-3CA0-96B2-895D164F4155" Publisher="CN=CMake" Version="1.0.0.0" />
+	<mp:PhoneIdentity PhoneProductId="D63472B9-2085-3CA0-96B2-895D164F4155" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
+	<Properties>
+		<DisplayName>datachannel-copy-paste-capi-offerer</DisplayName>
+		<PublisherDisplayName>CMake</PublisherDisplayName>
+		<Logo>StoreLogo.png</Logo>
+	</Properties>
+	<Dependencies>
+		<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
+	</Dependencies>
+	<Resources>
+		<Resource Language="x-generate" />
+	</Resources>
+	<Applications>
+		<Application 
+			Id="App"
+			Executable="offerer.exe"
+			EntryPoint="datachannel-copy-paste-capi-offerer.App"
+			desktop4:Subsystem="console"
+			desktop4:SupportsMultipleInstances="true"
+			iot2:Subsystem="console"
+			iot2:SupportsMultipleInstances="true">
+			<uap:VisualElements
+				DisplayName="datachannel-copy-paste-capi-offerer"
+				Description="datachannel-copy-paste-capi-offerer"
+				BackgroundColor="#336699"
+				Square150x150Logo="Logo.png"
+				Square44x44Logo="SmallLogo44x44.png">
+				<uap:SplashScreen Image="SplashScreen.png" />
+			</uap:VisualElements>
+		</Application>
+	</Applications>
+</Package>

+ 17 - 3
examples/copy-paste/CMakeLists.txt

@@ -1,5 +1,15 @@
 cmake_minimum_required(VERSION 3.7)
 
+set(OFFERER_UWP_RESOURCES
+	uwp/offerer/Logo.png
+	uwp/offerer/package.appxManifest
+	uwp/offerer/SmallLogo.png
+	uwp/offerer/SmallLogo44x44.png
+	uwp/offerer/SplashScreen.png
+	uwp/offerer/StoreLogo.png
+	uwp/offerer/Windows_TemporaryKey.pfx
+)
+
 set(ANSWERER_UWP_RESOURCES
 	uwp/answerer/Logo.png
 	uwp/answerer/package.appxManifest
@@ -10,16 +20,20 @@ set(ANSWERER_UWP_RESOURCES
 	uwp/answerer/Windows_TemporaryKey.pfx
 )
 
-add_executable(datachannel-copy-paste-offerer offerer.cpp)
+if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+	add_executable(datachannel-copy-paste-offerer offerer.cpp ${OFFERER_UWP_RESOURCES})
+else()
+	add_executable(datachannel-copy-paste-offerer offerer.cpp)
+endif()
 set_target_properties(datachannel-copy-paste-offerer PROPERTIES
 	CXX_STANDARD 17
 	OUTPUT_NAME offerer)
 target_link_libraries(datachannel-copy-paste-offerer datachannel)
 
 if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
-  add_executable(datachannel-copy-paste-answerer answerer.cpp ${ANSWERER_UWP_RESOURCES})
+	add_executable(datachannel-copy-paste-answerer answerer.cpp ${ANSWERER_UWP_RESOURCES})
 else()
-  add_executable(datachannel-copy-paste-answerer answerer.cpp)
+	add_executable(datachannel-copy-paste-answerer answerer.cpp)
 endif()
 set_target_properties(datachannel-copy-paste-answerer PROPERTIES
 	CXX_STANDARD 17

BIN
examples/copy-paste/uwp/offerer/Logo.png


BIN
examples/copy-paste/uwp/offerer/SmallLogo.png


BIN
examples/copy-paste/uwp/offerer/SmallLogo44x44.png


BIN
examples/copy-paste/uwp/offerer/SplashScreen.png


BIN
examples/copy-paste/uwp/offerer/StoreLogo.png


BIN
examples/copy-paste/uwp/offerer/Windows_TemporaryKey.pfx


+ 42 - 0
examples/copy-paste/uwp/offerer/package.appxManifest

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Package
+	xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
+	xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
+	xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
+	xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"
+	xmlns:iot2="http://schemas.microsoft.com/appx/manifest/iot/windows10/2"
+	IgnorableNamespaces="uap mp">
+
+	<Identity Name="68160929-CE5F-3FC1-A120-BCB1C223FC2F" Publisher="CN=CMake" Version="1.0.0.0" />
+	<mp:PhoneIdentity PhoneProductId="68160929-CE5F-3FC1-A120-BCB1C223FC2F" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
+	<Properties>
+		<DisplayName>datachannel-copy-paste-offerer</DisplayName>
+		<PublisherDisplayName>CMake</PublisherDisplayName>
+		<Logo>StoreLogo.png</Logo>
+	</Properties>
+	<Dependencies>
+		<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
+	</Dependencies>
+	<Resources>
+		<Resource Language="x-generate" />
+	</Resources>
+	<Applications>
+		<Application
+			Id="App"
+			Executable="offerer.exe"
+			EntryPoint="datachannel-copy-paste-offerer.App"
+			desktop4:Subsystem="console"
+			desktop4:SupportsMultipleInstances="true"
+			iot2:Subsystem="console"
+			iot2:SupportsMultipleInstances="true">
+			<uap:VisualElements
+				DisplayName="datachannel-copy-paste-offerer"
+				Description="datachannel-copy-paste-offerer"
+				BackgroundColor="#336699"
+				Square150x150Logo="Logo.png"
+				Square44x44Logo="SmallLogo44x44.png">
+				<uap:SplashScreen Image="SplashScreen.png" />
+			</uap:VisualElements>
+		</Application>
+	</Applications>
+</Package>