refactor makefile

This commit is contained in:
Hiddify
2024-01-26 14:30:36 +01:00
parent 91cf647894
commit 54ac3b3629
2 changed files with 3 additions and 59 deletions

View File

@@ -154,6 +154,7 @@ release: # Create a new tag for release.
git add ios/Runner.xcodeproj/project.pbxproj pubspec.yaml&& \
git commit -m "release: version $${TAG}" && \
echo "creating git tag : v$${TAG}" && \
git push && \
git tag v$${TAG} && \
git push -u origin HEAD --tags && \
echo "Github Actions will detect the new tag and release the new version."'
@@ -161,65 +162,8 @@ release: # Create a new tag for release.
ios-temp-prepare:
flutter upgrade
flutter clean
# flutter pub upgrade
make prepare platform=ios
# make get-geo-assets
# make get
# make gen
# make translate
flutter build ios-framework
cd ios
pod install
cd ..
flutter run
#Link the built App and Flutter and url_launcher_ios frameworks (or all created frameworks? i dunno, but i tried) from Release folder to Xcode project in Runner targets Build Phases as Linked
#change ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to $(inherited)
#also add $(inherited) as 1st option to OTHER_LDFLAGS (Other Linker Flags)
#add $(PROJECT_DIR)/Flutter/$(CONFIGURATION) to framework search path as 2nd
#in Runner target go to Build Phases in Copy Bundle Resources section remove Runner.app
# right click on Runner.xcodeproj click on Show Package Content open project.pbxproj replace
#Flutter/Release/App.xcframework
#Flutter/Release/Flutter.xcframework
# Flutter/Release/url_launcher_ios.xcframework
# with
# "Flutter/$(CONFIGURATION)/App.xcframework"
# "Flutter/$(CONFIGURATION)/Flutter.xcframework"
# "Flutter/$(CONFIGURATION)/url_launcher_ios.xcframework"
# (if you added all frameworks, you should do this pattern for all of them too, you need this step to be able to run on simulators)
# done remove # GeneratedPluginRegistrant.h # GeneratedPluginRegistrant.m # from Runner folder and add newly generated ones from build/ios/framework folder to Xcode and also check the copy box
# done in pod file # remove comment from line 2 and change it to # platform :ios, '12.1' # and add
# target.build_configurations.each do |config|
# config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.1'
# end
# before 1st end in post_install function
# add
# -fcxx-modules
# to
# OTHER_CPLUSPLUSFLAGS
# in Build Settings
# as 1st option
# flutter upgrade
# flutter pub upgrade
# cd ios
# pod install
# (note: i removed group and network extensions from targets to be able to build with free account)
# now build
# it will build (even on simulator)
# but for some not known reason, it will not run for me on my device and will refuse to install on simulator, maybe because the removed extensions? i dunno
# even now it can be an arsehole and return failed with exit code 1 so dont panic