Skip to content

Commit

Permalink
Windows Installer Overhaul
Browse files Browse the repository at this point in the history
- Database Setup is now done by the installer itself
- Added database dialog for that
- Interactively the administrator login is directly checked
  and installation cannot go on if administrative account cannot login
- Added logging functions to better be able to debug installer
  Variable $WriteLogs is used for that.
- Debug installer always writes logs
- Passwords for psql login are transferred in environment variables, no
  passwords are written to files.
- Help text if called with /? now really is the first done.
- If silent installer aborts, it writes a file "abortreason" to $TEMP
- Installer Parameters added:
  - /INSTALLDIRECTOR select director section for install
    this also selects bconsole section
  - /INSTALLSTORAGE selects storage section for install
  - /DBADMINUSER=<user> sets the database admin user,
    default=postgres
  - /DBADMINPASSWORD=<password> sets the database admin password
    default=<empty>
    DBADMINUSER and DBADMINPASSWORD are used to create the bareos
    databases. If login is not possible silent installer will abort
  - /WRITELOGS makes also non-debug installer write logs
  • Loading branch information
pstorz authored and Marco van Wieringen committed Feb 17, 2015
1 parent 201ce44 commit 014dabe
Show file tree
Hide file tree
Showing 4 changed files with 416 additions and 89 deletions.
116 changes: 116 additions & 0 deletions platforms/win32/databasedialog.ini
@@ -0,0 +1,116 @@
; Ini file generated by the HM NIS Edit IO designer.
[Settings]
NumFields=14

[Field 1]
Type=Groupbox
Text=Bareos Director Database Connection
Left=0
Right=299
Top=71
Bottom=114

[Field 2]
Type=Groupbox
Text=Administrative DB Account to setup Bareos Database
Left=0
Right=299
Top=0
Bottom=70

[Field 3]
Type=Text
State=DB Admin Username
Left=98
Right=295
Top=9
Bottom=22

[Field 4]
Type=Text
State=DB Admin Password
Left=98
Right=295
Top=25
Bottom=38

[Field 5]
Type=Text
State=DB User
Left=41
Right=152
Top=82
Bottom=95

[Field 6]
Type=Text
State=DB Password
Left=41
Right=152
Top=96
Bottom=109

[Field 7]
Type=Text
State=DB Name
Left=180
Right=294
Top=80
Bottom=93

[Field 8]
Type=Text
Flags=ONLY_NUMBERS
State=DB Port
Left=180
Right=294
Top=96
Bottom=109

[Field 9]
Type=Label
Text=Password
Left=6
Right=40
Top=98
Bottom=106

[Field 10]
Type=Label
Text=Port
Left=158
Right=171
Top=98
Bottom=106

[Field 11]
Type=Label
Text=User
Left=6
Right=38
Top=84
Bottom=92

[Field 12]
Type=Label
Text=Name
Left=158
Right=176
Top=83
Bottom=91

[Field 13]
Type=Label
Text=DB Admin Username
Left=9
Right=74
Top=11
Bottom=19

[Field 14]
Type=Label
Text=DB Admin Password
Left=9
Right=73
Top=25
Bottom=33
4 changes: 2 additions & 2 deletions platforms/win32/directordialog.ini
Expand Up @@ -12,15 +12,15 @@ Bottom=51

[Field 2]
Type=Text
State=Text
State=Director Network Address
Left=98
Right=295
Top=12
Bottom=25

[Field 3]
Type=Text
State=Text
State=Director Password
Left=98
Right=295
Top=28
Expand Down
7 changes: 5 additions & 2 deletions platforms/win32/winbareos-nsi.spec
Expand Up @@ -67,6 +67,8 @@ Source4: storagedialog.ini
Source5: KillProcWMI.dll
Source6: bareos.ico
Source7: AccessControl.dll
Source8: LogEx.dll
Source9: databasedialog.ini
%description
bareos

Expand All @@ -88,6 +90,7 @@ bareos
mkdir -p $RPM_BUILD_ROOT/nsisplugins
cp %SOURCE5 $RPM_BUILD_ROOT/nsisplugins # KillProcWMI
cp %SOURCE7 $RPM_BUILD_ROOT/nsisplugins # AccessControl
cp %SOURCE8 $RPM_BUILD_ROOT/nsisplugins # LogEx

mkdir $RPM_BUILD_ROOT/release32
mkdir $RPM_BUILD_ROOT/release64
Expand Down Expand Up @@ -153,8 +156,8 @@ for cfg in /etc/mingw64-winbareos/*.conf; do
cp $cfg $RPM_BUILD_ROOT/release64
done

cp %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 %SOURCE5 %SOURCE6 %SOURCE7 %_sourcedir/LICENSE $RPM_BUILD_ROOT/release32
cp %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 %SOURCE5 %SOURCE6 %SOURCE7 %_sourcedir/LICENSE $RPM_BUILD_ROOT/release64
cp %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 %SOURCE6 %SOURCE9 %_sourcedir/LICENSE $RPM_BUILD_ROOT/release32
cp %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 %SOURCE6 %SOURCE9 %_sourcedir/LICENSE $RPM_BUILD_ROOT/release64

makensis -DVERSION=%version -DPRODUCT_VERSION=%version-%release -DBIT_WIDTH=32 -DWIN_DEBUG=%{WIN_DEBUG} $RPM_BUILD_ROOT/release32/winbareos.nsi
makensis -DVERSION=%version -DPRODUCT_VERSION=%version-%release -DBIT_WIDTH=64 -DWIN_DEBUG=%{WIN_DEBUG} $RPM_BUILD_ROOT/release64/winbareos.nsi
Expand Down

0 comments on commit 014dabe

Please sign in to comment.