cesetup, updated for dastworx

This commit is contained in:
Basile Burg 2016-07-02 17:10:42 +02:00
parent b5527845c4
commit 712a89c442
5 changed files with 28 additions and 8 deletions

View File

@ -30,8 +30,7 @@ struct Resource
Resource[] ceResources =
[
Resource(cast(ImpType) import("coedit" ~ exeExt), "coedit" ~ exeExt, Kind.exe),
Resource(cast(ImpType) import("cesyms" ~ exeExt), "cesyms" ~ exeExt, Kind.exe),
Resource(cast(ImpType) import("cetodo" ~ exeExt), "cetodo" ~ exeExt, Kind.exe),
Resource(cast(ImpType) import("dastworx" ~ exeExt), "dastworx" ~ exeExt, Kind.exe),
Resource(cast(ImpType) import("coedit.ico"), "coedit.ico", Kind.dat),
Resource(cast(ImpType) import("coedit.png"), "coedit.png", Kind.dat),
Resource(cast(ImpType) import("coedit.license.txt"), "coedit.license.txt", Kind.doc)
@ -44,6 +43,11 @@ Resource[] dcdResources =
Resource(cast(ImpType) import("dcd.license.txt"), "dcd.license.txt", Kind.doc)
];
Resource[] oldResources =
[
Resource(cast(ImpType) [], "cesyms" ~ exeExt, Kind.exe),
Resource(cast(ImpType) [], "cetodo" ~ exeExt, Kind.exe),
];
static struct Formater
{
@ -179,13 +183,22 @@ void main(string[] args)
bool done;
if(!uninstall)
{
static immutable extractMsg = [": FAILURE", ": extracted"];
enum extractMsg = [": FAILURE", ": extracted"];
enum oldMsg = [": FAILURE", ": removed old file"];
foreach(res; ceResources)
{
done = installResource(res);
Formater.justify!'L'(res.destName ~ extractMsg[done]);
failures += !done;
}
foreach(res; oldResources)
{
if (!res.targetFilename.exists)
continue;
done = uninstallResource(res);
Formater.justify!'L'(res.destName ~ oldMsg[done]);
failures += !done;
}
if (!nodcd) foreach(res; dcdResources)
{
done = installResource(res);
@ -235,6 +248,14 @@ void main(string[] args)
Formater.justify!'L'(res.destName ~ rmMsg[done]);
failures += !done;
}
foreach(res; oldResources)
{
if (!res.targetFilename.exists)
continue;
done = uninstallResource(res);
Formater.justify!'L'(res.destName ~ rmMsg[done]);
failures += !done;
}
// remove $PF folder
version(Windows)
{

View File

@ -9,8 +9,7 @@ mkdir -p $pixdir
mkdir -p $shcdir
cp nux64/coedit $bindir
cp nux64/cesyms $bindir
cp nux64/cetodo $bindir
cp nux64/dastworx $bindir
cp nux64/coedit.png $pixdir
echo "[Desktop Entry]

View File

@ -6,7 +6,7 @@ cp * $fld/
zip -9 \
../output/coedit.$ver.linux32.zip \
$fld/dcd.license.txt $fld/coedit.license.txt \
$fld/coedit $fld/cetodo $fld/cesyms \
$fld/coedit $fld/dastworx \
$fld/coedit.ico $fld/coedit.png \
$fld/dcd-server $fld/dcd-client
rm -rf coedit-x86

View File

@ -6,7 +6,7 @@ cp * $fld/
zip -9 \
../output/coedit.$ver.linux64.zip \
$fld/dcd.license.txt $fld/coedit.license.txt \
$fld/coedit $fld/cetodo $fld/cesyms \
$fld/coedit $fld/dastworx \
$fld/coedit.ico $fld/coedit.png \
$fld/dcd-server $fld/dcd-client
rm -rf coedit-x86_64

View File

@ -4,6 +4,6 @@ cd win32
7z a -tzip -mx9^
..\output\coedit.%ver%.win32.zip^
dcd.license.txt coedit.license.txt^
coedit.exe cetodo.exe cesyms.exe^
coedit.exe dastworx.exe^
coedit.ico coedit.png^
dcd-server.exe dcd-client.exe