Author: matt
Date: 2012-12-17 12:49:29 -0800 (Mon, 17 Dec 2012)
New Revision: 9762
Log:
Fixed some docs, adding some ideas to rapid dev setup.
Modified:
branches/branch-3.0/README.OSX.txt
branches/branch-3.0/fltk.flw
branches/branch-3.0/fluid/WorkspaceType.cxx
branches/branch-3.0/fluid/WorkspaceType.h
branches/branch-3.0/fluid/file_xcode.cxx
branches/branch-3.0/fluid/workspace_panel.cxx
branches/branch-3.0/fluid/workspace_panel.fl
branches/branch-3.0/include/fltk3/Wrapper.h
Modified: branches/branch-3.0/README.OSX.txt
===================================================================
--- branches/branch-3.0/README.OSX.txt 2012-12-17 17:44:15 UTC (rev 9761)
+++ branches/branch-3.0/README.OSX.txt 2012-12-17 20:49:29 UTC (rev 9762)
@@ -58,7 +58,23 @@
is located in the "Utilities" folder inside the "Applications" folder. I like
to
keep the Terminal in the Dock.
+
+ 2.1.1 Xcode 4.x and command line tools
+----------------------------------------
+Xcode 4 does not automatically install the command line tools anymore.
+
+ - go to the App Store, install Xcode
+ - run Xcode (it's now in /Applications instead of /Developers)
+ - in the Xcode menu bar, choose Xcode->Preferences->Downloads
+ - select "Command Line Tools" and click "Install"
+
+Now you are still missing "autoconf". There are several ways to install
+autonconf, either from scratch or via "brew" or similar. Please refer to
+one of the many web pages out there that describe the process in
+every detail.
+
+
2.2 Downloading and Unpacking
--------------------------------
Modified: branches/branch-3.0/fltk.flw
===================================================================
--- branches/branch-3.0/fltk.flw 2012-12-17 17:44:15 UTC (rev 9761)
+++ branches/branch-3.0/fltk.flw 2012-12-17 20:49:29 UTC (rev 9762)
@@ -13,10 +13,10 @@
uuid_VC2008_Workspace {D21EA206-7BBC-4F5B-8518-A798E56EE0FC}
uuid_VC2010_Workspace {8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}
} {
- folder Applications {
+ folder Applications {open
uuid_Xcode4_Group {137F861A-5702-45AC-821B-A2C51A17F780}
} {
- app_target Fluid {
+ app_target Fluid {open selected
uuid_Xcode4_ProductReference {FD9750B2-CA9C-4856-A516-E56BD9B2E805}
uuid_Xcode4_ProductFileReference {4616D958-4FAE-4BE9-921B-A868F80B6CC7}
uuid_Xcode4_FluidBuildRule {30FE3F00-9876-4AE4-9F6E-35B6B4CAA24E}
@@ -34,7 +34,7 @@
target_path fluid
makefile_path fluid
} {
- folder Headers {open
+ folder Headers {
uuid_Xcode4_Group {DA2A6DF9-A5C3-436C-85B3-0A416E71C3D2}
} {
file_ref {about_panel.h} {
@@ -194,7 +194,7 @@
filename_and_path {fluid/WorkspaceType.h}
}
}
- folder Sources {open
+ folder Sources {
uuid_Xcode4_Group {A7473707-DAEF-403D-A178-64742001185E}
} {
file_ref {about_panel.cxx} {
@@ -396,7 +396,7 @@
filename_and_path {fluid/WorkspaceType.cxx}
}
}
- folder Dependencies {open
+ folder Dependencies {
uuid_Xcode4_Group {A6C2C5AC-C608-489D-8C74-B63CCDEB081B}
} {
target_dependency fltk3 {
@@ -432,7 +432,7 @@
}
}
}
- folder Libraries {open
+ folder Libraries {
uuid_Xcode4_Group {AFD010B3-DA64-4C5E-9682-891530BD3B73}
} {
lib_target fltk3 {open
@@ -4976,7 +4976,7 @@
uuid_Xcode4_FileRef {B6DC8E80-EB2E-4B92-BDB7-3AF5EB50D6C9}
filename_and_path {src/fltk3connect/Socket.cxx}
}
- file_ref {SerialPort.cxx} {selected
+ file_ref {SerialPort.cxx} {
uuid_Xcode4_BuildFileInSources {9944741C-E39A-4372-8847-BCEE4EFCAE9F}
uuid_Xcode4_FileRef {CE848D00-9304-4454-A495-FC3CAF98D759}
filename_and_path {src/fltk3connect/SerialPort.cxx}
Modified: branches/branch-3.0/fluid/WorkspaceType.cxx
===================================================================
--- branches/branch-3.0/fluid/WorkspaceType.cxx 2012-12-17 17:44:15 UTC (rev
9761)
+++ branches/branch-3.0/fluid/WorkspaceType.cxx 2012-12-17 20:49:29 UTC (rev
9762)
@@ -725,6 +725,44 @@
}
}
+const char *Fl_File_Type::filename_absolute() {
+ char *p;
+ char *result = get_temporary_return_buffer(FLTK3_PATH_MAX);
+ const char *fn = filename();
+ if (fn) {
+ result[0] = 0;
+ switch (location()) {
+ case FL_LOCATION_ABSOLUTE:
+ strcpy(result, fn);
+ break;
+ case FL_LOCATION_IDE:
+ strcpy(result, ::filename);
+ p = (char*)fltk3::filename_name(result);
+ // FIXME: The paths below should depend on the build_env setting!
+#ifdef __APPLE__
+ strcpy(p, "ide/Xcode4/");
+#elif defined WIN32
+ strcpy(p, "ide/VisualC2010/");
+#else
+ strcpy(p, "");
+#endif
+ strcat(p, fn);
+ break;
+ case FL_LOCATION_SDK:
+ // FIXME: SDK
+ break;
+ case FL_LOCATION_WORKSPACE:
+ strcpy(result, ::filename);
+ p = (char*)fltk3::filename_name(result);
+ strcpy(p, fn);
+ break;
+ }
+ return result;
+ } else {
+ return 0;
+ }
+}
+
void Fl_File_Type::open() {
if (!the_workspace_panel) the_workspace_panel = make_workspace_panel();
the_workspace_panel->load(&Fl_Type::is_tool);
Modified: branches/branch-3.0/fluid/WorkspaceType.h
===================================================================
--- branches/branch-3.0/fluid/WorkspaceType.h 2012-12-17 17:44:15 UTC (rev
9761)
+++ branches/branch-3.0/fluid/WorkspaceType.h 2012-12-17 20:49:29 UTC (rev
9762)
@@ -233,9 +233,10 @@
virtual int is_file() const { return 1; }
virtual int pixmapID() { return 53; } // FIXME: draw icon
void filename(const char *new_name);
- const char *filename() { return pFilename; }
+ const char *filename() { return pFilename; } // FIXME: fix absolue filenames!
const char *filename_name();
const char *filename_relative(const char *fnbase, const char *tgtbase);
+ const char *filename_absolute();
virtual void open();
virtual void write_properties();
virtual char read_property(const char *);
Modified: branches/branch-3.0/fluid/file_xcode.cxx
===================================================================
--- branches/branch-3.0/fluid/file_xcode.cxx 2012-12-17 17:44:15 UTC (rev
9761)
+++ branches/branch-3.0/fluid/file_xcode.cxx 2012-12-17 20:49:29 UTC (rev
9762)
@@ -1166,6 +1166,7 @@
#include <unistd.h>
#include <copyfile.h>
+#include <errno.h>
int filesize(const char *filename)
{
@@ -1189,8 +1190,24 @@
int copyfiles(const char *srcpath, const char *src, const char *dstpath)
{
- printf("Copying %s%s to %s\n", srcpath, src, dstpath);
+ char sbuf[2048];
+ strcpy(sbuf, srcpath);
+ strcat(sbuf, src);
+ //strcat(sbuf, "/");
+ char dbuf[2048];
+ strcpy(dbuf, dstpath);
+ //strcat(dbuf, src);
+
+ copyfile_state_t s;
+ s = copyfile_state_alloc();
+
+ printf("Copying <%s> to <%s>\n", sbuf, dbuf);
+ int ret = copyfile(sbuf, dbuf, s,
+ COPYFILE_ALL|COPYFILE_RECURSIVE|COPYFILE_NOFOLLOW);
+
+ copyfile_state_free(s);
+
#if 0
/* Initialize a state variable */
copyfile_state_t s;
@@ -1213,7 +1230,8 @@
copyfile("/dev/null", "/tmp/bar", NULL, COPYFILE_XATTR);
#endif
- return 0;
+ if (ret!=0) printf("ERROR %d: %s\n", errno, strerror(errno));
+ return ret;
}
void install_library_cb(fltk3::Widget *, void *)
@@ -1313,14 +1331,22 @@
// FIXME: check if the source is there and has a plausible date.
// FIXME: check for overwrite of old libraries
- sprintf(buf2, "/Users/%s/Library/Frameworks/", getlogin());
- copyfiles(buf, "fltk3.workspace", buf2);
- copyfiles(buf, "fltk3gl.workspace", buf2);
- copyfiles(buf, "fltk3images.workspace", buf2);
- copyfiles(buf, "fltk3png.workspace", buf2);
- copyfiles(buf, "fltk3jpeg.workspace", buf2);
- copyfiles(buf, "fltk3zlib.workspace", buf2);
- copyfiles(buf, "fltk3connect.workspace", buf2);
+ //sprintf(buf2, "/Users/%s/Library/Frameworks/", getlogin());
+ strcpy(buf2, "/Library/Frameworks/");
+ copyfiles(buf, "fltk3.framework", buf2);
+ /*
+ copyfiles(buf, "fltk3gl.framework", buf2);
+ copyfiles(buf, "fltk3images.framework", buf2);
+ copyfiles(buf, "fltk3png.framework", buf2);
+ copyfiles(buf, "fltk3jpeg.framework", buf2);
+ copyfiles(buf, "fltk3zlib.framework", buf2);
+ copyfiles(buf, "fltk3connect.framework", buf2);
+ */
+
+ copyfiles(buf, "fltk3.framework",
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/");
+
+ // Xcode3 stores its own libraries here:
/Developer/SDKs/MacOSXversion.sdk/System/Library/Framew
+ // Xcode4 stores its own libraries here:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/
if (source_path) free(source_path);
}
@@ -1334,6 +1360,37 @@
#endif
+/*
+
+ Rapid Application Development:
+
+ Goal: as quickly as possible from nothing to the first running application
+
+ Base: Fluid explains and organizes installation and project creation
+
+ Initial help: (assuming that Fluid was downloaded as a binary, if we decide
to allow that)
+
+ A check if Fluid is run for the first time ever and say Hi!
+ - check if FLTK is installed and if it is the current version (once a week)
+ - if not
+ - check if Fluid was created on this machine
+ - if not, check which developer environments are installed
+ - if none, give user a choice and a short tour on how to install those
on the given OS
+ - offer to download the curent FLTK library and documentation as binaries
or source
+ - if user chooses binary, continue at B else continue below
+ - if Fluid was created on this machine
+ - find the root of the FLTK source code archive, if not, let the user
choose
+ - check if there is a newer version available
+ - check if all the libraries/frameworks were build, offer to build them
+ - check for documentation, build or download
+ B newer libraries and documentation exist on the local machines than the ones
installed
+ - offer to install/overwrite binaries, libs and docs
+ - inside Xcode (explain why), /Libraries/Framework, ~/Lib/FW, etc.
+ - offer to create test project
+
+ */
+
+
//
// End of "$Id: file_xcode.cxx 8870 2011-07-26 21:19:35Z matt $".
//
Modified: branches/branch-3.0/fluid/workspace_panel.cxx
===================================================================
--- branches/branch-3.0/fluid/workspace_panel.cxx 2012-12-17 17:44:15 UTC
(rev 9761)
+++ branches/branch-3.0/fluid/workspace_panel.cxx 2012-12-17 20:49:29 UTC
(rev 9762)
@@ -310,10 +310,15 @@
if (v == Fl_Panel::LOAD) {
} else {
- const char *fn = fltk3::file_chooser("Select file:", "*",
pFileName->value());
+ const char *fn = fltk3::file_chooser(
+ "Select file:",
+ "*",
+ Fl_Panel::selected_file()->filename()
+ );
if (fn) {
pFileName->value(fn);
pFileName->do_callback();
+ // FIXME: the callback will not fix the absolute path!
}
};
}
Modified: branches/branch-3.0/fluid/workspace_panel.fl
===================================================================
--- branches/branch-3.0/fluid/workspace_panel.fl 2012-12-17 17:44:15 UTC
(rev 9761)
+++ branches/branch-3.0/fluid/workspace_panel.fl 2012-12-17 20:49:29 UTC
(rev 9762)
@@ -383,10 +383,15 @@
if (v == Fl_Panel::LOAD) {
} else {
- const char *fn = fltk3::file_chooser("Select file:", "*",
pFileName->value());
+ const char *fn = fltk3::file_chooser(
+ "Select file:",
+ "*",
+ Fl_Panel::selected_file()->filename()
+ );
if (fn) {
pFileName->value(fn);
pFileName->do_callback();
+ // FIXME: the callback will not fix the absolute path!
}
}} selected
xywh {350 5 40 20} color 52 labelcolor 43 align 16 deactivate
Modified: branches/branch-3.0/include/fltk3/Wrapper.h
===================================================================
--- branches/branch-3.0/include/fltk3/Wrapper.h 2012-12-17 17:44:15 UTC (rev
9761)
+++ branches/branch-3.0/include/fltk3/Wrapper.h 2012-12-17 20:49:29 UTC (rev
9762)
@@ -673,7 +673,7 @@
FLTK3_WRAPPER_VCALLS_IMAGE(Image, uncache(), uncache(), Uncache);
};
-}; // namespace fltk3
+} // namespace fltk3
#endif
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit