snes9xgit / snes9x

Snes9x - Portable Super Nintendo Entertainment System (TM) emulator
http://www.snes9x.com
Other
2.65k stars 460 forks source link

How use meson for configure options ? #801

Closed inukaze closed 1 year ago

inukaze commented 1 year ago

Hi there i am trying to compile snes9x under Slackware64 14.2. i just want compile using the relative path "./" not absolute path, because with absolute path i can use like portable app on diferents live environments.

My objetive is compile under ./ ./.snes9x -> appdata, data & locales or if posible just the requiered file inside the binary executable

cd /tmp
git clone https://github.com/snes9xgit/snes9x.git
cd snes9x
git submodule update --init
cd gtk

meson configure

WARNING: The source directory instead of the build directory was specified. WARNING: Only the default values for the project are printed, and all command line parameters are ignored.

Core properties: Source dir /tmp/snes9x/gtk

Main project options:

Core options Default Value Possible Values Description


auto_features auto [enabled, disabled, auto] Override value of all 'auto' features backend ninja [ninja, vs, vs2010, vs2015, vs2017, vs2019, xcode] Backend to use buildtype debug [plain, debug, debugoptimized, release, minsize, custom] Build type to use cmake_prefix_path [] List of additional prefixes for cmake to search debug true [true, false] Debug default_library shared [shared, static, both] Default library type force_fallback_for [] Force fallback for those subprojects install_umask 0022 [preserve, 0000-0777] Default umask to apply on permissions of installed files layout mirror [mirror, flat] Build directory layout optimization 0 [0, g, 1, 2, 3, s] Optimization level pkg_config_path [] List of additional paths for pkg-config to search strip false [true, false] Strip targets on install unity off [on, off, subprojects] Unity build unity_size 4 >=2 Unity block size warning_level 1 [0, 1, 2, 3] Compiler warning level to use werror false [true, false] Treat warnings as errors wrap_mode default [default, nofallback, nodownload, forcefallback, nopromote] Wrap mode build.cmake_prefix_path [] List of additional prefixes for cmake to search build.pkg_config_path [] List of additional paths for pkg-config to search

Backend options Default Value Possible Values Description


backend_max_links 0 >=0 Maximum number of linker processes to run or 0 for no limit

Base options Default Value Possible Values Description


b_asneeded true [true, false] Use -Wl,--as-needed when linking b_colorout always [auto, always, never] Use colored output b_coverage false [true, false] Enable coverage tracking. b_lto false [true, false] Use link time optimization b_lto_threads 0 Use multiple threads for Link Time Optimization b_lundef true [true, false] Use -Wl,--no-undefined when linking b_ndebug false [true, false, if-release] Disable asserts b_pch true [true, false] Use precompiled headers b_pgo off [off, generate, use] Use profile guided optimization b_pie false [true, false] Build executables as position independent b_sanitize none [none, address, thread, undefined, memory, address,undefined] Code sanitizer to use b_staticpic true [true, false] Build static libraries as position independent

Compiler options Default Value Possible Values Description


c_args [] Extra arguments passed to the c compiler c_link_args [] Extra arguments passed to the c linker c_std none [none, c89, c99, c11, gnu89, gnu99, gnu11] C language standard to use cpp_args [] Extra arguments passed to the cpp compiler cpp_debugstl false [true, false] STL debug mode cpp_eh default [none, default, a, s, sc] C++ exception handling type. cpp_link_args [] Extra arguments passed to the cpp linker cpp_rtti true [true, false] Enable RTTI cpp_std c++11 [none, c++98, c++03, c++11, c++14, c++17, c++1z, c++2a, c++20, C++ language standard to use gnu++03, gnu++11, gnu++14, gnu++17, gnu++1z, gnu++2a,
gnu++20]
build.c_args [] Extra arguments passed to the c compiler build.c_link_args [] Extra arguments passed to the c linker build.c_std none [none, c89, c99, c11, gnu89, gnu99, gnu11] C language standard to use build.cpp_args [] Extra arguments passed to the cpp compiler build.cpp_debugstl false [true, false] STL debug mode build.cpp_eh default [none, default, a, s, sc] C++ exception handling type. build.cpp_link_args [] Extra arguments passed to the cpp linker build.cpp_rtti true [true, false] Enable RTTI build.cpp_std none [none, c++98, c++03, c++11, c++14, c++17, c++1z, c++2a, c++20, C++ language standard to use gnu++03, gnu++11, gnu++14, gnu++17, gnu++1z, gnu++2a,
gnu++20]

Directories Default Value Possible Values Description


prefix /usr/local Installation prefix bindir bin Executable directory datadir share Data file directory includedir include Header file directory infodir share/info Info page directory libdir lib64 Library directory libexecdir libexec Library executable directory localedir share/locale Locale data directory localstatedir /var/local Localstate data directory mandir share/man Manual page directory sbindir sbin System executable directory sharedstatedir /var/local/lib Architecture-independent data directory sysconfdir etc Sysconf data directory

Testing options Default Value Possible Values Description


errorlogs true [true, false] Whether to print the logs from failing tests stdsplit true [true, false] Split stdout and stderr in test logs

Project options Default Value Possible Values Description


alsa true [true, false] Build ALSA sound driver appdatadir Snes9x-only data directory (default: datadir/snes9x) dangerous-hacks false [true, false] Allow dangerous hacks to be enabled debugger true [true, false] Enable Snes9x Debugger gtk2 false [true, false] Build with GTK+ 2.0 as the toolkit gtk3 true [true, false] Build with GTK+ 3.0 as the toolkit hq2x true [true, false] Enable the HQ2x filters opengl true [true, false] Build support for OpenGL oss true [true, false] Build OSS sound driver portaudio true [true, false] Build PortAudio sound driver pulseaudio true [true, false] Build PulseAudio sound driver screenshot true [true, false] Enable screenshots slang true [true, false] Build support for slang-type shaders system-zip true [true, false] Build using system minizip library wayland true [true, false] Build support for Wayland xbrz true [true, false] Enable the xBRZ filters xv true [true, false] Build support for XV zlib true [true, false] Enable gzip compression

