Page 2 of 12

Re: Copy & Paste patch, reworked

Posted: 21 Feb 2009 19:38
by SirkoZ
Thank you for the update Roest, however it's got some problems (when I compiled 0.7.0 ß1 with the patch):
-first some warnings in language files (the least important)
-second this:

Code: Select all

[SRC] Linking openttd.exe
openttd.o:openttd.cpp:(.text+0x690): undefined reference to `_command_queue'
openttd.o:openttd.cpp:(.text+0x695): undefined reference to `CommandQueue::ClearCommandQueue()'
openttd.o:openttd.cpp:(.text+0xab8): undefined reference to `_copy_paste'
openttd.o:openttd.cpp:(.text+0xac6): undefined reference to `CopyPaste::SaveLoadTemplate(char const*, int)'
openttd.o:openttd.cpp:(.text+0xad5): undefined reference to `_copy_paste'
openttd.o:openttd.cpp:(.text+0xada): undefined reference to `CopyPaste::GetErrorString()'
openttd.o:openttd.cpp:(.text+0xe31): undefined reference to `CallCommandQueueTick()'
terraform_gui.o:terraform_gui.cpp:(.text+0x827): undefined reference to `ShowCopyPasteToolbar(int)'
terraform_gui.o:terraform_gui.cpp:(.text+0x1127): undefined reference to `ShowCopyPasteToolbar(int)'
toolbar_gui.o:toolbar_gui.cpp:(.text$_ZN17MainToolbarWindow10OnKeyPressEtt[MainToolbarWindow::OnKeyPress(unsigned short, unsigned short)]+0x149): undefined reference to `ShowCopyPasteToolbar(int)'
toolbar_gui.o:toolbar_gui.cpp:(.text$_ZN17MainToolbarWindow10OnKeyPressEtt[MainToolbarWindow::OnKeyPress(unsigned short, unsigned short)]+0x2cf): undefined reference to `_command_queue'
toolbar_gui.o:toolbar_gui.cpp:(.text$_ZN17MainToolbarWindow10OnKeyPressEtt[MainToolbarWindow::OnKeyPress(unsigned short, unsigned short)]+0x2d4): undefined reference to `CommandQueue::ClearCommandQueue()'
toolbar_gui.o:toolbar_gui.cpp:(.text$_ZN17MainToolbarWindow10OnKeyPressEtt[MainToolbarWindow::OnKeyPress(unsigned short, unsigned short)]+0x31d): undefined reference to `ShowCopyPasteToolbar(int)'
toolbar_gui.o:toolbar_gui.cpp:(.text$_ZN27ScenarioEditorToolbarWindow10OnKeyPressEtt[ScenarioEditorToolbarWindow::OnKeyPress(unsigned short, unsigned short)]+0x1b1): undefined reference to `ShowCopyPasteToolbar(int)'
toolbar_gui.o:toolbar_gui.cpp:(.text$_ZN27ScenarioEditorToolbarWindow10OnKeyPressEtt[ScenarioEditorToolbarWindow::OnKeyPress(unsigned short, unsigned short)]+0x1cf): undefined reference to `ShowCopyPasteToolbar(int)'
viewport.o:viewport.cpp:(.text+0x5185): undefined reference to `_copy_paste'
viewport.o:viewport.cpp:(.text+0x51cc): undefined reference to `_copy_paste'
viewport.o:viewport.cpp:(.text+0x51de): undefined reference to `_copy_paste'
viewport.o:viewport.cpp:(.text+0x51ed): undefined reference to `CopyPaste::GetCPTrackBits(unsigned int)'
collect2: ld returned 1 exit status
make[1]: *** [openttd.exe] Error 1
make[1]: Leaving directory `/K/Progs_K/Curr_rel_source_testy/0.7.0-beta1/objs/release'
make: *** [all] Error 2

Re: Copy & Paste patch, reworked

Posted: 21 Feb 2009 19:51
by Roest
looks like source.list slipped through somehow :oops:

