Skip to content

Commit

Permalink
Windows packaging system updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
wrcad committed Sep 14, 2017
1 parent e95102a commit 27b9839
Show file tree
Hide file tree
Showing 11 changed files with 191 additions and 45 deletions.
15 changes: 11 additions & 4 deletions mrouter/mrouter/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ CCFILES = \
mr_cmds.cc mr_config.cc mr_maze.cc mr_node.cc mr_route.cc mrouter.cc
CCOBJS = $(CCFILES:.cc=.o)

ifdef EXESUFFIX
# NOTE: Windows needs the explicit inclusion of lddb.o or
# GetProcAdress fails to find export names, also miscutil.a must be
# provided.
TLIBS = ../lddb/lddb.o -L../lddb -llddb -L../lef/lib -llef -L../def/lib -ldef \
$(BASE)/lib/miscutil.a
else
TLIBS = -L../lddb -llddb -L../lef/lib -llef -L../def/lib -ldef
endif

LDDBLIB = ../lddb/liblddb.a

all: $(LDDBLIB) $(LIB_TARGET) mrouter
Expand All @@ -39,10 +49,7 @@ $(LIB_TARGET): $(MR_VERS_H) $(LDDBLIB) $(CCOBJS)
rm -f $(LIB_TARGET); \
fi
@echo Linking plug-in
@$(CXX) $(LSHFLAG) -o $(LIB_TARGET) $(CCOBJS) \
../lddb/lddb.o -L../lddb -llddb -L../lef/lib -llef -L../def/lib -ldef
# NOTE: Windows needs the explicit inclusion of lddb.o above or
# GetProcAdress fails to find export names.
@$(CXX) $(LSHFLAG) -o $(LIB_TARGET) $(CCOBJS) $(TLIBS)

$(LDDBLIB)::
cd ../lddb; $(MAKE)
Expand Down
2 changes: 1 addition & 1 deletion wrspice/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ wdemo wrspice_ipc_demo:
@echo

INSTALL_PREFIX ?= $(prefix)
ifdef $(EXESUFFIX)
ifdef EXESUFFIX
destn = $(INSTALL_PREFIX)/$(TOOLROOT)/wrspice
else
destn = $(INSTALL_PREFIX)/$(TOOLROOT)/wrspice.current
Expand Down
1 change: 0 additions & 1 deletion wrspice/bin/wrspice.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ Authors: 1985 Thomas L. Quarles
#include <signal.h>
#endif

