Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:building_the_standalone_client [2011/04/17 19:52] – DokuWikify rmzelle | dev:building_the_standalone_client [2017/11/12 19:53] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Building | + | < |
+ | in the process of updating the documentation for | ||
+ | <a href=" | ||
+ | may be outdated in the meantime. Thanks for your understanding.</ | ||
- | After initial inquiry [[http:// | ||
- | - Location of source: shown [[dev/svn_and_trac_access|here]] to be https:// | + | See [[dev/client coding/Building the Standalone Client]]. |
- | - Location of build script: '' | + | |
- | - Build prerequisites: | + | |
- | - Tools: Required tools appear to be only '' | + | |
- | - Non-source inputs: Only required input appears to be XULRunner, with constraints: | + | |
- | - Version: '' | + | |
- | - Ubuntu does not package a 2.x xulrunner before [[https:// | + | |
- | - The xulrunner-2.x runtimes are also currently pre-release, | + | |
- | Fortunately one can get prerelease xulrunners from http:// | + | |
- | - Location: '' | + | |
- | - Build control: nothing to do but edit the bash script '' | + | |
- | - Running the built sa (as opposed to running the build): after building, and some perusal of (e.g.) the output of '' | + | |
- | + | ||
- | ===== Bash Scriptlet ===== | + | |
- | + | ||
- | I automated a build on 64-bit Ubuntu with the following bash scriptlet: | + | |
- | + | ||
- | < | + | |
- | # edit following vars as desired for your build | + | |
- | DOWNLOAD_ROOT="/ | + | |
- | BUILD_ARCH=" | + | |
- | BUILD_ROOT=" | + | |
- | BUILD_DIR=" | + | |
- | BUILD_PATH=" | + | |
- | BUILD_SCRIPT=" | + | |
- | BUILD_SCRIPT_BAK=" | + | |
- | XULR_SOURCE_ROOT=" | + | |
- | XULR_TARGET_PATH=" | + | |
- | XULR_VERSION=" | + | |
- | XULR_CHECKSUMS_NAME=" | + | |
- | XULR_CHECKSUMS_SOURCE=" | + | |
- | XULR_CHECKSUMS_TARGET=" | + | |
- | XULR_ARCHIVE_NAME=" | + | |
- | XULR_ARCHIVE_SOURCE=" | + | |
- | XULR_ARCHIVE_TARGET=" | + | |
- | ZOTERO_SOURCE_ROOT=" | + | |
- | ZOTERO_TARGET_EXEC=" | + | |
- | + | ||
- | # setup xulrunner | + | |
- | # download xulrunner | + | |
- | mkdir -p ${DOWNLOAD_ROOT} | + | |
- | wget -O ${XULR_CHECKSUMS_TARGET} ${XULR_CHECKSUMS_SOURCE} | + | |
- | wget -O ${XULR_ARCHIVE_TARGET} ${XULR_ARCHIVE_SOURCE} | + | |
- | # verify xulrunner | + | |
- | pushd ${DOWNLOAD_ROOT} | + | |
- | # sha512sum -c < ${XULR_CHECKSUMS_TARGET} | + | |
- | # fails with | + | |
- | # > sha512sum: standard input: no properly formatted SHA512 checksum lines found | + | |
- | # I tried (offline) some other invocations, | + | |
- | # $ sha512sum -c < / | + | |
- | # sha512sum: standard input: no properly formatted SHA512 checksum lines found | + | |
- | # $ pushd ${DOWNLOAD_ROOT} | + | |
- | # $ sha512sum -c < ${XULR_CHECKSUMS_NAME} | + | |
- | # sha512sum: standard input: no properly formatted SHA512 checksum lines found | + | |
- | # $ sha512sum -c < xulrunner-2.0b9pre.en-US.linux-x86_64.checksums | + | |
- | # sha512sum: standard input: no properly formatted SHA512 checksum lines found | + | |
- | # $ sha512sum -c xulrunner-2.0b9pre.en-US.linux-x86_64.checksums | + | |
- | # sha512sum: xulrunner-2.0b9pre.en-US.linux-x86_64.checksums: | + | |
- | # unpack xulrunner | + | |
- | tar xjf ${XULR_ARCHIVE_NAME} | + | |
- | mkdir -p ${BUILD_PATH} | + | |
- | # ASSERT: archives expand to ./ | + | |
- | mv ./xulrunner ${XULR_TARGET_PATH} | + | |
- | popd | + | |
- | + | ||
- | # setup sources, including script | + | |
- | # checkout sources | + | |
- | pushd ${BUILD_ROOT} | + | |
- | svn co ${ZOTERO_SOURCE_ROOT} ${BUILD_DIR} | + | |
- | popd | + | |
- | pushd ${BUILD_PATH} | + | |
- | # backup unhacked build script | + | |
- | cp ${BUILD_SCRIPT} ${BUILD_SCRIPT_BAK} | + | |
- | chmod 444 ${BUILD_SCRIPT_BAK} | + | |
- | # hack build script to build only linux | + | |
- | chmod 755 ${BUILD_SCRIPT} | + | |
- | sed -si ' | + | |
- | sed -si ' | + | |
- | sed -si ' | + | |
- | diff -u ${BUILD_SCRIPT_BAK} ${BUILD_SCRIPT} | + | |
- | + | ||
- | # CHECK: you should see stdout like | + | |
- | # --- build_sa.0 | + | |
- | # +++ build_sa | + | |
- | # @@ -1,7 +1,7 @@ | + | |
- | # # | + | |
- | # -BUILD_MAC=1 | + | |
- | # +BUILD_MAC=0 | + | |
- | # BUILD_WIN32=0 | + | |
- | # -BUILD_LINUX=0 | + | |
- | # +BUILD_LINUX=1 | + | |
- | + | ||
- | # build | + | |
- | BUILD_START=" | + | |
- | ./ | + | |
- | echo -e " | + | |
- | echo -e "build start=${BUILD_START}" | + | |
- | + | ||
- | # run the built sa | + | |
- | ${ZOTERO_TARGET_EXEC} & | + | |
- | echo -e " | + | |
- | echo -e " | + | |
- | + | ||
- | The (penultimate) build step produced the output | + | |
- | + | ||
- | < | + | |
- | Got Zotero r7528 | + | |
- | Building | + | |
- | Building styles.zip | + | |
- | Retrieving Zotero OpenOffice.org Integration | + | |
- | Building Zotero_linux-i686 | + | |
- | # several errors here, as I did not have the xulrunner for this arch | + | |
- | Building Zotero_linux-x86_64</ | + | |
- | + | ||
- | The run step puts up a zotero window similar to that normally seen in Firefox. When initially run separately from the terminal, it produced the output | + | |
- | + | ||
- | < | + | |
- | ERROR: There is no such extension deployed: org.Zotero.integration.openoffice | + | |
- | unopkg failed.</ | + | |
- | + | ||
- | but I have not observed that subsequently. | + | |
- | + | ||
- | Unfortunately I don't currently know how to test the built sa (much less from Chrome) aside from the following smoketest: if I | + | |
- | - Run the executable (e.g., '' | + | |
- | - Wait for the zotero window, then select " | + | |
- | - Hit button=View in the rightmost pane. | + | |
- | + | ||
- | a browser launches and and opens the [[/ | + | |
- | + | ||
- | - Is there a more extensive test suite? E.g., what do youse do pre-commit? | + | |
- | - How to load up my own (backed up) Zotero data (from my Firefox profile, or wherever else it might be) and do actual work? | + |