



REM Environment variables:
set TT_MOZ_SRC_DIR=%BUILDDIR%
set TT_PATCH_DIR=E:\Mozilla\tete009_patch\tete\Fx58.0




REM force link tmemutil.dll:
patch --dry-run -N %TT_MOZ_SRC_DIR%\toolkit\xre\nsWindowsWMain.cpp %TT_PATCH_DIR%\nsWindowsWMain.cpp.patch




REM add PROFILE_GEN_SCRIPT for custom profiling:
patch --dry-run -N %TT_MOZ_SRC_DIR%\Makefile.in %TT_PATCH_DIR%\Makefile.in.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\old-configure.in %TT_PATCH_DIR%\old-configure.in.patch




REM run PGO profiling in safe mode (-PogoSafeMode), and add configuration switches:
patch --dry-run -N %TT_MOZ_SRC_DIR%\build\moz.configure\toolchain.configure %TT_PATCH_DIR%\toolchain.configure.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\nsprpub\configure.in %TT_PATCH_DIR%\nsprpub_configure.in.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\nsprpub\configure %TT_PATCH_DIR%\nsprpub_configure.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\security\nss\coreconf\WIN32.mk %TT_PATCH_DIR%\security_nss_coreconf_WIN32.mk.patch




REM define restricted pointer attribute:
patch --dry-run -N %TT_MOZ_SRC_DIR%\mfbt\Attributes.h %TT_PATCH_DIR%\Attributes.h.patch




REM string:
patch --dry-run -N %TT_MOZ_SRC_DIR%\xpcom\string\nsCharTraits.h %TT_PATCH_DIR%\nsCharTraits.h.patch

REM pl double hashing:
patch --dry-run -N %TT_MOZ_SRC_DIR%\xpcom\ds\PLDHashTable.cpp %TT_PATCH_DIR%\PLDHashTable.cpp.patch

REM nsDeque::Empty():
patch --dry-run -N %TT_MOZ_SRC_DIR%\xpcom\ds\nsDeque.cpp %TT_PATCH_DIR%\nsDeque.cpp.patch




REM avoid optimizer bug with MSVC PGO (Bug 595653):
patch --dry-run -N %TT_MOZ_SRC_DIR%\js\src\Makefile.in %TT_PATCH_DIR%\js_src_Makefile.in.patch




REM gklayout:
patch --dry-run -N %TT_MOZ_SRC_DIR%\layout\generic\ReflowInput.cpp %TT_PATCH_DIR%\ReflowInput.cpp.patch

REM avoid the fatal error C1001 of compiler when applying PGO:
patch --dry-run -N %TT_MOZ_SRC_DIR%\layout\style\nsCSSDataBlock.cpp %TT_PATCH_DIR%\nsCSSDataBlock.cpp.patch

REM avoid crash at the time of printing when applying PGO:
patch --dry-run -N %TT_MOZ_SRC_DIR%\layout\generic\nsContainerFrame.cpp %TT_PATCH_DIR%\nsContainerFrame.cpp.patch




REM libpixman:
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\cairo\libpixman\src\moz.build %TT_PATCH_DIR%\libpixman_moz.build.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\cairo\libpixman\src\pixman-private.h %TT_PATCH_DIR%\pixman-private.h.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\cairo\libpixman\src\pixman-implementation.c %TT_PATCH_DIR%\pixman-implementation.c.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\cairo\libpixman\src\pixman-edge.c %TT_PATCH_DIR%\pixman-edge.c.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\cairo\libpixman\src\pixman-sse2.c %TT_PATCH_DIR%\pixman-sse2.c.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\cairo\libpixman\src\pixman-trap.c %TT_PATCH_DIR%\pixman-trap.c.patch




REM brush caches for cairo d2d:
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\cairo\cairo\src\cairo-d2d-private.h %TT_PATCH_DIR%\cairo-d2d-private.h.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\cairo\cairo\src\cairo-d2d-surface.cpp %TT_PATCH_DIR%\cairo-d2d-surface.cpp.patch




REM NULL pointer check for entry->GetRequest():
patch --dry-run -N %TT_MOZ_SRC_DIR%\image\imgLoader.cpp %TT_PATCH_DIR%\imgLoader.cpp.patch




REM 2D:
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\2d\2D.h %TT_PATCH_DIR%\2D.h.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\2d\Factory.cpp %TT_PATCH_DIR%\Factory.cpp.patch




REM call To***Pixels instead of ScaleTo***Pixels, if possible:
patch --dry-run -N %TT_MOZ_SRC_DIR%\layout\painting\FrameLayerBuilder.h %TT_PATCH_DIR%\FrameLayerBuilder.h.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\layout\painting\FrameLayerBuilder.cpp %TT_PATCH_DIR%\FrameLayerBuilder.cpp.patch