#include <setjmp.h>
#include <time.h>
#ifndef HAVE_GETRUSAGE
#ifdef HAVE_FTIME
Expand Down
32 changes: 14 additions & 18 deletions wrspice/packages/Win32/wrspice/files/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ $utod $top/xictools/bin/$program.bat
mv $top/xictools/$appname/bin/* $top/xictools/bin
rmdir $top/xictools/$appname/bin

license=$top/xictools/license
if [ ! -d $license ]; then
mkdir $license
fi
cp ../../../../secure/README.MSW $license
$utod $license/README.MSW

examples=$top/xictools/$appname/examples
$utod $examples/*

Expand All @@ -63,17 +56,20 @@ $utod $docs/README
$utod $docs/MSWINFO.TXT

devkit=$top/xictools/$appname/devkit
$utod $devkit/README
$utod $devkit/README.adms
$utod $devkit/Makefile
$utod $devkit/admst/*
$utod $devkit/include/*
foo=`cat ../../util/adms_examples`
for a in $foo; do
$utod $devkit/$a
done

sed -e s/VERSION/$version/ < files/$appname.iss.in > $appname.iss
if [ -d $devkit ]; then
$utod $devkit/README
$utod $devkit/README.adms
$utod $devkit/Makefile
$utod $devkit/admst/*
$utod $devkit/include/*
foo=`cat ../../util/adms_examples`
for a in $foo; do
$utod $devkit/$a
done
sed -e s/VERSION/$version/ < files/$appname.iss.in > $appname.iss
else
sed -e s/VERSION/$version/ < files/wrspice_nodk.iss.in > $appname.iss
fi
$utod $appname.iss

$inno/iscc $appname.iss > build.log
Expand Down
2 changes: 0 additions & 2 deletions wrspice/packages/Win32/wrspice/files/wrspice.iss.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ Source: "..\..\root\usr\local\xictools\bin\multidec.exe"; DestDir: "{app}\xictoo
Source: "..\..\root\usr\local\xictools\bin\proc2mod.exe"; DestDir: "{app}\xictools\bin"; Flags: ignoreversion
Source: "..\..\root\usr\local\xictools\bin\printtoraw.exe"; DestDir: "{app}\xictools\bin"; Flags: ignoreversion

Source: "..\..\root\usr\local\xictools\license\*"; DestDir: "{app}\xictools\license"; Flags: uninsneveruninstall

Source: "..\..\root\usr\local\xictools\wrspice\examples\*"; DestDir: "{app}\xictools\wrspice\examples"

Source: "..\..\root\usr\local\xictools\wrspice\help\*"; DestDir: "{app}\xictools\wrspice\help"
Expand Down
66 changes: 66 additions & 0 deletions wrspice/packages/Win32/wrspice/files/wrspice_nodk.iss.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

[Setup]

AppName=WRspice-4
AppVerName=WRspice-VERSION
AppVersion=VERSION
AppPublisher=Whiteley Research Inc.
AppPublisherURL=http://wrcad.com
AppMutex=WRspiceMutex

OutputBaseFilename=wrspice-Win32-VERSION-i386

Compression=bzip

DefaultDirName=c:\usr\local
DefaultGroupName=XicTools
DirExistsWarning=no

PrivilegesRequired=admin

UninstallFilesDir={app}\xictools\wrspice\uninstall
UninstallDisplayIcon={app}\xictools\bin\wrspice.exe

[Files]

Source: "{app}\xictools\bin\wrspice.exe"; DestDir: "{app}\xictools\bin\wrspice_old"; Flags: external skipifsourcedoesntexist uninsneveruninstall
Source: "{app}\xictools\bin\wrspice.dll"; DestDir: "{app}\xictools\bin\wrspice_old"; Flags: external skipifsourcedoesntexist uninsneveruninstall
Source: "..\..\root\usr\local\xictools\bin\wrspice.exe"; DestDir: "{app}\xictools\bin"; Flags: ignoreversion
Source: "..\..\root\usr\local\xictools\bin\wrspice.dll"; DestDir: "{app}\xictools\bin"; Flags: ignoreversion
Source: "..\..\root\usr\local\xictools\bin\wrspice.bat"; DestDir: "{app}\xictools\bin"; Flags: ignoreversion
Source: "..\..\root\usr\local\xictools\bin\wrspiced.exe"; DestDir: "{app}\xictools\bin"; Flags: ignoreversion
Source: "..\..\root\usr\local\xictools\bin\multidec.exe"; DestDir: "{app}\xictools\bin"; Flags: ignoreversion
Source: "..\..\root\usr\local\xictools\bin\proc2mod.exe"; DestDir: "{app}\xictools\bin"; Flags: ignoreversion
Source: "..\..\root\usr\local\xictools\bin\printtoraw.exe"; DestDir: "{app}\xictools\bin"; Flags: ignoreversion

Source: "..\..\root\usr\local\xictools\wrspice\examples\*"; DestDir: "{app}\xictools\wrspice\examples"

Source: "..\..\root\usr\local\xictools\wrspice\help\*"; DestDir: "{app}\xictools\wrspice\help"
Source: "..\..\root\usr\local\xictools\wrspice\help\screenshots\*"; DestDir: "{app}\xictools\wrspice\help\screenshots"

Source: "{app}\xictools\wrspice\startup\news"; DestDir: "{app}\xictools\wrspice\startup\old_config"; Flags: external skipifsourcedoesntexist uninsneveruninstall
Source: "{app}\xictools\wrspice\startup\wrspice_mesg"; DestDir: "{app}\xictools\wrspice\startup\old_config"; Flags: external skipifsourcedoesntexist uninsneveruninstall
Source: "{app}\xictools\wrspice\startup\wrspiceinit"; DestDir: "{app}\xictools\wrspice\startup\old_config"; Flags: external skipifsourcedoesntexist uninsneveruninstall

Source: "..\..\root\usr\local\xictools\wrspice\startup\*"; DestDir: "{app}\xictools\wrspice\startup"
Source: "..\..\root\usr\local\xictools\wrspice\startup\devices\*"; DestDir: "{app}\xictools\wrspice\startup\devices"

Source: "..\..\root\usr\local\xictools\wrspice\scripts\*"; DestDir: "{app}\xictools\wrspice\scripts"

Source: "..\..\root\usr\local\xictools\wrspice\docs\wrs*"; DestDir: "{app}\xictools\wrspice\docs"; Flags: uninsneveruninstall
Source: "..\..\root\usr\local\xictools\wrspice\docs\README"; DestDir: "{app}\xictools\wrspice\docs"
Source: "..\..\root\usr\local\xictools\wrspice\docs\MSWINFO.TXT"; DestDir: "{app}\xictools\wrspice\docs"

[Icons]

Name: "{group}\WRspice-4"; Filename: "{app}\xictools\bin\wrspice.bat"; WorkingDir: "c:\"; IconFilename: "{app}\xictools\bin\wrspice.exe"

[code]

#include "..\..\..\..\xt_base\packages\files\inno_uninstall"

function InitializeSetup(): Boolean;
begin
Result := True;
end;

4 changes: 2 additions & 2 deletions xic/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ distclean: eclean
####### Install programs into system location #########################

INSTALL_PREFIX ?= $(prefix)
ifdef $(EXESUFFIX)
ifdef EXESUFFIX
destn = $(INSTALL_PREFIX)/$(TOOLROOT)/xic
else
destn = $(INSTALL_PREFIX)/$(TOOLROOT)/xic.current
Expand Down Expand Up @@ -357,7 +357,7 @@ $(destn)/bin::
$(INSTALL_BIN) bin/xic.dll $(destn)/bin; \
fi
@if [ -z "$(EXESUFFIX)" ]; then \
$(INSTALL_SCRIPT) bin/xic.sh $(destn)/bin;
$(INSTALL_SCRIPT) bin/xic.sh $(destn)/bin; \
fi
@$(BASE)/util/mkdirpth $(toolbin)

Expand Down
7 changes: 0 additions & 7 deletions xic/packages/Win32/xic/files/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ $utod $top/xictools/bin/$program.bat
mv $top/xictools/$appname/bin/* $top/xictools/bin
rmdir $top/xictools/$appname/bin

license=$top/xictools/license
if [ ! -d $license ]; then
mkdir $license
fi
cp ../../../../secure/README.MSW $license
$utod $license/README.MSW

examples=$top/xictools/$appname/examples
$utod $examples/README
$utod $examples/cgdtest.scr
Expand Down
2 changes: 0 additions & 2 deletions xic/packages/Win32/xic/files/xic.iss.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ Source: "..\..\root\usr\local\xictools\bin\wrdecode.exe"; DestDir: "{app}\xictoo
Source: "..\..\root\usr\local\xictools\bin\wrencode.exe"; DestDir: "{app}\xictools\bin"; Flags: ignoreversion
Source: "..\..\root\usr\local\xictools\bin\wrsetpass.exe"; DestDir: "{app}\xictools\bin"; Flags: ignoreversion

Source: "..\..\root\usr\local\xictools\license\*"; DestDir: "{app}\xictools\license"; Flags: uninsneveruninstall

Source: "..\..\root\usr\local\xictools\xic\examples\*"; DestDir: "{app}\xictools\xic\examples"
Source: "..\..\root\usr\local\xictools\xic\examples\PCells\*"; DestDir: "{app}\xictools\xic\examples\PCells"
Source: "..\..\root\usr\local\xictools\xic\examples\memchip_example\*"; DestDir: "{app}\xictools\xic\examples\memchip_example"
Expand Down
2 changes: 2 additions & 0 deletions xt_base/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ CYGWIN*)
sys_os="CYGWIN"
CC=$mingw_dir/bin/gcc
CXX=$mingw_dir/bin/g++
AC_PROG_CC
AC_PROG_CXX
GCC=yes
WINDRES=$mingw_dir/bin/windres
RESOURCE=resource.o
Expand Down
103 changes: 95 additions & 8 deletions xt_base/packages/pkgfiles/uninstall
Original file line number Diff line number Diff line change
@@ -1,5 +1,67 @@
#! /bin/bash

get_prefix ()
{
# Set the magic name for the application, created by inno installer.
case $1 in
adms)
appname=adms_wr_is1 ;;
fastcap)
appname=fastcap_wr_is1 ;;
fasthenry)
appname=fasthenry_wr_is1 ;;
mozy)
appname=mozy_is1 ;;
mrouter)
appname=mrouter_is1 ;;
xtlserv|license)
appname=Xtlserv-4_is1 ;;
vl)
appname=vl_is1 ;;
wrspice)
appname=WRspice-4_is1 ;;
xic)
appname=Xic-4_is1 ;;
*)
echo Unknown program name $1
exit 1
;;
esac

# Query the installation location in the registry, inno sets this.
# If it works, it will be in the fifth token in a form like
# c:\usr\local\

str=$(reg query HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\$appname /reg:32 /v InstallLocation 2>/dev/null)
set -- $str
prf=$5
if [ -z "$prf" ]; then
return
fi

# Replace the back slashes with forward slashes. This code removes
# the trailing backslash, but you need an actual ^M in the IFS string
# or it won't (Cygwin weirdness?).

tifs=$IFS
IFS="\\"
set -- $prf
IFS=$tifs

# Build a new path, which will be in the form c:/usr/local. Cygwin
# will do the right thing with the c:.

pth=$1
shift
xx=$*
for a in $xx; do
if [ x$a != "x " ]; then
pth="$pth/$a"
fi
done
echo $pth
}

shopt -s nullglob

programs="adms fastcap fasthenry mozy mrouter xtlserv vl wrspice xic"
Expand Down Expand Up @@ -54,51 +116,76 @@ fi


pkgs=""
names=""
for a in $list; do
case $a in
ad|adm|adms)
pkgs="$pkgs adms_wr-$osname"
names="$names adms"
;;
fastc|fastca|fastcap)
pkgs="$pkgs fastcap_wr-$osname"
names="$names fastcap"
;;
fasth|fasthe|fasthen|fasthenr|fasthenry)
pkgs="$pkgs fasthenry_wr-$osname"
names="$names fasthenry"
;;
mo|moz|mozy)
pkgs="$pkgs mozy-$osname"
names="$names mozy"
;;
mr|mro|mrou|mrout|mroute|mrouter)
pkgs="$pkgs mrouter-$osname"
names="$names mrouter"
;;
xt|xtl|xtls|xtlse|xtlser|xtlserv)
pkgs="$pkgs xtlserv-$osname"
names="$names license"
;;
v|vl)
pkgs="$pkgs vl-$osname"
names="$names vl"
;;
w|wr|wrs|wrsp|wrspi|wrspic|wrspice)
pkgs="$pkgs wrspice-$osname"
names="$names wrspice"
;;
xi|xic)
pkgs="$pkgs xic-$osname"
names="$names xic"
;;
esac
done

if [ -n "$pkgs" ]; then
for a in $pkgs; do
if [ $psfx = rpm ]; then

if [ $psfx = rpm ]; then
for a in $pkgs; do
echo rpm -e $a
if [ $dryrun = no ]; then
rpm -e $a
fi
elif [ $psfx = pkg.gz ]; then
echo darwin
elif [ $pshx = exe ]; then
echo windows
fi
done
done
elif [ $psfx = pkg.gz ]; then
echo darwin
elif [ $psfx = exe ]; then
echo windows
for a in $names; do
prefix=`get_prefix $a`
if [ -n "$prefix" ]; then
udir=$prefix/xictools/$a/uninstall
if [ -d $udir ]; then
echo $udir/unins001.exe
if [ $dryrun = no ]; then
echo $udir/unins001.exe
fi
else
echo "$a: uninstall data not found."
fi
fi
done
fi
else
echo "Nothing found to install."
fi
Expand Down

0 comments on commit 27b9839

Please sign in to comment.