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

[x64対応] master の修正を x64 ブランチにマージする #161

Merged
merged 40 commits into from
Jun 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
e594f61
grep 処理速度改善
beru Jun 9, 2018
cd5834b
grep 処理速度改善
beru Jun 10, 2018
4fa304e
grep 処理速度改善
beru Jun 10, 2018
282b7b2
grep 処理速度改善
beru Jun 11, 2018
b5e4bc9
grep 処理速度改善
beru Jun 12, 2018
b03ddd7
Merge pull request #77 from beru/grep_speed_up
berryzplus Jun 14, 2018
3b9ab5c
Compiled HTML Help を appveyor でコンパイルする。
m-tmatma Jun 16, 2018
11cb421
Merge pull request #123 from m-tmatma/feature/appveyor-compile-chm
kobake Jun 16, 2018
92bd7a3
#81: bregonig.dll のバイナリを追加する
m-tmatma Jun 18, 2018
1008fc5
Merge pull request #136 from m-tmatma/feauture/add-bregonig-binary
m-tmatma Jun 18, 2018
d53f4f8
.bat は常に改行コード CRLF でチェックアウトされるようにする
kobake Jun 19, 2018
96e0ab4
gitrev.h 生成時に git コマンドの存在と .git ディレクトリの存在を明示的にチェック
kobake Jun 19, 2018
38e25c2
SVN Revision 利用箇所を削除し、代わりに GitHash を用いる
kobake Jun 19, 2018
8477158
Merge pull request #146 from kobake/githash-when-nogit
m-tmatma Jun 19, 2018
34f4a47
svnrev.h 参照コードを削除
kobake Jun 20, 2018
55a7b08
Merge pull request #147 from kobake/remove-svnrev
m-tmatma Jun 20, 2018
52c6039
GIT_COMMIT_HASH が存在しないとき、バージョン情報ダイアログにバージョン番号が表示されない問題を修正
kobake Jun 20, 2018
249ea9d
バージョンダイアログのハッシュ文字列は整形せずに直接append
kobake Jun 21, 2018
53b1d94
Merge pull request #150 from kobake/version-dialog-without-githash
berryzplus Jun 21, 2018
85d39a0
appveyor で再起動したときにハングする問題の修正を試す
m-tmatma Jun 22, 2018
8b789e1
Merge pull request #156 from m-tmatma/feature/fix-appveyor-fail-restart
berryzplus Jun 22, 2018
66be2e9
GitURL をバージョン情報に含める
m-tmatma Jun 21, 2018
be83f6d
インストーラのビルドバッチファイルを追加
m-tmatma Jun 19, 2018
55a8921
インストーラのバイナリを成果物に含める
m-tmatma Jun 19, 2018
8426f9c
sakura_lang_en_US.dll を追加
m-tmatma Jun 19, 2018
1f7a420
#157: GitHash が反映されない問題を修正
m-tmatma Jun 22, 2018
2c56cbb
#154: solution のビルドをバッチファイルの中で行う
m-tmatma Jun 22, 2018
639cae2
#154: 変数を小文字に変更
m-tmatma Jun 22, 2018
706855d
Merge pull request #159 from m-tmatma/feature/fix-sakura_lang_en_US-G…
kobake Jun 23, 2018
6660f3e
Merge pull request #163 from m-tmatma/feature/refactor-build-solution
m-tmatma Jun 23, 2018
4abff1a
Merge pull request #158 from m-tmatma/feature/show-remote-URL
m-tmatma Jun 23, 2018
30775de
Merge pull request #144 from m-tmatma/feature/build-installer-on-appv…
m-tmatma Jun 23, 2018
3fe33ad
Windows10メニュー対応
KENCHjp Jun 17, 2018
802cf2b
Windows10と判定したときのsakura.exeのショートカットを相対パス指定だったのをuserstartmenuに修正
KENCHjp Jun 17, 2018
db96aaa
レビュー結果反映
KENCHjp Jun 17, 2018
f1a4e3c
Windows10判定を10以降に修正。
KENCHjp Jun 17, 2018
fafcfaf
Windows10の判定をMajorのみ10以上判定にする。
KENCHjp Jun 17, 2018
89784ab
今回修正分不要コード削除
KENCHjp Jun 17, 2018
aad3530
PRレビュー結果反映
KENCHjp Jun 18, 2018
ed6f99c
Merge pull request #130 from KENCHjp/feature/WIP-installer-Windows10-…
kobake Jun 23, 2018
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.bat text eol=crlf
11 changes: 4 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 1.0.{build}
image: Visual Studio 2017
init:
install:
- ps: Set-WinSystemLocale ja-JP
- ps: Start-Sleep -s 5
- ps: Restart-Computer
Expand All @@ -21,15 +21,12 @@ build_script:

