Skip to content

Commit

Permalink
Revert "Merge branch 'feature/ffmpeg' into etternalmemestatus"
Browse files Browse the repository at this point in the history
This reverts commit 34cac3c, reversing
changes made to fbcb1d7.
  • Loading branch information
nico-abram committed Feb 11, 2018
1 parent f5e8481 commit 3c7063a
Show file tree
Hide file tree
Showing 300 changed files with 89,227 additions and 118,543 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Contents/
Xcode/Info.StepMania.plist
Xcode/plistHelper.hpp
src/generated
extern/mad-0.15.1b/config.h
extern/libjpeg/jconfig.h
extern/newogg/include/ogg/config_types.h

Expand Down
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ sudo: required

matrix:
include:
- env: CXX_COMPILER=clang++-3.6 CC_COMPILER=clang-3.6 BUILD_TYPE=Release WITH_FFMPEG=ON
- env: CXX_COMPILER=clang++-3.6 CC_COMPILER=clang-3.6 BUILD_TYPE=Release WITH_FFMPEG=OFF
WITH_FFMPEG_JOBS=1
compiler: clang
addons:
addons: &1
apt:
sources:
- ubuntu-toolchain-r-test
Expand All @@ -16,6 +16,7 @@ matrix:
- nasm
- libudev-dev
- clang-3.6
- libmad0-dev
- libgtk2.0-dev
- binutils-dev
- libasound-dev
Expand All @@ -27,7 +28,11 @@ matrix:
- libxtst-dev
- libxrandr-dev
- libglew-dev
- env: CXX_COMPILER=g++-5 CC_COMPILER=gcc-5 BUILD_TYPE=Release WITH_FFMPEG=ON WITH_FFMPEG_JOBS=1
- env: CXX_COMPILER=clang++-3.6 CC_COMPILER=clang-3.6 BUILD_TYPE=Release WITH_FFMPEG=ON
WITH_FFMPEG_JOBS=1
compiler: clang
addons: *1
- env: CXX_COMPILER=g++-5 CC_COMPILER=gcc-5 BUILD_TYPE=Release WITH_FFMPEG=OFF WITH_FFMPEG_JOBS=1
compiler: gcc
addons:
apt:
Expand All @@ -38,6 +43,7 @@ matrix:
- libudev-dev
- gcc-5
- g++-5
- libmad0-dev
- libgtk2.0-dev
- binutils-dev
- libasound-dev
Expand Down
3 changes: 3 additions & 0 deletions CMake/DefineOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ option(WITH_PORTABLE_TOMCRYPT "Build with assembly/free tomcrypt, making it port
# If WITH_PORTABLE_TOMCRYPT is ON, this will automatically have no effect.
option(WITH_NO_ROLC_TOMCRYPT "Build without the ROLC assembly instructions for tomcrypt. (Ignored by Apple builds)" OFF)

# Turn this option off to not use the GPL exclusive components.
option(WITH_GPL_LIBS "Build with GPL libraries." ON)

# Turn this option off to disable using WAV files with the game.
# Note that it is recommended to keep this on.
option(WITH_WAV "Build with WAV Support." ON)
Expand Down
9 changes: 9 additions & 0 deletions CMake/Modules/FindMad.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
find_path(LIBMAD_INCLUDE_DIR mad.h)

find_library(LIBMAD_LIBRARY mad)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBMAD DEFAULT_MSG LIBMAD_LIBRARY LIBMAD_INCLUDE_DIR)

mark_as_advanced(LIBMAD_LIBRARY LIBMAD_INCLUDE_DIR)

19 changes: 13 additions & 6 deletions CMake/SetupFfmpeg.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
set(SM_FFMPEG_VERSION "3.3.3")
set(SM_FFMPEG_SRC_LIST "${SM_EXTERN_DIR}/ffmpeg-linux-${SM_FFMPEG_VERSION}")
set(SM_FFMPEG_VERSION "2.1.3")
set(SM_FFMPEG_SRC_LIST "${SM_EXTERN_DIR}" "/ffmpeg-linux-" "${SM_FFMPEG_VERSION}")
sm_join("${SM_FFMPEG_SRC_LIST}" "" SM_FFMPEG_SRC_DIR)
set(SM_FFMPEG_CONFIGURE_EXE "${SM_FFMPEG_SRC_DIR}/configure")
list(APPEND FFMPEG_CONFIGURE
"${SM_FFMPEG_CONFIGURE_EXE}"
"--disable-muxers"
"--disable-encoders"
"--disable-programs"
"--disable-doc"
"--disable-avdevice"
"--disable-swresample"
"--disable-postproc"
"--disable-avfilter"
"--disable-lzma"
"--disable-shared"
"--enable-static"
)

if(CMAKE_POSITION_INDEPENDENT_CODE)
Expand All @@ -31,6 +32,12 @@ if(MACOSX)
)
endif()

