Skip to content

Commit d72cff1

Browse files
committed
Fix: Improve batch file robustness for restricted environments
1 parent 3d9fc82 commit d72cff1

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Insta360Convert GUI v2.2.1
1+
# Insta360Convert GUI v2.2.2
22

33
**Insta360Convert GUI** is a user-friendly desktop application designed to extract multiple defined perspective views (defined by pitch, yaw, and Field of View) from 360° equirectangular videos and export them as video clips or image sequences. It's a versatile tool for photogrammetry, VR content creation, visual effects, and various other video production workflows. This application supports English and Japanese user interfaces.
44

55
**⚠️ Important Prerequisites: This application requires Python (3.9 or newer) and FFmpeg to be installed on your system, along with Tkinter (8.6 or newer, usually included with Python). Please see the "Requirements" section below for details.**
66

77
**[日本語]**
8-
**Insta360Convert GUI v2.2.1** は、360°動画 (エクイレクタングラー形式)から、指定した複数の視点(ピッチ角、ヨー角、視野角)を切り出して、動画または静止画シーケンスとして出力するためのGUIアプリケーションです。フォトグラメトリやVRコンテンツ制作、映像作品の素材作成など、幅広い用途にご利用いただけます。本アプリケーションは日本語と英語のユーザーインターフェースに対応しています。
8+
**Insta360Convert GUI v2.2.2** は、360°動画 (エクイレクタングラー形式)から、指定した複数の視点(ピッチ角、ヨー角、視野角)を切り出して、動画または静止画シーケンスとして出力するためのGUIアプリケーションです。フォトグラメトリやVRコンテンツ制作、映像作品の素材作成など、幅広い用途にご利用いただけます。本アプリケーションは日本語と英語のユーザーインターフェースに対応しています。
99

1010
**⚠️ 事前の重要事項: このアプリケーションを使用するには、お使いのシステムに Python (3.9 以降) と FFmpeg がインストールされており、Tkinter (8.6 以降、通常Pythonに同梱) が利用可能である必要があります。詳細は下記の「1. 準備するもの」セクションをご覧ください。**
1111

constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
APP_VERSION_MAJOR = 2
88
APP_VERSION_MINOR = 2
9-
APP_VERSION_PATCH = 1
9+
APP_VERSION_PATCH = 2
1010
APP_VERSION_STRING_SEMVER = f"v{APP_VERSION_MAJOR}.{APP_VERSION_MINOR}.{APP_VERSION_PATCH}"
1111

1212
# --- FFmpeg関連定数 ---

insta360convert.bat

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,39 @@ REM Set the console code page to UTF-8 to prevent issues with non-ASCII characte
33
chcp 65001 > nul
44

55
REM Change the current directory to the location of this batch file.
6-
REM This ensures that the script can correctly find any relative files (e.g., config files, other scripts).
76
cd /d "%~dp0"
87

9-
REM --- Auto-detect and execute Python environment ---
8+
REM --- Auto-detect and execute Python environment (most robust method) ---
109

11-
REM Priority 1: Try the Python Launcher (py.exe). This is the best method.
12-
where py >nul 2>nul
10+
REM Attempt 1: Try the official Python Launcher with the -w flag.
11+
REM This is the most ideal method. We directly attempt execution and check the result.
12+
REM Error output is redirected to nul to hide "Unknown option: -w" on misconfigured systems.
13+
(py -w insta360convert.py) >nul 2>nul
1314
if %errorlevel% == 0 (
14-
py -w insta360convert.py
1515
exit /b
1616
)
1717

18-
REM Priority 2: Try python.exe. This covers the Microsoft Store version.
19-
where python >nul 2>nul
18+
REM Attempt 2: If the launcher fails, try pyw.exe directly.
19+
REM This is specific to full installations from python.org and is very reliable for GUIs.
20+
where pyw >nul 2>nul
2021
if %errorlevel% == 0 (
21-
REM Use "start /min" to launch in a new, minimized console, allowing this batch file to exit immediately.
22-
start "Insta360Convert GUI" /min python insta360convert.py
22+
start "" pyw insta360convert.py
2323
exit /b
2424
)
2525

26-
REM Priority 3: Fallback to pyw.exe directly.
27-
where pyw >nul 2>nul
26+
REM Attempt 3: If both fail, try python.exe.
27+
REM This covers the Microsoft Store version and basic PATH setups.
28+
REM "start /min" launches it in a new, minimized console window.
29+
where python >nul 2>nul
2830
if %errorlevel% == 0 (
29-
start "" pyw insta360convert.py
31+
start "Insta360Convert GUI" /min python insta360convert.py
3032
exit /b
3133
)
3234

3335
REM --- Error handling if no Python executable was found ---
3436
echo.
3537
echo =================================================================
36-
echo Error: Could not find a Python installation.
38+
echo Error: Could not find a working Python installation.
3739
echo.
3840
echo This program requires Python to run.
3941
echo Please install it from the Microsoft Store or python.org.

0 commit comments

Comments
 (0)