GithubHelp home page GithubHelp logo

dm.pl's Introduction

Theos

A cross-platform build system for creating iOS,
macOS, Linux, and Windows programs.

HomeInstallationDocumentationGet Help@[email protected]@theosdevDiscord

Contributors


kirb

uroboro

kabiroberai

DHowett

rpetrich

Thanks to the following people for contributing to Theos in the past: Aehmlo, akemin-dayo, ARM64Darwin1820, ArtikusHG, benrosen78, brendonjkding, conradev, coolstar, DavidSkrundz, DGh0st, Diatrus, dlevi309, DuIslingr, elihwyma, eswick, evelyneee, hirakujira, inoahdev, kemmis, lechium, leptos-null, liuxuan30, mstg, Naville, neoighodaro, nin9tyfour, NSExceptional, opa334, PoomSmart, quiprr, r-plus, Rand01ph, ryannair05, sbingner, Shade-Zepheri, supermamon, theiostream, Tyilo, vsnrain

License

See LICENSE.md for licensing information.

dm.pl's People

Contributors

captinc avatar dhowett avatar kirb avatar l1ghtmann avatar sbingner avatar tyilo avatar uroboro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dm.pl's Issues

Failing compress command leaves deb in bad state

What are the steps to reproduce this issue?

  1. Break a compression command (lzma/bzip2) so it will die or otherwise not work
  2. Build a deb using that compression mechanism

What happens?

dm.pl will build a deb and return a SIGBUS error but no visual error, it leaves behind a deb file missing the data slice but containing control

What were you expecting to happen?

Failure with visual indication of error and no broken deb file left behind

Deb file with long path fails to install sometimes

What are the steps to reproduce this issue?

  1. Create a new theos project:
$ nic.pl
NIC 2.0 - New Instance Creator
------------------------------
  [1.] iphone/activator_event
  [2.] iphone/application_modern
  [3.] iphone/cydget
  [4.] iphone/flipswitch_switch
  [5.] iphone/framework
  [6.] iphone/ios7_notification_center_widget
  [7.] iphone/library
  [8.] iphone/notification_center_widget
  [9.] iphone/preference_bundle_modern
  [10.] iphone/tool
  [11.] iphone/tweak
  [12.] iphone/xpc_service
Choose a Template (required): 10
Project Name (required): foobar
Package Name [com.yourcompany.foobar]: 
Author/Maintainer Name [tyilo]: 
Instantiating iphone/tool in foobar/...
Done.
  1. Make the following directory in layout and add two specific files:
cd foobar
DIR="layout/var/mobile/FooBarTweak/FooBarOriginal.app/META-INF/AIR/extensions/com.distriqt.FacebookUtils/META-INF/ANE/iPhone-ARM"
mkdir -p "$DIR"
cd "$DIR"
curl https://pomf.pyonpyon.moe/osjisf.swf -o library.swf
curl https://pomf.pyonpyon.moe/jinfnl.xml -o platform.xml
  1. Run make package install multiple times (like 10 times)

What happens?

Some of the installations succeeds and some fails. When it fails, the error message differs.

Here are some outputs that I have observed: https://gist.github.com/Tyilo/44360831d14087821365782b0a4c4e0d

What were you expecting to happen?

Installation should always succeed.

Any logs, error output, etc?

See above.

Any other comments?

Actually the problem seems to be with dpkg on my iPhone: Just repeatedly running dpkg -i on the generated deb will succeed sometimes and fail sometimes. I didn't have this problem before the switch to using dm.pl.

I'm using iOS 9.3.3 and the installed dpkg version is 1.18.10. Maybe dpkg needs to be updated for Cydia?

What versions of software are you using?

Operating System: Linux

Toolchain Version:

iOS Toolchain for Linux

LLVM + Clang 3.9.1
LD64 264.3.102
CCTools 877.5

Built by CoolStar w/ <3

SDK Version: iPhoneOS9.3.sdk

Generate deb filename if directory passed as the output argument

dpkg-deb lets you pass a directory as the output argument, which causes it to generate a filename of the well-known format:

<Package>_<Version>_<Architecture>.deb

…and save it in the directory provided.

Doing this with dm.pl currently fails with:

dm.pl: building package `com.example.florp:iphoneos-arm' in `..'
Is a directory at /Users/kirb/theos/bin/dm.pl line 94.

Package build freeze with large files

When i try to build a package with latest theos which has a zip file in the Resources folder, it freezes. I created a blank tweak and added a zip file(62.2Mb) and i can reproduce it every time on my mac.

Steps to reproduce:

  1. Clone this sample repo: https://github.com/l0stpenguin/fritzer.git
  2. Run make clean do all messages=yes

What happens?

