Skip to content

Commit

Permalink
undo: linux & windows build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy-Yakovenko committed Feb 1, 2024
1 parent a2b9f7c commit fca851f
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 36 deletions.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,7 @@ shared/Makefile
shared/analyzer/Makefile
shared/scope/Makefile
shared/scriptable/Makefile
shared/undo/Makefile
external/Makefile
external/ddb_dsp_libretro/Makefile
external/ddb_output_pw/Makefile
Expand Down
32 changes: 12 additions & 20 deletions osx/deadbeef.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1656,8 +1656,6 @@
2D95F6BE29392CE9002D8499 /* libvorbislib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D7C37F41B2C40580029DE0A /* libvorbislib.dylib */; };
2D95F6C129392F18002D8499 /* base64.c in Sources */ = {isa = PBXBuildFile; fileRef = 2D95F6BF29392F17002D8499 /* base64.c */; };
2D95F6C229392F18002D8499 /* base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D95F6C029392F17002D8499 /* base64.h */; };
2D95F6DD293B58E1002D8499 /* undo_playlist.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D95F6DB293B58E1002D8499 /* undo_playlist.h */; };
2D95F70C293B95AC002D8499 /* undomanager.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D95F70A293B95AC002D8499 /* undomanager.h */; };
2D95F721293BA3B8002D8499 /* NSUndoManager+DdbUndoBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D95F71F293BA3B8002D8499 /* NSUndoManager+DdbUndoBuffer.h */; };
2D95F725293BA3DA002D8499 /* DdbUndoBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D95F723293BA3DA002D8499 /* DdbUndoBuffer.h */; };
2D95F726293BA3DA002D8499 /* DdbUndoBuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D95F724293BA3DA002D8499 /* DdbUndoBuffer.m */; };
Expand Down Expand Up @@ -6241,8 +6239,6 @@
2D95F6B929392884002D8499 /* artwork_ogg.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = artwork_ogg.c; sourceTree = "<group>"; };
2D95F6BF29392F17002D8499 /* base64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = base64.c; sourceTree = "<group>"; };
2D95F6C029392F17002D8499 /* base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = base64.h; sourceTree = "<group>"; };
2D95F6DB293B58E1002D8499 /* undo_playlist.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = undo_playlist.h; sourceTree = "<group>"; };
2D95F70A293B95AC002D8499 /* undomanager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = undomanager.h; sourceTree = "<group>"; };
2D95F71F293BA3B8002D8499 /* NSUndoManager+DdbUndoBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSUndoManager+DdbUndoBuffer.h"; sourceTree = "<group>"; };
2D95F720293BA3B8002D8499 /* NSUndoManager+DdbUndoBuffer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSUndoManager+DdbUndoBuffer.m"; sourceTree = "<group>"; };
2D95F723293BA3DA002D8499 /* DdbUndoBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DdbUndoBuffer.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -9587,6 +9583,17 @@
path = codebook;
sourceTree = "<group>";
};
2D2C51632B6C085400EAC44E /* undo */ = {
isa = PBXGroup;
children = (
2D7387D529BE5DA1003E3126 /* undobuffer.c */,
2D7387D829BE5DA1003E3126 /* undobuffer.h */,
2D7387D429BE5DA1003E3126 /* undomanager.c */,
2D7387D729BE5DA1003E3126 /* undomanager.h */,
);
path = undo;
sourceTree = "<group>";
};
2D30D13625E2A6B40023A299 /* DesignMode */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -10458,10 +10465,6 @@
children = (
2D7387D629BE5DA1003E3126 /* undo_playlist.c */,
2D7387D929BE5DA1003E3126 /* undo_playlist.h */,
2D7387D529BE5DA1003E3126 /* undobuffer.c */,
2D7387D829BE5DA1003E3126 /* undobuffer.h */,
2D7387D429BE5DA1003E3126 /* undomanager.c */,
2D7387D729BE5DA1003E3126 /* undomanager.h */,
);
path = undo;
sourceTree = "<group>";
Expand Down Expand Up @@ -10968,6 +10971,7 @@
2D92D1ED29B92DF900218F1D /* shared */ = {
isa = PBXGroup;
children = (
2D2C51632B6C085400EAC44E /* undo */,
2DB520E52AA8FA4C00B6250A /* scriptable */,
2D92D21929B92DF900218F1D /* analyzer */,
2D92D1F629B92DF900218F1D /* scope */,
Expand Down Expand Up @@ -12092,15 +12096,6 @@
path = Playlist;
sourceTree = "<group>";
};
2DDD75EF25E14FC200FA6FE5 /* Recovered References */ = {
isa = PBXGroup;
children = (
2D95F6DB293B58E1002D8499 /* undo_playlist.h */,
2D95F70A293B95AC002D8499 /* undomanager.h */,
);
name = "Recovered References";
sourceTree = "<group>";
};
2DDD764125E1506100FA6FE5 /* metadata */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -12393,7 +12388,6 @@
4D1B3E7C18379829003E6066 /* Frameworks */,
4D1B3E7B18379829003E6066 /* Products */,
2D48DC5C2269B732002CACFD /* DeaDBeeF GTK3.plist */,
2DDD75EF25E14FC200FA6FE5 /* Recovered References */,
2DC6578D274428F300583E14 /* DeaDBeeF GTK2.plist */,
);
sourceTree = "<group>";
Expand Down Expand Up @@ -14700,13 +14694,11 @@
2DC657C62748502F00583E14 /* SegmentedTabView.h in Headers */,
2DF55C432270FF7E002C44DC /* ScriptablePropertySheetDataSource.h in Headers */,
2DC6580D274A994100583E14 /* TableViewWithReturnAction.h in Headers */,
2D95F6DD293B58E1002D8499 /* undo_playlist.h in Headers */,
2D30D20C25E2A8930023A299 /* WidgetTopLevelView.h in Headers */,
2D78C55927568B4A00F96F9D /* medialibscanner.h in Headers */,
2D72047619DF2971000989C6 /* PlaylistViewController.h in Headers */,
2D8030CD24B261A400539F9F /* MediaLibraryItem.h in Headers */,
2DCF73B41A952F8900495740 /* PreferencesWindowController.h in Headers */,
2D95F70C293B95AC002D8499 /* undomanager.h in Headers */,
2D046F7D25E2B55200F68459 /* MainWindow.h in Headers */,
2D98B67F272B272300E655AE /* ScopeShaderTypes.h in Headers */,
2D747E4024B6580A00BBB987 /* MainWindowSidebarViewController.h in Headers */,
Expand Down
4 changes: 2 additions & 2 deletions plugins/gtkui/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ GTKUI_SOURCES_GTK2 = $(GTKUI_SOURCES)
ddb_gui_GTK2_la_SOURCES = $(GTKUI_SOURCES_GTK2)
ddb_gui_GTK2_la_LDFLAGS = -module -avoid-version

