[patch] Clipboard (a/k/a "Copy and Paste")

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: Clipboard (a/k/a "Copy and Paste")

Post by SirkoZ »

As you can see, it was not a flat-out no. Anybody interested in the opinions of the devs on this patch should definitely read page 7/8 of the last thread. There was a lot of confusion about it, including my own.
I'd say - don't obsess too much with that 7th/8th page, KingNimby. With proper implementation - anything can happen. ;-)
archont
Engineer
Engineer
Posts: 6
Joined: 29 Oct 2009 19:01

Re: Clipboard (a/k/a "Copy and Paste")

Post by archont »

Hello,

First post and all that aside

I have to say I did a bit of coding a while ago, and so it happened I even had tortoise installed at the moment. Regrettably I'm not that good with a compiler and after some struggling I gave up trying to patch and compile the latest clipboard patch with the head revision. Or was it the patch from the other thread. Or maybe from the original one, hell, I tried 'em all.


It's not that I'm lazy, but I'd still like to ask someone who had more luck playing around with this to send me a win32 binary of any semi-recent revision with this patch applied.
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Clipboard (a/k/a "Copy and Paste")

Post by Gremnon »

With a bit of patience, the link in my signature (the bit marked THIS PAGE) will help anyone on Windows begin compiling in short order.
As to problems patching, it would help if you explained what the exact issues were, and someone would be able to help you easily.
archont
Engineer
Engineer
Posts: 6
Joined: 29 Oct 2009 19:01

Re: Clipboard (a/k/a "Copy and Paste")

Post by archont »

Well, patching went pretty much OK, although I'm somewhat disappointed the highest revision I was able to patch without having conflicts was 15xxx - still better than integrated nightly I guess.

Anyway, here's a thing I stumbled upor trying to install zlib:
archont@ARCHONT-MAIN /c
$ tar -xvjf zlib-1.2.3-mingwPORT-1.tar.bz2
zlib-1.2.3/
zlib-1.2.3/mingwPORT/
zlib-1.2.3/mingwPORT/mingwPORT.afterquestion
zlib-1.2.3/mingwPORT/mingwPORT.beforeconfigure
zlib-1.2.3/mingwPORT/mingwPORT.beforepatch
zlib-1.2.3/mingwPORT/mingwPORT.cleanup
zlib-1.2.3/mingwPORT/mingwPORT.configure
zlib-1.2.3/mingwPORT/mingwPORT.exports
zlib-1.2.3/mingwPORT/mingwPORT.functions
zlib-1.2.3/mingwPORT/mingwPORT.ini
zlib-1.2.3/mingwPORT/mingwPORT.install
zlib-1.2.3/mingwPORT/mingwPORT.make
zlib-1.2.3/mingwPORT/mingwPORT.patch
zlib-1.2.3/mingwPORT/mingwPORT.question
zlib-1.2.3/mingwPORT/mingwPORT.README
zlib-1.2.3/mingwPORT/mingwPORT.sh

archont@ARCHONT-MAIN /c
$ cd zlib-1.2.3/mingwPORT

archont@ARCHONT-MAIN /c/zlib-1.2.3/mingwPORT
$ mkdir /usr/src/zlib-1.2.3

archont@ARCHONT-MAIN /c/zlib-1.2.3/mingwPORT
$ ./mingwPORT.sh
Download file? (Yes)
Download file URI? (http://www.zlib.net)
Archive file type?
0) unknown
1) tar.gz
2) tgz
3) tar.bz2
4) tbz2
5) zip
Select a numeric value: (3)
Archive file? (zlib-1.2.3.tar.bz2)
Download to path? (/tmp)
Source path? (/usr/src/zlib-1.2.3)
Installation directory? (/mingw)
CFLAGS (-O3 -s -mms-bitfields -march=i686)
./mingwPORT.sh: wget: command not found
tar (child): /tmp/zlib-1.2.3.tar.bz2: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
./mingwPORT.sh: /bin/patch: Permission denied
/usr/src/zlib-1.2.3
make: win32/Makefile.gcc: No such file or directory
make: *** No rule to make target `win32/Makefile.gcc'. Stop.
make: win32/Makefile.gcc: No such file or directory
make: *** No rule to make target `win32/Makefile.gcc'. Stop.
make: win32/Makefile.gcc: No such file or directory
make: *** No rule to make target `win32/Makefile.gcc'. Stop.
I was guessing it might be a lack of privilidges, but the app fails to run in administrator mode, so that's probably not it.

Edit: Apparently that's a bug in msys, as it blows up and otherwise fails to run in admin mode on modern OSes.
The only solution I've found is to run it on a legacy OS.

And installing XP just to get the patched TTD binary is somewhat overkill.
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Clipboard (a/k/a "Copy and Paste")

Post by Gremnon »

Are you certain you followed what the wiki page said exactly? Such as just pressing enter when you're told to just press enter and not type things in?
archont
Engineer
Engineer
Posts: 6
Joined: 29 Oct 2009 19:01

Re: Clipboard (a/k/a "Copy and Paste")

Post by archont »

Yes, everything was done exactly according to wiki. I still have enough brain cells to know what went wrong however and quickly remedied it

1) You need admin privilidges
2) the msys version in the wiki page explodes when given admin privilidges under vista and windows 7 (here ATM)
3) the newest version of msys runs fine and I got all that compiled

You might want to do a quick edit, just to retard-proof the wiki page.

Edit: Oh and quick note: msys MUST be installed and run in admin mode.

Edit 2: Everything went fine, except the version thing. Thanks!
archont
Engineer
Engineer
Posts: 6
Joined: 29 Oct 2009 19:01

Re: Clipboard (a/k/a "Copy and Paste")

Post by archont »

Well, I can compile the head revision, but I'm missing one squirrel.

Code: Select all

checking assert... enabled
checking 3rdparty... NOT FOUND
ERROR: please make sure you have src/3rdparty/squirrel
ERROR: you can find the source at svn://svn.openttd.org/3rdparty/squirrel

archont@ARCHONT-MAIN ~/ottdsrc/trunk
$ svn checkout svn://svn.openttd.org/3rdparty/squirrel
svn: URL 'svn://svn.openttd.org/3rdparty/squirrel' nie istnieje
Which says the url doesn't exist.

Obviously so, as the sources are now at a different place, but I can't seem to find that external dependancy.

Edit: Ah so it looks like on it's way to head it was included in src after all. :)
archont
Engineer
Engineer
Posts: 6
Joined: 29 Oct 2009 19:01

Re: Clipboard (a/k/a "Copy and Paste")

Post by archont »

I'm stumped, this time for real.

Got the 15495 revision and it compiles fine. But as soon as I patch it with the 15495 patch this is what I get:

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 `/home/archont/ottdsrc/trunk/objs/release'
make: *** [all] Error 2
Can anyone lend a hand? Or will I have to dig up my bloodshed IDE and see if I remember how C++ went?
Dante123
Chief Executive
Chief Executive
Posts: 671
Joined: 11 Aug 2009 16:10
Location: The Nederlands
Contact:

