Skip to content

Commit

Permalink
nuitka disabled, more translations, draft
Browse files Browse the repository at this point in the history
  • Loading branch information
xy committed Jan 17, 2025
1 parent c08c540 commit f204134
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 98 deletions.
178 changes: 89 additions & 89 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,110 +62,110 @@ jobs:
if-no-files-found: error

##########################################################################
win-nuitka:
needs: [win-pyinstaller-gen-version]
runs-on: windows-latest
# win-nuitka:
# needs: [win-pyinstaller-gen-version]
# runs-on: windows-latest

steps:
- name: checkout
uses: actions/checkout@v4
# steps:
# - name: checkout
# uses: actions/checkout@v4

- name: python setup
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: 'pip'
check-latest: true
# - name: python setup
# uses: actions/setup-python@v5
# with:
# python-version: "3.13"
# cache: 'pip'
# check-latest: true

- name: pip upgrade
run: python -m pip install --upgrade pip
# - name: pip upgrade
# run: python -m pip install --upgrade pip

- name: install requirements
run: pip install -r requirements.txt
# - name: install requirements
# run: pip install -r requirements.txt

#####################################
- name: version download
uses: actions/download-artifact@v4
with:
name: version
path: ./src
# - name: version download
# uses: actions/download-artifact@v4
# with:
# name: version
# path: ./src

#####################################
- name: convert icons to python source
working-directory: ./scripts
run: "icons.convert.bat"
shell: cmd
# - name: convert icons to python source
# working-directory: ./scripts
# run: "icons.convert.bat"
# shell: cmd

#####################################
- name: run nuitka
working-directory: ./scripts
run: "nuitka.run.bat"
shell: cmd
# - name: run nuitka
# working-directory: ./scripts
# run: "nuitka.run.bat"
# shell: cmd

#####################################
- name: upload win nuitka distro
uses: actions/upload-artifact@v4
with:
name: nuitka-win
path: ./build-nuitka/librer.win.zip
if-no-files-found: error
# - name: upload win nuitka distro
# uses: actions/upload-artifact@v4
# with:
# name: nuitka-win
# path: ./build-nuitka/librer.win.zip
# if-no-files-found: error

##########################################################################
lin-nuitka:
permissions: write-all
needs: [win-nuitka]
runs-on: ubuntu-20.04
# lin-nuitka:
# permissions: write-all
# needs: [win-nuitka]
# runs-on: ubuntu-20.04

steps:
- name: checkout
uses: actions/checkout@v4
# steps:
# - name: checkout
# uses: actions/checkout@v4

- name: python setup
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: 'pip'
check-latest: true
# - name: python setup
# uses: actions/setup-python@v5
# with:
# python-version: "3.13"
# cache: 'pip'
# check-latest: true

- name: pip upgrade
run: python -m pip install --upgrade pip
# - name: pip upgrade
# run: python -m pip install --upgrade pip

- name: install requirements
run: pip install -r requirements.txt
# - name: install requirements
# run: pip install -r requirements.txt

- name: strip python binaries
run: find $pythonLocation -name *.so* -type f -exec strip {} \;
# - name: strip python binaries
# run: find $pythonLocation -name *.so* -type f -exec strip {} \;

#####################################
- name: version download
uses: actions/download-artifact@v4
with:
name: version
path: ./src
# - name: version download
# uses: actions/download-artifact@v4
# with:
# name: version
# path: ./src

#####################################
- name: convert icons to python source
working-directory: ./scripts
run: bash "icons.convert.sh"
# - name: convert icons to python source
# working-directory: ./scripts
# run: bash "icons.convert.sh"

#####################################
- name: run nuitka
working-directory: ./scripts
run: bash "nuitka.run.sh"
# - name: run nuitka
# working-directory: ./scripts
# run: bash "nuitka.run.sh"


#####################################
- name: upload lin distro
uses: actions/upload-artifact@v4
with:
name: nuitka-lin
path: ./build-nuitka/librer.lin.zip
if-no-files-found: error
# - name: upload lin distro
# uses: actions/upload-artifact@v4
# with:
# name: nuitka-lin
# path: ./build-nuitka/librer.lin.zip
# if-no-files-found: error

##########################################################################
lin-pyinstaller:
permissions: write-all
needs: [lin-nuitka]
needs: [win-pyinstaller-gen-version]
runs-on: ubuntu-20.04

steps:
Expand Down Expand Up @@ -231,25 +231,25 @@ jobs:
run: mv ./librer.win.zip ./librer.${{ steps.version.outputs.version }}.windows.portable.zip

#####################################
- name: download windows nuitka distro
uses: actions/download-artifact@v4
with:
name: nuitka-win
path: ./
# - name: download windows nuitka distro
# uses: actions/download-artifact@v4
# with:
# name: nuitka-win
# path: ./

