diff --git a/drivers/builtin_openssl2/SCsub b/drivers/builtin_openssl2/SCsub deleted file mode 100644 index bddf33146a2..00000000000 --- a/drivers/builtin_openssl2/SCsub +++ /dev/null @@ -1,662 +0,0 @@ -Import('env') -Import('env_drivers') - -openssl_sources = [ - "ssl/t1_lib.c", - "ssl/t1_ext.c", - "ssl/s3_srvr.c", - "ssl/t1_enc.c", - "ssl/t1_meth.c", - "ssl/s23_clnt.c", - "ssl/ssl_asn1.c", - "ssl/tls_srp.c", - "ssl/kssl.c", - "ssl/d1_both.c", - "ssl/t1_clnt.c", - "ssl/bio_ssl.c", - "ssl/d1_srtp.c", - "ssl/t1_reneg.c", - "ssl/ssl_cert.c", - "ssl/s3_lib.c", - "ssl/d1_srvr.c", - "ssl/s23_meth.c", - "ssl/ssl_stat.c", - "ssl/ssl_err.c", - "ssl/ssl_algs.c", - "ssl/s3_cbc.c", - "ssl/d1_clnt.c", - "ssl/s3_pkt.c", - "ssl/d1_meth.c", - "ssl/s3_both.c", - "ssl/s2_enc.c", - "ssl/s3_meth.c", - "ssl/s3_enc.c", - "ssl/s23_pkt.c", - "ssl/s2_pkt.c", - "ssl/d1_pkt.c", - "ssl/ssl_rsa.c", - "ssl/s23_srvr.c", - "ssl/s2_meth.c", - "ssl/s3_clnt.c", - "ssl/s23_lib.c", - "ssl/t1_srvr.c", - "ssl/ssl_lib.c", - "ssl/ssl_txt.c", - "ssl/s2_srvr.c", - "ssl/ssl_sess.c", - "ssl/s2_clnt.c", - "ssl/d1_lib.c", - "ssl/s2_lib.c", - "ssl/ssl_err2.c", - "ssl/ssl_ciph.c", - "crypto/dsa/dsa_lib.c", - "crypto/dsa/dsa_pmeth.c", - "crypto/dsa/dsa_ossl.c", - "crypto/dsa/dsa_gen.c", - "crypto/dsa/dsa_asn1.c", - "crypto/dsa/dsa_prn.c", - "crypto/dsa/dsa_sign.c", - "crypto/dsa/dsa_key.c", - "crypto/dsa/dsa_vrf.c", - "crypto/dsa/dsa_err.c", - "crypto/dsa/dsa_ameth.c", - "crypto/dsa/dsa_depr.c", - "crypto/x509/x509_lu.c", - "crypto/x509/x509cset.c", - "crypto/x509/x509_set.c", - "crypto/x509/x509_d2.c", - "crypto/x509/x509_txt.c", - "crypto/x509/x509rset.c", - "crypto/x509/by_dir.c", - "crypto/x509/x509_vpm.c", - "crypto/x509/x509_vfy.c", - "crypto/x509/x509_trs.c", - "crypto/x509/by_file.c", - "crypto/x509/x509_obj.c", - "crypto/x509/x509spki.c", - "crypto/x509/x509_v3.c", - "crypto/x509/x509_req.c", - "crypto/x509/x509_att.c", - "crypto/x509/x_all.c", - "crypto/x509/x509_ext.c", - "crypto/x509/x509type.c", - "crypto/x509/x509_def.c", - "crypto/x509/x509_err.c", - "crypto/x509/x509name.c", - "crypto/x509/x509_r2x.c", - "crypto/x509/x509_cmp.c", - "crypto/asn1/x_pkey.c", - "crypto/asn1/a_gentm.c", - "crypto/asn1/x_sig.c", - "crypto/asn1/t_req.c", - "crypto/asn1/t_pkey.c", - "crypto/asn1/p8_pkey.c", - "crypto/asn1/a_i2d_fp.c", - "crypto/asn1/x_val.c", - "crypto/asn1/f_string.c", - "crypto/asn1/p5_pbe.c", - "crypto/asn1/bio_ndef.c", - "crypto/asn1/a_bool.c", - "crypto/asn1/asn1_gen.c", - "crypto/asn1/x_algor.c", - "crypto/asn1/bio_asn1.c", - "crypto/asn1/asn_mime.c", - "crypto/asn1/t_x509.c", - "crypto/asn1/a_strex.c", - "crypto/asn1/x_nx509.c", - "crypto/asn1/asn1_err.c", - "crypto/asn1/x_crl.c", - "crypto/asn1/a_print.c", - "crypto/asn1/a_type.c", - "crypto/asn1/tasn_new.c", - "crypto/asn1/n_pkey.c", - "crypto/asn1/x_bignum.c", - "crypto/asn1/asn_pack.c", - "crypto/asn1/evp_asn1.c", - "crypto/asn1/t_bitst.c", - "crypto/asn1/x_req.c", - "crypto/asn1/a_time.c", - "crypto/asn1/x_name.c", - "crypto/asn1/x_pubkey.c", - "crypto/asn1/tasn_typ.c", - "crypto/asn1/asn_moid.c", - "crypto/asn1/a_utctm.c", - "crypto/asn1/asn1_lib.c", - "crypto/asn1/x_x509a.c", - "crypto/asn1/a_set.c", - "crypto/asn1/t_crl.c", - "crypto/asn1/p5_pbev2.c", - "crypto/asn1/tasn_enc.c", - "crypto/asn1/a_mbstr.c", - "crypto/asn1/tasn_dec.c", - "crypto/asn1/x_x509.c", - "crypto/asn1/a_octet.c", - "crypto/asn1/x_long.c", - "crypto/asn1/a_bytes.c", - "crypto/asn1/t_x509a.c", - "crypto/asn1/a_enum.c", - "crypto/asn1/a_int.c", - "crypto/asn1/tasn_prn.c", - "crypto/asn1/i2d_pr.c", - "crypto/asn1/a_utf8.c", - "crypto/asn1/t_spki.c", - "crypto/asn1/a_digest.c", - "crypto/asn1/a_dup.c", - "crypto/asn1/i2d_pu.c", - "crypto/asn1/a_verify.c", - "crypto/asn1/f_enum.c", - "crypto/asn1/a_sign.c", - "crypto/asn1/d2i_pr.c", - "crypto/asn1/asn1_par.c", - "crypto/asn1/x_spki.c", - "crypto/asn1/a_d2i_fp.c", - "crypto/asn1/f_int.c", - "crypto/asn1/x_exten.c", - "crypto/asn1/tasn_utl.c", - "crypto/asn1/nsseq.c", - "crypto/asn1/a_bitstr.c", - "crypto/asn1/x_info.c", - "crypto/asn1/a_strnid.c", - "crypto/asn1/a_object.c", - "crypto/asn1/tasn_fre.c", - "crypto/asn1/d2i_pu.c", - "crypto/asn1/ameth_lib.c", - "crypto/asn1/x_attrib.c", - "crypto/evp/m_sha.c", - "crypto/evp/e_camellia.c", - "crypto/evp/e_aes.c", - "crypto/evp/bio_b64.c", - "crypto/evp/m_sigver.c", - "crypto/evp/m_wp.c", - "crypto/evp/m_sha1.c", - "crypto/evp/p_seal.c", - "crypto/evp/c_alld.c", - "crypto/evp/p5_crpt.c", - "crypto/evp/e_rc4.c", - "crypto/evp/m_ecdsa.c", - "crypto/evp/bio_enc.c", - "crypto/evp/e_des3.c", - "crypto/evp/m_null.c", - "crypto/evp/bio_ok.c", - "crypto/evp/pmeth_gn.c", - "crypto/evp/e_rc5.c", - "crypto/evp/e_rc2.c", - "crypto/evp/p_dec.c", - "crypto/evp/p_verify.c", - "crypto/evp/e_rc4_hmac_md5.c", - "crypto/evp/pmeth_lib.c", - "crypto/evp/m_ripemd.c", - "crypto/evp/m_md5.c", - "crypto/evp/e_bf.c", - "crypto/evp/p_enc.c", - "crypto/evp/m_dss.c", - "crypto/evp/bio_md.c", - "crypto/evp/evp_pbe.c", - "crypto/evp/e_seed.c", - "crypto/evp/e_cast.c", - "crypto/evp/p_open.c", - "crypto/evp/p5_crpt2.c", - "crypto/evp/m_dss1.c", - "crypto/evp/names.c", - "crypto/evp/evp_acnf.c", - "crypto/evp/e_des.c", - "crypto/evp/evp_cnf.c", - "crypto/evp/evp_lib.c", - "crypto/evp/digest.c", - "crypto/evp/evp_err.c", - "crypto/evp/evp_enc.c", - "crypto/evp/e_old.c", - "crypto/evp/c_all.c", - "crypto/evp/m_md2.c", - "crypto/evp/e_xcbc_d.c", - "crypto/evp/pmeth_fn.c", - "crypto/evp/p_lib.c", - "crypto/evp/evp_key.c", - "crypto/evp/encode.c", - "crypto/evp/e_aes_cbc_hmac_sha1.c", - "crypto/evp/e_aes_cbc_hmac_sha256.c", - "crypto/evp/m_mdc2.c", - "crypto/evp/e_null.c", - "crypto/evp/p_sign.c", - "crypto/evp/e_idea.c", - "crypto/evp/c_allc.c", - "crypto/evp/evp_pkey.c", - "crypto/evp/m_md4.c", - "crypto/ex_data.c", - "crypto/pkcs12/p12_p8e.c", - "crypto/pkcs12/p12_crt.c", - "crypto/pkcs12/p12_utl.c", - "crypto/pkcs12/p12_attr.c", - "crypto/pkcs12/p12_npas.c", - "crypto/pkcs12/p12_decr.c", - "crypto/pkcs12/p12_init.c", - "crypto/pkcs12/p12_kiss.c", - "crypto/pkcs12/p12_add.c", - "crypto/pkcs12/p12_p8d.c", - "crypto/pkcs12/p12_mutl.c", - "crypto/pkcs12/p12_crpt.c", - "crypto/pkcs12/pk12err.c", - "crypto/pkcs12/p12_asn.c", - "crypto/pkcs12/p12_key.c", - "crypto/ecdh/ech_key.c", - "crypto/ecdh/ech_ossl.c", - "crypto/ecdh/ech_lib.c", - "crypto/ecdh/ech_err.c", - "crypto/ecdh/ech_kdf.c", - "crypto/o_str.c", - "crypto/conf/conf_api.c", - "crypto/conf/conf_err.c", - "crypto/conf/conf_def.c", - "crypto/conf/conf_lib.c", - "crypto/conf/conf_mall.c", - "crypto/conf/conf_sap.c", - "crypto/conf/conf_mod.c", - "crypto/ebcdic.c", - "crypto/ecdsa/ecs_lib.c", - "crypto/ecdsa/ecs_asn1.c", - "crypto/ecdsa/ecs_ossl.c", - "crypto/ecdsa/ecs_vrf.c", - "crypto/ecdsa/ecs_sign.c", - "crypto/ecdsa/ecs_err.c", - "crypto/dso/dso_win32.c", - "crypto/dso/dso_lib.c", - "crypto/dso/dso_dlfcn.c", - "crypto/dso/dso_dl.c", - "crypto/dso/dso_beos.c", - "crypto/dso/dso_null.c", - "crypto/dso/dso_vms.c", - "crypto/dso/dso_err.c", - "crypto/dso/dso_openssl.c", - "crypto/cryptlib.c", - "crypto/md5/md5_one.c", - "crypto/md5/md5_dgst.c", - "crypto/pkcs7/pkcs7err.c", - "crypto/pkcs7/pk7_smime.c", - "crypto/pkcs7/bio_pk7.c", - "crypto/pkcs7/pk7_mime.c", - "crypto/pkcs7/pk7_lib.c", - "crypto/pkcs7/pk7_asn1.c", - "crypto/pkcs7/pk7_doit.c", - "crypto/pkcs7/pk7_attr.c", - "crypto/md4/md4_one.c", - "crypto/md4/md4_dgst.c", - "crypto/o_dir.c", - "crypto/buffer/buf_err.c", - "crypto/buffer/buf_str.c", - "crypto/buffer/buffer.c", - "crypto/cms/cms_lib.c", - "crypto/cms/cms_io.c", - "crypto/cms/cms_err.c", - "crypto/cms/cms_dd.c", - "crypto/cms/cms_smime.c", - "crypto/cms/cms_att.c", - "crypto/cms/cms_pwri.c", - "crypto/cms/cms_cd.c", - "crypto/cms/cms_sd.c", - "crypto/cms/cms_asn1.c", - "crypto/cms/cms_env.c", - "crypto/cms/cms_enc.c", - "crypto/cms/cms_ess.c", - "crypto/cms/cms_kari.c", - "crypto/mem_dbg.c", - "crypto/uid.c", - "crypto/stack/stack.c", - "crypto/ec/ec_ameth.c", - "crypto/ec/ec_err.c", - "crypto/ec/ec_lib.c", - "crypto/ec/ec_curve.c", - "crypto/ec/ec_oct.c", - "crypto/ec/ec_asn1.c", - "crypto/ec/ecp_oct.c", - "crypto/ec/ec_print.c", - "crypto/ec/ec2_smpl.c", - "crypto/ec/ecp_nistp224.c", - "crypto/ec/ec2_oct.c", - "crypto/ec/eck_prn.c", - "crypto/ec/ec_key.c", - "crypto/ec/ecp_nist.c", - "crypto/ec/ec_check.c", - "crypto/ec/ecp_smpl.c", - "crypto/ec/ec2_mult.c", - "crypto/ec/ecp_mont.c", - "crypto/ec/ecp_nistp521.c", - "crypto/ec/ec_mult.c", - "crypto/ec/ecp_nistputil.c", - "crypto/ec/ec_pmeth.c", - "crypto/ec/ec_cvt.c", - "crypto/ec/ecp_nistp256.c", - "crypto/krb5/krb5_asn.c", - "crypto/hmac/hmac.c", - "crypto/hmac/hm_ameth.c", - "crypto/hmac/hm_pmeth.c", - "crypto/comp/c_rle.c", - "crypto/comp/c_zlib.c", - "crypto/comp/comp_lib.c", - "crypto/comp/comp_err.c", - "crypto/des/fcrypt.c", - "crypto/des/str2key.c", - "crypto/des/cbc_cksm.c", - "crypto/des/des_enc.c", - "crypto/des/ofb_enc.c", - "crypto/des/read2pwd.c", - "crypto/des/ecb3_enc.c", - "crypto/des/rand_key.c", - "crypto/des/cfb64ede.c", - "crypto/des/rpc_enc.c", - "crypto/des/ofb64ede.c", - "crypto/des/qud_cksm.c", - "crypto/des/enc_writ.c", - "crypto/des/set_key.c", - "crypto/des/xcbc_enc.c", - "crypto/des/fcrypt_b.c", - "crypto/des/ede_cbcm_enc.c", - "crypto/des/des_old2.c", - "crypto/des/cfb_enc.c", - "crypto/des/ecb_enc.c", - "crypto/des/enc_read.c", - "crypto/des/des_old.c", - "crypto/des/ofb64enc.c", - "crypto/des/pcbc_enc.c", - "crypto/des/cbc_enc.c", - "crypto/des/cfb64enc.c", - "crypto/lhash/lh_stats.c", - "crypto/lhash/lhash.c", - "crypto/x509v3/v3_genn.c", - "crypto/x509v3/pcy_cache.c", - "crypto/x509v3/v3_sxnet.c", - "crypto/x509v3/v3_scts.c", - "crypto/x509v3/v3err.c", - "crypto/x509v3/v3_conf.c", - "crypto/x509v3/v3_utl.c", - "crypto/x509v3/v3_akeya.c", - "crypto/x509v3/v3_lib.c", - "crypto/x509v3/pcy_lib.c", - "crypto/x509v3/v3_cpols.c", - "crypto/x509v3/v3_ia5.c", - "crypto/x509v3/v3_bitst.c", - "crypto/x509v3/v3_skey.c", - "crypto/x509v3/v3_info.c", - "crypto/x509v3/v3_asid.c", - "crypto/x509v3/pcy_tree.c", - "crypto/x509v3/v3_pcons.c", - "crypto/x509v3/v3_bcons.c", - "crypto/x509v3/v3_pku.c", - "crypto/x509v3/v3_ocsp.c", - "crypto/x509v3/pcy_map.c", - "crypto/x509v3/v3_ncons.c", - "crypto/x509v3/v3_purp.c", - "crypto/x509v3/v3_enum.c", - "crypto/x509v3/v3_pmaps.c", - "crypto/x509v3/pcy_node.c", - "crypto/x509v3/v3_pcia.c", - "crypto/x509v3/v3_crld.c", - "crypto/x509v3/v3_pci.c", - "crypto/x509v3/v3_akey.c", - "crypto/x509v3/v3_addr.c", - "crypto/x509v3/v3_int.c", - "crypto/x509v3/v3_alt.c", - "crypto/x509v3/v3_extku.c", - "crypto/x509v3/v3_prn.c", - "crypto/x509v3/pcy_data.c", - "crypto/aes/aes_ofb.c", - "crypto/aes/aes_ctr.c", - "crypto/aes/aes_ecb.c", - "crypto/aes/aes_cfb.c", - "crypto/aes/aes_wrap.c", - "crypto/aes/aes_ige.c", - "crypto/aes/aes_misc.c", - "crypto/pqueue/pqueue.c", - "crypto/sha/sha_one.c", - "crypto/sha/sha_dgst.c", - "crypto/sha/sha512.c", - "crypto/sha/sha1_one.c", - "crypto/sha/sha1dgst.c", - "crypto/sha/sha256.c", - "crypto/whrlpool/wp_dgst.c", - "crypto/objects/obj_xref.c", - "crypto/objects/o_names.c", - "crypto/objects/obj_err.c", - "crypto/objects/obj_dat.c", - "crypto/objects/obj_lib.c", - "crypto/mem.c", - "crypto/fips_ers.c", - "crypto/o_fips.c", - "crypto/engine/eng_rdrand.c", - "crypto/engine/eng_err.c", - "crypto/engine/tb_ecdsa.c", - "crypto/engine/tb_rsa.c", - "crypto/engine/tb_cipher.c", - "crypto/engine/tb_dsa.c", - "crypto/engine/eng_lib.c", - "crypto/engine/tb_asnmth.c", - "crypto/engine/tb_ecdh.c", - "crypto/engine/tb_dh.c", - "crypto/engine/tb_store.c", - "crypto/engine/eng_init.c", - "crypto/engine/eng_cnf.c", - "crypto/engine/eng_all.c", - "crypto/engine/tb_digest.c", - "crypto/engine/tb_pkmeth.c", - "crypto/engine/eng_table.c", - "crypto/engine/eng_ctrl.c", - "crypto/engine/eng_list.c", - "crypto/engine/eng_cryptodev.c", - "crypto/engine/eng_pkey.c", - "crypto/engine/tb_rand.c", - "crypto/engine/eng_openssl.c", - "crypto/engine/eng_fat.c", - "crypto/engine/eng_dyn.c", - "crypto/ts/ts_rsp_verify.c", - "crypto/ts/ts_req_print.c", - "crypto/ts/ts_verify_ctx.c", - "crypto/ts/ts_req_utils.c", - "crypto/ts/ts_err.c", - "crypto/ts/ts_rsp_print.c", - "crypto/ts/ts_rsp_utils.c", - "crypto/ts/ts_lib.c", - "crypto/ts/ts_conf.c", - "crypto/ts/ts_asn1.c", - "crypto/ts/ts_rsp_sign.c", - "crypto/ocsp/ocsp_ext.c", - "crypto/ocsp/ocsp_cl.c", - "crypto/ocsp/ocsp_ht.c", - "crypto/ocsp/ocsp_lib.c", - "crypto/ocsp/ocsp_srv.c", - "crypto/ocsp/ocsp_vfy.c", - "crypto/ocsp/ocsp_err.c", - "crypto/ocsp/ocsp_prn.c", - "crypto/ocsp/ocsp_asn.c", - "crypto/bf/bf_cfb64.c", - "crypto/bf/bf_ecb.c", - "crypto/bf/bf_enc.c", - "crypto/bf/bf_skey.c", - "crypto/bf/bf_ofb64.c", - "crypto/idea/i_skey.c", - "crypto/idea/i_ofb64.c", - "crypto/idea/i_cbc.c", - "crypto/idea/i_ecb.c", - "crypto/idea/i_cfb64.c", - "crypto/cmac/cm_ameth.c", - "crypto/cmac/cmac.c", - "crypto/cmac/cm_pmeth.c", - "crypto/dh/dh_lib.c", - "crypto/dh/dh_key.c", - "crypto/dh/dh_asn1.c", - "crypto/dh/dh_depr.c", - "crypto/dh/dh_pmeth.c", - "crypto/dh/dh_prn.c", - "crypto/dh/dh_gen.c", - "crypto/dh/dh_ameth.c", - "crypto/dh/dh_check.c", - "crypto/dh/dh_err.c", - "crypto/dh/dh_kdf.c", - "crypto/dh/dh_rfc5114.c", - "crypto/modes/ccm128.c", - "crypto/modes/ofb128.c", - "crypto/modes/cts128.c", - "crypto/modes/ctr128.c", - "crypto/modes/gcm128.c", - "crypto/modes/cbc128.c", - "crypto/modes/cfb128.c", - "crypto/modes/xts128.c", - "crypto/modes/wrap128.c", - "crypto/camellia/cmll_cfb.c", - "crypto/camellia/cmll_ecb.c", - "crypto/camellia/cmll_utl.c", - "crypto/camellia/cmll_misc.c", - "crypto/camellia/cmll_ofb.c", - "crypto/camellia/cmll_ctr.c", - "crypto/seed/seed_ecb.c", - "crypto/seed/seed_cbc.c", - "crypto/seed/seed.c", - "crypto/seed/seed_ofb.c", - "crypto/seed/seed_cfb.c", - "crypto/txt_db/txt_db.c", - "crypto/cpt_err.c", - "crypto/pem/pem_pk8.c", - "crypto/pem/pem_lib.c", - "crypto/pem/pem_sign.c", - "crypto/pem/pem_all.c", - "crypto/pem/pem_info.c", - "crypto/pem/pem_pkey.c", - "crypto/pem/pem_seal.c", - "crypto/pem/pem_err.c", - "crypto/pem/pem_xaux.c", - "crypto/pem/pvkfmt.c", - "crypto/pem/pem_x509.c", - "crypto/pem/pem_oth.c", - "crypto/rand/rand_lib.c", - "crypto/rand/randfile.c", - "crypto/rand/rand_os2.c", - "crypto/rand/rand_unix.c", - "crypto/rand/rand_nw.c", - "crypto/rand/md_rand.c", - "crypto/rand/rand_err.c", - "crypto/rand/rand_win.c", - "crypto/rand/rand_egd.c", - "crypto/cversion.c", - "crypto/cast/c_ecb.c", - "crypto/cast/c_skey.c", - "crypto/cast/c_ofb64.c", - "crypto/cast/c_enc.c", - "crypto/cast/c_cfb64.c", - "crypto/o_time.c", - "crypto/mdc2/mdc2dgst.c", - "crypto/mdc2/mdc2_one.c", - "crypto/rc4/rc4_utl.c", - "crypto/ui/ui_compat.c", - "crypto/ui/ui_util.c", - "crypto/ui/ui_lib.c", - "crypto/ui/ui_err.c", - "crypto/ui/ui_openssl.c", - "crypto/bio/bf_buff.c", - "crypto/bio/bss_null.c", - "crypto/bio/bss_acpt.c", - "crypto/bio/bss_conn.c", - "crypto/bio/bss_fd.c", - "crypto/bio/bf_null.c", - "crypto/bio/bio_err.c", - "crypto/bio/bss_sock.c", - "crypto/bio/bss_mem.c", - "crypto/bio/b_dump.c", - "crypto/bio/b_print.c", - "crypto/bio/b_sock.c", - "crypto/bio/bss_dgram.c", - "crypto/bio/bf_nbio.c", - "crypto/bio/bio_lib.c", - "crypto/bio/bss_file.c", - "crypto/bio/bss_bio.c", - "crypto/bio/bss_log.c", - "crypto/bio/bio_cb.c", - "crypto/o_init.c", - "crypto/rc2/rc2_skey.c", - "crypto/rc2/rc2_cbc.c", - "crypto/rc2/rc2cfb64.c", - "crypto/rc2/rc2_ecb.c", - "crypto/rc2/rc2ofb64.c", - "crypto/bn/bn_x931p.c", - "crypto/bn/bn_blind.c", - "crypto/bn/bn_gf2m.c", - "crypto/bn/bn_const.c", - "crypto/bn/bn_sqr.c", - "crypto/bn/bn_nist.c", - "crypto/bn/bn_rand.c", - "crypto/bn/bn_err.c", - "crypto/bn/bn_div.c", - "crypto/bn/bn_kron.c", - "crypto/bn/bn_ctx.c", - "crypto/bn/bn_shift.c", - "crypto/bn/bn_mod.c", - "crypto/bn/bn_exp2.c", - "crypto/bn/bn_word.c", - "crypto/bn/bn_add.c", - "crypto/bn/bn_exp.c", - "crypto/bn/bn_mont.c", - "crypto/bn/bn_print.c", - "crypto/bn/bn_mul.c", - "crypto/bn/bn_prime.c", - "crypto/bn/bn_depr.c", - "crypto/bn/bn_gcd.c", - "crypto/bn/bn_mpi.c", - "crypto/bn/bn_sqrt.c", - "crypto/bn/bn_recp.c", - "crypto/bn/bn_lib.c", - "crypto/ripemd/rmd_dgst.c", - "crypto/ripemd/rmd_one.c", - "crypto/rsa/rsa_x931.c", - "crypto/rsa/rsa_depr.c", - "crypto/rsa/rsa_saos.c", - "crypto/rsa/rsa_crpt.c", - "crypto/rsa/rsa_pss.c", - "crypto/rsa/rsa_oaep.c", - "crypto/rsa/rsa_null.c", - "crypto/rsa/rsa_gen.c", - "crypto/rsa/rsa_prn.c", - "crypto/rsa/rsa_pmeth.c", - "crypto/rsa/rsa_asn1.c", - "crypto/rsa/rsa_ssl.c", - "crypto/rsa/rsa_ameth.c", - "crypto/rsa/rsa_pk1.c", - "crypto/rsa/rsa_err.c", - "crypto/rsa/rsa_lib.c", - "crypto/rsa/rsa_none.c", - "crypto/rsa/rsa_chk.c", - "crypto/rsa/rsa_eay.c", - "crypto/rsa/rsa_sign.c", - "crypto/srp/srp_lib.c", - "crypto/srp/srp_vfy.c", - "crypto/err/err.c", - "crypto/err/err_prn.c", - "crypto/err/err_all.c", - "crypto/mem_clr.c", - "crypto/rc4/rc4_skey.c", - "crypto/rc4/rc4_enc.c", - "crypto/camellia/camellia.c", - "crypto/camellia/cmll_cbc.c", - #"crypto/aes/aes_x86core.c", - "crypto/aes/aes_core.c", - "crypto/aes/aes_cbc.c", - "crypto/whrlpool/wp_block.c", - "crypto/bn/bn_asm.c", -] - -# env.drivers_sources+=openssl_sources - -env.Append(CPPPATH=["#drivers/builtin_openssl2"]) -env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto"]) -env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/openssl"]) -env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/evp"]) -env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/asn1"]) -env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/modes"]) -# env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/store"]) -env_drivers.Append(CPPFLAGS=["-DOPENSSL_NO_ASM", "-DOPENSSL_THREADS", "-DL_ENDIAN"]) - -if "platform" in env and env["platform"] == "winrt": - openssl_sources += ['winrt.cpp'] - -# Workaround for compilation error with GCC/Clang when -Werror is too greedy (GH-4517) -import os -if not (os.name == "nt" and os.getenv("VSINSTALLDIR") != None): # not Windows and not MSVC - env_drivers.Append(CFLAGS=["-Wno-error=implicit-function-declaration"]) - -env_drivers.add_source_files(env.drivers_sources, openssl_sources) diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp index feb1809fcae..d2a1b29eaff 100644 --- a/drivers/unix/ip_unix.cpp +++ b/drivers/unix/ip_unix.cpp @@ -137,8 +137,6 @@ void IP_Unix::get_local_addresses(List *r_addresses) const { } } - auto hostnames = NetworkInformation::GetHostNames(); - for (int i = 0; i < hostnames->Size; i++) { if (hostnames->GetAt(i)->Type == HostNameType::Ipv4 || hostnames->GetAt(i)->Type == HostNameType::Ipv6 && hostnames->GetAt(i)->IPInformation != nullptr) { diff --git a/methods.py b/methods.py index 949bc8dd4f8..eb68256c7de 100755 --- a/methods.py +++ b/methods.py @@ -200,7 +200,7 @@ def build_glsl_header(filename): out_file_base = out_file out_file_base = out_file_base[out_file_base.rfind("/") + 1:] out_file_base = out_file_base[out_file_base.rfind("\\") + 1:] -# print("out file "+out_file+" base " +out_file_base) +# print("out file "+out_file+" base " +out_file_base) out_file_ifdef = out_file_base.replace(".", "_").upper() fd.write("#ifndef " + out_file_ifdef + "\n") fd.write("#define " + out_file_ifdef + "\n") @@ -249,79 +249,79 @@ def build_glsl_header(filename): fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Transform& p_transform) { _FU - const Transform &tr = p_transform; + const Transform &tr = p_transform; - GLfloat matrix[16]={ /* build a 16x16 matrix */ - tr.basis.elements[0][0], - tr.basis.elements[1][0], - tr.basis.elements[2][0], - 0, - tr.basis.elements[0][1], - tr.basis.elements[1][1], - tr.basis.elements[2][1], - 0, - tr.basis.elements[0][2], - tr.basis.elements[1][2], - tr.basis.elements[2][2], - 0, - tr.origin.x, - tr.origin.y, - tr.origin.z, - 1 - }; + GLfloat matrix[16]={ /* build a 16x16 matrix */ + tr.basis.elements[0][0], + tr.basis.elements[1][0], + tr.basis.elements[2][0], + 0, + tr.basis.elements[0][1], + tr.basis.elements[1][1], + tr.basis.elements[2][1], + 0, + tr.basis.elements[0][2], + tr.basis.elements[1][2], + tr.basis.elements[2][2], + 0, + tr.origin.x, + tr.origin.y, + tr.origin.z, + 1 + }; - glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); + glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); - } + } - """) + """) fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Matrix32& p_transform) { _FU - const Matrix32 &tr = p_transform; + const Matrix32 &tr = p_transform; - GLfloat matrix[16]={ /* build a 16x16 matrix */ - tr.elements[0][0], - tr.elements[0][1], - 0, - 0, - tr.elements[1][0], - tr.elements[1][1], - 0, - 0, - 0, - 0, - 1, - 0, - tr.elements[2][0], - tr.elements[2][1], - 0, - 1 - }; + GLfloat matrix[16]={ /* build a 16x16 matrix */ + tr.elements[0][0], + tr.elements[0][1], + 0, + 0, + tr.elements[1][0], + tr.elements[1][1], + 0, + 0, + 0, + 0, + 1, + 0, + tr.elements[2][0], + tr.elements[2][1], + 0, + 1 + }; - glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); + glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); - } + } - """) + """) fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const CameraMatrix& p_matrix) { _FU - GLfloat matrix[16]; + GLfloat matrix[16]; - for (int i=0;i<4;i++) { - for (int j=0;j<4;j++) { + for (int i=0;i<4;i++) { + for (int j=0;j<4;j++) { - matrix[i*4+j]=p_matrix.matrix[i][j]; - } - } + matrix[i*4+j]=p_matrix.matrix[i][j]; + } + } - glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); - }; """) + glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); + }; """) fd.write("\n\n#undef _FU\n\n\n") @@ -493,7 +493,7 @@ def build_hlsl_dx9_header(filename): out_file_base = out_file out_file_base = out_file_base[out_file_base.rfind("/") + 1:] out_file_base = out_file_base[out_file_base.rfind("\\") + 1:] -# print("out file "+out_file+" base " +out_file_base) +# print("out file "+out_file+" base " +out_file_base) out_file_ifdef = out_file_base.replace(".", "_").upper() fd.write("#ifndef " + out_file_ifdef + "\n") fd.write("#define " + out_file_ifdef + "\n") @@ -542,46 +542,46 @@ def build_hlsl_dx9_header(filename): fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Transform& p_transform) { _FU - const Transform &tr = p_transform; + const Transform &tr = p_transform; - float matrix[16]={ /* build a 16x16 matrix */ - tr.basis.elements[0][0], - tr.basis.elements[0][1], - tr.basis.elements[0][2], - tr.origin.x, - tr.basis.elements[1][0], - tr.basis.elements[1][1], - tr.basis.elements[1][2], - tr.origin.y, - tr.basis.elements[2][0], - tr.basis.elements[2][1], - tr.basis.elements[2][2], - tr.origin.z, - 0, - 0, - 0, - 1 - }; + float matrix[16]={ /* build a 16x16 matrix */ + tr.basis.elements[0][0], + tr.basis.elements[0][1], + tr.basis.elements[0][2], + tr.origin.x, + tr.basis.elements[1][0], + tr.basis.elements[1][1], + tr.basis.elements[1][2], + tr.origin.y, + tr.basis.elements[2][0], + tr.basis.elements[2][1], + tr.basis.elements[2][2], + tr.origin.z, + 0, + 0, + 0, + 1 + }; - set_uniformfv(p_uniform,&matrix[0],4); + set_uniformfv(p_uniform,&matrix[0],4); - } + } - """) + """) fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const CameraMatrix& p_matrix) { _FU - float matrix[16]; + float matrix[16]; - for (int i=0;i<4;i++) { - for (int j=0;j<4;j++) { + for (int i=0;i<4;i++) { + for (int j=0;j<4;j++) { - matrix[i*4+j]=p_matrix.matrix[j][i]; - } - } + matrix[i*4+j]=p_matrix.matrix[j][i]; + } + } - set_uniformfv(p_uniform,&matrix[0],4); - }; """) + set_uniformfv(p_uniform,&matrix[0],4); + }; """) fd.write("\n\n#undef _FU\n\n\n") @@ -720,7 +720,7 @@ def include_file_in_legacygl_header(filename, header_data, depth): enumbase = ifdefline[:ifdefline.find("_EN_")] ifdefline = ifdefline.replace("_EN_", "_") line = line.replace("_EN_", "_") -# print(enumbase+":"+ifdefline); +# print(enumbase+":"+ifdefline); if (enumbase not in header_data.enums): header_data.enums[enumbase] = [] if (ifdefline not in header_data.enums[enumbase]): @@ -816,7 +816,7 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs): out_file_base = out_file out_file_base = out_file_base[out_file_base.rfind("/") + 1:] out_file_base = out_file_base[out_file_base.rfind("\\") + 1:] -# print("out file "+out_file+" base " +out_file_base) +# print("out file "+out_file+" base " +out_file_base) out_file_ifdef = out_file_base.replace(".", "_").upper() fd.write("#ifndef " + out_file_ifdef + class_suffix + "_120\n") fd.write("#define " + out_file_ifdef + class_suffix + "_120\n") @@ -867,79 +867,79 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs): fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Transform& p_transform) { _FU - const Transform &tr = p_transform; + const Transform &tr = p_transform; - GLfloat matrix[16]={ /* build a 16x16 matrix */ - tr.basis.elements[0][0], - tr.basis.elements[1][0], - tr.basis.elements[2][0], - 0, - tr.basis.elements[0][1], - tr.basis.elements[1][1], - tr.basis.elements[2][1], - 0, - tr.basis.elements[0][2], - tr.basis.elements[1][2], - tr.basis.elements[2][2], - 0, - tr.origin.x, - tr.origin.y, - tr.origin.z, - 1 - }; + GLfloat matrix[16]={ /* build a 16x16 matrix */ + tr.basis.elements[0][0], + tr.basis.elements[1][0], + tr.basis.elements[2][0], + 0, + tr.basis.elements[0][1], + tr.basis.elements[1][1], + tr.basis.elements[2][1], + 0, + tr.basis.elements[0][2], + tr.basis.elements[1][2], + tr.basis.elements[2][2], + 0, + tr.origin.x, + tr.origin.y, + tr.origin.z, + 1 + }; - glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); + glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); - } + } - """) + """) fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const Matrix32& p_transform) { _FU - const Matrix32 &tr = p_transform; + const Matrix32 &tr = p_transform; - GLfloat matrix[16]={ /* build a 16x16 matrix */ - tr.elements[0][0], - tr.elements[0][1], - 0, - 0, - tr.elements[1][0], - tr.elements[1][1], - 0, - 0, - 0, - 0, - 1, - 0, - tr.elements[2][0], - tr.elements[2][1], - 0, - 1 - }; + GLfloat matrix[16]={ /* build a 16x16 matrix */ + tr.elements[0][0], + tr.elements[0][1], + 0, + 0, + tr.elements[1][0], + tr.elements[1][1], + 0, + 0, + 0, + 0, + 1, + 0, + tr.elements[2][0], + tr.elements[2][1], + 0, + 1 + }; - glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); + glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); - } + } - """) + """) fd.write("""\t_FORCE_INLINE_ void set_uniform(Uniforms p_uniform, const CameraMatrix& p_matrix) { _FU - GLfloat matrix[16]; + GLfloat matrix[16]; - for (int i=0;i<4;i++) { - for (int j=0;j<4;j++) { + for (int i=0;i<4;i++) { + for (int j=0;j<4;j++) { - matrix[i*4+j]=p_matrix.matrix[i][j]; - } - } + matrix[i*4+j]=p_matrix.matrix[i][j]; + } + } - glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); - }; """) + glUniformMatrix4fv(get_uniform(p_uniform),1,false,matrix); + }; """) fd.write("\n\n#undef _FU\n\n\n") @@ -959,10 +959,10 @@ def build_legacygl_header(filename, include, class_suffix, output_attribs): x = header_data.enums[xv] bits = 1 amt = len(x) -# print(x) +# print(x) while(2**bits < amt): bits += 1 -# print("amount: "+str(amt)+" bits "+str(bits)); +# print("amount: "+str(amt)+" bits "+str(bits)); strs = "{" for i in range(amt): strs += "\"#define " + x[i] + "\\n\"," @@ -1252,31 +1252,31 @@ def win32_spawn(sh, escape, cmd, args, env): """ def win32_spawn(sh, escape, cmd, args, spawnenv): - import win32file - import win32event - import win32process - import win32security - for var in spawnenv: - spawnenv[var] = spawnenv[var].encode('ascii', 'replace') + import win32file + import win32event + import win32process + import win32security + for var in spawnenv: + spawnenv[var] = spawnenv[var].encode('ascii', 'replace') - sAttrs = win32security.SECURITY_ATTRIBUTES() - StartupInfo = win32process.STARTUPINFO() - newargs = ' '.join(map(escape, args[1:])) - cmdline = cmd + " " + newargs + sAttrs = win32security.SECURITY_ATTRIBUTES() + StartupInfo = win32process.STARTUPINFO() + newargs = ' '.join(map(escape, args[1:])) + cmdline = cmd + " " + newargs - # check for any special operating system commands - if cmd == 'del': - for arg in args[1:]: - win32file.DeleteFile(arg) - exit_code = 0 - else: - # otherwise execute the command. - hProcess, hThread, dwPid, dwTid = win32process.CreateProcess(None, cmdline, None, None, 1, 0, spawnenv, None, StartupInfo) - win32event.WaitForSingleObject(hProcess, win32event.INFINITE) - exit_code = win32process.GetExitCodeProcess(hProcess) - win32file.CloseHandle(hProcess); - win32file.CloseHandle(hThread); - return exit_code + # check for any special operating system commands + if cmd == 'del': + for arg in args[1:]: + win32file.DeleteFile(arg) + exit_code = 0 + else: + # otherwise execute the command. + hProcess, hThread, dwPid, dwTid = win32process.CreateProcess(None, cmdline, None, None, 1, 0, spawnenv, None, StartupInfo) + win32event.WaitForSingleObject(hProcess, win32event.INFINITE) + exit_code = win32process.GetExitCodeProcess(hProcess) + win32file.CloseHandle(hProcess); + win32file.CloseHandle(hThread); + return exit_code """ def android_add_maven_repository(self, url): @@ -1440,8 +1440,7 @@ def save_active_platforms(apnames, ap): for x in ap: pth = x + "/logo.png" -# print("open path: "+pth) -<<<<<<< HEAD +# print("open path: "+pth) pngf = open(pth, "rb") b = pngf.read(1) str = " /* AUTOGENERATED FILE, DO NOT EDIT */ \n" @@ -1560,6 +1559,6 @@ def detect_visual_c_compiler_version(tools_env): return vc_chosen_compiler_str def precious_program(env, program, sources, **args): - program = env.ProgramOriginal(program, sources, **args) - env.Precious(program) - return program + program = env.ProgramOriginal(program, sources, **args) + env.Precious(program) + return program diff --git a/tools/dist/uwp_template/AppxManifest.xml b/misc/dist/uwp_template/AppxManifest.xml similarity index 97% rename from tools/dist/uwp_template/AppxManifest.xml rename to misc/dist/uwp_template/AppxManifest.xml index 48a2ba7eb3b..d50214f0f12 100644 --- a/tools/dist/uwp_template/AppxManifest.xml +++ b/misc/dist/uwp_template/AppxManifest.xml @@ -1,32 +1,32 @@ - - - - - - $display_name$ - $publisher_display_name$ - Assets\StoreLogo.png - - - - - - - - - - - - - $name_on_tiles$ - - - $rotation_preference$ - - - - $capabilities_place$ - - - + + + + + + $display_name$ + $publisher_display_name$ + Assets\StoreLogo.png + + + + + + + + + + + + + $name_on_tiles$ + + + $rotation_preference$ + + + + $capabilities_place$ + + + \ No newline at end of file diff --git a/tools/dist/uwp_template/Assets/SplashScreen.scale-100.png b/misc/dist/uwp_template/Assets/SplashScreen.scale-100.png similarity index 100% rename from tools/dist/uwp_template/Assets/SplashScreen.scale-100.png rename to misc/dist/uwp_template/Assets/SplashScreen.scale-100.png diff --git a/tools/dist/uwp_template/Assets/Square150x150Logo.scale-100.png b/misc/dist/uwp_template/Assets/Square150x150Logo.scale-100.png similarity index 100% rename from tools/dist/uwp_template/Assets/Square150x150Logo.scale-100.png rename to misc/dist/uwp_template/Assets/Square150x150Logo.scale-100.png diff --git a/tools/dist/uwp_template/Assets/Square310x310Logo.scale-100.png b/misc/dist/uwp_template/Assets/Square310x310Logo.scale-100.png similarity index 100% rename from tools/dist/uwp_template/Assets/Square310x310Logo.scale-100.png rename to misc/dist/uwp_template/Assets/Square310x310Logo.scale-100.png diff --git a/tools/dist/uwp_template/Assets/Square44x44Logo.scale-100.png b/misc/dist/uwp_template/Assets/Square44x44Logo.scale-100.png similarity index 100% rename from tools/dist/uwp_template/Assets/Square44x44Logo.scale-100.png rename to misc/dist/uwp_template/Assets/Square44x44Logo.scale-100.png diff --git a/tools/dist/uwp_template/Assets/Square71x71Logo.scale-100.png b/misc/dist/uwp_template/Assets/Square71x71Logo.scale-100.png similarity index 100% rename from tools/dist/uwp_template/Assets/Square71x71Logo.scale-100.png rename to misc/dist/uwp_template/Assets/Square71x71Logo.scale-100.png diff --git a/tools/dist/uwp_template/Assets/StoreLogo.scale-100.png b/misc/dist/uwp_template/Assets/StoreLogo.scale-100.png similarity index 100% rename from tools/dist/uwp_template/Assets/StoreLogo.scale-100.png rename to misc/dist/uwp_template/Assets/StoreLogo.scale-100.png diff --git a/tools/dist/uwp_template/Assets/Wide310x150Logo.scale-100.png b/misc/dist/uwp_template/Assets/Wide310x150Logo.scale-100.png similarity index 100% rename from tools/dist/uwp_template/Assets/Wide310x150Logo.scale-100.png rename to misc/dist/uwp_template/Assets/Wide310x150Logo.scale-100.png diff --git a/drivers/freetype/winrtdef.h b/modules/freetype/winrtdef.h similarity index 100% rename from drivers/freetype/winrtdef.h rename to modules/freetype/winrtdef.h diff --git a/modules/openssl/SCsub b/modules/openssl/SCsub index 38a230a4cf3..33ea1737584 100644 --- a/modules/openssl/SCsub +++ b/modules/openssl/SCsub @@ -648,6 +648,9 @@ if (env['builtin_openssl'] != 'no'): "crypto/bn/bn_asm.c", ] + if "platform" in env and env["platform"] == "winrt": + thirdparty_sources += ['winrt.cpp'] + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] env_openssl.add_source_files(env.modules_sources, thirdparty_sources) diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 3938f5a1551..03d0a68a875 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -110,146 +110,6 @@ def get_name(): ('mingw_prefix_64','Mingw Prefix 64 bits',mingw64), ] -def get_flags(): - - return [ - ('glew','yes'), - ('openssl','builtin'), #use builtin openssl - ] - -def build_res_file( target, source, env ): - - cmdbase = "" - if (env["bits"] == "32"): - cmdbase = env['mingw_prefix'] - else: - cmdbase = env['mingw_prefix_64'] - CPPPATH = env['CPPPATH'] - cmdbase = cmdbase + 'windres --include-dir . ' - import subprocess - for x in range(len(source)): - cmd = cmdbase + '-i ' + str(source[x]) + ' -o ' + str(target[x]) - try: - out = subprocess.Popen(cmd,shell = True,stderr = subprocess.PIPE).communicate() - if len(out[1]): - return 1 - except: - return 1 - return 0 - -def configure(env): - - env.Append(CPPPATH=['#platform/windows']) - env['is_mingw']=False - if (os.name=="nt" and os.getenv("VSINSTALLDIR")!=None): - #build using visual studio - env['ENV']['TMP'] = os.environ['TMP'] - env.Append(CPPPATH=['#platform/windows/include']) - env.Append(LIBPATH=['#platform/windows/lib']) - - - if (env["target"]=="release"): - - env.Append(CCFLAGS=['/O2']) - env.Append(LINKFLAGS=['/SUBSYSTEM:WINDOWS']) - env.Append(LINKFLAGS=['/ENTRY:mainCRTStartup']) - - elif (env["target"]=="release_debug"): - - env.Append(CCFLAGS=['/O2','/DDEBUG_ENABLED']) - env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE']) - elif (env["target"]=="debug_release"): - - env.Append(CCFLAGS=['/Z7','/Od']) - env.Append(LINKFLAGS=['/DEBUG']) - env.Append(LINKFLAGS=['/SUBSYSTEM:WINDOWS']) - env.Append(LINKFLAGS=['/ENTRY:mainCRTStartup']) - - elif (env["target"]=="debug"): - - env.Append(CCFLAGS=['/Z7','/DDEBUG_ENABLED','/DDEBUG_MEMORY_ENABLED','/DD3D_DEBUG_INFO','/Od']) - env.Append(LINKFLAGS=['/SUBSYSTEM:CONSOLE']) - env.Append(LINKFLAGS=['/DEBUG']) - - - env.Append(CCFLAGS=['/MT','/Gd','/GR','/nologo']) - env.Append(CXXFLAGS=['/TP']) - env.Append(CPPFLAGS=['/DMSVC', '/GR', ]) - env.Append(CCFLAGS=['/I'+os.getenv("WindowsSdkDir")+"/Include"]) - env.Append(CCFLAGS=['/DWINDOWS_ENABLED']) - env.Append(CCFLAGS=['/DRTAUDIO_ENABLED']) - env.Append(CCFLAGS=['/DWIN32']) - env.Append(CCFLAGS=['/DTYPED_METHOD_BIND']) - - env.Append(CCFLAGS=['/DGLES2_ENABLED']) - LIBS=['winmm','opengl32','dsound','kernel32','ole32','oleaut32','user32','gdi32', 'IPHLPAPI','Shlwapi', 'wsock32','Ws2_32', 'shell32','advapi32','dinput8','dxguid'] - env.Append(LINKFLAGS=[p+env["LIBSUFFIX"] for p in LIBS]) - - env.Append(LIBPATH=[os.getenv("WindowsSdkDir")+"/Lib"]) - if (os.getenv("DXSDK_DIR")): - DIRECTX_PATH=os.getenv("DXSDK_DIR") - else: - DIRECTX_PATH="C:/Program Files/Microsoft DirectX SDK (March 2009)" - - if (os.getenv("VCINSTALLDIR")): - VC_PATH=os.getenv("VCINSTALLDIR") - else: - VC_PATH="" - - env.Append(CCFLAGS=["/I" + p for p in os.getenv("INCLUDE").split(";")]) - env.Append(LIBPATH=[p for p in os.getenv("LIB").split(";")]) - env.Append(CCFLAGS=["/I"+DIRECTX_PATH+"/Include"]) - env.Append(LIBPATH=[DIRECTX_PATH+"/Lib/x86"]) - env['ENV'] = os.environ; - - # This detection function needs the tools env (that is env['ENV'], not SCons's env), and that is why it's this far bellow in the code - compiler_version_str = methods.detect_visual_c_compiler_version(env['ENV']) - - # Note: this detection/override code from here onward should be here instead of in SConstruct because it's platform and compiler specific (MSVC/Windows) - if(env["bits"] != "default"): - print "Error: bits argument is disabled for MSVC" - print ("Bits argument is not supported for MSVC compilation. Architecture depends on the Native/Cross Compile Tools Prompt/Developer Console (or Visual Studio settings)" - +" that is being used to run SCons. As a consequence, bits argument is disabled. Run scons again without bits argument (example: scons p=windows) and SCons will attempt to detect what MSVC compiler" - +" will be executed and inform you.") - sys.exit() - - # Forcing bits argument because MSVC does not have a flag to set this through SCons... it's different compilers (cl.exe's) called from the propper command prompt - # that decide the architecture that is build for. Scons can only detect the os.getenviron (because vsvarsall.bat sets a lot of stuff for cl.exe to work with) - env["bits"]="32" - env["x86_opt_vc"]=True - - print "Detected MSVC compiler: "+compiler_version_str - # If building for 64bit architecture, disable assembly optimisations for 32 bit builds (theora as of writting)... vc compiler for 64bit can not compile _asm - if(compiler_version_str == "amd64" or compiler_version_str == "x86_amd64"): - env["bits"]="64" - env["x86_opt_vc"]=False - print "Compiled program architecture will be a 64 bit executable (forcing bits=64)." - elif (compiler_version_str=="x86" or compiler_version_str == "amd64_x86"): - print "Compiled program architecture will be a 32 bit executable. (forcing bits=32)." - else: - print "Failed to detect MSVC compiler architecture version... Defaulting to 32bit executable settings (forcing bits=32). Compilation attempt will continue, but SCons can not detect for what architecture this build is compiled for. You should check your settings/compilation setup." - if env["bits"]=="64": - env.Append(CCFLAGS=['/D_WIN64']) - - # Incremental linking fix - env['BUILDERS']['ProgramOriginal'] = env['BUILDERS']['Program'] - env['BUILDERS']['Program'] = methods.precious_program - - else: - - # Workaround for MinGW. See: - # http://www.scons.org/wiki/LongCmdLinesOnWin32 - env.use_windows_spawn_fix() - - #build using mingw - if (os.name=="nt"): - env['ENV']['TMP'] = os.environ['TMP'] #way to go scons, you can be so stupid sometimes - else: - env["PROGSUFFIX"]=env["PROGSUFFIX"]+".exe" # for linux cross-compilation - - mingw_prefix="" - - def can_build(): if (os.name == "nt"): @@ -416,7 +276,7 @@ def configure(env): env['ENV'] = os.environ # This detection function needs the tools env (that is env['ENV'], not SCons's env), and that is why it's this far bellow in the code - compiler_version_str = detect_visual_c_compiler_version(env['ENV']) + compiler_version_str = methods.detect_visual_c_compiler_version(env['ENV']) # Note: this detection/override code from here onward should be here instead of in SConstruct because it's platform and compiler specific (MSVC/Windows) if(env["bits"] != "default"): @@ -531,7 +391,6 @@ def configure(env): env['is_mingw'] = True env.Append(BUILDERS={'RES': env.Builder(action=build_res_file, suffix='.o', src_suffix='.rc')}) - import methods env.Append(BUILDERS={'GLSL120': env.Builder(action=methods.build_legacygl_headers, suffix='glsl.h', src_suffix='.glsl')}) env.Append(BUILDERS={'GLSL': env.Builder(action=methods.build_glsl_headers, suffix='glsl.h', src_suffix='.glsl')}) env.Append(BUILDERS={'HLSL9': env.Builder(action=methods.build_hlsl_dx9_headers, suffix='hlsl.h', src_suffix='.hlsl')}) diff --git a/platform/winrt/app.cpp b/platform/winrt/app.cpp index 4211976a749..351e6cc6e05 100644 --- a/platform/winrt/app.cpp +++ b/platform/winrt/app.cpp @@ -37,6 +37,8 @@ #include "core/os/file_access.h" #include "core/os/keyboard.h" +#include "main/main.h" + #include "platform/windows/key_mapping_win.h" #include @@ -62,8 +64,7 @@ inline float ConvertDipsToPixels(float dips, float dpi) { } // Implementation of the IFrameworkViewSource interface, necessary to run our app. -ref class GodotWinrtViewSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource -{ +ref class GodotWinrtViewSource sealed : Windows::ApplicationModel::Core::IFrameworkViewSource { public: virtual Windows::ApplicationModel::Core::IFrameworkView ^ CreateView() { return ref new App(); @@ -71,24 +72,21 @@ public: }; // The main function creates an IFrameworkViewSource for our app, and runs the app. -[Platform::MTAThread] -int main(Platform::Array^) -{ +[Platform::MTAThread] int main(Platform::Array ^) { auto godotApplicationSource = ref new GodotWinrtViewSource(); CoreApplication::Run(godotApplicationSource); return 0; } -App::App() : - mWindowClosed(false), - mWindowVisible(true), - mWindowWidth(0), - mWindowHeight(0), - mEglDisplay(EGL_NO_DISPLAY), - mEglContext(EGL_NO_CONTEXT), - mEglSurface(EGL_NO_SURFACE), - number_of_contacts(0) -{ +App::App() + : mWindowClosed(false), + mWindowVisible(true), + mWindowWidth(0), + mWindowHeight(0), + mEglDisplay(EGL_NO_DISPLAY), + mEglContext(EGL_NO_CONTEXT), + mEglSurface(EGL_NO_SURFACE), + number_of_contacts(0) { } // The first method called when the IFrameworkView is being created. @@ -103,7 +101,6 @@ void App::Initialize(CoreApplicationView ^ applicationView) { // http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh994930.aspx os = new OSWinrt; - } // Called when the CoreWindow object is created (or re-created). @@ -127,30 +124,28 @@ void App::SetWindow(CoreWindow ^ p_window) { #endif window->PointerPressed += - ref new TypedEventHandler(this, &App::OnPointerPressed); + ref new TypedEventHandler(this, &App::OnPointerPressed); window->PointerMoved += - ref new TypedEventHandler(this, &App::OnPointerMoved); + ref new TypedEventHandler(this, &App::OnPointerMoved); window->PointerReleased += - ref new TypedEventHandler(this, &App::OnPointerReleased); + ref new TypedEventHandler(this, &App::OnPointerReleased); window->PointerWheelChanged += - ref new TypedEventHandler(this, &App::OnPointerWheelChanged); + ref new TypedEventHandler(this, &App::OnPointerWheelChanged); mouseChangedNotifier = SignalNotifier::AttachToEvent(L"os_mouse_mode_changed", ref new SignalHandler( - this, &App::OnMouseModeChanged - )); + this, &App::OnMouseModeChanged)); mouseChangedNotifier->Enable(); window->CharacterReceived += - ref new TypedEventHandler(this, &App::OnCharacterReceived); + ref new TypedEventHandler(this, &App::OnCharacterReceived); window->KeyDown += - ref new TypedEventHandler(this, &App::OnKeyDown); + ref new TypedEventHandler(this, &App::OnKeyDown); window->KeyUp += - ref new TypedEventHandler(this, &App::OnKeyUp); - + ref new TypedEventHandler(this, &App::OnKeyUp); unsigned int argc; - char** argv = get_command_line(&argc); + char **argv = get_command_line(&argc); Main::setup("winrt", argc, argv, false); @@ -258,7 +253,7 @@ static int _get_finger(uint32_t p_touch_id) { return p_touch_id % 31; // for now }; -void App::pointer_event(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args, bool p_pressed, bool p_is_wheel) { +void App::pointer_event(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args, bool p_pressed, bool p_is_wheel) { Windows::UI::Input::PointerPoint ^ point = args->CurrentPoint; Windows::Foundation::Point pos = _get_pixel_position(window, point->Position, os); @@ -318,40 +313,37 @@ void App::OnPointerReleased(Windows::UI::Core::CoreWindow ^ sender, Windows::UI: pointer_event(sender, args, false); }; -void App::OnPointerWheelChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args) { +void App::OnPointerWheelChanged(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args) { pointer_event(sender, args, true, true); } -void App::OnMouseModeChanged(Windows::System::Threading::Core::SignalNotifier^ signalNotifier, bool timedOut) { +void App::OnMouseModeChanged(Windows::System::Threading::Core::SignalNotifier ^ signalNotifier, bool timedOut) { OS::MouseMode mode = os->get_mouse_mode(); - SignalNotifier^ notifier = mouseChangedNotifier; + SignalNotifier ^ notifier = mouseChangedNotifier; window->Dispatcher->RunAsync( - CoreDispatcherPriority::High, - ref new DispatchedHandler( - [mode, notifier, this]() { - if (mode == OS::MOUSE_MODE_CAPTURED) { + CoreDispatcherPriority::High, + ref new DispatchedHandler( + [mode, notifier, this]() { + if (mode == OS::MOUSE_MODE_CAPTURED) { - this->MouseMovedToken = MouseDevice::GetForCurrentView()->MouseMoved += - ref new TypedEventHandler(this, &App::OnMouseMoved); + this->MouseMovedToken = MouseDevice::GetForCurrentView()->MouseMoved += + ref new TypedEventHandler(this, &App::OnMouseMoved); - } else { + } else { - MouseDevice::GetForCurrentView()->MouseMoved -= MouseMovedToken; + MouseDevice::GetForCurrentView()->MouseMoved -= MouseMovedToken; + } - } - - notifier->Enable(); - })); + notifier->Enable(); + })); ResetEvent(os->mouse_mode_changed); - - } -void App::OnPointerMoved(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::PointerEventArgs^ args) { +void App::OnPointerMoved(Windows::UI::Core::CoreWindow ^ sender, Windows::UI::Core::PointerEventArgs ^ args) { Windows::UI::Input::PointerPoint ^ point = args->CurrentPoint; Windows::Foundation::Point pos = _get_pixel_position(window, point->Position, os); @@ -390,7 +382,6 @@ void App::OnPointerMoved(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Cor last_mouse_pos = pos; os->input_event(event); - } void App::OnMouseMoved(MouseDevice ^ mouse_device, MouseEventArgs ^ args) { @@ -418,8 +409,7 @@ void App::OnMouseMoved(MouseDevice ^ mouse_device, MouseEventArgs ^ args) { os->input_event(event); } -void App::key_event(Windows::UI::Core::CoreWindow^ sender, bool p_pressed, Windows::UI::Core::KeyEventArgs^ key_args, Windows::UI::Core::CharacterReceivedEventArgs^ char_args) -{ +void App::key_event(Windows::UI::Core::CoreWindow ^ sender, bool p_pressed, Windows::UI::Core::KeyEventArgs ^ key_args, Windows::UI::Core::CharacterReceivedEventArgs ^ char_args) { OSWinrt::KeyEvent ke; @@ -432,9 +422,9 @@ void App::key_event(Windows::UI::Core::CoreWindow^ sender, bool p_pressed, Windo ke.mod_state = mod; ke.pressed = p_pressed; - + if (key_args != nullptr) { - + ke.type = OSWinrt::KeyEvent::MessageType::KEY_EVENT_MESSAGE; ke.unicode = 0; ke.scancode = KeyMappingWindows::get_keysym((unsigned int)key_args->VirtualKey); @@ -449,26 +439,21 @@ void App::key_event(Windows::UI::Core::CoreWindow^ sender, bool p_pressed, Windo } os->queue_key_event(ke); - } -void App::OnKeyDown(CoreWindow^ sender, KeyEventArgs^ args) -{ +void App::OnKeyDown(CoreWindow ^ sender, KeyEventArgs ^ args) { key_event(sender, true, args); } -void App::OnKeyUp(CoreWindow^ sender, KeyEventArgs^ args) -{ +void App::OnKeyUp(CoreWindow ^ sender, KeyEventArgs ^ args) { key_event(sender, false, args); } -void App::OnCharacterReceived(CoreWindow^ sender, CharacterReceivedEventArgs^ args) -{ +void App::OnCharacterReceived(CoreWindow ^ sender, CharacterReceivedEventArgs ^ args) { key_event(sender, true, nullptr, args); } // Initializes scene resources -void App::Load(Platform::String^ entryPoint) -{ +void App::Load(Platform::String ^ entryPoint) { } // This method is called after the window becomes active. @@ -535,12 +520,12 @@ void App::UpdateWindowSize(Size size) { os->set_video_mode(vm); } -char** App::get_command_line(unsigned int* out_argc) { +char **App::get_command_line(unsigned int *out_argc) { - static char* fail_cl[] = { "-path", "game", NULL }; + static char *fail_cl[] = { "-path", "game", NULL }; *out_argc = 2; - FILE* f = _wfopen(L"__cl__.cl", L"rb"); + FILE *f = _wfopen(L"__cl__.cl", L"rb"); if (f == NULL) { @@ -554,12 +539,12 @@ char** App::get_command_line(unsigned int* out_argc) { uint8_t len[4]; int r = fread(len, sizeof(uint8_t), 4, f); - Platform::Collections::Vector cl; + Platform::Collections::Vector cl; if (r < 4) { fclose(f); wprintf(L"Wrong cmdline length."); - return(fail_cl); + return (fail_cl); } int argc = READ_LE_4(len); @@ -571,7 +556,7 @@ char** App::get_command_line(unsigned int* out_argc) { if (r < 4) { fclose(f); wprintf(L"Wrong cmdline param length."); - return(fail_cl); + return (fail_cl); } int strlen = READ_LE_4(len); @@ -579,17 +564,17 @@ char** App::get_command_line(unsigned int* out_argc) { if (strlen > CMD_MAX_LEN) { fclose(f); wprintf(L"Wrong command length."); - return(fail_cl); + return (fail_cl); } - char* arg = new char[strlen + 1]; + char *arg = new char[strlen + 1]; r = fread(arg, sizeof(char), strlen, f); arg[strlen] = '\0'; if (r == strlen) { int warg_size = MultiByteToWideChar(CP_UTF8, 0, arg, -1, NULL, 0); - wchar_t* warg = new wchar_t[warg_size]; + wchar_t *warg = new wchar_t[warg_size]; MultiByteToWideChar(CP_UTF8, 0, arg, -1, warg, warg_size); @@ -600,7 +585,7 @@ char** App::get_command_line(unsigned int* out_argc) { delete[] arg; fclose(f); wprintf(L"Error reading command."); - return(fail_cl); + return (fail_cl); } } @@ -609,17 +594,16 @@ char** App::get_command_line(unsigned int* out_argc) { fclose(f); - char** ret = new char*[cl.Size + 1]; + char **ret = new char *[cl.Size + 1]; for (int i = 0; i < cl.Size; i++) { int arg_size = WideCharToMultiByte(CP_UTF8, 0, cl.GetAt(i)->Data(), -1, NULL, 0, NULL, NULL); - char* arg = new char[arg_size]; + char *arg = new char[arg_size]; WideCharToMultiByte(CP_UTF8, 0, cl.GetAt(i)->Data(), -1, arg, arg_size, NULL, NULL); ret[i] = arg; - } ret[cl.Size] = NULL; *out_argc = cl.Size; diff --git a/platform/winrt/detect.py b/platform/winrt/detect.py index 2e529e1efcb..0465bac3753 100644 --- a/platform/winrt/detect.py +++ b/platform/winrt/detect.py @@ -150,6 +150,7 @@ def configure(env): 'xaudio2', 'WindowsApp', 'mincore', + 'ws2_32', 'libANGLE', 'libEGL', 'libGLESv2', diff --git a/platform/winrt/export/export.cpp b/platform/winrt/export/export.cpp index 9a99cefc281..ee1c6b8d957 100644 --- a/platform/winrt/export/export.cpp +++ b/platform/winrt/export/export.cpp @@ -67,18 +67,18 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "export.h" #include "bind/core_bind.h" +#include "editor/editor_import_export.h" +#include "editor/editor_node.h" #include "globals.h" -#include "io/base64.h" #include "io/marshalls.h" -#include "io/sha256.h" -#include "io/unzip.h" -#include "io/zip.h" #include "io/zip_io.h" #include "object.h" #include "os/file_access.h" #include "platform/winrt/logo.h" -#include "tools/editor/editor_import_export.h" -#include "tools/editor/editor_node.h" +#include "thirdparty/minizip/unzip.h" +#include "thirdparty/minizip/zip.h" +#include "thirdparty/misc/base64.h" +#include "thirdparty/misc/sha256.h" #include "version.h" #include @@ -92,6 +92,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#endif // OPENSSL_ENABLED // Capabilities static const char *uwp_capabilities[] = { @@ -128,6 +129,7 @@ static const char *uwp_device_capabilites[] = { NULL }; +#ifdef OPENSSL_ENABLED namespace asn1 { // https://msdn.microsoft.com/en-us/gg463180.aspx diff --git a/platform/winrt/os_winrt.cpp b/platform/winrt/os_winrt.cpp index 40bc3f4fea5..be0453905d5 100644 --- a/platform/winrt/os_winrt.cpp +++ b/platform/winrt/os_winrt.cpp @@ -26,14 +26,17 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "os_winrt.h" #include "drivers/gles2/rasterizer_gles2.h" + #include "drivers/unix/memory_pool_static_malloc.h" -#include "os/memory_pool_dynamic_static.h" -#include "thread_winrt.h" -#include "drivers/windows/semaphore_windows.h" +#include "drivers/windows/dir_access_windows.h" +#include "drivers/windows/file_access_windows.h" #include "drivers/windows/mutex_windows.h" +#include "drivers/windows/semaphore_windows.h" #include "main/main.h" +#include "os/memory_pool_dynamic_static.h" +#include "os_winrt.h" +#include "thread_winrt.h" #include "servers/audio/audio_server_sw.h" #include "servers/visual/visual_server_raster.h" @@ -43,13 +46,13 @@ #include "io/marshalls.h" #include "os/memory_pool_dynamic_prealloc.h" +#include "drivers/unix/ip_unix.h" #include "platform/windows/packet_peer_udp_winsock.h" #include "platform/windows/stream_peer_winsock.h" #include "platform/windows/tcp_server_winsock.h" -#include "drivers/unix/ip_unix.h" -#include #include +#include using namespace Windows::ApplicationModel::Core; using namespace Windows::ApplicationModel::Activation; @@ -92,7 +95,7 @@ void OSWinrt::set_window_size(const Size2 p_size) { new_size.Width = p_size.width; new_size.Height = p_size.height; - ApplicationView^ view = ApplicationView::GetForCurrentView(); + ApplicationView ^ view = ApplicationView::GetForCurrentView(); if (view->TryResizeView(new_size)) { @@ -103,7 +106,7 @@ void OSWinrt::set_window_size(const Size2 p_size) { void OSWinrt::set_window_fullscreen(bool p_enabled) { - ApplicationView^ view = ApplicationView::GetForCurrentView(); + ApplicationView ^ view = ApplicationView::GetForCurrentView(); video_mode.fullscreen = view->IsFullScreenMode; @@ -118,7 +121,6 @@ void OSWinrt::set_window_fullscreen(bool p_enabled) { view->ExitFullScreenMode(); video_mode.fullscreen = false; - } } @@ -198,7 +200,7 @@ void OSWinrt::initialize_core() { IP_Unix::make_default(); - cursor_shape=CURSOR_ARROW; + cursor_shape = CURSOR_ARROW; } bool OSWinrt::can_draw() const { @@ -227,7 +229,7 @@ void OSWinrt::initialize(const VideoMode &p_desired, int p_video_driver, int p_a vm.height = gl_context->get_window_height(); vm.resizable = false; - ApplicationView^ view = ApplicationView::GetForCurrentView(); + ApplicationView ^ view = ApplicationView::GetForCurrentView(); vm.fullscreen = view->IsFullScreenMode; view->SetDesiredBoundsMode(ApplicationViewBoundsMode::UseVisible); @@ -301,15 +303,14 @@ void OSWinrt::initialize(const VideoMode &p_desired, int p_video_driver, int p_a managed_object->update_clipboard(); - Clipboard::ContentChanged += ref new EventHandler(managed_object, &ManagedType::on_clipboard_changed); + Clipboard::ContentChanged += ref new EventHandler(managed_object, &ManagedType::on_clipboard_changed); accelerometer = Accelerometer::GetDefault(); if (accelerometer != nullptr) { // 60 FPS accelerometer->ReportInterval = (1.0f / 60.0f) * 1000; accelerometer->ReadingChanged += - ref new TypedEventHandler - (managed_object, &ManagedType::on_accelerometer_reading_changed); + ref new TypedEventHandler(managed_object, &ManagedType::on_accelerometer_reading_changed); } magnetometer = Magnetometer::GetDefault(); @@ -317,8 +318,7 @@ void OSWinrt::initialize(const VideoMode &p_desired, int p_video_driver, int p_a // 60 FPS magnetometer->ReportInterval = (1.0f / 60.0f) * 1000; magnetometer->ReadingChanged += - ref new TypedEventHandler - (managed_object, &ManagedType::on_magnetometer_reading_changed); + ref new TypedEventHandler(managed_object, &ManagedType::on_magnetometer_reading_changed); } gyrometer = Gyrometer::GetDefault(); @@ -326,8 +326,7 @@ void OSWinrt::initialize(const VideoMode &p_desired, int p_video_driver, int p_a // 60 FPS gyrometer->ReportInterval = (1.0f / 60.0f) * 1000; gyrometer->ReadingChanged += - ref new TypedEventHandler - (managed_object, &ManagedType::on_gyroscope_reading_changed); + ref new TypedEventHandler(managed_object, &ManagedType::on_gyroscope_reading_changed); } _ensure_data_dir(); @@ -336,14 +335,13 @@ void OSWinrt::initialize(const VideoMode &p_desired, int p_video_driver, int p_a display_request->RequestActive(); set_keep_screen_on(GLOBAL_DEF("display/keep_screen_on", true)); - } -void OSWinrt::set_clipboard(const String& p_text) { +void OSWinrt::set_clipboard(const String &p_text) { - DataPackage^ clip = ref new DataPackage(); + DataPackage ^ clip = ref new DataPackage(); clip->RequestedOperation = DataPackageOperation::Copy; - clip->SetText(ref new Platform::String((const wchar_t*)p_text.c_str())); + clip->SetText(ref new Platform::String((const wchar_t *)p_text.c_str())); Clipboard::SetContent(clip); }; @@ -362,7 +360,7 @@ void OSWinrt::input_event(InputEvent &p_event) { input->parse_input_event(p_event); - if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.pressed && p_event.mouse_button.button_index>3) { + if (p_event.type == InputEvent::MOUSE_BUTTON && p_event.mouse_button.pressed && p_event.mouse_button.button_index > 3) { //send release for mouse wheel p_event.mouse_button.pressed = false; @@ -423,7 +421,6 @@ void OSWinrt::finalize() { memdelete(physics_2d_server); joystick = nullptr; - } void OSWinrt::finalize_core() { @@ -460,21 +457,21 @@ void OSWinrt::vprint(const char *p_format, va_list p_list, bool p_stderr) { void OSWinrt::alert(const String &p_alert, const String &p_title) { - Platform::String^ alert = ref new Platform::String(p_alert.c_str()); - Platform::String^ title = ref new Platform::String(p_title.c_str()); + Platform::String ^ alert = ref new Platform::String(p_alert.c_str()); + Platform::String ^ title = ref new Platform::String(p_title.c_str()); - MessageDialog^ msg = ref new MessageDialog(alert, title); + MessageDialog ^ msg = ref new MessageDialog(alert, title); - UICommand^ close = ref new UICommand("Close", ref new UICommandInvokedHandler(managed_object, &OSWinrt::ManagedType::alert_close)); + UICommand ^ close = ref new UICommand("Close", ref new UICommandInvokedHandler(managed_object, &OSWinrt::ManagedType::alert_close)); msg->Commands->Append(close); msg->DefaultCommandIndex = 0; - + managed_object->alert_close_handle = true; msg->ShowAsync(); } -void OSWinrt::ManagedType::alert_close(IUICommand^ command) { +void OSWinrt::ManagedType::alert_close(IUICommand ^ command) { alert_close_handle = false; } @@ -486,12 +483,11 @@ void OSWinrt::ManagedType::on_clipboard_changed(Platform::Object ^ sender, Platf void OSWinrt::ManagedType::update_clipboard() { - DataPackageView^ data = Clipboard::GetContent(); + DataPackageView ^ data = Clipboard::GetContent(); if (data->Contains(StandardDataFormats::Text)) { - create_task(data->GetTextAsync()).then( - [this](Platform::String^ clipboard_content) { + create_task(data->GetTextAsync()).then([this](Platform::String ^ clipboard_content) { this->clipboard = clipboard_content; }); @@ -499,36 +495,33 @@ void OSWinrt::ManagedType::update_clipboard() { } void OSWinrt::ManagedType::on_accelerometer_reading_changed(Accelerometer ^ sender, AccelerometerReadingChangedEventArgs ^ args) { - - AccelerometerReading^ reading = args->Reading; + + AccelerometerReading ^ reading = args->Reading; os->input->set_accelerometer(Vector3( - reading->AccelerationX, - reading->AccelerationY, - reading->AccelerationZ - )); + reading->AccelerationX, + reading->AccelerationY, + reading->AccelerationZ)); } void OSWinrt::ManagedType::on_magnetometer_reading_changed(Magnetometer ^ sender, MagnetometerReadingChangedEventArgs ^ args) { - MagnetometerReading^ reading = args->Reading; + MagnetometerReading ^ reading = args->Reading; os->input->set_magnetometer(Vector3( - reading->MagneticFieldX, - reading->MagneticFieldY, - reading->MagneticFieldZ - )); + reading->MagneticFieldX, + reading->MagneticFieldY, + reading->MagneticFieldZ)); } void OSWinrt::ManagedType::on_gyroscope_reading_changed(Gyrometer ^ sender, GyrometerReadingChangedEventArgs ^ args) { - GyrometerReading^ reading = args->Reading; + GyrometerReading ^ reading = args->Reading; os->input->set_magnetometer(Vector3( - reading->AngularVelocityX, - reading->AngularVelocityY, - reading->AngularVelocityZ - )); + reading->AngularVelocityX, + reading->AngularVelocityY, + reading->AngularVelocityZ)); } void OSWinrt::set_mouse_mode(MouseMode p_mode) { @@ -540,7 +533,6 @@ void OSWinrt::set_mouse_mode(MouseMode p_mode) { } else { CoreWindow::GetForCurrentThread()->ReleasePointerCapture(); - } if (p_mode == MouseMode::MOUSE_MODE_CAPTURED || p_mode == MouseMode::MOUSE_MODE_HIDDEN) { @@ -711,8 +703,7 @@ void OSWinrt::process_events() { process_key_events(); } -void OSWinrt::process_key_events() -{ +void OSWinrt::process_key_events() { for (int i = 0; i < key_event_pos; i++) { @@ -727,13 +718,11 @@ void OSWinrt::process_key_events() iev.key.pressed = kev.pressed; input_event(iev); - } key_event_pos = 0; } -void OSWinrt::queue_key_event(KeyEvent & p_event) -{ +void OSWinrt::queue_key_event(KeyEvent &p_event) { // This merges Char events with the previous Key event, so // the unicode can be retrieved without sending duplicate events. if (p_event.type == KeyEvent::MessageType::CHAR_EVENT_MESSAGE && key_event_pos > 0) { @@ -833,7 +822,7 @@ String OSWinrt::get_locale() const { #if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP // this should work on phone 8.1, but it doesn't return "en"; #else - Platform::String ^language = Windows::Globalization::Language::CurrentInputMethodLanguageTag; + Platform::String ^ language = Windows::Globalization::Language::CurrentInputMethodLanguageTag; return String(language->Data()).replace("-", "_"); #endif } @@ -855,7 +844,7 @@ void OSWinrt::swap_buffers() { bool OSWinrt::has_touchscreen_ui_hint() const { - TouchCapabilities^ tc = ref new TouchCapabilities(); + TouchCapabilities ^ tc = ref new TouchCapabilities(); return tc->TouchPresent != 0 || UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch; } @@ -864,15 +853,15 @@ bool OSWinrt::has_virtual_keyboard() const { return UIViewSettings::GetForCurrentView()->UserInteractionMode == UserInteractionMode::Touch; } -void OSWinrt::show_virtual_keyboard(const String & p_existing_text, const Rect2 & p_screen_rect) { +void OSWinrt::show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect) { - InputPane^ pane = InputPane::GetForCurrentView(); + InputPane ^ pane = InputPane::GetForCurrentView(); pane->TryShow(); } void OSWinrt::hide_virtual_keyboard() { - InputPane^ pane = InputPane::GetForCurrentView(); + InputPane ^ pane = InputPane::GetForCurrentView(); pane->TryHide(); } diff --git a/platform/winrt/os_winrt.h b/platform/winrt/os_winrt.h index 902adc7c3ab..397c07fb824 100644 --- a/platform/winrt/os_winrt.h +++ b/platform/winrt/os_winrt.h @@ -42,35 +42,32 @@ #include "servers/physics_2d/physics_2d_server_sw.h" #include "servers/spatial_sound/spatial_sound_server_sw.h" #include "servers/spatial_sound_2d/spatial_sound_2d_server_sw.h" -#include "servers/physics_2d/physics_2d_server_sw.h" -#include "audio_driver_winrt.h" #include "gl_context_egl.h" #include "core/math/math_2d.h" #include "core/ustring.h" -#include - #include #include "main/input_default.h" #include #include +#include "audio_driver_winrt.h" #include "joystick_winrt.h" +#include + /** @author Juan Linietsky */ class OSWinrt : public OS { public: - struct KeyEvent { - enum MessageType - { + enum MessageType { KEY_EVENT_MESSAGE, CHAR_EVENT_MESSAGE }; @@ -82,11 +79,9 @@ public: unsigned int unicode; bool echo; CorePhysicalKeyStatus status; - }; private: - enum { JOYSTICKS_MAX = 8, JOY_AXIS_COUNT = 6, @@ -139,34 +134,33 @@ private: InputDefault *input; - JoystickWinrt^ joystick; + JoystickWinrt ^ joystick; - Windows::System::Display::DisplayRequest^ display_request; + Windows::System::Display::DisplayRequest ^ display_request; void _post_dpad(DWORD p_dpad, int p_device, bool p_pressed); - void _drag_event(int idx,UINT uMsg, WPARAM wParam, LPARAM lParam); - void _touch_event(int idx, UINT uMsg, WPARAM wParam, LPARAM lParam); + void _drag_event(int idx, UINT uMsg, WPARAM wParam, LPARAM lParam); + void _touch_event(int idx, UINT uMsg, WPARAM wParam, LPARAM lParam); ref class ManagedType { public: property bool alert_close_handle; - property Platform::String^ clipboard; - void alert_close(Windows::UI::Popups::IUICommand^ command); - void on_clipboard_changed(Platform::Object^ sender, Platform::Object^ ev); + property Platform::String ^ clipboard; + void alert_close(Windows::UI::Popups::IUICommand ^ command); + void on_clipboard_changed(Platform::Object ^ sender, Platform::Object ^ ev); void update_clipboard(); - void on_accelerometer_reading_changed(Windows::Devices::Sensors::Accelerometer^ sender, Windows::Devices::Sensors::AccelerometerReadingChangedEventArgs^ args); - void on_magnetometer_reading_changed(Windows::Devices::Sensors::Magnetometer^ sender, Windows::Devices::Sensors::MagnetometerReadingChangedEventArgs^ args); - void on_gyroscope_reading_changed(Windows::Devices::Sensors::Gyrometer^ sender, Windows::Devices::Sensors::GyrometerReadingChangedEventArgs^ args); + void on_accelerometer_reading_changed(Windows::Devices::Sensors::Accelerometer ^ sender, Windows::Devices::Sensors::AccelerometerReadingChangedEventArgs ^ args); + void on_magnetometer_reading_changed(Windows::Devices::Sensors::Magnetometer ^ sender, Windows::Devices::Sensors::MagnetometerReadingChangedEventArgs ^ args); + void on_gyroscope_reading_changed(Windows::Devices::Sensors::Gyrometer ^ sender, Windows::Devices::Sensors::GyrometerReadingChangedEventArgs ^ args); - internal: - ManagedType() { alert_close_handle = false; } - property OSWinrt* os; + internal : ManagedType() { alert_close_handle = false; } + property OSWinrt *os; }; - ManagedType^ managed_object; - Windows::Devices::Sensors::Accelerometer^ accelerometer; - Windows::Devices::Sensors::Magnetometer^ magnetometer; - Windows::Devices::Sensors::Gyrometer^ gyrometer; + ManagedType ^ managed_object; + Windows::Devices::Sensors::Accelerometer ^ accelerometer; + Windows::Devices::Sensors::Magnetometer ^ magnetometer; + Windows::Devices::Sensors::Gyrometer ^ gyrometer; // functions used by main to initialize/deintialize the OS protected: @@ -197,10 +191,8 @@ public: // Event to send to the app wrapper HANDLE mouse_mode_changed; - void print_error(const char* p_function,const char* p_file,int p_line,const char *p_code,const char*p_rationale,ErrorType p_type); - - virtual void vprint(const char *p_format, va_list p_list, bool p_stderr=false); - virtual void alert(const String& p_alert,const String& p_title="ALERT!"); + virtual void vprint(const char *p_format, va_list p_list, bool p_stderr = false); + virtual void alert(const String &p_alert, const String &p_title = "ALERT!"); String get_stdin_string(bool p_block); void set_mouse_mode(MouseMode p_mode); @@ -210,9 +202,9 @@ public: virtual int get_mouse_button_state() const; virtual void set_window_title(const String &p_title); - virtual void set_video_mode(const VideoMode& p_video_mode,int p_screen=0); - virtual VideoMode get_video_mode(int p_screen=0) const; - virtual void get_fullscreen_mode_list(List *p_list,int p_screen=0) const; + virtual void set_video_mode(const VideoMode &p_video_mode, int p_screen = 0); + virtual VideoMode get_video_mode(int p_screen = 0) const; + virtual void get_fullscreen_mode_list(List *p_list, int p_screen = 0) const; virtual Size2 get_window_size() const; virtual void set_window_size(const Size2 p_size); virtual void set_window_fullscreen(bool p_enabled); @@ -263,7 +255,7 @@ public: virtual bool has_touchscreen_ui_hint() const; virtual bool has_virtual_keyboard() const; - virtual void show_virtual_keyboard(const String& p_existing_text, const Rect2& p_screen_rect = Rect2()); + virtual void show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect = Rect2()); virtual void hide_virtual_keyboard(); virtual Error shell_open(String p_uri); diff --git a/drivers/builtin_openssl2/winrt.cpp b/thirdparty/openssl/winrt.cpp similarity index 100% rename from drivers/builtin_openssl2/winrt.cpp rename to thirdparty/openssl/winrt.cpp diff --git a/drivers/builtin_openssl2/winrt_fix.patch b/thirdparty/openssl/winrt_fix.patch similarity index 100% rename from drivers/builtin_openssl2/winrt_fix.patch rename to thirdparty/openssl/winrt_fix.patch