@@ -153,7 +153,7 @@ def save_workflow(path, steps, opts: Opts, githubdata: GithubData):
153
153
154
154
main ['steps' ] = steps
155
155
156
- data = {"name" :"main" , "on" :on_ }
156
+ data = {"name" :opts . workflow_name , "on" :on_ }
157
157
158
158
if opts .msys2_msystem :
159
159
data ["env" ] = {
@@ -617,12 +617,18 @@ def kwarg_value(kwargs, *names):
617
617
if value is not None :
618
618
return value
619
619
620
+ def use_7z (ctx , opts ):
621
+ opts .env_path .append ('C:\\ Program Files\\ 7-Zip' )
620
622
621
- def macro_unzip (name , args , kwargs , ret , opts : Opts , ctx : Ctx , githubdata : GithubData ):
623
+ def use_cmake (ctx , opts ):
624
+ opts .env_path .append ('C:\\ Program Files\\ CMake\\ bin' )
625
+
626
+ def use_ninja (ctx , opts ):
627
+ pass
622
628
623
- if not ctx .github :
624
- opts .env_path .append ('C:\\ Program Files\\ 7-Zip' )
629
+ def macro_unzip (name , args , kwargs , ret , opts : Opts , ctx : Ctx , githubdata : GithubData ):
625
630
631
+ use_7z (ctx , opts )
626
632
src = args [0 ]
627
633
628
634
if len (args ) == 2 :
@@ -652,8 +658,7 @@ def macro_unzip(name, args, kwargs, ret, opts: Opts, ctx: Ctx, githubdata: Githu
652
658
653
659
def macro_zip (name , args , kwargs , ret , opts : Opts , ctx : Ctx , githubdata : GithubData ):
654
660
655
- if not ctx .github :
656
- opts .env_path .append ('C:\\ Program Files\\ 7-Zip' )
661
+ use_7z (ctx , opts )
657
662
658
663
COMPRESSION_MODE = {
659
664
"-mx0" : "copy" ,
@@ -1097,7 +1102,7 @@ def macro_use(name, args, kwargs, ret, opts: Opts, ctx: Ctx, githubdata: GithubD
1097
1102
opts .env_path .append ('C:\\ mysql-{}-winx64\\ bin' .format (ver ))
1098
1103
opts .env_path .append ('C:\\ mysql-{}-winx64\\ lib' .format (ver ))
1099
1104
elif app == '7z' :
1100
- opts . env_path . append ( 'C: \\ Program Files \\ 7-Zip' )
1105
+ use_7z ( ctx , opts )
1101
1106
elif app == 'git' :
1102
1107
opts .env_path .append ('C:\\ Program Files\\ Git\\ cmd' )
1103
1108
elif app == 'sed' :
@@ -1107,36 +1112,9 @@ def macro_use(name, args, kwargs, ret, opts: Opts, ctx: Ctx, githubdata: GithubD
1107
1112
elif app == 'perl' :
1108
1113
opts .env_path .append ('C:\\ Strawberry\\ perl\\ bin' )
1109
1114
elif app == 'cmake' :
1110
- if not ctx .github :
1111
- opts .env_path .append ('C:\\ Program Files\\ CMake\\ bin' )
1115
+ use_cmake (ctx , opts )
1112
1116
elif app == 'ninja' :
1113
- if ctx .github :
1114
- opts .env_path .append ('C:\\ Program Files\\ Microsoft Visual Studio\\ 2022\\ Enterprise\\ Common7\\ IDE\\ CommonExtensions\\ Microsoft\\ CMake\\ Ninja' )
1115
- opts .env_path .append ('C:\\ Program Files (x86)\\ Android\\ android-sdk\\ cmake\\ 3.22.1\\ bin' )
1116
- else :
1117
- opts .env_path .append ('C:\\ Program Files\\ Meson' )
1118
- elif app == 'mingw' :
1119
- if ver in ['5' , '5.4.0' , '540_32' ]:
1120
- opts .env_path .append ('C:\\ mingw540_32\\ bin' )
1121
- elif ver in ['8' , '8.1.0' , '810_64' ]:
1122
- opts .env_path .append ('C:\\ Qt\\ Tools\\ mingw810_64\\ bin' )
1123
- elif ver in ['11' , '11.2.0' , '1120_64' ]:
1124
- opts .env_path .append ('C:\\ mingw1120_64\\ bin' )
1125
- else :
1126
- raise ValueError ("use not implemented for {} {}" .format (app , ver ))
1127
- elif app == 'qt' :
1128
- if ver == '6' :
1129
- ver = '6.7.1'
1130
- elif ver == '5' :
1131
- ver = '5.15.2'
1132
- elif ver == '4' :
1133
- ver = '4.8.7'
1134
- if ver .startswith ('6.' ):
1135
- opts .env_path .append ('C:\\ Qt\\ {}\\ mingw1120_64\\ bin' .format (ver ))
1136
- elif ver .startswith ('5.' ):
1137
- opts .env_path .append ('C:\\ Qt\\ {}\\ mingw81_64\\ bin' .format (ver ))
1138
- elif ver .startswith ('4.' ):
1139
- opts .env_path .append ('C:\\ Qt-{}\\ bin' .format (ver ))
1117
+ use_ninja (ctx , opts )
1140
1118
elif app == 'msys' :
1141
1119
if ver is None :
1142
1120
ver = 'ucrt64'
0 commit comments