Subversion Repositories Kolibri OS

Rev

Rev 5131 | Rev 5227 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5131 Rev 5132
Line 95... Line 95...
95
 {"SETTINGS/MYKEY.INI", PROGS .. "/system/MyKey/trunk/mykey.ini"},
95
 {"SETTINGS/MYKEY.INI", PROGS .. "/system/MyKey/trunk/mykey.ini"},
96
}) end
96
}) end
Line 97... Line 97...
97
 
97
 
98
--[[
98
--[[
-
 
99
Files to be included in kolibri.iso and distribution kit outside of kolibri.img.
99
Files to be included in kolibri.iso and distribution kit outside of kolibri.img.
100
 
100
The first subitem of every item is name relative to the root of ISO or distribution kit,
101
The first subitem of every item is name relative to the root of ISO or distribution kit,
-
 
102
the second is name of local file.
101
the second is name of local file.
103
 
102
If the first subitem ends in /, the last component of local file name is appended.
104
If the first subitem ends in /, the last component of local file name is appended.
103
The last component of the second subitem may contain '*'; if so, it will be expanded
105
The last component of the second subitem may contain '*'; if so, it will be expanded
-
 
106
according to usual rules, but without matching directories.
-
 
107
 
-
 
108
Tup does not allow a direct dependency on a file that is generated in a directory
-
 
109
other than where Tupfile.lua is and its children. Most files are generated
-
 
110
in the directory with Tupfile.lua; for other files, the item should contain
104
according to usual rules, but without matching directories.
111
a named subitem "group=path/" and the file should be put in .
105
--]]
112
--]]
106
extra_files = {
113
extra_files = {
107
 {"/", build_type .. "/distr_data/autorun.inf"},
114
 {"/", build_type .. "/distr_data/autorun.inf"},
108
 {"/", build_type .. "/distr_data/KolibriOS_icon.ico"},
115
 {"/", build_type .. "/distr_data/KolibriOS_icon.ico"},
Line 135... Line 142...
135
 {"kolibrios/lib/avcodec-55.dll", "common/lib/avcodec-55.dll"},
142
 {"kolibrios/lib/avcodec-55.dll", "common/lib/avcodec-55.dll"},
136
 {"kolibrios/lib/avdevice-55.dll", "common/lib/avdevice-55.dll"},
143
 {"kolibrios/lib/avdevice-55.dll", "common/lib/avdevice-55.dll"},
137
 {"kolibrios/lib/avformat-55.dll", "common/lib/avformat-55.dll"},
144
 {"kolibrios/lib/avformat-55.dll", "common/lib/avformat-55.dll"},
138
 {"kolibrios/lib/avutil-52.dll", "common/lib/avutil-52.dll"},
145
 {"kolibrios/lib/avutil-52.dll", "common/lib/avutil-52.dll"},
139
 {"kolibrios/lib/freetype.dll", "common/lib/freetype.dll"},
146
 {"kolibrios/lib/freetype.dll", "common/lib/freetype.dll"},
140
 {"kolibrios/lib/libc.dll", "common/lib/libc.dll"},
147
 {"kolibrios/lib/libc.dll", "../contrib/sdk/bin/libc.dll", group = "../contrib/sdk/lib/"},
141
 {"kolibrios/lib/pixlib.dll", "common/lib/pixlib.dll"},
148
 {"kolibrios/lib/pixlib.dll", "common/lib/pixlib.dll"},
142
 {"kolibrios/lib/swresample-0.dll", "common/lib/swresample-0.dll"},
149
 {"kolibrios/lib/swresample-0.dll", "common/lib/swresample-0.dll"},
143
 {"kolibrios/lib/swscale-2.dll", "common/lib/swscale-2.dll"},
150
 {"kolibrios/lib/swscale-2.dll", "common/lib/swscale-2.dll"},
144
 {"kolibrios/lib/zlib.dll", "common/lib/zlib.dll"},
151
 {"kolibrios/lib/zlib.dll", "common/lib/zlib.dll"},
145
 {"kolibrios/media/fplay-full", "common/media/fplay-full"},
152
 {"kolibrios/media/fplay-full", "common/media/fplay-full"},
Line 475... Line 482...
475
  for i,v in ipairs(files) do
482
  for i,v in ipairs(files) do
476
    if string.match(v[2], "%*")
483
    if string.match(v[2], "%*")
477
    then
484
    then
478
      local g = tup.glob(v[2])
485
      local g = tup.glob(v[2])
479
      for j,x in ipairs(g) do
486
      for j,x in ipairs(g) do
480
        table.insert(result, {v[1], x})
487
        table.insert(result, {v[1], x, group=v.group})
481
      end
488
      end
482
    else
489
    else
483
      if v.cp1251_from then
490
      if v.cp1251_from then
484
        tup.definerule{inputs = {v.cp1251_from}, command = 'iconv -f cp866 -t cp1251 "%f" > "%o"', outputs = {v[2]}}
491
        tup.definerule{inputs = {v.cp1251_from}, command = 'iconv -f cp866 -t cp1251 "%f" > "%o"', outputs = {v[2]}}
485
      end
492
      end
486
      table.insert(result, {v[1], v[2]})
493
      table.insert(result, {v[1], v[2], group=v.group})
487
    end
494
    end
488
  end
495
  end
489
  return result
496
  return result
490
end
497
end
Line 515... Line 522...
515
    table.insert(img_dirs, string.sub(img_file, 1, slash_pos - 1))
522
    table.insert(img_dirs, string.sub(img_file, 1, slash_pos - 1))
516
  end
523
  end
Line 517... Line 524...
517
 
524
 
518
  -- tup does not want to see hidden files as dependencies
525
  -- tup does not want to see hidden files as dependencies
519
  if not string.match(local_file, "/%.") then
526
  if not string.match(local_file, "/%.") then
520
    table.insert(input_deps, local_file)
527
    table.insert(input_deps, v.group or local_file)
521
  end
528
  end
Line 522... Line 529...
522
end
529
end
523
 
530
 
Line 568... Line 575...
568
-- generate command and dependencies for mkisofs
575
-- generate command and dependencies for mkisofs
569
input_deps = {"kolibri.img"}
576
input_deps = {"kolibri.img"}
570
iso_files_list = ""
577
iso_files_list = ""
571
for i,v in ipairs(iso_extra_files) do
578
for i,v in ipairs(iso_extra_files) do
572
  iso_files_list = iso_files_list .. ' "' .. v[1] .. '=' .. v[2] .. '"'
579
  iso_files_list = iso_files_list .. ' "' .. v[1] .. '=' .. v[2] .. '"'
573
  table.insert(input_deps, v[2])
580
  table.insert(input_deps, v.group or v[2])
574
end
581
end
Line 575... Line 582...
575
 
582
 
576
-- generate tup rule for kolibri.iso
583
-- generate tup rule for kolibri.iso
577
if tup.getconfig("INSERT_REVISION_ID") ~= ""
584
if tup.getconfig("INSERT_REVISION_ID") ~= ""
Line 587... Line 594...
587
 
594
 
588
-- generate command and dependencies for distribution kit
595
-- generate command and dependencies for distribution kit
589
cp = 'cp "%f" "%o"'
596
cp = 'cp "%f" "%o"'
590
tup.definerule{inputs = {"kolibri.img"}, command = cp, outputs = {"distribution_kit/kolibri.img"}}
597
tup.definerule{inputs = {"kolibri.img"}, command = cp, outputs = {"distribution_kit/kolibri.img"}}
-
 
598
for i,v in ipairs(distr_extra_files) do
591
for i,v in ipairs(distr_extra_files) do
599
  cmd = cp:gsub("%%f", v[2]) -- input can be a group, we can't rely on tup's expansion of %f in this case
592
  if string.sub(v[1], -1) == "/"
600
  if string.sub(v[1], -1) == "/"
593
  then tup.definerule{inputs = {v[2]}, command = cp, outputs = {"distribution_kit/" .. v[1] .. tup.file(v[2])}}
601
  then tup.definerule{inputs = {v.group or v[2]}, command = cmd, outputs = {"distribution_kit/" .. v[1] .. tup.file(v[2])}}
594
  else tup.definerule{inputs = {v[2]}, command = cp, outputs = {"distribution_kit/" .. v[1]}}
602
  else tup.definerule{inputs = {v.group or v[2]}, command = cmd, outputs = {"distribution_kit/" .. v[1]}}
595
  end
603
  end