diff --git a/com.visualstudio.code.oss.json b/com.visualstudio.code.oss.json
index dabe8e593f04b649bf549cdf79d5409a02860daf..4d59dba2afb207e604cd2d2e013b390950d8b699 100644
--- a/com.visualstudio.code.oss.json
+++ b/com.visualstudio.code.oss.json
@@ -52,14 +52,33 @@
             "build-options": {
                 "build-args": [
                     "--share=network"
-                ]
+                ],
+				"arch": {
+					"x86_64": {
+						"env": {
+							"FLATPAK_ARCH": "x86_64",
+							"VSCODE_ARCH": "x64"
+						}
+					},
+					"i386": {
+						"env": {
+							"FLATPAK_ARCH": "i386",
+							"VSCODE_ARCH": "ia32"
+						}
+					},
+					"arm" : {
+						"env": {
+							"FLATPAK_ARCH": "arm",
+							"VSCODE_ARCH": "arm"
+						}
+					}
+				}
             },
             "sources": [
                 {
                     "type": "git",
                     "url": "https://github.com/Microsoft/vscode",
-                    "branch": "release/1.10",
-                    "dest": "app"
+                    "branch": "release/1.10"
                 },
                 {
                     "type": "file",
diff --git a/vscode/Makefile b/vscode/Makefile
index 2421b367f19f553ac170e47412dae379f9227a04..33a59a89bbfb62830128fa62d7490f443a294760 100644
--- a/vscode/Makefile
+++ b/vscode/Makefile
@@ -1,22 +1,12 @@
 all:
-	set -x
 	# Install dependencies
-	cd app && ./scripts/npm.sh install && ./scripts/npm.sh install gm
+	./scripts/npm.sh install
+	./scripts/npm.sh install gm
 	# build vscode
-	cd app && ./node_modules/.bin/gulp "vscode-linux-ia32-prepare-flatpak" --max_old_space_size=4096;
+	./node_modules/.bin/gulp vscode-linux-${VSCODE_ARCH}-prepare-flatpak --max_old_space_size=4096
 
 install:
-	# Install Icons, appdata.xml and .desktop file
-	mkdir -p /export/share/
-	cp -r app/.build/linux/flatpak/i386/share/icons /export/
-	cp -r app/.build/linux/flatpak/i386/share/appdata /export/
-	cp -r app/.build/linux/flatpak/i386/share/applications /export/
-
-	# Make binary available
-	mkdir -p /app/bin
-	cp -r app/.build/linux/flatpak/i386/share/code-oss/bin/* /app/bin
-
-	# Add code-oss contents to the bundle
-	cp -a app/.build/linux/flatpak/i386/share/code-oss /app
+	cp -ar .build/linux/flatpak/${FLATPAK_ARCH}/* /app/
+	ln -sf /app/share/code-oss/bin/code-oss /app/bin/code-oss
 
 .PHONY: all install