if(WITH_GPL_LIBS)
list(APPEND FFMPEG_CONFIGURE
"--enable-gpl"
)
endif()

if (WITH_CRYSTALHD_DISABLED)
list(APPEND FFMPEG_CONFIGURE "--disable-crystalhd")
endif()
Expand All @@ -55,7 +62,7 @@ if (IS_DIRECTORY "${SM_FFMPEG_SRC_DIR}")
)
else()
externalproject_add("ffmpeg"
DOWNLOAD_COMMAND git clone "--depth" "1" "git://github.com/etternagame/FFmpeg.git" "${SM_FFMPEG_SRC_DIR}"
DOWNLOAD_COMMAND git clone "--branch" "n${SM_FFMPEG_VERSION}" "--depth" "1" "git://github.com/stepmania/ffmpeg.git" "${SM_FFMPEG_SRC_DIR}"
CONFIGURE_COMMAND "${FFMPEG_CONFIGURE}"
BUILD_COMMAND "${SM_FFMPEG_MAKE}"
UPDATE_COMMAND ""
Expand Down
2 changes: 1 addition & 1 deletion CMake/license_install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ StepMania's source code and resulting binary is licensed under the MIT license.

A few sample songs were provided that can be distributed. They are under the CC-NC (Creative Commons Non-Commercial) license. Go to https://creativecommons.org/ for more information.

The FFMPEG codes (see https://www.ffmpeg.org/ for more) use the LGPL license. Go to http://www.gnu.org for more information.
The FFMPEG codes (see https://www.ffmpeg.org/ for more) and the MAD library (see http://www.underbit.com/products/mad/ for more) use the GPL license. Go to http://www.gnu.org for more information.
8 changes: 7 additions & 1 deletion Docs/Licenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,10 @@ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
POSSIBILITY OF SUCH DAMAGE.

******************************************************************************

The MAD library (included with most Windows binary distributions), and
interface code in RageSoundReader_MP3, is under the GPL, available in
Copying.MAD. Support for this library can be disabled at compile-time.
Binary file added Program/avcodec-55.dll
Binary file not shown.
Binary file removed Program/avcodec-57.dll
Binary file not shown.
Binary file added Program/avformat-55.dll
Binary file not shown.
Binary file removed Program/avformat-57.dll
Binary file not shown.
Binary file added Program/avutil-52.dll
Binary file not shown.
Binary file removed Program/avutil-55.dll
Binary file not shown.
Binary file removed Program/swresample-2.dll
Binary file not shown.
Binary file added Program/swscale-2.dll
Binary file not shown.
Binary file removed Program/swscale-4.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ For specific information/legalese:

* All of the our source code is under the [MIT license](http://opensource.org/licenses/MIT).
* Any songs that are included within this repository are under the [Creative Commons license](https://creativecommons.org/).
* The [FFmpeg codecs](https://www.ffmpeg.org/) when built with our code use the [LGPL license](http://www.gnu.org).
* The [MAD library](http://www.underbit.com/products/mad/) and [FFmpeg codecs](https://www.ffmpeg.org/) when built with our code use the [GPL license](http://www.gnu.org).
24 changes: 10 additions & 14 deletions StepmaniaCore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -185,24 +185,27 @@ endif()
# Dependencies go here.
include(ExternalProject)

if(NOT WITH_GPL_LIBS)
message("Disabling GPL exclusive libraries: no MP3 support.")
set(WITH_MP3 OFF)
endif()

if(WITH_WAV)
# TODO: Identify which headers to check for ensuring this will always work.
set(HAS_WAV TRUE)
endif()

if(WITH_MP3)
if(MSVC)
if(WIN32 OR MACOSX)
set(HAS_MP3 TRUE)
else()
if(NOT WITH_FFMPEG)
message("FFmpeg is required for mp3 support. WITH_MP3 is set to off.")
set(WITH_MP3 FALSE)
find_package(Mad)
if(NOT LIBMAD_FOUND)
message(FATAL_ERROR "Libmad library not found. If you wish to skip mp3 support, set WITH_MP3 to OFF when configuring.")
else()
set(HAS_MP3 TRUE)
endif()
endif()
else()
set(HAS_MP3 FALSE)
endif()

if(WITH_OGG)
Expand Down Expand Up @@ -261,11 +264,6 @@ if(WIN32)
)
get_filename_component(LIB_SWSCALE ${LIB_SWSCALE} NAME)

find_library(LIB_SWRESAMPLE NAMES "swresample"
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib" NO_DEFAULT_PATH
)
get_filename_component(LIB_SWRESAMPLE ${LIB_SWRESAMPLE} NAME)

find_library(LIB_AVCODEC NAMES "avcodec"
PATHS "${SM_EXTERN_DIR}/ffmpeg/lib" NO_DEFAULT_PATH
)
Expand Down Expand Up @@ -432,9 +430,8 @@ elseif(LINUX)
endif()

if (WITH_FFMPEG AND NOT YASM_FOUND AND NOT NASM_FOUND)
message("Neither NASM nor YASM were found. Please install at least one of them if you wish for ffmpeg and mp3 support.")
message("Neither NASM nor YASM were found. Please install at least one of them if you wish for ffmpeg support.")
set(WITH_FFMPEG OFF)
set(WITH_MP3 OFF)
endif()

find_package("Va")
Expand All @@ -455,7 +452,6 @@ elseif(LINUX)
endif()
else()
set(HAS_FFMPEG FALSE)
set(HAS_MP3 FALSE)
endif()

set(CURL_LIBRARY "-lcurl")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,6 @@ local function rankingLabel(i)
else
self:settext("")
end
elseif onlineScore then
self:settextf("%5.2f%%", onlineScore.wife*100)
self:diffuse(getGradeColor("Grade_Tier03"))
end
end
},
Expand Down Expand Up @@ -756,4 +753,4 @@ local profilebuttons = Def.ActorFrame{

t[#t+1] = profilebuttons
t[#t+1] = r
return t
return t
24 changes: 24 additions & 0 deletions Xcode/Libraries/mad-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>mad</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>mad</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string></string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.15.1b</string>
</dict>
</plist>
1 change: 1 addition & 0 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include(CMakeProject-glew.cmake)
include(CMakeProject-json.cmake)
if (APPLE OR MSVC)
include(CMakeProject-mad.cmake)
include(CMakeProject-zlib.cmake)
include(CMakeProject-jpeg.cmake)
endif()
Expand Down
75 changes: 75 additions & 0 deletions extern/CMakeProject-mad.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
set(MAD_DIR "${SM_EXTERN_DIR}/mad-0.15.1b")

list(APPEND MAD_SRC
"${MAD_DIR}/bit.c"
"${MAD_DIR}/decoder.c"
"${MAD_DIR}/fixed.c"
"${MAD_DIR}/frame.c"
"${MAD_DIR}/huffman.c"
"${MAD_DIR}/layer12.c"
"${MAD_DIR}/layer3.c"
"${MAD_DIR}/stream.c"
"${MAD_DIR}/synth.c"
"${MAD_DIR}/timer.c"
"${MAD_DIR}/version.c"
)

list(APPEND MAD_HPP
"${MAD_DIR}/bit.h"
"${MAD_DIR}/config.h"
"${MAD_DIR}/decoder.h"
"${MAD_DIR}/fixed.h"
"${MAD_DIR}/frame.h"
"${MAD_DIR}/global.h"
"${MAD_DIR}/huffman.h"
"${MAD_DIR}/layer12.h"
"${MAD_DIR}/layer3.h"
"${MAD_DIR}/mad.h"
"${MAD_DIR}/stream.h"
"${MAD_DIR}/synth.h"
"${MAD_DIR}/timer.h"
"${MAD_DIR}/version.h"
)

list(APPEND MAD_DAT
"${MAD_DIR}/D.dat"
"${MAD_DIR}/imdct_s.dat"
"${MAD_DIR}/qc_table.dat"
"${MAD_DIR}/rq_table.dat"
"${MAD_DIR}/sf_table.dat"
)

source_group("Source Files" FILES ${MAD_SRC})
source_group("Header Files" FILES ${MAD_HPP})
source_group("Data Files" FILES ${MAD_DAT})

add_library("mad" STATIC ${MAD_SRC} ${MAD_HPP} ${MAD_DAT})

set_property(TARGET "mad" PROPERTY FOLDER "External Libraries")

disable_project_warnings("mad")

if(ENDIAN_BIG)
set(WORDS_BIGENDIAN 1)
endif()

sm_add_compile_definition("mad" $<$<CONFIG:Debug>:DEBUG>)
sm_add_compile_definition("mad" HAVE_CONFIG_H)

if(MSVC)
sm_add_compile_definition("mad" _CRT_SECURE_NO_WARNINGS)
# TODO: Remove the need for this check since it's tied to 32-bit builds from first glance.
sm_add_compile_definition("mad" ASO_ZEROCHECK)
sm_add_compile_definition("mad" $<$<CONFIG:Debug>:FPM_DEFAULT>)
sm_add_compile_definition("mad" $<$<CONFIG:Release>:FPM_INTEL>)
sm_add_compile_definition("mad" $<$<CONFIG:MinSizeRel>:FPM_INTEL>)
sm_add_compile_definition("mad" $<$<CONFIG:RelWithDebInfo>:FPM_INTEL>)
# TODO: Provide a proper define for inline.
sm_add_compile_definition("mad" inline=__inline)
elseif(APPLE)
sm_add_compile_definition("mad" FPM_64BIT=1)
endif(MSVC)

target_include_directories("mad" PUBLIC "${MAD_DIR}")

configure_file("${SM_EXTERN_DIR}/config.mad.in.h" "${MAD_DIR}/config.h")
Loading

0 comments on commit 3c7063a

Please sign in to comment.