8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 18:43:02 +01:00

Front port misc changes to installer packaging from FB5

This commit is contained in:
Paul Reeves 2024-07-29 12:20:13 +02:00
parent a7d10a4014
commit e2ee6afa0a
9 changed files with 99 additions and 66 deletions

View File

@ -54,7 +54,7 @@ if not defined FB2_SNAPSHOT (set FB2_SNAPSHOT=0)
:: Are we doing a snapshot build? If so we always do less work.
if "%FB2_SNAPSHOT%"=="1" (
(set FBBUILD_ISX_PACK=0)
( set FBBUILD_ISX_PACK=0 )
)
@ -69,14 +69,14 @@ if "%FB2_SNAPSHOT%"=="1" (
:: let's bail out now.
@echo o Checking for sed...
(cmd /c "sed.exe --version 2>&1 > nul ") || ( call :ERROR Could not locate sed && @goto :EOF )
@(cmd /c "sed.exe --version 2>&1 > nul ") || ( call :ERROR Could not locate sed & goto :EOF )
@echo o Checking for unix2dos...
(cmd /c "unix2dos.exe --quiet --version 2>&1 > nul" ) || ( call :ERROR Could not locate unix2dos && @goto :EOF )
@(cmd /c "unix2dos.exe --quiet --version 2>&1 > nul" ) || ( call :ERROR Could not locate unix2dos & goto :EOF )
@for /f "usebackq tokens=*" %%c in (`where /f md5sum 2^>nul`) do set MD5_COMMAND=%%c
if defined MD5_COMMAND (
@echo o POSIX md5sum utility found at %MD5_COMMAND%
@for /f "usebackq tokens=*" %%c in ( `where /f md5sum 2^>nul` ) do set MD5_COMMAND=%%c
@if defined MD5_COMMAND (
echo o POSIX md5sum utility found at %MD5_COMMAND%
)
@if %FBBUILD_ZIP_PACK% EQU 1 (
@ -101,8 +101,8 @@ if defined MD5_COMMAND (
for /f "usebackq tokens=*" %%c in ( `where /f iscc 2^>nul` ) do set ISCC_COMMAND=%%c
)
@if not defined ISCC_COMMAND (
@echo Required Inno Setup compiler not found
@exit /b 1
echo Required Inno Setup compiler not found
exit /b 1
)
@echo o Inno Setup found as %ISCC_COMMAND%.
@ -192,7 +192,7 @@ set FBBUILD_INSTALL_IMAGES=%FB_ROOT_PATH%\builds\install_images
%SED_COMMAND% %%f > %FB_GEN_DIR%\readmes\%%f
)
@for %%d in (ba cz de es fr hu it pl pt ru si ) do (
if not exist %FB_GEN_DIR%\readmes\%%d ( @mkdir %FB_GEN_DIR%\readmes\%%d )
if not exist %FB_GEN_DIR%\readmes\%%d ( mkdir %FB_GEN_DIR%\readmes\%%d )
for %%f in ( %%d\*.txt ) do (
echo Processing version strings in %%f
%SED_COMMAND% %%f > %FB_GEN_DIR%\readmes\%%f
@ -201,6 +201,9 @@ set FBBUILD_INSTALL_IMAGES=%FB_ROOT_PATH%\builds\install_images
@endlocal
:: Dump env vars to file for later testing.
@set > %FB_ROOT_PATH%\builds\install\arch-specific\win32\test_installer\fb_build_vars_%PROCESSOR_ARCHITECTURE%.txt
::End of SET_VERSION
::----------------
@goto :EOF
@ -232,11 +235,13 @@ set FBBUILD_INSTALL_IMAGES=%FB_ROOT_PATH%\builds\install_images
)
)
@where /Q implib.exe
@if not ERRORLEVEL 1 (
if "%VSCMD_ARG_TGT_ARCH%"=="x86" (
@if "%VSCMD_ARG_TGT_ARCH%"=="x86" (
echo Generating fbclient_bor.lib
where /Q implib.exe
if not ERRORLEVEL 1 (
implib %FB_OUTPUT_DIR%\lib\fbclient_bor.lib %FB_OUTPUT_DIR%\fbclient.dll > nul
) else (
call :ERROR implib not found & goto :EOF
)
)
@ -300,7 +305,7 @@ set FBBUILD_INSTALL_IMAGES=%FB_ROOT_PATH%\builds\install_images
echo ... %FB_EXTERNAL_DOCS%\%%v to %FB_OUTPUT_DIR%\doc\%%v
copy /Y %FB_EXTERNAL_DOCS%\%%v %FB_OUTPUT_DIR%\doc\%%v > nul
if ERRORLEVEL 1 (
call :ERROR Copying %FB_EXTERNAL_DOCS%\%%v to %FB_OUTPUT_DIR%\doc\%%v FAILED. & @goto :EOF
call :ERROR Copying %FB_EXTERNAL_DOCS%\%%v to %FB_OUTPUT_DIR%\doc\%%v FAILED. & goto :EOF
)
)
@ -308,7 +313,9 @@ set FBBUILD_INSTALL_IMAGES=%FB_ROOT_PATH%\builds\install_images
for %%v in ( firebird-%FB_MAJOR_VER%-quickstartguide.pdf ) do (
echo ... %%v
copy /Y %FB_EXTERNAL_DOCS%\%%v %FB_OUTPUT_DIR%\doc\%%v > nul
if ERRORLEVEL 1 ( call :WARNING Copying %FB_EXTERNAL_DOCS%\%%v to %FB_OUTPUT_DIR%\doc\%%v FAILED. & @goto :EOF )
if ERRORLEVEL 1 (
call :WARNING Copying %FB_EXTERNAL_DOCS%\%%v to %FB_OUTPUT_DIR%\doc\%%v FAILED. & goto :EOF
)
)
echo Finished copying pdf docs...
@ -333,7 +340,7 @@ for %%v in (IPLicense.txt IDPLicense.txt ) do (
:: Walk through all docs and transform any that are not .txt, .pdf or .html to .txt
@echo Setting .txt filetype to ascii docs.
for /R %FB_OUTPUT_DIR%\doc %%v in ( * ) do (
@for /R %FB_OUTPUT_DIR%\doc %%v in ( * ) do (
if /I not "%%~xv" == ".md" (
if /I not "%%~xv" == ".txt" (
if /I not "%%~xv" == ".pdf" (
@ -390,11 +397,11 @@ for /R %FB_OUTPUT_DIR%\doc %%v in ( * ) do (
:: grab some missing bits'n'pieces from different parts of the source tree
::=========================================================================
@echo Copying ib_util etc
@copy %FB_ROOT_PATH%\src\extlib\ib_util.h %FB_OUTPUT_DIR%\include > nul || (call :WARNING Copying ib_util.h failed. && @goto :EOF )
@copy %FB_ROOT_PATH%\src\misc\pascal\ib_util.pas %FB_OUTPUT_DIR%\include > nul || (call :WARNING Copying ib_util.pas failed. && @goto :EOF )
@copy %FB_ROOT_PATH%\src\extlib\ib_util.h %FB_OUTPUT_DIR%\include > nul || (call :WARNING Copying ib_util.h failed. & goto :EOF )
@copy %FB_ROOT_PATH%\src\misc\pascal\ib_util.pas %FB_OUTPUT_DIR%\include > nul || (call :WARNING Copying ib_util.pas failed. & goto :EOF )
@echo Copying other include files required for development...
set OUTPATH=%FB_OUTPUT_DIR%\include
@set OUTPATH=%FB_OUTPUT_DIR%\include
@copy %FB_ROOT_PATH%\src\yvalve\perf.h %OUTPATH%\ > nul
@copy %FB_ROOT_PATH%\src\include\gen\firebird.pas %OUTPATH%\firebird\ > nul || (@call :ERROR Failure executing copy %FB_ROOT_PATH%\src\include\gen\firebird.pas %OUTPATH%\firebird\ )
@if ERRORLEVEL 1 goto :END
@ -437,7 +444,7 @@ set OUTPATH=%FB_OUTPUT_DIR%\include
:: that and they all have windows EOL
::===============================================
@for /R %FB_OUTPUT_DIR% %%W in ( *.txt *.conf *.sql *.c *.cpp *.hpp *.h *.bat *.pas *.e *.def *.rc *.md *.html ) do (
unix2dos --quiet --safe %%W || exit /b 1
unix2dos --safe %%W > nul 2>&1 || exit /b 1
)
::End of SET_CRLF
@ -627,20 +634,20 @@ popd
@echo.
@echo Reading command-line parameters...
@(@call :SET_PARAMS %* )
@if ERRORLEVEL 1 (@call :ERROR Calling SET_PARAMS & goto :END)
@(call :SET_PARAMS %* )
@if ERRORLEVEL 1 (call :ERROR Calling SET_PARAMS & goto :END)
@echo.
@echo Checking that all required components are available...
@(@call :CHECK_ENVIRONMENT ) || ( @echo Error calling CHECK_ENVIRONMENT && @goto :END )
@( call :CHECK_ENVIRONMENT ) || ( echo Error calling CHECK_ENVIRONMENT & goto :END )
@echo.
@echo Setting version number...
@(@call :SET_VERSION ) || (@echo Error calling SET_VERSION && @goto :END )
@( call :SET_VERSION ) || ( echo Error calling SET_VERSION & goto :END )
@echo.
@echo Copying additional files needed for installation, documentation etc.
@( @call :COPY_XTRA ) || ( @echo Error calling COPY_XTRA && @goto :END )
@( call :COPY_XTRA ) || ( echo Error calling COPY_XTRA & goto :END )
@echo.
:: WIX is not necessary for a snapshot build, so we don't throw
@ -648,19 +655,19 @@ popd
:: if it is there anyway, use it.
@if defined WIX (
echo Building MSI runtimes
( call :BUILD_CRT_MSI ) || ( echo Error calling BUILD_CRT_MSI & @goto :END )
( call :BUILD_CRT_MSI ) || ( echo Error calling BUILD_CRT_MSI & goto :END )
echo.
)
@echo Prepare include directory
@( call :INCLUDE_DIR ) || ( @echo Error calling INCLUDE_DIR & @goto :END )
@( call :INCLUDE_DIR ) || ( echo Error calling INCLUDE_DIR & goto :END )
@echo.
@echo Writing databases conf
@(call :DB_CONF ) || ( echo Error calling DB_CONF & goto :END )
@( call :DB_CONF ) || ( echo Error calling DB_CONF & goto :END )
@echo.
@echo Copying firebird.msg
@(call :FB_MSG ) || ( echo Error calling FB_MSG & goto :END )
@( call :FB_MSG ) || ( echo Error calling FB_MSG & goto :END )
@echo.
@echo Fix up line endings...
@ -698,4 +705,3 @@ popd
exit /b %ERRLEV%

View File

@ -8,7 +8,7 @@
; for the specific language governing rights and limitations under the
; License.
;
; The Original Code is copyright 2001-2021 Paul Reeves for IBPhoenix.
; The Original Code is copyright 2001-2024 Paul Reeves for IBPhoenix.
;
; The Initial Developer of the Original Code is Paul Reeves for IBPhoenix.
;
@ -586,7 +586,6 @@ Source: {#FilesDir}\misc\*.*; DestDir: {app}\misc; Components: ServerComponent;
Source: {#FilesDir}\tzdata\*.*; DestDir: {app}\tzdata; Components: ClientComponent; Flags: ignoreversion;
;Source: {#FilesDir}\system32\Firebird2Control.cpl; DestDir: {sys}; Components: ServerComponent; MinVersion: {#MinVer}; Flags: sharedfile ignoreversion promptifolder restartreplace uninsrestartdelete; Check: InstallCPLApplet
#endif /* files */
#ifdef examples
@ -883,19 +882,34 @@ var
TempDir: String;
ResultCode: Integer;
CmdStr: string;
InputStr: string;
OutputStr: string;
begin
TempDir := ExpandConstant( '{tmp}' );
CmdStr := ExpandConstant( '{app}\isql.exe' );
InputStr := TempDir + '\' + 'temp.sql';
OutputStr := InputStr + '.txt';
// Ensure these files do not already exist.
if FileExists( InputStr ) then DeleteFile( InputStr );
if FileExists( OutputStr ) then DeleteFile( OutputStr );
AStringList := TStringList.create;
with AStringList do begin
Add( 'create user ' + GetAdminUserName + ' password ''' + GetAdminUserPassword + ''' using plugin Srp;' );
Add( 'commit;' ); //Technically exit implies a commit so this not necessary. OTOH, explicitly committing makes for more readable code.
Add( 'create or alter user ' + GetAdminUserName + ' password ''' + GetAdminUserPassword + ''' using plugin Srp;' );
Add( 'exit;' );
SaveToFile( Tempdir +'\temp.sql' );
SaveToFile( InputStr );
end;
Result := Exec( CmdStr , ' -m -m2 -user SYSDBA -i ' + TempDir + '\temp.sql -o ' + TempDir + '\temp.sql.txt employee ' , TempDir, SW_HIDE, ewWaitUntilTerminated, ResultCode );
DeleteFile( TempDir + '\temp.sql');
DeleteFile( TempDir + '\temp.sql.txt');
Result := Exec( CmdStr , ' -m -m2 -user SYSDBA -i ' + InputStr + ' -o ' + OutputStr + ' employee ' , TempDir, SW_HIDE, ewWaitUntilTerminated, ResultCode );
if ResultCode <> 0 then begin
Result := False;
Log( 'In function InitSecurityDB Exec isql returned ' + IntToStr(ResultCode) + ' executing ' + InputStr );
end;
if FindInFile( OutputStr, 'error' ) then begin
Result := False;
Log( 'In function InitSecurityDB FindInFile found an error in ' + OutputStr );
end;
end;
@ -1248,4 +1262,3 @@ end;
begin
end.
; kate: replace-tabs on; indent-width 2; tab-width 2; replace-tabs-save on; syntax Pascal;

View File

@ -118,10 +118,11 @@ Const
FB80_x64_Install = 26;
FB90Install = 27;
FB90_x64_Install = 28;
MaxProdInstalled = FB90_x64_Install;
Current32Install = FB{#FB_MAJOR_VER}0Install;
Current64Install = FB{#FB_MAJOR_VER}0_x64_Install;
MaxProdInstalled = FB90_x64_Install;
//ProductsInstalled
IB4 = 0;
@ -1046,7 +1047,7 @@ procedure SetupSharedFilesArray;
//to list them in the order they appear in the setup script
// Shared Files are defined as either:
// - Files which are absolutely necessary for a functioning installation.
// Hence gbak and gfix are shared files, isql is not
// Hence gbak and gfix are shared files, isql and qli are not
// - Libraries
// - License files
begin
@ -1451,7 +1452,6 @@ begin
//If existing install of the same majorver.minorver is
//found then we can upgrade it.
//// **** FIX ME **** Don't use hardcoded constants here. They get overlooked.
if ( (ProductsInstalledCount = 1) AND
#if PlatformTarget == "x64"
((ProductsInstalled AND FB{#FB_MAJOR_VER}0_x64 ) = FB{#FB_MAJOR_VER}0_x64 ) ) then begin

View File

@ -356,6 +356,20 @@ begin
end;
function FindInFile( Filename, StringToFind: String): Boolean;
var
i: Integer;
AString: AnsiString;
begin
Result := False;
LoadStringFromFile( Filename, Astring );
i := Length( Astring );
if i <> 0 then
i := Pos ( StringToFind, Astring );
if i <> 0 then Result := True;
end;
procedure DecodeVersion( VerStr: String; var VerInt: array of Integer );
var
i,p: Integer; s: string;

View File

@ -38,7 +38,7 @@ Pogledajte UNINSTALL sekciju ispod za vise informacija o ovome.
Ako ste instalirali beta ili alpha verziju
firebird-a, instalacija ce preimenovati firebird.conf i
security6.fdb jer ove datoteke vise nisu kompatibilne.
security$MAJOR.fdb jer ove datoteke vise nisu kompatibilne.
Deployment gds32.dll
@ -69,7 +69,7 @@ Re-instalacija Firebird-a
Instalacioni program radi sve sto moze da detektuje i
sacuva prethodnu instalaciju. Ako instalacija detektuje
firebird.conf ili security6.fdb onda nece ponuditi
firebird.conf ili security$MAJOR.fdb onda nece ponuditi
opciju da instalira legacy_auth. Niti ce ponuditi
opciju da postavi SYSDBA username i password.
@ -128,7 +128,7 @@ o Deinstalacija ostavlja 6 datoteka u install
- fbtrace.conf
- replication.conf
- firebird.log
- security6.fdb
- security$MAJOR.fdb
Ovo je uradjeno namjerno. Ove datoteke su sve
potencijalno modifikovane od strane korisnika i mogu

View File

@ -38,7 +38,7 @@ viz část ODINSTALACE níže.
Máte-li nainstalovanou beta či alpha verzi
Firebirdu $MAJOR.$MINOR, instalátor přejmenuje firebird.conf
a security6.fdb, jelikož tyto soubory již nejsou kompatibilní.
a security$MAJOR.fdb, jelikož tyto soubory již nejsou kompatibilní.
Instalace gds32.dll
@ -63,7 +63,7 @@ Reinstalace of Firebird $MAJOR.$MINOR
---------------------------
Instalační program dělá vše pro detekci a zachování předchozí instalace.
Jestliže instalátor rozpozná firebird.conf či security6.fdb, nebude
Jestliže instalátor rozpozná firebird.conf či security$MAJOR.fdb, nebude
nabízet možnost instalace legacy_auth. Rovněž nebude nabízet
volbu pro nastavení hesla pro SYSDBA.
@ -123,7 +123,7 @@ o Odinstalace v instalační složce zanechá
- fbtrace.conf
- replication.conf
- firebird.log
- security6.fdb
- security$MAJOR.fdb
To je záměr. Všechny tyto soubory jsou
potencionálně pozměnitelné uživatelem a

View File

@ -28,7 +28,7 @@ Contenu
o Avant l'installation
o Déployement de gds32.dll
o Installation du Guardian
o Réinstallation de Firebird
o Réinstallation de Firebird $MAJOR
o Problèmes connus d'installation
o Desinstallation
o Installation depuis un fichier batch
@ -44,7 +44,7 @@ Il est particulièrement important de vérifier que
fbclient.dll et gds32.dll ont été retirés de <system32>.
Si vous avez installé une version beta ou alpha de Firebird $MAJOR.$MINOR,
l'installeur va renommer firebird.conf et security6.fdb, car ces
l'installeur va renommer firebird.conf et security$MAJOR.fdb, car ces
fichiers ne sont plus compatibles avec la version actuelle.
@ -132,7 +132,7 @@ o La désinstallation laisse six fichiers dans le
- fbtrace.conf
- replication.conf
- firebird.log
- security6.fdb
- security$MAJOR.fdb
Ceci est intentionnel. Ces fichiers sont tous
potentiellement modifiables par les utilisateurs et peuvent

View File

@ -36,7 +36,7 @@ o Установка из пакетного (bat) файла
каталога <system32>.
Если у вас установлена Альфа или Бета версия Firebird $MAJOR.$MINOR,
то программа установки переименует файлы firebird.conf и security6.fdb
то программа установки переименует файлы firebird.conf и security$MAJOR.fdb
из-за их несовместимости с устанавливаемой версией.
@ -67,7 +67,7 @@ MS VC runtime версии 10.0 установлены в системе.
Программа установки пытается обнаружить и сохранить ранее установленную
версию Firebird. Если программа установки обнаруживает файлы firebird.conf
или security6.fdb, то некоторые настройки авторизации могут быть недоступны,
или security$MAJOR.fdb, то некоторые настройки авторизации могут быть недоступны,
в частности возможность установить пароль пользователя SYSDBA.
@ -124,7 +124,7 @@ o Деинсталлятор оставляет следующие файлы в
- fbtrace.conf
- replication.conf
- firebird.log
- security6.fdb
- security$MAJOR.fdb
Это происходит намеренно. Эти файлы потенциально
могут быть изменены пользователем и могут