-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
tpeulen
committed
Sep 20, 2024
1 parent
48b6a85
commit 259150f
Showing
6 changed files
with
102 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,47 @@ | ||
@echo off | ||
set "CONDA_ENVIRONMENT_YAML=..\..\environment.yml" | ||
set "DIST_PATH=..\..\dist" | ||
set "SCRIPT_PATH=%~dp0" | ||
set "APP_PATH=..\..\dist\win" | ||
set "SOURCE_PATH=..\..\" | ||
set "SOURCE_PATH=..\.." | ||
set "CONDA_RECIPE_FOLDER=..\..\conda-recipe" | ||
|
||
rem Assume that conda-build jinja2 pysftp are already installed | ||
rem call conda install -y conda-build jinja2 pysftp | ||
rem call conda build %CONDA_RECIPE_FOLDER% | ||
rem Default behavior: Do not build conda package | ||
set "BUILD_CONDA_PACKAGE=0" | ||
|
||
rem Check for command-line arguments | ||
if /I "%1"=="/build" ( | ||
set "BUILD_CONDA_PACKAGE=1" | ||
) | ||
|
||
rem If /build flag is passed, build the Conda package | ||
if %BUILD_CONDA_PACKAGE%==1 ( | ||
echo Building Conda package... | ||
call conda mambabuild %CONDA_RECIPE_FOLDER% | ||
) else ( | ||
echo Skipping Conda package build... | ||
) | ||
|
||
rem Create necessary directories | ||
md %DIST_PATH% | ||
md %APP_PATH% | ||
|
||
rem Create the conda environment | ||
call mamba create -y --prefix %APP_PATH% chisurf -c local -c tpeulen --force | ||
rem call conda activate %APP_PATH% | ||
|
||
REM write setup.iss | ||
rem call conda activate %APP_PATH% | ||
rem Generate Inno Setup script | ||
python make_inno_setup.py | ||
|
||
rem Optionally deactivate conda environment | ||
rem call conda deactivate | ||
rem call conda activate base | ||
|
||
REM Create an Installer with Inno Setup | ||
"C:\Program Files (x86)\Inno Setup 5\Compil32.exe" /cc setup.iss | ||
rem Create an installer with Inno Setup | ||
"C:\Program Files (x86)\Inno Setup 6\Compil32.exe" /cc setup.iss | ||
|
||
rem Cleaning step: Purge the APP_PATH folder | ||
echo Cleaning up APP_PATH: %APP_PATH%... | ||
rmdir /s /q %APP_PATH% | ||
|
||
echo Script finished. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters