Skip to content

Commit

Permalink
Fix build for x64
Browse files Browse the repository at this point in the history
  • Loading branch information
threedeyes committed Jul 9, 2018
1 parent d3cc1df commit 1fce365
Show file tree
Hide file tree
Showing 8 changed files with 6,497 additions and 12 deletions.
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ OBJS := MainApp.o \
Filter.o \
LoadDjVu.o \
ThumbListItem.o \
GoToWindow.o \
Render.o
GoToWindow.o

OBJDIR := Build

RSRCS := Resource/resource.rsrc
RDEF := Resource/resource.rdef

ifneq ($(shell uname -m),x86_64)
OBJS := $(OBJS) Render.o
endif

OBJS := $(addprefix $(OBJDIR)/,$(OBJS))

Expand All @@ -39,10 +42,11 @@ LDFLAGS :=
default : Build

Build : $(BINARY)
$(BINARY) : $(OBJDIR) $(OBJS) $(RSRCS)

$(BINARY) : $(OBJDIR) $(OBJS)
$(LD) $(CFLAGS) $(OBJS) -o $(BINARY) $(LDFLAGS) $(LIBS)
xres -o $(BINARY) $(RSRCS)
rc -o $(OBJDIR)/resource.rsrc $(RDEF)
xres -o $(BINARY) $(OBJDIR)/resource.rsrc
mimeset -f $(BINARY)

clean:
Expand Down
7 changes: 4 additions & 3 deletions Makefile.Translator
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ OBJS := LoadDjVu.o \

OBJDIR := Build

RSRCS := Resource/translator_resource.rsrc
RDEF := Resource/translator_resource.rdef

OBJS := $(addprefix $(OBJDIR)/,$(OBJS))

Expand All @@ -23,9 +23,10 @@ default : Build

Build : $(BINARY)

$(BINARY) : $(OBJDIR) $(OBJS) $(RSRCS)
$(BINARY) : $(OBJDIR) $(OBJS)
$(LD) $(CFLAGS) $(OBJS) -o $(BINARY) $(LDFLAGS) $(LIBS)
xres -o $(BINARY) $(RSRCS)
rc -o $(OBJDIR)/translator_resource.rsrc $(RDEF)
xres -o $(BINARY) $(OBJDIR)/translator_resource.rsrc
mimeset -f $(BINARY)

clean:
Expand Down
6,310 changes: 6,310 additions & 0 deletions Resource/resource.rdef

Large diffs are not rendered by default.

Binary file removed Resource/resource.rsrc
Binary file not shown.
165 changes: 165 additions & 0 deletions Resource/translator_resource.rdef
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
resource app_signature "application/x-vnd.DjVuTranslator";

resource app_flags B_MULTIPLE_LAUNCH;

resource app_version {
major = 1,
middle = 2,
minor = 2,

variety = B_APPV_DEVELOPMENT,
internal = 0,

short_info = "DjVuTranslator",
long_info = "DjVu file format translator"
};

