UltraStar-Deluxe / USDX

The free and open source karaoke singing game UltraStar Deluxe, inspired by Sony SingStarâ„¢
https://usdx.eu
GNU General Public License v2.0
803 stars 157 forks source link

How to build the UltraStar application on MacOS 10.13 (make macosx-standalone-app) #505

Open FerrisStorke opened 4 years ago

FerrisStorke commented 4 years ago

I compiled the latest version of Ultrastar Deluxe on MacOS 10.13, but I am stuck on the last two steps:

Now build the UltraStar application make macosx-standalone-app

Run by clicking UltraStarDeluxe in your build folder or open UltraStarDeluxe.app

I do not know where to add the "make macosx-standalone-app" line. Thanks for your help.

jbretsch commented 4 years ago

Type the command make macosx-standalone-app into the same Terminal session that you used to run the ./configure command.

FerrisStorke commented 4 years ago

That creates the following line: make: *** No rule to make target configure', needed byconfig.status'. Stop.

jbretsch commented 4 years ago

The error message says that there is no file called configure in your current working directory. As the instructions state, this file is generated by running ./autogen.sh.

Perhaps you should re-run all commands listed in the build instructions.

If you get the same error message again then probably one of those commands (prior to make macosx-standalone-app) generated an error. Inspect those error messages!

FerrisStorke commented 4 years ago

I'm getting the following message, when re-running the commands:

checking whether make sets $(MAKE)... yes checking whether ln -s works... yes checking for a thread-safe mkdir -p... /Users/x/Downloads/USDX-master/dists/autogen/install-sh -c -d checking for a BSD-compatible install... /usr/bin/install -c checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for cmake... no checking build system type... x86_64-apple-darwin17.7.0 checking host system type... x86_64-apple-darwin17.7.0 checking for fpc... fpc checking for fpcmake... fpcmake checking version of fpc... [3.0.4] checking whether the Free Pascal Compiler works... yes checking whether the Free Pascal Compiler can link... yes checking whether FPC supports -k"-z noexecstack"... no checking whether FPC supports -k"--copy-dt-needed-entries"... no checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for ranlib... ranlib checking for pkg-config... /usr/local/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for Mac OS X version... [10.13.6] checking for Darwin version... [17] checking for sdl2... yes (-L/usr/local/lib) checking for SDL2_image... yes (-L/usr/local/lib) checking for freetype2... yes (-L/usr/local/opt/freetype/lib) checking for sqlite3... yes checking for lua5.3... yes (-L/usr/local/lib) checking version of lua... [5.3.5] checking size of lua_Integer... 64 bits checking for libavcodec... yes (-L/usr/local/Cellar/ffmpeg/4.2.1_2/lib) checking version of libavcodec... [58.54.100] checking for avcodec_decode_audio in -lavcodec... no checking for avcodec_decode_audio2 in -lavcodec... no checking for img_convert in -lavcodec... no checking for libavformat... yes (-L/usr/local/Cellar/ffmpeg/4.2.1_2/lib) checking version of libavformat... [58.29.100] checking for libavutil... yes (-L/usr/local/Cellar/ffmpeg/4.2.1_2/lib) checking version of libavutil... [56.31.100] checking for libswscale... yes (-L/usr/local/Cellar/ffmpeg/4.2.1_2/lib) checking version of libswscale... [5.5.100] checking for libswresample... yes (-L/usr/local/Cellar/ffmpeg/4.2.1_2/lib) checking version of libswresample... [3.5.100] checking version of ffmpeg... [4.0] configure: Checking for C++ compiler checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking if C++ toolchain works... yes checking for libprojectM >= 0.98... no checking for portaudio-2.0... yes (-L/usr/local/Cellar/portaudio/19.6.0/lib) checking version of portaudio... [19] checking for portmixer... no checking for Pm_Initialize in -lportmidi... no configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating src/config-darwin.inc configure:

!!! !!! Configuration of ultrastardx 2017.8.0+ done! !!! !!! Type "make" to compile and !!! "make install" to install it afterwards. !!! !!! For further information on ultrastardx visit: !!! http://usdx.eu/ !!! !!! In case you find a bug send a bugreport to: !!! https://github.com/UltraStar-Deluxe/USDX/issues/ !!! You might as well ask for help at the IRC-Channel !!! #usdx at freenode.net !!!

configure: !!! Special target for OSX are: !!! "make macosx-standalone-app" to create a standalone .app !!! "make macosx-dmg" to create a dmg archive with standalone .app !!! Selected packaging: brew with libdir /usr/local/lib

jbretsch commented 4 years ago

Looks good. Now just run make macosx-standalone-app in the same directory in which you ran ./configure.

FerrisStorke commented 4 years ago

So this is what I put into my terminal windows once ./configure was executed:

xx:~ xx$ make macosx-standalone-app

and I get the following message: make: *** No rule to make target configure', needed byconfig.status'. Stop.

I don't really know what you mean by "run x in the same directory".

jbretsch commented 4 years ago

