-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: svn+ssh://svn.psi-im.org/home/psi/svn/win-installer/trunk@4 2d3a5ac0-73f9-4639-b284-2310bd1da355
- Loading branch information
Showing
6 changed files
with
168 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/bin/bash | ||
|
||
# PrepFiles v1.0 | ||
# Copyright (c) 2005 Mircea Bardac | ||
# E-mail: dev AT mircea.bardac.net | ||
|
||
# Script to prepare the (un)install file lists for the installer | ||
# Start from: installer/tools/ | ||
# Usage: ./prepfiles program_archive.zip | ||
# The script will also replace the contents of psi_app/ | ||
|
||
infile=$1 | ||
echo $infile | ||
yes A | unzip -q $infile # | grep -v "warning" | grep -v "chmod" | ||
|
||
indir=$(find -type d | grep / | head -n 1 | sed "s|./||g") | ||
|
||
find $indir -type d > directories.list | ||
|
||
out_inst="psi_files_install.nsi" | ||
echo ";" > $out_inst | ||
echo "; List of files to be INSTALLED (Base section)" >> $out_inst | ||
echo ";" >> $out_inst | ||
echo >> $out_inst | ||
|
||
out_uninst="psi_files_uninstall.nsi" | ||
echo ";" > $out_uninst | ||
echo "; List of files to be UNINSTALLED (Base section)" >> $out_uninst | ||
echo ";" >> $out_uninst | ||
echo >> $out_uninst | ||
|
||
cat directories.list | while read cline; do | ||
#echo $cline | ||
outpath=$(echo "$cline" | sed "s|$indir|\$INSTDIR|g") | ||
echo -e "\tSetOutPath \"$outpath\"" >> $out_inst | ||
find $cline -type f | grep -v "$cline/.*/.*" | while read cfile; do | ||
fpath=$(echo "$cfile" | sed -e "s|$indir||g") | ||
echo -e "\tFile \"psi_app$fpath\"" >> $out_inst | ||
echo -e "\tDelete \"\$INSTDIR$fpath\"" >> $out_uninst | ||
done | ||
echo >> $out_inst | ||
echo >> $out_uninst | ||
done | ||
|
||
cat directories.list | sort -r | while read cdir; do | ||
outpath=$(echo "$cdir" | sed "s|$indir|\$INSTDIR|g") | ||
echo -e "\tRMDir \"$outpath\"" >> $out_uninst | ||
done | ||
|
||
sed -i "s|/|\\\|g" $out_inst | ||
sed -i "s|/|\\\|g" $out_uninst | ||
|
||
rm -f directories.list | ||
|
||
rm -rf ../psi_app | ||
#mkdir ../psi_app | ||
ls $indir/ | ||
cp -a $indir ../psi_app | ||
rm -rf $indir | ||
|
||
mv $out_inst ../ | ||
mv $out_uninst ../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env python | ||
|
||
# PrepLang v1.0 | ||
# Copyright (c) 2005 Mircea Bardac | ||
# E-mail: dev AT mircea.bardac.net | ||
|
||
# Script to prepare the (un)install file lists & setup for the language files | ||
# Start from: installer/tools/ | ||
# Usage: ./preplang | ||
# The script will also put the new language setup files in the installer dir | ||
|
||
import os | ||
import string | ||
import array | ||
|
||
fmap=open("psi_lang.map") | ||
|
||
flanginst=open("../psi_lang_install.inc","w") | ||
flangsetup=open("../psi_lang_setup.inc","w") | ||
flanguninst=open("../psi_lang_uninstall.inc","w") | ||
|
||
langmap={} | ||
for s in fmap.readlines(): | ||
s=s.replace("\n","") | ||
langsettings=s.split('\t') | ||
if langsettings[0]!='': | ||
if s[0]=='#': continue | ||
langmap[langsettings[0]]=langsettings[1:] | ||
|
||
langlist={} | ||
for file in os.listdir("../psi_lang"): | ||
if (not langmap.has_key(file)): | ||
print "!Language definition not found for file: "+file+" (skipped)" | ||
continue | ||
else: | ||
print "Language definition found for: "+file+" = "+langmap[file][2] | ||
langlist[langmap[file][2]]=[file, langmap[file][0], langmap[file][1]] | ||
|
||
for lang in sorted(langlist.keys()): | ||
filename=langlist[lang][0] | ||
sectionid=langlist[lang][1] | ||
langid=langlist[lang][2] | ||
flanginst.write("; "+lang+"\n") | ||
flanginst.write("Section /o \""+lang+"\" "+sectionid+"\n") | ||
flanginst.write("\tSetOverwrite on\n") | ||
flanginst.write("\tSetOutPath \"$INSTDIR\\\"\n") | ||
flanginst.write("\tFile \"${INSTALLER_SOURCE}\\psi_lang\\"+filename+"\n") | ||
flanginst.write("SectionEnd\n\n") | ||
flanguninst.write("\tDelete \"$INSTDIR\\"+filename+"\"\n") | ||
if langid!="": | ||
flangsetup.write("\tStrCmp $LANGUAGE ${"+langid+"} 0 +2\n") | ||
flangsetup.write("\t\tSectionSetFlags ${"+sectionid+"} ${SF_SELECTED}\n") | ||
else: | ||
flangsetup.write("\t; No "+lang+" AutoSelection\n") | ||
|
||
flanginst.close() | ||
flangsetup.close() | ||
flanguninst.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Language Mapping File | ||
|
||
# Structure: | ||
# <FileName> <SectionName> <LanguageID> <LanguageName> | ||
# <LanguageID> is the NSIS language ID - can be missing | ||
|
||
psi_cs.qm LangCS LANG_FRENCH Czech | ||
psi_nl.qm LangNL LANG_DUTCH Dutch | ||
psi_et.qm LangET LANG_ESTONIAN Estonian | ||
psi_fr.qm LangFR LANG_FRENCH French | ||
psi_de.qm LangDE LANG_GERMAN German | ||
psi_el.qm LangEL LANG_GREEK Greek | ||
psi_mk.qm LangMK LANG_MACEDONIAN Macedonian | ||
psi_pl.qm LangPL LANG_POLISH Polish | ||
psi_zh.qm LangZH LANG_SIMPCHINESE Simplified Chinese | ||
psi_es.qm LangES LANG_SPANISH Spanish | ||
psi_ru.qm LangRU LANG_RUSSIAN Russian | ||
psi_sk.qm LangSK LANG_SLOVAK Slovak | ||
psi_vi.qm LangVI Vietnamese | ||
|