resource vector_icon array {
$"6E6369661102000603399E0F3D9C0ABF82B23B84A94B88504870C900A5B1FFBC"
$"EAF1FFFFB3B8FF0501020106023E49240000000000003CAAAA4940004A30007C"
$"896EFFFFC0D5FF0401920200060235A2F5BB95C53FF7DD3A033A432AA54A4CB2"
$"00C70585F5EE068F0501043EF9055705000400AB050105010401CC0576040254"
$"0401ED0401E8130606AE0BB40BBF4D33C3AEB75CC172BDEFC606C13EC804CA27"
$"BD82C117B920C51BBB40BF06B8073AB6BC0605AE02B57D3EB9B9C3EFB7BB44BB"
$"B751BD75C936CA8DC1B0402F0A093B593D5BBFCDC93D455BC516C5F060465B43"
$"5D4544510A045A425E3F5A3D5740020ABB1EBB84BB1EBB84BB1EBB84B887BD35"
$"B983BC31B77BBE48B807C04BB6C4C023B939C072BDB542BAB8C130C014C00845"
$"BF73C0DFBFC6C2C8BF0DC455BEB4C4E0BF99C41FBE5BC52CBDDBC3C7BE1BC691"
$"BD9B4ABBDDC673BC29C0FDBB91BD823BBF6639BB9D3DB9D2BE4EBA62BE702EBE"
$"0102024841C3C7C018C216C031C323C13045C0FD4CC1630202C65EBE74C6D2BE"
$"67C5EDBE81C653BF0DC5C5BEDAC6DEBF400213C31CB610BEFFBA2FC3DAB550C5"
$"F9B4D8C4E3B4BFC6BAB4E0C7FBB5C1C770B53EC71BB560C531B52EC629B50AC4"
$"4AB547C2F2B67FC390B5E1BF5EBA19B830C148BBC9BDB3B76FC20BB61FC3BFB6"
$"94C2C2B5B9C493B5D1C669B5CDC585B5E7C5EEB617C4F8B5FDC573B622C599B6"
$"77C6D0B63AC63AB733C8ABBB65C870B9B6C9A4BCB7C772BAEEC981BC07C940BC"
$"24C8A4B987C95633C961B86FC953B6AFC807B790C894B74CC8B3B8E9C995B804"
$"C952B972C9BABA89C9E6B9FDC9CFB9F2C9DCB8C3C9CDB95AC9D6B740C960B583"
$"C6A3B5E6C830B50CC523B6C1C26BB5A8C37BBAE0BE4D021AC2F2B67FBF5EBA19"
$"C390B5E1C531B52EC44AB547C629B50AC7FBB5C1C71BB560C83EB5FEC8AAB69A"
$"C89AB63CC8B8B6AFC8E4B6F1C8D5B6DBC8E4B6F1C8E8B718C8E8B718C8E2B7F0"
$"C8A4B9A0C8FDB8D5C83BBA6DC6E5BBA1C783BAFFC45BBE2ABF4AC33FC1D0C0B2"
$"BEE1C3A4BDD3C421BE6BC413BD48C42EBC3EC3DDBCC1C404BC33C3BDBC11C35F"
$"BC1CC37EBC59C374BCEAC39CBCA1C389BCEAC39CBD14C3A7BD14C3A7BD8EC3D0"
$"BE71C36ABE11C3C8C196C03DC7E9B9EAC4C6BD19C7FDB9D4C839B990C825B9A6"
$"C843B974C860B922C856B93EC8E4B819C7A4B615C899B6C1C66CB523C37EB674"
$"C48BB555BF70BA7FB755C29ABB66BE90B6B7C332B621C4CEB645C3F4B621C4CE"
$"B617C4F8B617C4F8B5FDC573B5D1C669B5E7C5EEB5CDC585B61FC3BFB5B9C493"
$"B694C2C2B830C148B76FC20BBBC9BDB3020AC37EB674BF70BA7FC48BB555C7A4"
$"B615C66CB523C899B6C1C860B922C8E4B819C8602EC835B77AC862B802C800B6"
$"E0C708B60DC781B672C653B5BAC4C2B5EEC57CB595C3D1B662C271B7F7C32EB7"
$"413EBB76B7F6C270BB77BEF6B73AC31FB621C4CEB69CC3ECB645C3F4B755C29A"
$"B6B7C332BB66BE90020CC4C2B5EEC3D1B662C57CB595C708B60DC653B5BAC63B"
$"B629C4AAB69FC560B632C3F7B706C2F7B848C378B7ACC04FBB2DBABCC0B7BD55"
$"BDC4BA1DC11EB910C227B98FC19CB86EC2D7B722C42DB7B1C36DB6924DB677C6"
$"D0B683C5E9B63AC63AB617C4F8B622C599B617C4F8B621C4CEB621C4CEB69CC3"
$"ECB7F6C270B73AC31FBB77BEF6C271B7F73EBB76C32EB7410604EBC8AAB69AC8"
$"B8B6AFC8AAB69AC8D8B69BC8F6B6C8C8E4B6F1C8E4B6F1C8D5B6DB0218C8E8B7"
$"18C8E2B7F0C8FBB734C934B788C921B76CC944B8AFC841BACFC923B9F8C54CBD"
$"C9BF5CC3B6C252C0BEBEA2C487BC79C46FBD7BC493BBCEC412BAE2C2D4BB2CC3"
$"8DBA9CC228BABCC0B7BAB4C16BBD55BDC4C2F7B848C04FBB2DC329B88CC38CB9"
$"17C35CB8D1C118BB5FBC6541BECEBDD3BBCEC0ADBB9BC23FBB4CC16EBBB1C27B"
$"BBDCC2F4BBC6C2B8BB36C2A0BB3AC135BB3EC1D5BB6AC0A5BC41BFD1BBDAC03A"
$"BDEBBE30C135BAE2BF8EBC86C1E3BA34C31AB8B6C2A6B994C248B939C0F7BAA3"
$"C1A4B9F6BF31BC6DBBA0BFFCBD64BE30BB02C08EBAF3C23BBADCC16DBB0BC2F8"
$"BC3EC3DDBBA2C382BCC1C404BDD3C421BD48C42EBE6BC413BF4AC33FBEE1C3A4"
$"C1D0C0B2C6E5BBA1C45BBE2AC783BAFFC8A4B9A0C83BBA6DC8FDB8D50206C934"
$"B788C944B8AFC9D7B8BDC8C0BB41C977BA2DC580BE85BEF8C505C240C1C9BE1E"
$"C4F2BC79C46FBD3AC4E3BD7BC493BF5CC3B6BEA2C487C252C0BEC841BACFC54C"
$"BDC9C923B9F80207C0F7BAA3BF31BC6DC1A4B9F6C31AB8B6C248B939C2A6B994"
$"C135BAE2C1E3BA34BF8EBC86BC41BFD1BDEBBE30BBDAC03ABB3AC135BB6AC0A5"
$"BB1EC18BBAF3C23BBB07C1E3BADCC16DBBA0BFFCBB02C08EBD64BE300205BC65"
$"41BBCEC0ADBECEBDD3C38CB917C118BB5FC39BB92EC3CAB974C3BAB95DC177BB"
$"D4BCBEC081BF19BE29BC41C101BB9BC23FBBEAC1A0BB4CC16E0202C7E9B9EAC7"
$"FDB9D4C7FDB9D4C839B990C825B9A6C825B9A60206BAF3C23BBB0BC2F8BB07C1"
$"E3BB3AC135BB1EC18BBB3EC1D5BBDCC2F4BB36C2A0BC34C331BCEAC39CBC8EC3"
$"69BCA1C389BC11C35FBC59C374BC1CC37EBC3EC3DDBC33C3BDBBA2C3820202BD"
$"14C3A7BD8EC3D0BD8AC39DBE71C36ABDFFC38BBE11C3C8140A03020203000A01"
$"01011001178400040A020101000A0101001001178400040A000100000A040304"
$"0506000A05010702401385B423B03405A73FF04DC2CA32C158B20A0601080240"
$"1385B423B03405A73FF04DC2CA32C158B20A07010902401385B423B03405A73F"
$"F04DC2CA32C158B20A08010A02401385B423B03405A73FF04DC2CA32C158B20A"
$"09010B02401385B423B03405A73FF04DC2CA32C158B20A0A010C02401385B423"
$"B03405A73FF04DC2CA32C158B20A08010D02401385B423B03405A73FF04DC2CA"
$"32C158B20A0B010E02401385B423B03405A73FF04DC2CA32C158B20A08010F02"
$"401385B423B03405A73FF04DC2CA32C158B20A0C011002401385B423B03405A7"
$"3FF04DC2CA32C158B20A0D0002401385B423B03405A73FF04DC2CA32C158B20A"
$"0E0002401385B423B03405A73FF04DC2CA32C158B20A0F011102401385B423B0"
$"3405A73FF04DC2CA32C158B20A10011202401385B423B03405A73FF04DC2CA32"
$"C158B2"
};