try adding command_queue.h and copy_paste.h to it

Re: Copy & Paste patch, reworked

Posted: 21 Feb 2009 20:14
by SirkoZ
Thanks, although it still doesn't work (same error)...

Here's my edited source.list.

Re: Copy & Paste patch, reworked

Posted: 21 Feb 2009 21:10
by Roest
Ok of course there need to be some more entries in source.list

this patch should work now

Re: Copy & Paste patch, reworked

Posted: 23 Feb 2009 11:55
by toast
planetmaker wrote:With MacOS it should be quite easy: Install xcode from your DVD, install svn and you can compile yourself. An extensive walk-through is found in the sticky thread in this forum.
I just asked 'cause I thought it would be very difficult to do. It took a little while but at the end it works. Thanks for the help!

Re: Copy & Paste patch, reworked

Posted: 23 Feb 2009 14:51
by Bilbo
deDied wrote:hey there,

is it possible to make this work in the scenario editor? so i can copy industries?
Perhaps even in-game, in case funding of new industries is allowed by game settings :)

But in scenario editor, there could be more things that could be copied (houses, ownership, chunk of trees, ...) and perhaps in simpler way (no need to send commands, just copy stuff in map array / byt that wouild probably be for another, though similar, patch :)

Re: Copy & Paste patch, reworked

Posted: 25 Feb 2009 08:37
by Grolsch
Can someone make my day by creating a Windows-build for 0.7.0 beta 1? Thanks in advance :bow:

Re: Copy & Paste patch, reworked

Posted: 26 Feb 2009 16:01
by maartena
Grolsch wrote:Can someone make my day by creating a Windows-build for 0.7.0 beta 1? Thanks in advance :bow:
I have the same request. I don't use it much, but I do like to use it for some things I always build anyways.

Thanks!

Re: Copy & Paste patch, reworked

Posted: 01 Mar 2009 20:33
by flash55
is 0.7.0 already supported ?

Re: Copy & Paste patch, reworked

Posted: 02 Mar 2009 13:14
by 2007Alain2007
here is an update to R 15597
KGAT COPY N PASTE R 15597.patch
I just testing it now

And i have a look at maybe changeing some things in it

bugs i have found:

*bridges all ways seem to build the best or last ones in the list:( so it is not copying over right
copy paste testing.png
This will go in to my patch pack as soon as the bug abover is fixed and the stations are fixed to sued new GRFs

Re: Copy & Paste patch, reworked

Posted: 02 Mar 2009 19:51
by yorick
2007Alain2007 wrote:
bugs i have found:

*bridges all ways seem to build the best or last ones in the list:( so it is not copying over right
Not a bug, feature. Disable the track convert tool to disable that feature ;)

Re: Copy & Paste patch, reworked

Posted: 13 Mar 2009 00:38
by Klaatu
maartena wrote:
Grolsch wrote:Can someone make my day by creating a Windows-build for 0.7.0 beta 1? Thanks in advance :bow:
I have the same request. I don't use it much, but I do like to use it for some things I always build anyways.
Still no kind soul willing to post a win32 binary of this and beta2 for those of us who are, shall we say, challenged? :)

Re: Copy & Paste patch, reworked

Posted: 15 Mar 2009 16:23
by maartena
Klaatu wrote:
maartena wrote:
Grolsch wrote:Can someone make my day by creating a Windows-build for 0.7.0 beta 1? Thanks in advance :bow:
I have the same request. I don't use it much, but I do like to use it for some things I always build anyways.
Still no kind soul willing to post a win32 binary of this and beta2 for those of us who are, shall we say, challenged? :)
I'm not sure that is going to happen.... perhaps when 0.7.0 final is released. You see, the person maintaining this patch is doing this out of his free time, and if he just doesn't feel like it, oh well. There is no guarantee that a win32 build will appear.

So just wait. Maybe it'll happen, maybe it won't :)

Re: Copy & Paste patch, reworked

