-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/computational-cell-analyt…
…ics/micro-sam into bioengine
- Loading branch information
Showing
7 changed files
with
2,412 additions
and
917 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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: micro_sam | ||
version: 0.0.1 | ||
license_file: ../LICENSE | ||
installer_type: pkg #[osx] # This will trigger pkg build on Mac Os. On windows and linux, native build will be done and this has no effect. | ||
environment: __MICROSAM_BUILD_ENV__ | ||
welcome_image: ../doc/logo/logo.png | ||
header_image: ../doc/logo/logo.png | ||
icon_image: ../doc/logo/logo.png | ||
channels: | ||
- conda-forge | ||
welcome_text: Install Segment Anything for Microscopy. | ||
conclusion_text: Segment Anything for Microscopy has been installed. | ||
initialize_by_default: false | ||
post_install: post_install.bat |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
@echo off | ||
|
||
rem This script searches for the 'freetype.dll' file within a specific directory | ||
rem and attempts to move it to the target directory during post-installation on Windows. | ||
rem If not found locally, it downloads the DLL from a defined URL. | ||
|
||
|
||
rem Define download URL (replace with the actual URL for your desired version) | ||
set DOWNLOAD_URL=https://raw.githubusercontent.com/ubawurinna/freetype-windows-binaries/master/release%20dll/win64/freetype.dll | ||
|
||
rem Define target directory within the installation prefix | ||
set TARGET_DIR=%PREFIX%\Scripts | ||
|
||
rem Create the target directory if it doesn't exist | ||
if not exist "%TARGET_DIR%" mkdir "%TARGET_DIR%" | ||
|
||
rem Search for freetype.dll in specific directory (adjust path as needed) | ||
for /F "tokens=*" %%a in ('dir /S /B "%PREFIX%\Library\freetype.dll"') do ( | ||
if exist "%%a" ( | ||
echo Found freetype.dll in %%a | ||
move "%%a" "%TARGET_DIR%" | ||
if exist "%TARGET_DIR%\freetype.dll" ( | ||
echo Moved freetype.dll to %TARGET_DIR% | ||
exit /b 0 ; Exit script with success code if moved | ||
) else ( | ||
echo Error: Failed to move freetype.dll (check permissions) | ||
exit /b 1 ; Exit script with error code | ||
) | ||
) | ||
) | ||
|
||
rem If not found in specific location, proceed with download | ||
powershell -ExecutionPolicy Bypass -Command Invoke-WebRequest -Uri %DOWNLOAD_URL% -OutFile "%TARGET_DIR%\freetype.dll" | ||
|
||
if exist "%TARGET_DIR%\freetype.dll" ( | ||
echo Downloaded freetype.dll to %TARGET_DIR% | ||
) else ( | ||
echo Error downloading freetype.dll | ||
rem Attempt to download the DLL again (optional) | ||
powershell -ExecutionPolicy Bypass -Command Invoke-WebRequest -Uri %DOWNLOAD_URL% -OutFile "%TARGET_DIR%\freetype.dll" | ||
if exist "%TARGET_DIR%\freetype.dll" ( | ||
echo Retry: Downloaded freetype.dll to %TARGET_DIR% | ||
) else ( | ||
echo Error: Failed to download freetype.dll even after retry | ||
exit /b 1 ; Exit script with error code after retries | ||
) | ||
) | ||
|
||
exit /b 0 ; Exit script with success code (after download if necessary) |
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
Oops, something went wrong.