changeset 0:2344703d786b

start now.
author pyon@macmini
date Wed, 28 Sep 2011 07:41:15 +0900
parents
children 214f2908b8e4
files .hgignore TODO info.plist.in makefile sample.ico src/testtune.cpp start.bat wxmac.icns
diffstat 8 files changed, 231 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Wed Sep 28 07:41:15 2011 +0900
@@ -0,0 +1,9 @@
+syntax: glob
+obj/*.o
+img/*
+tmp/*
+db/*
+*.app/*
+.DS_Store
+*.conf
+*~
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TODO	Wed Sep 28 07:41:15 2011 +0900
@@ -0,0 +1,8 @@
+===========================================================================
+ TODO
+===========================================================================
+
+---------------------------------------------------------------------------
+ Memo
+---------------------------------------------------------------------------
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/info.plist.in	Wed Sep 28 07:41:15 2011 +0900
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleIdentifier</key>
+	<string>org.wxwindows.IDENTIFIER</string>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>EXECUTABLE</string>
+	<key>CFBundleIconFile</key>
+	<string>wxmac.icns</string>
+	<key>CFBundleName</key>
+	<string>EXECUTABLE</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>VERSION</string>
+	<key>CFBundleShortVersionString</key>
+	<string>VERSION</string>
+	<key>CFBundleGetInfoString</key>
+	<string>EXECUTABLE version VERSION, (c) 2002-2006 wxWidgets</string>
+	<key>CFBundleLongVersionString</key>
+	<string>VERSION, (c) 2002-2006 wxWidgets</string>
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright 2002-2006 wxWidgets</string>
+	<key>LSRequiresCarbon</key>
+	<true/>
+	<key>CSResourcesFileMapped</key>
+	<true/>
+</dict>
+</plist>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefile	Wed Sep 28 07:41:15 2011 +0900
@@ -0,0 +1,141 @@
+#
+# Makefile for wxWidgets Application
+#  Last Change: 27-Sep-2011.
+#  by Takayuki Mutoh
+#
+
+# Program Name
+PROGNAME = mover
+### Variables: ###
+OBJDIR = ./obj
+CXX = g++
+vpath %.cpp ./src
+vpath %.h   ./include
+
+ifdef COMSPEC
+# for Microsoft Windows
+WXCPPFLAGS = -I/local/lib/wx/include/msw-unicode-release-static-2.8 \
+		   -I/local/include/wx-2.8 \
+		   -D__WXMSW__
+WXLIBS = -L/local/lib -Wl,--subsystem,windows -mwindows \
+	   -lwx_mswu_richtext-2.8 \
+	   -lwx_mswu_aui-2.8 \
+	   -lwx_mswu_xrc-2.8 \
+	   -lwx_mswu_qa-2.8 \
+	   -lwx_mswu_html-2.8 \
+	   -lwx_mswu_adv-2.8 \
+	   -lwx_mswu_core-2.8 \
+	   -lwx_baseu_xml-2.8 \
+	   -lwx_baseu_net-2.8 \
+	   -lwx_baseu-2.8 \
+	   -lwxregexu-2.8 \
+	   -lwxexpat-2.8 \
+	   -lwxtiff-2.8 \
+	   -lwxjpeg-2.8 \
+	   -lwxpng-2.8 \
+	   -lwxzlib-2.8 \
+	   -lrpcrt4 \
+	   -loleaut32 \
+	   -lole32 \
+	   -luuid \
+	   -lwinspool \
+	   -lwinmm \
+	   -lshell32 \
+	   -lcomctl32 \
+	   -lcomdlg32 \
+	   -lctl3d32 \
+	   -ladvapi32 \
+	   -lwsock32 \
+	   -lgdi32
+EXECUTABLE = $(PROGNAME).exe
+
+else
+# for Apple MacOSX
+# 2.8
+WXCPPFLAGS = -I/opt/local/lib/wx/include/mac-unicode-release-2.8 \
+		   -I/opt/local/include/wx-2.8 \
+		   -D_FILE_OFFSET_BITS=64 \
+		   -D_LARGE_FILES \
+		   -D__WXMAC__
+WXLIBS = -framework IOKit \
+	   -framework Carbon \
+       -framework Cocoa \
+       -framework System \
+       -framework QuickTime \
+       -framework OpenGL \
+       -framework AGL \
+       -lwx_macu-2.8 \
+       -L/opt/local/lib \
+       -arch i386
+
+EXECUTABLE = $(PROGNAME).app/Contents/PkgInfo
+
+endif
+
+OBJ = $(OBJDIR)/main.o \
+	  $(OBJDIR)/myframe.o \
+	  $(OBJDIR)/preview.o
+ifdef COMSPEC
+OBJMSW = $(OBJ) $(OBJDIR)/sample_rc.o
+endif
+
+# user include
+CPPFLAGS = $(WXCPPFLAGS) -I./include -I./img
+# user lib
+LIBS = -static-libgcc -static-libstdc++ $(WXLIBS)
+
+
+### Targets: ###
+
+all: $(EXECUTABLE)
+
+$(OBJDIR)/main.o: main.cpp main.h myframe.h common.h
+	-mkdir -p $(OBJDIR)
+	$(CXX) -c $< -o $@ $(CPPFLAGS)
+
+$(OBJDIR)/myframe.o: myframe.cpp myframe.h symbol.h common.h
+	$(CXX) -c $< -o $@ $(CPPFLAGS)
+
+testtune: testtune.cpp
+	$(CXX) $< -o $@ $(CPPFLAGS) $(LIBS)
+#$(OBJDIR)/preview.o: preview.cpp preview.h common.h
+#	$(CXX) -c $< -o $@ $(CPPFLAGS)
+
+
+
+# for icon
+ifdef COMSPEC
+$(OBJDIR)/sample_rc.o: sample.rc
+	windres -i sample.rc -o $@ -I/local/include/wx-2.8
+endif
+
+
+$(EXECUTABLE): $(PROGNAME)
+ifdef COMSPEC
+	strip --strip-all $(EXECUTABLE)
+else
+	-mkdir -p $(PROGNAME).app/Contents
+	-mkdir -p $(PROGNAME).app/Contents/MacOS
+	-mkdir -p $(PROGNAME).app/Contents/Resources
+	
+	sed -e "s/IDENTIFIER/$(PROGNAME)/" \
+	-e "s/EXECUTABLE/$(PROGNAME)/" \
+	-e "s/VERSION/0.0/" \
+	Info.plist.in > $(PROGNAME).app/Contents/Info.plist
+	
+	echo -n "APPL????" > $(EXECUTABLE)
+	
+	ln -f $(PROGNAME) $(PROGNAME).app/Contents/MacOS/$(PROGNAME)
+	cp -f wxmac.icns $(PROGNAME).app/Contents/Resources/wxmac.icns
+
+	open $(PROGNAME).app
+endif
+
+
+clean:
+	rm -f $(PROGNAME) $(PROGNAME).exe
+	rm -f $(OBJDIR)/*.o
+	rm -rf $(PROGNAME).app
+
+.PHONY:	all clean
+
Binary file sample.ico has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/testtune.cpp	Wed Sep 28 07:41:15 2011 +0900
@@ -0,0 +1,35 @@
+#include "wx/utils.h"
+#include "wx/string.h"
+
+bool IsBlack( int r, int g, int b ) 
+{
+    if ( r == 255 && g == 255 && b == 255 ) {
+        return true;
+    }
+    return false;
+}
+
+int GuessHhs( wxString &file ) 
+{
+    //open image file
+
+    int xoffset = 0;
+    int yoffset = 0;
+    int dx = 10;
+    int dy = 10;
+
+    for ( int i=0; i<10; i++ ) {
+        for ( int j=0; j<10; j++ ) {
+        }
+    }
+    return 1;
+}
+
+int main( int argc, char **argv ) 
+{
+    wxString file;
+    GuessHhs( file );
+
+    wxPuts(wxT("program end"));
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/start.bat	Wed Sep 28 07:41:15 2011 +0900
@@ -0,0 +1,2 @@
+start /min Y:\
+start mover
Binary file wxmac.icns has changed