Skip to content

Commit fca851f

Browse files
undo: linux & windows build fixes
1 parent a2b9f7c commit fca851f

17 files changed

+38
-36
lines changed

configure.ac

+1
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,7 @@ shared/Makefile
940940
shared/analyzer/Makefile
941941
shared/scope/Makefile
942942
shared/scriptable/Makefile
943+
shared/undo/Makefile
943944
external/Makefile
944945
external/ddb_dsp_libretro/Makefile
945946
external/ddb_output_pw/Makefile

osx/deadbeef.xcodeproj/project.pbxproj

+12-20
Original file line numberDiff line numberDiff line change
@@ -1656,8 +1656,6 @@
16561656
2D95F6BE29392CE9002D8499 /* libvorbislib.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D7C37F41B2C40580029DE0A /* libvorbislib.dylib */; };
16571657
2D95F6C129392F18002D8499 /* base64.c in Sources */ = {isa = PBXBuildFile; fileRef = 2D95F6BF29392F17002D8499 /* base64.c */; };
16581658
2D95F6C229392F18002D8499 /* base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D95F6C029392F17002D8499 /* base64.h */; };
1659-
2D95F6DD293B58E1002D8499 /* undo_playlist.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D95F6DB293B58E1002D8499 /* undo_playlist.h */; };
1660-
2D95F70C293B95AC002D8499 /* undomanager.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D95F70A293B95AC002D8499 /* undomanager.h */; };
16611659
2D95F721293BA3B8002D8499 /* NSUndoManager+DdbUndoBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D95F71F293BA3B8002D8499 /* NSUndoManager+DdbUndoBuffer.h */; };
16621660
2D95F725293BA3DA002D8499 /* DdbUndoBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D95F723293BA3DA002D8499 /* DdbUndoBuffer.h */; };
16631661
2D95F726293BA3DA002D8499 /* DdbUndoBuffer.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D95F724293BA3DA002D8499 /* DdbUndoBuffer.m */; };
@@ -6241,8 +6239,6 @@
62416239
2D95F6B929392884002D8499 /* artwork_ogg.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = artwork_ogg.c; sourceTree = "<group>"; };
62426240
2D95F6BF29392F17002D8499 /* base64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = base64.c; sourceTree = "<group>"; };
62436241
2D95F6C029392F17002D8499 /* base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = base64.h; sourceTree = "<group>"; };
6244-
2D95F6DB293B58E1002D8499 /* undo_playlist.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = undo_playlist.h; sourceTree = "<group>"; };
6245-
2D95F70A293B95AC002D8499 /* undomanager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = undomanager.h; sourceTree = "<group>"; };
62466242
2D95F71F293BA3B8002D8499 /* NSUndoManager+DdbUndoBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSUndoManager+DdbUndoBuffer.h"; sourceTree = "<group>"; };
62476243
2D95F720293BA3B8002D8499 /* NSUndoManager+DdbUndoBuffer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSUndoManager+DdbUndoBuffer.m"; sourceTree = "<group>"; };
62486244
2D95F723293BA3DA002D8499 /* DdbUndoBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DdbUndoBuffer.h; sourceTree = "<group>"; };
@@ -9587,6 +9583,17 @@
95879583
path = codebook;
95889584
sourceTree = "<group>";
95899585
};
9586+
2D2C51632B6C085400EAC44E /* undo */ = {
9587+
isa = PBXGroup;
9588+
children = (
9589+
2D7387D529BE5DA1003E3126 /* undobuffer.c */,
9590+
2D7387D829BE5DA1003E3126 /* undobuffer.h */,
9591+
2D7387D429BE5DA1003E3126 /* undomanager.c */,
9592+
2D7387D729BE5DA1003E3126 /* undomanager.h */,
9593+
);
9594+
path = undo;
9595+
sourceTree = "<group>";
9596+
};
95909597
2D30D13625E2A6B40023A299 /* DesignMode */ = {
95919598
isa = PBXGroup;
95929599
children = (
@@ -10458,10 +10465,6 @@
1045810465
children = (
1045910466
2D7387D629BE5DA1003E3126 /* undo_playlist.c */,
1046010467
2D7387D929BE5DA1003E3126 /* undo_playlist.h */,
10461-
2D7387D529BE5DA1003E3126 /* undobuffer.c */,
10462-
2D7387D829BE5DA1003E3126 /* undobuffer.h */,
10463-
2D7387D429BE5DA1003E3126 /* undomanager.c */,
10464-
2D7387D729BE5DA1003E3126 /* undomanager.h */,
1046510468
);
1046610469
path = undo;
1046710470
sourceTree = "<group>";
@@ -10968,6 +10971,7 @@
1096810971
2D92D1ED29B92DF900218F1D /* shared */ = {
1096910972
isa = PBXGroup;
1097010973
children = (
10974+
2D2C51632B6C085400EAC44E /* undo */,
1097110975
2DB520E52AA8FA4C00B6250A /* scriptable */,
1097210976
2D92D21929B92DF900218F1D /* analyzer */,
1097310977
2D92D1F629B92DF900218F1D /* scope */,
@@ -12092,15 +12096,6 @@
1209212096
path = Playlist;
1209312097
sourceTree = "<group>";
1209412098
};
12095-
2DDD75EF25E14FC200FA6FE5 /* Recovered References */ = {
12096-
isa = PBXGroup;
12097-
children = (
12098-
2D95F6DB293B58E1002D8499 /* undo_playlist.h */,
12099-
2D95F70A293B95AC002D8499 /* undomanager.h */,
12100-
);
12101-
name = "Recovered References";
12102-
sourceTree = "<group>";
12103-
};
1210412099
2DDD764125E1506100FA6FE5 /* metadata */ = {
1210512100
isa = PBXGroup;
1210612101
children = (
@@ -12393,7 +12388,6 @@
1239312388
4D1B3E7C18379829003E6066 /* Frameworks */,
1239412389
4D1B3E7B18379829003E6066 /* Products */,
1239512390
2D48DC5C2269B732002CACFD /* DeaDBeeF GTK3.plist */,
12396-
2DDD75EF25E14FC200FA6FE5 /* Recovered References */,
1239712391
2DC6578D274428F300583E14 /* DeaDBeeF GTK2.plist */,
1239812392
);
1239912393
sourceTree = "<group>";
@@ -14700,13 +14694,11 @@
1470014694
2DC657C62748502F00583E14 /* SegmentedTabView.h in Headers */,
1470114695
2DF55C432270FF7E002C44DC /* ScriptablePropertySheetDataSource.h in Headers */,
1470214696
2DC6580D274A994100583E14 /* TableViewWithReturnAction.h in Headers */,
14703-
2D95F6DD293B58E1002D8499 /* undo_playlist.h in Headers */,
1470414697
2D30D20C25E2A8930023A299 /* WidgetTopLevelView.h in Headers */,
1470514698
2D78C55927568B4A00F96F9D /* medialibscanner.h in Headers */,
1470614699
2D72047619DF2971000989C6 /* PlaylistViewController.h in Headers */,
1470714700
2D8030CD24B261A400539F9F /* MediaLibraryItem.h in Headers */,
1470814701
2DCF73B41A952F8900495740 /* PreferencesWindowController.h in Headers */,
14709-
2D95F70C293B95AC002D8499 /* undomanager.h in Headers */,
1471014702
2D046F7D25E2B55200F68459 /* MainWindow.h in Headers */,
1471114703
2D98B67F272B272300E655AE /* ScopeShaderTypes.h in Headers */,
1471214704
2D747E4024B6580A00BBB987 /* MainWindowSidebarViewController.h in Headers */,

plugins/gtkui/Makefile.am

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ GTKUI_SOURCES_GTK2 = $(GTKUI_SOURCES)
101101
ddb_gui_GTK2_la_SOURCES = $(GTKUI_SOURCES_GTK2)
102102
ddb_gui_GTK2_la_LDFLAGS = -module -avoid-version
103103

104-
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)
104+
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)
105105

106106
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
107107

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

115115
ddb_gui_GTK3_la_SOURCES = $(GTKUI_SOURCES_GTK3)
116-
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)
116+
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)
117117
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
118118
ddb_gui_GTK3_la_OBJCFLAGS = $(GTK3_DEPS_CFLAGS) $(SM_CFLAGS) $(JANSSON_CFLAGS)
119119

