-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: LIU Hao <lh_mouse@126.com>
- Loading branch information
Showing
13 changed files
with
208 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@echo off | ||
|
||
call mingw ucrt64 | ||
bash build_nano-win.sh x86_64 | ||
|
||
call mingw 32 | ||
bash build_nano-win.sh i686 | ||
|
||
bash package_nano-win.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash -e | ||
|
||
_build="$(gcc -v 2>&1 | sed -En 's/^Target: (.*)$/\1/;T;p')" | ||
_host="${1:-x86_64}-w64-mingw32" | ||
_pwd="$(cygpath -am $(pwd) || readlink -f $(pwd))" | ||
_nproc="$(nproc)" | ||
_prefix="$(cygpath -au $(pwd) || readlink -f $(pwd))/pkg_${_host}" | ||
_ncurses_ver="6.4-20240113" | ||
|
||
export CPPFLAGS="-D__USE_MINGW_ANSI_STDIO -I\"${_prefix}/include\"" | ||
export CFLAGS="-O2 -g -masm=att" | ||
export LDFLAGS="-L\"${_prefix}/lib/\" -static" | ||
export LIBS="-lshlwapi" | ||
|
||
export PKG_CONFIG=false # always fails | ||
export NCURSESW_CFLAGS="-I\"${_prefix}/include/ncursesw\" -DNCURSES_STATIC" | ||
export NCURSESW_LIBS="-lncursesw" | ||
|
||
wget -c "https://invisible-island.net/archives/ncurses/current/ncurses-${_ncurses_ver}.tgz" | ||
tar -xzvf ncurses-${_ncurses_ver}.tgz | ||
./autogen.sh | ||
|
||
mkdir -p "${_pwd}/build_${_host}" | ||
pushd "${_pwd}/build_${_host}" | ||
|
||
mkdir -p "ncurses" | ||
pushd "ncurses" | ||
../../ncurses-${_ncurses_ver}/configure \ | ||
--build="${_build}" --host="${_host}" --prefix="${_prefix}" \ | ||
--disable-dependency-tracking \ | ||
--enable-{widec,sp-funcs,termcap,term-driver,interop} \ | ||
--disable-{shared,database,rpath,home-terminfo,db-install,getcap} \ | ||
--without-{ada,cxx-binding,manpages,pthread,debug,tests,libtool,progs} | ||
make -j"${_nproc}" | ||
make install | ||
popd | ||
|
||
mkdir -p "nano" | ||
pushd "nano" | ||
touch roll-a-release.sh # enable use of `git describe` | ||
../../configure \ | ||
--build="${_build}" --host="${_host}" --prefix="${_prefix}" \ | ||
--disable-dependency-tracking \ | ||
--enable-{color,utf8,nanorc} --disable-{nls,speller,threads,rpath} | ||
make -j"${_nproc}" | ||
make install-strip | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash -e | ||
|
||
_pkgversion="$(git describe --tags || echo "v0.0.0-0-unknown")" | ||
_revision="$(git rev-list --count HEAD)" | ||
|
||
strip -s pkg_{i686,x86_64}-w64-mingw32/bin/nano.exe | ||
cp doc/sample.nanorc.in .nanorc | ||
7z a -aoa -mmt"$(nproc)" -- \ | ||
"nano-win_${_revision}_${_pkgversion}.7z" \ | ||
pkg_{i686,x86_64}-w64-mingw32/{bin/nano.exe,share/{nano,doc}/} \ | ||
.nanorc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.