From 08a67c561aca5a4918f84805f5e6271da8b6b444 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Thu, 9 Jan 2020 13:53:52 +0100 Subject: [PATCH] Make EAP method StdAfx(_UI).h and RC files reusable Signed-off-by: Simon Rozman --- EAPMethods/build/EAPMethod.props | 3 +++ EAPMethods/build/EAPMethod_UI.props | 3 +++ EAPMethods/build/EAPTTLS.vcxproj | 6 +++--- EAPMethods/build/EAPTTLS.vcxproj.filters | 2 +- EAPMethods/build/EAPTTLS_UI.vcxproj | 6 +++--- EAPMethods/build/EAPTTLS_UI.vcxproj.filters | 2 +- EAPMethods/res/{EAPTTLS.rc => EAPMethod.rc} | Bin 5374 -> 5698 bytes .../res/{EAPTTLS_UI.rc => EAPMethod_UI.rc} | Bin 6000 -> 6316 bytes EAPMethods/src/Main.cpp | 9 ++------- EAPMethods/src/Main_UI.cpp | 6 ------ EAPMethods/src/StdAfx.h | 5 +++++ EAPMethods/src/StdAfx_UI.h | 5 +++++ 12 files changed, 26 insertions(+), 21 deletions(-) rename EAPMethods/res/{EAPTTLS.rc => EAPMethod.rc} (91%) rename EAPMethods/res/{EAPTTLS_UI.rc => EAPMethod_UI.rc} (93%) diff --git a/EAPMethods/build/EAPMethod.props b/EAPMethods/build/EAPMethod.props index 9c9315c..c140f8d 100644 --- a/EAPMethods/build/EAPMethod.props +++ b/EAPMethods/build/EAPMethod.props @@ -22,4 +22,7 @@ + + + \ No newline at end of file diff --git a/EAPMethods/build/EAPMethod_UI.props b/EAPMethods/build/EAPMethod_UI.props index 3bc9316..75a3e8b 100644 --- a/EAPMethods/build/EAPMethod_UI.props +++ b/EAPMethods/build/EAPMethod_UI.props @@ -58,6 +58,9 @@ + + + {d4b54856-be1f-4937-a8f7-495125be76be} diff --git a/EAPMethods/build/EAPTTLS.vcxproj b/EAPMethods/build/EAPTTLS.vcxproj index f371ec2..ec47f04 100644 --- a/EAPMethods/build/EAPTTLS.vcxproj +++ b/EAPMethods/build/EAPTTLS.vcxproj @@ -92,6 +92,9 @@ EAPMETHOD_TYPE=21;%(PreprocessorDefinitions) + + EAPMETHOD_TYPE=21;%(PreprocessorDefinitions) + @@ -99,9 +102,6 @@ - - - {b385ec2b-c3f4-48bb-9bac-8b996de7f754} diff --git a/EAPMethods/build/EAPTTLS.vcxproj.filters b/EAPMethods/build/EAPTTLS.vcxproj.filters index 4e76ff0..1db74dd 100644 --- a/EAPMethods/build/EAPTTLS.vcxproj.filters +++ b/EAPMethods/build/EAPTTLS.vcxproj.filters @@ -28,7 +28,7 @@ - + Resource Files diff --git a/EAPMethods/build/EAPTTLS_UI.vcxproj b/EAPMethods/build/EAPTTLS_UI.vcxproj index c74e17a..fdac601 100644 --- a/EAPMethods/build/EAPTTLS_UI.vcxproj +++ b/EAPMethods/build/EAPTTLS_UI.vcxproj @@ -92,6 +92,9 @@ EAPMETHOD_TYPE=21;%(PreprocessorDefinitions) + + EAPMETHOD_TYPE=21;%(PreprocessorDefinitions) + @@ -99,9 +102,6 @@ - - - {b385ec2b-c3f4-48bb-9bac-8b996de7f754} diff --git a/EAPMethods/build/EAPTTLS_UI.vcxproj.filters b/EAPMethods/build/EAPTTLS_UI.vcxproj.filters index b02d8d3..d88e2f5 100644 --- a/EAPMethods/build/EAPTTLS_UI.vcxproj.filters +++ b/EAPMethods/build/EAPTTLS_UI.vcxproj.filters @@ -32,7 +32,7 @@ - + Resource Files diff --git a/EAPMethods/res/EAPTTLS.rc b/EAPMethods/res/EAPMethod.rc similarity index 91% rename from EAPMethods/res/EAPTTLS.rc rename to EAPMethods/res/EAPMethod.rc index 3246ddbe8cf07398398bf1029bbdbbb406747313..91f7c5de7f2055c41bd385cb1d2b5db06aa29363 100644 GIT binary patch delta 400 zcmeyTc}Qo27kj-jLncESg93vqgCj!#gD;Q{Venw^XK-PN2eKl8Vy-}0TOd?mFk&!d z;AP-qP-aMBNCoQ3WXJ>3*!B7W%>$XHz@P**TNh|v2!jtpFi-?;iW&i9Jb?~TU{IKR zQ9w8mrY)5rhoKl~F~pEmh9V%$2Vw<=P@sddfjFO`97w_(rT}zEDnkiF22eZ&C|bf$ z$xr|k(Sw_i2NVYe!)8bJ=j`&>LITM*n=ScgGb&?K1aYep(A*TD3v(t1^6O5n6Xe^h TCb)%38k+{Fshi&l3o-%#Q{Y05 delta 69 zcmX@4^G|bw7yD#2u4S8rI4#%(l^9$Z92o)_bQwZ`(1#&-bEd#-Mt+zuOi*6vJJaMf L>=K*JM0pqiU;Pkf diff --git a/EAPMethods/res/EAPTTLS_UI.rc b/EAPMethods/res/EAPMethod_UI.rc similarity index 93% rename from EAPMethods/res/EAPTTLS_UI.rc rename to EAPMethods/res/EAPMethod_UI.rc index c1bee20ed342e27046f6917dc3f9397cbf0292c4..2badf3f12c652eb66f2006becbf2de08acf5ff7b 100644 GIT binary patch delta 349 zcmeyMx5jXT7kj)iLncESg93vqgCj!#gD;Q{Venw^XK-PN2eKl8Vy-}0TOd?mFk&!d z;AP-qP-aMBNCoQ3WXJ>3*!B7W%>$Y?`Mi*5y%N#7Jc0HqfT0r9MIk^}_%H-Bz|2Tx z$YCf3+6r+;Dnk(v<^!<;LnzQS*+87nP!1$vu2Nv|RRbz7VaNbVqyU9W7%CYGfFgQu qBl3Xaz(CmS$Uc!<9$Pp-{Q}giwE3~nYDQ^niXcu`+B{d}G7|uBf;o}^ delta 60 zcmZ2u_(5-j7yD!}o)w!#I3I8cDlxb+I5Gq<=rV)=p$|jwW?_-ljQlWRnBYy(%S-^| CvJTq- diff --git a/EAPMethods/src/Main.cpp b/EAPMethods/src/Main.cpp index b062a2d..333a8f2 100644 --- a/EAPMethods/src/Main.cpp +++ b/EAPMethods/src/Main.cpp @@ -20,16 +20,11 @@ #include "StdAfx.h" +#pragma comment(lib, "Ws2_32.lib") + using namespace std; using namespace winstd; -#pragma comment(lib, "Ws2_32.lib") - -#if EAPMETHOD_TYPE==21 -#define _EAPMETHOD_PEER eap::peer_ttls -#else -#error Unknown EAP Method type. -#endif _EAPMETHOD_PEER g_peer; diff --git a/EAPMethods/src/Main_UI.cpp b/EAPMethods/src/Main_UI.cpp index cfcaee5..af07e8f 100644 --- a/EAPMethods/src/Main_UI.cpp +++ b/EAPMethods/src/Main_UI.cpp @@ -26,12 +26,6 @@ using namespace std; using namespace winstd; -#if EAPMETHOD_TYPE==21 -#define _EAPMETHOD_PEER_UI eap::peer_ttls_ui -#else -#error Unknown EAP Method type. -#endif - HANDLE g_act_ctx = NULL; _EAPMETHOD_PEER_UI g_peer; diff --git a/EAPMethods/src/StdAfx.h b/EAPMethods/src/StdAfx.h index bdc3449..234a108 100644 --- a/EAPMethods/src/StdAfx.h +++ b/EAPMethods/src/StdAfx.h @@ -20,5 +20,10 @@ #pragma once +#if EAPMETHOD_TYPE == 21 #include "../../lib/TTLS/include/Method.h" #include "../../lib/TTLS/include/Module.h" +#define _EAPMETHOD_PEER eap::peer_ttls +#else +#error Unknown EAP Method type. +#endif diff --git a/EAPMethods/src/StdAfx_UI.h b/EAPMethods/src/StdAfx_UI.h index 70dc022..a2992f5 100644 --- a/EAPMethods/src/StdAfx_UI.h +++ b/EAPMethods/src/StdAfx_UI.h @@ -20,4 +20,9 @@ #pragma once +#if EAPMETHOD_TYPE == 21 #include "../../lib/TTLS_UI/include/Module.h" +#define _EAPMETHOD_PEER_UI eap::peer_ttls_ui +#else +#error Unknown EAP Method type. +#endif