Skip to content

Commit

Permalink
[73_31] xmake: fix Info.plist codesign
Browse files Browse the repository at this point in the history
## What
+ Postpone codesign to `research_packager` xmake target to fix
Info.plist codesign
+ Improve Info.plist.in

## Why
Info.plist is not codesigned.

## How to test your changes?
```
xmake config -m release
xmake b research
xmake i research
xmake i research_packager

cp TeXmacs/tests/tm/73_31.tm $HOME/Documents
cp TeXmacs/tests/PDF/73_31.pdf $HOME/Documents
```
Manually install the generated dmg, and test the dmg on
`$HOME/Documents/71_31.tm`
  • Loading branch information
da-liii authored Apr 2, 2024
1 parent 4e73e54 commit 44af941
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
Binary file added TeXmacs/tests/PDF/73_31.pdf
Binary file not shown.
13 changes: 13 additions & 0 deletions TeXmacs/tests/tm/73_31.tm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<TeXmacs|2.1.2>

<style|generic>

<\body>
<image|73_31.pdf|0.5par|||>
</body>

<\initial>
<\collection>
<associate|page-medium|paper>
</collection>
</initial>
16 changes: 6 additions & 10 deletions packages/macos/Info.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<string>en</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
Expand All @@ -24,28 +24,24 @@
<true/>
</dict>
</array>
<key>CFBundleDisplayName</key>
<string>MoganResearch</string>
<key>CFBundleExecutable</key>
<string>MoganResearch</string>
<key>CFBundleName</key>
<string>MoganResearch</string>
<key>CFBundleIconFile</key>
<string>new-mogan</string>
<key>CFBundleIdentifier</key>
<string>app.mogan.research</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>TeXmacs</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>@XMACS_VERSION@</string>
<key>CFBundleVersion</key>
<string>@XMACS_VERSION@</string>
<key>SUFeedURL</key>
<string>@APPCAST@</string>
<key>SUEnableAutomaticChecks</key>
<false/>
<key>CFBundleSignature</key>
<string>TXMC</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
Expand All @@ -59,6 +55,6 @@
<key>NSRequiresAquaSystemAppearance</key>
<string>true</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 1998-2023 Joris van der Hoeven and others</string>
<string>Copyright © 2022-2024 Mogan Developers</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion xmake/research.lua
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ function add_target_research_on_others()
os.rm(app_dir .. "Contents/Frameworks/QtQmlModels.framework")
os.rm(app_dir .. "Contents/Frameworks/QtQml.framework")
os.rm(app_dir .. "Contents/Frameworks/QtQuick.framework")
os.execv("codesign", {"--force", "--deep", "--sign", "-", app_dir})
end
end)

Expand Down Expand Up @@ -326,6 +325,7 @@ target("research_packager") do
after_install(function (target, opt)
local app_dir = target:installdir() .. "/../../"
os.cp("$(buildir)/Info.plist", app_dir .. "/Contents")
os.execv("codesign", {"--force", "--deep", "--sign", "-", app_dir})
os.execv("hdiutil create $(buildir)/" .. dmg_name .. " -fs HFS+ -srcfolder " .. app_dir)
end)
end

0 comments on commit 44af941

Please sign in to comment.