echo CONFIGURATION %CONFIGURATION%

set EXTRA_CMD=/verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
call build-sln.bat %PLATFORM% %CONFIGURATION%

set MSBUILD_EXE="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"
call build-chm.bat

call build-installer.bat %PLATFORM% %CONFIGURATION%


echo %MSBUILD_EXE% %SLN_FILE% /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /t:"Clean","Rebuild" %EXTRA_CMD%
%MSBUILD_EXE% %SLN_FILE% /p:Platform=%PLATFORM% /p:Configuration=%CONFIGURATION% /t:"Clean","Rebuild" %EXTRA_CMD%

call zipArtifacts.bat %PLATFORM% %CONFIGURATION%

echo appveyor_yml
Expand Down
13 changes: 13 additions & 0 deletions build-chm.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
set HHC=C:\Program Files (x86)\HTML Help Workshop\hhc.exe

@rem hhc.exe returns 1 on success, and returns 0 on failure
"%HHC%" help\macro\macro.HHP
if %errorlevel% equ 0 (echo error && exit /b 1)

"%HHC%" help\plugin\plugin.hhp
if %errorlevel% equ 0 (echo error && exit /b 1)

"%HHC%" help\sakura\sakura.hhp
if %errorlevel% equ 0 (echo error && exit /b 1)

exit /b 0
45 changes: 45 additions & 0 deletions build-installer.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
set platform=%1
set configuration=%2
set INSTALLER_RESOURCES=installer\temp
set INSTALLER_WORK=installer\sakura
set INSTALLER_OUTPUT=installer\Output

set INSTALLER_RESOURCES_SINT=installer\temp\sint
set INSTALLER_RESOURCES_BRON=installer\temp\bron

if exist "%INSTALLER_RESOURCES%" rmdir /s /q "%INSTALLER_RESOURCES%"
if exist "%INSTALLER_WORK%" rmdir /s /q "%INSTALLER_WORK%"
if exist "%INSTALLER_OUTPUT%" rmdir /s /q "%INSTALLER_OUTPUT%"

if exist "%INSTALLER_RESOURCES_SINT%" rmdir /s /q "%INSTALLER_RESOURCES_SINT%"
if exist "%INSTALLER_RESOURCES_BRON%" rmdir /s /q "%INSTALLER_RESOURCES_BRON%"

7z x installer\sinst_src.zip -O"%INSTALLER_RESOURCES_SINT%" || (echo error && exit /b 1)
7z x installer\externals\bregonig\bron412.zip -O"%INSTALLER_RESOURCES_BRON%" || (echo error && exit /b 1)

mkdir %INSTALLER_WORK%
mkdir %INSTALLER_WORK%\keyword

copy %INSTALLER_RESOURCES_SINT%\sakura.exe.manifest.x %INSTALLER_WORK%\
copy %INSTALLER_RESOURCES_SINT%\sakura.exe.manifest.v %INSTALLER_WORK%\
copy %INSTALLER_RESOURCES_SINT%\sakura.exe.ini %INSTALLER_WORK%\
copy %INSTALLER_RESOURCES_SINT%\keyword\*.* %INSTALLER_WORK%\keyword\

if "%platform%" == "x64" (
copy %INSTALLER_RESOURCES_BRON%\x64\*.dll %INSTALLER_WORK%\
) else (
copy %INSTALLER_RESOURCES_BRON%\*.dll %INSTALLER_WORK%\
)
copy %INSTALLER_RESOURCES_BRON%\*.txt %INSTALLER_WORK%\

copy help\sakura\sakura.chm %INSTALLER_WORK%\
copy help\plugin\plugin.chm %INSTALLER_WORK%\
copy help\macro\macro.chm %INSTALLER_WORK%\

