• R/O
  • HTTP
  • SSH
  • HTTPS

Molby: コミット

Molecular Modeling Software


コミットメタ情報

リビジョン98dbea5b975611a857386f934acfd5e17057e37d (tree)
日時2014-03-28 20:07:21
作者toshinagata1964 <toshinagata1964@a2be...>
コミッターtoshinagata1964

ログメッセージ

Build scripts are updated; now the zip files are created every time after the release builds are made

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@520 a2be9bc6-48de-4e38-9406-05402d4bc13c

変更サマリ

差分

--- a/Documents/makedoc.rb
+++ b/Documents/makedoc.rb
@@ -225,7 +225,7 @@ def special_node(e, ef, lang)
225225 en
226226 end
227227
228-base_dir = "doc"
228+base_dir = "MolbyDoc"
229229 system("mkdir -p #{base_dir}; rm -rf #{base_dir}/*")
230230
231231 # Output to files (en and jp)
--- a/Makefile
+++ b/Makefile
@@ -55,6 +55,7 @@ else
5555 DESTPREFIX = build/release
5656 COPT = -O2 -g
5757 endif
58+MAKEDIR = $(PWD)
5859 DESTDIR = $(PWD)/$(DESTPREFIX)
5960 CFLAGS = $(CPPFLAGS) $(COPT) $(CPP_EXTRA_FLAGS) $(RUBY_CFLAGS) $(WX_CPPFLAGS)
6061 LDFLAGS = $(WX_LDFLAGS) $(LD_EXTRA_FLAGS) $(RUBY_LDFLAGS)
@@ -165,7 +166,9 @@ endif
165166
166167 ifeq ($(TARGET_PLATFORM),MSW)
167168 setup: build/release/$(PRODUCT_DIR)/$(FINAL_EXECUTABLE)
168- /c/Program\ Files\ \(x86\)/Inno\ Setup\ 5/iscc molby.iss
169+ mkdir -p ../Products
170+ (/c/Program\ Files\ \(x86\)/Inno\ Setup\ 5/iscc molby.iss && mv Output/SetupMolbyWin.exe ../Products)
171+ (cd build/release/$(PRODUCT_DIR) && zip -r $(MAKEDIR)/../Products/MolbyWin.zip * -x \*.DS_Store \*.svn*)
169172 endif
170173
171174 clean:
--- a/MolLib/cmdtool_stubs.c
+++ b/MolLib/cmdtool_stubs.c
@@ -26,6 +26,7 @@
2626 #include <string.h>
2727 #include <fcntl.h>
2828 #include <unistd.h>
29+#include <libgen.h> /* for dirname() */
2930
3031 #include <ruby.h>
3132
@@ -316,12 +317,14 @@ main(int argc, char **argv)
316317 int fd;
317318 char *scriptdir;
318319 static const char fname[] = "startup.rb";
319- char *molbydir = getenv("MOLBYDIR");
320- if (molbydir == NULL) {
321- fprintf(stderr, "Please define the environmental variable MOLBYDIR to specify the location in which the 'Scripts' directory is present.\n");
322- exit(1);
320+ char *argv0 = argv[0];
321+ char *p = dirname(argv0);
322+ if (p != NULL) {
323+ asprintf(&p, "%s%cMolby_resources", p, PATH_SEPARATOR);
324+ } else {
325+ p = ".";
323326 }
324- asprintf(&scriptdir, "%s%cScripts", molbydir, PATH_SEPARATOR);
327+ asprintf(&scriptdir, "%s%cScripts", p, PATH_SEPARATOR);
325328 fd = open(".", O_RDONLY);
326329 chdir(scriptdir);
327330
--- a/msw-build/molby.iss
+++ b/msw-build/molby.iss
@@ -4,7 +4,7 @@ AppVerName = Molby (v1.0b1)
44 DefaultDirName = {pf}\Molby
55 DefaultGroupName = Molby
66 UninstallDisplayIcon = {app}\Molby.exe
7-OutputBaseFileName = SetupMolby
7+OutputBaseFileName = SetupMolbyWin
88
99 [Files]
1010 Source: "build\release\Molby\Molby.exe"; DestDir: {app}
--- a/xcode-build/Molby.xcodeproj/project.pbxproj
+++ b/xcode-build/Molby.xcodeproj/project.pbxproj
@@ -452,6 +452,7 @@
452452 8D1107290486CEB800E47090 /* Resources */,
453453 8D11072C0486CEB800E47090 /* Sources */,
454454 8D11072E0486CEB800E47090 /* Frameworks */,
455+ E43C5D9518E553D9004FE397 /* ShellScript */,
455456 );
456457 buildRules = (
457458 );
@@ -469,6 +470,7 @@
469470 buildPhases = (
470471 E49BFB731886E2E400188237 /* Sources */,
471472 E49BFB741886E2E400188237 /* Frameworks */,
473+ E43C5DE818E57C56004FE397 /* ShellScript */,
472474 );
473475 buildRules = (
474476 );
@@ -519,6 +521,32 @@
519521 /* End PBXResourcesBuildPhase section */
520522
521523 /* Begin PBXShellScriptBuildPhase section */
524+ E43C5D9518E553D9004FE397 /* ShellScript */ = {
525+ isa = PBXShellScriptBuildPhase;
526+ buildActionMask = 2147483647;
527+ files = (
528+ );
529+ inputPaths = (
530+ );
531+ outputPaths = (
532+ );
533+ runOnlyForDeploymentPostprocessing = 0;
534+ shellPath = /bin/sh;
535+ 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";
536+ };
537+ E43C5DE818E57C56004FE397 /* ShellScript */ = {
538+ isa = PBXShellScriptBuildPhase;
539+ buildActionMask = 12;
540+ files = (
541+ );
542+ inputPaths = (
543+ );
544+ outputPaths = (
545+ );
546+ runOnlyForDeploymentPostprocessing = 0;
547+ shellPath = /bin/sh;
548+ 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";
549+ };
522550 E4FC7B57183E516E0064FB2E /* ShellScript */ = {
523551 isa = PBXShellScriptBuildPhase;
524552 buildActionMask = 2147483647;
旧リポジトリブラウザで表示