plugins/gtkui/gtkui.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
#include "covermanager/albumartwidget.h"
7070
#include "selpropertieswidget.h"
7171
#include "undo.h"
72-
#include "undomanager.h"
72+
#include "undo/undomanager.h"
7373

7474
#define USE_GTK_APPLICATION 1
7575

plugins/gtkui/undo.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
#include <stdlib.h>
2626
#include <string.h>
2727
#include "undo.h"
28-
#include "undobuffer.h"
29-
#include "undomanager.h"
28+
#include "undo/undobuffer.h"
29+
#include "undo/undomanager.h"
3030

3131
extern DB_functions_t *deadbeef;
3232

plugins/gtkui/undo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#ifndef undo_h
2525
#define undo_h
2626

27-
#include "undobuffer.h"
27+
#include "undo/undobuffer.h"
2828

2929
void
3030
gtkui_undo_deinit (void);

premake5.lua

+5
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ project "deadbeef"
199199
"external/wcwidth/wcwidth.c",
200200
"shared/ctmap.c",
201201
}
202+
includedirs {
203+
"shared"
204+
}
202205
defines {
203206
"PORTABLE=1",
204207
"STATICLINK=1",
@@ -832,6 +835,7 @@ project "ddb_gui_GTK2"
832835
"shared/analyzer/analyzer.c",
833836
"shared/scope/scope.c",
834837
"shared/scriptable/*.c",
838+
"shared/undo/*.c",
835839
"plugins/libparser/parser.c",
836840
"src/utf8.c"
837841
}
@@ -865,6 +869,7 @@ project "ddb_gui_GTK3"
865869
"shared/analyzer/analyzer.c",
866870
"shared/scope/scope.c",
867871
"shared/scriptable/*.c",
872+
"shared/undo/*.c",
868873
"plugins/libparser/parser.c",
869874
"src/utf8.c"
870875
}

