From 371d7cf05d9dc8cd6143c3a400fad3bc6cd89d81 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Sat, 2 Jan 2021 13:35:39 +0000 Subject: [PATCH 01/17] Issue #61 - Reinstate buildability with shared gkmedias dll This fully works for splitting gkmedias.dll back out from xul with one exception which is Skia throwing undefined externals when linking gkmedias. --- config/moz.build | 3 + config/system-headers | 16 + dom/media/gmp/moz.build | 3 + gfx/angle/moz.build | 8 + gfx/graphite2/src/moz.build | 10 +- gfx/ots/src/moz.build | 7 + gfx/qcms/moz.build | 5 +- gfx/skia/generate_mozbuild.py | 4 + gfx/skia/moz.build | 6 +- .../skia/include/utils/SkPaintFilterCanvas.h | 2 +- gfx/skia/skia/src/core/SkCanvas.cpp | 4 +- gfx/skia/skia/src/ports/SkTypeface_win_dw.cpp | 2 +- gfx/thebes/moz.build | 3 + layout/media/Makefile.in | 11 + layout/media/moz.build | 17 +- layout/media/symbols.def.in | 661 ++++++++++++++++++ media/libaom/moz.build | 3 + media/libcubeb/src/moz.build | 3 + media/libjpeg/moz.build | 3 + media/libmkv/moz.build | 3 + media/libnestegg/src/moz.build | 3 + media/libogg/moz.build | 3 + media/libopus/moz.build | 6 +- media/libpng/moz.build | 3 + media/libspeex_resampler/src/moz.build | 4 + media/libtheora/moz.build | 3 + media/libvorbis/moz.build | 3 + media/libvpx/moz.build | 3 + media/mtransport/build/moz.build | 3 + modules/brotli/moz.build | 5 + old-configure.in | 10 +- 31 files changed, 804 insertions(+), 16 deletions(-) create mode 100644 layout/media/Makefile.in create mode 100644 layout/media/symbols.def.in diff --git a/config/moz.build b/config/moz.build index fccf5cbcdc..3e95e46d2e 100644 --- a/config/moz.build +++ b/config/moz.build @@ -28,6 +28,9 @@ if CONFIG['HOST_OS_ARCH'] != 'WINNT': # while the program here is in C. HostProgram('nsinstall_real', c_only=True) +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + DEFINES['GKMEDIAS_SHARED_LIBRARY'] = True + PYTHON_UNIT_TESTS += [ 'tests/test_mozbuild_reading.py', 'tests/unit-expandlibs.py', diff --git a/config/system-headers b/config/system-headers index aed7dd4547..2acb1e3310 100644 --- a/config/system-headers +++ b/config/system-headers @@ -1070,6 +1070,22 @@ QtSparql/qsparqlresult.h #if MOZ_TREE_PIXMAN!=1 pixman.h #endif +#ifdef GKMEDIAS_SHARED_LIBRARY +vpx/vpx_codec.h +vpx/vpx_decoder.h +vpx/vpx_encoder.h +vpx/vp8cx.h +vpx/vp8dx.h +vpx_mem/vpx_mem.h +vorbis/codec.h +theora/theoradec.h +tremor/ivorbiscodec.h +speex/speex_resampler.h +ogg/ogg.h +ogg/os_types.h +nestegg/nestegg.h +cubeb/cubeb.h +#endif gst/gst.h gst/app/gstappsink.h gst/app/gstappsrc.h diff --git a/dom/media/gmp/moz.build b/dom/media/gmp/moz.build index 9217a2ce4c..e16e1b1004 100644 --- a/dom/media/gmp/moz.build +++ b/dom/media/gmp/moz.build @@ -145,6 +145,9 @@ IPDL_SOURCES += [ 'PGMPVideoEncoder.ipdl', ] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + # comment this out to use Unsafe Shmem for more performance DEFINES['GMP_SAFE_SHMEM'] = True diff --git a/gfx/angle/moz.build b/gfx/angle/moz.build index 290332ed96..ebdbba425b 100644 --- a/gfx/angle/moz.build +++ b/gfx/angle/moz.build @@ -175,6 +175,14 @@ EXPORTS.angle.KHR += [ 'include/KHR/khrplatform.h' ] LOCAL_INCLUDES += [ 'include', 'src', 'src/common/third_party/numerics' ] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + +# This tells ANGLE to build the translator with declspec(dllexport) on Windows +# which we need to get these symbols exported from gkmedias +DEFINES['COMPONENT_BUILD'] = True +DEFINES['ANGLE_TRANSLATOR_IMPLEMENTATION'] = True + # We allow warnings for third-party code that can be updated from upstream. ALLOW_COMPILER_WARNINGS = True diff --git a/gfx/graphite2/src/moz.build b/gfx/graphite2/src/moz.build index 416e2c8ed4..2e517449a1 100644 --- a/gfx/graphite2/src/moz.build +++ b/gfx/graphite2/src/moz.build @@ -57,9 +57,13 @@ UNIFIED_SOURCES += [ 'UtfCodec.cpp', ] -# tell graphite2 not to export symbols, we'll be linking it directly with -# thebes -DEFINES['GRAPHITE2_STATIC'] = True +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + DEFINES['GRAPHITE2_EXPORTING'] = True +else: + # tell graphite2 not to export symbols, we'll be linking it directly with + # thebes + DEFINES['GRAPHITE2_STATIC'] = True # We allow warnings for third-party code that can be updated from upstream. ALLOW_COMPILER_WARNINGS = True diff --git a/gfx/ots/src/moz.build b/gfx/ots/src/moz.build index 48c506da57..b5c7ceca9e 100644 --- a/gfx/ots/src/moz.build +++ b/gfx/ots/src/moz.build @@ -56,6 +56,9 @@ UNIFIED_SOURCES += [ 'vvar.cc', ] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + # We allow warnings for third-party code that can be updated from upstream. ALLOW_COMPILER_WARNINGS = True @@ -66,6 +69,10 @@ DEFINES['PACKAGE_BUGREPORT'] = '"http://bugzilla.mozilla.org/"' DEFINES['OTS_GRAPHITE'] = 1 DEFINES['OTS_VARIATIONS'] = 1 +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + DEFINES['OTS_DLL'] = True + DEFINES['OTS_DLL_EXPORTS'] = True + USE_LIBS += [ 'brotli', 'woff2', diff --git a/gfx/qcms/moz.build b/gfx/qcms/moz.build index 405743606f..9bcbbe63a8 100644 --- a/gfx/qcms/moz.build +++ b/gfx/qcms/moz.build @@ -16,7 +16,10 @@ SOURCES += [ 'transform_util.c', ] -FINAL_LIBRARY = 'xul' +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + +FINAL_LIBRARY = 'gkmedias' if CONFIG['GNU_CC']: CFLAGS += ['-Wno-missing-field-initializers'] diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py index 2a1bbb5444..1c2f61edc0 100644 --- a/gfx/skia/generate_mozbuild.py +++ b/gfx/skia/generate_mozbuild.py @@ -84,6 +84,10 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 'skia/src/fonts/SkRemotableFontMgr.cpp', ] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + DEFINES['SKIA_DLL'] = 1 + DEFINES['GR_DLL'] = 1 + # We should autogenerate these SSE related flags. if CONFIG['_MSC_VER']: diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build index ad9f788ebd..ad31c8d484 100644 --- a/gfx/skia/moz.build +++ b/gfx/skia/moz.build @@ -643,7 +643,6 @@ else: 'skia/src/opts/SkBlitRow_opts_none.cpp', ] - # We allow warnings for third-party code that can be updated from upstream. ALLOW_COMPILER_WARNINGS = True @@ -694,6 +693,11 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 'skia/src/fonts/SkRemotableFontMgr.cpp', ] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + DEFINES['SKIA_DLL'] = 1 + DEFINES['GR_DLL'] = 1 + DEFINES['SK_FONT_HOST_USE_SYSTEM_SETTINGS'] = 1 + # We should autogenerate these SSE related flags. if CONFIG['_MSC_VER']: diff --git a/gfx/skia/skia/include/utils/SkPaintFilterCanvas.h b/gfx/skia/skia/include/utils/SkPaintFilterCanvas.h index 63eaaa2fbc..29474df0fb 100644 --- a/gfx/skia/skia/include/utils/SkPaintFilterCanvas.h +++ b/gfx/skia/skia/include/utils/SkPaintFilterCanvas.h @@ -27,7 +27,7 @@ public: * specified canvas. Also copies the target canvas matrix and clip bounds. */ SkPaintFilterCanvas(SkCanvas* canvas); - + enum Type { kPaint_Type, kPoint_Type, diff --git a/gfx/skia/skia/src/core/SkCanvas.cpp b/gfx/skia/skia/src/core/SkCanvas.cpp index 505592d0f2..0a080f737a 100644 --- a/gfx/skia/skia/src/core/SkCanvas.cpp +++ b/gfx/skia/skia/src/core/SkCanvas.cpp @@ -22,6 +22,7 @@ #include "SkLatticeIter.h" #include "SkMatrixUtils.h" #include "SkMetaData.h" +#include "SkNWayCanvas.h" #include "SkNx.h" #include "SkPaintPriv.h" #include "SkPatchUtils.h" @@ -45,9 +46,10 @@ #include "GrContext.h" #include "GrRenderTarget.h" #include "SkGrPriv.h" - #endif +class SkNWayCanvas; + #define RETURN_ON_NULL(ptr) do { if (nullptr == (ptr)) return; } while (0) /* diff --git a/gfx/skia/skia/src/ports/SkTypeface_win_dw.cpp b/gfx/skia/skia/src/ports/SkTypeface_win_dw.cpp index 96a728f600..ca5f01aed2 100644 --- a/gfx/skia/skia/src/ports/SkTypeface_win_dw.cpp +++ b/gfx/skia/skia/src/ports/SkTypeface_win_dw.cpp @@ -251,7 +251,7 @@ SkScalerContext* DWriteFontTypeface::onCreateScalerContext(const SkScalerContext } #ifdef MOZ_SKIA -IDWriteRenderingParams* GetDwriteRenderingParams(bool aGDI); +extern IDWriteRenderingParams* GetDwriteRenderingParams(bool aGDI); #endif void DWriteFontTypeface::onFilterRec(SkScalerContext::Rec* rec) const { diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build index 52018d9923..ac9e445e9f 100644 --- a/gfx/thebes/moz.build +++ b/gfx/thebes/moz.build @@ -248,6 +248,9 @@ LOCAL_INCLUDES += ['/media/libyuv/include'] DEFINES['GRAPHITE2_STATIC'] = True +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + DEFINES['OTS_DLL'] = True + if CONFIG['CLANG_CXX']: # Suppress warnings from Skia header files. SOURCES['gfxPlatform.cpp'].flags += ['-Wno-implicit-fallthrough'] diff --git a/layout/media/Makefile.in b/layout/media/Makefile.in new file mode 100644 index 0000000000..86d9b181df --- /dev/null +++ b/layout/media/Makefile.in @@ -0,0 +1,11 @@ +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +include $(topsrcdir)/config/rules.mk + +ifeq (WINNT,$(OS_TARGET)) +symbols.def: symbols.def.in $(GLOBAL_DEPS) + $(call py_action,preprocessor,$(ACDEFINES) $< -o $@) +endif diff --git a/layout/media/moz.build b/layout/media/moz.build index 8fd0eb9a8e..9ea4653198 100644 --- a/layout/media/moz.build +++ b/layout/media/moz.build @@ -6,16 +6,23 @@ with Files('**'): BUG_COMPONENT = ('Core', 'Video/Audio') -# media/webrtc/signaling/test/common.build uses the gkmedias library, -# expecting at least some of what it contains to be linked, but not libxul, -# so we need to keep an independent pseudo-library, as well as the OS_LIBS -# on Windows for them to propagate there. -Library('gkmedias') +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + GeckoSharedLibrary('gkmedias', linkage=None) + USE_LIBS += [ + 'nspr', + ] +else: + # media/webrtc/signaling/test/common.build uses the gkmedias library, + # expecting at least some of what it contains to be linked, but not libxul, + # so we need to keep an independent pseudo-library, as well as the OS_LIBS + # on Windows for them to propagate there. + Library('gkmedias') if CONFIG['MOZ_WEBRTC']: DIRS += ['webrtc'] if CONFIG['OS_TARGET'] == 'WINNT': + DEFFILE = 'symbols.def' OS_LIBS += [ 'usp10', 'ole32', diff --git a/layout/media/symbols.def.in b/layout/media/symbols.def.in new file mode 100644 index 0000000000..c7cba45183 --- /dev/null +++ b/layout/media/symbols.def.in @@ -0,0 +1,661 @@ +;+# This Source Code Form is subject to the terms of the Mozilla Public +;+# License, v. 2.0. If a copy of the MPL was not distributed with this +;+# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +LIBRARY gkmedias.dll +EXPORTS +nestegg_destroy +nestegg_duration +nestegg_free_packet +nestegg_init +nestegg_offset_seek +nestegg_packet_count +nestegg_packet_discard_padding +nestegg_packet_data +nestegg_packet_duration +nestegg_packet_encryption +nestegg_packet_has_keyframe +nestegg_packet_iv +nestegg_packet_track +nestegg_packet_tstamp +nestegg_read_packet +nestegg_read_reset +nestegg_track_audio_params +nestegg_track_codec_data +nestegg_track_codec_data_count +nestegg_track_codec_id +nestegg_track_content_enc_key_id +nestegg_track_count +nestegg_get_cue_point +nestegg_track_seek +nestegg_track_type +nestegg_track_video_params +nestegg_tstamp_scale +nestegg_has_cues +nestegg_sniff +#ifdef MOZ_WEBM_ENCODER +writeSimpleBlock +writeHeader +writeSegmentInformation +writeVideoTrack +writeAudioTrack +Ebml_Serialize +Ebml_SerializeUnsigned +Ebml_StartSubElement +Ebml_EndSubElement +#endif +vpx_codec_control_ +vpx_codec_dec_init_ver +vpx_codec_decode +vpx_codec_destroy +vpx_codec_err_to_string +vpx_codec_get_frame +vpx_codec_peek_stream_info +vpx_codec_vp8_dx +vpx_codec_vp9_dx +vpx_img_free +vpx_codec_enc_config_set +vpx_codec_enc_init_ver +vpx_codec_vp8_cx +vpx_codec_vp9_cx +vpx_img_set_rect +vpx_img_wrap +vpx_codec_get_cx_data +vpx_codec_enc_config_default +vpx_img_alloc +vpx_codec_encode +#ifdef MOZ_AV1 +aom_codec_av1_dx +aom_codec_dec_init_ver +aom_codec_decode +aom_codec_destroy +aom_codec_err_to_string +aom_codec_get_frame +aom_codec_peek_stream_info +aom_img_alloc +aom_img_free +#endif +#ifdef MOZ_VORBIS +ogg_page_bos +ogg_page_granulepos +ogg_page_serialno +ogg_set_mem_functions +ogg_stream_check +ogg_stream_clear +ogg_stream_eos +ogg_stream_flush +ogg_stream_init +ogg_stream_packetin +ogg_stream_packetout +ogg_stream_pagein +ogg_stream_pageout +ogg_stream_reset +ogg_sync_buffer +ogg_sync_clear +ogg_sync_init +ogg_sync_pageseek +ogg_sync_reset +ogg_sync_wrote +vorbis_analysis +vorbis_analysis_blockout +vorbis_analysis_buffer +vorbis_analysis_init +vorbis_analysis_headerout +vorbis_analysis_wrote +vorbis_block_clear +vorbis_block_init +vorbis_comment_add_tag +vorbis_comment_clear +vorbis_comment_init +vorbis_dsp_clear +vorbis_encode_init_vbr +vorbis_info_clear +vorbis_info_init +vorbis_packet_blocksize +vorbis_synthesis +vorbis_synthesis_blockin +vorbis_synthesis_headerin +vorbis_synthesis_init +vorbis_synthesis_pcmout +vorbis_synthesis_read +vorbis_synthesis_restart +#endif +moz_speex_resampler_init +moz_speex_resampler_destroy +moz_speex_resampler_process_float +moz_speex_resampler_process_interleaved_float +moz_speex_resampler_process_interleaved_int +moz_speex_resampler_set_rate +moz_speex_resampler_get_rate +moz_speex_resampler_get_ratio +moz_speex_resampler_get_input_latency +moz_speex_resampler_get_output_latency +moz_speex_resampler_skip_zeros +moz_speex_resampler_set_skip_frac_num +moz_speex_resampler_reset_mem +cubeb_destroy +cubeb_init +cubeb_get_backend_id +cubeb_get_max_channel_count +cubeb_get_min_latency +cubeb_get_preferred_sample_rate +cubeb_stream_destroy +cubeb_stream_get_position +cubeb_stream_init +cubeb_stream_start +cubeb_stream_stop +cubeb_stream_get_latency +cubeb_stream_set_volume +cubeb_stream_set_panning +cubeb_stream_get_current_device +cubeb_stream_device_destroy +cubeb_stream_register_device_changed_callback +th_comment_clear +th_comment_init +th_decode_alloc +th_decode_free +th_decode_headerin +th_decode_packetin +th_decode_ycbcr_out +th_granule_frame +th_info_clear +th_info_init +th_packet_isheader +th_packet_iskeyframe +th_setup_free +opus_decoder_create +opus_decoder_destroy +opus_decoder_ctl +opus_decoder_get_nb_samples +opus_decode +opus_decode_float +opus_get_version_string +opus_multistream_decoder_create +opus_multistream_decoder_ctl +opus_multistream_decoder_destroy +opus_multistream_decode_float +opus_multistream_decode +opus_packet_get_nb_frames +opus_packet_get_samples_per_frame +opus_encoder_create +opus_encoder_destroy +opus_encoder_ctl +opus_encode +opus_encode_float +#ifndef MOZ_NATIVE_PNG +MOZ_APNG_get_first_frame_is_hidden +MOZ_APNG_get_next_frame_blend_op +MOZ_APNG_get_next_frame_delay_den +MOZ_APNG_get_next_frame_delay_num +MOZ_APNG_get_next_frame_dispose_op +MOZ_APNG_set_prog_frame_fn +MOZ_APNG_get_next_frame_height +MOZ_APNG_get_next_frame_width +MOZ_APNG_get_next_frame_x_offset +MOZ_APNG_get_next_frame_y_offset +MOZ_APNG_set_acTL +MOZ_APNG_set_first_frame_is_hidden +MOZ_APNG_set_num_plays +MOZ_APNG_write_frame_head +MOZ_APNG_write_frame_tail +MOZ_PNG_cr_info_str +MOZ_PNG_cr_read_str +MOZ_PNG_cr_write_str +MOZ_PNG_dest_read_str +MOZ_PNG_dest_write_str +MOZ_PNG_free_data +MOZ_PNG_get_channels +MOZ_PNG_get_cHRM +MOZ_PNG_get_gAMA +MOZ_PNG_get_IHDR +MOZ_PNG_get_iCCP +MOZ_PNG_get_io_ptr +MOZ_PNG_get_progressive_ptr +MOZ_PNG_get_sRGB +MOZ_PNG_get_tRNS +MOZ_PNG_get_valid +MOZ_PNG_longjmp +MOZ_PNG_process_data +MOZ_PNG_process_data_pause +MOZ_PNG_progressive_combine_row +MOZ_PNG_read_update_info +MOZ_PNG_set_cHRM +MOZ_PNG_set_crc_action +MOZ_PNG_set_gAMA +MOZ_PNG_set_gamma +MOZ_PNG_set_gray_to_rgb +MOZ_PNG_set_expand +MOZ_PNG_set_IHDR +MOZ_PNG_set_interlace_handling +MOZ_PNG_set_longjmp_fn +MOZ_PNG_set_progressive_read_fn +MOZ_PNG_set_scale_16 +MOZ_PNG_set_write_fn +MOZ_PNG_write_end +MOZ_PNG_write_info +MOZ_PNG_write_row +#endif +png_set_option +png_error +#ifndef MOZ_NATIVE_JPEG +jpeg_calc_output_dimensions +jpeg_consume_input +jpeg_CreateCompress +jpeg_CreateDecompress +jpeg_destroy_compress +jpeg_destroy_decompress +jpeg_finish_compress +jpeg_finish_decompress +jpeg_finish_output +jpeg_has_multiple_scans +jpeg_input_complete +jpeg_read_header +jpeg_read_scanlines +jpeg_resync_to_restart +jpeg_save_markers +jpeg_set_defaults +jpeg_set_quality +jpeg_start_compress +jpeg_start_decompress +jpeg_start_output +jpeg_std_error +jpeg_write_scanlines +jpeg_write_raw_data +jpeg_stdio_dest +jpeg_abort +jpeg_abort_decompress +jpeg_read_raw_data +#endif +WebPDemuxDelete +WebPDemuxGetChunk +WebPDemuxGetFrame +WebPDemuxGetI +WebPDemuxInternal +WebPDemuxNextFrame +WebPDemuxReleaseChunkIterator +WebPDemuxReleaseIterator +WebPFreeDecBuffer +WebPIDecGetRGB +WebPIDelete +WebPINewDecoder +WebPIUpdate +WebPInitDecBufferInternal +qcms_enable_iccv4 +qcms_data_from_unicode_path +qcms_data_from_path +qcms_profile_create_rgb_with_gamma +qcms_profile_from_memory +qcms_profile_from_path +qcms_profile_from_unicode_path +qcms_profile_get_color_space +qcms_profile_get_rendering_intent +qcms_profile_is_bogus +qcms_profile_precache_output_transform +qcms_profile_release +qcms_profile_sRGB +qcms_transform_create +qcms_transform_data +qcms_transform_release +MOZ_XMLCheckQName +MOZ_XMLIsLetter +MOZ_XMLIsNCNameChar +MOZ_XMLTranslateEntity +MOZ_XML_ExternalEntityParserCreate +MOZ_XML_GetBase +MOZ_XML_GetCurrentByteIndex +MOZ_XML_GetCurrentColumnNumber +MOZ_XML_GetCurrentLineNumber +MOZ_XML_GetErrorCode +MOZ_XML_GetIdAttributeIndex +MOZ_XML_GetMismatchedTag +MOZ_XML_GetSpecifiedAttributeCount +MOZ_XML_Parse +MOZ_XML_ParserCreate_MM +MOZ_XML_ParserFree +MOZ_XML_ResumeParser +MOZ_XML_SetBase +MOZ_XML_SetCdataSectionHandler +MOZ_XML_SetCharacterDataHandler +MOZ_XML_SetCommentHandler +MOZ_XML_SetDefaultHandlerExpand +MOZ_XML_SetDoctypeDeclHandler +MOZ_XML_SetElementHandler +MOZ_XML_SetExternalEntityRefHandler +MOZ_XML_SetExternalEntityRefHandlerArg +MOZ_XML_SetNamespaceDeclHandler +MOZ_XML_SetNotationDeclHandler +MOZ_XML_SetParamEntityParsing +MOZ_XML_SetProcessingInstructionHandler +MOZ_XML_SetReturnNSTriplet +MOZ_XML_SetUnparsedEntityDeclHandler +MOZ_XML_SetUserData +MOZ_XML_SetXmlDeclHandler +MOZ_XML_StopParser +#ifdef MOZ_TREE_CAIRO +_moz_cairo_append_path +_moz_cairo_arc +_moz_cairo_arc_negative +_moz_cairo_clip +_moz_cairo_clip_extents +_moz_cairo_clip_preserve +_moz_cairo_close_path +_moz_cairo_copy_clip_rectangle_list +_moz_cairo_copy_path +_moz_cairo_copy_path_flat +_moz_cairo_create +_moz_cairo_curve_to +_moz_cairo_d2d_create_device +_moz_cairo_d2d_create_device_from_d3d10device +_moz_cairo_d2d_device_get_device +_moz_cairo_d2d_get_dc +_moz_cairo_d2d_get_image_surface_cache_usage +_moz_cairo_d2d_get_surface_vram_usage +_moz_cairo_d2d_present_backbuffer +_moz_cairo_d2d_release_dc +_moz_cairo_d2d_scroll +_moz_cairo_d2d_surface_create +_moz_cairo_d2d_surface_create_for_handle +_moz_cairo_d2d_surface_create_for_hwnd +_moz_cairo_d2d_surface_create_for_texture +_moz_cairo_d2d_surface_get_height +_moz_cairo_d2d_surface_get_texture +_moz_cairo_d2d_surface_get_width +_moz_cairo_debug_reset_static_data +_moz_cairo_destroy +_moz_cairo_device_to_user +_moz_cairo_device_to_user_distance +_moz_cairo_dwrite_font_face_create_for_dwrite_fontface +_moz_cairo_dwrite_get_cleartype_rendering_mode +_moz_cairo_dwrite_scaled_font_allow_manual_show_glyphs +_moz_cairo_dwrite_scaled_font_get_force_GDI_classic +_moz_cairo_dwrite_scaled_font_set_force_GDI_classic +_moz_cairo_dwrite_set_cleartype_params +_moz_cairo_fill +_moz_cairo_fill_extents +_moz_cairo_fill_preserve +_moz_cairo_font_face_destroy +_moz_cairo_font_options_create +_moz_cairo_font_options_destroy +_moz_cairo_font_options_get_antialias +_moz_cairo_font_options_get_hint_metrics +_moz_cairo_font_options_set_antialias +_moz_cairo_format_stride_for_width +_moz_cairo_get_antialias +_moz_cairo_get_current_point +_moz_cairo_get_dash +_moz_cairo_get_dash_count +_moz_cairo_get_fill_rule +_moz_cairo_get_font_matrix +_moz_cairo_get_font_options +_moz_cairo_get_group_target +_moz_cairo_get_line_cap +_moz_cairo_get_line_join +_moz_cairo_get_line_width +_moz_cairo_get_matrix +_moz_cairo_get_miter_limit +_moz_cairo_get_operator +_moz_cairo_get_scaled_font +_moz_cairo_get_source +_moz_cairo_get_target +_moz_cairo_glyph_extents +_moz_cairo_glyph_path +_moz_cairo_identity_matrix +_moz_cairo_image_surface_create +_moz_cairo_image_surface_create_for_data +_moz_cairo_image_surface_get_data +_moz_cairo_image_surface_get_format +_moz_cairo_image_surface_get_height +_moz_cairo_image_surface_get_stride +_moz_cairo_image_surface_get_width +_moz_cairo_in_fill +_moz_cairo_in_stroke +_moz_cairo_line_to +_moz_cairo_mask +_moz_cairo_mask_surface +_moz_cairo_matrix_init +_moz_cairo_matrix_init_identity +_moz_cairo_matrix_init_scale +_moz_cairo_matrix_init_translate +_moz_cairo_matrix_invert +_moz_cairo_matrix_multiply +_moz_cairo_matrix_rotate +_moz_cairo_matrix_scale +_moz_cairo_matrix_transform_distance +_moz_cairo_matrix_transform_point +_moz_cairo_matrix_translate +_moz_cairo_move_to +_moz_cairo_new_path +_moz_cairo_new_sub_path +_moz_cairo_null_surface_create +_moz_cairo_paint +_moz_cairo_paint_with_alpha +_moz_cairo_path_destroy +_moz_cairo_path_extents +_moz_cairo_pattern_add_color_stop_rgba +_moz_cairo_pattern_create_for_surface +_moz_cairo_pattern_create_linear +_moz_cairo_pattern_create_radial +_moz_cairo_pattern_create_rgba +_moz_cairo_pattern_destroy +_moz_cairo_pattern_get_color_stop_count +_moz_cairo_pattern_get_color_stop_rgba +_moz_cairo_pattern_get_extend +_moz_cairo_pattern_get_filter +_moz_cairo_pattern_get_linear_points +_moz_cairo_pattern_get_matrix +_moz_cairo_pattern_get_radial_circles +_moz_cairo_pattern_get_rgba +_moz_cairo_pattern_get_surface +_moz_cairo_pattern_get_type +_moz_cairo_pattern_reference +_moz_cairo_pattern_set_extend +_moz_cairo_pattern_set_filter +_moz_cairo_pattern_set_matrix +_moz_cairo_pattern_status +_moz_cairo_pdf_surface_create_for_stream +_moz_cairo_pop_group +_moz_cairo_pop_group_to_source +_moz_cairo_push_group +_moz_cairo_push_group_with_content +_moz_cairo_rectangle +_moz_cairo_rectangle_list_destroy +_moz_cairo_reference +_moz_cairo_release_device +_moz_cairo_reset_clip +_moz_cairo_restore +_moz_cairo_rotate +_moz_cairo_save +_moz_cairo_scale +_moz_cairo_scaled_font_create +_moz_cairo_scaled_font_destroy +_moz_cairo_scaled_font_get_font_matrix +_moz_cairo_scaled_font_get_font_options +_moz_cairo_scaled_font_get_type +_moz_cairo_scaled_font_glyph_extents +_moz_cairo_scaled_font_reference +_moz_cairo_scaled_font_status +_moz_cairo_set_antialias +_moz_cairo_set_dash +_moz_cairo_set_fill_rule +_moz_cairo_set_font_face +_moz_cairo_set_font_options +_moz_cairo_set_font_size +_moz_cairo_set_line_cap +_moz_cairo_set_line_join +_moz_cairo_set_line_width +_moz_cairo_set_matrix +_moz_cairo_set_miter_limit +_moz_cairo_set_operator +_moz_cairo_set_scaled_font +_moz_cairo_set_source +_moz_cairo_set_source_rgba +_moz_cairo_set_source_surface +_moz_cairo_show_glyphs +_moz_cairo_status +_moz_cairo_status_to_string +_moz_cairo_stroke +_moz_cairo_stroke_extents +_moz_cairo_stroke_preserve +_moz_cairo_surface_attach_snapshot +_moz_cairo_surface_create_similar +_moz_cairo_surface_destroy +_moz_cairo_surface_finish +_moz_cairo_surface_flush +_moz_cairo_surface_get_content +_moz_cairo_surface_get_device_offset +_moz_cairo_surface_get_reference_count +_moz_cairo_surface_get_subpixel_antialiasing +_moz_cairo_surface_get_type +_moz_cairo_surface_get_user_data +_moz_cairo_surface_mark_dirty +_moz_cairo_surface_mark_dirty_rectangle +_moz_cairo_surface_reference +_moz_cairo_surface_set_device_offset +_moz_cairo_surface_set_fallback_resolution +_moz_cairo_surface_set_subpixel_antialiasing +_moz_cairo_surface_set_user_data +_moz_cairo_surface_show_page +_moz_cairo_surface_status +_moz_cairo_tee_surface_add +_moz_cairo_tee_surface_create +_moz_cairo_tee_surface_index +_moz_cairo_transform +_moz_cairo_translate +_moz_cairo_user_to_device +_moz_cairo_user_to_device_distance +_moz_cairo_win32_font_face_create_for_logfontw +_moz_cairo_win32_font_face_create_for_logfontw_hfont +_moz_cairo_win32_get_dc_with_clip +_moz_cairo_win32_get_system_text_quality +#ifdef NS_PRINTING +_moz_cairo_win32_printing_surface_create +#endif +_moz_cairo_win32_scaled_font_select_font +_moz_cairo_win32_surface_create +_moz_cairo_win32_surface_create_with_alpha +_moz_cairo_win32_surface_create_with_d3dsurface9 +_moz_cairo_win32_surface_create_with_ddb +_moz_cairo_win32_surface_create_with_dib +_moz_cairo_win32_surface_get_dc +_moz_cairo_win32_surface_get_height +_moz_cairo_win32_surface_get_image +_moz_cairo_win32_surface_get_width +_moz_cairo_win32_surface_set_can_convert_to_dib +#ifdef MOZ_TREE_PIXMAN +_moz_pixman_image_composite32 +_moz_pixman_image_create_bits +_moz_pixman_image_set_filter +_moz_pixman_image_set_transform +_moz_pixman_image_unref +_moz_pixman_transform_from_pixman_f_transform +_moz_pixman_transform_invert +_moz_pixman_region32_reset +_moz_pixman_region32_init +_moz_pixman_region32_init_rect +_moz_pixman_region32_init_rects +_moz_pixman_region32_init_with_extents +_moz_pixman_region32_fini +_moz_pixman_region32_translate +_moz_pixman_region32_copy +_moz_pixman_region32_intersect +_moz_pixman_region32_intersect_rect +_moz_pixman_region32_union +_moz_pixman_region32_union_rect +_moz_pixman_region32_subtract +_moz_pixman_region32_inverse +_moz_pixman_region32_contains_point +_moz_pixman_region32_contains_rectangle +_moz_pixman_region32_not_empty +_moz_pixman_region32_extents +_moz_pixman_region32_n_rects +_moz_pixman_region32_rectangles +_moz_pixman_region32_equal +_moz_pixman_region32_selfcheck +_moz_pixman_region32_reset +_moz_pixman_region32_clear +#endif +#endif +hb_blob_create +hb_blob_destroy +hb_blob_get_data +hb_blob_get_empty +hb_blob_get_length +hb_blob_reference +hb_buffer_add_utf16 +hb_buffer_create +hb_buffer_destroy +hb_buffer_get_glyph_infos +hb_buffer_get_glyph_positions +hb_buffer_reverse +hb_buffer_set_cluster_level +hb_buffer_set_direction +hb_buffer_set_language +hb_buffer_set_script +hb_buffer_set_unicode_funcs +hb_face_create_for_tables +hb_face_destroy +hb_face_reference +hb_font_create +hb_font_destroy +hb_font_funcs_create +hb_font_funcs_set_glyph_contour_point_func +hb_font_funcs_set_glyph_extents_func +hb_font_funcs_set_glyph_func +hb_font_funcs_set_glyph_h_advance_func +hb_font_funcs_set_glyph_h_kerning_func +hb_font_funcs_set_glyph_h_origin_func +hb_font_funcs_set_glyph_v_origin_func +hb_font_funcs_set_glyph_v_advance_func +hb_font_funcs_set_nominal_glyph_func +hb_font_funcs_set_variation_glyph_func +hb_font_set_funcs +hb_font_set_ppem +hb_font_set_scale +hb_language_from_string +hb_ot_layout_collect_lookups +hb_ot_layout_feature_get_lookups +hb_ot_layout_has_positioning +hb_ot_layout_has_substitution +hb_ot_layout_language_find_feature +hb_ot_layout_language_get_feature_indexes +hb_ot_layout_language_get_feature_tags +hb_ot_layout_language_get_required_feature_index +hb_ot_layout_lookup_collect_glyphs +hb_ot_layout_script_get_language_tags +hb_ot_layout_table_choose_script +hb_ot_layout_table_find_script +hb_ot_layout_table_get_script_tags +hb_ot_math_get_constant +hb_ot_math_get_glyph_assembly +hb_ot_math_get_glyph_italics_correction +hb_ot_math_get_glyph_variants +hb_ot_math_has_data +hb_ot_tag_to_language +hb_ot_tag_to_script +hb_ot_tags_from_script +hb_set_add +hb_set_clear +hb_set_create +hb_set_destroy +hb_set_get_population +hb_set_has +hb_set_intersect +hb_set_is_empty +hb_set_next +hb_shape +hb_unicode_funcs_create +hb_unicode_funcs_get_empty +hb_unicode_funcs_set_combining_class_func +hb_unicode_funcs_set_compose_func +hb_unicode_funcs_set_decompose_func +hb_unicode_funcs_set_eastasian_width_func +hb_unicode_funcs_set_general_category_func +hb_unicode_funcs_set_mirroring_func +hb_unicode_funcs_set_script_func +BrotliDecoderCreateInstance +BrotliDecoderDecompress +BrotliDecoderDecompressStream +BrotliDecoderDestroyInstance +BrotliDecoderIsFinished +BrotliDecoderStateCleanup +BrotliDecoderStateInit diff --git a/media/libaom/moz.build b/media/libaom/moz.build index f493af1640..e092047b0c 100644 --- a/media/libaom/moz.build +++ b/media/libaom/moz.build @@ -88,6 +88,9 @@ else: LOCAL_INCLUDES += [ '/media/libaom/config/generic/' ] EXPORTS.aom += [ 'config/generic/config/aom_config.h' ] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + # We allow warnings for third-party code that can be updated from upstream. ALLOW_COMPILER_WARNINGS = True diff --git a/media/libcubeb/src/moz.build b/media/libcubeb/src/moz.build index b53dec7998..65aaf7256a 100644 --- a/media/libcubeb/src/moz.build +++ b/media/libcubeb/src/moz.build @@ -81,6 +81,9 @@ if CONFIG['OS_TARGET'] == 'Android': ] DEFINES['USE_AUDIOTRACK'] = True +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + FINAL_LIBRARY = 'gkmedias' CFLAGS += CONFIG['MOZ_ALSA_CFLAGS'] diff --git a/media/libjpeg/moz.build b/media/libjpeg/moz.build index 44d57501e3..a057c06456 100644 --- a/media/libjpeg/moz.build +++ b/media/libjpeg/moz.build @@ -261,6 +261,9 @@ if CONFIG['CPU_ARCH'] == 'x86_64': ASFLAGS += ['-I%s/media/libjpeg/simd/nasm/' % TOPSRCDIR] ASFLAGS += ['-I%s/media/libjpeg/simd/x86_64/' % TOPSRCDIR] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + # We allow warnings for third-party code that can be updated from upstream. ALLOW_COMPILER_WARNINGS = True diff --git a/media/libmkv/moz.build b/media/libmkv/moz.build index 2463bed86c..018ca7474d 100644 --- a/media/libmkv/moz.build +++ b/media/libmkv/moz.build @@ -20,6 +20,9 @@ SOURCES += [ 'WebMElement.c', ] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + FINAL_LIBRARY = 'gkmedias' # We allow warnings for third-party code that can be updated from upstream. diff --git a/media/libnestegg/src/moz.build b/media/libnestegg/src/moz.build index 541e18e041..bf9edcdbc0 100644 --- a/media/libnestegg/src/moz.build +++ b/media/libnestegg/src/moz.build @@ -7,6 +7,9 @@ UNIFIED_SOURCES += [ 'nestegg.c', ] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + FINAL_LIBRARY = 'gkmedias' # We allow warnings for third-party code that can be updated from upstream. diff --git a/media/libogg/moz.build b/media/libogg/moz.build index 1fe2795214..839d2b2aab 100644 --- a/media/libogg/moz.build +++ b/media/libogg/moz.build @@ -22,4 +22,7 @@ UNIFIED_SOURCES += [ 'src/ogg_framing.c', ] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + FINAL_LIBRARY = 'gkmedias' diff --git a/media/libopus/moz.build b/media/libopus/moz.build index 7af427c1c1..bddaa3fc17 100644 --- a/media/libopus/moz.build +++ b/media/libopus/moz.build @@ -23,8 +23,10 @@ DEFINES['OPUS_VERSION'] = '2654707e86cc94413998976d179b2ab4a2aa3114' DEFINES['USE_ALLOCA'] = True DEFINES['ENABLE_HARDENING'] = True -# Don't export symbols -DEFINES['OPUS_EXPORT'] = '' +# We only need to export symbols if we're built into libgkmedias +# instead of libxul. +if not CONFIG['GKMEDIAS_SHARED_LIBRARY']: + DEFINES['OPUS_EXPORT'] = '' if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_AS']: DEFINES['OPUS_ARM_ASM'] = True diff --git a/media/libpng/moz.build b/media/libpng/moz.build index 987c737454..ff4b9e9cb1 100644 --- a/media/libpng/moz.build +++ b/media/libpng/moz.build @@ -46,6 +46,9 @@ if CONFIG['INTEL_ARCHITECTURE']: Library('mozpng') +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + FINAL_LIBRARY = 'gkmedias' # We allow warnings for third-party code that can be updated from upstream. diff --git a/media/libspeex_resampler/src/moz.build b/media/libspeex_resampler/src/moz.build index cad566800a..c8c8db6531 100644 --- a/media/libspeex_resampler/src/moz.build +++ b/media/libspeex_resampler/src/moz.build @@ -22,7 +22,11 @@ FINAL_LIBRARY = 'gkmedias' # We don't compile the full speex codec, only the resampler. DEFINES['OUTSIDE_SPEEX'] = True +# Visibility is handled through VISIBILITY_FLAGS and +# layout/media/symbols.def.in. DEFINES['EXPORT'] = '' +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True if CONFIG['MOZ_SAMPLE_TYPE_S16']: DEFINES['FIXED_POINT'] = True diff --git a/media/libtheora/moz.build b/media/libtheora/moz.build index bca5dafc1f..bef578bed3 100644 --- a/media/libtheora/moz.build +++ b/media/libtheora/moz.build @@ -17,6 +17,9 @@ ALLOW_COMPILER_WARNINGS = True FINAL_LIBRARY = 'gkmedias' +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + # The encoder is currently not included. DEFINES['THEORA_DISABLE_ENCODE'] = True diff --git a/media/libvorbis/moz.build b/media/libvorbis/moz.build index 1d42d5ff19..0bc1809092 100644 --- a/media/libvorbis/moz.build +++ b/media/libvorbis/moz.build @@ -47,6 +47,9 @@ if CONFIG['OS_ARCH'] == 'AIX': if CONFIG['OS_ARCH'] == 'SunOS': DEFINES['HAVE_ALLOCA_H'] = True +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + # We allow warnings for third-party code that can be updated from upstream. ALLOW_COMPILER_WARNINGS = True diff --git a/media/libvpx/moz.build b/media/libvpx/moz.build index 3e24eb14c4..1630f6da45 100644 --- a/media/libvpx/moz.build +++ b/media/libvpx/moz.build @@ -62,6 +62,9 @@ if 'vp8/encoder/arm/armv5te/boolhuff_armv5te.asm' not in arm_asm_files: 'vp8/encoder/boolhuff.c', ] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + # We allow warnings for third-party code that can be updated from upstream. ALLOW_COMPILER_WARNINGS = True diff --git a/media/mtransport/build/moz.build b/media/mtransport/build/moz.build index 4bac8210f4..a5fdef5dd6 100644 --- a/media/mtransport/build/moz.build +++ b/media/mtransport/build/moz.build @@ -32,4 +32,7 @@ include('../common.build') # nr_socket_short_term_violation_time. SOURCES += mtransport_cppsrcs +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + FINAL_LIBRARY = 'xul' diff --git a/modules/brotli/moz.build b/modules/brotli/moz.build index 95445ce5b7..b2b87b40ac 100644 --- a/modules/brotli/moz.build +++ b/modules/brotli/moz.build @@ -25,6 +25,9 @@ SOURCES += [ 'dec/state.c', ] +if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + NO_VISIBILITY_FLAGS = True + # We allow warnings for third-party code that can be updated from upstream. ALLOW_COMPILER_WARNINGS = True @@ -36,6 +39,8 @@ CFLAGS += ['-DBROTLI_BUILD_PORTABLE'] Library('brotli') +FINAL_LIBRARY = 'gkmedias' + HostProgram('brotli') HOST_SOURCES += SOURCES diff --git a/old-configure.in b/old-configure.in index 32d03d4104..a018fb29f7 100644 --- a/old-configure.in +++ b/old-configure.in @@ -4566,8 +4566,16 @@ dnl = dnl ======================================================== MOZ_ARG_HEADER(Static build options) +if test "$OS_ARCH" = "WINNT"; then + GKMEDIAS_SHARED_LIBRARY=1 +fi +if test -n "$GKMEDIAS_SHARED_LIBRARY"; then + AC_DEFINE(GKMEDIAS_SHARED_LIBRARY) +fi +AC_SUBST(GKMEDIAS_SHARED_LIBRARY) + if test -z "$MOZ_SYSTEM_ZLIB"; then -if test -n "$JS_SHARED_LIBRARY"; then +if test -n "$JS_SHARED_LIBRARY" -o "$GKMEDIAS_SHARED_LIBRARY"; then ZLIB_IN_MOZGLUE=1 AC_DEFINE(ZLIB_IN_MOZGLUE) fi From 6b3767c4434b010b0cab9aa1fa084f3cfd963ee2 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Sun, 3 Jan 2021 21:45:04 +0000 Subject: [PATCH 02/17] Issue #61 - Place Skia in libxul Skia does some nasty things that break with DLL calls like having virtual dtors without a body definition (and it's honestly surprising that it even builds to begin with the way it's done, but apparently they use some linking symbol voodoo to work around that in dependent classes). Not wanting to have to pull Google code apart to try and fix that for something we're only using for canvas anyway, it's better to just let Skia reside in libxul instead. --- gfx/skia/moz.build | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build index ad31c8d484..1b1c642a6b 100644 --- a/gfx/skia/moz.build +++ b/gfx/skia/moz.build @@ -646,7 +646,8 @@ else: # We allow warnings for third-party code that can be updated from upstream. ALLOW_COMPILER_WARNINGS = True -FINAL_LIBRARY = 'gkmedias' +FINAL_LIBRARY = 'xul' + LOCAL_INCLUDES += [ 'skia/include/c', 'skia/include/config', @@ -693,11 +694,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 'skia/src/fonts/SkRemotableFontMgr.cpp', ] -if CONFIG['GKMEDIAS_SHARED_LIBRARY']: - DEFINES['SKIA_DLL'] = 1 - DEFINES['GR_DLL'] = 1 - DEFINES['SK_FONT_HOST_USE_SYSTEM_SETTINGS'] = 1 - # We should autogenerate these SSE related flags. if CONFIG['_MSC_VER']: From 924bf92e4bb7c843514dc9a2079077f09280d95e Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sun, 3 Jan 2021 23:40:35 -0500 Subject: [PATCH 03/17] Issue #61 - Add configure option for non-windows platforms Windows will ALWAYS have this enabled but we eventually want all target operating systems to use this as well but that will require more work --- build/moz.configure/old.configure | 1 + old-configure.in | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure index 3186c2c76a..7953ac6232 100644 --- a/build/moz.configure/old.configure +++ b/build/moz.configure/old.configure @@ -226,6 +226,7 @@ def old_configure_options(*options): '--enable-safe-browsing', '--enable-sandbox', '--enable-security-sqlstore', + '--enable-shared-media', '--enable-signmar', '--enable-simulator', '--enable-small-chunk-size', diff --git a/old-configure.in b/old-configure.in index a018fb29f7..aaabbba288 100644 --- a/old-configure.in +++ b/old-configure.in @@ -4566,19 +4566,31 @@ dnl = dnl ======================================================== MOZ_ARG_HEADER(Static build options) +# Option to enable shared gkmedias on other target operating systems. +# This is overriden for Windows regardless if it is set or not. +MOZ_ARG_ENABLE_BOOL(shared-media, +[ --enable-shared-media Build GKMedias as a shared lib], + GKMEDIAS_SHARED_LIBRARY=1, + GKMEDIAS_SHARED_LIBRARY=) + +# We want gkmedias always be enabled on Windows regardless of the enable bool. if test "$OS_ARCH" = "WINNT"; then GKMEDIAS_SHARED_LIBRARY=1 fi + if test -n "$GKMEDIAS_SHARED_LIBRARY"; then AC_DEFINE(GKMEDIAS_SHARED_LIBRARY) fi + AC_SUBST(GKMEDIAS_SHARED_LIBRARY) +# Shared JS or gkmedias needs zlib in mozglue if test -z "$MOZ_SYSTEM_ZLIB"; then -if test -n "$JS_SHARED_LIBRARY" -o "$GKMEDIAS_SHARED_LIBRARY"; then - ZLIB_IN_MOZGLUE=1 - AC_DEFINE(ZLIB_IN_MOZGLUE) -fi + # XXX: Currently JS_SHARED_LIBRARY lives in mozconfigure + if test -n "$JS_SHARED_LIBRARY" -o "$GKMEDIAS_SHARED_LIBRARY"; then + ZLIB_IN_MOZGLUE=1 + AC_DEFINE(ZLIB_IN_MOZGLUE) + fi fi AC_SUBST(ZLIB_IN_MOZGLUE) From c85f28b0c0c932eac8b33fc22cc4e1068847b12a Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sun, 3 Jan 2021 23:41:17 -0500 Subject: [PATCH 04/17] Issue #61 - Add missing external symbol cubeb_set_log_callback to gkmedias symbols.def --- layout/media/symbols.def.in | 1 + 1 file changed, 1 insertion(+) diff --git a/layout/media/symbols.def.in b/layout/media/symbols.def.in index c7cba45183..6a940cd75b 100644 --- a/layout/media/symbols.def.in +++ b/layout/media/symbols.def.in @@ -139,6 +139,7 @@ cubeb_get_backend_id cubeb_get_max_channel_count cubeb_get_min_latency cubeb_get_preferred_sample_rate +cubeb_set_log_callback cubeb_stream_destroy cubeb_stream_get_position cubeb_stream_init From 6b510a74e72b5b6d807a8f88376bd4ecc1101e48 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Mon, 4 Jan 2021 03:43:58 -0500 Subject: [PATCH 05/17] Issue #61 - Add missing external symbols for gkmedias when WebRTC is built --- layout/media/symbols.def.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/layout/media/symbols.def.in b/layout/media/symbols.def.in index 6a940cd75b..6e2364f51a 100644 --- a/layout/media/symbols.def.in +++ b/layout/media/symbols.def.in @@ -64,6 +64,10 @@ vpx_codec_get_cx_data vpx_codec_enc_config_default vpx_img_alloc vpx_codec_encode +#ifdef MOZ_WEBRTC +vpx_codec_set_frame_buffer_functions +vpx_codec_enc_init_multi_ver +#endif #ifdef MOZ_AV1 aom_codec_av1_dx aom_codec_dec_init_ver @@ -134,6 +138,10 @@ moz_speex_resampler_skip_zeros moz_speex_resampler_set_skip_frac_num moz_speex_resampler_reset_mem cubeb_destroy +#ifdef MOZ_WEBRTC +cubeb_device_collection_destroy +cubeb_enumerate_devices +#endif cubeb_init cubeb_get_backend_id cubeb_get_max_channel_count @@ -183,6 +191,14 @@ opus_encoder_destroy opus_encoder_ctl opus_encode opus_encode_float +#ifdef MOZ_WEBRTC +opus_custom_mode_create +opus_packet_parse +opus_packet_get_nb_channels +downmix_int +tonality_analysis_init +run_analysis +#endif #ifndef MOZ_NATIVE_PNG MOZ_APNG_get_first_frame_is_hidden MOZ_APNG_get_next_frame_blend_op From b171da18f99552f0168469855a8a735af1044a0e Mon Sep 17 00:00:00 2001 From: Job Bautista Date: Thu, 16 Mar 2023 13:51:38 +0800 Subject: [PATCH 06/17] Issue #62 - Get --enable-shared-js and --enable-export-js working again, and fix link bustage related to ICU when doing shared lib --- js/src/moz.build | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/js/src/moz.build b/js/src/moz.build index 7a2d896600..e14d59b350 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -611,11 +611,15 @@ if CONFIG['JS_SHARED_LIBRARY']: GeckoSharedLibrary('js', linkage=None) SHARED_LIBRARY_NAME = CONFIG['JS_LIBRARY_NAME'] SDK_LIBRARY = True + if CONFIG['MOZ_ICU_DATA_ARCHIVE']: + USE_LIBS += [ + 'icudata', + ] else: Library('js') - -FORCE_STATIC_LIB = True -STATIC_LIBRARY_NAME = 'js_static' + FORCE_STATIC_LIB = True + STATIC_LIBRARY_NAME = 'js_static' + NO_EXPAND_LIBS = True if not CONFIG['MOZ_ICU_DATA_ARCHIVE']: USE_LIBS += [ @@ -660,8 +664,6 @@ if CONFIG['OS_ARCH'] == 'SunOS': OS_LIBS += CONFIG['REALTIME_LIBS'] -NO_EXPAND_LIBS = True - DIST_INSTALL = True # Prepare self-hosted JS code for embedding From 2c8387f4fa5c85e9b15ab86848eb1c6a6b45e83b Mon Sep 17 00:00:00 2001 From: Job Bautista Date: Thu, 16 Mar 2023 13:54:03 +0800 Subject: [PATCH 07/17] Issue #62 - Fix xul.dll link bustage related to MovableCellHasher. The unsafeSet method is based on Jon Coppeard's part 2 patch for Mozilla bug 1306008. This is needed because of the use of unsafeSet in rekey() of MovableCellHasher> --- js/public/RootingAPI.h | 2 ++ js/src/gc/Barrier.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/js/public/RootingAPI.h b/js/public/RootingAPI.h index aec25b0ffe..e03bc56fb7 100644 --- a/js/public/RootingAPI.h +++ b/js/public/RootingAPI.h @@ -277,6 +277,8 @@ class MOZ_NON_MEMMOVABLE Heap : public js::HeapBase> T* unsafeGet() { return &ptr; } + void unsafeSet(const T& newPtr) { ptr = newPtr; } + void set(const T& newPtr) { T tmp = ptr; ptr = newPtr; diff --git a/js/src/gc/Barrier.cpp b/js/src/gc/Barrier.cpp index efb567acbe..e814d92b6f 100644 --- a/js/src/gc/Barrier.cpp +++ b/js/src/gc/Barrier.cpp @@ -182,6 +182,7 @@ MovableCellHasher::match(const Key& k, const Lookup& l) #endif // JS_BROKEN_GCC_ATTRIBUTE_WARNING template struct JS_PUBLIC_API(MovableCellHasher); +template struct JS_PUBLIC_API(MovableCellHasher>); template struct JS_PUBLIC_API(MovableCellHasher); template struct JS_PUBLIC_API(MovableCellHasher); template struct JS_PUBLIC_API(MovableCellHasher); From 6890cdd9a190237a005e480a167ebd166cbea20a Mon Sep 17 00:00:00 2001 From: Job Bautista Date: Thu, 16 Mar 2023 13:58:16 +0800 Subject: [PATCH 08/17] Issue #62 - Fix xul.dll link bustage relating to JSErrorNotes. --- js/src/jsapi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/jsapi.h b/js/src/jsapi.h index 42f80952e6..6438066f9f 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -5440,7 +5440,7 @@ class JSErrorBase /** * Notes associated with JSErrorReport. */ -class JSErrorNotes +class JS_PUBLIC_API(JSErrorNotes) { public: class Note : public JSErrorBase From ed30a9646737ab320889013f479b69417fa9a570 Mon Sep 17 00:00:00 2001 From: Job Bautista Date: Thu, 16 Mar 2023 13:59:19 +0800 Subject: [PATCH 09/17] Issue #62 - Fix xul.dll link bustage related to JS::ubi::DominatorTree. This is the one I don't understand how it fixed the bustage. Why is it needed to remove JS_PUBLIC_API..? It would seem counter-intuitive, but it wasn't... --- js/public/UbiNodeDominatorTree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/public/UbiNodeDominatorTree.h b/js/public/UbiNodeDominatorTree.h index 1b029184c7..5f7e061e54 100644 --- a/js/public/UbiNodeDominatorTree.h +++ b/js/public/UbiNodeDominatorTree.h @@ -66,7 +66,7 @@ namespace ubi { * * [0]: http://www.cs.rice.edu/~keith/EMBED/dom.pdf */ -class JS_PUBLIC_API(DominatorTree) +class DominatorTree { private: // Types. From bad884a7c7f08560855d084c1b33997254ec115f Mon Sep 17 00:00:00 2001 From: Job Bautista Date: Sun, 19 Mar 2023 00:08:48 +0800 Subject: [PATCH 10/17] Issue #2165 - Build ICU as a shared library if we're building Spidermonkey shared. It seems that if we're going to enable JS_SHARED_LIBRARY, we need ICU to be a shared library too in order to prevent code duplication in mozjs.dll bloating it to a whopping 21 MB. This unfortunately means we have to fold icudata back to icu itself. But since icudata is still separated from libxul (which is what really matters for #1451), I think this is a fair compromise. Building ICU as shared is offered as an option via --enable-shared-icu. But technically you really need --enable-shared-icu if you're going to use --enable-shared-js. Unfortunately I can't make configure exit with an error if MOZ_SHARED_ICU is not defined when JS_SHARED_LIBRARY is enabled, because options are controlled by different configure scripts (icu is based on bash, while js is based on python), and I have no idea how to pass MOZ_SHARED_ICU to js's moz.configure. Tag #62 --- build/autoconf/icu.m4 | 15 ++++++++------- build/moz.configure/old.configure | 1 + config/external/icu/moz.build | 5 +++-- intl/unicharutil/util/moz.build | 5 ++++- js/src/moz.build | 26 ++++++++++---------------- old-configure.in | 9 +++++---- 6 files changed, 31 insertions(+), 30 deletions(-) diff --git a/build/autoconf/icu.m4 b/build/autoconf/icu.m4 index 090d6c0a2d..2530f6a69c 100644 --- a/build/autoconf/icu.m4 +++ b/build/autoconf/icu.m4 @@ -34,11 +34,10 @@ if test -n "$USE_ICU"; then ICU_DATA_FILE="icudt${version}l.dat" dnl We won't build ICU data as a separate file when building - dnl JS standalone so that embedders don't have to deal with it. - dnl We also don't do it on Windows because sometimes the file goes - dnl missing -- possibly due to overzealous antivirus software? -- - dnl which prevents the browser from starting up :( - if test -z "$JS_STANDALONE"; then + dnl ICU as a shared library, as we need to fold the data into + dnl the shared library in order for consumers like Spidermonkey + dnl to use it without code duplication. + if test -z "$MOZ_SHARED_ICU"; then MOZ_ICU_DATA_ARCHIVE=1 else MOZ_ICU_DATA_ARCHIVE= @@ -50,13 +49,15 @@ AC_SUBST(ENABLE_INTL_API) AC_SUBST(USE_ICU) AC_SUBST(ICU_DATA_FILE) AC_SUBST(MOZ_ICU_DATA_ARCHIVE) +AC_SUBST(MOZ_SHARED_ICU) if test -n "$USE_ICU"; then if test -z "$YASM" -a -z "$GNU_AS" -a "$COMPILE_ENVIRONMENT"; then AC_MSG_ERROR([Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api]) fi - dnl We build ICU as a static library. - AC_DEFINE(U_STATIC_IMPLEMENTATION) + if test -z "$MOZ_SHARED_ICU"; then + AC_DEFINE(U_STATIC_IMPLEMENTATION) + fi dnl Source files that use ICU should have control over which parts of the ICU dnl namespace they want to use. AC_DEFINE(U_USING_ICU_NAMESPACE,0) diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure index 7953ac6232..fa08574833 100644 --- a/build/moz.configure/old.configure +++ b/build/moz.configure/old.configure @@ -226,6 +226,7 @@ def old_configure_options(*options): '--enable-safe-browsing', '--enable-sandbox', '--enable-security-sqlstore', + '--enable-shared-icu', '--enable-shared-media', '--enable-signmar', '--enable-simulator', diff --git a/config/external/icu/moz.build b/config/external/icu/moz.build index ba95cd0fb3..e403f17c78 100644 --- a/config/external/icu/moz.build +++ b/config/external/icu/moz.build @@ -3,8 +3,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -Library('icu') - DIRS += [ 'common', 'data', @@ -14,5 +12,8 @@ DIRS += [ if CONFIG['MOZ_ICU_DATA_ARCHIVE']: DIRS += ['stubdata'] USE_LIBS += ['icustubdata'] + Library('icu') else: USE_LIBS += ['icudata'] + SharedLibrary('icu') + SHARED_LIBRARY_NAME = 'icu' + CONFIG['MOZ_ICU_VERSION'] diff --git a/intl/unicharutil/util/moz.build b/intl/unicharutil/util/moz.build index cd32738134..64d455f91c 100644 --- a/intl/unicharutil/util/moz.build +++ b/intl/unicharutil/util/moz.build @@ -24,7 +24,10 @@ include('objs.mozbuild') UNIFIED_SOURCES += intl_unicharutil_util_cppsrcs -Library('unicharutil_external_s') +# This line breaks building ICU as a shared library due to a +# SandboxValidationError from the frontend reader. +if not CONFIG['MOZ_SHARED_ICU']: + Library('unicharutil_external_s') FORCE_STATIC_LIB = True diff --git a/js/src/moz.build b/js/src/moz.build index e14d59b350..115747daaf 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -611,27 +611,21 @@ if CONFIG['JS_SHARED_LIBRARY']: GeckoSharedLibrary('js', linkage=None) SHARED_LIBRARY_NAME = CONFIG['JS_LIBRARY_NAME'] SDK_LIBRARY = True - if CONFIG['MOZ_ICU_DATA_ARCHIVE']: - USE_LIBS += [ - 'icudata', - ] + USE_LIBS += [ + 'icu', + ] else: Library('js') FORCE_STATIC_LIB = True STATIC_LIBRARY_NAME = 'js_static' NO_EXPAND_LIBS = True - -if not CONFIG['MOZ_ICU_DATA_ARCHIVE']: - USE_LIBS += [ - 'icu', - ] -else: - # Linking 'icu' will pull in the stubdata library, - # which the shell doesn't want, so link the other bits. - USE_LIBS += [ - 'icui18n', - 'icuuc', - ] + if CONFIG['MOZ_ICU_DATA_ARCHIVE']: + # Linking 'icu' will pull in the stubdata library, + # which the shell doesn't want, so link the other bits. + USE_LIBS += [ + 'icui18n', + 'icuuc', + ] USE_LIBS += [ 'nspr', diff --git a/old-configure.in b/old-configure.in index aaabbba288..64e0dbc844 100644 --- a/old-configure.in +++ b/old-configure.in @@ -5144,12 +5144,13 @@ AC_SUBST(WIN32_REDIST_DIR) AC_SUBST(WIN_UCRT_REDIST_DIR) dnl ======================================================== -dnl ICU Support +dnl ICU Shared Library Support dnl ======================================================== -if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then - USE_ICU=1 -fi +MOZ_ARG_ENABLE_BOOL(shared-icu, +[ --enable-shared-icu Build ICU as a shared library], + MOZ_SHARED_ICU=1, + MOZ_SHARED_ICU=) MOZ_CONFIG_ICU() From 18e43fad293b40ec6a2fe0d36b35c99f47c25115 Mon Sep 17 00:00:00 2001 From: Job Bautista Date: Fri, 24 Mar 2023 17:51:39 +0800 Subject: [PATCH 11/17] Issue #2165 - Follow-up: Always build ICU as shared lib in Windows. --- old-configure.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/old-configure.in b/old-configure.in index 64e0dbc844..bc4f9f768f 100644 --- a/old-configure.in +++ b/old-configure.in @@ -5152,6 +5152,11 @@ MOZ_ARG_ENABLE_BOOL(shared-icu, MOZ_SHARED_ICU=1, MOZ_SHARED_ICU=) +# We want shared ICU to always be enabled on Windows regardless of the enable bool. +if test "$OS_ARCH" = "WINNT"; then + MOZ_SHARED_ICU=1 +fi + MOZ_CONFIG_ICU() dnl Echo the CFLAGS to remove extra whitespace. From 9ff14017e5cbbc592eacaf5101c306dc45bd3ea6 Mon Sep 17 00:00:00 2001 From: Job Bautista Date: Fri, 24 Mar 2023 19:59:31 +0800 Subject: [PATCH 12/17] Issue #324 - Follow-up: Remove more traces of *INTL_API. The trace in Spidermonkey's old-configure is causing the MOZ_CONFIG_ICU function to be called twice, which is not desirable as it can cause the MOZ_SHARED_ICU check in build/autoconf/icu.m4 to fail and build an ICU data file even if we're building ICU as a shared library. --- build/autoconf/icu.m4 | 1 - js/src/old-configure.in | 9 --------- old-configure.in | 4 ---- 3 files changed, 14 deletions(-) diff --git a/build/autoconf/icu.m4 b/build/autoconf/icu.m4 index 2530f6a69c..3d233baf8f 100644 --- a/build/autoconf/icu.m4 +++ b/build/autoconf/icu.m4 @@ -45,7 +45,6 @@ if test -n "$USE_ICU"; then fi AC_SUBST(MOZ_ICU_VERSION) -AC_SUBST(ENABLE_INTL_API) AC_SUBST(USE_ICU) AC_SUBST(ICU_DATA_FILE) AC_SUBST(MOZ_ICU_DATA_ARCHIVE) diff --git a/js/src/old-configure.in b/js/src/old-configure.in index 1232c2b10f..01a272bd4c 100644 --- a/js/src/old-configure.in +++ b/js/src/old-configure.in @@ -2128,15 +2128,6 @@ AC_SUBST(MOZ_PKG_SPECIAL) AC_SUBST(MOZILLA_OFFICIAL) AC_SUBST(MC_OFFICIAL) -dnl ======================================================== -dnl ECMAScript Internationalization API Support (uses ICU) -dnl ======================================================== - -dnl top-level configure may override this with --without-intl-api -_INTL_API=yes - -MOZ_CONFIG_ICU() - dnl Echo the CFLAGS to remove extra whitespace. CFLAGS=`echo \ $_WARNINGS_CFLAGS \ diff --git a/old-configure.in b/old-configure.in index bc4f9f768f..8f2381b81c 100644 --- a/old-configure.in +++ b/old-configure.in @@ -5527,10 +5527,6 @@ ac_configure_args="$_SUBDIR_CONFIG_ARGS" # and $NSPR_LIBS. ac_configure_args="`echo $ac_configure_args | sed -e 's/--with-system-nspr\S* *//'`" -if test "$_INTL_API" = no; then - ac_configure_args="$ac_configure_args --without-intl-api" -fi - if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then ac_configure_args="$ac_configure_args --with-nspr-cflags='$NSPR_CFLAGS'" ac_configure_args="$ac_configure_args --with-nspr-libs='$NSPR_LIBS'" From f09b0002ee9a1c5916809f8269a7379e5da81c12 Mon Sep 17 00:00:00 2001 From: Job Bautista Date: Sun, 26 Mar 2023 13:14:10 +0800 Subject: [PATCH 13/17] Issue #2165 - Disable LNK4217 and LNK4286 warnings when linking ICU as they're too spammy. --- config/external/icu/moz.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/external/icu/moz.build b/config/external/icu/moz.build index e403f17c78..6b0cc1a332 100644 --- a/config/external/icu/moz.build +++ b/config/external/icu/moz.build @@ -17,3 +17,9 @@ else: USE_LIBS += ['icudata'] SharedLibrary('icu') SHARED_LIBRARY_NAME = 'icu' + CONFIG['MOZ_ICU_VERSION'] + # Linking ICU gets too spammy in warnings with MSVC + if CONFIG['_MSC_VER'] and not CONFIG['CLANG_CL']: + LDFLAGS += [ + '/IGNORE:4217', # symbol defined in $1.obj is defined in $2.obj + '/IGNORE:4286', # similar with LNK4217 + ] From 66eaa872f8b511955a09a8e39b7dbafd56d29ce5 Mon Sep 17 00:00:00 2001 From: Job Bautista Date: Sun, 26 Mar 2023 13:14:59 +0800 Subject: [PATCH 14/17] Issue #62 - Always build Spidermonkey as shared lib in Windows. Shared JS is confirmed working fine in Windows after a week of testing. Non-Windows will have to wait unfortunately. The JS_SHARED_LIBRARY option is kept for easy testing on those unsupported platforms. --- js/moz.configure | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/js/moz.configure b/js/moz.configure index 7687731f99..f632edafec 100644 --- a/js/moz.configure +++ b/js/moz.configure @@ -44,8 +44,11 @@ js_option('--disable-shared-js', default=building_js, js_option('--disable-export-js', default=building_js, help='Do not mark JS symbols as DLL exported/visible') -@depends('--disable-shared-js', '--disable-export-js') -def shared_js(shared_js, export_js): +@depends('--disable-shared-js', '--disable-export-js', target) +def shared_js(shared_js, export_js, target): + # We want shared JS always be enabled on Windows regardless of the enable bool. + if target.os == 'WINNT': + return True if shared_js: if not export_js: die('Must export JS symbols when building a shared library.') @@ -61,16 +64,18 @@ def exportable_js_api(shared_js, export_js): set_define('STATIC_EXPORTABLE_JS_API', exportable_js_api) -@depends('--disable-shared-js', '--disable-export-js') -def static_js_api(shared_js, export_js): - if not shared_js and not export_js: +@depends('--disable-shared-js', '--disable-export-js', target) +def static_js_api(shared_js, export_js, target): + # Do not build JS as a static library on Windows, regardless of enable bool. + if (target.os != 'WINNT') and not shared_js and not export_js: return True set_define('STATIC_JS_API', static_js_api) -@depends('--disable-shared-js') -def static_js(value): - if not value: +@depends('--disable-shared-js', target) +def static_js(value, target): + # Do not build JS as a static library on Windows, regardless of enable bool. + if (target.os != 'WINNT') and not value: return True set_define('MOZ_STATIC_JS', static_js) From e6ed122e1a82e4da7d0c6a7cbb6feed57ef68755 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Mon, 4 Jan 2021 01:52:15 -0500 Subject: [PATCH 15/17] [Basilisk] Issue MoonchildProductions/UXP#61 - Add gkmedias to package-manifest --- application/basilisk/installer/Makefile.in | 4 ++++ application/basilisk/installer/package-manifest.in | 3 +++ 2 files changed, 7 insertions(+) diff --git a/application/basilisk/installer/Makefile.in b/application/basilisk/installer/Makefile.in index 64273609ab..83fa01518f 100644 --- a/application/basilisk/installer/Makefile.in +++ b/application/basilisk/installer/Makefile.in @@ -84,6 +84,10 @@ ifdef NECKO_WIFI DEFINES += -DNECKO_WIFI endif +ifdef GKMEDIAS_SHARED_LIBRARY +DEFINES += -DGKMEDIAS_SHARED_LIBRARY +endif + ifdef MAKENSISU DEFINES += -DHAVE_MAKENSISU=1 endif diff --git a/application/basilisk/installer/package-manifest.in b/application/basilisk/installer/package-manifest.in index c650e16954..f2f75a5275 100644 --- a/application/basilisk/installer/package-manifest.in +++ b/application/basilisk/installer/package-manifest.in @@ -70,6 +70,9 @@ #ifndef MOZ_STATIC_JS @BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@ #endif +#ifdef GKMEDIAS_SHARED_LIBRARY +@BINPATH@/@DLL_PREFIX@gkmedias@DLL_SUFFIX@ +#endif #ifndef MOZ_SYSTEM_NSPR #ifndef MOZ_FOLD_LIBS @BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@ From d7a12095818fc20d884824611bd93219dd3b87e0 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Mon, 4 Jan 2021 01:51:42 -0500 Subject: [PATCH 16/17] [Pale-Moon] Issue MoonchildProductions/UXP#61 - Add gkmedias back to package-manifest --- application/palemoon/installer/package-manifest.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/palemoon/installer/package-manifest.in b/application/palemoon/installer/package-manifest.in index 9db9f394ea..7c56d17f88 100644 --- a/application/palemoon/installer/package-manifest.in +++ b/application/palemoon/installer/package-manifest.in @@ -63,6 +63,9 @@ #ifndef MOZ_STATIC_JS @BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@ #endif +#ifdef GKMEDIAS_SHARED_LIBRARY +@BINPATH@/@DLL_PREFIX@gkmedias@DLL_SUFFIX@ +#endif #ifndef MOZ_SYSTEM_NSPR #ifndef MOZ_FOLD_LIBS @BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@ From f284afab44b9819fe9c735dee44faae5ebb5a36b Mon Sep 17 00:00:00 2001 From: Job Bautista Date: Sun, 19 Mar 2023 00:25:08 +0800 Subject: [PATCH 17/17] [Pale-Moon] Issue MoonchildProductions/UXP#2165 - Support ICU as shared library in packaging. Also removing obsolete MOZ_SYSTEM_ICU --- application/palemoon/installer/Makefile.in | 4 ++-- application/palemoon/installer/package-manifest.in | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/application/palemoon/installer/Makefile.in b/application/palemoon/installer/Makefile.in index 770ab9ba74..0547108488 100644 --- a/application/palemoon/installer/Makefile.in +++ b/application/palemoon/installer/Makefile.in @@ -136,8 +136,8 @@ AB = $(firstword $(subst -, ,$(AB_CD))) DEFINES += -DAB=$(AB) DEFINES += -DMOZ_ICU_VERSION=$(MOZ_ICU_VERSION) -ifdef MOZ_SYSTEM_ICU -DEFINES += -DMOZ_SYSTEM_ICU +ifdef MOZ_SHARED_ICU +DEFINES += -DMOZ_SHARED_ICU endif ifdef MOZ_ICU_DATA_ARCHIVE DEFINES += -DMOZ_ICU_DATA_ARCHIVE diff --git a/application/palemoon/installer/package-manifest.in b/application/palemoon/installer/package-manifest.in index 7c56d17f88..eee4f4699c 100644 --- a/application/palemoon/installer/package-manifest.in +++ b/application/palemoon/installer/package-manifest.in @@ -89,6 +89,15 @@ #ifdef MOZ_ICU_DATA_ARCHIVE @RESPATH@/@ICU_DATA_FILE@ #endif +#ifdef MOZ_SHARED_ICU +#ifdef XP_WIN +@BINPATH@/icu@MOZ_ICU_VERSION@.dll +#elif defined(XP_MACOSX) +@BINPATH@/icu@MOZ_ICU_VERSION@.dylib +#elif defined(XP_UNIX) +@BINPATH@/libicu@MOZ_ICU_VERSION@.so +#endif +#endif #ifdef MOZ_GTK3 @BINPATH@/@DLL_PREFIX@mozgtk@DLL_SUFFIX@ @BINPATH@/gtk2/@DLL_PREFIX@mozgtk@DLL_SUFFIX@