ddb_gui_GTK2_la_LIBADD = $(LDADD) $(GTK2_DEPS_LIBS) $(SM_LIBADD) ../libparser/libparser.la ../../shared/libtrkpropertiesutil.la ../../shared/libeqpreset.la ../../shared/libdeletefromdisk.la ../../shared/libtftintutil.la ../../shared/analyzer/libanalyzer.la ../../shared/scope/libscope.la ../../shared/scriptable/libscriptable.la $(JANSSON_LIBS) $(DISPATCH_LIBS)
ddb_gui_GTK2_la_LIBADD = $(LDADD) $(GTK2_DEPS_LIBS) $(SM_LIBADD) ../libparser/libparser.la ../../shared/libtrkpropertiesutil.la ../../shared/libeqpreset.la ../../shared/libdeletefromdisk.la ../../shared/libtftintutil.la ../../shared/analyzer/libanalyzer.la ../../shared/scope/libscope.la ../../shared/scriptable/libscriptable.la ../../shared/undo/libundo.la $(JANSSON_LIBS) $(DISPATCH_LIBS)

ddb_gui_GTK2_la_CFLAGS = -std=c99 -Werror -DGLIB_DISABLE_DEPRECATION_WARNINGS -DGDK_DISABLE_DEPRECATION_WARNINGS -DGTK_DISABLE_DEPRECATION_WARNINGS $(GTK2_DEPS_CFLAGS) $(SM_CFLAGS) $(JANSSON_CFLAGS) $(DISPATCH_CFLAGS) $(MEDIALIB_CFLAGS) -I@top_srcdir@/include -I@top_srcdir@/shared -DDDB_WARN_DEPRECATED=1

