Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/mickelson/attract
Browse files Browse the repository at this point in the history
  • Loading branch information
mickelson committed Sep 18, 2015
2 parents a623a3b + b832c2a commit 2a43539
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ OS X.

4. From the directory you extracted the source into, run the following:

make -j 3 CROSS=1 TOOLCHAIN=i686-pc-mingw32.static WINDOWS_STATIC=1
make -j 3 CROSS=1 TOOLCHAIN=i686-w64-mingw32.static WINDOWS_STATIC=1

to build the 32-bit version of Attract-Mode. To build 64-bit, run:

Expand Down
4 changes: 2 additions & 2 deletions src/fe_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#include <fstream>

#define FE_NAME_D "Attract-Mode"
#define FE_VERSION_D "1.5.3"
const int FE_VERSION_NUM = 153;
#define FE_VERSION_D "1.6.0"
const int FE_VERSION_NUM = 160;

const char *FE_NAME = FE_NAME_D;
const char *FE_COPYRIGHT = FE_NAME_D " " FE_VERSION_D \
Expand Down
10 changes: 4 additions & 6 deletions src/fe_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ namespace
bool gather_artwork_filenames_from_archive(
const std::string &archive_name,
const std::string &target_name,
std::vector<std::string> vids,
std::vector<std::string> images )
std::vector<std::string> &vids,
std::vector<std::string> &images )
{
std::vector<std::string> zdir;
fe_zip_get_dir( archive_name.c_str(), zdir );
Expand Down Expand Up @@ -525,12 +525,10 @@ void FeTextureContainer::internal_update_selection( FeSettings *feSettings )
if ( !rom )
return;

feSettings->get_best_artwork_file( *rom,
if ( !feSettings->get_best_artwork_file( *rom,
m_art_name,
vid_list,
image_list );

if ( vid_list.empty() && image_list.empty() )
image_list ) )
{
// check for layout fallback images/videos
std::string layout_path;
Expand Down
11 changes: 7 additions & 4 deletions src/fe_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1719,10 +1719,13 @@ bool FeSettings::get_font_file( std::string &fpath,
continue;

size_t pos = (*itr).find_last_of( "\\/" );
if (( pos != std::string::npos )
&& ( icompare(
(*itr).substr( pos+1, fontname.size() ),
fontname ) == 0 ) )
if ( pos == std::string::npos )
pos = 0;
else
pos++;

if ( icompare( (*itr).substr( pos, fontname.size() ),
fontname ) == 0 )
{
fpath = layout_dir;
ffile = *itr;
Expand Down
60 changes: 60 additions & 0 deletions util/create-windows-pkg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/bin/bash
if [ "$1" == "" ]; then
echo "Package version label not specified, aborting"
exit 1
fi

if [ ! -d .git ]; then
echo "This script needs to be run from an Attract-Mode git repository"
exit 1
fi

echo "Preparing Windows packages with version label: $1"

# Clean build area
#
if [ -f ./attract.exe ]; then
rm ./attract.exe
fi

# Make sure we are up to date
#
git pull origin master

# Set up staging area
#
if [ ! -d stage ]; then
mkdir stage
else
rm -r stage/*
fi

cp -r *.md *.txt config/* stage/
cp -r ../extras/* stage/

# Unix to Windows line endings
#
sed -i 's/$/\r/' `find stage/ -name '*.*' | grep -e .md -e .txt -e .cfg -e .nut -e .nutr -e .msg -e .frag`

# special case due to space in name
sed -i 's/$/\r/' "stage/layouts/particle animation/layout.nut"

# Build and zip 32-bit windows version
#
make clean
make CROSS=1 TOOLCHAIN=i686-w64-mingw32.static WINDOWS_STATIC=1 -j 3
mv attract.exe stage/attract.exe
cd stage
zip -r attract-$1-win32.zip *
mv attract-$1-win32.zip ..
cd ..

# Build and zip 64-bit windows version
#
make clean
make CROSS=1 TOOLCHAIN=x86_64-w64-mingw32.static WINDOWS_STATIC=1 -j 3
mv attract.exe stage/attract.exe
cd stage
zip -r attract-$1-win64.zip *
mv attract-$1-win64.zip ..
cd ..

0 comments on commit 2a43539

Please sign in to comment.