@@ -23,10 +23,9 @@ impl CPackInfo {
23
23
}
24
24
}
25
25
26
- // there is a solution with cfg_if crate but imlazy
27
26
28
- #[ cfg ( windows) ]
29
- #[ link( name = "geodeutils.dll" ) ]
27
+ #[ cfg_attr ( target_os = " windows" , link ( name = "geodeutils.dll" ) ) ]
28
+ #[ cfg_attr ( not ( target_os = "windows" ) , link( name = "geodeutils" ) ) ]
30
29
extern "C" {
31
30
pub fn geode_update (
32
31
location : * const c_char ,
@@ -97,78 +96,6 @@ extern "C" {
97
96
) -> * const c_char ;
98
97
}
99
98
100
- #[ cfg( not( windows) ) ]
101
- #[ link( name = "geodeutils" ) ]
102
- extern "C" {
103
- pub fn geode_update (
104
- location : * const c_char ,
105
- version : * const c_char
106
- ) -> * const c_char ;
107
-
108
- pub fn geode_update_check (
109
- location : * const c_char ,
110
- version : * const c_char ,
111
- has_update : * mut bool
112
- ) -> * const c_char ;
113
-
114
- pub fn geode_version ( ) -> i32 ;
115
-
116
- pub fn geode_create_template (
117
- project_location : * const c_char ,
118
- name : * const c_char ,
119
- version : * const c_char ,
120
- id : * const c_char ,
121
- developer : * const c_char ,
122
- description : * const c_char
123
- ) -> * const c_char ;
124
-
125
- pub fn geode_package (
126
- resource_dir : * const c_char ,
127
- exec_dir : * const c_char ,
128
- out_file : * const c_char ,
129
- log : bool ,
130
- use_cached_resources : bool ,
131
- ) -> * const c_char ;
132
-
133
- pub fn geode_amend_package (
134
- geode_file : * const c_char ,
135
- file_to_add : * const c_char ,
136
- dir_in_zip : * const c_char
137
- ) -> * const c_char ;
138
-
139
- pub fn geode_install_package (
140
- out_file : * const c_char ,
141
- install_path : * const c_char
142
- ) -> * const c_char ;
143
-
144
- pub fn geode_sprite_sheet (
145
- in_dir : * const c_char ,
146
- out_dir : * const c_char ,
147
- create_variants : bool ,
148
- name : * const c_char , // can be null
149
- prefix : * const c_char , // can be null
150
- pack_info : * mut CPackInfo
151
- ) -> * const c_char ;
152
-
153
-
154
- pub fn geode_sprite_variants (
155
- file : * const c_char ,
156
- out_dir : * const c_char ,
157
- prefix : * const c_char // can be null
158
- ) -> * const c_char ;
159
-
160
- pub fn geode_create_bitmap_font_from_ttf (
161
- ttf_path : * const c_char ,
162
- out_dir : * const c_char ,
163
- name : * const c_char , // can be null
164
- fontsize : u32 ,
165
- prefix : * const c_char , // can be null
166
- create_variants : bool ,
167
- charset : * const c_char , // can be null
168
- outline : u32 ,
169
- ) -> * const c_char ;
170
- }
171
-
172
99
#[ macro_export]
173
100
macro_rules! call_extern {
174
101
( $x: expr) => { {
0 commit comments