Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions mapillary_tools_folder.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# -*- mode: python ; coding: utf-8 -*-


block_cipher = None


a = Analysis(["./pyinstaller/main.py"],
pathex=[SPECPATH],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name='mapillary_tools',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='mapillary_tools_folder')
22 changes: 22 additions & 0 deletions script/build_linux
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ mkdir -p dist
rm -rf dist/${OS}
pyinstaller --version
pyinstaller --noconfirm --distpath dist/${OS} mapillary_tools.spec
pyinstaller --noconfirm --distpath dist/${OS} mapillary_tools_folder.spec

# check
SOURCE=dist/${OS}/mapillary_tools
Expand All @@ -28,5 +29,26 @@ cd dist/releases
shasum -a256 "$TARGET_BASENAME" | tee "${TARGET_BASENAME}.sha256.txt"
cd ../../

# check
FOLDER=dist/${OS}/mapillary_tools_folder
SOURCE=dist/${OS}/mapillary_tools_folder/mapillary_tools
$SOURCE --version
VERSION=$($SOURCE --version | awk '{print $3}')
ARCH=$(uname -m)
TARGET=dist/releases/mapillary_tools-folder-${VERSION}-${OS}-${ARCH}

# package
mkdir -p dist/releases
cd dist/${OS}/
zip -r ../../"$TARGET" mapillary_tools_folder
cd ../../

# sha256
TARGET_BASENAME=$(basename "$TARGET")
# to produce "HASH mapillary_tools" instead of "HASH dist/releases/mapillary_tools"
cd dist/releases
shasum -a256 "$TARGET_BASENAME" | tee "${TARGET_BASENAME}.sha256.txt"
cd ../../

# summary
ls -l dist/releases
22 changes: 22 additions & 0 deletions script/build_osx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ mkdir -p dist
rm -rf dist/${OS}
pyinstaller --version
pyinstaller --noconfirm --distpath dist/${OS} mapillary_tools.spec
pyinstaller --noconfirm --distpath dist/${OS} mapillary_tools_folder.spec

# check
SOURCE=dist/${OS}/mapillary_tools.app/Contents/MacOS/mapillary_tools
Expand All @@ -28,5 +29,26 @@ cd dist/releases
shasum -a256 "$TARGET_BASENAME" | tee "${TARGET_BASENAME}.sha256.txt"
cd ../../

# check
FOLDER=dist/${OS}/mapillary_tools_folder
SOURCE=dist/${OS}/mapillary_tools_folder/mapillary_tools
$SOURCE --version
VERSION=$($SOURCE --version | awk '{print $3}')
ARCH=$(uname -m)
TARGET=dist/releases/mapillary_tools-folder-${VERSION}-${OS}-${ARCH}.zip

# package
mkdir -p dist/releases
cd dist/${OS}/
zip -r ../../"$TARGET" mapillary_tools_folder
cd ../../

# sha256
TARGET_BASENAME=$(basename "$TARGET")
# to produce "HASH mapillary_tools" instead of "HASH dist/releases/mapillary_tools"
cd dist/releases
shasum -a256 "$TARGET_BASENAME" | tee "${TARGET_BASENAME}.sha256.txt"
cd ../../

# summary
ls -l dist/releases
18 changes: 18 additions & 0 deletions script/build_win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ if ($MAXSIZE32 -ceq "True") {
mkdir -Force dist
pyinstaller --version
pyinstaller --noconfirm --distpath dist\win mapillary_tools.spec
pyinstaller --noconfirm --distpath dist\win mapillary_tools_folder.spec

# check
$SOURCE="dist\win\mapillary_tools.exe"
Expand All @@ -29,5 +30,22 @@ Copy-Item "$SOURCE" "$TARGET"
# sha256
Get-FileHash $TARGET -Algorithm SHA256 | Select-Object Hash > "$TARGET.sha256.txt"

# check
$FOLDER="dist\win\mapillary_tools_folder"
$SOURCE="dist\win\mapillary_tools_folder\mapillary_tools.exe"
dist\win\mapillary_tools_folder\mapillary_tools.exe --version
$VERSION_OUTPUT=dist\win\mapillary_tools_folder\mapillary_tools.exe --version
$VERSION=$VERSION_OUTPUT.split(' ')[2]
$TARGET="dist\releases\mapillary_tools-folder-$VERSION-$OS-$ARCH.zip"

# package
mkdir -Force dist\releases
cd dist\win
Compress-Archive -Path mapillary_tools_folder -DestinationPath ..\..\"$TARGET"
cd ..\..\

# sha256
Get-FileHash $TARGET -Algorithm SHA256 | Select-Object Hash > "$TARGET.sha256.txt"

# summary
Get-ChildItem dist\releases
Loading