mirror of
https://github.com/TangentFoxy/LovePackaging.git
synced 2024-11-26 10:44:21 +00:00
fixed config + gitignore
This commit is contained in:
parent
9f640f5959
commit
f8d0c25e3f
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
build/*
|
||||
builds/*
|
||||
|
@ -13,7 +13,7 @@ Installation
|
||||
1. Download this (either from the ZIP link in the bottom right or the releases linked to at the top of the repository)!
|
||||
2. Copy the files wherever you want, inside your own repo, outside, wherever!
|
||||
3. Edit `config.txt` to specify options on how your packages will be built, including where the sources are and where to put the result.
|
||||
4. Run build.sh or build.bat depending on your system.
|
||||
4. Run build or build.bat depending on your system.
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
67
build.sh
67
build.sh
@ -1,67 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# get config
|
||||
source ./config.txt
|
||||
|
||||
# remove old versions of package?
|
||||
if [ $removeOld = true ]; then
|
||||
rm -f $outputDir/$packageName*
|
||||
fi
|
||||
|
||||
# move to source dir
|
||||
originalDir=$(pwd)
|
||||
cd $sourceDir
|
||||
|
||||
# build .love file
|
||||
echo "Building $packageName (version $version)... (.love file)"
|
||||
zip -r $outputDir/$packageName-$version.love ./*
|
||||
|
||||
# check if executables (their directories) exist, if not, download them
|
||||
if [ ! -d $wind32Dir ]; then
|
||||
mkdir -p $wind32Dir
|
||||
echo "Downloading wind32src..."
|
||||
wget -nv -O $wind32Dir/love32.zip https://bitbucket.org/rude/love/downloads/love-0.9.1-win32.zip
|
||||
unzip $wind32Dir/love32.zip -d $wind32Dir
|
||||
fi
|
||||
|
||||
if [ ! -d $win64Dir ]; then
|
||||
mkdir -p $win64Dir
|
||||
echo "Downloading win64src..."
|
||||
wget -nv -O $win64Dir/love64.zip https://bitbucket.org/rude/love/downloads/love-0.9.1-win64.zip
|
||||
unzip $win64Dir/love64.zip -d $win64Dir
|
||||
fi
|
||||
|
||||
if [ ! -d $osx10Dir ]; then
|
||||
mkdir -p $osx10Dir
|
||||
echo "Downloading osx10src..."
|
||||
wget -nv -O $osx10Dir/loveOSX.zip https://bitbucket.org/rude/love/downloads/love-0.9.1-macosx-x64.zip
|
||||
unzip $osx10Dir/loveOSX.zip -d $osx10Dir
|
||||
#delete Mac crap
|
||||
rm -rf $osx10Dir/__MACOSX
|
||||
#the Info.plist is overwritten each time the app is built, so it is not fixed here.
|
||||
fi
|
||||
|
||||
# build executables and zip files for them
|
||||
|
||||
echo "Building $packageName (version $version)... (win32 zip)"
|
||||
cat $wind32Dir/love-0.9.1-win32/love.exe $outputDir/$packageName-$version.love > $wind32Dir/$packageName.exe
|
||||
zip -r $outputDir/$packageName-$version_win32.zip $wind32Dir/$packageName.exe $wind32Dir/love-0.9.1-win32/*.dll $wind32Dir/love-0.9.1-win32/license.txt $includes
|
||||
|
||||
echo "Building $packageName (version $version)... (win64 zip)"
|
||||
cat $win64Dir/love-0.9.1-win64/love.exe $outputDir/$packageName-$version.love > $win64Dir/$packageName.exe
|
||||
zip -r $outputDir/$packageName-$version_win64.zip $win64Dir/$packageName.exe $win64Dir/love-0.9.1-win64/*.dll $win64Dir/love-0.9.1-win64/license.txt $includes
|
||||
|
||||
|
||||
if [ $macInfoPlistFixed = true ]; then
|
||||
echo "Building $packageName (version $version)... (OS X zip)"
|
||||
if [ -f $osx10Dir ]; then
|
||||
rm -f $osx10Dir/love.app/Contents/Resources/$packageName.love
|
||||
fi
|
||||
cp $outputDir/$packageName-$version.love $osx10Dir/love.app/Contents/Resources/$packageName.love
|
||||
cp $originalDir/Info.plist $osx10Dir/love.app/Contents/Info.plist
|
||||
zip -r $outputDir/$packageName-$version_osx.zip $osx10Dir/love.app $includes
|
||||
else
|
||||
echo "WARN: Mac packaging disabled."
|
||||
fi
|
||||
|
||||
echo "Build complete. Unless there are errors above. Check your files."
|
@ -1,7 +1,7 @@
|
||||
# The name of the resulting executables.
|
||||
packageName="LovePackagingExample"
|
||||
# Where to place the resulting executables.
|
||||
outputDir="$(pwd)/build"
|
||||
outputDir="$(pwd)/builds"
|
||||
# Where the source code is. (This should be where your main.lua file is.)
|
||||
sourceDir="$(pwd)/src"
|
||||
# Files to include in ZIP packages. (ReadMe's, licenses, etc.)
|
||||
@ -17,9 +17,9 @@ version="0.1"
|
||||
removeOld=false
|
||||
|
||||
# Where unzipped executables to make packages out of will be kept
|
||||
win32Dir="$build/win32src"
|
||||
win64Dir="$build/win64src"
|
||||
osx10Dir="$build/osx10src"
|
||||
win32Dir="$outputDir/win32src"
|
||||
win64Dir="$outputDir/win64src"
|
||||
osx10Dir="$outputDir/osx10src"
|
||||
|
||||
# Only change this if you know what you're doing (Read the README.md file).
|
||||
macInfoPlistFixed=false
|
||||
|
Loading…
Reference in New Issue
Block a user