Windows Phone, Windows Store and testing

瀏覽次數:85 次
跳到第一則未讀訊息

Jeffrey Walton

未讀,
2016年5月2日 凌晨4:05:362016/5/2
收件者:Crypto++ Users
There's a new branch called "windows-store" (http://github.com/weidai11/cryptopp/tree/windows-store). Its the Crypto++ port to Windows Phone and Windows Store, and its ready to be tested.

I've tested under Visual Studio 2002, 2003, 2005, 2008, 2010, 2012 and 2013 from the IDE, which verified the compile and self tests for x86 and x64. I also tested from the command line with ARM, which verified the compile for Windows Phone and Windows Store.

If you have some time then please give it a go and report back with results or problems.

If there are no complaints, then we can merge it next week some time.

Jeff

Геннадий Забула

未讀,
2016年5月2日 上午10:27:412016/5/2
收件者:Crypto++ Users
If I use CMake to generate UWP build, it defines WINAPI_FAMILY but don't defines WINAPI_FAMILY_PARTITION macros.
And following conditions fails in wrong place
# elif defined(WINAPI_FAMILY) && defined(WINAPI_FAMILY_PARTITION(fails here))
#   if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)) (should fail here)
#  define THREAD_TIMER_AVAILABLE
#  endif

I suggest to add following to the config.h:
#ifndef NO_OS_DEPENDENCE

+#if defined(WINAPI_FAMILY) 
+#include <winapifamily.h>
+#endif

понеділок, 2 травня 2016 р. 11:05:36 UTC+3 користувач Jeffrey Walton написав:

Jeffrey Walton

未讀,
2016年5月2日 中午12:31:052016/5/2
收件者:Crypto++ Users
Thanks Геннадий .


On Monday, May 2, 2016 at 10:27:41 AM UTC-4, Геннадий Забула wrote:
If I use CMake to generate UWP build, it defines WINAPI_FAMILY but don't defines WINAPI_FAMILY_PARTITION macros.
And following conditions fails in wrong place
# elif defined(WINAPI_FAMILY) && defined(WINAPI_FAMILY_PARTITION(fails here))
#   if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)) (should fail here)
#  define THREAD_TIMER_AVAILABLE
#  endif

I suggest to add following to the config.h:
#ifndef NO_OS_DEPENDENCE

+#if defined(WINAPI_FAMILY) 
+#include <winapifamily.h>
+#endif

Traditionally Wei does not include (or has not included) other headers in config.h. Its the reason we don't add Apple's TargetConditionals.h in the file.

Would it be possible to have Cmake force include <winapifamily.h> with /FI ? I used it years ago when I did the initial port to Windows Phone. I used it recently for the nmake based makefile at http://github.com/weidai11/cryptopp/blob/master/cryptest.nmake#L47 . I also use it with other libraries, like OpenSSL (OpenSSL suffers the Windows crippling worse than Crypto++).

Or, I can change it to stop testing for "defined(WINAPI_FAMILY_PARTITION)", which should cause a compile failure rather than allow the compile to succeed in a mis-configuration. I.e.,

    # elif defined(WINAPI_FAMILY)
    #   if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))

    #     define THREAD_TIMER_AVAILABLE
    #  endif

(The one thing I recall is the test for "defined(WINAPI_FAMILY)" has to be on its own line because the preprocessor does not short-circuit like a C statement evaluation).

If either sound OK with you, then do you feel like offering a patch?

Jeff

**********

$ git branch
  master
* windows-store

$ grep PARTITION *.h *.cpp
config.h:# elif defined(WINAPI_FAMILY) && defined(WINAPI_FAMILY_PARTITION)
config.h:#   if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
config.h:# elif defined(WINAPI_FAMILY) && defined(WINAPI_FAMILY_PARTITION)
config.h:#   if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
config.h:# elif defined(WINAPI_FAMILY) && defined(WINAPI_FAMILY_PARTITION)
config.h:#   if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
config.h:#   elif !(WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
fipstest.cpp:# if defined(WINAPI_FAMILY) && defined(WINAPI_FAMILY_PARTITION)
fipstest.cpp:#   if !(WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
hrtimer.cpp:# if defined(WINAPI_FAMILY) && defined(WINAPI_FAMILY_ONE_PARTITION)
hrtimer.cpp:#  if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY,WINAPI_FAMILY_PHONE_APP)

Jeffrey Walton

未讀,
2016年5月2日 下午1:25:052016/5/2
收件者:Crypto++ Users List
On Mon, May 2, 2016 at 1:08 PM, Геннадий Забула <zabu...@gmail.com> wrote:
> I'll try to patch CMakeLists to add header through /Fi
>

I'm not opposed to breaking the compile, either. Maybe we should do both?

I prefer clear/obvious breaks rather than mis-configurations and
silent failures. The break will be:

"fatal error C1012: unmatched parenthesis : missing ')'

when using:

#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)

Jeff

Jeffrey Walton

未讀,
2016年5月3日 凌晨12:26:562016/5/3
收件者:Crypto++ Users


On Monday, May 2, 2016 at 4:05:36 AM UTC-4, Jeffrey Walton wrote:
There's a new branch called "windows-store" (http://github.com/weidai11/cryptopp/tree/windows-store). Its the Crypto++ port to Windows Phone and Windows Store, and its ready to be tested.

I think I may have accidentally push master's origin to windows-store, which effectively caused windows-store to be master.

The file shave been added again.

Jeff

Геннадий Забула

未讀,
2016年5月7日 中午12:02:122016/5/7
收件者:Crypto++ Users
https://github.com/weidai11/cryptopp/pull/170
I've added more fixes for Windows Phone and ARM builds


понеділок, 2 травня 2016 р. 11:05:36 UTC+3 користувач Jeffrey Walton написав:
There's a new branch called "windows-store" (http://github.com/weidai11/cryptopp/tree/windows-store). Its the Crypto++ port to Windows Phone and Windows Store, and its ready to be tested.

Геннадий Забула

未讀,
2016年5月8日 上午9:32:442016/5/8
收件者:Crypto++ Users


понеділок, 2 травня 2016 р. 11:05:36 UTC+3 користувач Jeffrey Walton написав:
There's a new branch called "windows-store" (http://github.com/weidai11/cryptopp/tree/windows-store). Its the Crypto++ port to Windows Phone and Windows Store, and its ready to be tested.

Jeffrey Walton

未讀,
2016年5月17日 上午11:18:102016/5/17
收件者:Crypto++ Users


On Monday, May 2, 2016 at 4:05:36 AM UTC-4, Jeffrey Walton wrote:

The `windows-store` branch was merged into `master`. This various issues opened for Windows Phone and Windows Store support are now resolved.

Git does not provide a log entry for the merge (or I cannot find it), so I don't have a record to offer for the transaction.

Jeff

harish chhaparwal

未讀,
2019年1月16日 晚上7:20:042019/1/16
收件者:Crypto++ Users
Hi,
can you please help me with the switches i need to specify to compile crytopp for UWP? Is it fully supported?
thanks

Геннадий Забула

未讀,
2019年1月17日 凌晨3:14:262019/1/17
收件者:harish chhaparwal、Crypto++ Users
I've used CMake to generate project files for UWP.

чт, 17 січ. 2019, 02:20 harish chhaparwal користувач harish.c...@gmail.com пише:
--
You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users.
---
You received this message because you are subscribed to a topic in the Google Groups "Crypto++ Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cryptopp-users/B0g1BHtxP3U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cryptopp-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
回覆所有人
回覆作者
轉寄
0 則新訊息