File tree Expand file tree Collapse file tree 6 files changed +143
-13
lines changed Expand file tree Collapse file tree 6 files changed +143
-13
lines changed Original file line number Diff line number Diff line change
1
+ @ echo off
2
+
3
+ set " SCRIPT_DIR = %~dp0 "
4
+ set " EXECUTION_DIR = %cd% "
5
+
6
+ call " %SCRIPT_DIR% find-bash.cmd"
7
+
8
+ call set " PATH = %% SCRIPT_DIR:%EXECUTION_DIR% =%% "
9
+ call set " LINUX_PATH = %PATH:\ =/ % "
10
+
11
+ %BASH% -c " ./%LINUX_PATH% /download-configure.sh"
Original file line number Diff line number Diff line change
1
+ # /bin/bash
2
+ set -e
3
+
4
+ download_release ()
5
+ {
6
+ local project=$1
7
+ local release=$2
8
+ local file=$3
9
+
10
+ echo " Downloading $file from release $release of $project "
11
+
12
+ curl -sS -L " https://github.com/ImageMagick/$project /releases/download/$release /$file " -o " $file "
13
+ }
14
+
15
+ download_configure ()
16
+ {
17
+ local version=$1
18
+
19
+ mkdir -p " Configure"
20
+ cd " Configure"
21
+
22
+ download_release " Configure" " $version " " Configure.Release.x64.exe"
23
+ download_release " Configure" " $version " " Configure.Release.arm64.exe"
24
+ download_release " Configure" " $version " " Configure.Release.x86.exe"
25
+ download_release " Configure" " $version " " files.zip"
26
+ unzip -o " files.zip" && rm " files.zip"
27
+
28
+ cd ..
29
+ }
30
+
31
+ download_configure " 2025.07.15.0637"
Original file line number Diff line number Diff line change
1
+ @ echo off
2
+
3
+ set " SCRIPT_DIR = %~dp0 "
4
+ set " EXECUTION_DIR = %cd% "
5
+
6
+ call " %SCRIPT_DIR% find-bash.cmd"
7
+
8
+ call set " PATH = %% SCRIPT_DIR:%EXECUTION_DIR% =%% "
9
+ call set " LINUX_PATH = %PATH:\ =/ % "
10
+
11
+ %BASH% -c " ./%LINUX_PATH% /download-dependencies.sh --dependencies-artifact %1 "
Original file line number Diff line number Diff line change
1
+ # /bin/bash
2
+ set -e
3
+
4
+ download_release ()
5
+ {
6
+ local project=$1
7
+ local release=$2
8
+ local file=$3
9
+
10
+ echo " Downloading $file from release $release of $project "
11
+
12
+ curl -sS -L " https://github.com/ImageMagick/$project /releases/download/$release /$file " -o " $file "
13
+ }
14
+
15
+ download_dependencies ()
16
+ {
17
+ local version=$1
18
+ local artifact=$2
19
+
20
+ mkdir -p " Dependencies"
21
+ cd " Dependencies"
22
+
23
+ download_release " Dependencies" " $version " " $artifact "
24
+ unzip -o " $artifact " -d " ../Artifacts" || {
25
+ exit_code=$?
26
+ if [[ $exit_code -ne 0 && $exit_code -ne 1 ]]; then
27
+ echo " Unzip failed with exit code $exit_code "
28
+ exit $exit_code
29
+ fi
30
+ }
31
+
32
+ cd ..
33
+ }
34
+
35
+ dependenciesArtifact=" "
36
+
37
+ while [[ $# -gt 0 ]]; do
38
+ case $1 in
39
+ --dependencies-artifact)
40
+ dependenciesArtifact=" $2 "
41
+ shift 2
42
+ ;;
43
+ * )
44
+ echo " Unknown option: $1 "
45
+ exit 1
46
+ ;;
47
+ esac
48
+ done
49
+
50
+ if [[ -z " $dependenciesArtifact " ]]; then
51
+ echo " Error: The --dependencies-artifact option is required."
52
+ exit 1
53
+ fi
54
+
55
+ download_dependencies " 2025.07.15.2108" " $dependenciesArtifact "
Original file line number Diff line number Diff line change
1
+ set BASH = " %PROGRAMFILES% \Git\bin\bash.exe"
2
+ if exist %BASH% goto EXECUTE
3
+
4
+ set BASH = " %PROGRAMFILES(x86)% \Git\bin\bash.exe"
5
+ if exist %BASH% goto EXECUTE
6
+
7
+ set BASH = " %ProgramW6432% \Git\bin\bash.exe"
8
+ if exist %BASH% goto EXECUTE
9
+
10
+ set BASH = " %USERPROFILE% \scoop\apps\git\current\bin\bash.exe"
11
+ if exist %BASH% goto EXECUTE
12
+
13
+ for /F " tokens=*" %%g in ('where bash') do (SET BASH=%%g )
14
+ if exist %BASH% goto EXECUTE
15
+
16
+ echo Failed to find bash.exe
17
+ echo %BASH%
18
+ exit /b 1
19
+
20
+ :EXECUTE
Original file line number Diff line number Diff line change @@ -73,38 +73,40 @@ jobs:
73
73
make install
74
74
75
75
build_windows :
76
- name : Build Windows
76
+ name : Build Windows ${{matrix.architecture}}
77
77
runs-on : windows-2022
78
78
79
+ strategy :
80
+ fail-fast : false
81
+ matrix :
82
+ architecture : [ x64, x86 ]
83
+
79
84
steps :
80
85
- uses : actions/checkout@v4
81
86
with :
82
87
path : ImageMagick
83
88
84
- - uses : actions/checkout@v4
85
- with :
86
- repository : ImageMagick/ImageMagick-Windows
87
- path : ImageMagick-Windows
88
- ref : refs/heads/main
89
+ - name : Download configure
90
+ shell : cmd
91
+ run : |
92
+ ImageMagick\.github\build\windows\download-configure.cmd
89
93
90
- - name : Clone repositories
94
+ - name : Download dependencies
91
95
shell : cmd
92
96
run : |
93
- cd ImageMagick-Windows
94
- CloneRepositories.IM6.cmd
97
+ ImageMagick\.github\build\windows\download-dependencies.cmd windows-${{matrix.architecture}}-static-openMP.zip
95
98
96
99
- name : Configure ImageMagick
97
100
shell : cmd
101
+ working-directory : Configure
98
102
run : |
99
- cd ImageMagick-Windows\Configure
100
- Configure.Release.x64.exe /noWizard /VS2022 /x64 /smtd
103
+ Configure.Release.x64.exe /noWizard /VS2022 /${{matrix.architecture}} /static
101
104
102
105
- name : Build ImageMagick
103
106
shell : cmd
104
107
run : |
105
108
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
106
- cd ImageMagick-Windows
107
- msbuild IM6.StaticDLL.x64.sln /m /t:Rebuild /p:Configuration=Release,Platform=x64
109
+ msbuild IM6.StaticDLL.${{matrix.architecture}}.sln /m /t:Rebuild /p:Configuration=Release,Platform=x64
108
110
109
111
build_msys2 :
110
112
name : Build MSYS2
You can’t perform that action at this time.
0 commit comments