Strange. I can only reproduce the error make: *** No rule to make target `configure', needed by `config.status'. Stop. if I delete the file configure after running ./configure and before running make macosx-standalone-app.

FerrisStorke commented 4 years ago

There is a "configure" file in the directory that I ran the commands in and I did not touch it, but I am still getting this error message.

jbretsch commented 4 years ago

What is the output of make --version? And what is the output of make --debug macosx-standalone-app?

FerrisStorke commented 4 years ago

The output of make --version is: GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

and the output of make --debug macosx-standalone-app is Reading makefiles... make: *** No rule to make target configure', needed byconfig.status'. Stop.

jbretsch commented 4 years ago

Mmh. And what is the output of stat -x configure?

FerrisStorke commented 4 years ago

I'm getting the following line:

stat: configure: stat: No such file or directory

s09bQ5 commented 4 years ago

@ferrisi9, I believe we are all a bit puzzled because on December 31 you posted the output of the configure script (= all those lines starting with "checking") and shortly after the script appears to be gone. Nothing should cause the configure script to be deleted. Are you really sure that you are in the correct directory?

FerrisStorke commented 4 years ago

There is still a "Unix executable" file named "configure" in the folder that I ran the ./autogen.sh and ./configure commands from. I think the previous problem was that I didn't run the make command from the same folder. I changed that by using cd and then dropping the folder in terminal and running the command. Now I am getting the following outputs:

This program built for i386-apple-darwin11.3.0"

This program built for i386-apple-darwin11.3.0 Reading makefiles... Updating goal targets.... File macosx-standalone-app' does not exist. Must remake targetmacosx-standalone-app'. make: *** No rule to make target `macosx-standalone-app'. Stop."

Thank you all so much for your help. I really appreciate it and I know I'm a novice, so sorry for taking such a long time.

s09bQ5 commented 4 years ago

That still does not look like you are in the correct directory. The Makefile in the correct directory does contain a rule to make the target macosx-standalone-app.

Let's try it again:

FerrisStorke commented 4 years ago

Thanks, this finally worked and I now have an "UltraStarDeluxe" app. However, when I open it, the screen turns black for a second and then the applications closes again and nothing happens.

FerrisStorke commented 4 years ago

When running the ultrastardx file from the MacOS folder, I'm getting the following messages:

An unhandled exception occurred at $0000000100026759: EInOutError: Invalid file handle $0000000100026759 $000000010006602C

logout Saving session... ...copying shared history... ...saving history...truncating history files... ...completed.

Matthiator commented 4 years ago

Thanks, this finally worked and I now have an "UltraStarDeluxe" app. However, when I open it, the screen turns black for a second and then the applications closes again and nothing happens.

MacOS Catalina 10.15.2

I have the same issue... open the app.. . turns black .. and then it closed automatically. Any Ideas?

s09bQ5 commented 4 years ago

@ferrisi9, please attach your ultrastardx executable so we can try to resolve those addresses.

FerrisStorke commented 4 years ago

Unfortunately, I cannot directly upload that file type here, so here's a link to the file I uploaded: https://www.file-upload.net/download-13846421/ultrastardx.html

s09bQ5 commented 4 years ago

$100026759 is inside CEnterCritialSection from the cthreads unit. $10006602C is after the call to TLog.LogConsole in _ConsoleWriteLn inlined from ConsoleHandlerFunc from the UCommon unit. Log must be <> nil to be able to reach that line, so Log.Lock should have been initialized...

Can you pass --enable-debug to configure and compile again?

FerrisStorke commented 4 years ago

So I typed the following in terminal: cd (dropped the folder here and pressed enter).

./autogen.sh && ./configure --enable-debug && make macosx-standalone-app

The application that is created will still not open. Here's my log: https://pastebin.com/fnLXp42u

s09bQ5 commented 4 years ago

The question is: What will it output now if you run it directly from the MacOS folder?

FerrisStorke commented 4 years ago

I'm sorry I do not understand what you mean? What will what output if I run what from the MacOS folder?

s09bQ5 commented 4 years ago

On January 4 you posted the following output:

An unhandled exception occurred at $0000000100026759: EInOutError: Invalid file handle $0000000100026759 $000000010006602C

Please repeat what you did to get that output with the application built after running configure with --enable-debug. The output should look more verbose now.

FerrisStorke commented 4 years ago

I ran the command line: cd (drag and dropped folder) enter ./autogen.sh && ./configure --enable-debug && make macosx-standalone-app

Then I right-clicked on the ultrastar deluxe app and clicked on "Show Package Contents". I then double-clicked the ultrastardx file in the MacOS folder and I am getting the following lines in terminal:

An unhandled exception occurred at $0000000100026759: EInOutError: Invalid file handle $0000000100026759 $000000010006602C

logout Saving session... ...copying shared history... ...saving history...truncating history files... ...completed. Deleting expired sessions...43 completed.

[Process completed]

Did I do the "--enable-debug" part wrong to get the same error message again?