Expand All @@ -113,7 +113,7 @@ GTKUI_SOURCES_GTK3 = deadbeefapp.c deadbeefapp.h $(GTKUI_SOURCES)
ddb_gui_GTK3_la_LDFLAGS = -module -avoid-version

ddb_gui_GTK3_la_SOURCES = $(GTKUI_SOURCES_GTK3)
ddb_gui_GTK3_la_LIBADD = $(LDADD) $(GTK3_DEPS_LIBS) $(SM_LIBADD) ../libparser/libparser.la ../../shared/libtrkpropertiesutil.la ../../shared/libeqpreset.la ../../shared/libdeletefromdisk.la ../../shared/libtftintutil.la ../../shared/analyzer/libanalyzer.la ../../shared/scope/libscope.la ../../shared/scriptable/libscriptable.la $(JANSSON_LIBS) $(DISPATCH_LIBS)
ddb_gui_GTK3_la_LIBADD = $(LDADD) $(GTK3_DEPS_LIBS) $(SM_LIBADD) ../libparser/libparser.la ../../shared/libtrkpropertiesutil.la ../../shared/libeqpreset.la ../../shared/libdeletefromdisk.la ../../shared/libtftintutil.la ../../shared/analyzer/libanalyzer.la ../../shared/scope/libscope.la ../../shared/scriptable/libscriptable.la ../../shared/undo/libundo.la $(JANSSON_LIBS) $(DISPATCH_LIBS)
ddb_gui_GTK3_la_CFLAGS = -std=c99 -Werror -DGLIB_DISABLE_DEPRECATION_WARNINGS -DGDK_DISABLE_DEPRECATION_WARNINGS -DGTK_DISABLE_DEPRECATION_WARNINGS $(GTK3_DEPS_CFLAGS) $(SM_CFLAGS) $(JANSSON_CFLAGS) $(DISPATCH_CFLAGS) $(MEDIALIB_CFLAGS) -I@top_srcdir@/include -I@top_srcdir@/shared -DDDB_WARN_DEPRECATED=1
ddb_gui_GTK3_la_OBJCFLAGS = $(GTK3_DEPS_CFLAGS) $(SM_CFLAGS) $(JANSSON_CFLAGS)

Expand Down
2 changes: 1 addition & 1 deletion plugins/gtkui/gtkui.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
#include "covermanager/albumartwidget.h"
#include "selpropertieswidget.h"
#include "undo.h"
#include "undomanager.h"
#include "undo/undomanager.h"

#define USE_GTK_APPLICATION 1

Expand Down
4 changes: 2 additions & 2 deletions plugins/gtkui/undo.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#include <stdlib.h>
#include <string.h>
#include "undo.h"
#include "undobuffer.h"
#include "undomanager.h"
#include "undo/undobuffer.h"
#include "undo/undomanager.h"

extern DB_functions_t *deadbeef;

Expand Down
2 changes: 1 addition & 1 deletion plugins/gtkui/undo.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifndef undo_h
#define undo_h

#include "undobuffer.h"
#include "undo/undobuffer.h"