WARNING: The source directory instead of the build directory was specified. WARNING: Only the default values for the project are printed, and all command line parameters are ignored.

reset ; meson configure -Dgtk3=false -Dgtk2=true #Same output of meson configure reset ; meson configure --gtk3=false --gtk2=true #Same output of meson configure

meson configure project --gtk3=false --gtk2=true

usage: meson [-h] {setup,configure,dist,install,introspect,init,test,wrap,subprojects,help,rewrite,compile} ... meson: error: unrecognized arguments: --gtk3=false --gtk2=true

meson help configure

usage: meson configure [-h] [--prefix PREFIX] [--bindir BINDIR] [--datadir DATADIR] [--includedir INCLUDEDIR] [--infodir INFODIR] [--libdir LIBDIR] [--libexecdir LIBEXECDIR] [--localedir LOCALEDIR] [--localstatedir LOCALSTATEDIR] [--mandir MANDIR] [--sbindir SBINDIR] [--sharedstatedir SHAREDSTATEDIR] [--sysconfdir SYSCONFDIR] [--auto-features {enabled,disabled,auto}] [--backend {ninja,vs,vs2010,vs2015,vs2017,vs2019,xcode}] [--buildtype {plain,debug,debugoptimized,release,minsize,custom}] [--debug] [--default-library {shared,static,both}] [--errorlogs] [--install-umask INSTALL_UMASK] [--layout {mirror,flat}] [--optimization {0,g,1,2,3,s}] [--stdsplit] [--strip] [--unity {on,off,subprojects}] [--unity-size UNITY_SIZE] [--warnlevel {0,1,2,3}] [--werror] [--wrap-mode {default,nofallback,nodownload,forcefallback,nopromote}] [--force-fallback-for FORCE_FALLBACK_FOR] [--pkg-config-path PKG_CONFIG_PATH] [--build.pkg-config-path BUILD.PKG_CONFIG_PATH] [--cmake-prefix-path CMAKE_PREFIX_PATH] [--build.cmake-prefix-path BUILD.CMAKE_PREFIX_PATH] [-D option] [--clearcache] [builddir]

positional arguments: builddir

optional arguments: -h, --help show this help message and exit --prefix PREFIX Installation prefix (default: /usr/local). --bindir BINDIR Executable directory (default: bin). --datadir DATADIR Data file directory (default: share). --includedir INCLUDEDIR Header file directory (default: include). --infodir INFODIR Info page directory (default: share/info). --libdir LIBDIR Library directory (default: lib64). --libexecdir LIBEXECDIR Library executable directory (default: libexec). --localedir LOCALEDIR Locale data directory (default: share/locale). --localstatedir LOCALSTATEDIR Localstate data directory (default: var). --mandir MANDIR Manual page directory (default: share/man). --sbindir SBINDIR System executable directory (default: sbin). --sharedstatedir SHAREDSTATEDIR Architecture-independent data directory (default: com). --sysconfdir SYSCONFDIR Sysconf data directory (default: etc). --auto-features {enabled,disabled,auto} Override value of all 'auto' features (default: auto). --backend {ninja,vs,vs2010,vs2015,vs2017,vs2019,xcode} Backend to use (default: ninja). --buildtype {plain,debug,debugoptimized,release,minsize,custom} Build type to use (default: debug). --debug Debug --default-library {shared,static,both} Default library type (default: shared). --errorlogs Whether to print the logs from failing tests --install-umask INSTALL_UMASK Default umask to apply on permissions of installed files (default: 022). --layout {mirror,flat} Build directory layout (default: mirror). --optimization {0,g,1,2,3,s} Optimization level (default: 0). --stdsplit Split stdout and stderr in test logs --strip Strip targets on install --unity {on,off,subprojects} Unity build (default: off). --unity-size UNITY_SIZE Unity block size (default: (2, None, 4)). --warnlevel {0,1,2,3} Compiler warning level to use (default: 1). --werror Treat warnings as errors --wrap-mode {default,nofallback,nodownload,forcefallback,nopromote} Wrap mode (default: default). --force-fallback-for FORCE_FALLBACK_FOR Force fallback for those subprojects (default: []). --pkg-config-path PKG_CONFIG_PATH List of additional paths for pkg-config to search (default: []). (just for host machine) --build.pkg-config-path BUILD.PKG_CONFIG_PATH List of additional paths for pkg-config to search (default: []). (just for build machine) --cmake-prefix-path CMAKE_PREFIX_PATH List of additional prefixes for cmake to search (default: []). (just for host machine) --build.cmake-prefix-path BUILD.CMAKE_PREFIX_PATH List of additional prefixes for cmake to search (default: []). (just for build machine) -D option Set the value of an option, can be used several times to set multiple options. --clearcache Clear cached state (e.g. found dependencies)

reset ; meson configure -D gtk3=false -D gtk2=true #Same output of meson configure

Well i don't have idea how i can set use gtk2 and not gtk3, because on my distro gtk is 3.18 and for gtk3 build needs gtk 3.22

bearoso commented 1 year ago

Meson will no longer be used, I've switched to CMake. Gtk2 hasn't been supported forever. I suggest updating your distribution because Gtk3 before 3.24 is terrible. If you can't do that, flatpak has packages that have the updated gtk3 included in its runtime.