shared/Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SUBDIRS = analyzer scope scriptable
1+
SUBDIRS = analyzer scope scriptable undo
22

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

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

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

shared/undo/Makefile.am

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
noinst_LTLIBRARIES = libundo.la
2+
3+
libundo_la_SOURCES = \
4+
undobuffer.c undobuffer.h\
5+
undomanager.c undomanager.h
6+
7+
libundo_la_CFLAGS = -fPIC -std=c99 -I@top_srcdir@/include $(DISPATCH_CFLAGS)
8+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/Makefile.am

+3-5
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,10 @@ deadbeef_SOURCES =\
3636
vfs.c vfs.h vfs_stdio.c\
3737
volume.c volume.h\
3838
viz.c viz.h\
39-
undo/undo_playlist.c undo/undo_playlist.h\
40-
undo/undobuffer.c undo/undobuffer.h\
41-
undo/undomanager.c undo/undomanager.h
39+
undo/undo_playlist.c undo/undo_playlist.h
4240

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

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

4745
EXTRA_DIST = sj_to_unicode.h

src/playlist.c

-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@
8686
#endif
8787

8888
// file format revision history
89-
// 1.1->1.2 changelog:
90-
// added flags field
9189
// 1.0->1.1 changelog:
9290
// added sample-accurate seek positions for sub-tracks
9391
// 1.1->1.2 changelog:

src/undo/undo_playlist.c

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
#include <stdlib.h>
2525
#include <string.h>
26-
#include "undobuffer.h"
2726
#include "undo_playlist.h"
2827

2928
#define UNDO_SELECTION_LIST_UNSELECTED 1

src/undo/undo_playlist.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#ifndef undo_playlist_h
2525
#define undo_playlist_h
2626

27-
#include "undobuffer.h"
27+
#include "undo/undobuffer.h"
2828
#include "../playlist.h"
2929

3030
void

0 commit comments

Comments
 (0)