Skip to content

Commit

Permalink
Removed version.cpp. Version control is now in the makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbbert committed Jan 8, 2025
1 parent 8a2e6c6 commit ed4fbf6
Show file tree
Hide file tree
Showing 33 changed files with 3,128 additions and 187 deletions.
7 changes: 6 additions & 1 deletion docs/release/build/newsrc.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ rd %to%\src /q /s
md %to%\src\emu

copy /Y %from%\makefile %to%
copy /Y %from%\src\version.cpp %to%\src
copy /Y %from%\src\emu\validity.cpp %to%\src\emu
copy /Y %from%\src\emu\digfx.h %to%\src\emu
copy /Y %from%\src\emu\emuopts.* %to%\src\emu
copy /Y %from%\src\emu\main.h %to%\src\emu
copy /Y %from%\src\emu\romload.cpp %to%\src\emu
copy /Y %from%\src\emu\video.* %to%\src\emu

Expand All @@ -18,9 +18,13 @@ copy /Y %from%\src\frontend\mame\audit.* %to%\src\frontend\mame
copy /Y %from%\src\frontend\mame\clifront.cpp %to%\src\frontend\mame
copy /Y %from%\src\frontend\mame\language.cpp %to%\src\frontend\mame
copy /Y %from%\src\frontend\mame\info.cpp %to%\src\frontend\mame
copy /Y %from%\src\frontend\mame\mame.* %to%\src\frontend\mame
copy /Y %from%\src\frontend\mame\mameopts.* %to%\src\frontend\mame
copy /Y %from%\src\frontend\mame\ui\about.cpp %to%\src\frontend\mame\ui
copy /Y %from%\src\frontend\mame\ui\auditmenu.cpp %to%\src\frontend\mame\ui
copy /Y %from%\src\frontend\mame\ui\inifile.cpp %to%\src\frontend\mame\ui
copy /Y %from%\src\frontend\mame\ui\selgame.cpp %to%\src\frontend\mame\ui
copy /Y %from%\src\frontend\mame\ui\selsoft.cpp %to%\src\frontend\mame\ui

md %to%\src\devices\cpu\m68000
copy /Y %from%\src\devices\cpu\m68000\m68kcpu.cpp %to%\src\devices\cpu\m68000
Expand Down Expand Up @@ -54,6 +58,7 @@ md %to%\src\osd\winui
xcopy /E /Y %from%\src\osd\winui %to%\src\osd\winui

md %to%\src\osd\modules\render
copy /Y %from%\src\osd\modules\osdwindow.cpp %to%\src\osd\modules
copy /Y %from%\src\osd\modules\render\drawd3d.cpp %to%\src\osd\modules\render

md %to%\src\osd\windows
Expand Down
19 changes: 13 additions & 6 deletions docs/release/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
#
###########################################################################


BARE_VERS := 0.245
LONG_VERS := $(BARE_VERS).21x

###########################################################################
################# BEGIN USER-CONFIGURABLE OPTIONS #####################
Expand Down Expand Up @@ -1072,7 +1073,7 @@ endif
ifneq ($(IGNORE_GIT),1)
NEW_GIT_VERSION := $(shell git describe --dirty)
else
NEW_GIT_VERSION := unknown
NEW_GIT_VERSION := $(strip $(shell cmd /c date /T))
endif
ifeq ($(NEW_GIT_VERSION),)
NEW_GIT_VERSION := unknown
Expand Down Expand Up @@ -1546,24 +1547,30 @@ endif

