diff --git a/.gregorio-version b/.gregorio-version
index f85df06db..a67c7ddf6 100644
--- a/.gregorio-version
+++ b/.gregorio-version
@@ -1,4 +1,4 @@
-3.0.0
+3.0.1
*** Do not modify this file. ***
Use VersionManager.py to change the version.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 852310f8e..41a1acfbd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,12 @@
All notable changes to this project will be documented in this file.
As of v3.0.0 this project adheres to [Semantic Versioning](http://semver.org/). It follows [some conventions](http://keepachangelog.com/).
+
+## [3.0.1] - 2015-05-17
+### Fixed
+- Windows Installer is now compatible with MiKTeX. See [#355](https://github.com/gregorio-project/gregorio/issues/355).
+
+
## [3.0.0] - 2015-05-14
### Changed
- [New website](http://gregorio-project.github.io) containing instructions only for new versions of Gregorio starting with this release, in English only.
diff --git a/configure.ac b/configure.ac
index 87d3a25c7..9bbc295bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,8 +15,8 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-AC_INIT([gregorio],[3.0.0],[gregorio-devel@gna.org])
-FILENAME_VERSION="3_0_0"
+AC_INIT([gregorio],[3.0.1],[gregorio-devel@gna.org])
+FILENAME_VERSION="3_0_1"
AC_SUBST(FILENAME_VERSION)
AC_PREREQ(2.59)
AC_CONFIG_SRCDIR([src/gregorio-utils.c])
diff --git a/doc/GregorioRef.tex b/doc/GregorioRef.tex
index ed2657714..dc1619080 100644
--- a/doc/GregorioRef.tex
+++ b/doc/GregorioRef.tex
@@ -72,7 +72,7 @@
\vspace{1cm}
- \large Version \textbf{3.0.0}, 14/05/15 %% PARSE_VERSION_DATE
+ \large Version \textbf{3.0.1}, 17/05/15 %% PARSE_VERSION_DATE
\vspace{1cm}
diff --git a/macosx/Gregorio.pkgproj b/macosx/Gregorio.pkgproj
index 2a2cc9194..7762ae46d 100755
--- a/macosx/Gregorio.pkgproj
+++ b/macosx/Gregorio.pkgproj
@@ -547,7 +547,7 @@
OVERWRITE_PERMISSIONS
VERSION
- 3.0.0
+ 3.0.1
UUID
74692645-8112-42EB-8FFC-2CBE2CEDE9FB
diff --git a/plugins/gregoriotex/gregoriotex.h b/plugins/gregoriotex/gregoriotex.h
index 6d9590582..4e98b3965 100644
--- a/plugins/gregoriotex/gregoriotex.h
+++ b/plugins/gregoriotex/gregoriotex.h
@@ -19,7 +19,7 @@
#ifndef GREGORIOTEX_H
#define GREGORIOTEX_H
-#define GREGORIO_VERSION "3.0.0"
+#define GREGORIO_VERSION "3.0.1"
#define NO_FUSION 0
#define FUSION 1
diff --git a/tex/gregoriotex-chars.tex b/tex/gregoriotex-chars.tex
index 1883eb914..21e9792ed 100644
--- a/tex/gregoriotex-chars.tex
+++ b/tex/gregoriotex-chars.tex
@@ -1,4 +1,4 @@
-\gre@declarefileversion{gregoriotex-chars.tex}{3.0.0}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-chars.tex}{3.0.1}% GREGORIO_VERSION
\def\gregoriocharoffset#1{\the\numexpr 161 + #1 \relax}
\def\gregoriostylecharoffset#1{\the\numexpr 66 + #1 \relax}
diff --git a/tex/gregoriotex-signs.tex b/tex/gregoriotex-signs.tex
index 67e0322e6..a4ef8b917 100644
--- a/tex/gregoriotex-signs.tex
+++ b/tex/gregoriotex-signs.tex
@@ -17,7 +17,7 @@
% this file contains definitions of signs (bar, episemus, punctum, alterations)
-\gre@declarefileversion{gregoriotex-signs.tex}{3.0.0}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-signs.tex}{3.0.1}% GREGORIO_VERSION
\def\greusestylecommon{%
\ifnum\greusestylefont=0\relax %
diff --git a/tex/gregoriotex-spaces.tex b/tex/gregoriotex-spaces.tex
index 6f4d49eac..00845aaec 100644
--- a/tex/gregoriotex-spaces.tex
+++ b/tex/gregoriotex-spaces.tex
@@ -16,7 +16,7 @@
% this file contains definitions of spaces
-\gre@declarefileversion{gregoriotex-spaces.tex}{3.0.0}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-spaces.tex}{3.0.1}% GREGORIO_VERSION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% macros for tuning penalties
diff --git a/tex/gregoriotex-syllable.tex b/tex/gregoriotex-syllable.tex
index 0a34724d8..d01c92aa7 100644
--- a/tex/gregoriotex-syllable.tex
+++ b/tex/gregoriotex-syllable.tex
@@ -16,7 +16,7 @@
% this file contains definitions of the glyphs and the syllables
-\gre@declarefileversion{gregoriotex-syllable.tex}{3.0.0}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-syllable.tex}{3.0.1}% GREGORIO_VERSION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% macros for the typesetting of the different glyphs
diff --git a/tex/gregoriotex-symbols.tex b/tex/gregoriotex-symbols.tex
index 4f758af3b..9fb4e4c10 100644
--- a/tex/gregoriotex-symbols.tex
+++ b/tex/gregoriotex-symbols.tex
@@ -16,7 +16,7 @@
% this file contains definitions of the symbols
-\gre@declarefileversion{gregoriotex-symbols.tex}{3.0.0}% GREGORIO_VERSION
+\gre@declarefileversion{gregoriotex-symbols.tex}{3.0.1}% GREGORIO_VERSION
% a temp counter
\newcount\gretempfactor %
diff --git a/tex/gregoriotex.lua b/tex/gregoriotex.lua
index 31d44de94..9554853d0 100644
--- a/tex/gregoriotex.lua
+++ b/tex/gregoriotex.lua
@@ -21,13 +21,13 @@ local hpack, traverse_id, has_attribute, count, remove, insert_after, copy = nod
gregoriotex = gregoriotex or {}
local gregoriotex = gregoriotex
-local internalversion = '3.0.0' -- GREGORIO_VERSION (comment used by VersionManager.py)
+local internalversion = '3.0.1' -- GREGORIO_VERSION (comment used by VersionManager.py)
local err, warn, info, log = luatexbase.provides_module({
name = "gregoriotex",
- version = '3.0.0', -- GREGORIO_VERSION
+ version = '3.0.1', -- GREGORIO_VERSION
greinternalversion = internalversion,
- date = "2015/05/14", -- GREGORIO_DATE_LTX
+ date = "2015/05/17", -- GREGORIO_DATE_LTX
description = "GregorioTeX module.",
author = "The Gregorio Project (see CONTRIBUTORS.md)",
copyright = "2008-2015 - The Gregorio Project",
diff --git a/tex/gregoriotex.sty b/tex/gregoriotex.sty
index 969a53df6..31f98f420 100644
--- a/tex/gregoriotex.sty
+++ b/tex/gregoriotex.sty
@@ -16,7 +16,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{gregoriotex}%
- [2015/05/14 v3.0.0 GregorioTeX system.]% PARSE_VERSION_DATE_LTX
+ [2015/05/17 v3.0.1 GregorioTeX system.]% PARSE_VERSION_DATE_LTX
\RequirePackage{xcolor}
\input gregoriotex.tex
diff --git a/tex/gregoriotex.tex b/tex/gregoriotex.tex
index 425b8a409..530981560 100644
--- a/tex/gregoriotex.tex
+++ b/tex/gregoriotex.tex
@@ -75,7 +75,7 @@
% The version of gregorio. All gregoriotex*.tex files must have the same.
% All gtex files must also have the same version.
-\xdef\gre@gregorioversion{3.0.0}% GREGORIO_VERSION - VersionManager.py
+\xdef\gre@gregorioversion{3.0.1}% GREGORIO_VERSION - VersionManager.py
% first some macros to allow checks for version:
% Tests that all gregoriotex files are of the same version.
diff --git a/windows/gregorio-resources.rc b/windows/gregorio-resources.rc
index 4f255f133..c22d72ab3 100644
--- a/windows/gregorio-resources.rc
+++ b/windows/gregorio-resources.rc
@@ -9,12 +9,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Gregorio project"
VALUE "FileDescription", "Gregorio"
- VALUE "FileVersion", "3.0.0"
+ VALUE "FileVersion", "3.0.1"
VALUE "InternalName", "gregorio"
VALUE "LegalCopyright", "See COPYING in the installation directory."
VALUE "OriginalFilename", "gregorio.exe"
VALUE "ProductName", "Gregorio"
- VALUE "ProductVersion", "3.0.0"
+ VALUE "ProductVersion", "3.0.1"
END
END
diff --git a/windows/gregorio.iss b/windows/gregorio.iss
index 41b585811..7a215b106 100644
--- a/windows/gregorio.iss
+++ b/windows/gregorio.iss
@@ -1,6 +1,6 @@
[Setup]
AppName=gregorio
-AppVersion=3.0.0
+AppVersion=3.0.1
DefaultDirName={pf}\gregorio
DefaultGroupName=gregorio
SetupIconFile=gregorio.ico
@@ -28,18 +28,32 @@ Root: HKCR; Subkey: "Gregorio\shell\open\command"; ValueType: string; ValueName:
[Dirs]
Name: "{app}\contrib"
Name: "{app}\examples"
+Name: "{app}\texmf"
+Name: "{app}\texmf\tex"
+Name: "{app}\texmf\tex\luatex"
+Name: "{app}\texmf\tex\luatex\gregoriotex"
+Name: "{app}\texmf\fonts"
+Name: "{app}\texmf\fonts\truetype"
+Name: "{app}\texmf\fonts\truetype\public"
+Name: "{app}\texmf\fonts\truetype\public\gregoriotex"
+Name: "{app}\texmf\fonts\source"
+Name: "{app}\texmf\fonts\source\gregoriotex"
+Name: "{app}\texmf\doc"
+Name: "{app}\texmf\doc\luatex"
+Name: "{app}\texmf\doc\luatex\gregoriotex"
[Files]
Source: "../src/gregorio.exe"; DestDir: "{app}";
Source: "gregorio.ico"; DestDir: "{app}";
-Source: "install.lua"; DestDir: "{app}";
+Source: "install-tl.lua"; DestDir: "{app}";
+Source: "install-mt.lua"; DestDir: "{app}";
Source: "README.txt"; DestDir: "{app}"; Flags: isreadme
Source: "../CHANGELOG.md"; DestDir: "{app}";
Source: "../README.md"; DestDir: "{app}";
Source: "../CONTRIBUTORS.md"; DestDir: "{app}";
Source: "../UPGRADE.md"; DestDir: "{app}";
; PARSE_VERSION_FILE_NEXTLINE
-Source: "../doc/GregorioRef-3_0_0.pdf"; DestDir: "{app}";
+Source: "../doc/GregorioRef-3_0_1.pdf"; DestDir: "{app}";
Source: "../COPYING.md"; DestDir: "{app}";
Source: "../contrib/900_gregorio.xml"; DestDir: "{app}\contrib";
Source: "../contrib/system-setup.bat"; DestDir: "{app}";
@@ -47,10 +61,34 @@ Source: "../contrib/gregorio-scribus.lua"; DestDir: "{app}\contrib";
Source: "../contrib/*"; DestDir: "{app}\contrib";
Source: "../examples/PopulusSion.gabc"; DestDir: "{app}\examples";
Source: "../examples/main-lualatex.tex"; DestDir: "{app}\examples";
-Source: "../gregoriotex.tds.zip"; DestDir: "{app}";
+Source: "../tex/gregoriotex.tex"; DestDir: "{app}\texmf\tex\luatex\gregoriotex";
+Source: "../tex/gregoriotex.sty"; DestDir: "{app}\texmf\tex\luatex\gregoriotex";
+Source: "../tex/gregoriotex.lua"; DestDir: "{app}\texmf\tex\luatex\gregoriotex";
+Source: "../tex/gregoriotex-chars.tex"; DestDir: "{app}\texmf\tex\luatex\gregoriotex";
+Source: "../tex/gregoriotex-signs.tex"; DestDir: "{app}\texmf\tex\luatex\gregoriotex";
+Source: "../tex/gregoriotex-spaces.tex"; DestDir: "{app}\texmf\tex\luatex\gregoriotex";
+Source: "../tex/gregoriotex-syllable.tex"; DestDir: "{app}\texmf\tex\luatex\gregoriotex";
+Source: "../tex/gregoriotex-symbols.tex"; DestDir: "{app}\texmf\tex\luatex\gregoriotex";
+Source: "../tex/gsp-default.tex"; DestDir: "{app}\texmf\tex\luatex\gregoriotex";
+Source: "../tex/gregoriosyms.sty"; DestDir: "{app}\texmf\tex\luatex\gregoriotex";
+Source: "../fonts/greciliae.ttf"; DestDir: "{app}\texmf\fonts\truetype\public\gregoriotex";
+Source: "../fonts/gregorio.ttf"; DestDir: "{app}\texmf\fonts\truetype\public\gregoriotex";
+Source: "../fonts/greextra.ttf"; DestDir: "{app}\texmf\fonts\truetype\public\gregoriotex";
+Source: "../fonts/gresym.ttf"; DestDir: "{app}\texmf\fonts\truetype\public\gregoriotex";
+Source: "../fonts/parmesan.ttf"; DestDir: "{app}\texmf\fonts\truetype\public\gregoriotex";
+Source: "../fonts/convertsfdtottf.py"; DestDir: "{app}\texmf\fonts\source\gregoriotex";
+Source: "../fonts/greciliae-base.sfd"; DestDir: "{app}\texmf\fonts\source\gregoriotex";
+Source: "../fonts/greextra.sfd"; DestDir: "{app}\texmf\fonts\source\gregoriotex";
+Source: "../fonts/gregorio-base.sfd"; DestDir: "{app}\texmf\fonts\source\gregoriotex";
+Source: "../fonts/gresym.sfd"; DestDir: "{app}\texmf\fonts\source\gregoriotex";
+Source: "../fonts/Makefile"; DestDir: "{app}\texmf\fonts\source\gregoriotex";
+Source: "../fonts/parmesan-base.sfd"; DestDir: "{app}\texmf\fonts\source\gregoriotex";
+Source: "../fonts/squarize.py"; DestDir: "{app}\texmf\fonts\source\gregoriotex";
+Source: "../README.md"; DestDir: "{app}\texmf\doc\luatex\gregoriotex";
[Run]
-Filename: "texlua.exe"; Parameters: """{app}\install.lua"" > ""{app}\install.log"""; StatusMsg: "Configuring texmf..."; Description: "Add files to TeXLive texmf tree"; Flags: postinstall ; WorkingDir: "{app}";
+Filename: "texlua.exe"; Parameters: """{app}\install-tl.lua"" > ""{app}\install-tl.log"""; StatusMsg: "Configuring TeXLive texmf..."; Description: "Add files to TeXLive texmf tree"; Flags: postinstall ; WorkingDir: "{app}";
+Filename: "texlua.exe"; Parameters: """{app}\install-mt.lua"" > ""{app}\install-mt.log"""; StatusMsg: "Configuring MiKTeX texmf..."; Description: "Add files to MiKTeK texmf tree"; Flags: postinstall ; WorkingDir: "{app}";
[Code]
procedure URLLabelOnClickOne(Sender: TObject);
diff --git a/windows/install-mt.lua b/windows/install-mt.lua
new file mode 100644
index 000000000..9170e701d
--- /dev/null
+++ b/windows/install-mt.lua
@@ -0,0 +1,132 @@
+#!/usr/bin/env texlua
+--[[
+Gregorio Windows automatic installation script.
+Copyright (C) 2010-2015 Gregorio Project authors
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+
+This texlua script is called in Windows automatic installer (see gregorio.iss),
+it installs GregorioTeX under Windows.
+--]]
+
+require("lfs")
+
+kpse.set_program_name("luatex")
+
+local pathsep = '/'
+
+local function fixpath(path)
+ return path
+end
+
+local function remove_trailing_slash(path)
+ return path:gsub("/$" ,"")
+end
+
+local function basename(path)
+ return path:gsub("^[^/]+/" ,"")
+end
+
+if os.type == "windows" or os.type == "msdos" then
+ pathsep = '\\'
+ fixpath = function(path)
+ return path:gsub("/", "\\")
+ end
+ remove_trailing_slash = function(path)
+ return path:gsub("\\$" ,"")
+ end
+ basename = function(path)
+ return path:gsub("^[^\\]+\\" ,"")
+ end
+end
+
+local texmflocal = fixpath(kpse.expand_var("$TEXMFLOCAL"))..pathsep
+local suffix = "gregoriotex"..pathsep
+
+function io.loaddata(filename,textmode)
+ local f = io.open(filename,(textmode and 'r') or 'rb')
+ if f then
+ local data = f:read('*all')
+ f:close()
+ return data
+ else
+ return nil
+ end
+end
+
+function io.savedata(filename,data,joiner)
+ local f = io.open(filename,"wb")
+ if f then
+ f:write(data or "")
+ f:close()
+ return true
+ else
+ return false
+ end
+end
+
+function copy_one_file(src, dest)
+ local destfile = dest..basename(src)
+ io.savedata(destfile, io.loaddata(src))
+end
+
+function copy_files()
+ if not lfs.isdir(texmflocal) then
+ lfs.mkdir(texmflocal)
+ end
+ print("Copying files...\n")
+ local texmfdist = kpse.expand_var("$TEXMFDIST")
+ --[[ MiKTeX uses slightly different paths for the location of it's bin
+ directory for 32 and 64 bit versions. Since the copy command will fail
+ silently if the destination directory doesn't exist, the simplest way to deal
+ with this is to simply try copying to both locations.
+ --]]
+ texmfbin_32 = fixpath(texmfdist.."/miktex/bin/")
+ texmfbin_64 = fixpath(texmfdist.."/miktex/bin/x64/")
+ print("gregorio.exe...")
+ copy_one_file("gregorio.exe", texmfbin_32)
+ copy_one_file("gregorio.exe", texmfbin_64)
+ print("GregorioTeX files...")
+ os.spawn("xcopy texmf "..texmflocal.." /e /f /y")
+end
+
+function run_texcommands()
+ print("Running initexmf\n")
+ local p = os.spawn("initexmf -u --admin")
+end
+
+function main_install()
+ copy_files()
+ run_texcommands()
+ print("Post-install script complete.")
+ print("Press return to continue...")
+ answer=io.read()
+end
+
+function scribus_config()
+ local f = io.open('contrib'..pathsep..'900_gregorio.xml', 'r')
+ local data = ""
+ for l in f:lines() do
+ if l:match("executable command") then
+ data = data..string.format(" \n", lfs.currentdir()..pathsep.."contrib"..pathsep.."gregorio-scribus.lua")
+ else
+ data = data..l.."\n"
+ end
+ end
+ io.savedata('contrib'..pathsep..'900_gregorio.xml', data)
+end
+
+main_install()
+scribus_config()
+
diff --git a/windows/install.lua b/windows/install-tl.lua
similarity index 97%
rename from windows/install.lua
rename to windows/install-tl.lua
index c48b423cb..80a809fd9 100644
--- a/windows/install.lua
+++ b/windows/install-tl.lua
@@ -90,8 +90,8 @@ function copy_files()
texmfbin = fixpath(texmfbin.."/../bin/win32/")
print("gregorio.exe...")
copy_one_file("gregorio.exe", texmfbin)
- print("unzipping TDS zip file...\n")
- os.spawn("unzip.exe -o gregoriotex.tds.zip -d "..texmflocal:gsub("\\", "/")) -- TeXLive provides unzip!
+ print("GregorioTeX files...")
+ os.spawn("xcopy texmf "..texmflocal.." /e /f /y")
end
function run_texcommands()