1 | /**************************************************************************** |
2 | ** |
3 | ** Copyright (C) 2006-2009 Ralf Habacker. All rights reserved. |
4 | ** |
5 | ** This file is part of the KDE installer for windows |
6 | ** |
7 | ** This library is free software; you can redistribute it and/or |
8 | ** modify it under the terms of the GNU Library General Public |
9 | ** License version 2 as published by the Free Software Foundation. |
10 | ** |
11 | ** This library is distributed in the hope that it will be useful, |
12 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 | ** Library General Public License for more details. |
15 | ** |
16 | ** You should have received a copy of the GNU Library General Public License |
17 | ** along with this library; see the file COPYING.LIB. If not, write to |
18 | ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 | ** Boston, MA 02110-1301, USA. |
20 | ** |
21 | ****************************************************************************/ |
22 | |
23 | #ifndef INSTALLERCALLCONFIG_H |
24 | #define INSTALLERCALLCONFIG_H |
25 | |
26 | #include "misc.h" |
27 | #include "typehelper.h" |
28 | |
29 | #include <QString> |
30 | |
31 | /** |
32 | InstallerCallConfig provides package related informations from the |
33 | installer filename which could be used to skip related wizard pages |
34 | or to implement specific gui applications. |
35 | |
36 | - which package to install (e.g. umbrello) |
37 | - which compiler (e.g vc90, mingw4) |
38 | - which release type (e.g. stable,nightly,unstable) |
39 | - which release version (e.g. 4.4.4) |
40 | - which download server |
41 | |
42 | The filename has to build in the following manner: |
43 | |
44 | setup-<packageName>-<compiler>-<releaseType>-<version>[-<mirror>].exe |
45 | |
46 | '-' in packagenames has to be replaced by '_' |
47 | |
48 | parts in [] are optional |
49 | */ |
50 | |
51 | class InstallerCallConfig { |
52 | public: |
53 | InstallerCallConfig(const QString &fileName=QString()); |
54 | bool isValid() { return key == "setup" ; } |
55 | |
56 | static InstallerCallConfig &instance(); |
57 | |
58 | QString packageName; |
59 | ReleaseType releaseType; |
60 | QString version; |
61 | QString mirror; |
62 | CompilerTypes::Type compilerType; |
63 | bool hasReleaseType; |
64 | bool hasVersion; |
65 | bool hasMirror; |
66 | bool hasSDK; |
67 | |
68 | protected: |
69 | bool isLoaded; |
70 | QString key; |
71 | QString installerBaseName; |
72 | |
73 | }; |
74 | |
75 | |
76 | |
77 | #endif |
78 | |