Distributing (third party) KDE apps as a bundle
Laurent Espitallier
laurent.espitallier at laposte.net
Sat Jun 5 01:13:13 CEST 2010
Le 04/06/2010 15:29, Thomas Friedrichsmeier a écrit :
> speaking only for RKWard, here, I'd say many thanks for the offer, but I
> think we don't have much use for this, ATM. We are quite happy with our
> installation procedure, now, and adding another layer around this only
> for adding a shortcuts, automatically, seems like overkill to me.
>
> One thing that I could imagine to be useful in general would be an NSIS
> template that
> 1) autodetects / asks for an existing KDE installation to install an app to
> 2) checks certain parameters of that installation (minimum version,
> compiler flavor, possibly presence of specific apps / libraries), and
> 3) offers to create a new KDE installation (or update an existing one),
> fully automatically, if no suitable installation exists.
>
> However, judging from my experience with NSIS, this is not going to be
> too easy. And I think there may be much easier ways to cover the most
> common use case(s). So what are the most common deployment scenarios?
>
> 1) A KDE enthusiast wants to "have KDE" on windows, that is all
> available applications, or at least a sizeable bunch of KDE apps.
> 2a) A "regular" user wants to install one particular application on
> windows. That application happens to be based on KDE.
> 2b) The same user wants to install one or more further KDE applications,
> later.
>
> I would guess that 2b is least common, followed by 1, and 2a is the most
> common scenario today. Possibly I'm underestimating the importance of 1,
> but also, that is already covered by the kdewin-installer, nicely. So,
> is there any way to make 2a easier?
>
> Well, if a basic KDE installation (say kdebase-apps, kdepimlibs, and
> dependencies; that should cover most applications needs) would be
> available, centrally, as a single-download binary bundle it would be a
> lot easier for us (RKWard) and others to simply distribute their KDE
> based apps as an easy to use installation bundle. Of course this does
> not make too much sense unless and until other projects / people are
> actually interested in using this. So - would this sound interesting to
> anybody else?
>
> Regards
> Thomas
> _______________________________________________
> Kde-windows mailing list
> Kde-windows at kde.org
> https://mail.kde.org/mailman/listinfo/kde-windows
>
>
No problem, I understand.
I think I would have done things like that to begin with. Unfortunately
checking for dll version / dependencies is really more difficult. I only
know that "QtCore4.dll" file has the version information stored but no
KDE-baseworkspace dll.
-----
# This script requires : "Inetc" plugin, "ProcFunc.nsh" include
!define APP_NAME "Test"
!define APP_VERSION "0.0.0.0"
!define KDE_SETTINGSPATH "$APPDATA\.kde"
!define KDE_PROCESSTOCHECK "kded4.exe"
!define KDE_SETUPURL
"http://www.winkde.org/pub/kde/ports/win32/installer/kdewin-installer-gui-latest.exe"
!define KDEINSTALLER_INI "\etc\installer.ini"
!define KDEINSTALLER_INI2 "$APPDATA\KDE\installer.ini"
!define WIN_VERSION "win32"
!include "ProcFunc.nsh"
!include "FileFunc.nsh"
!include "StrFunc.nsh"
${StrRep}
Name "${APP_NAME} ${APP_VERSION}"
OutFile "${APP_NAME}_${APP_VERSION}.exe"
XPStyle on
;RequestExecutionLevel admin
Var compilertype
Var kdeversion
Page directory
Page instfiles
!macro ABORTSETUP ABORTMSG
MessageBox MB_OK "${ABORTMSG}"
Abort
!macroend
Section "Prerequisites and dependencies"
IfFileExists "$INSTDIR${KDEINSTALLER_INI}" +2 0
!insertmacro ABORTSETUP "Error, can't find
$INSTDIR${KDEINSTALLER_INI}"
; DEPENDENCIES ...
ReadIniStr $compilertype "$INSTDIR${KDEINSTALLER_INI}"
"General" "compilerType"
SectionEnd
Section "Install Files"
SetOutPath $INSTDIR
File "example.file"
SectionEnd
Function .onInit
InitPluginsDir
checkrootpath:
;Check if kde settings folder already exists (maybe not very
useful :-))
IfFileExists "${KDE_SETTINGSPATH}" 0 download_yesno
;Check path with a process in memory
${GetProcessPath} "${KDE_PROCESSTOCHECK}" $0
StrCmp $0 0 next 0
${GetParent} $0 $0
${GetParent} $0 $0
StrCpy $INSTDIR $0
Goto rootfound
;Check path in installer.ini file
next:
ReadIniStr $0 ${KDEINSTALLER_INI2} "General" "rootdir"
StrCmp $0 0 download_yesno 0
StrCpy $INSTDIR $0
Goto rootfound
download_yesno:
MessageBox MB_OKCANCEL "'KDE SC on Windows' root path not
found. Download and install latest installer GUI ?" IDCANCEL cancel
inetc::get "${KDE_SETUPURL}" "$PLUGINSDIR\kde-installer-temp.exe"
ExecWait "$PLUGINSDIR\kde-installer-temp.exe"
Goto checkrootpath
cancel:
MessageBox MB_OK "You'll need to browse for 'KDE SC on Windows'
root path"
rootfound:
${StrRep} $INSTDIR $INSTDIR "\\" "\"
FunctionEnd
More information about the Kde-windows
mailing list