Skip to content

Commit

Permalink
Merge pull request #427 from rpspringuel/miktex
Browse files Browse the repository at this point in the history
Miktex
  • Loading branch information
eroux committed May 18, 2015
2 parents a275cc8 + a7b2e1e commit cca15fb
Show file tree
Hide file tree
Showing 18 changed files with 201 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .gregorio-version
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
3.0.0
3.0.1

*** Do not modify this file. ***
Use VersionManager.py to change the version.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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],[[email protected]])
FILENAME_VERSION="3_0_0"
AC_INIT([gregorio],[3.0.1],[[email protected]])
FILENAME_VERSION="3_0_1"
AC_SUBST(FILENAME_VERSION)
AC_PREREQ(2.59)
AC_CONFIG_SRCDIR([src/gregorio-utils.c])
Expand Down
2 changes: 1 addition & 1 deletion doc/GregorioRef.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
2 changes: 1 addition & 1 deletion macosx/Gregorio.pkgproj
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@
<key>OVERWRITE_PERMISSIONS</key>
<false/>
<key>VERSION</key>
<string>3.0.0</string><!--GREGORIO_VERSION-->
<string>3.0.1</string><!--GREGORIO_VERSION-->
</dict>
<key>UUID</key>
<string>74692645-8112-42EB-8FFC-2CBE2CEDE9FB</string>
Expand Down
2 changes: 1 addition & 1 deletion plugins/gregoriotex/gregoriotex.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tex/gregoriotex-chars.tex
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
2 changes: 1 addition & 1 deletion tex/gregoriotex-signs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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 %
Expand Down
2 changes: 1 addition & 1 deletion tex/gregoriotex-spaces.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tex/gregoriotex-syllable.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tex/gregoriotex-symbols.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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 %
Expand Down
6 changes: 3 additions & 3 deletions tex/gregoriotex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tex/gregoriotex.sty
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tex/gregoriotex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions windows/gregorio-resources.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
48 changes: 43 additions & 5 deletions windows/gregorio.iss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Setup]
AppName=gregorio
AppVersion=3.0.0
AppVersion=3.0.1
DefaultDirName={pf}\gregorio
DefaultGroupName=gregorio
SetupIconFile=gregorio.ico
Expand Down Expand Up @@ -28,29 +28,67 @@ 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}";
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);
Expand Down
132 changes: 132 additions & 0 deletions windows/install-mt.lua
Original file line number Diff line number Diff line change
@@ -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 <http://www.gnu.org/licenses/>.
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(" <executable command='texlua \"%s\" \"%%file\" \"%%dir\"'/>\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()

4 changes: 2 additions & 2 deletions windows/install.lua → windows/install-tl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit cca15fb

Please sign in to comment.