ifeq (posix,$(SHELLTYPE))
$(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS)
@echo '#define BARE_BUILD_VERSION "0.245.21"' > $@
@echo '#define LONG_BUILD_VERSION "$(LONG_VERS)"' > $@
@echo '#define BARE_BUILD_VERSION "$(BARE_VERS)"' >> $@
@echo '#define BARE_VCS_REVISION "$(NEW_GIT_VERSION)"' >> $@
@echo 'extern const char bare_build_version[];' >> $@
@echo 'extern const char long_build_version[];' >> $@
@echo 'extern const char bare_vcs_revision[];' >> $@
@echo 'extern const char build_version[];' >> $@
@echo 'const char bare_build_version[] = BARE_BUILD_VERSION;' >> $@
@echo 'const char long_build_version[] = LONG_BUILD_VERSION;' >> $@
@echo 'const char bare_vcs_revision[] = BARE_VCS_REVISION;' >> $@
@echo 'const char build_version[] = BARE_BUILD_VERSION " (" BARE_VCS_REVISION ")";' >> $@
@echo 'const char build_version[] = LONG_BUILD_VERSION " (" BARE_VCS_REVISION ")";' >> $@
else
$(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS)
@echo #define BARE_BUILD_VERSION "0.245.21" > $@
@echo #define LONG_BUILD_VERSION "$(LONG_VERS)" > $@
@echo #define BARE_BUILD_VERSION "$(BARE_VERS)" >> $@
@echo #define BARE_VCS_REVISION "$(NEW_GIT_VERSION)" >> $@
@echo extern const char bare_build_version[]; >> $@
@echo extern const char long_build_version[]; >> $@
@echo extern const char bare_vcs_revision[]; >> $@
@echo extern const char build_version[]; >> $@
@echo const char bare_build_version[] = BARE_BUILD_VERSION; >> $@
@echo const char long_build_version[] = LONG_BUILD_VERSION; >> $@
@echo const char bare_vcs_revision[] = BARE_VCS_REVISION; >> $@
@echo const char build_version[] = BARE_BUILD_VERSION " (" BARE_VCS_REVISION ")"; >> $@
@echo const char build_version[] = LONG_BUILD_VERSION " (" BARE_VCS_REVISION ")"; >> $@
endif


Expand Down
2 changes: 1 addition & 1 deletion docs/release/scripts/build/verinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def usage():

## Winui - display 0.nnn.0
def extract_version(input):
pattern = re.compile('\s+BARE_BUILD_VERSION\s+"(([^."]+)\.([^."]+)\.([^."]+))"')
pattern = re.compile('\s+LONG_BUILD_VERSION\s+"(([^."]+)\.([^."]+)\.([^."]+))"')
for line in input.readlines():
match = pattern.search(line)
if match:
Expand Down
5 changes: 5 additions & 0 deletions docs/release/scripts/genie.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,11 @@ end
"-Wno-bitwise-instead-of-logical", -- clang 14.0 complains about &, | on bools in asmjit
}
end
if version >= 180100 then
buildoptions {
"-Wno-vla-cxx-extension", -- clang 18.1 complains about variable-length arrays in C++ -- HBMAME
}
end
else
if version < 70000 then
print("GCC version 7.0 or later needed")
Expand Down
7 changes: 4 additions & 3 deletions docs/release/scripts/src/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ if (STANDALONE~=true) then
end
files {
mainfile,
MAME_DIR .. "src/version.cpp",
-- MAME_DIR .. "src/version.cpp",
GEN_DIR .. "version.cpp",
GEN_DIR .. _target .. "/" .. _subtarget .."/drivlist.cpp",
}

Expand Down Expand Up @@ -313,8 +314,8 @@ if (STANDALONE~=true) then