Re: Clipboard (a/k/a "Copy and Paste")

Post by Dante123 »

shouldnt you create a new topic about it instead of posting this development thread full of your personal compiling problems ? :roll:
yorick
Engineer
Engineer
Posts: 80
Joined: 23 Mar 2008 08:53

Re: Clipboard (a/k/a "Copy and Paste")

Post by yorick »

archont wrote:I'm stumped, this time for real.

Got the 15495 revision and it compiles fine. But as soon as I patch it with the 15495 patch this is what I get:

Code: Select all

...
Can anyone lend a hand? Or will I have to dig up my bloodshed IDE and see if I remember how C++ went?
Seems like you forgot to link the copy paste files.
Dante123
Chief Executive
Chief Executive
Posts: 671
Joined: 11 Aug 2009 16:10
Location: The Nederlands
Contact:

Re: Clipboard (a/k/a "Copy and Paste")

Post by Dante123 »

any news on the current progress yet ? :D
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Clipboard (a/k/a "Copy and Paste")

Post by petert »

Dante123 wrote:any news on the current progress yet ? :D
If there was, you would check it in the first post.
Dante123
Chief Executive
Chief Executive
Posts: 671
Joined: 11 Aug 2009 16:10
Location: The Nederlands
Contact:

Re: Clipboard (a/k/a "Copy and Paste")

Post by Dante123 »

petert wrote:
Dante123 wrote:any news on the current progress yet ? :D
If there was, you would check it in the first post.
well last edit was from almost a 2 - 3 weeks back. so i just wondered :)
Whos
Engineer
Engineer
Posts: 74
Joined: 25 May 2009 10:20

Re: Clipboard (a/k/a "Copy and Paste")

Post by Whos »

Could someone build for me under 0.7.3 version of Windows or explain to me step by step how to do it? I tried once, but I can not, it's too hard ..
archont
Engineer
Engineer
Posts: 6
Joined: 29 Oct 2009 19:01

Re: Clipboard (a/k/a "Copy and Paste")

Post by archont »

Even if it's detailed, AI is still broken with this patch.

Surprisingly, mini integrated nightly is better.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Clipboard (a/k/a "Copy and Paste")

Post by petert »

Whos wrote:Could someone build for me under 0.7.3 version of Windows or explain to me step by step how to do it? I tried once, but I can not, it's too hard ..
I have already built it (along with other patches), check it out: http://www.tt-forums.net/viewtopic.php? ... 42#p823142
Whos
Engineer
Engineer
Posts: 74
Joined: 25 May 2009 10:20

Re: Clipboard (a/k/a "Copy and Paste")

Post by Whos »

petert wrote:
Whos wrote:Could someone build for me under 0.7.3 version of Windows or explain to me step by step how to do it? I tried once, but I can not, it's too hard ..
I have already built it (along with other patches), check it out: http://www.tt-forums.net/viewtopic.php? ... 42#p823142
I downloaded it early, unfortunately, this is version 0.7.2 which is out of date. : (.'ll Try to do it alone .. but how much it takes time?
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Clipboard (a/k/a "Copy and Paste")

Post by petert »

Whos wrote:I downloaded it early, unfortunately, this is version 0.7.2 which is out of date. : (.'ll Try to do it alone .. but how much it takes time?
No, it's definitely 0.7.3, that's what I had uploaded. I will check in a bit.
Whos
Engineer
Engineer
Posts: 74
Joined: 25 May 2009 10:20

Re: Clipboard (a/k/a "Copy and Paste")

Post by Whos »

petert wrote:
Whos wrote:I downloaded it early, unfortunately, this is version 0.7.2 which is out of date. : (.'ll Try to do it alone .. but how much it takes time?
No, it's definitely 0.7.3, that's what I had uploaded. I will check in a bit.
Yes, it is 0.7.3. Excuse me - do not unpacked correct rar. Thank you kindly, something wonderful.

There is only one error. : (. It is a pity that you have compiled the game with a broken Polish language. It not shows a beautiful font and Polish characters, but almost the same question marks ..
  • When I copying to my game my polish.lng it will not work.
  • When I changing font in .cfg file - it does not help (strange)..
Perhaps if I had to compile, it would be good. : (
Compare these two versions:

Image

Image
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 49 guests