I made the mistake of downloading and installing Xcode 5.0 when Apple posted it today, and now, of course, DOSBox won't build, but produces a huge list of error messages.
If anyone can figure out how to build DOSBox under Xcode 5.0, I'll be very grateful to hear about it. Thanks!
EDIT: For what it's worth, here's the relevant output. As you can see, the three errors are of the same type: each one wants something more explicit than is listed in the code. Can anyone suggest how the code ought to be changed?
./core_dyn_x86/string.h:100:11: warning: 18 enumeration values not handled in
switch: 'STR_INSB', 'STR_INSW', 'STR_INSD'.. […] Show full quote
./core_dyn_x86/string.h💯11: warning: 18 enumeration values not handled in
switch: 'STR_INSB', 'STR_INSW', 'STR_INSD'... [-Wswitch]
switch (op) {
^
In file included from core_dyn_x86.cpp:234:
./core_dyn_x86/decoder.h:1837:10: warning: enumeration values 'LOOP_NONE' and
'LOOP_JCXZ' not handled in switch [-Wswitch]
switch (type) {
^
In file included from core_dyn_x86.cpp:234:
In file included from ./core_dyn_x86/decoder.h:1988:
In file included from ./core_dyn_x86/dyn_fpu.h:49:
./core_dyn_x86/../../fpu/fpu_instructions_x86.h:1164:2: error: ambiguous
instructions require an explicit suffix (could be 'filds', or 'fildl')
FPUD_LOAD(fild,WORD,)
^
./core_dyn_x86/../../fpu/fpu_instructions_x86.h:560:4: note: expanded from
macro 'FPUD_LOAD'
#op #szA " (%2, %%eax) \n" \
^
<scratch space>:49:2: note: expanded from here
"fild"
^
<inline asm>:5:1: note: instantiated into assembly here
fild (%edx, %eax)
^
In file included from core_dyn_x86.cpp:234:
In file included from ./core_dyn_x86/decoder.h:1988:
In file included from ./core_dyn_x86/dyn_fpu.h:49:
./core_dyn_x86/../../fpu/fpu_instructions_x86.h:1214:2: error: ambiguous
instructions require an explicit suffix
(could be 'fistps', or 'fistpl')
FPUD_STORE(fistp,WORD,)
^
./core_dyn_x86/../../fpu/fpu_instructions_x86.h:621:4: note: expanded from
macro 'FPUD_STORE'
#op #szA " (%3, %%eax) \n" \
^
<scratch space>:65:2: note: expanded from here
"fistp"
^
<inline asm>:8:1: note: instantiated into assembly here
fistp (%esi, %eax)
^
In file included from core_dyn_x86.cpp:234:
In file included from ./core_dyn_x86/decoder.h:1988:
In file included from ./core_dyn_x86/dyn_fpu.h:49:
./core_dyn_x86/../../fpu/fpu_instructions_x86.h:1169:2: error: ambiguous
instructions require an explicit suffix (could be 'filds', or 'fildl')
FPUD_LOAD_EA(fild,WORD,)
^
./core_dyn_x86/../../fpu/fpu_instructions_x86.h:586:4: note: expanded from
macro 'FPUD_LOAD_EA'
#op #szA " (%1, %%eax) \n" \
^
<scratch space>:51:2: note: expanded from here
"fild"
^
<inline asm>:4:1: note: instantiated into assembly here
fild (%edx, %eax)
^
I wish I could figure out a way to adapt your build script to my setup. The build script that I use is one that I put together entirely through your instructions - there's nothing in it that I thought up by myself.
There is one very weird thing about it that I just discovered: I actually do not have /lib/bin/gcc-4.2 or /lib/bin/g++-4.2 - and I didn't have them for very long time, since they aren't on my backup either. But DOSBox built successfully anyway.
First, the MacPorts that I installed on your instructions:
1sudo port install libsdl +universal +no_x11 2sudo port install libpng +universal 3sudo port install pkgconfig +universal
Next, here is the build script. /Development/SDL-forDB is of course the folder for my SDL:
1#!/bin/sh 2 3export CC='/usr/bin/gcc-4.2 -arch i386' 4export CXX='/usr/bin/g++-4.2 -arch i386' 5export GCOV='/usr/bin/gcov-4.2 -arch i386' 6 7./autogen.sh 8 9./configure --prefix=/opt/local --with-sdl-prefix=/Users/edward/Development/SDL-forDB --disable-sdltest --disable-alsatest 10 11make clean 12 13sed -i.old -e "s@-L/Users/edward/Development/SDL-forDB/lib -lSDLmain -lSDL -Wl,-framework,Cocoa@-L/Users/edward/Development/SDL-forDB/lib /Users/edward/Development/SDL-forDB/lib/libSDLmain.a /Users/edward/Development/SDL-forDB/lib/libSDL.a -Wl,-framework,OpenGL -Wl,-framework,Cocoa -Wl,-framework,ApplicationServices -Wl,-framework,Carbon -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,IOKit@g" Makefile 14 15cd src 16 17sed -i.old -e "s@-L/Users/edward/Development/SDL-forDB/lib -lSDLmain -lSDL -Wl,-framework,Cocoa@-L/Users/edward/Development/SDL-forDB/lib /Users/edward/Development/SDL-forDB/lib/libSDLmain.a /Users/edward/Development/SDL-forDB/lib/libSDL.a -Wl,-framework,OpenGL -Wl,-framework,Cocoa -Wl,-framework,ApplicationServices -Wl,-framework,Carbon -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,IOKit@g" Makefile 18 19cd .. 20 21make 22 23#move the executable so that it won't be deleted by "make clean" 24mv src/dosbox src/DOSBox-text 25 26# clean up disk because this is in my Dropbox folder 27make clean 28 29#view result in Finder 30open src
That sed command was your very ingenious way to get things built, long ago, and I've been using it ever since.
So, let's debug it by leaving things out until it works 😉
Make sure that you installed the command line tools in xcode 5 (somewhere in the preferences, on mavericks that option vanished).
Then do only this:
Also, I added the OPT= line from your script, as I assume (not knowing anything about it) that it adds optimizations that may be useful. Am I making potential difficulties for myself this way?
After that, I built exactly as I did before, and got a working executable.
BUT, I would prefer to be able to use your script, so I tried the one you posted in your message, and it failed in the same way:
L -MT core_dyn_x86.o -MD -MP -MF .deps/core_dyn_x86.Tpo -c -o core_dyn_x86.o core_dyn_x86.cpp
In file included from core_dyn_x […] Show full quote
L -MT core_dyn_x86.o -MD -MP -MF .deps/core_dyn_x86.Tpo -c -o core_dyn_x86.o core_dyn_x86.cpp
In file included from core_dyn_x86.cpp:234:
In file included from ./core_dyn_x86/decoder.h:1151:
./core_dyn_x86/string.h💯11: warning: 18 enumeration values not handled in
switch: 'STR_INSB', 'STR_INSW', 'STR_INSD'... [-Wswitch]
switch (op) {
^
In file included from core_dyn_x86.cpp:234:
./core_dyn_x86/decoder.h:1837:10: warning: enumeration values 'LOOP_NONE' and
'LOOP_JCXZ' not handled in switch [-Wswitch]
switch (type) {
^
In file included from core_dyn_x86.cpp:234:
In file included from ./core_dyn_x86/decoder.h:1988:
In file included from ./core_dyn_x86/dyn_fpu.h:49:
./core_dyn_x86/../../fpu/fpu_instructions_x86.h:1164:2: error: ambiguous
instructions require an explicit suffix (could be 'filds', or 'fildl')
FPUD_LOAD(fild,WORD,)
^
./core_dyn_x86/../../fpu/fpu_instructions_x86.h:560:4: note: expanded from macro
'FPUD_LOAD'
#op #szA " (%2, %%eax) \n" \
^
<scratch space>:51:2: note: expanded from here
"fild"
^
<inline asm>:5:1: note: instantiated into assembly here
fild (%edx, %eax)
^
In file included from core_dyn_x86.cpp:234:
In file included from ./core_dyn_x86/decoder.h:1988:
In file included from ./core_dyn_x86/dyn_fpu.h:49:
./core_dyn_x86/../../fpu/fpu_instructions_x86.h:1214:2: error: ambiguous
instructions require an explicit suffix (could be 'fistps', or 'fistpl')
FPUD_STORE(fistp,WORD,)
^
./core_dyn_x86/../../fpu/fpu_instructions_x86.h:621:4: note: expanded from macro
'FPUD_STORE'
#op #szA " (%3, %%eax) \n" \
^
<scratch space>:67:2: note: expanded from here
"fistp"
^
<inline asm>:8:1: note: instantiated into assembly here
fistp (%esi, %eax)
^
In file included from core_dyn_x86.cpp:234:
In file included from ./core_dyn_x86/decoder.h:1988:
In file included from ./core_dyn_x86/dyn_fpu.h:49:
./core_dyn_x86/../../fpu/fpu_instructions_x86.h:1169:2: error: ambiguous
instructions require an explicit suffix (could be 'filds', or 'fildl')
FPUD_LOAD_EA(fild,WORD,)
^
./core_dyn_x86/../../fpu/fpu_instructions_x86.h:586:4: note: expanded from macro
'FPUD_LOAD_EA'
#op #szA " (%1, %%eax) \n" \
^
<scratch space>:53:2: note: expanded from here
"fild"
^
<inline asm>:4:1: note: instantiated into assembly here
fild (%edx, %eax)
^
2 warnings and 3 errors generated.
make[4]: *** [core_dyn_x86.o] Error 1
Because I'm building again with MacPorts, I don't want you to waste any more of your time on this, but if you have any quick thoughts, I would be very grateful. Thank you again - as you know, I'm only able to build DOSBox under OS X thanks to your help.
EDIT: The following two sets of changes in your script (both sets are required) made it possible for me to build correctly (of course producing a dynamic-linked executable, not a static one). Would you suggest that I follow this route, and not try to do anything different - except use your sed command in order to build a static version?
I'll take a closer look tonight or tomorrow, probably at sunday 😉
Building with the apple-gcc from macports might be best, since I remember problems with clang and dynamic core.
My whole command line tools stuff might be wrong since it grew from an xcode 3.x installation 😉
Thank you! Any advice would be welcome. I'm just relieved to be able to build again without setting up a second system under VMware or something similar.
What I'm really hoping for (but I know I don't have any right to ask this from you) is some way to build a static version without hard-coding the paths in those sed commands. But if that's what required, it's still good enough for me!
P.S. I'm thinking of switching from MacPorts to HomeBrew when I set up a Mavericks system, mostly because it seems to be easier to manage. But I'm not sure whether the things I build or customize (DOSBox, GhostPCL, libwpd, a few more) will work as well.
Unless the source of Dosbox is changed you will need to replace makile lines to build a static Dosbox. No way around this..
I'm not fond of homebrew, mostly because it seems less professional and you read agsin snd again about people needing macports alongside for things homebrew doesn't provide. That said, never tried homebrew, only Fink briefly...
I'm not fond of homebrew, mostly because it seems less professional and you read agsin snd again about people needing macports alongside for things homebrew doesn't provide. That said, never tried homebrew, only Fink briefly...
Since I rely on you for helping me get DOSBox built under OS X, that's all I need to hear to make me stick with MacPorts. It's never given me any problems, after all...
so, the initial problem is fixed by the attached patch. I totally forgot because it was debugged in #dosbox on irc back in the middle of June. With that patch applied, everything should work again. Sorry for that. I'll try and find one of the devs to push this to SVN.
BUT you need to find out how you can do
export CC='/usr/bin/gcc-4.2 -arch i386'
but not have that file. Configure should fail with non functioning compiler error (in config.log).
What happens when you run "/usr/bin/gcc-4.2 --version" in terminal?
the config.log doesn't seem to complain that the first two files don't exist. I've attached the log file in case it's of any use.
Meanwhile, thank you for the simple fix to the fpu code. As you said, your own build script now worked perfectly, and I'll try to combine it with my script that includes the sed commands (which you gave me) for building a static executable.
And a further report. I've now moved over most of your build script into mine, so that my build script now looks like this:
1#!/bin/sh 2 3OPT=' -arch i386 -m32 -O2 -msse -msse2 -force_cpusubtype_ALL ' 4 5## new things from Dominus 6SDK=' -mmacosx-version-min=10.5 ' 7export MACOSX_DEPLOYMENT_TARGET=10.5 8export PATH=/opt/local/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin 9export CC="/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch i386" 10export CXX="/Applications/Xcode.app/Contents/Developer/usr/bin/g++ -arch i386" 11export CPPFLAGS='-I/opt/local/include '$SDK 12export CFLAGS='-I/opt/local/include '$SDK' '$OPT 13export CXXFLAGS='-I/opt/local/include '$SDK' '$OPT 14# export LDFLAGS='-L/opt/local/lib '$SDK' '$OPT # <-- I had to comment this line out to get a static build 15export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig" 16 17./autogen.sh 18 19./configure --prefix=/opt/local --with-sdl-prefix=/Users/edward/Development/SDL-forDB --disable-sdltest --disable-alsatest 20 21make clean 22 23sed -i.old -e "s@-L/Users/edward/Development/SDL-forDB/lib -lSDLmain -lSDL -Wl,-framework,Cocoa@-L/Users/edward/Development/SDL-forDB/lib /Users/edward/Development/SDL-forDB/lib/libSDLmain.a /Users/edward/Development/SDL-forDB/lib/libSDL.a -Wl,-framework,OpenGL -Wl,-framework,Cocoa -Wl,-framework,ApplicationServices -Wl,-framework,Carbon -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,IOKit@g" Makefile 24 25cd src 26 27sed -i.old -e "s@-L/Users/edward/Development/SDL-forDB/lib -lSDLmain -lSDL -Wl,-framework,Cocoa@-L/Users/edward/Development/SDL-forDB/lib /Users/edward/Development/SDL-forDB/lib/libSDLmain.a /Users/edward/Development/SDL-forDB/lib/libSDL.a -Wl,-framework,OpenGL -Wl,-framework,Cocoa -Wl,-framework,ApplicationServices -Wl,-framework,Carbon -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,IOKit@g" Makefile 28 29cd .. 30 31make
As you see, I had to comment out one line of your exports in order to make a static build. If I did NOT comment out that line, then the executable would not launch on a clean system, and complain that it could not find libpng.
Question: do you have any idea of why the new executable should be 2.8 MB, while the old one was 3.5 MB? I worried whether it was really static or not, but it does seem to be static - I think!
I think this is real progress, and I want to thank you once again. If I'm missing something b
I really don't understand. Your log DOES complain about missing compiler. And that it doesn't work with the libs is because something changed then in the makefile that gets generated...
Can you attach your makefile before and after running autogen and configure? With and without exporting the libs folder?
No, YOU understand - I'm the one who doesn't understand! 😉 Of course, you're right that the log complains about the missing compiler; I simply didn't look hard enough. Furthermore, I don't know how it's possible that the script worked yesterday, because, when I tried it again a few minutes to gather those makefiles that you asked for - of course it wouldn't run, because the compiler was missing.
I can't imagine how it ran before, but it did, even though I ran "make clean" repeatedly and restart the machine every few days. So, here is where things stand:
My current build script, based very closely on yours, now works perfectly. When I test the executable under 10.5, it won't run because SDL can't determine the video mode (it says), but I don't try to support 10.5 anyway.
Oh, great 😉
My guess about the 10.5 problem is that you compiled your SDL with 10.5 min_version. And, yes, don't bother with 10.5 support unless:
- you have the old 10.5 SDK (using a newer SDK with min_version 10.5 breaks some things and doesn't guarantee it will run on 10.5)
- you compile every lib with 10.5 in mind as well...
If you want you can copy/paste your script here and I'll take a look whether I'd do something differently 😉
Hmm, I think the reason your build script worked before was because you didn't do distclean and thus old configure lingered around or so...
I have some stuff that might be really helpful for you. First of all I have some simple error checking in my script so when an error happens along the way, the script aborts and doesn't do all the following steps.
Also I file my snapshot files with date and revision number.
I'll adapt your script a bit, I didn't pay much attention to paths. make sure you adapt everything 😀 I'm also assuming you use the system's subversion (svn) and not the one provided by mac ports (difference is that macports is very up to date but the checkout needs to be converted from time to time to the new format which can be annoying).
1#!/bin/sh 2 3## error handling!!! I have no idea how it works. I copied it from the net :) 4DIE=0 5function error_exit 6{ 7 echo -e "\033[1;31m **Error** line #${1:-"Unknown Error"}\033[0m" 1>&2 8 exit 1 9} 10 11## SVN update needs the path to where you checked out DOSbox SVN to; also error checking 12cd ~/Code/snapshots/dosbox 13/usr/bin/svn update --depth=infinity || { 14 DIE=1 15 error_exit "$(( $LINENO -2 )) : SVN update failed." 16} 17 18## new things from Dominus 19OPT=' -arch i386 -m32 -O2 -msse -msse2 -force_cpusubtype_ALL ' 20SDK=' -mmacosx-version-min=10.6 ' 21export MACOSX_DEPLOYMENT_TARGET=10.6 22export PATH=/opt/local/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin 23export CC="/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -arch i386" 24export CXX="/Applications/Xcode.app/Contents/Developer/usr/bin/g++ -arch i386" 25export CPPFLAGS='-I/opt/local/include '$SDK 26export CFLAGS='-I/opt/local/include '$SDK' '$OPT 27export CXXFLAGS='-I/opt/local/include '$SDK' '$OPT 28# export LDFLAGS='-L/opt/local/lib '$SDK' '$OPT # <- NB commented out 29export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig" 30 31./autogen.sh 32 33## configure with -q(uiet) switch so you have less clutter in terminal 34./configure -q --prefix=/opt/local --with-sdl-prefix=/Users/edward/Development/SDL-forDB --disable-sdltest --disable-alsatest || { 35DIE=1 36error_exit "$(( $LINENO -2 )) : configure failed." 37} 38 39## make clean output send to /dev/null -> again, less clutter in terminal 40make clean > /dev/null 41 42## replace dynamic lib linking with static linking; error check <- you will need to test whether that works with sed 43sed -i.old -e "s@-L/Users/edward/Development/SDL-forDB/lib -lSDLmain -lSDL -Wl,-framework,Cocoa@-L/Users/edward/Development/SDL-forDB/lib /Users/edward/Development/SDL-forDB/lib/libSDLmain.a /Users/edward/Development/SDL-forDB/lib/libSDL.a -Wl,-framework,OpenGL -Wl,-framework,Cocoa -Wl,-framework,ApplicationServices -Wl,-framework,Carbon -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,IOKit@g" Makefile || { 44DIE=1 45error_exit "$(( $LINENO -2 )) : 1st sed failed." 46} 47 48cd src 49 50sed -i.old -e "s@-L/Users/edward/Development/SDL-forDB/lib -lSDLmain -lSDL -Wl,-framework,Cocoa@-L/Users/edward/Development/SDL-forDB/lib /Users/edward/Development/SDL-forDB/lib/libSDLmain.a /Users/edward/Development/SDL-forDB/lib/libSDL.a -Wl,-framework,OpenGL -Wl,-framework,Cocoa -Wl,-framework,ApplicationServices -Wl,-framework,Carbon -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,IOKit@g" Makefile || { 51DIE=1 52error_exit "$(( $LINENO -2 )) : 2nd sed failed." 53} 54 55cd .. 56 57## begin make, if you have a multicore machine the -j9 switch makes it go faster, -s is for silent, less clutter; most important error checking :) 58make -j9 -s || { 59 DIE=1 60 error_exit "$(( $LINENO -2 )) : make failed."
…Show last 57 lines
61} 62 63 64## Now some stuff I do automatically for bundling, disk image, storing snapshots etc... 65## The important thing to keep in your script is the if test "$DIE" -eq 1; then ... because you need that for the error checking to work. I *think* it needs to be at the end of the script. not sure :) 66 67## bundle - I'm lazy, I have an existing bundle in there and just copy the binary to it. Mostly unnecessary error check 68cp ./src/DOSBox ./src/dosboxsvn.app/contents/MacOS/DOSBox || { 69DIE=1 70error_exit "$(( $LINENO -2 )) : Bundle failed." 71} 72 73## codesign to satisfy OS X 10.8 Gatekeeper - only possible if you have a paid developer account 74codesign --force --sign "Developer ID Application: MYNAME" ./src/dosboxsvn.app || { 75DIE=1 76error_exit "$(( $LINENO -2 )) : codesign failed." 77} 78 79## Set REVISION for later use, it reads the SVN revision number of your DOSbox repository, 80## a big M after the number means it's not straight SVN but modified, for example the fpu patch is a modification. The variable will have a leading space 81REVISION=" r$(/usr/bin/svnversion)" 82 83##make disk image by first making a folder for all the files of the diskimage, copying all files, then creating the diskimage - the disk image will also display the revision number. error check 84mkdir DOSBox-Snapshot 85CpMac -r ./src/dosboxsvn.app ./DOSBox-Snapshot 86cp ./AUTHORS ./DOSBox-Snapshot/Authors 87cp ./COPYING ./DOSBox-Snapshot/License 88cp ./NEWS ./DOSBox-Snapshot/News 89cp ./README ./DOSBox-Snapshot/ReadMe 90SetFile -t ttro -c ttxt ./DOSBox-Snapshot/Authors 91SetFile -t ttro -c ttxt ./DOSBox-Snapshot/License 92SetFile -t ttro -c ttxt ./DOSBox-Snapshot/News 93SetFile -t ttro -c ttxt ./DOSBox-Snapshot/ReadMe 94hdiutil create -ov -format UDZO -imagekey zlib-level=9 -fs HFS+ -srcfolder DOSBox-snapshot -volname "DOSBox SVN snapshot$REVISION" Dosbox-Snapshot.dmg || { 95DIE=1 96error_exit "$(( $LINENO -2 )) : disk image failed." 97} 98 99## copy app to applications 100cp -R ./src/DOSBoxSVN.app /Applications/ 101 102## file the snapshot disk image with date Year-Month-Day-time and reision number. 103## In the snapshot folder you will have both the disk image with date and revision number and without. Without will of course only be the newest. 104## It's just something that came in handy with the projects I do snapshots for 105cp -p Dosbox-Snapshot.dmg ~/Snapshots/dosbox/"`date +%y-%m-%d-%H%M` DOSBox$REVISION.dmg" 106mv Dosbox-Snapshot.dmg ~/Snapshots/dosbox/ 107 108## "upload" 109cp -p ~/Snapshots/dosbox/Dosbox-Snapshot.dmg ~/dropbox/public/dosbox/ 110 111## cleanup. distclean is making sure you really generate new configure and makefiles. And at last the folder for the files that go in the disk image gets deleted 112make -s distclean > /dev/null 113rm -r DOSBox-Snapshot 114 115if test "$DIE" -eq 1; then 116 exit 1 117fi
If you want to adapt your existing script for the error checking just add a
directly *after* the command you want to make sure runs ok. You can see that in the script 😀
Now, if you are still reading you might want to see my applescript that Mail.app uses to run my various snapshot shell scripts automatically when new revision mails come into my inbox 😀
1using terms from application "Mail" 2 on perform mail action with messages theMessages for rule Test 3 tell application "Mail" 4 repeat with eachMessage in theMessages 5 set theSubject to the subject of eachMessage 6 set theBody to the content of eachMessage 7 set xu4 to "xU4" 8 set exult to "Exult" 9 set pent to "Pentagram" 10 set dos to "DOSBox" 11 set nuvie to "Nuvie" 12 if theSubject begins with "[" & xu4 and theSubject contains "trunk/u4" and theSubject does not contain "trunk/u4/src/iOS" then 13 set subj to xu4 14 else if theSubject begins with "[" & exult and theSubject contains exult & "/trunk" then 15 set subj to exult 16 else if theSubject begins with "[" & pent and theSubject contains pent & "/trunk" then 17 set subj to pent 18 else if theSubject begins with "[dosbox" then 19 set subj to dos 20 else if theSubject begins with "[" & nuvie and theBody contains nuvie & "/trunk" then 21 set subj to nuvie 22 end if 23 activate 24 set icon_path to ((path to applications folder) as string) & subj & ".app:Contents:Resources:" & subj & ".icns" 25 set snapshotdialog to display dialog "New revision!!! 26 27Build " & subj & " snapshot? 28" buttons {"Cancel", "OK"} giving up after 110 with icon alias icon_path with title subj 29 if button returned of snapshotdialog = "OK" or gave up of snapshotdialog is true then 30 tell application "Terminal" 31 activate 32 tell application "System Events" to tell process "Terminal" to keystroke "t" using {command down} 33 delay 1 34 do script "cd ~/code/sh; . " & subj & "snapshot.sh" in selected tab of the front window 35 end tell 36 end if 37 end repeat 38 end tell 39 end perform mail action with messages 40end using terms from
In mail I have a rule that runs this AppleScript for any mail from the varios SVN mailinglists (DOSBox' is at https://lists.sourceforge.net/lists/listinfo/dosbox-cvs-log to subscribe). The AppleScript then checks which project the SVN update was for and then runs the shell script for that project (for example dosboxsnapshot.sh.
So as long as my Mac and Mail.app are running I don't have to manually run the snapshot scripts 😀
(unfortunately OS X 10.9 previews broke gmail accounts in Mail.app, mails are not continously pulled in 🙁 )
Thank you for those additions to my script! I'm going to add them one by one, to make sure that I get them right, and will ask for help in case of problems.
I actually maintain two projects - one in which I build from SVN, the other in which I make a custom build that includes many special-purpose patches that I was given by members of this forum. (I will now include your coreaudio patch too!) My custom build doesn't have the latest sdlmain. files, because I couldn't figure out how to combine my special-purpose patches with the current state of the code, but it seems to work reasonably well.
You are right that I didn't do distclean, though I do that now and then on Windows. I will know better next time!
Meanwhile, a thousand thanks for this. I will report on progress as I modify my script.
Quick report: I adapted most of your script, and it certainly works so far - and seems a lot faster.
The various warnings are a lot more visible now. I may ask you about those. (Is there anything to do about the warnings about "missing"?)
I use a paid app called DMG Canvas to build nice-looking DMG files; it includes a command-line tool for building the DMG. I've been code-signing with another app called App Wrapper, but your script tells me how to do this a lot more efficiently. Thank you again!