6f37d34920
Aligns the zstd NSIS wrapper directory with the naming convention used by
all other bundle directories (versions/25.01-bundle, 26.00-bundle, etc.).
Changes:
- git mv versions/zstd -> versions/zstd-bundle (20 project-owned files)
- Fix UI/NSIS/StdAfx.h: use relative include ../../Bundles/Nsis7z/pluginapi.h
instead of absolute-style 7zip/Bundles/Nsis7z/pluginapi.h (portable across
both Linux and Windows builds without extra include path)
Build tool updates:
- tools/legacy/build_plugin_zstd_vs2026.py: updated project_dir path
- tools/linux/build_plugin_linux.py:
* VERSION_LAYOUT zstd: zstd -> zstd-bundle
* VERSION_EXTRA_FLAGS zstd: -Wno-sign-compare -Wno-cast-function-type
(fast-lzma2 C vendor code)
* VERSION_EXTRA_CXXFLAGS zstd: -Wno-unused-parameter (NSIS wrapper)
* EXTRA_SYS_OBJS: inject MyWindows.o for zstd (LocalFileTimeToFileTime2)
* Remove 'zip_version != zstd' exception; auto-recreate symlinks for all
bundle versions including zstd
- tools/linux/setup_bundle_symlinks.py: add VENDOR_DIR mapping so 'zstd'
points to versions/7-zip-zstd (not versions/zstd which no longer exists)
- tools/linux/overlay/makefile.gcc: add EXTRA_SYS_OBJS ?= variable so
callers can inject additional objects without modifying the file
Linux build status after this commit:
python3 build_plugin.py --7zip-version zstd -> Build completed (all 3 configs)
122 lines
3.1 KiB
Plaintext
122 lines
3.1 KiB
Plaintext
PROG = nsis7z
|
||
|
||
# Path to the vendor CPP/7zip tree. Override from the command line for
|
||
# out-of-tree builds (e.g. zstd variant whose sources live in a separate
|
||
# submodule directory):
|
||
# make -f .../overlay/makefile.gcc VENDOR_7ZIP=/abs/path/7-zip-zstd/CPP/7zip
|
||
VENDOR_7ZIP ?= ../..
|
||
|
||
# Path to the UI/NSIS source directory. For versions where NSIS files live
|
||
# in the vendor tree this defaults to $(VENDOR_7ZIP)/UI/NSIS. Override for
|
||
# bundle-based builds (zstd, 26.01) where UI/NSIS lives in our wrapper dir.
|
||
NSIS_DIR ?= $(VENDOR_7ZIP)/UI/NSIS
|
||
|
||
# DEF file path – may be overridden to an absolute path so that this
|
||
# makefile can be used with -f without writing anything into the vendor tree.
|
||
DEF_FILE ?= Nsis7z.def
|
||
|
||
include $(VENDOR_7ZIP)/Bundles/Format7zF/Arc_gcc.mak
|
||
|
||
ifdef IS_MINGW
|
||
LOCAL_FLAGS_SYS = -DZ7_DEVICE_FILE
|
||
SYS_OBJS = \
|
||
$O/DLL.o \
|
||
$O/DllSecur.o \
|
||
$O/resource.o \
|
||
|
||
else
|
||
SYS_OBJS = \
|
||
$O/MyWindows.o \
|
||
|
||
endif
|
||
|
||
LOCAL_FLAGS += \
|
||
$(LOCAL_FLAGS_SYS) \
|
||
$(LOCAL_FLAGS_EXTRA) \
|
||
|
||
# C++-only extra flags (e.g. -fpermissive for MSVC-only code).
|
||
# Appended to CXXFLAGS_EXTRA which is used exclusively by the C++ compiler.
|
||
CXXFLAGS_EXTRA += $(LOCAL_CXXFLAGS_EXTRA)
|
||
|
||
NSIS_UI_OBJS = \
|
||
$O/NsisMain.o \
|
||
$O/NsisMainAr.o \
|
||
$O/NsisBreak.o \
|
||
$O/NsisExtractCallbackConsole.o \
|
||
$O/NsisUserInputUtils2.o \
|
||
$O/ConsoleOpenCallbackConsole.o \
|
||
$O/ConsolePercentPrinter.o \
|
||
$O/ConsoleClose.o \
|
||
$O/ConsoleUserInputUtils.o \
|
||
$O/Extract.o \
|
||
$O/HashCalc.o \
|
||
$O/OpenArchive.o \
|
||
$O/ArchiveExtractCallback.o \
|
||
$O/ArchiveOpenCallback.o \
|
||
$O/DefaultName.o \
|
||
$O/EnumDirItems.o \
|
||
$O/ExtractingFilePath.o \
|
||
$O/LoadCodecs.o \
|
||
$O/SetProperties.o \
|
||
$O/FileStreams.o \
|
||
$O/FileSystem.o \
|
||
$O/ErrorMsg.o \
|
||
$O/FileLink.o \
|
||
$O/FilePathAutoRename.o \
|
||
$O/SortUtils.o \
|
||
$O/PropIDUtils.o \
|
||
|
||
CURRENT_OBJS = \
|
||
$O/StdInStream.o \
|
||
$O/StdOutStream.o \
|
||
$O/StdAfx2.o \
|
||
$O/pluginapi.o \
|
||
$O/nsis7z.o \
|
||
|
||
# Optional extra system objects – pass from the command line when the vendor
|
||
# requires additional translation units that are normally excluded for mingw
|
||
# (e.g. MyWindows.o for the 7-zip-zstd variant).
|
||
EXTRA_SYS_OBJS ?=
|
||
|
||
OBJS = \
|
||
$(ARC_OBJS) \
|
||
$(SYS_OBJS) \
|
||
$(EXTRA_SYS_OBJS) \
|
||
$(NSIS_UI_OBJS) \
|
||
$(CURRENT_OBJS) \
|
||
|
||
include $(VENDOR_7ZIP)/7zip_gcc.mak
|
||
|
||
$O/NsisMain.o: $(NSIS_DIR)/Main.cpp
|
||
$(CXX) $(CXXFLAGS) $<
|
||
|
||
$O/NsisMainAr.o: $(NSIS_DIR)/MainAr.cpp
|
||
$(CXX) $(CXXFLAGS) $<
|
||
|
||
$O/NsisBreak.o: $(NSIS_DIR)/NSISBreak.cpp
|
||
$(CXX) $(CXXFLAGS) $<
|
||
|
||
$O/NsisExtractCallbackConsole.o: $(NSIS_DIR)/ExtractCallbackConsole.cpp
|
||
$(CXX) $(CXXFLAGS) -include z7_idecl_noexcept_strip.h $<
|
||
|
||
$O/NsisUserInputUtils2.o: $(NSIS_DIR)/UserInputUtils2.cpp
|
||
$(CXX) $(CXXFLAGS) $<
|
||
|
||
$O/ConsoleOpenCallbackConsole.o: $(VENDOR_7ZIP)/UI/Console/OpenCallbackConsole.cpp
|
||
$(CXX) $(CXXFLAGS) $<
|
||
|
||
$O/ConsolePercentPrinter.o: $(VENDOR_7ZIP)/UI/Console/PercentPrinter.cpp
|
||
$(CXX) $(CXXFLAGS) $<
|
||
|
||
$O/ConsoleUserInputUtils.o: $(VENDOR_7ZIP)/UI/Console/UserInputUtils.cpp
|
||
$(CXX) $(CXXFLAGS) $<
|
||
|
||
$O/StdAfx2.o: StdAfx2.cpp
|
||
$(CXX) $(CXXFLAGS) $<
|
||
|
||
$O/pluginapi.o: pluginapi.cpp
|
||
$(CXX) $(CXXFLAGS) $<
|
||
|
||
$O/nsis7z.o: nsis7z.cpp
|
||
$(CXX) $(CXXFLAGS) $<
|