copy %platform%\%configuration%\*.exe %INSTALLER_WORK%\
copy %platform%\%configuration%\*.dll %INSTALLER_WORK%\

"C:\Program Files (x86)\Inno Setup 5\ISCC.exe" installer\sakura.iss || (echo error && exit /b 1)

if exist "%INSTALLER_RESOURCES%" rmdir /s /q "%INSTALLER_RESOURCES%"
if exist "%INSTALLER_WORK%" rmdir /s /q "%INSTALLER_WORK%"
18 changes: 18 additions & 0 deletions build-sln.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
set platform=%1
set configuration=%2

@rem https://www.appveyor.com/docs/environment-variables/

if "%APPVEYOR%"=="True" (
set EXTRA_CMD=/verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
) else (
set EXTRA_CMD=
)

set MSBUILD_EXE="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"

@echo %MSBUILD_EXE% %SLN_FILE% /p:Platform=%platform% /p:Configuration=%configuration% /t:"Clean","Rebuild" %EXTRA_CMD%
%MSBUILD_EXE% %SLN_FILE% /p:Platform=%platform% /p:Configuration=%configuration% /t:"Clean","Rebuild" %EXTRA_CMD%
if %errorlevel% neq 0 (echo error && exit /b 1)

exit /b 0
Binary file added installer/externals/bregonig/bron412.zip
Binary file not shown.
19 changes: 19 additions & 0 deletions installer/externals/bregonig/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
正規表現ライブラリ bregonig.dll

■ Website

http://k-takata.o.oo7.jp/mysoft/bregonig.html


■ バイナリ入手先

https://bitbucket.org/k_takata/bregonig/downloads/bron412.zip

■ ソースコード

http://github.com/k-takata/bregonig


■ ライセンス

http://k-takata.o.oo7.jp/mysoft/bregonig.html#SCT-9.
7 changes: 7 additions & 0 deletions installer/externals/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
外部の依存モジュールを入れるためのフォルダです。

このフォルダ以下に入れるモジュールに対して readme を書く際には
GitHub での文字化けを防ぐため UTF-8 BOM 付きで保存してください。

Website アドレス、ライセンス、バイナリのアドレス、(オープンソースなら)ソースコード入手先を
記載してください。
37 changes: 34 additions & 3 deletions installer/sakura.iss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#define MyAppVer GetFileVersion("sakura\sakura.exe")
#define MyAppVerH StringChange(MyAppVer, ".", "-")

[Setup]
AppName=�T�N���G�f�B�^
AppId=sakura editor
Expand All @@ -19,8 +22,8 @@ DisableStartupPrompt=no
PrivilegesRequired=None

