Skip to content

Commit

Permalink
Windows compile
Browse files Browse the repository at this point in the history
  • Loading branch information
jehoochen committed Jul 10, 2017
1 parent 1676c78 commit 7af8ede
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
9 changes: 6 additions & 3 deletions mars/libraries/build_for_win32.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def build_win32_impl(save_path, cfg_folder, cfg):
print("Build Failed")
return

lib_save_path = save_path + "/win/" + cfg_folder +"/mars"
lib_save_path = save_path + "/" + cfg_folder
if not os.path.exists(lib_save_path):
os.makedirs(lib_save_path)

shutil.copy(PROJECT_PATH + cfg_folder + "/lib/" + LIB_NAME, lib_save_path)

copy_files(RELATIVE_PATH, lib_save_path, save_path + "/win/" + cfg_folder, WIN_COPY_EXT_FILES)
copy_files(RELATIVE_PATH, save_path + "/include", save_path, WIN_COPY_EXT_FILES)

def build_win32(save_path):
vs_tool_dir = os.getenv("VS140COMNTOOLS")
Expand All @@ -53,7 +53,10 @@ def build_win32(save_path):
return

while True:
menu_select = raw_input("input build config.\n1. Release.\n2. Debug.\n3. all.\n").strip()
if 3 <= len(sys.argv):
menu_select = sys.argv[2]
else:
menu_select = raw_input("input build config.\n1. Release.\n2. Debug.\n3. all.\n").strip()

if "3" == menu_select:
for (folder, cfg) in BUILD_CONFIGURE.items():
Expand Down
6 changes: 3 additions & 3 deletions mars/libraries/mars_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"log/crypt/log_crypt.h": "log_crypt.h",
"stn/proto/shortlink_packer.h": "shortlink_packer.h",
"stn/proto/shortlink_packer.cc": "shortlink_packer.cc.rewriteme",
"comm/windows/projdef.h": "mars/comm/windows/projdef.h",
"comm/windows/sys/cdefs.h": "mars/comm/windows/sys/cdefs.h",
"comm/windows/sys/time.h": "mars/comm/windows/sys/time.h"
"comm/windows/projdef.h": "include/comm/windows/projdef.h",
"comm/windows/sys/cdefs.h": "include/comm/windows/sys/cdefs.h",
"comm/windows/sys/time.h": "include/comm/windows/sys/time.h"
}

html_css = '''
Expand Down
2 changes: 1 addition & 1 deletion samples/Windows/PublicComponentV2/app_callback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// limitations under the License.

/*
* app_callback.cc
* app_callback.cpp
*
* Created on: 2017-7-7
* Author: chenzihao
Expand Down
2 changes: 1 addition & 1 deletion samples/Windows/PublicComponentV2/stn_callback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// limitations under the License.

/*
* stn_callback.cc
* stn_callback.cpp
*
* Created on: 2017-7-7
* Author: chenzihao
Expand Down

0 comments on commit 7af8ede

Please sign in to comment.