void
gtkui_undo_deinit (void);
Expand Down
5 changes: 5 additions & 0 deletions premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ project "deadbeef"
"external/wcwidth/wcwidth.c",
"shared/ctmap.c",
}
includedirs {
"shared"
}
defines {
"PORTABLE=1",
"STATICLINK=1",
Expand Down Expand Up @@ -832,6 +835,7 @@ project "ddb_gui_GTK2"
"shared/analyzer/analyzer.c",
"shared/scope/scope.c",
"shared/scriptable/*.c",
"shared/undo/*.c",
"plugins/libparser/parser.c",
"src/utf8.c"
}
Expand Down Expand Up @@ -865,6 +869,7 @@ project "ddb_gui_GTK3"
"shared/analyzer/analyzer.c",
"shared/scope/scope.c",
"shared/scriptable/*.c",
"shared/undo/*.c",
"plugins/libparser/parser.c",
"src/utf8.c"
}
Expand Down
3 changes: 2 additions & 1 deletion shared/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SUBDIRS = analyzer scope scriptable
SUBDIRS = analyzer scope scriptable undo

noinst_LTLIBRARIES = libmp4tagutil.la libtrkpropertiesutil.la libeqpreset.la libctmap.la libdeletefromdisk.la libtftintutil.la

Expand All @@ -19,3 +19,4 @@ libdeletefromdisk_la_CFLAGS = -fPIC -std=c99 -I@top_srcdir@/include

libtftintutil_la_SOURCES = tftintutil.h tftintutil.c
libtftintutil_la_CFLAGS = -fPIC -std=c99 -I@top_srcdir@/include

8 changes: 8 additions & 0 deletions shared/undo/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
noinst_LTLIBRARIES = libundo.la

libundo_la_SOURCES = \
undobuffer.c undobuffer.h\
undomanager.c undomanager.h

libundo_la_CFLAGS = -fPIC -std=c99 -I@top_srcdir@/include $(DISPATCH_CFLAGS)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 3 additions & 5 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ deadbeef_SOURCES =\
vfs.c vfs.h vfs_stdio.c\
volume.c volume.h\
viz.c viz.h\
undo/undo_playlist.c undo/undo_playlist.h\
undo/undobuffer.c undo/undobuffer.h\
undo/undomanager.c undo/undomanager.h
undo/undo_playlist.c undo/undo_playlist.h

deadbeef_LDADD = $(LDADD) $(ICONV_LIB) $(DL_LIBS) -lm -lpthread $(DISPATCH_LIBS) $(LTLIBINTL) ../shared/libctmap.la ../plugins/libparser/libparser.la
deadbeef_LDADD = $(LDADD) $(ICONV_LIB) $(DL_LIBS) -lm -lpthread $(DISPATCH_LIBS) $(LTLIBINTL) ../shared/libctmap.la ../shared/undo/libundo.la ../plugins/libparser/libparser.la

deadbeef_CFLAGS = $(DEPS_CFLAGS) $(DISPATCH_CFLAGS) -std=c99 -DLOCALEDIR=\"@localedir@\" -I@top_srcdir@/include -I@top_srcdir@
deadbeef_CFLAGS = $(DEPS_CFLAGS) $(DISPATCH_CFLAGS) -std=c99 -DLOCALEDIR=\"@localedir@\" -I@top_srcdir@/include -I@top_srcdir@/shared -I@top_srcdir@

EXTRA_DIST = sj_to_unicode.h
2 changes: 0 additions & 2 deletions src/playlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@
#endif

// file format revision history
// 1.1->1.2 changelog:
// added flags field
// 1.0->1.1 changelog:
// added sample-accurate seek positions for sub-tracks
// 1.1->1.2 changelog:
Expand Down
1 change: 0 additions & 1 deletion src/undo/undo_playlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

#include <stdlib.h>
#include <string.h>
#include "undobuffer.h"
#include "undo_playlist.h"

#define UNDO_SELECTION_LIST_UNSELECTED 1
Expand Down
2 changes: 1 addition & 1 deletion src/undo/undo_playlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#ifndef undo_playlist_h
#define undo_playlist_h

#include "undobuffer.h"
#include "undo/undobuffer.h"
#include "../playlist.h"

void
Expand Down

0 comments on commit fca851f

Please sign in to comment.