it freeze on
dm.pl: building package com.chester.fritzer:iphoneos-arm' in ./packages/com.chester.fritzer_0.0.1-1+debug_iphoneos-arm.deb'

What were you expecting to happen?

The deb should be built succesfully

Any logs, error output, etc?

MacBook-Air:fritzer chesterfield$ make clean do all messages=yes
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 6 "Cleaning"); set -o pipefail; (rm -rf "/Users/chesterfield/Documents/workspace/fritzer/.theos/obj")
==> Cleaning…
set -o pipefail; (rm -rf "/Users/chesterfield/Documents/workspace/fritzer/.theos/_")
> Making all for bundle com.chester.fritzer…
set -o pipefail; (mkdir -p "/Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/com.chester.fritzer.bundle")
set -o pipefail; (mkdir -p "/Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/com.chester.fritzer.bundle")
set -o pipefail; (mkdir -p "/Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/com.chester.fritzer.bundle")
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 5 "Copying resource directories into the bundle wrapper"); set -o pipefail; (for d in Resources; do \
		if [[ -d "$d" ]]; then \
			rsync -a "$d/" "/Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/com.chester.fritzer.bundle/" --exclude "_MTN" --exclude ".git" --exclude ".svn" --exclude ".DS_Store" --exclude "._*"; \
		else \
			printf "\e[0;33m==> \e[1;33mWarning:\e[m %s\n" "Ignoring missing bundle resource directory $d." >&2; \
		fi; \
	done)
==> Copying resource directories into the bundle wrapper…
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile --no-keep-going COLOR=1 \
		internal-bundle-compile \
		_THEOS_CURRENT_TYPE=bundle THEOS_CURRENT_INSTANCE=com.chester.fritzer _THEOS_CURRENT_OPERATION=compile \
		THEOS_BUILD_DIR="." _THEOS_MAKE_PARALLEL=yes