- name: rename windows distro
run: mv ./librer.win.zip ./librer.${{ steps.version.outputs.version }}.windows.nuitka.portable.zip
# - name: rename windows distro
# run: mv ./librer.win.zip ./librer.${{ steps.version.outputs.version }}.windows.nuitka.portable.zip


#####################################
- name: download linux nuitka distro
uses: actions/download-artifact@v4
with:
name: nuitka-lin
path: ./
# - name: download linux nuitka distro
# uses: actions/download-artifact@v4
# with:
# name: nuitka-lin
# path: ./

- name: rename linux distro
run: mv ./librer.lin.zip ./librer.${{ steps.version.outputs.version }}.linux.nuitka.portable.zip
# - name: rename linux distro
# run: mv ./librer.lin.zip ./librer.${{ steps.version.outputs.version }}.linux.nuitka.portable.zip

#####################################
- name: Create GitHub release
Expand All @@ -259,11 +259,11 @@ jobs:
with:
tag_name: ${{ steps.version.outputs.version }}
name: Librer ${{ steps.version.outputs.version }}
draft: false
draft: true
prerelease: true
files: |
librer.${{ steps.version.outputs.version }}.linux.portable.zip
librer.${{ steps.version.outputs.version }}.linux.nuitka.portable.zip
# librer.${{ steps.version.outputs.version }}.linux.nuitka.portable.zip
librer.${{ steps.version.outputs.version }}.windows.portable.zip
librer.${{ steps.version.outputs.version }}.windows.nuitka.portable.zip
# librer.${{ steps.version.outputs.version }}.windows.nuitka.portable.zip

1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pyinstaller==6.11.1
send2trash==1.8.3
zstandard==0.23.0
nuitka==2.5.9
tkinterdnd2==0.4.2
psutil==6.1.1
pympler==1.1
Expand Down
18 changes: 10 additions & 8 deletions src/librer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ def get_scan_dialog(self):
temp_frame = Frame(dialog.area_main,borderwidth=2,bg=self.bg_color)
temp_frame.grid(row=0,column=0,sticky='we',padx=4,pady=4)

ul_lab=Label(temp_frame,text="Label:",bg=self.bg_color,anchor='w')
ul_lab=Label(temp_frame,text=STR("Label:"),bg=self.bg_color,anchor='w')
ul_lab.grid(row=0, column=4, sticky='news',padx=4,pady=4)\

label_tooltip = STR("Internal Label of the record to be created")
Expand Down Expand Up @@ -1726,6 +1726,8 @@ def get_entry_ask_dialog(self):
if not self.entry_ask_dialog_created:
self.status(STR("Creating dialog ..."))
self.entry_ask_dialog = EntryDialogQuestion(self.main,self.main_icon_tuple,self.bg_color,pre_show=self.pre_show,post_close=self.post_close)
self.entry_ask_dialog.cancel_button.configure(text=STR('Cancel'))

self.entry_ask_dialog_created = True
return self.entry_ask_dialog

Expand Down Expand Up @@ -2185,7 +2187,7 @@ def alias_name(self):
alias_info = f' ({alias})' if alias else ''
alias_init = alias if alias else self.current_record.header.label

self.get_entry_ask_dialog().show('Alias record name',f"New alias name for record '{self.current_record.header.label}' {alias_info} :",alias_init)
self.get_entry_ask_dialog().show(STR('Alias record name'),STR('New alias name for record') + ' "' + str(self.current_record.header.label) + '"' + str(alias_info) + ":",alias_init)

if self.entry_ask_dialog.res_bool:
alias = self.entry_ask_dialog.entry_val.get()
Expand Down Expand Up @@ -2268,7 +2270,7 @@ def record_import_wii(self):

postfix = f' to group:{group}' if group else ''

if import_filenames := askopenfilenames(initialdir=self.last_dir,parent = self.main,title='Choose "Where Is It?" Report xml files to import' + postfix, defaultextension=".xml",filetypes=[("XML Files","*.xml"),("All Files","*.*")]):
if import_filenames := askopenfilenames(initialdir=self.last_dir,parent = self.main,title='Choose "Where Is It?" Report xml files to import' + postfix, defaultextension=".xml",filetypes=[(STR("XML Files"),"*.xml"),(STR("All Files"),"*.*")]):
self.status('Parsing WII files ... ')
self.main.update()
dialog = self.get_progress_dialog_on_main()
Expand Down Expand Up @@ -2385,7 +2387,7 @@ def record_import(self):

postfix = STR('to group:') + str(group) if group else ''