Posted: 18 Mar 2009 10:59
by Bilbo
Klaatu wrote: Still no kind soul willing to post a win32 binary of this and beta2 for those of us who are, shall we say, challenged? :)
Well, we have RC1 now...

While I am not posting windows binaries (I have no crosscompiler here, so I can't create them) I am posting at least a patch updated to 0.7.0-RC1, since the previous version posted here does not apply to 0.7.0-RC1 anymore.

Perhaps try buildOTTD to create the windows binaries

Re: Copy & Paste patch, reworked

Posted: 18 Mar 2009 14:12
by Timitry
[e] Here are win32-binaries for you :-) Ignore the post below, they should work just fine!



Old post:

Hm hm hm, i tried to compile with the 0.7.0-RC1...

The patch applied without any problems.

First of all, it gave me a lot of warnings on the language files "string name does not exist in master file", but i guess that's not really a problem. It also complained about some variables which MIGHT not be initialized, but that's the compilers fault, i had this before already.

It succeeds with linking the openttd.exe, and i can start openttd, but somehow the function to copy&paste does not appear... Maybe i'm doing something wrong there? I attached the compiled win32-binaries, maybe they work for you. I also attached the log file with the warnings.

Re: Copy & Paste patch, reworked

Posted: 18 Mar 2009 16:25
by Bilbo
Timitry wrote:It succeeds with linking the openttd.exe, and i can start openttd, but somehow the function to copy&paste does not appear... Maybe i'm doing something wrong there? I attached the compiled win32-binaries, maybe they work for you. I also attached the log file with the warnings.
I compiled it on linux (I have no Windows nearby) and it worked ... copy & paste shortcuts (ctrl-ins, shift-ins, ctrl-c, ctrl-v ...) spawn the "copy & paste" panel, plus there is button on landscaping toolbar that will spawn that panel too.

Hmm ... I have many useful templates made by older version (the one still from Frostregen). Have anybody made some tool to convert the templates from old format to the new one, or should I write it myself?

Re: Copy & Paste patch, reworked

Posted: 18 Mar 2009 19:23
by Timitry
Well, stupid me, my binaries do work, it's just that i searched for the copy&paste icon in the railway-toolbar etc, but not in the landscaping toolbar... :)

Re: Copy & Paste patch, reworked

Posted: 18 Mar 2009 22:39
by Starbud
Seems to work fine, thanks mate, the only thing was that i had to add the copypaste.grf file manually to make it work (just as the other graphicsfiles from original TTD), otherwise the program wouldnt start at all.

Re: Copy & Paste patch, reworked

Posted: 19 Mar 2009 01:32
by 2007Alain2007
Can we also have an update for the current trunk please

Re: Copy & Paste patch, reworked

Posted: 19 Mar 2009 10:42
by Timitry
Hm, while trying to update this patch to current trunk, based on the last version by bilbo, i had some strange errors / warnings...

1. 3 Strings were removed from the language-master-file "english.txt", which made the other language files complain about them missing there. So i changed the patch NOT to remove those three strings.
2. One unneccessary string was added to german.txt, which made this file complain about that string missing in english.txt, too, so i removed it.
3. In projects/openttd_vs90.vcproj, the following part just changed the order of those two files, which made TortoiseSVN give me an error, it couldn't merge this file. I removed those lines and it worked fine:

Code: Select all

 			Name="Music"
 			>
 			<File
-				RelativePath=".\..\src\music\null_m.cpp"
+				RelativePath=".\..\src\music\dmusic.cpp"
 				>
 			</File>
 			<File
-				RelativePath=".\..\src\music\dmusic.cpp"
+				RelativePath=".\..\src\music\null_m.cpp"
 				>
 			</File>
 			<File
The only "problem" i have is that TortoiseSVN marks three of the files as "unversioned", now i don't know if that's bad or how to fix it, they are included in the patch, anyway.

So, here is an actual version of this patch, including the above changes, and applying cleanly, at least for me :)
I also attached win32-binaries, for those interested.
Like always, you need the copypaste.grf from the original post in order to play with this patch.