OSDN Git Service

Build scripts are updated; now the zip files are created every time after the release...
authortoshinagata1964 <toshinagata1964@a2be9bc6-48de-4e38-9406-05402d4bc13c>
Fri, 28 Mar 2014 11:07:21 +0000 (11:07 +0000)
committertoshinagata1964 <toshinagata1964@a2be9bc6-48de-4e38-9406-05402d4bc13c>
Fri, 28 Mar 2014 11:07:21 +0000 (11:07 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@520 a2be9bc6-48de-4e38-9406-05402d4bc13c

Documents/makedoc.rb
Makefile
MolLib/cmdtool_stubs.c
msw-build/molby.iss
xcode-build/Molby.xcodeproj/project.pbxproj

index e31241e..cf8df2d 100644 (file)
@@ -225,7 +225,7 @@ def special_node(e, ef, lang)
   en
 end
 
-base_dir = "doc"
+base_dir = "MolbyDoc"
 system("mkdir -p #{base_dir}; rm -rf #{base_dir}/*")
 
 #  Output to files (en and jp)
index fab6e71..5f945ec 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -55,6 +55,7 @@ else
  DESTPREFIX = build/release
  COPT = -O2 -g
 endif
+MAKEDIR = $(PWD)
 DESTDIR = $(PWD)/$(DESTPREFIX)
 CFLAGS = $(CPPFLAGS) $(COPT) $(CPP_EXTRA_FLAGS) $(RUBY_CFLAGS) $(WX_CPPFLAGS)
 LDFLAGS = $(WX_LDFLAGS) $(LD_EXTRA_FLAGS) $(RUBY_LDFLAGS)
@@ -165,7 +166,9 @@ endif
 
 ifeq ($(TARGET_PLATFORM),MSW)
 setup: build/release/$(PRODUCT_DIR)/$(FINAL_EXECUTABLE)
-       /c/Program\ Files\ \(x86\)/Inno\ Setup\ 5/iscc molby.iss
+       mkdir -p ../Products
+       (/c/Program\ Files\ \(x86\)/Inno\ Setup\ 5/iscc molby.iss && mv Output/SetupMolbyWin.exe ../Products)
+       (cd build/release/$(PRODUCT_DIR) && zip -r $(MAKEDIR)/../Products/MolbyWin.zip * -x \*.DS_Store \*.svn*)
 endif
 
 clean:
index d64214b..02a04dd 100644 (file)
@@ -26,6 +26,7 @@
 #include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include <libgen.h>  /*  for dirname()  */
 
 #include <ruby.h>
 
@@ -316,12 +317,14 @@ main(int argc, char **argv)
        int fd;
        char *scriptdir;
        static const char fname[] = "startup.rb";
-       char *molbydir = getenv("MOLBYDIR");
-       if (molbydir == NULL) {
-               fprintf(stderr, "Please define the environmental variable MOLBYDIR to specify the location in which the 'Scripts' directory is present.\n");
-               exit(1);
+       char *argv0 = argv[0];
+       char *p = dirname(argv0);
+       if (p != NULL) {
+               asprintf(&p, "%s%cMolby_resources", p, PATH_SEPARATOR);
+       } else {
+               p = ".";
        }
-       asprintf(&scriptdir, "%s%cScripts", molbydir, PATH_SEPARATOR);
+       asprintf(&scriptdir, "%s%cScripts", p, PATH_SEPARATOR);
        fd = open(".", O_RDONLY);
        chdir(scriptdir);
        
index b8f98c0..0ee5c12 100755 (executable)
@@ -4,7 +4,7 @@ AppVerName = Molby (v1.0b1)
 DefaultDirName = {pf}\Molby
 DefaultGroupName = Molby
 UninstallDisplayIcon = {app}\Molby.exe
-OutputBaseFileName = SetupMolby
+OutputBaseFileName = SetupMolbyWin
 
 [Files]
 Source: "build\release\Molby\Molby.exe"; DestDir: {app}
index 0d3c30f..2fdf096 100644 (file)
                                8D1107290486CEB800E47090 /* Resources */,
                                8D11072C0486CEB800E47090 /* Sources */,
                                8D11072E0486CEB800E47090 /* Frameworks */,
+                               E43C5D9518E553D9004FE397 /* ShellScript */,
                        );
                        buildRules = (
                        );
                        buildPhases = (
                                E49BFB731886E2E400188237 /* Sources */,
                                E49BFB741886E2E400188237 /* Frameworks */,
+                               E43C5DE818E57C56004FE397 /* ShellScript */,
                        );
                        buildRules = (
                        );
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
+               E43C5D9518E553D9004FE397 /* ShellScript */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                       );
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "if [ \"$BUILD_STYLE\" = \"Release\" ]; then\n  rm -f \"$PROJECT_DIR/../Products/MolbyDoc.zip\"\n  (cd $PROJECT_DIR/../Documents && zip -r \"$PROJECT_DIR/../Products/MolbyDoc.zip\" MolbyDoc -x \\*.DS_Store -x \\*.svn*) || exit 1\nfi\n";
+               };
+               E43C5DE818E57C56004FE397 /* ShellScript */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 12;
+                       files = (
+                       );
+                       inputPaths = (
+                       );
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "cp -a \"$BUILT_PRODUCTS_DIR/Molby.app/Contents/Resources\" \"$BUILT_PRODUCTS_DIR\" || exit 1\n(cd \"$BUILT_PRODUCTS_DIR\" && rm -rf Molby_resources && mv Resources Molby_resources) || exit 1\nif [ \"$BUILD_STYLE\" = \"Release\" ]; then\n  (mkdir -p \"$PROJECT_DIR/../Products/temp/Molby\" && cd \"$PROJECT_DIR/../Products/temp/Molby\" && rm -rf *) || exit 1\n  (cd \"$BUILT_PRODUCTS_DIR\" && cp -a Molby.app Molby_command Molby_resources \"$PROJECT_DIR/../Products/temp/Molby\") || exit 1\n  (cd \"$PROJECT_DIR/../Products/temp\" && rm -f ../MolbyMac.zip && zip -r ../MolbyMac.zip Molby -x \\*.DS_Store -x \\*.svn*) || exit 1\n  rm -rf \"$PROJECT_DIR/../Products/temp\" || exit 1\nfi\n";
+               };
                E4FC7B57183E516E0064FB2E /* ShellScript */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildActionMask = 2147483647;