From: Andrea Zagli Date: Wed, 22 May 2013 09:56:26 +0000 (+0200) Subject: Installer per windows (closes #530). X-Git-Tag: 0.0.3~19 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=b1e2a3cc12218fc416a53bdd980ec92d5af128ac;p=solipa%2Forganigramma Installer per windows (closes #530). --- diff --git a/.gitignore b/.gitignore index b433143..241c624 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ ltmain.sh stamp-h1 .anjuta* *exe +make_installer.sh diff --git a/.project b/.project index 29a662f..59ab419 100644 --- a/.project +++ b/.project @@ -69,7 +69,7 @@ - 1354096536862 + 1369207836344 30 @@ -78,7 +78,7 @@ - 1354096536867 + 1369207836348 22 @@ -87,7 +87,7 @@ - 1354096536875 + 1369207836352 22 @@ -96,7 +96,7 @@ - 1354096536881 + 1369207836377 22 @@ -105,7 +105,7 @@ - 1354096536887 + 1369207836379 22 @@ -114,7 +114,7 @@ - 1354096536890 + 1369207836382 22 @@ -123,7 +123,7 @@ - 1354096536895 + 1369207836529 22 @@ -132,7 +132,7 @@ - 1354096536899 + 1369207836532 22 @@ -141,7 +141,7 @@ - 1354096536927 + 1369207836534 22 @@ -150,7 +150,7 @@ - 1354096536930 + 1369207836537 22 @@ -159,7 +159,7 @@ - 1354096536933 + 1369207836539 22 @@ -168,7 +168,7 @@ - 1354096536984 + 1369207836541 22 @@ -177,7 +177,7 @@ - 1354096536986 + 1369207836544 22 @@ -186,7 +186,7 @@ - 1354096536989 + 1369207836547 22 @@ -195,7 +195,7 @@ - 1354096536991 + 1369207836550 22 @@ -204,7 +204,7 @@ - 1354096537019 + 1369207836552 22 @@ -213,7 +213,7 @@ - 1354096537041 + 1369207836555 22 @@ -222,7 +222,7 @@ - 1354096537062 + 1369207836626 30 @@ -231,7 +231,7 @@ - 1354096537089 + 1369207836629 30 @@ -240,7 +240,7 @@ - 1354096537110 + 1369207836632 30 @@ -249,7 +249,7 @@ - 1354096537133 + 1369207836634 30 @@ -258,7 +258,7 @@ - 1354096537157 + 1369207836637 6 @@ -267,7 +267,7 @@ - 1354096537180 + 1369207836640 6 @@ -275,5 +275,14 @@ 1.0-name-matches-false-false-ltmain.sh + + 1369207836643 + + 22 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-false-make_installer.sh + + diff --git a/Makefile.am b/Makefile.am index 7563e9b..db3aa8e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = src libreria data docs +SUBDIRS = src libreria data docs installers distclean-local: if test "$(srcdir)" = "."; then :; else \ diff --git a/configure.ac b/configure.ac index 2acf1f5..aafca9e 100644 --- a/configure.ac +++ b/configure.ac @@ -53,8 +53,12 @@ AC_CONFIG_FILES([ data/organigramma/Makefile data/organigramma/form/Makefile data/organigramma/gui/Makefile + data/organigramma/images/Makefile docs/Makefile docs/organigramma/Makefile docs/organigramma/examples/Makefile + installers/Makefile + installers/win/Makefile + installers/win/make_installer.sh ]) AC_OUTPUT diff --git a/data/organigramma/Makefile.am b/data/organigramma/Makefile.am index 93b52d7..9964433 100644 --- a/data/organigramma/Makefile.am +++ b/data/organigramma/Makefile.am @@ -1 +1 @@ -SUBDIRS = form gui +SUBDIRS = form gui images diff --git a/data/organigramma/images/Makefile.am b/data/organigramma/images/Makefile.am new file mode 100644 index 0000000..4977ccf --- /dev/null +++ b/data/organigramma/images/Makefile.am @@ -0,0 +1,9 @@ +EXTRA_DIST = \ + organigramma.svg \ + organigramma.ico \ + organigramma16.png \ + organigramma32.png \ + organigramma48.png \ + organigramma64.png \ + organigramma128.png \ + organigramma256.png diff --git a/data/organigramma/images/organigramma.ico b/data/organigramma/images/organigramma.ico new file mode 100644 index 0000000..48ed2aa Binary files /dev/null and b/data/organigramma/images/organigramma.ico differ diff --git a/data/organigramma/images/organigramma.svg b/data/organigramma/images/organigramma.svg new file mode 100644 index 0000000..5947fd4 --- /dev/null +++ b/data/organigramma/images/organigramma.svg @@ -0,0 +1,3246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/organigramma/images/organigramma128.png b/data/organigramma/images/organigramma128.png new file mode 100644 index 0000000..e48923c Binary files /dev/null and b/data/organigramma/images/organigramma128.png differ diff --git a/data/organigramma/images/organigramma16.png b/data/organigramma/images/organigramma16.png new file mode 100644 index 0000000..4276f26 Binary files /dev/null and b/data/organigramma/images/organigramma16.png differ diff --git a/data/organigramma/images/organigramma256.png b/data/organigramma/images/organigramma256.png new file mode 100644 index 0000000..051592f Binary files /dev/null and b/data/organigramma/images/organigramma256.png differ diff --git a/data/organigramma/images/organigramma32.png b/data/organigramma/images/organigramma32.png new file mode 100644 index 0000000..fd57121 Binary files /dev/null and b/data/organigramma/images/organigramma32.png differ diff --git a/data/organigramma/images/organigramma48.png b/data/organigramma/images/organigramma48.png new file mode 100644 index 0000000..8ab4c39 Binary files /dev/null and b/data/organigramma/images/organigramma48.png differ diff --git a/data/organigramma/images/organigramma64.png b/data/organigramma/images/organigramma64.png new file mode 100644 index 0000000..8c0b3ab Binary files /dev/null and b/data/organigramma/images/organigramma64.png differ diff --git a/installers/Makefile.am b/installers/Makefile.am new file mode 100644 index 0000000..af08adb --- /dev/null +++ b/installers/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = win \ No newline at end of file diff --git a/installers/win/Makefile.am b/installers/win/Makefile.am new file mode 100644 index 0000000..7857272 --- /dev/null +++ b/installers/win/Makefile.am @@ -0,0 +1,4 @@ +EXTRA_DIST = \ + make_installer.sh \ + organigramma.conf \ + organigramma.nsi \ No newline at end of file diff --git a/installers/win/make_installer.sh.in b/installers/win/make_installer.sh.in new file mode 100644 index 0000000..eda8d62 --- /dev/null +++ b/installers/win/make_installer.sh.in @@ -0,0 +1,85 @@ +#!/bin/sh + +SETTEZIP="/c/Program\ Files/7-Zip/7z.exe" +NSIS="/c/Program\ Files/NSIS/makensis.exe" + +TMP_DIR=tmp +PACKAGES_DIR=/opt + +LIBAUTE_VERSION=0.1.0 +LIBAUTEDB_VERSION=0.3.0 +LIBAUTESMBLDAP_VERSION=0.1.0 +LIBAUTOZ_VERSION=0.0.2 +LIBAUTOZGUI_VERSION=0.0.1 +LIBGDA_VERSION=4.2.13 +LIBGDAEX_VERSION=0.4.0 +LIBGTKFORM_VERSION=0.4.1 +LIBREPTOOL_VERSION=0.2.2 +LIBSOLIPA_VERSION=0.4.0 +LIBSSH_VERSION=0.4.7 +LIBZAKAUDIT_VERSION=0.3.0 +OPENLDAP_VERSION=2.4.23 +TERRITORIO_VERSION=0.0.1 +ORGANIGRAMMA_VERSION=@PACKAGE_VERSION@ + +ZIP=0 +while getopts ":z" opt; do + case $opt in + z) + ZIP=1 + ;; + esac +done + +rm -rf $TMP_DIR +rm -f organigramma-$ORGANIGRAMMA_VERSION.exe +rm -f organigramma-$ORGANIGRAMMA_VERSION.7z + +mkdir $TMP_DIR + +/c/Program\ Files/7-Zip/7z.exe x $PACKAGES_DIR/runtime_mingw_opensuse.7z -o$TMP_DIR +/c/Program\ Files/7-Zip/7z.exe x $PACKAGES_DIR/oracle_instant_client_10_2.7z -o$TMP_DIR +cp -r -f $PACKAGES_DIR/libaute-$LIBAUTE_VERSION/bin $TMP_DIR +cp -r -f $PACKAGES_DIR/libautedb-$LIBAUTEDB_VERSION/bin $TMP_DIR +cp -r -f $PACKAGES_DIR/libautedb-$LIBAUTEDB_VERSION/share $TMP_DIR +cp -r -f $PACKAGES_DIR/libaute-smbldap-$LIBAUTESMBLDAP_VERSION/bin $TMP_DIR +cp -r -f $PACKAGES_DIR/libaute-smbldap-$LIBAUTESMBLDAP_VERSION/share $TMP_DIR +cp -r -f $PACKAGES_DIR/libautoz-$LIBAUTOZ_VERSION/bin $TMP_DIR +cp -r -f $PACKAGES_DIR/autoz-gui-$LIBAUTOZGUI_VERSION/bin/*.dll $TMP_DIR/bin +cp -r -f $PACKAGES_DIR/autoz-gui-$LIBAUTOZGUI_VERSION/share $TMP_DIR +cp -r -f $PACKAGES_DIR/libgda-$LIBGDA_VERSION/bin $TMP_DIR +cp -r -f $PACKAGES_DIR/libgda-$LIBGDA_VERSION/etc $TMP_DIR +mkdir -p $TMP_DIR/lib/libgda-4.0 +cp -r -f $PACKAGES_DIR/libgda-$LIBGDA_VERSION/lib/libgda-4.0 $TMP_DIR/lib +rm -f $TMP_DIR/lib/libgda-4.0/providers/libgda-mdb* +rm -f $TMP_DIR/lib/libgda-4.0/providers/libgda-mysql* +$TMP_DIR/lib/libgda-4.0/providers/libgda-oracle* +rm -f $TMP_DIR/lib/libgda-4.0/providers/libgda-web* +cp -r -f $PACKAGES_DIR/libgda-$LIBGDA_VERSION/share $TMP_DIR +cp -r -f $PACKAGES_DIR/libgdaex-$LIBGDAEX_VERSION/bin $TMP_DIR +cp -r -f $PACKAGES_DIR/libgdaex-$LIBGDAEX_VERSION/share $TMP_DIR +cp -r -f $PACKAGES_DIR/libgtkform-$LIBGTKFORM_VERSION/bin $TMP_DIR +mkdir -p $TMP_DIR/lib/libgtkform +cp -r -f $PACKAGES_DIR/libgtkform-$LIBGTKFORM_VERSION/lib/libgtkform $TMP_DIR/lib +cp -r -f $PACKAGES_DIR/libgtkform-$LIBGTKFORM_VERSION/share $TMP_DIR +cp -r -f $PACKAGES_DIR/libreptool-$LIBREPTOOL_VERSION/bin $TMP_DIR +cp -r -f $PACKAGES_DIR/libsolipa-$LIBSOLIPA_VERSION/bin $TMP_DIR +cp -r -f $PACKAGES_DIR/libsolipa-$LIBSOLIPA_VERSION/share $TMP_DIR +cp -r -f $PACKAGES_DIR/libssh-$LIBSSH_VERSION/bin $TMP_DIR +cp -r -f $PACKAGES_DIR/libzakaudit-$LIBZAKAUDIT_VERSION/bin $TMP_DIR +cp -r -f $PACKAGES_DIR/openldap-$OPENLDAP_VERSION/bin $TMP_DIR +cp -r -f $PACKAGES_DIR/openldap-$OPENLDAP_VERSION/etc $TMP_DIR +cp -r -f $PACKAGES_DIR/openldap-$OPENLDAP_VERSION/share $TMP_DIR +cp -r -f $PACKAGES_DIR/territorio-$TERRITORIO_VERSION/bin $TMP_DIR +cp -r -f $PACKAGES_DIR/territorio-$TERRITORIO_VERSION/share $TMP_DIR +cp -r -f $PACKAGES_DIR/organigramma-$ORGANIGRAMMA_VERSION/bin $TMP_DIR +cp -r -f $PACKAGES_DIR/organigramma-$ORGANIGRAMMA_VERSION/share $TMP_DIR +cp -f organigramma.conf $TMP_DIR/etc + +if [ $ZIP -eq 1 ]; then + /c/Program\ Files/7-Zip/7z.exe a organigramma-$ORGANIGRAMMA_VERSION.7z ./$TMP_DIR/* +else + /c/Program\ Files/NSIS/makensis.exe //DVERSION=$ORGANIGRAMMA_VERSION organigramma.nsi +fi + +rm -rf $TMP_DIR \ No newline at end of file diff --git a/installers/win/organigramma.conf b/installers/win/organigramma.conf new file mode 100644 index 0000000..a8a4051 --- /dev/null +++ b/installers/win/organigramma.conf @@ -0,0 +1,19 @@ +[DB_TERRITORIO] +cnc_string=PostgreSQL://postgres@HOST=panoramix.comune.scandicci.fi.it;PORT=5432;DB_NAME=territorio + +[AUTOZ_TERRITORIO] +cnc_string=PostgreSQL://postgres@HOST=panoramix.comune.scandicci.fi.it;PORT=5432;DB_NAME=autoz + +[AUTE] +plugin=libaute-db-0 +cnc_string=PostgreSQL://postgres@HOST=panoramix.comune.scandicci.fi.it;PORT=5432;DB_NAME=autedb + +[AUTOZ] +cnc_string=PostgreSQL://postgres@HOST=panoramix.comune.scandicci.fi.it;PORT=5432;DB_NAME=autoz + +[AUDIT] +cnc_string=PostgreSQL://postgres@HOST=panoramix.comune.scandicci.fi.it;PORT=5432;DB_NAME=audit + +[DB] +pg_cnc_string=host=panoramix.comune.scandicci.fi.it dbname=opengov user=postgres +cnc_string=PostgreSQL://postgres@HOST=panoramix.comune.scandicci.fi.it;PORT=5432;DB_NAME=organigramma diff --git a/installers/win/organigramma.nsi b/installers/win/organigramma.nsi new file mode 100644 index 0000000..5969d62 --- /dev/null +++ b/installers/win/organigramma.nsi @@ -0,0 +1,65 @@ +# define name of installer +OutFile "organigramma-${VERSION}.exe" + +XPStyle on + +Name "Organigramma" + +RequestExecutionLevel admin +SetCompressor lzma + +# define installation directory +InstallDir $PROGRAMFILES\organigramma + +LoadLanguageFile "${NSISDIR}\Contrib\Language files\Italian.nlf" + +Icon "../../data/organigramma/images/organigramma.ico" + +# start default section +Section + + # set the installation directory as the destination for the following actions + SetOutPath $INSTDIR + + File /r tmp\* + + # create the uninstaller + WriteUninstaller "$INSTDIR\uninstall.exe" + + SetShellVarContext all + + # create a shortcut named "new shortcut" in the start menu programs directory + # point the new shortcut at the program uninstaller + CreateDirectory "$SMPROGRAMS\Organigramma" + CreateShortCut "$SMPROGRAMS\Organigramma\Organigramma.lnk" "$\"$INSTDIR\bin\organigramma.exe$\"" "$\"$INSTDIR\etc\organigramma.conf$\"" + CreateShortCut "$SMPROGRAMS\Organigramma\Disinstalla.lnk" "$\"$INSTDIR\uninstall.exe$\"" + + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Organigramma" "DisplayName" "Organigramma" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Organigramma" "DisplayVersion" "${VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Organigramma" "UninstallString" "$INSTDIR\uninstall.exe" + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Organigramma" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Organigramma" "NoRepair" 1 + + CreateShortCut "$DESKTOP\Organigramma.lnk" "$\"$INSTDIR\bin\organigramma.exe$\"" "$\"$INSTDIR\etc\organigramma.conf$\"" + +SectionEnd + +# uninstaller section start +Section "uninstall" + + SetShellVarContext all + + # first, delete the uninstaller + Delete "$INSTDIR\uninstall.exe" + + RMDir /r "$INSTDIR" + + # second, remove the link from the start menu + RMDir /r "$SMPROGRAMS\Organigramma" + + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Organigramma" + + Delete "$DESKTOP\Organigramma.lnk" + +# uninstaller section end +SectionEnd