REM use SSE4.1 in some functions of nsRect, if available:
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\2d\BaseRect.h %TT_PATCH_DIR%\BaseRect.h.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\2d\Rect.h %TT_PATCH_DIR%\Rect.h.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\src\nsRect.h %TT_PATCH_DIR%\nsRect.h.patch

REM nsRegion::Area():
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\src\nsRegion.cpp %TT_PATCH_DIR%\nsRegion.cpp.patch




REM qcms:
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\qcms\moz.build %TT_PATCH_DIR%\qcms_moz.build.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\gfx\qcms\transform-sse2.c %TT_PATCH_DIR%\transform-sse2.c.patch




REM content:
patch --dry-run -N %TT_MOZ_SRC_DIR%\dom\base\nsContentUtils.cpp %TT_PATCH_DIR%\nsContentUtils.cpp.patch




REM prefetch:
patch --dry-run -N %TT_MOZ_SRC_DIR%\layout\style\nsStyleStruct.cpp %TT_PATCH_DIR%\nsStyleStruct.cpp.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\layout\generic\nsLineBox.h %TT_PATCH_DIR%\nsLineBox.h.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\dom\base\nsAttrAndChildArray.h %TT_PATCH_DIR%\nsAttrAndChildArray.h.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\dom\base\Element.h %TT_PATCH_DIR%\Element.h.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\layout\generic\nsFrame.cpp %TT_PATCH_DIR%\nsFrame.cpp.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\layout\style\nsCSSRuleProcessor.cpp %TT_PATCH_DIR%\nsCSSRuleProcessor.cpp.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\layout\xul\nsBoxFrame.cpp %TT_PATCH_DIR%\nsBoxFrame.cpp.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\layout\generic\nsBlockFrame.cpp %TT_PATCH_DIR%\nsBlockFrame.cpp.patch




REM plug-in:
patch --dry-run -N %TT_MOZ_SRC_DIR%\dom\plugins\base\nsPluginNativeWindowWin.cpp %TT_PATCH_DIR%\nsPluginNativeWindowWin.cpp.patch




REM make NS_ASSERT() the same behavior as official builds:
patch --dry-run -N %TT_MOZ_SRC_DIR%\toolkit\modules\debug.js %TT_PATCH_DIR%\debug.js.patch




REM avoid an error LNK1120 for tete009 builds:
patch --dry-run -N %TT_MOZ_SRC_DIR%\security\nss\lib\freebl\Makefile %TT_PATCH_DIR%\freebl_Makefile.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\security\nss\lib\freebl\manifest.mn %TT_PATCH_DIR%\freebl_manifest.mn.patch




REM apply the patch of bug 526038 to avoid crash:
patch --dry-run -N %TT_MOZ_SRC_DIR%\image\decoders\icon\win\nsIconChannel.cpp %TT_PATCH_DIR%\nsIconChannel.cpp.patch




REM jemalloc:
patch --dry-run -N %TT_MOZ_SRC_DIR%\mozglue\build\mozglue.def.in %TT_PATCH_DIR%\mozglue.def.in.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\memory\build\mozjemalloc.cpp %TT_PATCH_DIR%\mozjemalloc.cpp.patch




REM nsWindow & WinUtils:
patch --dry-run -N %TT_MOZ_SRC_DIR%\widget\windows\nsWindow.cpp %TT_PATCH_DIR%\nsWindow.cpp.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\widget\windows\WinUtils.cpp %TT_PATCH_DIR%\WinUtils.cpp.patch




REM set MOZ_UA_BUILDID=20100101:
patch --dry-run -N %TT_MOZ_SRC_DIR%\browser\branding\aurora\configure.sh %TT_PATCH_DIR%\branding_aurora_configure.sh.patch
patch --dry-run -N %TT_MOZ_SRC_DIR%\browser\branding\nightly\configure.sh %TT_PATCH_DIR%\branding_nightly_configure.sh.patch




REM add parallel_invoke() function:
patch --dry-run -N %TT_MOZ_SRC_DIR%\mozglue\build\moz.build %TT_PATCH_DIR%\mozglue_build_moz.build.patch
patch --dry-run -N -p1 -d %TT_MOZ_SRC_DIR%\ < %TT_PATCH_DIR%\parallel_invoke.patch




REM avoid crash with VC2013:
patch --dry-run -N %TT_MOZ_SRC_DIR%\js\xpconnect\src\XPCWrappedNative.cpp %TT_PATCH_DIR%\XPCWrappedNative.cpp.patch




REM avoid compile error for mozilla48:
patch --dry-run -N %TT_MOZ_SRC_DIR%\dom\canvas\WebGLTypes.h %TT_PATCH_DIR%\WebGLTypes.h.patch




