aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v4')
-rw-r--r--lib/sisu/v4/constants.rb6
-rw-r--r--lib/sisu/v4/shared_images.rb2
-rw-r--r--lib/sisu/v4/sysenv.rb46
3 files changed, 24 insertions, 30 deletions
diff --git a/lib/sisu/v4/constants.rb b/lib/sisu/v4/constants.rb
index f95b1dbd..bb90cdc8 100644
--- a/lib/sisu/v4/constants.rb
+++ b/lib/sisu/v4/constants.rb
@@ -210,7 +210,7 @@ Px={
po_subscript_o: ',{', po_subscript_c: '},',
po_hilite_o: '*{', po_hilite_c: '}*',
po_monospace_o: '#{', po_monospace_c: '}#',
- lng_lst: %w[am bg bn br ca cs cy da de el en eo es et eu fi fr ga gl he hi hr hy ia is it ja ko la lo lt lv ml mr nl nn no oc pl pt pt_BR ro ru sa se sk sl sq sr sv ta te th tk tr uk ur us vi zh],
+ lng_lst: SiSU_is[:language_list],
lv1: '*',
lv2: '=',
lv3: '=',
@@ -239,8 +239,8 @@ else
}
end
Db={
- name_prefix: "SiSU#{SiSU_version_dir}a_",
- name_prefix_db: "sisu_#{SiSU_version_dir}a_",
+ name_prefix: "SiSU#{SiSU_is[:version_dir]}a_",
+ name_prefix_db: "sisu_#{SiSU_is[:version_dir]}a_",
col_title: 800,
col_title_part: 400,
col_title_edition: 10,
diff --git a/lib/sisu/v4/shared_images.rb b/lib/sisu/v4/shared_images.rb
index ffcf880f..92f0c894 100644
--- a/lib/sisu/v4/shared_images.rb
+++ b/lib/sisu/v4/shared_images.rb
@@ -129,7 +129,7 @@ module SiSU_Images
end
def select_sisu_base
images=%w[arrow_next_red.png arrow_prev_red.png arrow_up_red.png dot_clear.png dot_white.png b_doc.png b_epub.png b_odf.png b_pdf.png b_toc.png]
- src_path="#{@env.path.share}/image"
+ src_path="#{SiSU_is[:path_base_system_data]}/image"
dest=dest_path(:image_sys)
copy(src_path,dest,images)
end
diff --git a/lib/sisu/v4/sysenv.rb b/lib/sisu/v4/sysenv.rb
index 341a29f7..eda1ad46 100644
--- a/lib/sisu/v4/sysenv.rb
+++ b/lib/sisu/v4/sysenv.rb
@@ -104,7 +104,7 @@ module SiSU_Env
data=Config::CONFIG['datadir'] + '/doc/sisu'
m=/.+\/(?:src\/)?(\S+)/m # m=/.+?\/(?:src\/)?([^\/]+)$/im # m=/.+\/(\S+)/m
@stub_pwd ||=@@pwd[m,1]
- prcss_dir='_sisu_processing_' + '.' + SiSU_version_dir
+ prcss_dir='_sisu_processing_' + '.' + SiSU_is[:version_dir]
prcss_dir_tmp_root="/tmp/#{prcss_dir}"
prcss_dir_stub="#{prcss_dir}/#{@stub_pwd}"
if @@user
@@ -282,13 +282,13 @@ module SiSU_Env
end
def rc_path_options
[
- "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_version_dir}",
+ "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:version_dir]}",
"#{$sisu_document_markup_directory_base_fixed_path}/.sisu",
- "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_version_dir}",
+ "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:version_dir]}",
"#{$sisu_document_markup_directory_base_fixed_path}/_sisu",
- "#{@@home}/.sisu/#{SiSU_version_dir}",
+ "#{@@home}/.sisu/#{SiSU_is[:version_dir]}",
"#{@@home}/.sisu",
- "#{@@sisu_etc}/#{SiSU_version_dir}",
+ "#{@@sisu_etc}/#{SiSU_is[:version_dir]}",
"#{@@sisu_etc}",
]
end
@@ -359,13 +359,13 @@ module SiSU_Env
tell_no_yaml='WARNING - YAML loading switched off, to enable delete the file:'
if @markup_dir_changed_
@ad_path=[
- "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_version_dir}/skin/yml",
+ "#{$sisu_document_markup_directory_base_fixed_path}/.sisu/#{SiSU_is[:version_dir]}/skin/yml",
"#{$sisu_document_markup_directory_base_fixed_path}/.sisu/skin/yml",
- "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_version_dir}/skin/yml",
+ "#{$sisu_document_markup_directory_base_fixed_path}/_sisu/#{SiSU_is[:version_dir]}/skin/yml",
"#{$sisu_document_markup_directory_base_fixed_path}/_sisu/skin/yml",
- "#{@@home}/.sisu/#{SiSU_version_dir}/skin/yml",
+ "#{@@home}/.sisu/#{SiSU_is[:version_dir]}/skin/yml",
"#{@@home}/.sisu/skin/yml",
- "#{@@sisu_etc}/#{SiSU_version_dir}/skin/yml",
+ "#{@@sisu_etc}/#{SiSU_is[:version_dir]}/skin/yml",
"#{@@sisu_etc}/skin/yml",
]
@ad_path.each do |v|
@@ -822,11 +822,11 @@ module SiSU_Env
: (STDERR.puts "\t*WARN* #{program} is not installed #{program_ref}")
end
def tex2pdf_engine
- prog=['xetex','xelatex','pdflatex','pdfetex','pdftex']
+ progs=['xetex','xelatex','pdflatex','pdfetex','pdftex']
@pdfetex_flag=false
@cmd ||=''
@texpdf=nil
- prog.each do |program|
+ progs.each do |program|
if program_found?(program)
@texpdf=program if program =~/xetex|xelatex|pdftex|pdflatex/
@pdfetex_flag=true
@@ -834,7 +834,7 @@ module SiSU_Env
end
end
if @pdfetex_flag==false
- @texpdf=prog.join(', ')
+ @texpdf=progs.join(', ')
end
@texpdf
end
@@ -846,7 +846,6 @@ module SiSU_Env
else %q{2>&1 | grep -v '$'}
end
mode='batchmode' #mode='nonstopmode'
- program_ref="\n\t\tSee http://www.tug.org/applications/pdftex/\n\t\tOn Debian this is is included in tetex-extra"
texpdf=tex2pdf_engine
if @pdfetex_flag
texpdf_cmd=case texpdf
@@ -860,7 +859,7 @@ module SiSU_Env
"#{texpdf} -interaction=#{mode} #{@input} #{tell}\n"
end
system(texpdf_cmd)
- else STDERR.puts "\t*WARN* none of the following programs are installed: #{program[0]}, #{program[1]}, #{program[2]} is installed. #{program_ref}"
+ else STDERR.puts "\t*WARN* none of the following programs are installed: #{@texpdf}"
end
end
def makeinfo #texinfo
@@ -2849,7 +2848,7 @@ WOK
def odf_structure
FileUtils::rm_rf(processing_path.processing_path.odf_pth)
FileUtils::mkdir_p(processing_path.processing_path.odf_pth)
- system("unzip -q #{path.share}/#{SiSU_version_dir}/odf/odt.zip -d #{processing_path.odf_pth}")
+ system("unzip -q #{path.share}/#{SiSU_is[:version_dir]}/odf/odt.zip -d #{processing_path.odf_pth}")
end
def sisupod_gen(fns_pod)
sisupod_gen_v3(fns_pod)
@@ -3591,18 +3590,18 @@ WOK
def get_version
@version={}
@pwd=ENV['PWD']
- yst_ver=SiSU_path_specified_Version_ \
- ? SiSU_path_specified_Version_
- : "#{defaults[:sisu_share]}/#{SiSU_version_dir}/v/version.yml"
+ yst_ver=SiSU_is[:version_info_path] \
+ ? SiSU_is[:version_info_path]
+ : "#{defaults[:sisu_share]}/#{SiSU_is[:version_dir]}/v/version.yml"
lib_path=@@lib_path ? @@lib_path : `echo $RUBYLIB`.split(':')
@@lib_path ||=lib_path
if File.exist?(yst_ver)
@version=YAML::load(File::open(yst_ver)) #unless @@noyaml
end
- @version[:install_method]=if SiSU_is==:gem_install
+ @version[:install_method]=if SiSU_is[:run_from]==:gem_install
spec = Gem::Specification.find_by_name("sisu")
gem_root = spec.gem_dir
- (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_version_dir}/,'')) == gem_root) \
+ (File.dirname(__FILE__.gsub(/\/lib\/sisu\/#{SiSU_is[:version_dir]}/,'')) == gem_root) \
? ' (ruby gem install)' : ''
else ''
end
@@ -6322,12 +6321,7 @@ WOK
cp_images(src,dest) if FileTest.directory?(src)
end
def cp_base_images #fix images
- src=if SiSU_path_base == :system_default \
- or SiSU_path_base == nil
- @env.path.share + '/image'
- else
- SiSU_path_base + '/data/sisu/image'
- end
+ src=SiSU_is[:path_base_system_data] + '/image'
dest_arr=[
"#{@env.path.webserv}/_sisu/image_sys",
"#{@env.path.webserv}/#{@env.path.stub_pwd}/_sisu/image_sys"