[wpkg-users] GTK and Inkscape problem

Rainer Meier r.meier at wpkg.org
Thu Mar 12 14:08:47 CET 2009


Hi Luca,

luca_manganelli at comune.trento.it wrote:
> Hi, I'm encountering problem.
> 
> I've downloaded GTK-2.14.7 from gtk-win sourceforge site and latest
> Inkscape.
> 
> Then I made two XML:
> 
> INKSCAPE XML
> 
>   <package
>      id="inkscape"
> ...
>       <depends package-id="gtk2" />
> ...
> </packages>
> 
> 
> GTK XML
> 
>       <package id="gtk2" name="GTK2 runtime" revision="1" reboot="false"
> priority="2" >
>             <check type="file" condition="versiongreaterorequal"
> path="%PROGRAMFILES%\GTK2-Runtime\bin\libgtk-win32-2.0-0.dll"
> value="2.14.7.0"/>
>             <install
> cmd='"\\w2srv17\gposhr$\WPKG\libraries\gtk2-runtime-2.14.7-2009-01-13-ash.exe"
>  /S' />
>       </package>
> 
> 
> the problem is when I launch Inkscape, an error appears:
> 
> Unable to load application         libatkmm-1.6.1.dll not found
> 
> any solution?


Seems to be a problem with invalid/incomplete GTK installation. Probably
they are not compatible.