; �G�f�B�^�̃o�[�W�����ɉ����ď���������ꏊ
OutputBaseFilename=sakura_install2-1-1-2
VersionInfoVersion=2.1.1.2
OutputBaseFilename=sakura_install{#MyAppVerH}
VersionInfoVersion={#MyAppVer}

; OS�o�[�W��������
MinVersion=0,5.0
Expand Down Expand Up @@ -50,6 +53,7 @@ Name: sendto; Description: "

[Files]
Source: "sakura\sakura.exe"; DestDir: "{app}"; Components: main; Flags: ignoreversion;
Source: "sakura\sakura_lang_en_US.dll";DestDir: "{app}"; Components: main; Flags: ignoreversion;
Source: "sakura\bregonig.dll"; DestDir: "{app}"; Components: main
Source: "sakura\bsd_license.txt"; DestDir: "{app}"; Components: main
Source: "sakura\sakura.exe.manifest.x";DestDir: "{app}"; Components: main; DestName: "sakura.exe.manifest"; Check: isMultiUserDisabled; Flags: onlyifdoesntexist;
Expand All @@ -73,7 +77,8 @@ Root: HKCU; Subkey: "SOFTWARE\Classes\*\shell\sakuraeditor\command"; ValueType:
Root: HKCU; Subkey: "SOFTWARE\Classes\Applications\sakura.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\sakura.exe"" ""%1"""; Tasks: proglist; Flags: uninsdeletekey; Check: CheckPrivilege(false)

[Icons]
Name: "{group}\�T�N���G�f�B�^"; Filename: "{app}\sakura.exe"; Components: main; Tasks: startmenu;
Name: "{group}\�T�N���G�f�B�^"; Filename: "{app}\sakura.exe"; Components: main; Check: InTopMenu(false); Tasks: startmenu;
Name: "{userstartmenu}\�T�N���G�f�B�^"; Filename: "{app}\sakura.exe"; Components: main; Check: InTopMenu(true); Tasks: startmenu;
Name: "{group}\�w���v�t�@�C��"; Filename: "{app}\sakura.chm"; Components: help; Tasks: startmenu;
Name: "{group}\�ݒ�t�H���_"; Filename: "%APPDATA%\sakura"; Components: main; Check: isMultiUserEnabled; Tasks: startmenu;
Name: "{userdesktop}\�T�N���G�f�B�^"; Filename: "{app}\sakura.exe"; Components: main; Tasks: desktopicon;
Expand Down Expand Up @@ -155,6 +160,32 @@ begin
Result := UsingWinNT and (( GetWindowsVersion shr 24) >= 5 );
end;

function IsWin10OrLater : Boolean;
var
Version: TWindowsVersion;
begin
GetWindowsVersionEx(Version);
if (Version.Major >= 10) then
begin
Result := True;
end else begin
Result := False;
end;
end;
function InTopMenu( TopMenu : Boolean ) : Boolean;
begin
if TopMenu then
begin
if IsWin10OrLater then
begin
Result := True;
end else begin
Result := False;
end
end else begin
Result := True;
end;
end;
{ **********************************
Custom Wizard Page
********************************** }
Expand Down
53 changes: 47 additions & 6 deletions sakura/preBuild.bat
Original file line number Diff line number Diff line change
@@ -1,18 +1,54 @@
@echo off

@echo =======================
@echo preBuild
@echo =======================

@echo.
@echo ---- HeaderMake ----
HeaderMake -in=..\sakura_core\Funccode_x.hsrc -out=..\sakura_core\Funccode_define.h -mode=define
HeaderMake -in=..\sakura_core\Funccode_x.hsrc -out=..\sakura_core\Funccode_enum.h -mode=enum -enum=EFunctionCode
MakefileMake -file=..\sakura_core\Makefile -dir=..\sakura_core

set GITREV_H=..\sakura_core\gitrev.h
@echo.
@echo ---- MakefileMake ----
MakefileMake -file=..\sakura_core\Makefile -dir=..\sakura_core

for /f "usebackq" %%s in (`git show -s --format^=%%H`) do (
set COMMITID=%%s
@echo.
@echo ---- Make gitrev.h ----
: Git enabled checking
set GIT_ENABLED=1
where git 1>nul 2>&1
if not "%ERRORLEVEL%" == "0" (
set GIT_ENABLED=0
@echo NOTE: No git command
)
for /f "usebackq" %%s in (`git show -s --format^=%%h`) do (
set SHORT_COMMITID=%%s
if not exist ..\.git (
set GIT_ENABLED=0
@echo NOTE: No .git directory
)

: Get git hash if git is enabled
if "%GIT_ENABLED%" == "1" (
for /f "usebackq" %%s in (`git show -s --format^=%%H`) do (
set COMMITID=%%s
)
for /f "usebackq" %%s in (`git show -s --format^=%%h`) do (
set SHORT_COMMITID=%%s
)
for /f "usebackq" %%s in (`git config --get remote.origin.url`) do (
set GIT_URL=%%s
)
) else (
set SHORT_COMMITID=
set COMMITID=
set GIT_URL=
)
@echo SHORT_COMMITID: %SHORT_COMMITID%
@echo COMMITID: %COMMITID%
@echo GIT_URL: %GIT_URL%

: Output gitrev.h
set GITREV_H=..\sakura_core\gitrev.h
type nul > %GITREV_H%
if "%COMMITID%" == "" (
type nul >> %GITREV_H%
Expand All @@ -24,6 +60,11 @@ if "%SHORT_COMMITID%" == "" (
) else (
echo #define GIT_SHORT_COMMIT_HASH "%SHORT_COMMITID%" >> %GITREV_H%
)
if "%GIT_URL%" == "" (
type nul >> %GITREV_H%
) else (
echo #define GIT_URL "%GIT_URL%" >> %GITREV_H%
)

ENDLOCAL
rem exit 0
Loading