Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use Visual Stdio 2022, catch up Vim 9 #32

Draft
wants to merge 41 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1f17f46
update [email protected]
koron Oct 1, 2022
30b141c
update patches
koron Oct 1, 2022
b10ea35
update contrib
koron Oct 1, 2022
4ba2a09
support VS2022
koron Oct 1, 2022
10bfa34
update patches
koron Oct 1, 2022
8f33315
suppress vcruntiime copy
koron Oct 2, 2022
fae65e9
catch up Vim 9.0.0639
koron Oct 3, 2022
a1b78e2
fix saving Scrtach buffer with name
koron Oct 3, 2022
3360be6
catcn up Vim 9.0.654
koron Oct 4, 2022
6d44f7b
remove an unused debug target
koron Oct 4, 2022
e8e1781
Update kaoriya/doc/CHANGES.md
koron Oct 5, 2022
e9b6f03
catch up Vim 9.0.0662
koron Oct 5, 2022
a4fffba
WIP: update build batch
koron Oct 5, 2022
5ad6957
catch up Vim 9.9.669
koron Oct 6, 2022
1fe72f2
catch up Vim 9.0.0681
koron Oct 7, 2022
52ec390
catch up Vim 9.0.0689
koron Oct 8, 2022
48034ed
catch up Vim 9.0.0701
koron Oct 9, 2022
9db1c96
catch up Vim 9.0.0709
koron Oct 10, 2022
903fb3e
catch up Vim 9.0.0719
koron Oct 11, 2022
15b5300
catch up Vim 9.0.0728
koron Oct 12, 2022
8c5827b
catch up Vim 9.0.0735
koron Oct 13, 2022
7d22fa0
catch up Vim 9.0.0747
koron Oct 15, 2022
a8f881f
catch up Vim 9.0.0752
koron Oct 15, 2022
22091f3
catch up Vim 9.0.0769
koron Oct 16, 2022
ae8c9fd
catch up Vim 9.0.0777
koron Oct 17, 2022
48a522e
catch up Vim 9.0.0785
koron Oct 18, 2022
03dec38
catch up Vim 9.0.0792
koron Oct 19, 2022
4ed9c91
catch up Vim 9.0.0801
koron Oct 20, 2022
aac45a8
catch up Vim 9.0.0809
koron Oct 21, 2022
e2781ce
catch up Vim 9.0.0814?
koron Oct 23, 2022
b74f1d6
freebsd: create tarball as a package
koron Oct 1, 2023
46cf923
doc for FreeBSD
koron Oct 1, 2023
dd18225
use uid and gid
koron Oct 2, 2023
8af07a2
fix default term for FreeBSD
koron Oct 6, 2023
799a27f
update for FreeBSD 14
koron Jan 25, 2024
465cf69
backup old Makefile
koron Jan 25, 2024
90bdba4
work on linux
koron Jan 25, 2024
982aa1a
update patches
koron Feb 7, 2024
d55be8a
update VERSION. remove olds
koron Feb 7, 2024
d58d129
doc for Xubuntu
koron Feb 7, 2024
2248de1
Merge pull request #33 from koron/update-xubuntu
koron Feb 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
*.sw?
tmp/

work/
vim*-kaoriya-*.tar.bz2
6 changes: 3 additions & 3 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VIM_VER = 8.2.1287
PATCHSET_VER = 20200724
VIM_VER = 9.0.0814
PATCHSET_VER = 20240207

VIM_VER_SHORT = 82
VIM_VER_SHORT = 90

# vim:set ts=8 sts=8 sw=8 tw=0 noet ft=make:
65 changes: 49 additions & 16 deletions build/freebsd/Makefile
Original file line number Diff line number Diff line change
@@ -1,37 +1,66 @@
ROOT_DIR = ../..
DESTDIR = $(.CURDIR)/work
ROOT_DIR = $(.CURDIR)/../..

include $(ROOT_DIR)/VERSION
.include "$(ROOT_DIR)/VERSION"
VERSION = $(VIM_VER)-$(PATCHSET_VER)

VIM_SRCDIR = $(ROOT_DIR)/vim/src

VIM_CONFIG = --with-features=huge \
--enable-gui=no \
--enable-fail-if-missing

VIM_DIR = /usr/local/share/vim
VIMRUNTIME_DIR = $(VIM_DIR)/vim$(VIM_VER_SHORT)
VIM_DIR = $(DESTDIR)/usr/local/share/vim
VIMRUNTIME_DIR = $(DESTDIR)$(VIM_DIR)/vim$(VIM_VER_SHORT)

default: vim-build
OS_TARGET = freebsd14
VIM_PKGFILE = vim$(VIM_VER_SHORT)-kaoriya-$(OS_TARGET)-$(VERSION).tar.bz2

install: vim-install kaoriya-install autofmt-install govim-install
##############################################################################

