You've already forked lazarus-ccr
fpbrowser: Adds build modes and windows setup
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2286 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
264
applications/fpbrowser/build/build_package.sh
Normal file
264
applications/fpbrowser/build/build_package.sh
Normal file
@ -0,0 +1,264 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This script generates packages for the Lazarus Image Editor
|
||||
#
|
||||
|
||||
##################################
|
||||
# Constants
|
||||
##################################
|
||||
|
||||
PRODUCT="Lazarus Image Editor"
|
||||
VERSION="0.9"
|
||||
OS="linux"
|
||||
EXENAME="lazimageeditor"
|
||||
|
||||
TARGET_DIR="./$EXENAME-$OS-$VERSION"
|
||||
TARGET_TAR="$EXENAME-$OS-$VERSION.tar"
|
||||
TARGET_ZIP="$EXENAME-$VERSION.zip"
|
||||
|
||||
# DEBIAN_USR_DIR=/home/felipe/Programas/magnifier/build/usr
|
||||
|
||||
##################################
|
||||
# Builds a binary tar package
|
||||
##################################
|
||||
BuildBinary ()
|
||||
{
|
||||
# Goes to the root directory
|
||||
|
||||
cd ..
|
||||
|
||||
# Builds the software
|
||||
|
||||
# ~/Programas/lazarus/lazbuild $EXENAME.lpi
|
||||
|
||||
strip --strip-all $EXENAME
|
||||
|
||||
# Creates main directory
|
||||
|
||||
mkdir $TARGET_DIR/
|
||||
mkdir $TARGET_DIR/Images
|
||||
|
||||
# Copies files to the directory
|
||||
|
||||
cp ./$EXENAME $TARGET_DIR/
|
||||
cp ./install.sh $TARGET_DIR/
|
||||
cp ./Images/*.png $TARGET_DIR/Images/
|
||||
|
||||
# Creates the archive
|
||||
|
||||
tar -cvf $TARGET_TAR $TARGET_DIR/
|
||||
|
||||
bzip2 $TARGET_TAR
|
||||
|
||||
# Clean up
|
||||
|
||||
rm -rf $TARGET_DIR/
|
||||
|
||||
cd build
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
##################################
|
||||
# Creates a source zip package
|
||||
##################################
|
||||
SourcePackage ()
|
||||
{
|
||||
# Goes to the root directory of the magnifier
|
||||
|
||||
cd ..
|
||||
|
||||
# Clean up
|
||||
|
||||
echo "Clean up"
|
||||
./clean.sh
|
||||
rm -rf ../magnifier-$VERSION/
|
||||
|
||||
# We use SVN export to get rid of the heavy svn files
|
||||
# copies all files to a new temporary directory
|
||||
|
||||
echo "svn export ./ ../magnifier-$VERSION/"
|
||||
svn export ./ ../magnifier-$VERSION/
|
||||
|
||||
# Creates the package
|
||||
|
||||
echo "zip -r ../$TARGET_ZIP ../magnifier-$VERSION/"
|
||||
zip -rv ../$TARGET_ZIP ../magnifier-$VERSION/
|
||||
|
||||
# Clean up
|
||||
|
||||
echo "Clean up"
|
||||
rm -rf ../magnifier-$VERSION/
|
||||
cd build
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
##################################
|
||||
# Set up the RPM build environment
|
||||
##################################
|
||||
CreateRPMEnvironment ()
|
||||
{
|
||||
# Creates the directory structure
|
||||
|
||||
mkdir $HOME/RPM
|
||||
mkdir $HOME/RPM/BUILD # This directory is utilized by RPM to build the package.
|
||||
mkdir $HOME/RPM/RPMS # Here you can find binary RPMs after you build them.
|
||||
mkdir $HOME/RPM/SOURCES # Place your compressed tar files and patches here.
|
||||
mkdir $HOME/RPM/SPECS # Place all your spec files here.
|
||||
mkdir $HOME/RPM/SRPMS # Here you can find source RPMs after you build them.
|
||||
|
||||
# rpmbuild environment file
|
||||
|
||||
touch $HOME/.rpmmacros
|
||||
|
||||
echo "%_topdir /home/felipe/RPM/" >> $HOME/.rpmmacros
|
||||
echo "%_tmppath /home/felipe/tmp" >> $HOME/.rpmmacros
|
||||
echo "" >> $HOME/.rpmmacros
|
||||
echo "%_signature gpg" >> $HOME/.rpmmacros
|
||||
echo "%_gpg_name Mandrakelinux" >> $HOME/.rpmmacros
|
||||
echo "%_gpg_path ~/.gnupg" >> $HOME/.rpmmacros
|
||||
|
||||
# Spec file
|
||||
|
||||
cp magnifier.spec $HOME/RPM/SPECS/
|
||||
|
||||
# Zip file
|
||||
|
||||
cp ../../$TARGET_ZIP $HOME/RPM/SOURCES/
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
##################################
|
||||
# Builds a binary and source RPM package
|
||||
##################################
|
||||
RPMPackage ()
|
||||
{
|
||||
# Set up the RPM build environment
|
||||
CreateRPMEnvironment
|
||||
|
||||
# now build it
|
||||
echo "rpmbuild -ba --clean $HOME/RPM/SPECS/magnifier.spec"
|
||||
rpmbuild -ba --clean $HOME/RPM/SPECS/magnifier.spec
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
##################################
|
||||
# Creates a Debian package
|
||||
##################################
|
||||
DebianPackage ()
|
||||
{
|
||||
# Goes to the root directory of the magnifier
|
||||
|
||||
cd ..
|
||||
|
||||
# Builds the software
|
||||
|
||||
# ./make.sh
|
||||
|
||||
strip --strip-all magnifier
|
||||
|
||||
# Returns to build dir
|
||||
|
||||
cd build
|
||||
|
||||
# Creates the control.tar.gz file
|
||||
|
||||
tar -cvf control.tar control
|
||||
|
||||
gzip control.tar
|
||||
|
||||
# Creates the data.tar.gz file
|
||||
|
||||
mkdir $DEBIAN_USR_DIR
|
||||
mkdir $DEBIAN_USR_DIR/bin
|
||||
mkdir $DEBIAN_USR_DIR/share
|
||||
mkdir $DEBIAN_USR_DIR/share/magnifier
|
||||
|
||||
cd ..
|
||||
|
||||
cp ./magnifier $DEBIAN_USR_DIR/bin/vmg
|
||||
|
||||
cp $RESOURCES $DEBIAN_USR_DIR/share/magnifier
|
||||
|
||||
cd $MANUALS_DIR
|
||||
|
||||
cp $MANUALS $DEBIAN_USR_DIR/share/magnifier
|
||||
|
||||
cd ..
|
||||
|
||||
cd build
|
||||
|
||||
tar -cvf data.tar $DEBIAN_USR_DIR
|
||||
|
||||
gzip data.tar
|
||||
|
||||
# Creates the package
|
||||
|
||||
mkdir DEBIAN
|
||||
|
||||
cp control DEBIAN/
|
||||
cp data.tar.gz DEBIAN/
|
||||
cp debian-binary DEBIAN/
|
||||
|
||||
dpkg -b ./ magnifier_3.4-0_i386.deb
|
||||
|
||||
# Clean up
|
||||
|
||||
echo "Clean up"
|
||||
|
||||
rm -rf $DEBIAN_USR_DIR
|
||||
|
||||
rm -rf ./DEBIAN
|
||||
|
||||
rm -rf data.tar.gz
|
||||
|
||||
rm -rf control.tar.gz
|
||||
|
||||
cd ..
|
||||
|
||||
./clean.sh
|
||||
|
||||
cd build
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
##################################
|
||||
# Main section
|
||||
##################################
|
||||
|
||||
echo "========================================================"
|
||||
echo " Lazarus Image Editor build script"
|
||||
echo "========================================================"
|
||||
echo ""
|
||||
echo " Please select which package you would like to build:"
|
||||
echo ""
|
||||
echo " 1 > Linux Gtk2 binary tar.bz2 package"
|
||||
echo " 3 > Source .zip package"
|
||||
echo " 4 > RPM package (source and binary)"
|
||||
echo " 5 > Debian package"
|
||||
echo " 0 > Exit"
|
||||
|
||||
read command
|
||||
|
||||
case $command in
|
||||
|
||||
1) BuildBinary;;
|
||||
|
||||
3) SourcePackage;;
|
||||
|
||||
4) RPMPackage;;
|
||||
|
||||
5) DebianPackage;;
|
||||
|
||||
0) exit 0;;
|
||||
|
||||
*) echo "Invalid command"
|
||||
exit 0;;
|
||||
|
||||
esac
|
49
applications/fpbrowser/build/innosetup.iss
Normal file
49
applications/fpbrowser/build/innosetup.iss
Normal file
@ -0,0 +1,49 @@
|
||||
; Script generated by the Inno Setup Script Wizard.
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
[Setup]
|
||||
AppName=fpBrowser
|
||||
AppVerName=fpBrowser v0.5
|
||||
AppPublisherURL=http://wiki.lazarus.freepascal.org/fpbrowser
|
||||
AppSupportURL=http://wiki.lazarus.freepascal.org/fpbrowser
|
||||
AppUpdatesURL=http://wiki.lazarus.freepascal.org/fpbrowser
|
||||
DefaultDirName={pf}\FPBrowser
|
||||
DefaultGroupName=Free Pascal Applications Suite
|
||||
; LicenseFile=..\license.txt
|
||||
OutputDir=.\
|
||||
OutputBaseFilename=FPBrowser0.5_install
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
VersionInfoVersion=0.5
|
||||
AllowNoIcons=yes
|
||||
|
||||
[Languages]
|
||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
|
||||
Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl"
|
||||
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
|
||||
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
|
||||
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
|
||||
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
|
||||
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
|
||||
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl"
|
||||
Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl"
|
||||
|
||||
[Tasks]
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||
|
||||
[Files]
|
||||
Source: "..\fpbrowser.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\FPBrowser"; Filename: "{app}\fpbrowser.exe"
|
||||
Name: "{group}\{cm:ProgramOnTheWeb,FPBrowser}"; Filename: "http://wiki.lazarus.freepascal.org/fpbrowser"
|
||||
Name: "{group}\{cm:UninstallProgram,FPBrowser}"; Filename: "{uninstallexe}"
|
||||
Name: "{commondesktop}\FPBrowser"; Filename: "{app}\fpbrowser.exe"; Tasks: desktopicon
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\fpbrowser.exe"; Description: "{cm:LaunchProgram,FPBrowser}"; Flags: nowait postinstall skipifsilent
|
||||
|
||||
|
||||
|
@ -15,8 +15,53 @@
|
||||
<CharSet Value=""/>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
<BuildModes Count="2">
|
||||
<Item1 Name="Debug" Default="True"/>
|
||||
<Item2 Name="Release">
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="../../components/thtmlport/package"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<SyntaxMode Value="Delphi"/>
|
||||
<CStyleOperator Value="False"/>
|
||||
<IncludeAssertionCode Value="True"/>
|
||||
<AllowLabel Value="False"/>
|
||||
<CPPInline Value="False"/>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<CodeGeneration>
|
||||
<Checks>
|
||||
<IOChecks Value="True"/>
|
||||
<RangeChecks Value="True"/>
|
||||
<OverflowChecks Value="True"/>
|
||||
<StackChecks Value="True"/>
|
||||
</Checks>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<GenerateDebugInfo Value="False"/>
|
||||
<UseLineInfoUnit Value="False"/>
|
||||
<StripSymbols Value="True"/>
|
||||
</Debugging>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<UseMsgFile Value="True"/>
|
||||
</CompilerMessages>
|
||||
<CustomOptions Value="-dDebugIt"/>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item2>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
|
Reference in New Issue
Block a user