resource file_types message;

resource(1, "BEOS:image/x-djvu") #'VICN' array {
$"6E6369661102000603399E0F3D9C0ABF82B23B84A94B88504870C900A5B1FFBC"
$"EAF1FFFFB3B8FF0501020106023E49240000000000003CAAAA4940004A30007C"
$"896EFFFFC0D5FF0401920200060235A2F5BB95C53FF7DD3A033A432AA54A4CB2"
$"00C70585F5EE068F0501043EF9055705000400AB050105010401CC0576040254"
$"0401ED0401E8130606AE0BB40BBF4D33C3AEB75CC172BDEFC606C13EC804CA27"
$"BD82C117B920C51BBB40BF06B8073AB6BC0605AE02B57D3EB9B9C3EFB7BB44BB"
$"B751BD75C936CA8DC1B0402F0A093B593D5BBFCDC93D455BC516C5F060465B43"
$"5D4544510A045A425E3F5A3D5740020ABB1EBB84BB1EBB84BB1EBB84B887BD35"
$"B983BC31B77BBE48B807C04BB6C4C023B939C072BDB542BAB8C130C014C00845"
$"BF73C0DFBFC6C2C8BF0DC455BEB4C4E0BF99C41FBE5BC52CBDDBC3C7BE1BC691"
$"BD9B4ABBDDC673BC29C0FDBB91BD823BBF6639BB9D3DB9D2BE4EBA62BE702EBE"
$"0102024841C3C7C018C216C031C323C13045C0FD4CC1630202C65EBE74C6D2BE"
$"67C5EDBE81C653BF0DC5C5BEDAC6DEBF400213C31CB610BEFFBA2FC3DAB550C5"
$"F9B4D8C4E3B4BFC6BAB4E0C7FBB5C1C770B53EC71BB560C531B52EC629B50AC4"
$"4AB547C2F2B67FC390B5E1BF5EBA19B830C148BBC9BDB3B76FC20BB61FC3BFB6"
$"94C2C2B5B9C493B5D1C669B5CDC585B5E7C5EEB617C4F8B5FDC573B622C599B6"
$"77C6D0B63AC63AB733C8ABBB65C870B9B6C9A4BCB7C772BAEEC981BC07C940BC"
$"24C8A4B987C95633C961B86FC953B6AFC807B790C894B74CC8B3B8E9C995B804"
$"C952B972C9BABA89C9E6B9FDC9CFB9F2C9DCB8C3C9CDB95AC9D6B740C960B583"
$"C6A3B5E6C830B50CC523B6C1C26BB5A8C37BBAE0BE4D021AC2F2B67FBF5EBA19"
$"C390B5E1C531B52EC44AB547C629B50AC7FBB5C1C71BB560C83EB5FEC8AAB69A"
$"C89AB63CC8B8B6AFC8E4B6F1C8D5B6DBC8E4B6F1C8E8B718C8E8B718C8E2B7F0"
$"C8A4B9A0C8FDB8D5C83BBA6DC6E5BBA1C783BAFFC45BBE2ABF4AC33FC1D0C0B2"
$"BEE1C3A4BDD3C421BE6BC413BD48C42EBC3EC3DDBCC1C404BC33C3BDBC11C35F"
$"BC1CC37EBC59C374BCEAC39CBCA1C389BCEAC39CBD14C3A7BD14C3A7BD8EC3D0"
$"BE71C36ABE11C3C8C196C03DC7E9B9EAC4C6BD19C7FDB9D4C839B990C825B9A6"
$"C843B974C860B922C856B93EC8E4B819C7A4B615C899B6C1C66CB523C37EB674"
$"C48BB555BF70BA7FB755C29ABB66BE90B6B7C332B621C4CEB645C3F4B621C4CE"
$"B617C4F8B617C4F8B5FDC573B5D1C669B5E7C5EEB5CDC585B61FC3BFB5B9C493"
$"B694C2C2B830C148B76FC20BBBC9BDB3020AC37EB674BF70BA7FC48BB555C7A4"
$"B615C66CB523C899B6C1C860B922C8E4B819C8602EC835B77AC862B802C800B6"
$"E0C708B60DC781B672C653B5BAC4C2B5EEC57CB595C3D1B662C271B7F7C32EB7"
$"413EBB76B7F6C270BB77BEF6B73AC31FB621C4CEB69CC3ECB645C3F4B755C29A"
$"B6B7C332BB66BE90020CC4C2B5EEC3D1B662C57CB595C708B60DC653B5BAC63B"
$"B629C4AAB69FC560B632C3F7B706C2F7B848C378B7ACC04FBB2DBABCC0B7BD55"
$"BDC4BA1DC11EB910C227B98FC19CB86EC2D7B722C42DB7B1C36DB6924DB677C6"
$"D0B683C5E9B63AC63AB617C4F8B622C599B617C4F8B621C4CEB621C4CEB69CC3"
$"ECB7F6C270B73AC31FBB77BEF6C271B7F73EBB76C32EB7410604EBC8AAB69AC8"
$"B8B6AFC8AAB69AC8D8B69BC8F6B6C8C8E4B6F1C8E4B6F1C8D5B6DB0218C8E8B7"
$"18C8E2B7F0C8FBB734C934B788C921B76CC944B8AFC841BACFC923B9F8C54CBD"
$"C9BF5CC3B6C252C0BEBEA2C487BC79C46FBD7BC493BBCEC412BAE2C2D4BB2CC3"
$"8DBA9CC228BABCC0B7BAB4C16BBD55BDC4C2F7B848C04FBB2DC329B88CC38CB9"
$"17C35CB8D1C118BB5FBC6541BECEBDD3BBCEC0ADBB9BC23FBB4CC16EBBB1C27B"
$"BBDCC2F4BBC6C2B8BB36C2A0BB3AC135BB3EC1D5BB6AC0A5BC41BFD1BBDAC03A"
$"BDEBBE30C135BAE2BF8EBC86C1E3BA34C31AB8B6C2A6B994C248B939C0F7BAA3"
$"C1A4B9F6BF31BC6DBBA0BFFCBD64BE30BB02C08EBAF3C23BBADCC16DBB0BC2F8"
$"BC3EC3DDBBA2C382BCC1C404BDD3C421BD48C42EBE6BC413BF4AC33FBEE1C3A4"
$"C1D0C0B2C6E5BBA1C45BBE2AC783BAFFC8A4B9A0C83BBA6DC8FDB8D50206C934"
$"B788C944B8AFC9D7B8BDC8C0BB41C977BA2DC580BE85BEF8C505C240C1C9BE1E"
$"C4F2BC79C46FBD3AC4E3BD7BC493BF5CC3B6BEA2C487C252C0BEC841BACFC54C"
$"BDC9C923B9F80207C0F7BAA3BF31BC6DC1A4B9F6C31AB8B6C248B939C2A6B994"
$"C135BAE2C1E3BA34BF8EBC86BC41BFD1BDEBBE30BBDAC03ABB3AC135BB6AC0A5"
$"BB1EC18BBAF3C23BBB07C1E3BADCC16DBBA0BFFCBB02C08EBD64BE300205BC65"
$"41BBCEC0ADBECEBDD3C38CB917C118BB5FC39BB92EC3CAB974C3BAB95DC177BB"
$"D4BCBEC081BF19BE29BC41C101BB9BC23FBBEAC1A0BB4CC16E0202C7E9B9EAC7"
$"FDB9D4C7FDB9D4C839B990C825B9A6C825B9A60206BAF3C23BBB0BC2F8BB07C1"
$"E3BB3AC135BB1EC18BBB3EC1D5BBDCC2F4BB36C2A0BC34C331BCEAC39CBC8EC3"
$"69BCA1C389BC11C35FBC59C374BC1CC37EBC3EC3DDBC33C3BDBBA2C3820202BD"
$"14C3A7BD8EC3D0BD8AC39DBE71C36ABDFFC38BBE11C3C8140A03020203000A01"
$"01011001178400040A020101000A0101001001178400040A000100000A040304"
$"0506000A05010702401385B423B03405A73FF04DC2CA32C158B20A0601080240"
$"1385B423B03405A73FF04DC2CA32C158B20A07010902401385B423B03405A73F"
$"F04DC2CA32C158B20A08010A02401385B423B03405A73FF04DC2CA32C158B20A"
$"09010B02401385B423B03405A73FF04DC2CA32C158B20A0A010C02401385B423"
$"B03405A73FF04DC2CA32C158B20A08010D02401385B423B03405A73FF04DC2CA"
$"32C158B20A0B010E02401385B423B03405A73FF04DC2CA32C158B20A08010F02"
$"401385B423B03405A73FF04DC2CA32C158B20A0C011002401385B423B03405A7"
$"3FF04DC2CA32C158B20A0D0002401385B423B03405A73FF04DC2CA32C158B20A"
$"0E0002401385B423B03405A73FF04DC2CA32C158B20A0F011102401385B423B0"
$"3405A73FF04DC2CA32C158B20A10011202401385B423B03405A73FF04DC2CA32"
$"C158B2"
};
Binary file removed Resource/translator_resource.rsrc
Binary file not shown.
9 changes: 7 additions & 2 deletions Src/AboutWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,14 @@ IterView::MyDraw(void)
int SkyH=(int)(SkyBitmap->Bounds().Height())+1;
int SkrWHalf=(int)((buffer->Bounds().Width())+1)/2;
int SkrW=(int)(buffer->Bounds().Width());

#ifdef __x86_64
bufferView->SetDrawingMode(B_OP_COPY);
bufferView->SetHighColor(102, 152, 203);
bufferView->SetLowColor(102, 152, 203);
bufferView->FillRect(Bounds());
#else
::AsmRender(ScrBuff,SkyBuff,D,H,k,xshift,yshift,H2,k2,xshift2,yshift2,Hor,SkyW,SkyH,SkrW,SkrWHalf);
#endif
bufferView->SetDrawingMode(B_OP_ALPHA);
bufferView->DrawBitmap(MaskBitmap,BPoint(0,0));

Expand Down
2 changes: 1 addition & 1 deletion Src/DjVuTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sem_id render_sem;
// Translation Kit required globals
char translatorName[32];
char translatorInfo[100];
int32 translatorVersion = 0x101;
int32 translatorVersion = 0x122;

// A couple other useful variables
char native_translator_file_name[32];
Expand Down

0 comments on commit 1fce365

Please sign in to comment.