Skip to content

Commit

Permalink
trigger ci 15
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmnk Freemountainer authored and Dmnk Freemountainer committed Nov 24, 2016
1 parent 5e08e73 commit 63d591d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 11 deletions.
15 changes: 8 additions & 7 deletions qml-player.pro
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ RESOURCES += qml.qrc
OUT_PWD_WIN = $${OUT_PWD}
OUT_PWD_WIN ~= s,/,\\,g

NODE_CMD = $$PWD/tmp/bin-$$system(bash tools/uname.sh -o)-$$system(bash tools/uname.sh -a)/node

!win32: NODE_CMD = $$PWD/tmp/bin-$$system(bash tools/uname.sh -o)-$$system(bash tools/uname.sh -a)/node

maxc {
copy_node.commands = $(COPY_DIR) $$NODE_CMD $$OUT_PWD/$$TARGET".app"/Contents/MacOS/
Expand All @@ -37,13 +38,13 @@ linux {
}

win32 {
NODE_CMD = $$PWD/tmp/bin-$$system(bash tools/uname.sh -o)-$$system(bash tools/uname.sh -a)/node.exe
OUT_PWD_WIN = $$shell_path($$OUT_PWD/release)
NODE_CMD = $$PWD/tmp/bin-windows-x86/node.exe
OUT_PWD_WIN = $$shell_path($$OUT_PWD/release/)
CONFIG(debug, debug|release): OUT_PWD_WIN = $$shell_path($$OUT_PWD/debug)
copy_node.commands = $(COPY_FILE) $$shell_path($$NODE_CMD) $$OUT_PWD_WIN
copy_node_path.commands = $(COPY_DIR) $$shell_path($$PWD/src/node_path) $$OUT_PWD_WIN
copy_app.commands = $(COPY_DIR) $$shell_path($$PWD/example/default) $$OUT_PWD_WIN

copy_node.commands = $(COPY_FILE) $$shell_path($$NODE_CMD) $$OUT_PWD_WIN
copy_node_path.commands = $(COPY_DIR) $$shell_path($$PWD/src/node_path) $$OUT_PWD_WIN\node_path
copy_app.commands = $(COPY_DIR) $$shell_path($$PWD/example/default) $$OUT_PWD_WIN\default
}

first.depends = $(first) copy_node_path copy_app copy_node
Expand Down
2 changes: 2 additions & 0 deletions src/cpp/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ QDir Environment::getDataPath() {
QString Environment::getBundledAppPath() {
QString result = NULL;
#ifdef _WIN32
QString binPath = QFileInfo( QCoreApplication::applicationFilePath() ).absolutePath();

result = binPath + "/default/package.json";
#elif __linux__
QString binPath = QFileInfo( QCoreApplication::applicationFilePath() ).absolutePath();

Expand Down
18 changes: 15 additions & 3 deletions tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,20 @@ TMP_PATH:=$(PROJECT_PATH)/tmp
OS:=$(shell $(TOOLS_PATH)/uname.sh -o)
ARCH:=$(shell $(TOOLS_PATH)/uname.sh -a)

BIN_PATH:=$(TMP_PATH)/bin-$(OS)-$(ARCH)

NODE_OS:=$(shell $(TOOLS_PATH)/uname.sh -o -f node)
NODE_ARCH:=$(shell $(TOOLS_PATH)/uname.sh -a -f node)

ifeq ($(OS), windows)
OS:=windows
ARCH:=x86
NODE_OS:=win
NODE_ARCH:=x86
endif

BIN_PATH:=$(TMP_PATH)/bin-$(OS)-$(ARCH)



NODE_VERSION:=v7.1.0
QPM_VERSION:=v0.10.0
NPM_VERSION:=3.10.9
Expand Down Expand Up @@ -116,7 +125,10 @@ qpm-install:
cd $(PROJECT_PATH) && $(QPM_CMD) install

npm-install:
$(foreach pkg,$(NPM_PKGS),cd $(pkg);$(NPM_CMD) install)
for pkg in $(NPM_PKGS) ; do \
cd $$pkg; \
$(NPM_CMD) install; \
done

BASE_TOOLS:=$(BIN_PATH) $(NODE_CMD) $(QPM_CMD) $(BIN_PATH)/npm
LINUX_TOOLS:=$(BIN_PATH)/appimagetool $(BIN_PATH)/linuxdeployqt $(BIN_PATH)/patchelf
Expand Down
6 changes: 5 additions & 1 deletion tools/uname.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ case "$OSTYPE" in
*) echo "unknown: $OSTYPE" ; exit 1;
esac


format_node() {
case "$arch" in
x86_64) arch="x64";;
Expand All @@ -26,6 +25,7 @@ format_node() {
esac
if [[ "$os" = windows ]]; then
os=win
arch=x86
fi
}
while getopts "aof:" opt; do
Expand All @@ -49,6 +49,10 @@ case "$format" in
*) echo "illegal format vale: $format. (valid: ${valid_formats[@]}))" ; exit 1;
esac

if [[ "$os" = windows ]]; then
arch=x86
fi

if [[ "$show_arch" = true ]]; then
echo "$arch"
fi
Expand Down

0 comments on commit 63d591d

Please sign in to comment.