configuration { "mingw*" }
custombuildtask {
-- { GEN_DIR .. "version.cpp" , GEN_DIR .. "resource/" .. rctarget .. "vers.rc", { MAME_DIR .. "scripts/build/verinfo.py" }, {"@echo Emitting " .. rctarget .. "vers.rc" .. "...", PYTHON .. " $(1) -r -b " .. rctarget .. " $(<) > $(@)" }},
{ MAME_DIR .. "src/version.cpp" , GEN_DIR .. "resource/" .. rctarget .. "vers.rc", { MAME_DIR .. "scripts/build/verinfo.py" }, {"@echo Emitting " .. rctarget .. "vers.rc" .. "...", PYTHON .. " $(1) -r -b " .. rctarget .. " $(<) > $(@)" }},
{ GEN_DIR .. "version.cpp" , GEN_DIR .. "resource/" .. rctarget .. "vers.rc", { MAME_DIR .. "scripts/build/verinfo.py" }, {"@echo Emitting " .. rctarget .. "vers.rc" .. "...", PYTHON .. " $(1) -r -b " .. rctarget .. " $(<) > $(@)" }},
-- { MAME_DIR .. "src/version.cpp" , GEN_DIR .. "resource/" .. rctarget .. "vers.rc", { MAME_DIR .. "scripts/build/verinfo.py" }, {"@echo Emitting " .. rctarget .. "vers.rc" .. "...", PYTHON .. " $(1) -r -b " .. rctarget .. " $(<) > $(@)" }},
}

configuration { "vs20*" }
Expand Down
102 changes: 102 additions & 0 deletions docs/release/src/emu/main.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria, Aaron Giles
/***************************************************************************
main.h
Controls execution of the core emulator system.
***************************************************************************/

#pragma once

#ifndef __EMU_H__
#error Dont include this file directly; include emu.h instead.
#endif

#ifndef MAME_EMU_MAIN_H
#define MAME_EMU_MAIN_H

#include <thread>
#include <ctime>

//**************************************************************************
// CONSTANTS
//**************************************************************************

constexpr int EMU_ERR_NONE = 0; // no error
constexpr int EMU_ERR_FAILED_VALIDITY = 1; // failed validity checks
constexpr int EMU_ERR_MISSING_FILES = 2; // missing files
constexpr int EMU_ERR_FATALERROR = 3; // some other fatal error
constexpr int EMU_ERR_DEVICE = 4; // device initialization error
constexpr int EMU_ERR_NO_SUCH_SYSTEM = 5; // system was specified but doesn't exist
constexpr int EMU_ERR_INVALID_CONFIG = 6; // some sort of error in configuration
constexpr int EMU_ERR_IDENT_NONROMS = 7; // identified all non-ROM files
constexpr int EMU_ERR_IDENT_PARTIAL = 8; // identified some files but not all
constexpr int EMU_ERR_IDENT_NONE = 9; // identified no files


//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************

class emulator_info
{
public:
// construction/destruction
emulator_info() = default;

static const char *get_appname();
static const char *get_appname_lower();
static const char *get_configname();
static const char *get_copyright();
static const char *get_copyright_info();
static const char *get_bare_build_version();
static const char *get_long_build_version();
static const char *get_build_version();
static void display_ui_chooser(running_machine &machine);
static int start_frontend(emu_options &options, osd_interface &osd, std::vector<std::string> &args);
static int start_frontend(emu_options &options, osd_interface &osd, int argc, char *argv[]);
static void draw_user_interface(running_machine& machine);
static void periodic_check();
static bool frame_hook();
static void sound_hook();
static void layout_script_cb(layout_file &file, const char *script);
static bool standalone();
};


class machine_manager
{
DISABLE_COPYING(machine_manager);
protected:
// construction/destruction
machine_manager(emu_options& options, osd_interface& osd);
public:
virtual ~machine_manager();

osd_interface &osd() const { return m_osd; }
emu_options &options() const { return m_options; }

running_machine *machine() const { return m_machine; }

void set_machine(running_machine *machine) { m_machine = machine; }

virtual ui_manager* create_ui(running_machine& machine) { return nullptr; }
virtual void create_custom(running_machine& machine) { }
virtual void load_cheatfiles(running_machine& machine) { }
virtual void ui_initialize(running_machine& machine) { }
virtual void before_load_settings(running_machine &machine) { }

virtual void update_machine() { }

//http_manager *http();
//void start_http_server();

protected:
osd_interface & m_osd; // reference to OSD system
emu_options & m_options; // reference to options
running_machine * m_machine;
//std::unique_ptr<http_manager> m_http;
};

#endif // MAME_EMU_MAIN_H
Loading

0 comments on commit ed4fbf6

Please sign in to comment.