Compare commits

...

10 Commits

Author SHA1 Message Date
Tom Rothamel 0b8bf87eaf doc: Fix changelog and update credits. 2019-09-26 20:12:56 -04:00
Tom Rothamel 857d776538 Remove information about mac signing.
It's best done with renpy/mac-notarization, rather than the
current system.
2019-09-26 18:33:29 -04:00
Tom Rothamel df51f5233f Finish notarization of Ren'Py.
This includes the notarization of the DMG that Ren'Py is
distributed with.
2019-09-24 20:50:50 -04:00
Tom Rothamel aed2625486 Merge pull request #2004 from uyjulian/avoid_spam_threading
Join previous autosave thread before spawning a new one
2019-09-24 01:58:56 -04:00
uyjulian 47271b7af9 Join previous autosave thread before spawning a new one 2019-09-24 00:53:54 -05:00
Tom Rothamel d8050e9f5d Use a tarball for notarization.
Turns out that a .zip can't really represent the extended
attributes used for signing some files properly, but the
tar format can. So we use that to ship things over, and
get a working .dmg.
2019-09-24 01:17:34 -04:00
Tom Rothamel b639171118 Scripts for notarizing Ren'Py. 2019-09-23 22:14:46 -04:00
Tom Rothamel 25e66d3150 More mac codesigning improvements.
* Do not sign the dmg.
* Fix giving the path to the entitlements.
2019-09-21 15:34:41 -04:00
Tom Rothamel dcaa97a70e Improve support for codesigning with entitlements. 2019-09-21 01:08:46 -04:00
Tom Rothamel e0fd8dc4d5 Update changelog and credits. 2019-09-20 00:08:04 -04:00
11 changed files with 165 additions and 38 deletions
+25 -3
View File
@@ -52,8 +52,9 @@ def main():
ap.add_argument("--pygame", action="store", default=None)
ap.add_argument("--no-rapt", action="store_true")
ap.add_argument("--variant", action="store")
ap.add_argument("--sign", action="store_true", default=False)
ap.add_argument("--sign", action="store_true", default=True)
ap.add_argument("--nosign", action="store_false", dest="sign")
ap.add_argument("--notarized", action="store_true", dest="notarized")
ap.add_argument("--vc-version-only", action="store_true")
args = ap.parse_args()
@@ -175,6 +176,12 @@ def main():
destination,
]
if args.notarized:
cmd.extend([
"--macapp",
"notarized/out",
])
print()
subprocess.check_call(cmd)
@@ -250,8 +257,23 @@ def main():
print()
# if not (args.fast or args.sign):
# print("For a final-ish release, remember to use --sign so we're signed on the mac.")
if args.sign and not args.notarized:
shutil.copy(sdk + ".tar.bz2", ROOT + "/notarized/in/renpy.tar.bz2")
print("Next steps:")
print()
print(" mac: ./scripts/notarize_app_1.sh")
print(" mac: ./scripts/notarize_app_2.sh")
print(" linux: ./distribute.py --notarized")
print()
elif args.sign and args.notarized:
print("Next steps:")
print()
print(" mac: ./scripts/notarize_dmg_1.sh", args.version)
print(" mac: ./scripts/notarize_dmg_2.sh", args.version)
print()
if __name__ == "__main__":
-6
View File
@@ -199,12 +199,6 @@ init python:
build.documentation('*.html')
build.documentation('*.txt')
## Set this to a string containing your Apple Developer ID Application
## to enable codesigning on the Mac. Be sure to change it to your own
## Apple-issued ID.
# define build.mac_identity = "Developer ID Application: Guy Shy (XHTE5H7Z42)"
## A Google Play license key is required to download expansion files and
## perform in-app purchases. It can be found on the "Services & APIs" page
+26 -12
View File
@@ -373,7 +373,7 @@ init python in distribute:
This manages the process of building distributions.
"""
def __init__(self, project, destination=None, reporter=None, packages=None, build_update=True, open_directory=False, noarchive=False, packagedest=None, report_success=True, scan=True):
def __init__(self, project, destination=None, reporter=None, packages=None, build_update=True, open_directory=False, noarchive=False, packagedest=None, report_success=True, scan=True, macapp=None):
"""
Distributes `project`.
@@ -404,6 +404,10 @@ init python in distribute:
`report_success`
If true, we report that the build succeeded.
`macapp`
If given, the path to a macapp that's used instead of
the macapp
"""
# A map from a package to a unique update version hash.
@@ -437,6 +441,9 @@ init python in distribute:
# Logfile.
self.log = open(self.temp_filename("distribute.txt"), "w")
# The path to the mac app.
self.macapp = macapp
# Start by scanning the project, to get the data and build
# dictionaries.
data = project.data
@@ -1059,6 +1066,9 @@ init python in distribute:
Signs the mac app contained in appzip.
"""
if self.macapp:
return self.rescan(fl, self.macapp)
identity = self.build.get('mac_identity', None)
if identity is None:
@@ -1094,6 +1104,7 @@ init python in distribute:
self.build["mac_codesign_command"],
identity=identity,
app=os.path.join(dn, self.app),
entitlements=os.path.join(config.gamedir, "entitlements.plist"),
)
# Rescan the signed app.
@@ -1109,7 +1120,7 @@ init python in distribute:
identity = self.build.get('mac_identity', None)
if identity is None:
raise Exception("Creating an unsigned DMG is not supported. Please set build.mac_identity.")
identity = ''
self.run(
_("Creating the Macintosh DMG..."),
@@ -1120,14 +1131,16 @@ init python in distribute:
dmg=dmg,
)
self.run(
_("Signing the Macintosh DMG..."),
self.build["mac_codesign_dmg_command"],
identity=identity,
volname=volname,
sourcedir=sourcedir,
dmg=dmg,
)
if self.build.get("mac_codesign_dmg_command", None):
self.run(
_("Signing the Macintosh DMG..."),
self.build["mac_codesign_dmg_command"],
identity=identity,
volname=volname,
sourcedir=sourcedir,
dmg=dmg,
)
def prepare_file_list(self, format, file_lists):
"""
@@ -1265,7 +1278,7 @@ init python in distribute:
file_hash, old_fl_hash = self.build_cache.get(full_filename, ("", ""))
if (not directory) and old_fl_hash == fl_hash:
if (not directory) and (old_fl_hash == fl_hash) and not(self.build['renpy'] and (variant == "sdk")):
if file_hash:
self.build_cache[full_filename] = (file_hash, fl_hash)
@@ -1476,6 +1489,7 @@ init python in distribute:
ap.add_argument("--no-update", default=True, action="store_false", dest="build_update", help="Prevents updates from being built.")
ap.add_argument("--package", action="append", help="If given, a package to build. Defaults to building all packages.")
ap.add_argument("--no-archive", action="store_true", help="If given, files will not be added to archives.")
ap.add_argument("--macapp", default=None, action="store", help="If given, the path to a signed and notarized mac app.")
ap.add_argument("project", help="The path to the project directory.")
args = ap.parse_args()
@@ -1487,7 +1501,7 @@ init python in distribute:
else:
packages = None
Distributor(p, destination=args.destination, reporter=TextReporter(), packages=packages, build_update=args.build_update, noarchive=args.no_archive, packagedest=args.packagedest)
Distributor(p, destination=args.destination, reporter=TextReporter(), packages=packages, build_update=args.build_update, noarchive=args.no_archive, packagedest=args.packagedest, macapp=args.macapp)
return False
+2 -2
View File
@@ -389,13 +389,13 @@ init -1500 python in build:
mac_identity = None
# The command used for mac codesigning.
mac_codesign_command = [ "/usr/bin/codesign", "-s", "{identity}", "-f", "--deep", "--no-strict", "{app}" ]
mac_codesign_command = [ "/usr/bin/codesign", "--entitlements={entitlements}", "--options=runtime", "--timestamp", "-s", "{identity}", "-f", "--deep", "--no-strict", "{app}" ]
# The command used to build a dmg.
mac_create_dmg_command = [ "/usr/bin/hdiutil", "create", "-format", "UDBZ", "-volname", "{volname}", "-srcfolder", "{sourcedir}", "-ov", "{dmg}" ]
# The command used to sign a dmg.
mac_codesign_dmg_command = [ "/usr/bin/codesign", "-s", "{identity}", "-f", "{dmg}" ]
mac_codesign_dmg_command = [ "/usr/bin/codesign", "--timestamp", "-s", "{identity}", "-f", "{dmg}" ]
# Do we want to add the script_version file?
script_version = True
+14 -5
View File
@@ -439,6 +439,8 @@ def save(slotname, extra_info='', mutate_flag=False):
location.scan()
clear_slot(slotname)
# The thread used for autosave.
autosave_thread = None
# Flag that lets us know if an autosave is in progress.
autosave_not_running = threading.Event()
@@ -448,7 +450,7 @@ autosave_not_running.set()
autosave_counter = 0
def autosave_thread(take_screenshot):
def autosave_thread_function(take_screenshot):
global autosave_counter
@@ -521,6 +523,8 @@ def force_autosave(take_screenshot=False, block=False):
If True, blocks until the autosave completes.
"""
global autosave_thread
if renpy.game.after_rollback or renpy.exports.in_rollback():
return
@@ -528,6 +532,11 @@ def force_autosave(take_screenshot=False, block=False):
if not autosave_not_running.isSet():
return
# Join the autosave thread to clear resources.
if autosave_thread is not None:
autosave_thread.join()
autosave_thread = None
# Do not save if we're in the main menu.
if renpy.store.main_menu:
return
@@ -555,12 +564,12 @@ def force_autosave(take_screenshot=False, block=False):
autosave_not_running.clear()
if not renpy.emscripten:
t = threading.Thread(target=autosave_thread, args=(take_screenshot,))
t.daemon = True
t.start()
autosave_thread = threading.Thread(target=autosave_thread_function, args=(take_screenshot,))
autosave_thread.daemon = True
autosave_thread.start()
else:
import emscripten
emscripten.async_call(autosave_thread, take_screenshot, -1)
emscripten.async_call(autosave_thread_function, take_screenshot, -1)
################################################################################
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
set -e
cd "$(dirname $0)/.."
pushd notarized/in
rm -Rf /tmp/notarize
mkdir -p /tmp/notarize
tar xjf renpy.tar.bz2 -C /tmp/notarize
popd
pushd /tmp/notarize
mv renpy-*-sdk/renpy.app .
rm -Rf renpy-*-sdk
codesign --verify --verbose renpy.app
zip -r renpy.app.zip renpy.app
xcrun altool --asc-provider XHTE5H7Z79 -u tom@rothamel.us -p "@keychain:altool" \
--notarize-app \
--primary-bundle-id org.renpy.renpy \
-f renpy.app.zip
popd
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
set -e
cd "$(dirname $0)/.."
pushd /tmp/notarize
result="$(xcrun altool --notarization-history 0 --asc-provider XHTE5H7Z79 -u tom@rothamel.us -p '@keychain:altool' | head -6 | tail -1)"
echo $result
status="$(echo $result | cut -d ' ' -f 5)"
if [ $status = "success" ]; then
echo "Success... now stapling."
else
exit
fi
xcrun stapler staple -v renpy.app
popd
rm -Rf notarized/out/renpy.app || true
cp -a /tmp/notarize/renpy.app notarized/out/
echo "Done."
+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
dmg="/Users/tom/magnetic/ab/website/renpy/dl/$1/renpy-$1-sdk.dmg"
if [ ! -e "$dmg" ]; then
echo "$dmg" not found.
exit 1
else
echo "$dmg" found.
fi
xcrun altool --asc-provider XHTE5H7Z79 -u tom@rothamel.us -p "@keychain:altool" \
--notarize-app \
--primary-bundle-id org.renpy.renpy.dmg \
-f "$dmg"
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
dmg="/Users/tom/magnetic/ab/website/renpy/dl/$1/renpy-$1-sdk.dmg"
if [ ! -e "$dmg" ]; then
echo "$dmg" not found.
exit 1
else
echo "$dmg" found.
fi
xcrun stapler staple --verbose "$dmg"
+11 -10
View File
@@ -2,7 +2,7 @@
Full Changelog
==============
.. _renpy-7.3.3
.. _renpy-7.3.3:
7.3.3
=====
@@ -11,7 +11,7 @@ Audio
-----
Ren'Py now supports an ``audio`` directory, which automatically defines
names in the :ref:`Audio namespace <audio-namespace>`. This makes it
names in the :ref:`audio namespace <audio-namespace>`. This makes it
possible to have a file named ``game/audio/overture.ogg``, and play
it using::
@@ -26,20 +26,21 @@ An issue with enabling the mixing of mono sound files has been fixed.
This issue caused many WAV files not to play. (We still don't recommend
the use of WAV files.)
Platform
--------
Platforms
---------
Ren'Py is now distributed as an unsigned binary on the Mac,
as a workaround for the disruption in workflow that Apple's
notarization process causes. It may be necessary to ctrl-click
renpy.app and choose "Open" to start Ren'Py.
Ren'Py is now distributed as a signed and notarized binary on the
Mac. As this process takes a very long time to accomplish, the
ability to sign macOS binaries has been removed from Ren'Py itself,
in favor of external scripts that take care of the signing and
notarization process.
The minimum version supported by the Android port has been lowered
to Android 19 (Android 4.4 KitKat).
The web port of Ren'Py has seen a number of changes:
* :ref:`Screen variaants <screen-variants>` are now detected and set.
* :ref:`Screen variants <screen-variants>` are now detected and set.
* Fullscreen support has been improved, though the user may need to click to enable fullscren.
* Leaving the web page is detected, so persistent data may be saved.
* 'game.zip' can now be renamed. 'DEFAULT_GAME_FILENAME' in index.html controls this.
@@ -100,7 +101,7 @@ Translations
The Korean and Spanish translations have been updated.
.. _renpy-7.3.2
.. _renpy-7.3.2:
7.3.2
=====
+6
View File
@@ -27,6 +27,7 @@ the omission in future versions.
* Auro-Cyanide
* Baekansi
* Bbs3223474
* Ben Wright
* BlackDragonHunt/Mangagamer
* Bryan Tsang
* Carl
@@ -45,6 +46,7 @@ the omission in future versions.
* Derik
* Diapolo10
* Doomfest
* Donghyeok Tak
* DragoonHP
* Duanemoody
* Edward Betts
@@ -123,8 +125,10 @@ the omission in future versions.
* Piroshki
* Pratomo Asta Nugraha
* Project Gardares
* Psunbury
* Rastagong
* RangHo Lee
* Remix
* Ren
* Renoa
* Ria-kon
@@ -132,6 +136,7 @@ the omission in future versions.
* Rikxz
* rivvil
* Robert Penner
* Roope Herpiö
* Saltome
* Sapphi
* Scout
@@ -146,6 +151,7 @@ the omission in future versions.
* Thuong Nguyen Huu
* Tlm-2501
* Tmrwiz
* Uyjulian
* Viliam Búr
* Vollschauer
* William Tumeo