Personally I am using Inkscape as well and I am using the GTK+ packages
of the Pidgin projects (<
http://sourceforge.net/project/showfiles.php?group_id=235&package_id=11969>)
with success.

Actually I was not even aware that Inkscape requires GTK to be installed
on the system. I just checked on my system and it seems that GTK is
included with the Inkscape installer. So I do not have any dependency
defined within my Inkscape package.

My Inkscape package:

<?xml version="1.0" encoding="utf-8" ?>
<packages>

<package id='Inkscape' name='Inkscape' revision='46' priority='50'
reboot='false' >
  <check type='uninstall' condition='exists' path='Inkscape 0.46' />
  <install cmd='"%SOFTWARE%\software.free\Inkscape
v.0.46\unattended.cmd"' />
  <remove cmd='"%SOFTWARE%\software.free\Inkscape
v.0.46\unattended-uninstall.cmd"' />
  <upgrade cmd='"%SOFTWARE%\software.free\Inkscape
v.0.46\unattended.cmd"' />
</package>

</packages>



unattended.cmd:

@echo off

set CMD32=Inkscape-0.46.win32.exe
set CMD64=%CMD32%
set INSTALLER=install.cmd
set INSTALLER_LOC=%~dp0

echo Uninstalling previous version
call "%INSTALLER_LOC%unattended-uninstall.cmd"

echo Installing Inkscape

call "%INSTALLER_LOC%%INSTALLER%" nsis "%CMD32%" "%CMD64%"



unattended-uninstall.cmd:

@echo off

echo Removing Inkscape

set PROG_FILES=%ProgramFiles%
if not "%ProgramFiles(x86)%" == "" set PROG_FILES=%ProgramFiles(x86)%

set INSTALLER_LOC=%~dp0
set PROG_DIR=%PROG_FILES%\Inkscape
REM set UNINSTALLER=%PROG_DIR%\uninst.exe
set OPTIONS=/S
REM File to be checked for existence - removed by uinstaller
set CHECK_FILE=%PROG_DIR%\inkscape.exe

if not exist "%CHECK_FILE%" goto good_end
REM start /wait "Uninstall" "%UNINSTALLER%" %OPTIONS%

if exist "%PROG_DIR%\uninst.exe" (
start /wait "Uninstall" "%PROG_DIR%\uninst.exe" %OPTIONS%
)
if exist "%PROG_DIR%\uninstall.exe" (
start /wait "Uninstall" "%PROG_DIR%\uninstall.exe" %OPTIONS%
)

REM Unfortunately the uninstaller seems to fork a child process and the
parent
REM process exits immediately. So give it some time to uninstall
for /L %%C IN (1,1,30) DO (
  if not exist "%CHECK_FILE%" goto good_end
  ping -n 2 127.0.0.1
)
:bad_end
exit /B 1

:good_end
if exist "%PROG_DIR%" (
rmdir /S /Q "%PROG_DIR%"
)
exit /B 0




install.cmd:

@echo off

REM Usage:
REM msiinstall.cmd <type> <32-bit-installer> <64-bit-installer>
[installer-location [custom-options]]
REM where type is one of
REM     msiinstall     Install the given MSI package
REM     msiuninstall   Uninstall the given MSI package
REM     install4j      Install4J setup
REM     innosetup      Inno setup
REM     installshield  Install shield
REM     nsis           Nullsoft install system (NSIS)
REM     custom         Custom installer - options required in this case
REM 32-bit-installer   Full file name (including extension) of 32-bit
installer
REM 64-bit-installer   Full file name (including extension) of 64-bit
installer
REM installer-location Path where the installers are stored, if empty
assumes directory where install.cmd is
REM custom-options     Replace the default installer options with the
ones given

REM Global variables
set INSTALL_CMD=
set EXIT_CODE=0

REM Get command type
set TYPE=%~1

REM Get 32-bit installer name
set CMD32=%~2

REM Get 64-bit installer name
set CMD64=%~3

REM get file path
set INSTALLER_PATH=%~dp0
if not "%~4" == "" (
set INSTALLER_PATH=%~4
)

set OPTIONS=
if not "%~5" == "" (
set OPTIONS=%~5
)


REM Detect which system is used
if not "%ProgramFiles(x86)%" == "" goto 64bit
goto 32bit


REM
##########################################################################
REM 64-bit system detected
REM
##########################################################################
:64bit
REM Determine 64-bit installer to be used
echo 64-bit system detected.
REM set INSTALLER64=
if not "%CMD64%" == "" (
set INSTALLER64=%CMD64%
) else (
REM Use 32-bit installer if available, no 64-bit installer available.
if not "%CMD32%" == "" (
echo Using 32-bit installer, no 64-bit installer specified.
set INSTALLER64=%CMD32%
) else (
echo Neither 64-bit nor 32-bit installer specified. Exiting.
goto usage
)
)

REM Check if installer is valid
if exist "%INSTALLER_PATH%%INSTALLER64%" (
set INSTALL_CMD=%INSTALLER_PATH%%INSTALLER64%
) else (
echo Installer "%INSTALLER_PATH%%INSTALLER64%" cannot be found! Exiting.
exit /B 97
)
goto installerselection


REM
##########################################################################
REM 32-bit system detected
REM
##########################################################################
:32bit
REM Determine 32-bit installer to be used
echo 32-bit system detected.
set INSTALLER32=
if not "%CMD32%" == "" (
set INSTALLER32=%CMD32%
) else (
echo No 32-bit installer specified. Exiting.
exit /B 96
)


REM Check if installer is valid
if exist "%INSTALLER_PATH%%INSTALLER32%" (
set INSTALL_CMD=%INSTALLER_PATH%%INSTALLER32%
) else (
echo Installer "%INSTALLER_PATH%%INSTALLER32%" cannot be found! Exiting.
exit /B 95
)
goto installerselection



REM
##########################################################################
REM select installer system
REM
##########################################################################
:installerselection
if /i "%TYPE%" == "msiinstall"    goto msiinstaller
if /i "%TYPE%" == "msiuninstall"  goto msiuninstaller
if /i "%TYPE%" == "install4j"     goto install4j
if /i "%TYPE%" == "innosetup"     goto innoinstaller
if /i "%TYPE%" == "installshield" goto installshieldinstaller
if /i "%TYPE%" == "nsis"          goto nsisinstaller
if /i "%TYPE%" == "custom"        goto custominstaller
goto usage



:msiinstaller
echo Installing "%INSTALL_CMD%"
if "%OPTIONS%" == "" (
set OPTIONS=/qn /norestart
)
start /wait "Software installation" msiexec /i "%INSTALL_CMD%" %OPTIONS%
set EXIT_CODE=%ERRORLEVEL%
goto end


:msiuninstaller
echo Uninstalling "%INSTALL_CMD%"
if "%OPTIONS%" == "" (
set OPTIONS=/qn /norestart
)
start /wait "Software uninstallation" msiexec /x "%INSTALL_CMD%" %OPTIONS%
set EXIT_CODE=%ERRORLEVEL%
goto end


:install4j
echo Installing "%INSTALL_CMD%"
start /wait "Software installation" "%INSTALL_CMD%" -q %OPTIONS%
set EXIT_CODE=%ERRORLEVEL%
goto end


:innoinstaller
echo Installing "%INSTALL_CMD%"
REM if "%OPTIONS%" == "" (
REM set OPTIONS=/verysilent /norestart /sp-
REM )
start /wait "Software installation" "%INSTALL_CMD%" /verysilent
/norestart /sp- %OPTIONS%
set EXIT_CODE=%ERRORLEVEL%
goto end


:installshieldinstaller
echo Installing "%INSTALL_CMD%"
start /wait "Software installation" "%INSTALL_CMD%" /s %OPTIONS%
set EXIT_CODE=%ERRORLEVEL%
goto end


:nsisinstaller
echo Installing "%INSTALL_CMD%"
start /wait "Software installation" "%INSTALL_CMD%" /S %OPTIONS%
set EXIT_CODE=%ERRORLEVEL%
goto end

:custominstaller
if "%OPTIONS%" == "" goto usage
echo Installing "%INSTALL_CMD%"
start /wait "Software installation" "%INSTALL_CMD%" %OPTIONS%
set EXIT_CODE=%ERRORLEVEL%
goto end

:usage
echo Usage:
echo "%~nx0 <type> <32-bit-installer> <64-bit-installer>
[installer-location [custom-options]]"
echo where type is one of
echo     msiinstall        Install the given MSI package
echo     msiuninstall      Uninstall the given MSI package
echo     innosetup         Inno setup
echo     installshield     Install shield
echo     nsis              Nullsoft install system (NSIS)
echo     custom            Custom installer - options required in this case
echo 32-bit-installer      Full file name (including extension) of
32-bit installer
echo 64-bit-installer      Full file name (including extension) of
64-bit installer
echo installer-location    Path where the installers are stored
echo custom-options        Replace the default installer options with
the ones given
exit /B 99

:end
exit /B %EXIT_CODE%




br,
Rainer



More information about the wpkg-users mailing list