mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-07 11:12:04 +00:00
Serially TC addon icons after iterating over the campaigns
This commit is contained in:
parent
4095965813
commit
25aa0b9359
@ -64,6 +64,7 @@ Select the add-on you want to install from the list and click "OK". The download
|
|||||||
w("</thead>")
|
w("</thead>")
|
||||||
w("<tbody>")
|
w("<tbody>")
|
||||||
root_dir = am_dir + "../../../"
|
root_dir = am_dir + "../../../"
|
||||||
|
images_to_tc = []
|
||||||
for campaign in campaigns.get_all("campaign"):
|
for campaign in campaigns.get_all("campaign"):
|
||||||
v = campaign.get_text_val
|
v = campaign.get_text_val
|
||||||
translations = campaign.get_all("translation")
|
translations = campaign.get_all("translation")
|
||||||
@ -91,13 +92,7 @@ Select the add-on you want to install from the list and click "OK". The download
|
|||||||
sys.stderr.write("Cannot find icon " + icon + "\n")
|
sys.stderr.write("Cannot find icon " + icon + "\n")
|
||||||
src = root_dir + "images/misc/missing-image.png"
|
src = root_dir + "images/misc/missing-image.png"
|
||||||
imgurl = "icons/missing-image.png"
|
imgurl = "icons/missing-image.png"
|
||||||
#the following line results in many instances of TeamColorizer being
|
images_to_tc.append( (src, path + "/" + imgurl) )
|
||||||
#spawned which currently helps killing the server
|
|
||||||
#TODO: make sure that this is serialized, as in "only one process of
|
|
||||||
#TeamColorizer running due to the current call of ths script at a
|
|
||||||
#time"
|
|
||||||
#Popen([os.path.join(am_dir, "../unit_tree/TeamColorizer"),
|
|
||||||
# src, path + "/" + imgurl])
|
|
||||||
|
|
||||||
type = v("type", "none")
|
type = v("type", "none")
|
||||||
size = float(v("size", "0"))
|
size = float(v("size", "0"))
|
||||||
@ -169,3 +164,6 @@ unit packs, terrain packs, music packs, etc. Usually a (perhaps optional) depend
|
|||||||
<p>Supported by <a href="http://www.jexiste.fr/">Jexiste</a></p>
|
<p>Supported by <a href="http://www.jexiste.fr/">Jexiste</a></p>
|
||||||
</div>
|
</div>
|
||||||
</body></html>""")
|
</body></html>""")
|
||||||
|
sys.stderr.write("Done outputting html, now generating %d TC'ed images\n" % len(images_to_tc))
|
||||||
|
for pair in images_to_tc:
|
||||||
|
Popen([os.path.join(am_dir, "../unit_tree/TeamColorizer"), pair[0], pair[1]]).wait() # wait() to ensure only one process is exists at any time
|
||||||
|
Loading…
x
Reference in New Issue
Block a user