mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-09 19:57:45 +01:00
win32 installer: restructured fpc directory layout
git-svn-id: trunk@9578 -
This commit is contained in:
parent
4067090770
commit
f6cb3fb257
@ -2,15 +2,13 @@ SET OLDCURDIR=%CD%
|
||||
SET OLDCURDRIVE=%CD:~,2%
|
||||
|
||||
SET SOURCE_DIR=%FPCSVNDIR%
|
||||
SET INSTALL_BASE=%BUILDDIR%\pp
|
||||
SET INSTALL_BINDIR=%INSTALL_BASE%\bin\i386-win32
|
||||
|
||||
%SOURCE_DIR:~,2%
|
||||
cd %SOURCE_DIR%
|
||||
%MAKEEXE% clean PP=%RELEASE_PPC% >> %LOGFILE% 2>&1
|
||||
%MAKEEXE% compiler_cycle PP=%RELEASE_PPC% >> %LOGFILE% 2>&1
|
||||
|
||||
set COMPILER=%SOURCE_DIR%/compiler/ppc386
|
||||
set COMPILER=%SOURCE_DIR%\compiler\ppc386.exe
|
||||
|
||||
%MAKEEXE% -C rtl clean PP=%COMPILER% >> %LOGFILE%
|
||||
%MAKEEXE% -C packages clean PP=%COMPILER% >> %LOGFILE%
|
||||
@ -18,10 +16,13 @@ set COMPILER=%SOURCE_DIR%/compiler/ppc386
|
||||
%MAKEEXE% rtl packages_base_all fcl packages_extra_all PP=%COMPILER% OPT="-g -gl -Ur -CX" >> %LOGFILE%
|
||||
%MAKEEXE% utils PP=%COMPILER% OPT="-CX -XX -Xs" DATA2INC=%SOURCE_DIR%\utils\data2inc >> %LOGFILE%
|
||||
|
||||
FOR /F %%L IN ('%COMPILER% -iV') DO SET FPCVERSION=%%L
|
||||
SET INSTALL_BASE=%BUILDDIR%\fpc\%FPCVERSION%
|
||||
SET INSTALL_BINDIR=%INSTALL_BASE%\bin\i386-win32
|
||||
%MAKEEXE% compiler_install rtl_install fcl_install packages_install utils_install INSTALL_PREFIX=%INSTALL_BASE% PP=%COMPILER% FPCMAKE=%FPCSVNDIR%\utils\fpcm\fpcmake.exe >> %LOGFILE%
|
||||
|
||||
SET COMPILER=%INSTALL_BINDIR%\ppc386.exe
|
||||
rem %MAKEEXE% clean PP=%COMPILER% >> %LOGFILE%
|
||||
%MAKEEXE% clean PP=%COMPILER% >> %LOGFILE%
|
||||
|
||||
%OLDCURDRIVE%
|
||||
cd %OLDCURDIR%
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
SET OLDCURDRIVE=%CD:~,2%
|
||||
SET OLDCURDIR=%CD%
|
||||
|
||||
SET COMPILER=%BUILDDIR%\pp\bin\i386-win32\ppc386.exe
|
||||
|
||||
%BUILDDRIVE%
|
||||
cd %BUILDDIR%
|
||||
%MAKEEXE% clean PP=%COMPILER% >> %LOGFILE%
|
||||
%MAKEEXE% lcl OPT="-gl -Ur" PP=%COMPILER% >> %LOGFILE%
|
||||
%MAKEEXE% lcl OPT="-gl -Ur" PP=%COMPILER% LCL_PLATFORM=gtk2 >> %LOGFILE%
|
||||
::%MAKEEXE% lcl OPT="-gl -Ur" PP=%COMPILER% LCL_PLATFORM=gtk2 >> %LOGFILE%
|
||||
%MAKEEXE% bigide OPT="-gl -Xs -XX" PP=%COMPILER% >> %LOGFILE%
|
||||
%FPCBINDIR%\strip.exe lazarus.exe
|
||||
|
||||
|
||||
@ -56,19 +56,19 @@ rmdir /s /q %BUILDDIR%
|
||||
%SVN% export %LAZSVNDIR% %BUILDDIR% >> %LOGFILE%
|
||||
..\..\svn2revisioninc %LAZSVNDIR% %BUILDDIR%\ide\revision.inc
|
||||
|
||||
:: copy fpc source
|
||||
gmkdir -p %BUILDDIR%\fpcsrc
|
||||
%SVN% export %FPCSVNDIR%\rtl %BUILDDIR%\fpcsrc\rtl >> %LOGFILE%
|
||||
%SVN% export %FPCSVNDIR%\fcl %BUILDDIR%\fpcsrc\fcl >> %LOGFILE%
|
||||
%SVN% export %FPCSVNDIR%\packages %BUILDDIR%\fpcsrc\packages >> %LOGFILE%
|
||||
|
||||
call build-fpc.bat
|
||||
|
||||
:: exit if no compiler has been made
|
||||
if not exist %BUILDDIR%\pp\bin\i386-win32\ppc386.exe goto END
|
||||
:: copy fpc source
|
||||
gmkdir -p %INSTALL_BASE%\source
|
||||
%SVN% export %FPCSVNDIR%\rtl %INSTALL_BASE%\source\rtl >> %LOGFILE%
|
||||
%SVN% export %FPCSVNDIR%\fcl %INSTALL_BASE%\source\fcl >> %LOGFILE%
|
||||
%SVN% export %FPCSVNDIR%\packages %INSTALL_BASE%\source\packages >> %LOGFILE%
|
||||
|
||||
%CP% %FPCBINDIR%\*.* %BUILDDIR%\pp\bin\i386-win32 >> %LOGFILE%
|
||||
samplecfg.vbs
|
||||
:: exit if no compiler has been made
|
||||
if not exist %INSTALL_BINDIR%\ppc386.exe goto END
|
||||
|
||||
%CP% %FPCBINDIR%\*.* %INSTALL_BINDIR% >> %LOGFILE%
|
||||
%INSTALL_BINDIR%\fpcmkcfg.exe -d "basepath=%INSTALL_BASE%" -o %INSTALL_BINDIR%\fpc.cfg
|
||||
|
||||
call build-lazarus.bat
|
||||
|
||||
@ -86,7 +86,7 @@ if not exist %BUILDDIR%\startlazarus.exe goto END
|
||||
if not exist output\lazarus-%LAZVERSION%-%DATESTAMP%-win32.exe goto END
|
||||
|
||||
:: delete build dir
|
||||
rd /s /q %BUILDDIR% > NUL
|
||||
::rd /s /q %BUILDDIR% > NUL
|
||||
|
||||
:END
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
EnableISX=true
|
||||
[Defines]
|
||||
#define AppVersion GetEnv('LazVersion')
|
||||
#define FPCVersion GetEnv('FPCVersion')
|
||||
#define AppName "Lazarus"
|
||||
#define SetupDate GetEnv('DateStamp')
|
||||
#define BuildDir GetEnv('BuildDir')
|
||||
@ -33,7 +34,6 @@ Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:Ad
|
||||
Source: {#BuildDir}\*.*; DestDir: {app}; Flags: recursesubdirs
|
||||
Source: environmentoptions.xml; DestDir: {app}; Flags: onlyifdoesntexist; AfterInstall: UpdateEnvironmentOptions
|
||||
Source: editoroptions.xml; DestDir: {app}; Flags: onlyifdoesntexist
|
||||
Source: samplefpc.cfg; DestDir: {app}\pp\bin\i386-win32; AfterInstall: UpdateFpcCfg; DestName: fpc.cfg
|
||||
|
||||
[INI]
|
||||
Filename: {app}\Lazarus Home Page.url; Section: InternetShortcut; Key: URL; String: http://www.lazarus.freepascal.org/
|
||||
@ -48,11 +48,15 @@ Name: {group}\Lazarus Wiki Help; Filename: {app}\Lazarus Wiki Help.url; IconFile
|
||||
Name: {group}\{cm:UninstallProgram,Lazarus}; Filename: {uninstallexe}
|
||||
Name: {userdesktop}\Lazarus; Filename: {app}\lazarus.exe; Tasks: desktopicon
|
||||
|
||||
[Run]
|
||||
Filename: {app}\fpc\{#FPCVersion}\bin\i386-win32\fpcmkcfg.exe; Parameters: "-d ""basepath={app}\fpc\{#FPCVersion}""-o fpc.cfg"; Flags: runhidden
|
||||
|
||||
[UninstallDelete]
|
||||
Name: {app}\compilertest.pas; Type: files
|
||||
Name: {app}\Lazarus Wiki Help.url; Type: files
|
||||
Name: {app}\Lazarus Home Page.url; Type: files
|
||||
Name: {app}\Lazarus Forums.url; Type: files
|
||||
Name: {app}\fpc\{#FPCVersion}\bin\i386-win32\fpc.cfg; Type: files
|
||||
|
||||
[Registry]
|
||||
Root: HKLM; SubKey: SOFTWARE\Classes\.lpi; ValueType: string; ValueData: LazarusProject; Flags: uninsdeletekeyifempty uninsdeletevalue; Check: IsHKLMWriteable
|
||||
@ -178,19 +182,8 @@ begin
|
||||
LoadStringFromFile(FileName, Content);
|
||||
StringChange(Content, '%Temp%', GetTempDir);
|
||||
StringChange(Content, '%LazDir%', ExpandConstant('{app}'));
|
||||
StringChange(Content, '%FpcSrcDir%', ExpandConstant('{app}\fpcsrc'));
|
||||
StringChange(Content, '%FpcBinDir%', ExpandConstant('{app}\pp\bin\i386-win32'));
|
||||
SaveStringToFile(FileName, Content, False);
|
||||
end;
|
||||
|
||||
procedure UpdateFpcCfg();
|
||||
var
|
||||
FileName: string;
|
||||
Content: string;
|
||||
begin
|
||||
FileName := ExpandConstant(CurrentFileName);
|
||||
LoadStringFromFile(FileName, Content);
|
||||
StringChange(Content, '$1', ExpandConstant('{app}\pp'));
|
||||
StringChange(Content, '%FpcSrcDir%', ExpandConstant('{app}\fpc\{#FPCVersion}\source'));
|
||||
StringChange(Content, '%FpcBinDir%', ExpandConstant('{app}\fpc\{#FPCVersion}\bin\i386-win32\'));
|
||||
SaveStringToFile(FileName, Content, False);
|
||||
end;
|
||||
|
||||
|
||||
@ -10,22 +10,22 @@ A.1 Inno Setup
|
||||
I used Inno Setup, a free installer for Windows programs. You can download it from http://www.jrsoftware.org/.
|
||||
|
||||
A.2 FPC sources
|
||||
The build script assumes you have a cvs version of the fpc sources. For information about getting the fpc sources from cvs see: http://www.freepascal.org/
|
||||
The build script assumes you have a svn version of the fpc sources. For information about getting the fpc sources from svn see: http://www.freepascal.org/
|
||||
|
||||
A.3 Lazarus sources
|
||||
A Lazarus cvs tree, containing the lazarus sources.
|
||||
A Lazarus svn tree, containing the lazarus sources.
|
||||
|
||||
A.4. fpc 1.0.10 compiler
|
||||
You need a fpc 1.0.10 compiler to bootstrap compilation of the current fpc version.
|
||||
A.4. The latest release of the fpc compiler
|
||||
You need a fpc 2.0.2 compiler (just the ppc386.exe) to bootstrap compilation of the current fpc version.
|
||||
|
||||
A.5 Debugger
|
||||
Download http://prdownloads.sourceforge.net/mingw/gdb-6.0-20031011.exe?download and install it in some directory. Set GDBDIR to this directory.
|
||||
|
||||
A.6 Translations of the GPL license
|
||||
The installer is able to show its messages in multiple languages. The lazarus cvs tree doesn't contain the translations of the GPL languages. Download those translations from http://www.gnu.org/licenses/translations.html and put them in a directory. At the moment the following files are needed:
|
||||
The installer is able to show its messages in multiple languages. The lazarus svn tree doesn't contain the translations of the GPL languages. Download those translations from http://www.gnu.org/licenses/translations.html and put them in a directory. At the moment the following files are needed:
|
||||
http://users.skynet.be/xterm/gpld.txt
|
||||
http://www.magnux.org/doc/GPL-pt_BR.txt
|
||||
Not for all languages the installer is capable of at the moment, there are text files on http://www.gnu.org/licenses/translations.html. For these languages the official GPL is shown.
|
||||
Not for all languages the installer can handle at the moment, there are text files on http://www.gnu.org/licenses/translations.html. For these languages the official GPL is shown.
|
||||
|
||||
A.7 Other binary utilities
|
||||
You need some third party binary utilities, for example make, ld, strip. Download a recent binary fpc installer, and extract asldw32.zip and makew32.zip to a new directory.
|
||||
@ -36,15 +36,14 @@ B Adjust create_installer.bat to your configuration
|
||||
Open the create_installer.bat in a text editor and set the LAZVERSION variable.
|
||||
Check the other variables, to see if they match your configuration:
|
||||
ISCC: Path to the Inno Setup Compiler
|
||||
FPCCVSDIR: Path to the fpc sources checked out of cvs
|
||||
LAZCVSDIR: Path to the lazarus sources checked out of cvs
|
||||
RELEASE_PPC: Path to fpc 1.0.10 compiler
|
||||
FPCSVNDIR: Path to the fpc sources checked out of svn
|
||||
LAZSVNDIR: Path to the lazarus sources checked out of svn
|
||||
RELEASE_PPC: Path to fpc 2.0.2 compiler
|
||||
FPCBINDIR: Path to the directory containing some utilities used by fpc
|
||||
GDBDIR: Path to the directory containing the mingw gdb debugger installation
|
||||
BUILDDIR: Path to build directory.
|
||||
EXPORTCVS: Path to the tool to create an export using a local cvs directory
|
||||
LICENSEDIR: Path to the directory containing translations of the GPL license
|
||||
|
||||
C Run create_installer.bat
|
||||
|
||||
Just do it. Wait 20 - 30 minutes. A log file named installer.log will be written to the current directory.
|
||||
Just do it. Wait about 40 minutes (on 2.6 GHz P-IV). A log file named installer.log will be written to the current directory.
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
Option explicit
|
||||
|
||||
Dim WSHShell
|
||||
Dim FS
|
||||
Dim InFileName
|
||||
Dim OutFileName
|
||||
Dim PPDir
|
||||
Dim InFile
|
||||
Dim OutFile
|
||||
Dim AllText
|
||||
Dim NewText
|
||||
|
||||
Set WSHShell = WScript.CreateObject("WScript.Shell")
|
||||
|
||||
InFileName = "samplefpc.cfg"
|
||||
OutFileName = WSHShell.ExpandEnvironmentStrings("%BuildDir%")& "\pp\bin\i386-win32\fpc.cfg"
|
||||
PPDir = WSHShell.ExpandEnvironmentStrings("%BuildDir%") & "\pp"
|
||||
|
||||
Set fs = CreateObject("Scripting.FileSystemObject")
|
||||
Set InFile = fs.OpenTextFile(InFileName)
|
||||
AllText = InFile.ReadAll
|
||||
InFile.Close
|
||||
|
||||
NewText = Replace(AllText,"$1",PPDIR,1, -1,0)
|
||||
|
||||
Set OutFile = fs.CreateTextFile(OutFileName, True)
|
||||
OutFile.WriteLine(NewText)
|
||||
OutFile.Close
|
||||
@ -1,173 +0,0 @@
|
||||
#
|
||||
# Example fpc.cfg for Free Pascal Compiler Version 1.9.0
|
||||
#
|
||||
|
||||
# ----------------------
|
||||
# Defines (preprocessor)
|
||||
# ----------------------
|
||||
|
||||
#
|
||||
# nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed
|
||||
#
|
||||
# -d is the same as #DEFINE
|
||||
# -u is the same as #UNDEF
|
||||
#
|
||||
|
||||
#
|
||||
# Some examples (for switches see below, and the -? helppages)
|
||||
#
|
||||
# Try compiling with the -dRELEASE or -dDEBUG on the commandline
|
||||
#
|
||||
|
||||
# For a release compile with optimizes and strip debuginfo
|
||||
#IFDEF RELEASE
|
||||
-OG2p2
|
||||
-Xs
|
||||
#WRITE Compiling Release Version
|
||||
#ENDIF
|
||||
|
||||
# For a debug version compile with debuginfo and all codegeneration checks on
|
||||
#IFDEF DEBUG
|
||||
-g
|
||||
-Crtoi
|
||||
#WRITE Compiling Debug Version
|
||||
#ENDIF
|
||||
|
||||
# ----------------
|
||||
# Parsing switches
|
||||
# ----------------
|
||||
|
||||
# All assembler blocks are intel styled by default
|
||||
#-Rintel
|
||||
|
||||
# All assembler blocks are AT&T styled by default
|
||||
#-Ratt
|
||||
|
||||
# All assembler blocks are directly copied to asm
|
||||
#-Rdirect
|
||||
|
||||
# Semantic checking
|
||||
# -S2 switch some Delphi 2 extensions on
|
||||
# -Sc supports operators like C (*=,+=,/= and -=)
|
||||
# -Sd tries to be Delphi compatible
|
||||
# -Se<x> compiler stops after the <x> errors (default is 1)
|
||||
# -Sg allow LABEL and GOTO
|
||||
# -Sh Use ansistrings
|
||||
# -Si support C++ styled INLINE
|
||||
# -Sm support macros like C (global)
|
||||
# -So tries to be TP/BP 7.0 compatible
|
||||
# -Sp tries to be gpc compatible
|
||||
# -Ss constructor name must be init (destructor must be done)
|
||||
# -St allow static keyword in objects
|
||||
# Allow goto, inline, C-operators
|
||||
-Sgic
|
||||
|
||||
# ---------------
|
||||
# Code generation
|
||||
# ---------------
|
||||
|
||||
# Uncomment the next line if you always want static/dynamic units by default
|
||||
# (can be overruled with -CD, -CS at the commandline)
|
||||
#-CS
|
||||
#-CD
|
||||
|
||||
# Set the default heapsize to 8Mb
|
||||
#-Ch8000000
|
||||
|
||||
# Set default codegeneration checks (iocheck, overflow, range, stack)
|
||||
#-Ci
|
||||
#-Co
|
||||
#-Cr
|
||||
#-Ct
|
||||
|
||||
# Optimizer switches
|
||||
# -Og generate smaller code
|
||||
# -OG generate faster code (default)
|
||||
# -Or keep certain variables in registers (still BUGGY!!!)
|
||||
# -Ou enable uncertain optimizations (see docs)
|
||||
# -O1 level 1 optimizations (quick optimizations)
|
||||
# -O2 level 2 optimizations (-O1 + slower optimizations)
|
||||
# -O3 level 3 optimizations (same as -O2u)
|
||||
# -Op target processor
|
||||
# -Op1 set target processor to 386/486
|
||||
# -Op2 set target processor to Pentium/PentiumMMX (tm)
|
||||
# -Op3 set target processor to PPro/PII/c6x86/K6 (tm)
|
||||
|
||||
# Optimize always for Size and Pentium
|
||||
#-Og2p2
|
||||
|
||||
|
||||
# -----------------------
|
||||
# Set Filenames and Paths
|
||||
# -----------------------
|
||||
|
||||
# Both slashes and backslashes are allowed in paths
|
||||
|
||||
# path to the messagefile, not necessary anymore but can be used to override
|
||||
# the default language
|
||||
#-Fr$1/msg/errore.msg
|
||||
#-Fr$1/msg/errorn.msg
|
||||
#-Fr$1/msg/errores.msg
|
||||
#-Fr$1/msg/errord.msg
|
||||
#-Fr$1/msg/errorr.msg
|
||||
|
||||
# path to the gcclib
|
||||
#-Fl$1/lib
|
||||
|
||||
# searchpath for includefiles
|
||||
# release them only if you know what you do
|
||||
# because this could cause a rebuild of the runtime library
|
||||
# if you tell them compiler/ide to build the project (FK)
|
||||
#-Fi$1/source/rtl/inc;$1/source/rtl/i386
|
||||
|
||||
# searchpath for objectfiles
|
||||
#-Fo$1/source/rtl/inc;$1/source/rtl/i386
|
||||
|
||||
# searchpath for units and other system dependent things
|
||||
-Fu$1/units/$FPCTARGET
|
||||
-Fu$1/units/$FPCTARGET/*
|
||||
-Fu$1/units/$FPCTARGET/rtl
|
||||
|
||||
# searchpath for libraries
|
||||
#-Fl$1/lib
|
||||
#-Fl/lib;/usr/lib
|
||||
|
||||
# searchpath for tools
|
||||
-FD$1/bin/$FPCTARGET
|
||||
|
||||
# -------------
|
||||
# Linking
|
||||
# -------------
|
||||
|
||||
# generate always debugging information for GDB (slows down the compiling
|
||||
# process)
|
||||
#-gl
|
||||
|
||||
# always pass an option to the linker
|
||||
#-k-s
|
||||
|
||||
# Always strip debuginfo from the executable
|
||||
-Xs
|
||||
|
||||
|
||||
# -------------
|
||||
# Miscellaneous
|
||||
# -------------
|
||||
|
||||
# Write always a nice FPC logo ;)
|
||||
-l
|
||||
|
||||
# Verbosity
|
||||
# e : Show errors (default) d : Show debug info
|
||||
# w : Show warnings u : Show used files
|
||||
# n : Show notes t : Show tried files
|
||||
# h : Show hints m : Show defined macros
|
||||
# i : Show general info p : Show compiled procedures
|
||||
# l : Show linenumbers c : Show conditionals
|
||||
# a : Show everything 0 : Show nothing (except errors)
|
||||
|
||||
# Display Info, Warnings, Notes and Hints
|
||||
-viwnh
|
||||
# If you don't want so much verbosity use
|
||||
#-vw
|
||||
|
||||
Loading…
Reference in New Issue
Block a user