if import_filenames := askopenfilenames(initialdir=self.last_dir,parent = self.main,title=STR('Choose record files to import') + ' ' + postfix, defaultextension=".dat",filetypes=[("Dat Files","*.dat"),("All Files","*.*")]):
if import_filenames := askopenfilenames(initialdir=self.last_dir,parent = self.main,title=STR('Choose record files to import') + ' ' + postfix, defaultextension=".dat",filetypes=[(STR("Dat Files"),"*.dat"),(STR("All Files"),"*.*")]):
self.last_dir = dirname(import_filenames[0])
if import_res := librer_core.import_records(import_filenames,self.single_record_show,group):
self.info_dialog_on_main.show(STR('Import failed'),import_res)
Expand All @@ -2400,7 +2402,7 @@ def record_import(self):
@block
def record_export(self):
if self.current_record:
if export_file_path := asksaveasfilename(initialdir=self.last_dir,parent = self.main, initialfile = 'record.dat',defaultextension=".dat",filetypes=[("Dat Files","*.dat"),("All Files","*.*")]):
if export_file_path := asksaveasfilename(initialdir=self.last_dir,parent = self.main, initialfile = 'record.dat',defaultextension=".dat",filetypes=[(STR("Dat Files"),"*.dat"),(STR("All Files"),"*.*")]):
self.last_dir = dirname(export_file_path)

if export_res := librer_core.export_record(self.current_record,export_file_path):
Expand Down Expand Up @@ -2768,7 +2770,7 @@ def find_next(self):
self.select_find_result(1)

def find_save_results(self):
if report_file_name := asksaveasfilename(parent = self.find_dialog.widget, initialfile = 'librer_search_report.txt',defaultextension=".txt",filetypes=[("All Files","*.*"),("Text Files","*.txt")]):
if report_file_name := asksaveasfilename(parent = self.find_dialog.widget, initialfile = 'librer_search_report.txt',defaultextension=".txt",filetypes=[(STR("All Files"),"*.*"),(STR("Text Files"),"*.txt")]):
self.status('saving file "%s" ...' % str(report_file_name))

with open(report_file_name,'w') as report_file:
Expand Down Expand Up @@ -3945,7 +3947,7 @@ def scan(self,compression_level,threads,group=None):
self_configure_tooltip = self.configure_tooltip

self_tooltip_message[str_self_progress_dialog_on_scan_abort_button]=STR('If you abort at this stage,\nData record will not be created.')
self_progress_dialog_on_scan.abort_button.configure(image=self.ico_abort,text='Cancel',compound='left',width=15)
self_progress_dialog_on_scan.abort_button.configure(image=self.ico_abort,text=STR("Cancel"),compound='left',width=15)

self.scan_dialog.widget.update()

Expand Down Expand Up @@ -4515,7 +4517,7 @@ def cde_up(self,e):

def cde_entry_open(self,e) :
initialdir = self.last_dir if self.last_dir else self.cwd
if res:=askopenfilename(title='Select File',initialdir=initialdir,parent=self.scan_dialog.area_main,filetypes=(("Executable Files","*.exe"),("Bat Files","*.bat"),("All Files","*.*")) if windows else (("Bash Files","*.sh"),("All Files","*.*")) ):
if res:=askopenfilename(title=STR('Select File'),initialdir=initialdir,parent=self.scan_dialog.area_main,filetypes=((STR("Executable Files"),"*.exe"),(STR("Bat Files"),"*.bat"),(STR("All Files"),"*.*")) if windows else ((STR("Bash Files"),"*.sh"),(STR("All Files"),"*.*")) ):
self.last_dir=dirname(res)

expr = normpath(abspath(res))
Expand Down
20 changes: 20 additions & 0 deletions src/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,18 @@ class LANGUAGES:
"pl":'Wybierz plik'},
'All Files':{
"pl":'Wszystkie pliki'},
'Text Files':{
"pl":'Pliki tekstowe'},
"Bash Files":{
"pl":'Pliki Bash'},
"Executable Files":{
"pl":'Pliki Wykonywalne'},
"Bat Files":{
"pl":'Pliki bat'},
"XML Files":{
"pl":'Pliki XML'},
"Dat Files":{
"pl":'Pliki Dat'},
'Test Custom Data Extractor on selected file ?':{
"pl":'Przetestować Ekstraktor Danych Użytkownika na wybranym pliku ?'},
'Testing selected Custom Data Extractor':{
Expand All @@ -439,6 +451,14 @@ class LANGUAGES:
"pl":'Język:'},
'Records':{
"pl":'Rekordy'},
'Alias record name':{
"pl":'Alias nazwy rekordu'},
'Cancel':{
"pl":'Anuluj'},
"Label:":{
"pl":'Nazwa:'},
'New alias name for record':{
"pl":'Nowy Alias:'},
'Include hidden files/folders in scan.':{
"pl":'Uwzględniaj pliki/foldery ukryte.'},
}
Expand Down

0 comments on commit f204134

Please sign in to comment.