Skip to content

Commit

Permalink
<fix> fix clean before unrpyc complete
Browse files Browse the repository at this point in the history
  • Loading branch information
anonymousException committed Jun 4, 2024
1 parent 2af2d03 commit 39243ad
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/game_unpacker_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,15 @@ def run(self):
if self.is_over_write:
command = command + ' --clobber'
log_print(command)
if os.path.isfile('unrpyc.complete'):
os.remove('unrpyc.complete')
p = subprocess.Popen(command, shell=True, stdout=my_log.f, stderr=my_log.f,
creationflags=0x08000000, text=True, encoding='utf-8')
p.wait()
time.sleep(1)
while True:
if os.path.isfile('unrpyc.complete'):
os.remove('unrpyc.complete')
break
clean_unrpyc(self.dir)
io.open(self.dir + '/unren.finish', mode='w', encoding='utf-8').close()
except Exception as e:
Expand Down
3 changes: 3 additions & 0 deletions src/unrpyc_python2/unrpyc.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
# SOFTWARE.

import argparse
import io
import os.path
from os import path, walk
import codecs
import glob
Expand Down Expand Up @@ -371,3 +373,4 @@ def glob_or_complain(s):

if __name__ == '__main__':
main()
io.open(os.getcwd() + '/unrpyc.complete', 'w', encoding='utf-8').close()
7 changes: 7 additions & 0 deletions src/unrpyc_python3/unrpyc.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import argparse
import io
import os
import sys
from os import path, walk
import glob
Expand Down Expand Up @@ -481,5 +483,10 @@ def glob_or_complain(s):
else:
print("Decompilation of %d file%s successful, but decompilation of %d file%s failed" % (good, 's' if good>1 else '', bad, 's' if bad>1 else ''))

print(args.file)
print(os.path.dirname(args.file))
io.open(os.path.dirname(args.file) + '/unrpyc.complete', 'w', encoding='utf-8').close()

if __name__ == '__main__':
main()
io.open(os.getcwd()+'/unrpyc.complete', 'w', encoding='utf-8').close()

0 comments on commit 39243ad

Please sign in to comment.