==> Warning: No files to link - creating a bundle containing only resources
> Making all for tweak fritzer…
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile --no-keep-going COLOR=1 \
		internal-library-compile \
		_THEOS_CURRENT_TYPE=tweak THEOS_CURRENT_INSTANCE=fritzer _THEOS_CURRENT_OPERATION=compile \
		THEOS_BUILD_DIR="." _THEOS_MAKE_PARALLEL=yes
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile --no-print-directory --no-keep-going internal-tweak-compile _THEOS_CURRENT_TYPE="tweak" THEOS_CURRENT_INSTANCE="fritzer" _THEOS_CURRENT_OPERATION="compile" THEOS_BUILD_DIR="." THEOS_CURRENT_ARCH="arm64"
set -o pipefail; (mkdir -p /Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/arm64/)
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 1 "Preprocessing Tweak.xm"); set -o pipefail; (/Users/chesterfield/theos/bin/logos.pl -c warnings=error -c generator=MobileSubstrate    Tweak.xm > /Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/arm64/Tweak.xm.mm)
==> Preprocessing Tweak.xm…
set -o pipefail; (mkdir -p /Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/arm64/)
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 2 "Compiling Tweak.xm (arm64)"); set -o pipefail; (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -x objective-c++ -c -I"/Users/chesterfield/Documents/workspace/fritzer" -I/Users/chesterfield/theos/include -I/Users/chesterfield/theos/vendor/include -I/Users/chesterfield/theos/include/_fallback -include /Users/chesterfield/theos/Prefix.pch -MT /Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/arm64/Tweak.xm.32a44d18.o -MMD -MP -MF "/Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/arm64/Tweak.xm.32a44d18.Td" -fcolor-diagnostics -DTARGET_IPHONE=1 -O0 -Wall -ggdb -Werror  -isysroot "/Users/chesterfield/theos/sdks/iPhoneOS11.2.sdk" -miphoneos-version-min=11.2 -fmodules -fcxx-modules -fmodule-name=fritzer -fbuild-session-file=/Users/chesterfield/Documents/workspace/fritzer/.theos/build_session -fmodules-prune-after=345600 -fmodules-prune-interval=86400 -fmodules-validate-once-per-build-session    -DDEBUG -O0  -DTHEOS_INSTANCE_NAME="\"fritzer\"" -fmodules -fcxx-modules -fmodule-name=fritzer -fbuild-session-file=/Users/chesterfield/Documents/workspace/fritzer/.theos/build_session -fmodules-prune-after=345600 -fmodules-prune-interval=86400 -fmodules-validate-once-per-build-session  -arch arm64               /Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/arm64/Tweak.xm.mm -o /Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/arm64/Tweak.xm.32a44d18.o)
==> Compiling Tweak.xm (arm64)…
set -o pipefail; (mkdir -p /Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/arm64)
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 3 "Linking tweak fritzer (arm64)"); set -o pipefail; (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -fcolor-diagnostics -L/Users/chesterfield/theos/lib -ggdb -L/Users/chesterfield/theos/vendor/lib -lobjc -framework Foundation -framework CoreFoundation -ObjC++ -fobjc-exceptions -fobjc-call-cxx-cdtors              -F/Users/chesterfield/theos/vendor/lib -framework CydiaSubstrate -dynamiclib -install_name "/Library/MobileSubstrate/DynamicLibraries/fritzer.dylib"  -isysroot "/Users/chesterfield/theos/sdks/iPhoneOS11.2.sdk" -miphoneos-version-min=11.2  -multiply_defined suppress  -arch arm64  -O0 -o "/Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/arm64/fritzer.dylib" /Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/arm64/Tweak.xm.32a44d18.o)
==> Linking tweak fritzer (arm64)…
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 4 "Generating debug symbols for fritzer"); set -o pipefail; (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil "/Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/arm64/fritzer.dylib")
==> Generating debug symbols for fritzer…
warning: no debug symbols in executable (-arch arm64)
rm /Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/arm64/Tweak.xm.mm
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 4 "Merging tweak fritzer"); set -o pipefail; (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -arch arm64 /Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/arm64/fritzer.dylib -create -output "/Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/fritzer.dylib.47ba6b93.unsigned")
==> Merging tweak fritzer…
(printf "\e[0;3%im==> \e[1;39m%s…\e[m\n" 4 "Signing fritzer"); set -o pipefail; (CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate  ldid -S "/Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/fritzer.dylib.47ba6b93.unsigned" && mv "/Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/fritzer.dylib.47ba6b93.unsigned" "/Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/fritzer.dylib")
==> Signing fritzer…
set -o pipefail; (rm -rf "/Users/chesterfield/Documents/workspace/fritzer/.theos/_")
set -o pipefail; (/Users/chesterfield/theos/bin/fakeroot.sh -p "/Users/chesterfield/Documents/workspace/fritzer/.theos/fakeroot" -c)
set -o pipefail; (mkdir -p "/Users/chesterfield/Documents/workspace/fritzer/.theos/_")
set -o pipefail; ([ -d layout ] && rsync -a "layout/" "/Users/chesterfield/Documents/workspace/fritzer/.theos/_" --exclude "DEBIAN" --exclude "_MTN" --exclude ".git" --exclude ".svn" --exclude ".DS_Store" --exclude "._*" || true)
> Making stage for bundle com.chester.fritzer…
set -o pipefail; (mkdir -p "/Users/chesterfield/Documents/workspace/fritzer/.theos/_/Library/MobileSubstrate/DynamicLibraries/com.chester.fritzer.bundle")
set -o pipefail; (rsync -a "/Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/com.chester.fritzer.bundle/" "/Users/chesterfield/Documents/workspace/fritzer/.theos/_/Library/MobileSubstrate/DynamicLibraries/com.chester.fritzer.bundle")
> Making stage for tweak fritzer…
set -o pipefail; (mkdir -p "/Users/chesterfield/Documents/workspace/fritzer/.theos/_/Library/MobileSubstrate/DynamicLibraries/")
set -o pipefail; (cp /Users/chesterfield/Documents/workspace/fritzer/.theos/obj/debug/fritzer.dylib "/Users/chesterfield/Documents/workspace/fritzer/.theos/_/Library/MobileSubstrate/DynamicLibraries/")
set -o pipefail; (cp fritzer.plist "/Users/chesterfield/Documents/workspace/fritzer/.theos/_/Library/MobileSubstrate/DynamicLibraries/")
set -o pipefail; (mkdir -p "/Users/chesterfield/Documents/workspace/fritzer/.theos/_/DEBIAN")
set -o pipefail; (sed -e 's/\${LIBSWIFT}/org.swift.libswift (>= 5.0)/g; s/\${LIBSWIFT_VERSION}/5.0/g; /^[Vv]ersion:/d; /^$/d; $a\' "/Users/chesterfield/Documents/workspace/fritzer/control" > "/Users/chesterfield/Documents/workspace/fritzer/.theos/_/DEBIAN/control")
set -o pipefail; (echo "Version: 0.0.1-1+debug" >> "/Users/chesterfield/Documents/workspace/fritzer/.theos/_/DEBIAN/control")
set -o pipefail; (echo "Installed-Size: 60788" >> "/Users/chesterfield/Documents/workspace/fritzer/.theos/_/DEBIAN/control")
set -o pipefail; (COPYFILE_DISABLE=1 /Users/chesterfield/theos/bin/fakeroot.sh -p "/Users/chesterfield/Documents/workspace/fritzer/.theos/fakeroot" -r dm.pl -Zlzma -z0 -b "/Users/chesterfield/Documents/workspace/fritzer/.theos/_" "./packages/com.chester.fritzer_0.0.1-1+debug_iphoneos-arm.deb")
dm.pl: building package `com.chester.fritzer:iphoneos-arm' in `./packages/com.chester.fritzer_0.0.1-1+debug_iphoneos-arm.deb'

Any other comments?

I tried several zip files, it did work on some but most big zip files made it failed.

What versions of software are you using?

Operating System:
Mac OS 10.14.5

Toolchain Version:

SDK Version:

Control files not being generated

(Thanks for reporting an issue! Please make sure you click the link above to view the issue guidelines, then fill out the blanks below.)

What are the steps to reproduce this issue?

  1. generate a project on linux using nic.pl (might be specific to my setup)
  2. check for control file

What happens?

the control file is not there

What were you expecting to happen?

the control file to be there

Any logs, error output, etc?

no errors it just doesnt generate

Any other comments?

has happened only to control files no matter what template i use

What versions of software are you using?

Operating System:

Toolchain Version:

SDK Version:

lzma: invalid option -- '0' for Debian on WSL

What are the steps to reproduce this issue?

  1. Setup theos for Debian on WSL
  2. Create a new empty project (error happens for any project)
  3. Run make clean package (without FINALPACKAGE flag)

What happens?

image

What were you expecting to happen?

There should be no error.

Any logs, error output, etc?

Image included above.

Any other comments?

Commit 840b7e5 is what introduced the issue.

It tries to set the compression level to 0 when FINALPACKAGE is not set which for some reason is invalid for Debian on WSL.

I tried the same configuration on Cygwin and there is no error (compress level of 0 is valid on Cygwin).

What versions of software are you using?

Operating System: Debian on WSL

Toolchain Version: One specified in WSL/linux installation guide

SDK Version: 8.1

Update README on NPM

The README file does not appear to be updated as per 3be36a7 on at least npmjs.com. Not a huge issue, but definitely confusing at first.

deb package created by dm.pl is not compatible for dpkg v1.14(from Cydia/Telesphoreo repo)

What are the steps to reproduce this issue?

  1. create deb package by latest(I'm using 827684e) theos with dm.pl
  2. install it to jailbroken device that installed dpkg v1.14.
  3. all files in deb file are extracted to root directory.

What happens?

All files in deb file are extracted root directory.
This is "Installed files" list on cydia.
problem1

What were you expecting to happen?

keep directory structure.

Any logs, error output, etc?

No error log while installing deb package.

Any other comments?

If I switch back to dpkg-deb, this problem is fixed.
So I'm thinking this cause is dm.pl.

What versions of software are you using?

Operating System:
macOS 10.14.4

Toolchain Version:
Xcode 10.2

SDK Version:
9.2

make package error

What are the steps to reproduce this issue?

  1. Go into a project folder
  2. make package

What happens?

Gives me an error:

set -o pipefail; (COPYFILE_DISABLE=1 /Users/angle/theos/bin/fakeroot.sh -p "/Users/angle/Documents/work/test/.theos/fakeroot" -r dm.pl -Zgzip -z0 -b "/Users/angle/Documents/work/test/.theos/_" "./debs/com.xxx_0.0.0.3+debug_iphoneos-arm.deb")
dm.pl: building package `com.xxx:iphoneos-arm' in `./debs/com.xxx_0.0.0.3+debug_iphoneos-arm.deb'
gzip: invalid option -- 0
Apple gzip 272
usage: gzip [-123456789acdfhklLNnqrtVv] [-S .suffix] [<file> [<file> ...]]
 -1 --fast            fastest (worst) compression
 -2 .. -8             set compression level
 -9 --best            best (slowest) compression
 -c --stdout          write to stdout, keep original files
    --to-stdout
 -d --decompress      uncompress files
    --uncompress
 -f --force           force overwriting & compress links
 -h --help            display this help
 -k --keep            don't delete input files during operation
 -l --list            list compressed file contents
 -N --name            save or restore original file name and time stamp
 -n --no-name         don't save original file name or time stamp
 -q --quiet           output no warnings
 -r --recursive       recursively compress files in directories
 -S .suf              use suffix .suf instead of .gz
    --suffix .suf
 -t --test            test compressed file
 -V --version         display program version
 -v --verbose         print extra statistics

What were you expecting to happen?

make a deb package successfully.

Any other comments?

The last version I used and which can successfully make a package has no -z0

What versions of software are you using?

Operating System: macOS High Sierra 10.13.5

Toolchain Version: latest in the OS

SDK Version: iPhoneOS10.3.sdk

Equate compression level 0 to cat.

Instead of mapping compression level 0 to 1 when bzip2 or gzip are used, we could instead use cat for no compression at all. This would also be mapped for xz/lzma.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.