version:
@echo ROOT_DIR = $(ROOT_DIR)
@echo DESTDIR = $(DESTDIR)
@echo VERSION = $(VERSION)
@echo OS_TARGET = $(OS_TARGET)

package:
rm -f $(VIM_PKGFILE)
tar caf $(VIM_PKGFILE) --uid 0 --gid 0 --strip-components 1 -C $(DESTDIR) .

package-clean:
rm -rf $(DESTDIR)

package-install-all: vim-install-auto kaoriya-install autofmt-install govim-install

package-auto: package-clean package-install-all package

##############################################################################

vim-patch:
cd $(VIM_SRCDIR) && guilt pop -a && guilt push -a

vim-patch-reverse:
cd $(VIM_SRCDIR) && guilt pop -a

vim-configure:
cd $(VIM_SRCDIR) && ./configure $(VIM_CONFIG)

vim-build:
cd $(VIM_SRCDIR) && make
cd $(VIM_SRCDIR) && make -j4

vim-install:
cd $(VIM_SRCDIR) && make install
cd $(VIM_SRCDIR) && make DESTDIR=$(DESTDIR) install

vim-clean:
cd $(VIM_SRCDIR) && make clean

vim-distclean:
cd $(VIM_SRCDIR) && make distclean

vim-install-auto: vim-distclean vim-configure vim-build
cd $(VIM_SRCDIR) && sudo $(MAKE) install
vim-install-auto: vim-patch vim-configure vim-build vim-install vim-distclean vim-patch-reverse

##############################################################################

KAORIYA_SRCDIR = $(ROOT_DIR)/kaoriya
KAORIYA_INSTDIR = $(VIM_DIR)
Expand All @@ -40,37 +69,41 @@ kaoriya-install:
@cd $(KAORIYA_SRCDIR)/vim && \
for d in `find . -type d -not -name '.*'`; do \
echo mkdir: $$d ; \
install -d -o root -g wheel -m 0755 $(KAORIYA_INSTDIR)/$$d || exit 1 ; \
install -d -m 0755 $(KAORIYA_INSTDIR)/$$d || exit 1 ; \
done ; \
for f in `find . -type f -not -name '.*'`; do \
echo install: $$f ; \
install -o root -g wheel -m 0666 $$f $(KAORIYA_INSTDIR)/$$f || exit 1 ; \
install -m 0666 $$f $(KAORIYA_INSTDIR)/$$f || exit 1 ; \
done

##############################################################################

AUTOFMT_SRCDIR = $(ROOT_DIR)/contrib/autofmt
AUTOFMT_INSTDIR = $(VIM_DIR)/plugins/autofmt

autofmt-install:
@cd $(AUTOFMT_SRCDIR) && \
for d in `find . -type d -not -name '.*'`; do \
echo mkdir: $$d ; \
install -d -o root -g wheel -m 0755 $(AUTOFMT_INSTDIR)/$$d || exit 1 ; \
install -d -m 0755 $(AUTOFMT_INSTDIR)/$$d || exit 1 ; \
done ; \
for f in `find . -type f -not -name '.*' `; do \
echo install: $$f ; \
install -o root -g wheel -m 0666 $$f $(AUTOFMT_INSTDIR)/$$f || exit 1 ; \
install -m 0666 $$f $(AUTOFMT_INSTDIR)/$$f || exit 1 ; \
done

##############################################################################

GOVIM_SRCDIR = $(ROOT_DIR)/contrib/go-vim
GOVIM_INSTDIR = $(VIM_DIR)/plugins/golang

govim-install:
@cd $(GOVIM_SRCDIR) && \
for d in `find . -type d -not -name '.*'`; do \
echo mkdir: $$d ; \
install -d -o root -g wheel -m 0755 $(GOVIM_INSTDIR)/$$d || exit 1 ; \
install -d -m 0755 $(GOVIM_INSTDIR)/$$d || exit 1 ; \
done ; \
for f in `find . -type f -not -name '.*' `; do \
echo install: $$f ; \
install -o root -g wheel -m 0666 $$f $(GOVIM_INSTDIR)/$$f || exit 1 ; \
install -m 0666 $$f $(GOVIM_INSTDIR)/$$f || exit 1 ; \
done
76 changes: 76 additions & 0 deletions build/freebsd/Makefile1.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
ROOT_DIR = ../..

include $(ROOT_DIR)/VERSION

VIM_SRCDIR = $(ROOT_DIR)/vim/src

VIM_CONFIG = --with-features=huge \
--enable-gui=no \
--enable-fail-if-missing

VIM_DIR = /usr/local/share/vim
VIMRUNTIME_DIR = $(VIM_DIR)/vim$(VIM_VER_SHORT)

default: vim-build

install: vim-install kaoriya-install autofmt-install govim-install

vim-configure:
cd $(VIM_SRCDIR) && ./configure $(VIM_CONFIG)

vim-build:
cd $(VIM_SRCDIR) && make

vim-install:
cd $(VIM_SRCDIR) && make install

