Skip to content

Commit

Permalink
Improved windows commands
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Jun 5, 2020
1 parent 2c0e58d commit 09cc8e4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
23 changes: 14 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ package-wasmer:
ifeq ($(OS), Windows_NT)
if not exist "package" mkdir "package"
if not exist "package/bin" mkdir "package/bin"
cp target/release/wasmer.exe package/bin/
copy "target\release\wasmer.exe" "package\bin"
else
mkdir -p "package/bin"
cp target/release/wasmer package/bin/
Expand All @@ -134,11 +134,17 @@ ifeq ($(OS), Windows_NT)
if not exist "package" mkdir "package"
if not exist "package/include" mkdir "package/include"
if not exist "package/lib" mkdir "package/lib"
cp target/release/wasmer_c_api.dll package/lib/wasmer.dll
cp target/release/wasmer_c_api.lib package/lib/wasmer.lib
copy ".\target\release\wasmer_c_api.dll" ".\package\lib\wasmer.dll"
copy ".\target\release\wasmer_c_api.lib" ".\package\lib\wasmer.lib"
copy ".\lib\c-api\wasmer.h" ".\package\include"
copy ".\lib\c-api\wasmer.hh" ".\package\include"
copy ".\lib\c-api\doc\index.md" ".\package\include\README.md"
else
mkdir -p "package/include"
mkdir -p "package/lib"
cp lib/c-api/wasmer.h package/include
cp lib/c-api/wasmer.hh package/include
cp lib/c-api/doc/index.md package/include/README.md
ifeq ($(UNAME_S), Darwin)
cp target/release/libwasmer_c_api.dylib package/lib/libwasmer.dylib
cp target/release/libwasmer_c_api.a package/lib/libwasmer.a
Expand All @@ -149,9 +155,6 @@ else
cp target/release/libwasmer_c_api.a package/lib/libwasmer.a
endif
endif
cp lib/c-api/wasmer.h package/include
cp lib/c-api/wasmer.hh package/include
cp lib/c-api/doc/index.md package/include/README.md

package-docs: build-docs build-docs-capi
ifeq ($(OS), Windows_NT)
Expand All @@ -167,11 +170,13 @@ endif
echo '<!-- Build $(SOURCE_VERSION) --><meta http-equiv="refresh" content="0; url=wasmer_runtime/index.html">' > package/docs/crates/index.html

package: package-wasmer package-capi
cp LICENSE package/LICENSE
cp ATTRIBUTIONS.md package/ATTRIBUTIONS
ifeq ($(OS), Windows_NT)
iscc wasmer.iss
copy ".\LICENSE" ".\package\LICENSE"
copy ".\ATTRIBUTIONS.md" ".\package\ATTRIBUTIONS"
cd src\windows-installer && iscc wasmer.iss
else
cp LICENSE package/LICENSE
cp ATTRIBUTIONS.md package/ATTRIBUTIONS
tar -C package -zcvf wasmer.tar.gz bin lib include LICENSE ATTRIBUTIONS
endif

Expand Down
7 changes: 5 additions & 2 deletions src/windows-installer/wasmer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ Root: HKCU; Subkey: "Environment"; ValueType:string; ValueName: "WASMER_CACHE_DI
ValueData: "{%USERPROFILE}\.wasmer\cache"; Flags: preservestringtype

[Files]
Source: "..\..\target\release\wasmer.exe"; DestDir: "{app}\bin"
Source: "..\..\wapm-cli\target\release\wapm.exe"; DestDir: "{app}\bin"
Source: "..\..\package\bin\*"; DestDir: "{app}\bin"
Source: "..\..\package\include\*"; DestDir: "{app}\include"
Source: "..\..\package\lib\*"; DestDir: "{app}\lib"
Source: "..\..\package\LICENSE"; DestDir: "{app}"
Source: "..\..\package\ATTRIBUTIONS"; DestDir: "{app}"
Source: "wax.cmd"; DestDir: "{app}\bin"

[Dirs]
Expand Down

0 comments on commit 09cc8e4

Please sign in to comment.