vim-clean:
cd $(VIM_SRCDIR) && make clean

vim-distclean:
cd $(VIM_SRCDIR) && make distclean

vim-install-auto: vim-distclean vim-configure vim-build
cd $(VIM_SRCDIR) && sudo $(MAKE) install

KAORIYA_SRCDIR = $(ROOT_DIR)/kaoriya
KAORIYA_INSTDIR = $(VIM_DIR)

kaoriya-install:
@cd $(KAORIYA_SRCDIR)/vim && \
for d in `find . -type d -not -name '.*'`; do \
echo mkdir: $$d ; \
install -d -o root -g wheel -m 0755 $(KAORIYA_INSTDIR)/$$d || exit 1 ; \
done ; \
for f in `find . -type f -not -name '.*'`; do \
echo install: $$f ; \
install -o root -g wheel -m 0666 $$f $(KAORIYA_INSTDIR)/$$f || exit 1 ; \
done

AUTOFMT_SRCDIR = $(ROOT_DIR)/contrib/autofmt
AUTOFMT_INSTDIR = $(VIM_DIR)/plugins/autofmt

autofmt-install:
@cd $(AUTOFMT_SRCDIR) && \
for d in `find . -type d -not -name '.*'`; do \
echo mkdir: $$d ; \
install -d -o root -g wheel -m 0755 $(AUTOFMT_INSTDIR)/$$d || exit 1 ; \
done ; \
for f in `find . -type f -not -name '.*' `; do \
echo install: $$f ; \
install -o root -g wheel -m 0666 $$f $(AUTOFMT_INSTDIR)/$$f || exit 1 ; \
done

GOVIM_SRCDIR = $(ROOT_DIR)/contrib/go-vim
GOVIM_INSTDIR = $(VIM_DIR)/plugins/golang

govim-install:
@cd $(GOVIM_SRCDIR) && \
for d in `find . -type d -not -name '.*'`; do \
echo mkdir: $$d ; \
install -d -o root -g wheel -m 0755 $(GOVIM_INSTDIR)/$$d || exit 1 ; \
done ; \
for f in `find . -type f -not -name '.*' `; do \
echo install: $$f ; \
install -o root -g wheel -m 0666 $$f $(GOVIM_INSTDIR)/$$f || exit 1 ; \
done
19 changes: 19 additions & 0 deletions build/freebsd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# for FreeBSD

1. Create a package

```console
$ make package-auto
```

2. Copy to a target machine (OPTIONAL)

```console
$ scp vim90-kaoriya-freebsd13-9.0.0814-20221002.tar.bz2 foobar@machine:tmp
```

3. Install as root

```console
$ sudo tar xvf vim90-kaoriya-freebsd13-9.0.0814-20221002.tar.bz2 -C /
```
1 change: 1 addition & 0 deletions build/msvc/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*.out
/*.sln
/*.suo
/.vs/
/target/
50 changes: 50 additions & 0 deletions build/msvc/9A-daily-build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
@ECHO OFF

SET INSTALL_DIR=D:\Vim\daily

CALL "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
CALL tools\command-common.bat

CD "%VIMDIR%"

REM Catcn up Vim's update
%GUILTCMD% pop -a
git fetch -p
git merge --ff-only @{u}

REM Update VIM_VER in ..\..\VERSION

SET TEMP_PATCH_NUM=%TEMP%\%RANDOM%_vim_patch_num.txt
sed -ne '/^static int included_patches/,/^\s*[0-9]\+,$/p' src/version.c | tail -1 | tr -cd 0123456789 | xargs printf '%%04d' > %TEMP_PATCH_NUM%
SET /P PATCH_NUM=<%TEMP_PATCH_NUM%
DEL /F %TEMP_PATCH_NUM%
sed -i -e 's/^\(VIM_VER\s*=\s*[0-9]\+\.[0-9]\+\.\)[0-9]\+/\1%PATCH_NUM%/' ..\VERSION

REM Apply patches with guilt
%GUILTCMD% push -a

CD "%CURDIR%"
REM update VIM_VER
CALL tools\command-common.bat

REM Build Vim
nmake /NOLOGO build-release

REM Test
nmake /NOLOGO vim-test

REM Create archives
nmake /NOLOGO build-release-archive
nmake /NOLOGO build-release-clean

REM Install x64 binary to local
7za x -o"%INSTALL_DIR%" -y "target\%RELZIP_W64%"

REM Clean patches with guilt
CD "%VIMDIR%"
%GUILTCMD% pop -a
CD "%CURDIR%"

REM END
PAUSE
EXIT /B 0
10 changes: 10 additions & 0 deletions build/msvc/9B-daily-install.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@ECHO OFF

CD
SET INSTALL_DIR=D:\Vim

CALL tools\command-common.bat
7za x -o"%INSTALL_DIR%" -y "target\%RELZIP_W64%"

PAUSE
EXIT /B 0
Loading